Hi Andrew, After merging the akpm tree, today's linux-next build (x86_64 allmodconfig) failed like this: In file included from arch/x86/include/asm/suspend_64.h:10:0, from arch/x86/include/asm/suspend.h:4, from arch/x86/kernel/asm-offsets.c:18: arch/x86/include/asm/i387.h: In function '__thread_clear_has_fpu': arch/x86/include/asm/i387.h:300:2: error: implicit declaration of function 'percpu_write' [-Werror=implicit-function-declaration] arch/x86/include/asm/i387.h: In function 'fpu_lazy_restore': arch/x86/include/asm/i387.h:354:2: error: implicit declaration of function 'percpu_read_stable' [-Werror=implicit-function-declaration] arch/x86/include/asm/i387.h:354:13: warning: comparison between pointer and integer [enabled by default] Caused by commits "percpu: remove percpu_xxx() functions" and "x86: change percpu_read_stable() to this_cpu_read_stable()" from the akpm tree interacting with commit 7e16838d94b5 ("i387: support lazy restore of FPU state") from Linus' tree. I applied the following patch for today. From: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx> Date: Wed, 22 Feb 2012 16:00:44 +1100 Subject: [PATCH] percpu: fixup for added percpu_xxx calls in i387.h Signed-off-by: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx> --- arch/x86/include/asm/i387.h | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/x86/include/asm/i387.h b/arch/x86/include/asm/i387.h index 2479049..df1cadd 100644 --- a/arch/x86/include/asm/i387.h +++ b/arch/x86/include/asm/i387.h @@ -297,14 +297,14 @@ static inline int __thread_has_fpu(struct task_struct *tsk) static inline void __thread_clear_has_fpu(struct task_struct *tsk) { tsk->thread.fpu.has_fpu = 0; - percpu_write(fpu_owner_task, NULL); + __this_cpu_write(fpu_owner_task, NULL); } /* Must be paired with a 'clts' before! */ static inline void __thread_set_has_fpu(struct task_struct *tsk) { tsk->thread.fpu.has_fpu = 1; - percpu_write(fpu_owner_task, tsk); + __this_cpu_write(fpu_owner_task, tsk); } /* @@ -351,7 +351,7 @@ typedef struct { int preload; } fpu_switch_t; */ static inline int fpu_lazy_restore(struct task_struct *new, unsigned int cpu) { - return new == percpu_read_stable(fpu_owner_task) && + return new == this_cpu_read_stable(fpu_owner_task) && cpu == new->thread.fpu.last_cpu; } @@ -473,7 +473,7 @@ static inline void kernel_fpu_begin(void) __thread_clear_has_fpu(me); /* We do 'stts()' in kernel_fpu_end() */ } else { - percpu_write(fpu_owner_task, NULL); + __this_cpu_write(fpu_owner_task, NULL); clts(); } } -- 1.7.9.1 -- Cheers, Stephen Rothwell sfr@xxxxxxxxxxxxxxxx
Attachment:
pgpBveVahGgle.pgp
Description: PGP signature