• Kefeng Wang's avatar
    riscv: mmiowb: Fix implicit declaration of function 'smp_processor_id' · ed1ed4c0
    Kefeng Wang authored
    In file included from ./../include/linux/compiler_types.h:68,
                     from <command-line>:
    ../include/asm-generic/mmiowb.h: In function ‘mmiowb_set_pending’:
    ../include/asm-generic/percpu.h:34:38: error: implicit declaration of function ‘smp_processor_id’; did you mean ‘raw_smp_processor_id’? [-Werror=implicit-function-declaration]
     #define my_cpu_offset per_cpu_offset(smp_processor_id())
                                          ^~~~~~~~~~~~~~~~
    ../include/linux/compiler-gcc.h:58:26: note: in definition of macro ‘RELOC_HIDE’
      (typeof(ptr)) (__ptr + (off));     \
                              ^~~
    ../include/linux/percpu-defs.h:249:2: note: in expansion of macro ‘SHIFT_PERCPU_PTR’
      SHIFT_PERCPU_PTR(ptr, my_cpu_offset);    \
      ^~~~~~~~~~~~~~~~
    ../include/asm-generic/percpu.h:34:23: note: in expansion of macro ‘per_cpu_offset’
     #define my_cpu_offset per_cpu_offset(smp_processor_id())
                           ^~~~~~~~~~~~~~
    ../include/linux/percpu-defs.h:249:24: note: in expansion of macro ‘my_cpu_offset’
      SHIFT_PERCPU_PTR(ptr, my_cpu_offset);    \
                            ^~~~~~~~~~~~~
    ../include/asm-generic/mmiowb.h:30:26: note: in expansion of macro ‘this_cpu_ptr’
     #define __mmiowb_state() this_cpu_ptr(&__mmiowb_state)
                              ^~~~~~~~~~~~
    ../include/asm-generic/mmiowb.h:37:28: note: in expansion of macro ‘__mmiowb_state’
      struct mmiowb_state *ms = __mmiowb_state();
                                ^~~~~~~~~~~~~~
    Reported-by: default avatarHulk Robot <hulkci@huawei.com>
    Signed-off-by: default avatarKefeng Wang <wangkefeng.wang@huawei.com>
    Signed-off-by: default avatarPalmer Dabbelt <palmerdabbelt@google.com>
    ed1ed4c0
mmiowb.h 398 Bytes