1. 27 Aug, 2019 1 commit
    • Mike Rapoport's avatar
      xtensa: remove free_initrd_mem · f348f5c2
      Mike Rapoport authored
      The xtensa free_initrd_mem() verifies that initrd is mapped and then
      frees its memory using free_reserved_area().
      The initrd is considered mapped when its memory was successfully reserved
      with mem_reserve().
      Resetting initrd_start to 0 in case of mem_reserve() failure allows to
      switch to generic free_initrd_mem() implementation.
      Signed-off-by: default avatarMike Rapoport <rppt@linux.ibm.com>
      Message-Id: <1563977432-8376-1-git-send-email-rppt@linux.ibm.com>
      Signed-off-by: default avatarMax Filippov <jcmvbkbc@gmail.com>
  2. 12 Aug, 2019 1 commit
  3. 17 Jun, 2019 1 commit
    • Max Filippov's avatar
      xtensa: drop dead PCI support code · 88804e68
      Max Filippov authored
      xtensa-specific PCI initialization code has significantly bitrotted over
      time because there's no platform that use it. Get rid of remaining
      non-functioning initialization and remove platform_pcibios_* interface.
      A new platform that would use PCI on xtensa will configure PCI
      controller using device tree.
      Drop variables pci_ctrl_head, pci_bus_count and functions pcibios_init,
      pci_controller_apertures, platform_pcibios_init and
      Signed-off-by: default avatarMax Filippov <jcmvbkbc@gmail.com>
  4. 30 May, 2019 1 commit
    • Guenter Roeck's avatar
      xtensa: Fix section mismatch between memblock_reserve and mem_reserve · adefd051
      Guenter Roeck authored
      Since commit 9012d011
       ("compiler: allow all arches to enable
      CONFIG_OPTIMIZE_INLINING"), xtensa:tinyconfig fails to build with section
      mismatch errors.
      WARNING: vmlinux.o(.text.unlikely+0x68): Section mismatch in reference
      	from the function ___pa()
      	to the function .meminit.text:memblock_reserve()
      WARNING: vmlinux.o(.text.unlikely+0x74): Section mismatch in reference
      	from the function mem_reserve()
      	to the function .meminit.text:memblock_reserve()
      FATAL: modpost: Section mismatches detected.
      This was not seen prior to the above mentioned commit because mem_reserve()
      was always inlined.
      Mark mem_reserve(() as __init_memblock to have it reside in the same
      section as memblock_reserve().
      Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Message-Id: <1559220098-9955-1-git-send-email-linux@roeck-us.net>
      Signed-off-by: default avatarMax Filippov <jcmvbkbc@gmail.com>
  5. 07 May, 2019 1 commit
  6. 04 Dec, 2018 1 commit
  7. 20 Aug, 2018 2 commits
  8. 30 Jan, 2018 1 commit
  9. 17 Dec, 2017 3 commits
    • Max Filippov's avatar
      xtensa: add support for KASAN · c633544a
      Max Filippov authored
      Cover kernel addresses above 0x90000000 by the shadow map. Enable
      HAVE_ARCH_KASAN when MMU is enabled. Provide kasan_early_init that fills
      shadow map with writable copies of kasan_zero_page. Call
      kasan_early_init right after mmu initialization in the setup_arch.
      Provide kasan_init that allocates proper shadow map pages from the
      memblock and puts these pages into the shadow map for addresses from
      VMALLOC area to the end of KSEG. Call kasan_init right after memblock
      initialization. Don't use KASAN for the boot code, MMU and KASAN
      initialization and page fault handler. Make kernel stack size 4 times
      larger when KASAN is enabled to avoid stack overflows.
      GCC 7.3, 8 or newer is required to build the xtensa kernel with KASAN.
      Signed-off-by: default avatarMax Filippov <jcmvbkbc@gmail.com>
    • Max Filippov's avatar
      xtensa: extract init_kio · c2edb35a
      Max Filippov authored
      KIO region placement may be specified in the device tree, that's why
      it's initialized with the rest of MMU after the early_init_devtree. In
      order to support KASAN the MMU must be initialized earlier.
      Separate KIO initialization from the rest of MMU initialization.
      Reinitialize KIO if its location is specified in the device tree.
      Signed-off-by: default avatarMax Filippov <jcmvbkbc@gmail.com>
    • Max Filippov's avatar
      xtensa: clean up custom-controlled debug output · c130d3be
      Max Filippov authored
      Replace #ifdef'fed/commented out debug printk statements with pr_debug.
      Replace printk statements with pr_* equivalents.
      Signed-off-by: default avatarMax Filippov <jcmvbkbc@gmail.com>
  10. 11 Dec, 2017 1 commit
  11. 10 Dec, 2017 1 commit
    • Max Filippov's avatar
      xtensa: build kernel with text-section-literals · f8f02ca7
      Max Filippov authored
      vmlinux.lds.S doesn't do anything special with literals, so instead of
      keeping them separate put them into the corresponding text sections.
      Drop explicit .literal sections from the vmlinux.lds.S, use standard
      section macros. Mark literal pool locations in the assembly sources.
      Unfortunately assembler doesn't put literals into .init sections and
      external libgcc may still have .literal sections, so sed transformation
      to the linker script is still needed.
      Signed-off-by: default avatarMax Filippov <jcmvbkbc@gmail.com>
  12. 10 Aug, 2017 1 commit
  13. 08 May, 2017 1 commit
  14. 28 Apr, 2017 1 commit
  15. 13 Mar, 2017 1 commit
  16. 01 Mar, 2017 2 commits
  17. 01 Feb, 2017 1 commit
  18. 16 Nov, 2016 2 commits
  19. 21 Sep, 2016 1 commit
    • Max Filippov's avatar
      xtensa: rearrange CCOUNT calibration · 205ad548
      Max Filippov authored
      DT-enabled kernel should have a CPU node connected to a clock. This clock
      is the CCOUNT clock. Use old platform_calibrate_ccount call as a fallback
      when CPU node cannot be found or has no clock and in non-DT-enabled
      Drop no longer needed code that updates CPU clock-frequency property in
      the DT; drop DT-related code from the platform_calibrate_ccount too.
      Move of_clk_init to the top of time_init, so that clocks are initialized
      before CCOUNT calibration is attempted.
      Signed-off-by: default avatarMax Filippov <jcmvbkbc@gmail.com>
  20. 12 Sep, 2016 3 commits
  21. 26 Jul, 2016 2 commits
  22. 24 Jul, 2016 2 commits
    • Max Filippov's avatar
      xtensa: drop sysmem and switch to memblock · 0e46c111
      Max Filippov authored
      Memblock is the standard kernel boot-time memory tracker/allocator. Use
      it instead of the custom sysmem allocator. This allows using kmemleak,
      CMA and device tree memory reservation.
      Signed-off-by: default avatarMax Filippov <jcmvbkbc@gmail.com>
    • Max Filippov's avatar
      xtensa: minimize use of PLATFORM_DEFAULT_MEM_{ADDR,SIZE} · 3de00482
      Max Filippov authored
      Now that the kernel load address and KSEG physical base address have
      their own Kconfig symbols PLATFORM_DEFAULT_MEM seems redundant. It makes
      little sense to use it in MMU configurations instead of KSEG_PADDR.
      In noMMU configurations there's no explicit KSEG, so it's still useful
      for the early cache initialization and definition of ARCH_PFN_OFFSET,
      which affects mem_map size.
      - limit it to noMMU; MMU variants have XCHAL_KSEG_PADDR and
      - don't use it to define TASK_SIZE or MAX_LOW_PFN: first doesn't make
        any difference in noMMU, second is meaningless as there's no high
      - don't add default physical memory region: memory layout should come
        from the DT, bootloader tags, or memmap= command line parameter.
      Signed-off-by: default avatarMax Filippov <jcmvbkbc@gmail.com>
  23. 23 Jun, 2016 1 commit
  24. 03 Nov, 2015 1 commit
    • Max Filippov's avatar
      xtensa: fix secondary core boot in SMP · ab45fb14
      Max Filippov authored
      There are multiple factors adding to the issue in different
      - commit 17290231
       ("xtensa: add fixup for double exception raised
        in window overflow") added function window_overflow_restore_a0_fixup to
        double exception vector overlapping reset vector location of secondary
        processor cores.
      - on MMUv2 cores RESET_VECTOR1_VADDR may point to uncached kernel memory
        making code overlapping depend on cache type and size, so that without
        cache or with WT cache reset vector code overwrites double exception
        code, making issue even harder to detect.
      - on MMUv3 cores RESET_VECTOR1_VADDR may point to unmapped area, as
        MMUv3 cores change virtual address map to match MMUv2 layout, but
        reset vector virtual address is given for the original MMUv3 mapping.
      - physical memory region of the secondary reset vector is not reserved
        in the physical memory map, and thus may be allocated and overwritten
        at arbitrary moment.
      Fix it as follows:
      - move window_overflow_restore_a0_fixup code to .text section.
      - define RESET_VECTOR1_VADDR so that it points to reset vector in the
        cacheable MMUv2 map for cores with MMU.
      - reserve reset vector region in the physical memory map. Drop separate
        literal section and build mxhead.S with text section literals.
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarMax Filippov <jcmvbkbc@gmail.com>
  25. 02 Nov, 2015 1 commit
    • Max Filippov's avatar
      xtensa: nommu: provide correct KIO addresses · 260c64bb
      Max Filippov authored
      KIO region location is different for noMMU cores. Provide different
      default physical address and make KIO virtual address equal to physical.
      Move xtensa_get_kio_paddr function close to XCHAL_KIO_PADDR definition
      and define it not only for MMUv3, but for all MMU options except MMUv2.
      Signed-off-by: default avatarMax Filippov <jcmvbkbc@gmail.com>
  26. 14 Feb, 2015 1 commit
  27. 30 Apr, 2014 2 commits
  28. 01 Apr, 2014 3 commits