An error occurred fetching the project authors.
  1. 15 Feb, 2023 1 commit
    • Andy Chiu's avatar
      riscv: ftrace: Fixup panic by disabling preemption · 85476499
      Andy Chiu authored
      In RISCV, we must use an AUIPC + JALR pair to encode an immediate,
      forming a jump that jumps to an address over 4K. This may cause errors
      if we want to enable kernel preemption and remove dependency from
      patching code with stop_machine(). For example, if a task was switched
      out on auipc. And, if we changed the ftrace function before it was
      switched back, then it would jump to an address that has updated 11:0
      bits mixing with previous XLEN:12 part.
      
      p: patched area performed by dynamic ftrace
      ftrace_prologue:
      p|      REG_S   ra, -SZREG(sp)
      p|      auipc   ra, 0x? ------------> preempted
      					...
      				change ftrace function
      					...
      p|      jalr    -?(ra) <------------- switched back
      p|      REG_L   ra, -SZREG(sp)
      func:
      	xxx
      	ret
      
      Fixes: afc76b8b ("riscv: Using PATCHABLE_FUNCTION_ENTRY instead of MCOUNT")
      Signed-off-by: default avatarAndy Chiu <andy.chiu@sifive.com>
      Signed-off-by: default avatarGuo Ren <guoren@kernel.org>
      Link: https://lore.kernel.org/r/20230112090603.1295340-2-guoren@kernel.org
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarPalmer Dabbelt <palmer@rivosinc.com>
      85476499
  2. 13 Dec, 2022 1 commit
  3. 08 Dec, 2022 2 commits
  4. 02 Dec, 2022 2 commits
  5. 28 Nov, 2022 1 commit
  6. 17 Nov, 2022 1 commit
  7. 29 Oct, 2022 2 commits
  8. 27 Oct, 2022 2 commits
  9. 13 Oct, 2022 1 commit
  10. 07 Oct, 2022 1 commit
  11. 04 Oct, 2022 1 commit
  12. 02 Oct, 2022 2 commits
  13. 17 Sep, 2022 1 commit
  14. 15 Aug, 2022 1 commit
    • Conor Dooley's avatar
      riscv: topology: fix default topology reporting · fbd92809
      Conor Dooley authored
      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: default avatarBrice Goglin <Brice.Goglin@inria.fr>
      Link: https://github.com/open-mpi/hwloc/issues/536Reviewed-by: default avatarSudeep Holla <sudeep.holla@arm.com>
      Reviewed-by: default avatarAtish Patra <atishp@rivosinc.com>
      Signed-off-by: default avatarConor Dooley <conor.dooley@microchip.com>
      fbd92809
  15. 11 Aug, 2022 1 commit
  16. 28 Jul, 2022 1 commit
  17. 18 Jul, 2022 2 commits
    • Anshuman Khandual's avatar
      mm/mmap: drop ARCH_HAS_VM_GET_PAGE_PROT · 3d923c5f
      Anshuman Khandual authored
      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: default avatarAnshuman Khandual <anshuman.khandual@arm.com>
      Reviewed-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      Reviewed-by: default avatarChristophe Leroy <christophe.leroy@csgroup.eu>
      Acked-by: default avatarGeert 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: default avatarAndrew Morton <akpm@linux-foundation.org>
      3d923c5f
    • Anshuman Khandual's avatar
      riscv/mm: enable ARCH_HAS_VM_GET_PAGE_PROT · 4147b5e2
      Anshuman Khandual authored
      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: default avatarAnshuman 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: default avatarAndrew Morton <akpm@linux-foundation.org>
      4147b5e2
  18. 14 Jul, 2022 1 commit
  19. 03 Jul, 2022 1 commit
  20. 30 Jun, 2022 2 commits
  21. 16 Jun, 2022 1 commit
  22. 02 Jun, 2022 1 commit
  23. 19 May, 2022 2 commits
  24. 17 May, 2022 1 commit
  25. 13 May, 2022 1 commit
  26. 12 May, 2022 3 commits
  27. 11 May, 2022 1 commit
  28. 08 May, 2022 1 commit
  29. 30 Mar, 2022 1 commit
  30. 22 Mar, 2022 1 commit