linux/arch/riscv
Kefeng Wang 80709af732
riscv: cacheinfo: Fix using smp_processor_id() in preemptible
Use raw_smp_processor_id instead of smp_processor_id() to fix warning,

BUG: using smp_processor_id() in preemptible [00000000] code: init/1
caller is debug_smp_processor_id+0x1c/0x26
CPU: 0 PID: 1 Comm: init Not tainted 5.10.0-rc4 #211
Call Trace:
  walk_stackframe+0x0/0xaa
  show_stack+0x32/0x3e
  dump_stack+0x76/0x90
  check_preemption_disabled+0xaa/0xac
  debug_smp_processor_id+0x1c/0x26
  get_cache_size+0x18/0x68
  load_elf_binary+0x868/0xece
  bprm_execve+0x224/0x498
  kernel_execve+0xdc/0x142
  run_init_process+0x90/0x9e
  try_to_run_init_process+0x12/0x3c
  kernel_init+0xb4/0xf8
  ret_from_exception+0x0/0xc

The issue is found when CONFIG_DEBUG_PREEMPT enabled.

Reviewed-by: Atish Patra <atish.patra@wdc.com>
Tested-by: Atish Patra <atish.patra@wdc.com>
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
[Palmer: Added a comment.]
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
2021-01-12 20:25:32 -08:00
..
boot riscv: Ignore Image.* and loader.bin 2020-11-09 11:54:46 -08:00
configs RISC-V: Add EFI stub support. 2020-10-02 14:31:21 -07:00
include riscv: Drop a duplicated PAGE_KERNEL_EXEC 2021-01-09 14:18:31 -08:00
kernel riscv: cacheinfo: Fix using smp_processor_id() in preemptible 2021-01-12 20:25:32 -08:00
lib riscv: provide memmove implementation 2020-12-10 17:27:54 -08:00
mm RISC-V: Fix usage of memblock_enforce_memory_limit 2020-12-21 21:02:14 -08:00
net treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
Kbuild riscv: Allow device trees to be built into the kernel 2020-05-18 11:38:05 -07:00
Kconfig RISC-V Patches for the 5.11 Merge Window, Part 1 2020-12-18 10:43:07 -08:00
Kconfig.debug RISC-V: Remove EARLY_PRINTK support 2018-12-17 10:23:46 -08:00
Kconfig.socs clk: sifive: Use common name for prci configuration 2020-12-16 12:22:59 -08:00
Makefile riscv: Clean up boot dir 2020-11-09 11:54:45 -08:00