Re: parisc build failures in mainline kernel

From: Guenter Roeck
Date: Thu Nov 04 2021 - 00:30:20 EST


On 11/3/21 9:18 PM, Linus Torvalds wrote:
On Wed, Nov 3, 2021 at 8:15 PM Guenter Roeck <linux@xxxxxxxxxxxx> wrote:

the mainline kernel fails to build almost all 'parisc' images.

All with CONFIG_SMP?

I think so. tinyconfig (SMP=n) builds fine.

Does this silly patch fix it?


Unfortunately not. With that patch it complains about task_struct.

In file included from arch/parisc/kernel/asm-offsets.c:24:
arch/parisc/kernel/asm-offsets.c: In function 'main':
././include/linux/compiler_types.h:140:41: error: 'struct task_struct' has no member named 'cpu'
140 | #define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
| ^~~~~~~~~~~~~~~~~~
./include/linux/kbuild.h:6:69: note: in definition of macro 'DEFINE'
6 | asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val))
| ^~~
./include/linux/stddef.h:17:33: note: in expansion of macro '__compiler_offsetof'
17 | #define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER)
| ^~~~~~~~~~~~~~~~~~~
arch/parisc/kernel/asm-offsets.c:43:26: note: in expansion of macro 'offsetof'
43 | DEFINE(TASK_CPU, offsetof(struct task_struct, cpu));
| ^~~~~~~~
make[1]: *** [scripts/Makefile.build:121: arch/parisc/kernel/asm-offsets.s] Error 1
make: *** [Makefile:1223: prepare0] Error 2

Guenter