1. 02 Sep, 2019 1 commit
    • Max Filippov's avatar
      xtensa: virt: move PCI root complex to KIO range · 982792f4
      Max Filippov authored
      
      
      Move PCI configuration space, MMIO and memory to the KIO range to free
      vmalloc area and use static TLB to access them. Move MMIO to the
      beginning of KIO and define PCI_IOBASE as XCHAL_KIO_BYPASS_VADDR to
      match it. Reduce number of supported PCI buses to 0x3f so that ECAM
      window fits into first 64MB of the KIO. Reduce size of the PCI memory
      window to 128MB so that it fits into KIO.
      
      Signed-off-by: default avatarMax Filippov <jcmvbkbc@gmail.com>
      982792f4
  2. 01 Sep, 2019 2 commits
    • Max Filippov's avatar
      xtensa: add support for call0 ABI in userspace · 09f8a6db
      Max Filippov authored
      
      
      Provide a Kconfig choice to select whether only the default ABI, only
      call0 ABI or both are supported. The default for XEA2 is windowed, but
      it may change for XEA3. Call0 only runs userspace with PS.WOE disabled.
      Supporting both windowed and call0 ABIs is tricky, as there's no
      indication in the ELF binaries which ABI they use. So it is done by
      probing: each process is started with PS.WOE disabled, but the handler
      of an illegal instruction exception taken with PS.WOE retries faulting
      instruction after enabling PS.WOE. It must happen before any signal is
      delivered to the process, otherwise it may be delivered incorrectly.
      
      Signed-off-by: default avatarMax Filippov <jcmvbkbc@gmail.com>
      09f8a6db
    • Max Filippov's avatar
      xtensa: clean up PS_WOE_BIT usage · 9e1e41c4
      Max Filippov authored
      
      
      PS_WOE_BIT is mainly used to generate PS.WOE mask in the code. Introduce
      PS_WOE_MASK macro and use it instead.
      
      Signed-off-by: default avatarMax Filippov <jcmvbkbc@gmail.com>
      9e1e41c4
  3. 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>
      f348f5c2
  4. 12 Aug, 2019 1 commit
  5. 25 Jul, 2019 1 commit
  6. 17 Jul, 2019 1 commit
  7. 15 Jul, 2019 1 commit
  8. 08 Jul, 2019 2 commits
    • Max Filippov's avatar
      xtensa: virt: add defconfig and DTS · 775f1f7e
      Max Filippov authored
      
      
      Add defconfig and DTS for a virt board. Defconfig enables PCIe host and
      a number of virtio devices. DTS routes legacy PCI IRQs to the first four
      level-triggered external IRQ lines. CPU core with edge-triggered IRQs
      among the first four may need a custom DTS to work correctly.
      
      Signed-off-by: default avatarMax Filippov <jcmvbkbc@gmail.com>
      775f1f7e
    • Max Filippov's avatar
      xtensa: abstract 'entry' and 'retw' in assembly code · d6d5f19e
      Max Filippov authored
      
      
      Provide abi_entry, abi_entry_default, abi_ret and abi_ret_default macros
      that allocate aligned stack frame in windowed and call0 ABIs.
      Provide XTENSA_SPILL_STACK_RESERVE macro that specifies required stack
      frame size when register spilling is involved.
      Replace all uses of 'entry' and 'retw' with the above macros.
      This makes most of the xtensa assembly code ready for XEA3 and call0 ABI.
      
      Signed-off-by: default avatarMax Filippov <jcmvbkbc@gmail.com>
      d6d5f19e
  9. 05 Jul, 2019 1 commit
  10. 28 Jun, 2019 2 commits
    • Christian Brauner's avatar
      arch: wire-up pidfd_open() · 7615d9e1
      Christian Brauner authored
      
      
      This wires up the pidfd_open() syscall into all arches at once.
      
      Signed-off-by: default avatarChristian Brauner <christian@brauner.io>
      Reviewed-by: default avatarDavid Howells <dhowells@redhat.com>
      Reviewed-by: default avatarOleg Nesterov <oleg@redhat.com>
      Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
      Cc: "Eric W. Biederman" <ebiederm@xmission.com>
      Cc: Kees Cook <keescook@chromium.org>
      Cc: Joel Fernandes (Google) <joel@joelfernandes.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Jann Horn <jannh@google.com>
      Cc: Andy Lutomirsky <luto@kernel.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Aleksa Sarai <cyphar@cyphar.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: linux-api@vger.kernel.org
      Cc: linux-alpha@vger.kernel.org
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: linux-ia64@vger.kernel.org
      Cc: linux-m68k@lists.linux-m68k.org
      Cc: linux-mips@vger.kernel.org
      Cc: linux-parisc@vger.kernel.org
      Cc: linuxppc-dev@lists.ozlabs.org
      Cc: linux-s390@vger.kernel.org
      Cc: linux-sh@vger.kernel.org
      Cc: sparclinux@vger.kernel.org
      Cc: linux-xtensa@linux-xtensa.org
      Cc: linux-arch@vger.kernel.org
      Cc: x86@kernel.org
      7615d9e1
    • Max Filippov's avatar
      xtensa: remove arch/xtensa/include/asm/types.h · 7d5bdc0c
      Max Filippov authored
      
      
      Xtensa does not define CONFIG_64BIT. The generic definition of
      BITS_PER_LONG in include/asm-generic/bitsperlong.h should work.
      With that definition removed from arch/xtensa/include/asm/types.h
      it does nothing but including arch/xtensa/include/uapi/asm/types.h
      Remove the arch/xtensa/include/asm/types.h header.
      
      Signed-off-by: default avatarMax Filippov <jcmvbkbc@gmail.com>
      7d5bdc0c
  11. 25 Jun, 2019 1 commit
  12. 23 Jun, 2019 7 commits
  13. 20 Jun, 2019 1 commit
    • Christian Brauner's avatar
      arch: handle arches who do not yet define clone3 · d68dbb0c
      Christian Brauner authored
      This cleanly handles arches who do not yet define clone3.
      
      clone3() was initially placed under __ARCH_WANT_SYS_CLONE under the
      assumption that this would cleanly handle all architectures. It does
      not.
      Architectures such as nios2 or h8300 simply take the asm-generic syscall
      definitions and generate their syscall table from it. Since they don't
      define __ARCH_WANT_SYS_CLONE the build would fail complaining about
      sys_clone3 missing. The reason this doesn't happen for legacy clone is
      that nios2 and h8300 provide assembly stubs for sys_clone. This seems to
      be done for architectural reasons.
      
      The build failures for nios2 and h8300 were caught int -next luckily.
      The solution is to define __ARCH_WANT_SYS_CLONE3 that architectures can
      add. Additionally, we need a cond_syscall(clone3) for architectures such
      as nios2 or h8300 that generate their syscall table in the way I
      explained above.
      
      Fixes: 8f3220a8
      
       ("arch: wire-up clone3() syscall")
      Signed-off-by: default avatarChristian Brauner <christian@brauner.io>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Kees Cook <keescook@chromium.org>
      Cc: David Howells <dhowells@redhat.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: Adrian Reber <adrian@lisas.de>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Florian Weimer <fweimer@redhat.com>
      Cc: linux-api@vger.kernel.org
      Cc: linux-arch@vger.kernel.org
      Cc: x86@kernel.org
      d68dbb0c
  14. 19 Jun, 2019 1 commit
  15. 17 Jun, 2019 3 commits
  16. 09 Jun, 2019 1 commit
    • Christian Brauner's avatar
      arch: wire-up clone3() syscall · 8f3220a8
      Christian Brauner authored
      
      
      Wire up the clone3() call on all arches that don't require hand-rolled
      assembly.
      
      Some of the arches look like they need special assembly massaging and it is
      probably smarter if the appropriate arch maintainers would do the actual
      wiring. Arches that are wired-up are:
      - x86{_32,64}
      - arm{64}
      - xtensa
      
      Signed-off-by: default avatarChristian Brauner <christian@brauner.io>
      Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
      Cc: Kees Cook <keescook@chromium.org>
      Cc: David Howells <dhowells@redhat.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: Adrian Reber <adrian@lisas.de>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Florian Weimer <fweimer@redhat.com>
      Cc: linux-api@vger.kernel.org
      Cc: linux-arch@vger.kernel.org
      Cc: x86@kernel.org
      8f3220a8
  17. 30 May, 2019 3 commits
  18. 29 May, 2019 1 commit
    • Eric W. Biederman's avatar
      signal: Remove the task parameter from force_sig_fault · 2e1661d2
      Eric W. Biederman authored
      
      
      As synchronous exceptions really only make sense against the current
      task (otherwise how are you synchronous) remove the task parameter
      from from force_sig_fault to make it explicit that is what is going
      on.
      
      The two known exceptions that deliver a synchronous exception to a
      stopped ptraced task have already been changed to
      force_sig_fault_to_task.
      
      The callers have been changed with the following emacs regular expression
      (with obvious variations on the architectures that take more arguments)
      to avoid typos:
      
      force_sig_fault[(]\([^,]+\)[,]\([^,]+\)[,]\([^,]+\)[,]\W+current[)]
      ->
      force_sig_fault(\1,\2,\3)
      
      Signed-off-by: default avatar"Eric W. Biederman" <ebiederm@xmission.com>
      2e1661d2
  19. 27 May, 2019 1 commit
  20. 21 May, 2019 1 commit
  21. 18 May, 2019 2 commits
  22. 16 May, 2019 1 commit
  23. 15 May, 2019 2 commits
    • Stephen Boyd's avatar
      clk: Remove io.h from clk-provider.h · 62e59c4e
      Stephen Boyd authored
      
      
      Now that we've gotten rid of clk_readl() we can remove io.h from the
      clk-provider header and push out the io.h include to any code that isn't
      already including the io.h header but using things like readl/writel,
      etc.
      
      Found with this grep:
      
        git grep -l clk-provider.h | grep '.c$' | xargs git grep -L 'linux/io.h' | \
        	xargs git grep -l \
      	-e '\<__iowrite32_copy\>' --or \
      	-e '\<__ioread32_copy\>' --or \
      	-e '\<__iowrite64_copy\>' --or \
      	-e '\<ioremap_page_range\>' --or \
      	-e '\<ioremap_huge_init\>' --or \
      	-e '\<arch_ioremap_pud_supported\>' --or \
      	-e '\<arch_ioremap_pmd_supported\>' --or \
      	-e '\<devm_ioport_map\>' --or \
      	-e '\<devm_ioport_unmap\>' --or \
      	-e '\<IOMEM_ERR_PTR\>' --or \
      	-e '\<devm_ioremap\>' --or \
      	-e '\<devm_ioremap_nocache\>' --or \
      	-e '\<devm_ioremap_wc\>' --or \
      	-e '\<devm_iounmap\>' --or \
      	-e '\<devm_ioremap_release\>' --or \
      	-e '\<devm_memremap\>' --or \
      	-e '\<devm_memunmap\>' --or \
      	-e '\<__devm_memremap_pages\>' --or \
      	-e '\<pci_remap_cfgspace\>' --or \
      	-e '\<arch_has_dev_port\>' --or \
      	-e '\<arch_phys_wc_add\>' --or \
      	-e '\<arch_phys_wc_del\>' --or \
      	-e '\<memremap\>' --or \
      	-e '\<memunmap\>' --or \
      	-e '\<arch_io_reserve_memtype_wc\>' --or \
      	-e '\<arch_io_free_memtype_wc\>' --or \
      	-e '\<__io_aw\>' --or \
      	-e '\<__io_pbw\>' --or \
      	-e '\<__io_paw\>' --or \
      	-e '\<__io_pbr\>' --or \
      	-e '\<__io_par\>' --or \
      	-e '\<__raw_readb\>' --or \
      	-e '\<__raw_readw\>' --or \
      	-e '\<__raw_readl\>' --or \
      	-e '\<__raw_readq\>' --or \
      	-e '\<__raw_writeb\>' --or \
      	-e '\<__raw_writew\>' --or \
      	-e '\<__raw_writel\>' --or \
      	-e '\<__raw_writeq\>' --or \
      	-e '\<readb\>' --or \
      	-e '\<readw\>' --or \
      	-e '\<readl\>' --or \
      	-e '\<readq\>' --or \
      	-e '\<writeb\>' --or \
      	-e '\<writew\>' --or \
      	-e '\<writel\>' --or \
      	-e '\<writeq\>' --or \
      	-e '\<readb_relaxed\>' --or \
      	-e '\<readw_relaxed\>' --or \
      	-e '\<readl_relaxed\>' --or \
      	-e '\<readq_relaxed\>' --or \
      	-e '\<writeb_relaxed\>' --or \
      	-e '\<writew_relaxed\>' --or \
      	-e '\<writel_relaxed\>' --or \
      	-e '\<writeq_relaxed\>' --or \
      	-e '\<readsb\>' --or \
      	-e '\<readsw\>' --or \
      	-e '\<readsl\>' --or \
      	-e '\<readsq\>' --or \
      	-e '\<writesb\>' --or \
      	-e '\<writesw\>' --or \
      	-e '\<writesl\>' --or \
      	-e '\<writesq\>' --or \
      	-e '\<inb\>' --or \
      	-e '\<inw\>' --or \
      	-e '\<inl\>' --or \
      	-e '\<outb\>' --or \
      	-e '\<outw\>' --or \
      	-e '\<outl\>' --or \
      	-e '\<inb_p\>' --or \
      	-e '\<inw_p\>' --or \
      	-e '\<inl_p\>' --or \
      	-e '\<outb_p\>' --or \
      	-e '\<outw_p\>' --or \
      	-e '\<outl_p\>' --or \
      	-e '\<insb\>' --or \
      	-e '\<insw\>' --or \
      	-e '\<insl\>' --or \
      	-e '\<outsb\>' --or \
      	-e '\<outsw\>' --or \
      	-e '\<outsl\>' --or \
      	-e '\<insb_p\>' --or \
      	-e '\<insw_p\>' --or \
      	-e '\<insl_p\>' --or \
      	-e '\<outsb_p\>' --or \
      	-e '\<outsw_p\>' --or \
      	-e '\<outsl_p\>' --or \
      	-e '\<ioread8\>' --or \
      	-e '\<ioread16\>' --or \
      	-e '\<ioread32\>' --or \
      	-e '\<ioread64\>' --or \
      	-e '\<iowrite8\>' --or \
      	-e '\<iowrite16\>' --or \
      	-e '\<iowrite32\>' --or \
      	-e '\<iowrite64\>' --or \
      	-e '\<ioread16be\>' --or \
      	-e '\<ioread32be\>' --or \
      	-e '\<ioread64be\>' --or \
      	-e '\<iowrite16be\>' --or \
      	-e '\<iowrite32be\>' --or \
      	-e '\<iowrite64be\>' --or \
      	-e '\<ioread8_rep\>' --or \
      	-e '\<ioread16_rep\>' --or \
      	-e '\<ioread32_rep\>' --or \
      	-e '\<ioread64_rep\>' --or \
      	-e '\<iowrite8_rep\>' --or \
      	-e '\<iowrite16_rep\>' --or \
      	-e '\<iowrite32_rep\>' --or \
      	-e '\<iowrite64_rep\>' --or \
      	-e '\<__io_virt\>' --or \
      	-e '\<pci_iounmap\>' --or \
      	-e '\<virt_to_phys\>' --or \
      	-e '\<phys_to_virt\>' --or \
      	-e '\<ioremap_uc\>' --or \
      	-e '\<ioremap\>' --or \
      	-e '\<__ioremap\>' --or \
      	-e '\<iounmap\>' --or \
      	-e '\<ioremap\>' --or \
      	-e '\<ioremap_nocache\>' --or \
      	-e '\<ioremap_uc\>' --or \
      	-e '\<ioremap_wc\>' --or \
      	-e '\<ioremap_wc\>' --or \
      	-e '\<ioremap_wt\>' --or \
      	-e '\<ioport_map\>' --or \
      	-e '\<ioport_unmap\>' --or \
      	-e '\<ioport_map\>' --or \
      	-e '\<ioport_unmap\>' --or \
      	-e '\<xlate_dev_kmem_ptr\>' --or \
      	-e '\<xlate_dev_mem_ptr\>' --or \
      	-e '\<unxlate_dev_mem_ptr\>' --or \
      	-e '\<virt_to_bus\>' --or \
      	-e '\<bus_to_virt\>' --or \
      	-e '\<memset_io\>' --or \
      	-e '\<memcpy_fromio\>' --or \
      	-e '\<memcpy_toio\>'
      
      I also reordered a couple includes when they weren't alphabetical and
      removed clk.h from kona, replacing it with clk-provider.h because
      that driver doesn't use clk consumer APIs.
      
      Acked-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
      Cc: Chen-Yu Tsai <wens@csie.org>
      Acked-by: default avatarMaxime Ripard <maxime.ripard@bootlin.com>
      Acked-by: default avatarTero Kristo <t-kristo@ti.com>
      Acked-by: default avatarSekhar Nori <nsekhar@ti.com>
      Cc: Krzysztof Kozlowski <krzk@kernel.org>
      Acked-by: Mark Brown's avatarMark Brown <broonie@kernel.org>
      Cc: Chris Zankel <chris@zankel.net>
      Acked-by: default avatarMax Filippov <jcmvbkbc@gmail.com>
      Acked-by: default avatarJohn Crispin <john@phrozen.org>
      Acked-by: default avatarHeiko Stuebner <heiko@sntech.de>
      Signed-off-by: default avatarStephen Boyd <sboyd@kernel.org>
      62e59c4e
    • Sinan Kaya's avatar
      xtensa: replace CONFIG_DEBUG_KERNEL with CONFIG_DEBUG_MISC · 900f4928
      Sinan Kaya authored
      CONFIG_DEBUG_KERNEL should not impact code generation.  Use the newly
      defined CONFIG_DEBUG_MISC instead to keep the current code.
      
      Link: http://lkml.kernel.org/r/20190413224438.10802-5-okaya@kernel.org
      
      
      Signed-off-by: default avatarSinan Kaya <okaya@kernel.org>
      Reviewed-by: default avatarJosh Triplett <josh@joshtriplett.org>
      Reviewed-by: default avatarKees Cook <keescook@chromium.org>
      Acked-by: default avatarMax Filippov <jcmvbkbc@gmail.com>
      Cc:  Chris Zankel <chris@zankel.net>
      Cc: Anders Roxell <anders.roxell@linaro.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Christophe Leroy <christophe.leroy@c-s.fr>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Florian Westphal <fw@strlen.de>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: James Hogan <jhogan@kernel.org>
      Cc: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Michal Hocko <mhocko@suse.com>
      Cc: Mike Rapoport <rppt@linux.ibm.com>
      Cc: Pablo Neira Ayuso <pablo@netfilter.org>
      Cc: Paul Burton <paul.burton@mips.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Thomas Bogendoerfer <tbogendoerfer@suse.de>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      900f4928
  24. 14 May, 2019 1 commit
  25. 07 May, 2019 1 commit