1. 28 10月, 2022 2 次提交
  2. 14 10月, 2022 1 次提交
  3. 07 10月, 2022 1 次提交
  4. 05 10月, 2022 1 次提交
  5. 02 10月, 2022 2 次提交
  6. 17 9月, 2022 1 次提交
  7. 16 8月, 2022 1 次提交
    • C
      riscv: topology: fix default topology reporting · fbd92809
      Conor Dooley 提交于
      RISC-V has no sane defaults to fall back on where there is no cpu-map
      in the devicetree.
      Without sane defaults, the package, core and thread IDs are all set to
      -1. This causes user-visible inaccuracies for tools like hwloc/lstopo
      which rely on the sysfs cpu topology files to detect a system's
      topology.
      
      On a PolarFire SoC, which should have 4 harts with a thread each,
      lstopo currently reports:
      
      Machine (793MB total)
        Package L#0
          NUMANode L#0 (P#0 793MB)
          Core L#0
            L1d L#0 (32KB) + L1i L#0 (32KB) + PU L#0 (P#0)
            L1d L#1 (32KB) + L1i L#1 (32KB) + PU L#1 (P#1)
            L1d L#2 (32KB) + L1i L#2 (32KB) + PU L#2 (P#2)
            L1d L#3 (32KB) + L1i L#3 (32KB) + PU L#3 (P#3)
      
      Adding calls to store_cpu_topology() in {boot,smp} hart bringup code
      results in the correct topolgy being reported:
      
      Machine (793MB total)
        Package L#0
          NUMANode L#0 (P#0 793MB)
          L1d L#0 (32KB) + L1i L#0 (32KB) + Core L#0 + PU L#0 (P#0)
          L1d L#1 (32KB) + L1i L#1 (32KB) + Core L#1 + PU L#1 (P#1)
          L1d L#2 (32KB) + L1i L#2 (32KB) + Core L#2 + PU L#2 (P#2)
          L1d L#3 (32KB) + L1i L#3 (32KB) + Core L#3 + PU L#3 (P#3)
      
      CC: stable@vger.kernel.org # 456797da: arm64: topology: move store_cpu_topology() to shared code
      Fixes: 03f11f03 ("RISC-V: Parse cpu topology during boot.")
      Reported-by: NBrice Goglin <Brice.Goglin@inria.fr>
      Link: https://github.com/open-mpi/hwloc/issues/536Reviewed-by: NSudeep Holla <sudeep.holla@arm.com>
      Reviewed-by: NAtish Patra <atishp@rivosinc.com>
      Signed-off-by: NConor Dooley <conor.dooley@microchip.com>
      fbd92809
  8. 12 8月, 2022 1 次提交
  9. 29 7月, 2022 1 次提交
  10. 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
  11. 15 7月, 2022 1 次提交
  12. 04 7月, 2022 1 次提交
  13. 01 7月, 2022 1 次提交
  14. 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
  15. 17 6月, 2022 1 次提交
  16. 02 6月, 2022 1 次提交
  17. 20 5月, 2022 2 次提交
  18. 18 5月, 2022 1 次提交
  19. 13 5月, 2022 1 次提交
  20. 12 5月, 2022 4 次提交
  21. 08 5月, 2022 1 次提交
  22. 31 3月, 2022 1 次提交
  23. 23 3月, 2022 2 次提交
  24. 22 3月, 2022 1 次提交
  25. 11 3月, 2022 1 次提交
  26. 15 2月, 2022 1 次提交
  27. 21 1月, 2022 2 次提交
  28. 20 1月, 2022 4 次提交
    • 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