1. 17 9月, 2022 1 次提交
  2. 12 8月, 2022 1 次提交
  3. 29 7月, 2022 1 次提交
  4. 18 7月, 2022 2 次提交
    • A
      mm/mmap: drop ARCH_HAS_VM_GET_PAGE_PROT · 3d923c5f
      Anshuman Khandual 提交于
      Now all the platforms enable ARCH_HAS_GET_PAGE_PROT.  They define and
      export own vm_get_page_prot() whether custom or standard
      DECLARE_VM_GET_PAGE_PROT.  Hence there is no need for default generic
      fallback for vm_get_page_prot().  Just drop this fallback and also
      ARCH_HAS_GET_PAGE_PROT mechanism.
      
      Link: https://lkml.kernel.org/r/20220711070600.2378316-27-anshuman.khandual@arm.comSigned-off-by: NAnshuman Khandual <anshuman.khandual@arm.com>
      Reviewed-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      Reviewed-by: NChristophe Leroy <christophe.leroy@csgroup.eu>
      Acked-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Brian Cain <bcain@quicinc.com>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Chris Zankel <chris@zankel.net>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Dinh Nguyen <dinguyen@kernel.org>
      Cc: Guo Ren <guoren@kernel.org>
      Cc: Heiko Carstens <hca@linux.ibm.com>
      Cc: Huacai Chen <chenhuacai@kernel.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
      Cc: Jeff Dike <jdike@addtoit.com>
      Cc: Jonas Bonn <jonas@southpole.se>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Michal Simek <monstr@monstr.eu>
      Cc: Nicholas Piggin <npiggin@gmail.com>
      Cc: Palmer Dabbelt <palmer@dabbelt.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Paul Walmsley <paul.walmsley@sifive.com>
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: Rich Felker <dalias@libc.org>
      Cc: Russell King <linux@armlinux.org.uk>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Cc: Stafford Horne <shorne@gmail.com>
      Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Vasily Gorbik <gor@linux.ibm.com>
      Cc: Vineet Gupta <vgupta@kernel.org>
      Cc: WANG Xuerui <kernel@xen0n.name>
      Cc: Will Deacon <will@kernel.org>
      Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      3d923c5f
    • A
      riscv/mm: enable ARCH_HAS_VM_GET_PAGE_PROT · 4147b5e2
      Anshuman Khandual 提交于
      This enables ARCH_HAS_VM_GET_PAGE_PROT on the platform and exports
      standard vm_get_page_prot() implementation via DECLARE_VM_GET_PAGE_PROT,
      which looks up a private and static protection_map[] array.  Subsequently
      all __SXXX and __PXXX macros can be dropped which are no longer needed.
      
      Link: https://lkml.kernel.org/r/20220711070600.2378316-17-anshuman.khandual@arm.comSigned-off-by: NAnshuman Khandual <anshuman.khandual@arm.com>
      Cc: Paul Walmsley <paul.walmsley@sifive.com>
      Cc: Palmer Dabbelt <palmer@dabbelt.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Brian Cain <bcain@quicinc.com>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Chris Zankel <chris@zankel.net>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Dinh Nguyen <dinguyen@kernel.org>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Guo Ren <guoren@kernel.org>
      Cc: Heiko Carstens <hca@linux.ibm.com>
      Cc: Huacai Chen <chenhuacai@kernel.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
      Cc: Jeff Dike <jdike@addtoit.com>
      Cc: Jonas Bonn <jonas@southpole.se>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Michal Simek <monstr@monstr.eu>
      Cc: Nicholas Piggin <npiggin@gmail.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: Rich Felker <dalias@libc.org>
      Cc: Russell King <linux@armlinux.org.uk>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Cc: Stafford Horne <shorne@gmail.com>
      Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Vasily Gorbik <gor@linux.ibm.com>
      Cc: Vineet Gupta <vgupta@kernel.org>
      Cc: WANG Xuerui <kernel@xen0n.name>
      Cc: Will Deacon <will@kernel.org>
      Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      4147b5e2
  5. 15 7月, 2022 1 次提交
  6. 04 7月, 2022 1 次提交
  7. 01 7月, 2022 1 次提交
  8. 30 6月, 2022 1 次提交
    • F
      context_tracking: Split user tracking Kconfig · 24a9c541
      Frederic Weisbecker 提交于
      Context tracking is going to be used not only to track user transitions
      but also idle/IRQs/NMIs. The user tracking part will then become a
      separate feature. Prepare Kconfig for that.
      
      [ frederic: Apply Max Filippov feedback. ]
      Signed-off-by: NFrederic Weisbecker <frederic@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Neeraj Upadhyay <quic_neeraju@quicinc.com>
      Cc: Uladzislau Rezki <uladzislau.rezki@sony.com>
      Cc: Joel Fernandes <joel@joelfernandes.org>
      Cc: Boqun Feng <boqun.feng@gmail.com>
      Cc: Nicolas Saenz Julienne <nsaenz@kernel.org>
      Cc: Marcelo Tosatti <mtosatti@redhat.com>
      Cc: Xiongfeng Wang <wangxiongfeng2@huawei.com>
      Cc: Yu Liao <liaoyu15@huawei.com>
      Cc: Phil Auld <pauld@redhat.com>
      Cc: Paul Gortmaker<paul.gortmaker@windriver.com>
      Cc: Alex Belits <abelits@marvell.com>
      Signed-off-by: NPaul E. McKenney <paulmck@kernel.org>
      Reviewed-by: NNicolas Saenz Julienne <nsaenzju@redhat.com>
      Tested-by: NNicolas Saenz Julienne <nsaenzju@redhat.com>
      24a9c541
  9. 17 6月, 2022 1 次提交
  10. 02 6月, 2022 1 次提交
  11. 20 5月, 2022 2 次提交
  12. 18 5月, 2022 1 次提交
  13. 13 5月, 2022 1 次提交
  14. 12 5月, 2022 4 次提交
  15. 08 5月, 2022 1 次提交
  16. 31 3月, 2022 1 次提交
  17. 23 3月, 2022 2 次提交
  18. 22 3月, 2022 1 次提交
  19. 11 3月, 2022 1 次提交
  20. 15 2月, 2022 1 次提交
  21. 21 1月, 2022 2 次提交
  22. 20 1月, 2022 5 次提交
    • K
      mm: percpu: generalize percpu related config · 7ecd19cf
      Kefeng Wang 提交于
      Patch series "mm: percpu: Cleanup percpu first chunk function".
      
      When supporting page mapping percpu first chunk allocator on arm64, we
      found there are lots of duplicated codes in percpu embed/page first chunk
      allocator.  This patchset is aimed to cleanup them and should no function
      change.
      
      The currently supported status about 'embed' and 'page' in Archs shows
      below,
      
      	embed: NEED_PER_CPU_PAGE_FIRST_CHUNK
      	page:  NEED_PER_CPU_EMBED_FIRST_CHUNK
      
      		embed	page
      	------------------------
      	arm64	  Y	 Y
      	mips	  Y	 N
      	powerpc	  Y	 Y
      	riscv	  Y	 N
      	sparc	  Y	 Y
      	x86	  Y	 Y
      	------------------------
      
      There are two interfaces about percpu first chunk allocator,
      
       extern int __init pcpu_embed_first_chunk(size_t reserved_size, size_t dyn_size,
                                      size_t atom_size,
                                      pcpu_fc_cpu_distance_fn_t cpu_distance_fn,
      -                               pcpu_fc_alloc_fn_t alloc_fn,
      -                               pcpu_fc_free_fn_t free_fn);
      +                               pcpu_fc_cpu_to_node_fn_t cpu_to_nd_fn);
      
       extern int __init pcpu_page_first_chunk(size_t reserved_size,
      -                               pcpu_fc_alloc_fn_t alloc_fn,
      -                               pcpu_fc_free_fn_t free_fn,
      -                               pcpu_fc_populate_pte_fn_t populate_pte_fn);
      +                               pcpu_fc_cpu_to_node_fn_t cpu_to_nd_fn);
      
      The pcpu_fc_alloc_fn_t/pcpu_fc_free_fn_t is killed, we provide generic
      pcpu_fc_alloc() and pcpu_fc_free() function, which are called in the
      pcpu_embed/page_first_chunk().
      
      1) For pcpu_embed_first_chunk(), pcpu_fc_cpu_to_node_fn_t is needed to be
         provided when archs supported NUMA.
      
      2) For pcpu_page_first_chunk(), the pcpu_fc_populate_pte_fn_t is killed too,
         a generic pcpu_populate_pte() which marked '__weak' is provided, if you
         need a different function to populate pte on the arch(like x86), please
         provide its own implementation.
      
      [1] https://github.com/kevin78/linux.git percpu-cleanup
      
      This patch (of 4):
      
      The HAVE_SETUP_PER_CPU_AREA/NEED_PER_CPU_EMBED_FIRST_CHUNK/
      NEED_PER_CPU_PAGE_FIRST_CHUNK/USE_PERCPU_NUMA_NODE_ID configs, which have
      duplicate definitions on platforms that subscribe it.
      
      Move them into mm, drop these redundant definitions and instead just
      select it on applicable platforms.
      
      Link: https://lkml.kernel.org/r/20211216112359.103822-1-wangkefeng.wang@huawei.com
      Link: https://lkml.kernel.org/r/20211216112359.103822-2-wangkefeng.wang@huawei.comSigned-off-by: NKefeng Wang <wangkefeng.wang@huawei.com>
      Acked-by: Catalin Marinas <catalin.marinas@arm.com>	[arm64]
      Cc: Will Deacon <will@kernel.org>
      Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Paul Walmsley <paul.walmsley@sifive.com>
      Cc: Palmer Dabbelt <palmer@dabbelt.com>
      Cc: Albert Ou <aou@eecs.berkeley.edu>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Dave Hansen <dave.hansen@linux.intel.com>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Christoph Lameter <cl@linux.com>
      Cc: Dennis Zhou <dennis@kernel.org>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: "Rafael J. Wysocki" <rafael@kernel.org>
      Cc: Tejun Heo <tj@kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      7ecd19cf
    • A
      riscv: Implement sv48 support · e8a62cc2
      Alexandre Ghiti 提交于
      By adding a new 4th level of page table, give the possibility to 64bit
      kernel to address 2^48 bytes of virtual address: in practice, that offers
      128TB of virtual address space to userspace and allows up to 64TB of
      physical memory.
      
      If the underlying hardware does not support sv48, we will automatically
      fallback to a standard 3-level page table by folding the new PUD level into
      PGDIR level. In order to detect HW capabilities at runtime, we
      use SATP feature that ignores writes with an unsupported mode.
      Signed-off-by: NAlexandre Ghiti <alexandre.ghiti@canonical.com>
      Signed-off-by: NPalmer Dabbelt <palmer@rivosinc.com>
      e8a62cc2
    • A
      riscv: Allow to dynamically define VA_BITS · 3270bfdb
      Alexandre Ghiti 提交于
      With 4-level page table folding at runtime, we don't know at compile time
      the size of the virtual address space so we must set VA_BITS dynamically
      so that sparsemem reserves the right amount of memory for struct pages.
      Signed-off-by: NAlexandre Ghiti <alexandre.ghiti@canonical.com>
      Signed-off-by: NPalmer Dabbelt <palmer@rivosinc.com>
      3270bfdb
    • A
      riscv: Move KASAN mapping next to the kernel mapping · f7ae0233
      Alexandre Ghiti 提交于
      Now that KASAN_SHADOW_OFFSET is defined at compile time as a config,
      this value must remain constant whatever the size of the virtual address
      space, which is only possible by pushing this region at the end of the
      address space next to the kernel mapping.
      Signed-off-by: NAlexandre Ghiti <alexandre.ghiti@canonical.com>
      Signed-off-by: NPalmer Dabbelt <palmer@rivosinc.com>
      f7ae0233
    • A
      riscv: Get rid of MAXPHYSMEM configs · db1503d3
      Alexandre Ghiti 提交于
      CONFIG_MAXPHYSMEM_* are actually never used, even the nommu defconfigs
      selecting the MAXPHYSMEM_2GB had no effects on PAGE_OFFSET since it was
      preempted by !MMU case right before.
      
      In addition, the move of the kernel mapping at the end of the address
      space broke the use of MAXPHYSMEM_2G with MMU since it defines PAGE_OFFSET
      at the same address as the kernel mapping.
      Reported-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      Fixes: 2bfc6cd8 ("riscv: Move kernel mapping outside of linear mapping")
      Signed-off-by: NAlexandre Ghiti <alexandre.ghiti@canonical.com>
      Tested-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      Tested-by: NConor Dooley <Conor.Dooley@microchip.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: NPalmer Dabbelt <palmer@rivosinc.com>
      db1503d3
  23. 08 1月, 2022 1 次提交
  24. 06 1月, 2022 2 次提交
  25. 25 11月, 2021 1 次提交
  26. 29 10月, 2021 1 次提交
  27. 26 10月, 2021 2 次提交
    • M
      irq: remove handle_domain_{irq,nmi}() · 0953fb26
      Mark Rutland 提交于
      Now that entry code handles IRQ entry (including setting the IRQ regs)
      before calling irqchip code, irqchip code can safely call
      generic_handle_domain_irq(), and there's no functional reason for it to
      call handle_domain_irq().
      
      Let's cement this split of responsibility and remove handle_domain_irq()
      entirely, updating irqchip drivers to call generic_handle_domain_irq().
      
      For consistency, handle_domain_nmi() is similarly removed and replaced
      with a generic_handle_domain_nmi() function which also does not perform
      any entry logic.
      
      Previously handle_domain_{irq,nmi}() had a WARN_ON() which would fire
      when they were called in an inappropriate context. So that we can
      identify similar issues going forward, similar WARN_ON_ONCE() logic is
      added to the generic_handle_*() functions, and comments are updated for
      clarity and consistency.
      Signed-off-by: NMark Rutland <mark.rutland@arm.com>
      Reviewed-by: NMarc Zyngier <maz@kernel.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      0953fb26
    • M
      irq: riscv: perform irqentry in entry code · 7ecbc648
      Mark Rutland 提交于
      In preparation for removing HANDLE_DOMAIN_IRQ_IRQENTRY, have arch/riscv
      perform all the irqentry accounting in its entry code. As arch/riscv
      uses GENERIC_IRQ_MULTI_HANDLER, we can use generic_handle_arch_irq() to
      do so.
      
      Since generic_handle_arch_irq() handles the irq entry and setting the
      irq regs, and happens before the irqchip code calls handle_IPI(), we can
      remove the redundant irq entry and irq regs manipulation from
      handle_IPI().
      
      There should be no functional change as a result of this patch.
      Signed-off-by: NMark Rutland <mark.rutland@arm.com>
      Reviewed-by: NGuo Ren <guoren@kernel.org>
      Reviewed-by: NMarc Zyngier <maz@kernel.org>
      Cc: Albert Ou <aou@eecs.berkeley.edu>
      Cc: Palmer Dabbelt <palmer@dabbelt.com>
      Cc: Paul Walmsley <paul.walmsley@sifive.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      7ecbc648