linux-stable/arch/riscv
Guo Ren 409c8fb20c
riscv: ftrace: Remove wasted nops for !RISCV_ISA_C
When CONFIG_RISCV_ISA_C=n, -fpatchable-function-entry=8 would generate
more nops than we expect. Because it treat nop opcode as 0x00000013
instead of 0x0001.

Dump of assembler code for function dw_pcie_free_msi:
   0xffffffff806fce94 <+0>:     sd      ra,-8(sp)
   0xffffffff806fce98 <+4>:     auipc   ra,0xff90f
   0xffffffff806fce9c <+8>:     jalr    -684(ra) # 0xffffffff8000bbec
<ftrace_caller>
   0xffffffff806fcea0 <+12>:    ld      ra,-8(sp)
   0xffffffff806fcea4 <+16>:    nop /* wasted */
   0xffffffff806fcea8 <+20>:    nop /* wasted */
   0xffffffff806fceac <+24>:    nop /* wasted */
   0xffffffff806fceb0 <+28>:    nop /* wasted */
   0xffffffff806fceb4 <+0>:     addi    sp,sp,-48
   0xffffffff806fceb8 <+4>:     sd      s0,32(sp)
   0xffffffff806fcebc <+8>:     sd      s1,24(sp)
   0xffffffff806fcec0 <+12>:    sd      s2,16(sp)
   0xffffffff806fcec4 <+16>:    sd      s3,8(sp)
   0xffffffff806fcec8 <+20>:    sd      ra,40(sp)
   0xffffffff806fcecc <+24>:    addi    s0,sp,48

Signed-off-by: Guo Ren <guoren@linux.alibaba.com>
Signed-off-by: Guo Ren <guoren@kernel.org>
Link: https://lore.kernel.org/r/20230112090603.1295340-3-guoren@kernel.org
Cc: stable@vger.kernel.org
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
2023-02-15 10:58:16 -08:00
..
boot RISC-V Patches for the 6.2 Merge Window, Part 1 2022-12-14 15:23:49 -08:00
configs RISC-V Patches for the 6.2 Merge Window, Part 1 2022-12-14 15:23:49 -08:00
errata drivers/perf: riscv_pmu_sbi: add support for PMU variant on T-Head C9xx cores 2022-10-27 14:35:20 -07:00
include KVM/riscv changes for 6.2 2022-12-21 18:52:15 -08:00
kernel KVM/riscv changes for 6.2 2022-12-21 18:52:15 -08:00
kvm RISC-V: KVM: Add ONE_REG interface for mvendorid, marchid, and mimpid 2022-12-07 09:17:49 +05:30
lib riscv: lib: uaccess: fix CSR_STATUS SR_SUM bit 2022-08-10 14:06:31 -07:00
mm RISC-V Patches for the 6.2 Merge Window, Part 1 2022-12-14 15:23:49 -08:00
net riscv, bpf: Emit fixed-length instructions for BPF_PSEUDO_FUNC 2022-12-06 20:59:27 +01:00
purgatory riscv/purgatory: Omit use of bin2c 2022-08-11 09:32:34 -07:00
Kbuild
Kconfig riscv: ftrace: Fixup panic by disabling preemption 2023-02-15 10:58:09 -08:00
Kconfig.debug
Kconfig.erratas drivers/perf: riscv_pmu_sbi: add support for PMU variant on T-Head C9xx cores 2022-10-27 14:35:20 -07:00
Kconfig.socs RISC-V Patches for the 6.2 Merge Window, Part 1 2022-12-14 15:23:49 -08:00
Makefile riscv: ftrace: Remove wasted nops for !RISCV_ISA_C 2023-02-15 10:58:16 -08:00