Re: [patch 12/23] local_t m32r use architecture specific cmpxchg_local

From: Mathieu Desnoyers
Date: Tue Aug 21 2007 - 10:01:51 EST


* Hirokazu Takata (takata@xxxxxxxxxxxxxx) wrote:
> BTW, I need an additional patch to fix a build error,
> caused by the above patch.
>
> -- Takata
>
>
> [PATCH] m32r: build fix of arch/m32r/kernel/smpboot.c
>
> This patch is for Mathieu Desnoyers's include/asm-m32r/local.h.
> Applying the new include/asm-m32r/local.h, inclusion of linux/sched.h
> is needed to fix a build error of arch/m32r/kernel/smpboot.c.
>
> <-- snip -->
> ...
> CC arch/m32r/kernel/smpboot.o
> /project/m32r-linux/kernel/work/linux-2.6_dev.git/arch/m32r/kernel/smpboot.c: In function 'do_boot_cpu':
> /project/m32r-linux/kernel/work/linux-2.6_dev.git/arch/m32r/kernel/smpboot.c:279: error: implicit declaration of function 'fork_idle'
> /project/m32r-linux/kernel/work/linux-2.6_dev.git/arch/m32r/kernel/smpboot.c:279: warning: assignment makes pointer from integer without a cast
> /project/m32r-linux/kernel/work/linux-2.6_dev.git/arch/m32r/kernel/smpboot.c:283: error: dereferencing pointer to incomplete type
> /project/m32r-linux/kernel/work/linux-2.6_dev.git/arch/m32r/kernel/smpboot.c:289: error: dereferencing pointer to incomplete type
> /project/m32r-linux/kernel/work/linux-2.6_dev.git/arch/m32r/kernel/smpboot.c:290: error: implicit declaration of function 'task_thread_info'
> /project/m32r-linux/kernel/work/linux-2.6_dev.git/arch/m32r/kernel/smpboot.c:290: error: invalid type argument of '->'
> /project/m32r-linux/kernel/work/linux-2.6_dev.git/arch/m32r/kernel/smpboot.c: In function 'start_secondary':
> /project/m32r-linux/kernel/work/linux-2.6_dev.git/arch/m32r/kernel/smpboot.c:429: error: implicit declaration of function 'cpu_init'
> make[2]: *** [arch/m32r/kernel/smpboot.o] Error 1
> <-- snip -->
>
> Signed-off-by: Hirokazu Takata <takata@xxxxxxxxxxxxxx>
> ---
> arch/m32r/kernel/smpboot.c | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/arch/m32r/kernel/smpboot.c b/arch/m32r/kernel/smpboot.c
> index 9dae410..b41aa78 100644
> --- a/arch/m32r/kernel/smpboot.c
> +++ b/arch/m32r/kernel/smpboot.c
> @@ -43,6 +43,7 @@
> #include <linux/init.h>
> #include <linux/kernel.h>
> #include <linux/mm.h>
> +#include <linux/sched.h>
> #include <linux/err.h>
> #include <linux/irq.h>
> #include <linux/bootmem.h>
> --
> 1.5.2.4
>

Yes, it seems like m32r smpboot.c depended upon the include hardirq.h
from asm-generic/local.h, which disappears in the architecture specific
implementation. You fix is therefore needed and appropriate (it's not a
circular dependency).

Thanks!

Acked-by: Mathieu Desnoyers <mathieu.desnoyers@xxxxxxxxxx>

--
Mathieu Desnoyers
Computer Engineering Ph.D. Student, Ecole Polytechnique de Montreal
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/