linux-next: build failure after merge of the block tree

From: Stephen Rothwell
Date: Mon Feb 03 2020 - 19:26:10 EST


Hi all,

After merging the block tree, today's linux-next build (powerpc
ppc64_defconfig) failed like this:

In file included from include/linux/eventfd.h:15,
from drivers/vhost/vhost.c:13:
include/linux/percpu-defs.h:50:34: error: 'PER_CPU_BASE_SECTION' undeclared here (not in a function); did you mean 'PER_CPU_FIRST_SECTION'?
50 | __percpu __attribute__((section(PER_CPU_BASE_SECTION sec))) \
| ^~~~~~~~~~~~~~~~~~~~
include/linux/percpu-defs.h:101:9: note: in expansion of macro '__PCPU_ATTRS'
101 | extern __PCPU_ATTRS(sec) __typeof__(type) name
| ^~~~~~~~~~~~
include/linux/percpu-defs.h:112:2: note: in expansion of macro 'DECLARE_PER_CPU_SECTION'
112 | DECLARE_PER_CPU_SECTION(type, name, "")
| ^~~~~~~~~~~~~~~~~~~~~~~
include/linux/eventfd.h:44:1: note: in expansion of macro 'DECLARE_PER_CPU'
44 | DECLARE_PER_CPU(int, eventfd_wake_count);
| ^~~~~~~~~~~~~~~
include/linux/percpu-defs.h:112:38: error: expected ')' before string constant
112 | DECLARE_PER_CPU_SECTION(type, name, "")
| ^~
include/linux/percpu-defs.h:50:55: note: in definition of macro '__PCPU_ATTRS'
50 | __percpu __attribute__((section(PER_CPU_BASE_SECTION sec))) \
| ^~~
include/linux/percpu-defs.h:112:2: note: in expansion of macro 'DECLARE_PER_CPU_SECTION'
112 | DECLARE_PER_CPU_SECTION(type, name, "")
| ^~~~~~~~~~~~~~~~~~~~~~~
include/linux/eventfd.h:44:1: note: in expansion of macro 'DECLARE_PER_CPU'
44 | DECLARE_PER_CPU(int, eventfd_wake_count);
| ^~~~~~~~~~~~~~~
include/linux/percpu-defs.h:50:59: error: expected identifier or '(' before ')' token
50 | __percpu __attribute__((section(PER_CPU_BASE_SECTION sec))) \
| ^
include/linux/percpu-defs.h:101:9: note: in expansion of macro '__PCPU_ATTRS'
101 | extern __PCPU_ATTRS(sec) __typeof__(type) name
| ^~~~~~~~~~~~
include/linux/percpu-defs.h:112:2: note: in expansion of macro 'DECLARE_PER_CPU_SECTION'
112 | DECLARE_PER_CPU_SECTION(type, name, "")
| ^~~~~~~~~~~~~~~~~~~~~~~
include/linux/eventfd.h:44:1: note: in expansion of macro 'DECLARE_PER_CPU'
44 | DECLARE_PER_CPU(int, eventfd_wake_count);
| ^~~~~~~~~~~~~~~
include/linux/eventfd.h: In function 'eventfd_signal_count':
include/linux/eventfd.h:48:23: error: 'eventfd_wake_count' undeclared (first use in this function); did you mean 'eventfd_signal_count'?
48 | return this_cpu_read(eventfd_wake_count);
| ^~~~~~~~~~~~~~~~~~
include/linux/percpu-defs.h:319:9: note: in definition of macro '__pcpu_size_call_return'
319 | typeof(variable) pscr_ret__; \
| ^~~~~~~~
include/linux/eventfd.h:48:9: note: in expansion of macro 'this_cpu_read'
48 | return this_cpu_read(eventfd_wake_count);
| ^~~~~~~~~~~~~
include/linux/eventfd.h:48:23: note: each undeclared identifier is reported only once for each function it appears in
48 | return this_cpu_read(eventfd_wake_count);
| ^~~~~~~~~~~~~~~~~~
include/linux/percpu-defs.h:319:9: note: in definition of macro '__pcpu_size_call_return'
319 | typeof(variable) pscr_ret__; \
| ^~~~~~~~
include/linux/eventfd.h:48:9: note: in expansion of macro 'this_cpu_read'
48 | return this_cpu_read(eventfd_wake_count);
| ^~~~~~~~~~~~~
include/linux/percpu-defs.h:508:53: error: implicit declaration of function 'this_cpu_read_1'; did you mean 'this_cpu_read'? [-Werror=implicit-function-declaration]
508 | #define this_cpu_read(pcp) __pcpu_size_call_return(this_cpu_read_, pcp)
| ^~~~~~~~~~~~~~
include/linux/percpu-defs.h:322:23: note: in definition of macro '__pcpu_size_call_return'
322 | case 1: pscr_ret__ = stem##1(variable); break; \
| ^~~~
include/linux/eventfd.h:48:9: note: in expansion of macro 'this_cpu_read'
48 | return this_cpu_read(eventfd_wake_count);
| ^~~~~~~~~~~~~
include/linux/percpu-defs.h:508:53: error: implicit declaration of function 'this_cpu_read_2'; did you mean 'this_cpu_read'? [-Werror=implicit-function-declaration]
508 | #define this_cpu_read(pcp) __pcpu_size_call_return(this_cpu_read_, pcp)
| ^~~~~~~~~~~~~~
include/linux/percpu-defs.h:323:23: note: in definition of macro '__pcpu_size_call_return'
323 | case 2: pscr_ret__ = stem##2(variable); break; \
| ^~~~
include/linux/eventfd.h:48:9: note: in expansion of macro 'this_cpu_read'
48 | return this_cpu_read(eventfd_wake_count);
| ^~~~~~~~~~~~~
include/linux/percpu-defs.h:508:53: error: implicit declaration of function 'this_cpu_read_4'; did you mean 'this_cpu_read'? [-Werror=implicit-function-declaration]
508 | #define this_cpu_read(pcp) __pcpu_size_call_return(this_cpu_read_, pcp)
| ^~~~~~~~~~~~~~
include/linux/percpu-defs.h:324:23: note: in definition of macro '__pcpu_size_call_return'
324 | case 4: pscr_ret__ = stem##4(variable); break; \
| ^~~~
include/linux/eventfd.h:48:9: note: in expansion of macro 'this_cpu_read'
48 | return this_cpu_read(eventfd_wake_count);
| ^~~~~~~~~~~~~
include/linux/percpu-defs.h:508:53: error: implicit declaration of function 'this_cpu_read_8'; did you mean 'this_cpu_read'? [-Werror=implicit-function-declaration]
508 | #define this_cpu_read(pcp) __pcpu_size_call_return(this_cpu_read_, pcp)
| ^~~~~~~~~~~~~~
include/linux/percpu-defs.h:325:23: note: in definition of macro '__pcpu_size_call_return'
325 | case 8: pscr_ret__ = stem##8(variable); break; \
| ^~~~
include/linux/eventfd.h:48:9: note: in expansion of macro 'this_cpu_read'
48 | return this_cpu_read(eventfd_wake_count);
| ^~~~~~~~~~~~~

Caused by commit

230665a4f25c ("eventfd: track eventfd_signal() recursion depth")

I have added the following patch for today:

From: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>
Date: Tue, 4 Feb 2020 11:20:12 +1100
Subject: [PATCH] eventfd: include percpu.h instead of percpu-defs.h

Signed-off-by: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>
---
include/linux/eventfd.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/eventfd.h b/include/linux/eventfd.h
index 02e794816c12..224e8334042b 100644
--- a/include/linux/eventfd.h
+++ b/include/linux/eventfd.h
@@ -12,7 +12,7 @@
#include <linux/fcntl.h>
#include <linux/wait.h>
#include <linux/err.h>
-#include <linux/percpu-defs.h>
+#include <linux/percpu.h>

/*
* CAREFUL: Check include/uapi/asm-generic/fcntl.h when defining
--
2.24.1

--
Cheers,
Stephen Rothwell

Attachment: pgpsg00wIHZTF.pgp
Description: OpenPGP digital signature