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

From: Stephen Rothwell
Date: Tue Mar 27 2018 - 03:27:11 EST


Hi Arnd,

After merging the y2038 tree, today's linux-next build (sparc defconfig)
failed like this:

In file included from include/linux/compat.h:22:0,
from arch/sparc/kernel/systbls.h:7,
from arch/sparc/kernel/sys_sparc_32.c:30:
arch/sparc/include/asm/compat.h: In function 'arch_compat_alloc_user_space':
arch/sparc/include/asm/compat.h:162:46: error: 'struct thread_info' has no member named 'kregs'
struct pt_regs *regs = current_thread_info()->kregs;
^~
arch/sparc/include/asm/compat.h:165:6: error: implicit declaration of function 'test_thread_64bit_stack'; did you mean 'setup_thread_stack'? [-Werror=implicit-function-declaration]
if (test_thread_64bit_stack(usp))
^~~~~~~~~~~~~~~~~~~~~~~
setup_thread_stack
In file included from include/asm-generic/preempt.h:5:0,
from ./arch/sparc/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:81,
from include/linux/rcupdate.h:40,
from include/linux/rculist.h:11,
from include/linux/sched/signal.h:5,
from arch/sparc/kernel/sys_sparc_32.c:11:
arch/sparc/include/asm/compat.h:168:23: error: 'TIF_32BIT' undeclared (first use in this function); did you mean 'MAP_32BIT'?
if (test_thread_flag(TIF_32BIT))
^
include/linux/thread_info.h:91:45: note: in definition of macro 'test_thread_flag'
test_ti_thread_flag(current_thread_info(), flag)
^~~~
arch/sparc/include/asm/compat.h:168:23: note: each undeclared identifier is reported only once for each function it appears in
if (test_thread_flag(TIF_32BIT))
^
include/linux/thread_info.h:91:45: note: in definition of macro 'test_thread_flag'
test_ti_thread_flag(current_thread_info(), flag)
^~~~
arch/sparc/include/asm/compat.h: In function 'is_compat_task':
arch/sparc/include/asm/compat.h:237:26: error: 'TIF_32BIT' undeclared (first use in this function); did you mean 'MAP_32BIT'?
return test_thread_flag(TIF_32BIT);
^
include/linux/thread_info.h:91:45: note: in definition of macro 'test_thread_flag'
test_ti_thread_flag(current_thread_info(), flag)
^~~~
In file included from include/linux/compat.h:22:0,
from arch/sparc/kernel/systbls.h:7,
from arch/sparc/kernel/sys_sparc_32.c:30:
arch/sparc/include/asm/compat.h: In function 'in_compat_syscall':
arch/sparc/include/asm/compat.h:243:9: error: implicit declaration of function 'pt_regs_trap_type'; did you mean 'resource_type'? [-Werror=implicit-function-declaration]
return pt_regs_trap_type(current_pt_regs()) == 0x110;
^~~~~~~~~~~~~~~~~
resource_type

and lots more :-(

I suspect it is caused by commit

d1a353a4a8cc ("compat: add an asm-generic/compat.h file")

It looks like the sparc asm/compat.h does not expect to be included in
32 bit builds?

I have reverted the entire y2038 tree merge for today.

--
Cheers,
Stephen Rothwell

Attachment: pgpo097laHj_2.pgp
Description: OpenPGP digital signature