* error: implicit declaration of function 'cpu_die'
@ 2005-10-10 16:33 Olaf Hering
2005-10-10 16:49 ` Simon Richter
0 siblings, 1 reply; 3+ messages in thread
From: Olaf Hering @ 2005-10-10 16:33 UTC (permalink / raw)
To: linux-kernel, Paul Mackerras; +Cc: linuxppc-dev
How can I fix this properly?
arch/ppc/kernel/idle.c includes linux/smp.h, which includes asm-smp.h
only if CONFIG_SMP is defined.
As a result, cpu_die remains undefined for non-SMP builds.
The include order was changed recently, as this kernel .config built ok with 2.6.13.
I see cpu_die was introduced recently in include/asm-ppc/smp.h, in 2.6.14-rc1.
CC arch/ppc/kernel/idle.o
arch/ppc/kernel/idle.c: In function 'default_idle':
arch/ppc/kernel/idle.c:58: error: implicit declaration of function 'cpu_die'
make[1]: *** [arch/ppc/kernel/idle.o] Error 1
--
short story of a lazy sysadmin:
alias appserv=wotan
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: error: implicit declaration of function 'cpu_die'
2005-10-10 16:33 error: implicit declaration of function 'cpu_die' Olaf Hering
@ 2005-10-10 16:49 ` Simon Richter
2005-10-10 19:40 ` Olaf Hering
0 siblings, 1 reply; 3+ messages in thread
From: Simon Richter @ 2005-10-10 16:49 UTC (permalink / raw)
To: Olaf Hering; +Cc: linuxppc-dev, linux-kernel
[-- Attachment #1.1: Type: text/plain, Size: 396 bytes --]
Hi,
> arch/ppc/kernel/idle.c includes linux/smp.h, which includes asm-smp.h
> only if CONFIG_SMP is defined.
> As a result, cpu_die remains undefined for non-SMP builds.
I have used the attached patch for my tree[1], but this needs to be
cross-checked with the other architectures.
Simon
[1] where I merge the APUS stuff by Roman Zippel --
http://www.psi5.com/~geier/linux-2.6-apus.git
[-- Attachment #1.2: cpu_die.diff --]
[-- Type: text/plain, Size: 737 bytes --]
diff --git a/include/asm-ppc/smp.h b/include/asm-ppc/smp.h
--- a/include/asm-ppc/smp.h
+++ b/include/asm-ppc/smp.h
@@ -66,11 +66,7 @@ extern struct klock_info_struct klock_in
#endif /* __ASSEMBLY__ */
-#else /* !(CONFIG_SMP) */
-
-static inline void cpu_die(void) { }
-
-#endif /* !(CONFIG_SMP) */
+#endif /* CONFIG_SMP */
#endif /* !(_PPC_SMP_H) */
#endif /* __KERNEL__ */
diff --git a/include/linux/smp.h b/include/linux/smp.h
--- a/include/linux/smp.h
+++ b/include/linux/smp.h
@@ -99,6 +99,7 @@ void smp_prepare_boot_cpu(void);
static inline void smp_send_reschedule(int cpu) { }
#define num_booting_cpus() 1
#define smp_prepare_boot_cpu() do {} while (0)
+static inline void cpu_die(void) { }
#endif /* !SMP */
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 307 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: error: implicit declaration of function 'cpu_die'
2005-10-10 16:49 ` Simon Richter
@ 2005-10-10 19:40 ` Olaf Hering
0 siblings, 0 replies; 3+ messages in thread
From: Olaf Hering @ 2005-10-10 19:40 UTC (permalink / raw)
To: Simon Richter; +Cc: linuxppc-dev, linux-kernel
On Mon, Oct 10, Simon Richter wrote:
> Hi,
>
> >arch/ppc/kernel/idle.c includes linux/smp.h, which includes asm-smp.h
> >only if CONFIG_SMP is defined.
> >As a result, cpu_die remains undefined for non-SMP builds.
>
> I have used the attached patch for my tree[1], but this needs to be
> cross-checked with the other architectures.
Looks good, should go into 2.6.14.
--
short story of a lazy sysadmin:
alias appserv=wotan
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-10-10 19:40 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-10 16:33 error: implicit declaration of function 'cpu_die' Olaf Hering
2005-10-10 16:49 ` Simon Richter
2005-10-10 19:40 ` Olaf Hering
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).