Linux-RISC-V Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Kefeng Wang <wangkefeng.wang@huawei.com>
To: Paul Walmsley <paul.walmsley@sifive.com>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Albert Ou <aou@eecs.berkeley.edu>,
	<linux-riscv@lists.infradead.org>, <linux-kernel@vger.kernel.org>
Cc: Hulk Robot <hulkci@huawei.com>, Kefeng Wang <wangkefeng.wang@huawei.com>
Subject: [PATCH 10/10] riscv: mmiowb: Fix implicit declaration of function 'smp_processor_id'
Date: Mon, 11 May 2020 10:20:01 +0800	[thread overview]
Message-ID: <20200511022001.179767-11-wangkefeng.wang@huawei.com> (raw)
In-Reply-To: <20200511022001.179767-1-wangkefeng.wang@huawei.com>

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: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
 arch/riscv/include/asm/mmiowb.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/riscv/include/asm/mmiowb.h b/arch/riscv/include/asm/mmiowb.h
index bb4091ff4a21..0b2333e71fdc 100644
--- a/arch/riscv/include/asm/mmiowb.h
+++ b/arch/riscv/include/asm/mmiowb.h
@@ -9,6 +9,7 @@
  */
 #define mmiowb()	__asm__ __volatile__ ("fence o,w" : : : "memory");
 
+#include <linux/smp.h>
 #include <asm-generic/mmiowb.h>
 
 #endif	/* _ASM_RISCV_MMIOWB_H */
-- 
2.26.2



  parent reply	other threads:[~2020-05-11  2:23 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-11  2:19 [PATCH 00/10] riscv: make riscv build happier Kefeng Wang
2020-05-11  2:19 ` [PATCH 01/10] riscv: Fix unmet direct dependencies built based on SOC_VIRT Kefeng Wang
2020-05-13 21:14   ` Palmer Dabbelt
2020-05-11  2:19 ` [PATCH 02/10] riscv: stacktrace: Fix undefined reference to `walk_stackframe' Kefeng Wang
2020-05-11  2:19 ` [PATCH 03/10] riscv: Add pgprot_writecombine/device and PAGE_SHARED defination if NOMMU Kefeng Wang
2020-05-11  2:19 ` [PATCH 04/10] riscv: Fix print_vm_layout build error " Kefeng Wang
2020-05-14 10:10   ` Alex Ghiti
2020-05-14 11:42     ` Kefeng Wang
2020-05-14 11:53   ` [PATCH v2] " Kefeng Wang
2020-05-20 22:49     ` Palmer Dabbelt
2020-05-11  2:19 ` [PATCH 05/10] riscv: Disable ARCH_HAS_DEBUG_WX " Kefeng Wang
2020-05-13 21:14   ` Palmer Dabbelt
2020-05-14  8:26     ` Kefeng Wang
2020-05-11  2:19 ` [PATCH 06/10] riscv: Disable ARCH_HAS_DEBUG_VIRTUAL " Kefeng Wang
2020-05-11  2:19 ` [PATCH 07/10] riscv: Make SYS_SUPPORTS_HUGETLBFS depends on MMU Kefeng Wang
2020-05-13 21:14   ` Palmer Dabbelt
2020-05-11  2:19 ` [PATCH 08/10] riscv: pgtable: Fix __kernel_map_pages build error if NOMMU Kefeng Wang
2020-05-11  2:20 ` [PATCH 09/10] timer-riscv: Fix undefined riscv_time_val Kefeng Wang
2020-05-13 21:14   ` Palmer Dabbelt
2020-05-18 14:09     ` Daniel Lezcano
2020-05-18 15:40       ` Kefeng Wang
2020-05-18 20:23         ` Daniel Lezcano
2020-05-19 12:39           ` Kefeng Wang
2020-05-19 13:51             ` Daniel Lezcano
2020-05-20  1:14               ` Anup Patel
2020-05-20  2:57                 ` Kefeng Wang
2020-05-11  2:20 ` Kefeng Wang [this message]
2020-05-13 21:14 ` [PATCH 00/10] riscv: make riscv build happier Palmer Dabbelt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200511022001.179767-11-wangkefeng.wang@huawei.com \
    --to=wangkefeng.wang@huawei.com \
    --cc=aou@eecs.berkeley.edu \
    --cc=hulkci@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=palmer@dabbelt.com \
    --cc=paul.walmsley@sifive.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox