Merge tag 'riscv-for-linus-6.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel...
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 8 Nov 2023 17:21:18 +0000 (09:21 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 8 Nov 2023 17:21:18 +0000 (09:21 -0800)
Pull RISC-V updates from Palmer Dabbelt:

 - Support for cbo.zero in userspace

 - Support for CBOs on ACPI-based systems

 - A handful of improvements for the T-Head cache flushing ops

 - Support for software shadow call stacks

 - Various cleanups and fixes

* tag 'riscv-for-linus-6.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: (31 commits)
  RISC-V: hwprobe: Fix vDSO SIGSEGV
  riscv: configs: defconfig: Enable configs required for RZ/Five SoC
  riscv: errata: prefix T-Head mnemonics with th.
  riscv: put interrupt entries into .irqentry.text
  riscv: mm: Update the comment of CONFIG_PAGE_OFFSET
  riscv: Using TOOLCHAIN_HAS_ZIHINTPAUSE marco replace zihintpause
  riscv/mm: Fix the comment for swap pte format
  RISC-V: clarify the QEMU workaround in ISA parser
  riscv: correct pt_level name via pgtable_l5/4_enabled
  RISC-V: Provide pgtable_l5_enabled on rv32
  clocksource: timer-riscv: Increase rating of clock_event_device for Sstc
  clocksource: timer-riscv: Don't enable/disable timer interrupt
  lkdtm: Fix CFI_BACKWARD on RISC-V
  riscv: Use separate IRQ shadow call stacks
  riscv: Implement Shadow Call Stack
  riscv: Move global pointer loading to a macro
  riscv: Deduplicate IRQ stack switching
  riscv: VMAP_STACK overflow detection thread-safe
  RISC-V: cacheflush: Initialize CBO variables on ACPI systems
  RISC-V: ACPI: RHCT: Add function to get CBO block sizes
  ...

14 files changed:
1  2 
Documentation/arch/riscv/hwprobe.rst
arch/riscv/Kconfig
arch/riscv/Makefile
arch/riscv/configs/defconfig
arch/riscv/include/asm/hwcap.h
arch/riscv/include/uapi/asm/hwprobe.h
arch/riscv/kernel/cpufeature.c
arch/riscv/kernel/irq.c
arch/riscv/kernel/setup.c
arch/riscv/kernel/sys_riscv.c
arch/riscv/kernel/traps.c
arch/riscv/kernel/vdso/Makefile
arch/riscv/mm/init.c
drivers/clocksource/timer-riscv.c

Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index 9cc0a76692715ea6ff2ec56630f7b60ed0a37f92,7bfea97ee7e7e0033ddb6dd43e0a138efa873c3f..9ceda02507cae9c73efac8c0589695b38d03e499
@@@ -60,41 -79,23 +79,23 @@@ static void init_irq_stacks(void
  }
  #endif /* CONFIG_VMAP_STACK */
  
 -#ifdef CONFIG_HAVE_SOFTIRQ_ON_OWN_STACK
 +#ifdef CONFIG_SOFTIRQ_ON_OWN_STACK
+ static void ___do_softirq(struct pt_regs *regs)
+ {
+       __do_softirq();
+ }
  void do_softirq_own_stack(void)
  {
- #ifdef CONFIG_IRQ_STACKS
-       if (on_thread_stack()) {
-               ulong *sp = per_cpu(irq_stack_ptr, smp_processor_id())
-                                       + IRQ_STACK_SIZE/sizeof(ulong);
-               __asm__ __volatile(
-               "addi   sp, sp, -"RISCV_SZPTR  "\n"
-               REG_S"  ra, (sp)                \n"
-               "addi   sp, sp, -"RISCV_SZPTR  "\n"
-               REG_S"  s0, (sp)                \n"
-               "addi   s0, sp, 2*"RISCV_SZPTR "\n"
-               "move   sp, %[sp]               \n"
-               "call   __do_softirq            \n"
-               "addi   sp, s0, -2*"RISCV_SZPTR"\n"
-               REG_L"  s0, (sp)                \n"
-               "addi   sp, sp, "RISCV_SZPTR   "\n"
-               REG_L"  ra, (sp)                \n"
-               "addi   sp, sp, "RISCV_SZPTR   "\n"
-               :
-               : [sp] "r" (sp)
-               : "a0", "a1", "a2", "a3", "a4", "a5", "a6", "a7",
-                 "t0", "t1", "t2", "t3", "t4", "t5", "t6",
- #ifndef CONFIG_FRAME_POINTER
-                 "s0",
- #endif
-                 "memory");
-       } else
- #endif
+       if (on_thread_stack())
+               call_on_irq_stack(NULL, ___do_softirq);
+       else
                __do_softirq();
  }
 -#endif /* CONFIG_HAVE_SOFTIRQ_ON_OWN_STACK */
 +#endif /* CONFIG_SOFTIRQ_ON_OWN_STACK */
  
  #else
+ static void init_irq_scs(void) {}
  static void init_irq_stacks(void) {}
  #endif /* CONFIG_IRQ_STACKS */
  
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge