* 2.6.16.9 alpha compile error
@ 2006-04-24 14:08 Ernst Herzberg
2006-04-24 18:25 ` Norbert Tretkowski
0 siblings, 1 reply; 2+ messages in thread
From: Ernst Herzberg @ 2006-04-24 14:08 UTC (permalink / raw)
To: linux-kernel
arch/alpha/kernel/setup.c: In function `register_cpus':
arch/alpha/kernel/setup.c:486: warning: implicit declaration of function `for_each_possible_cpu'
arch/alpha/kernel/setup.c:486: error: syntax error before '{' token
arch/alpha/kernel/setup.c:488: error: `p' undeclared (first use in this function)
arch/alpha/kernel/setup.c:488: error: (Each undeclared identifier is reported only once
arch/alpha/kernel/setup.c:488: error: for each function it appears in.)
arch/alpha/kernel/setup.c: At top level:
arch/alpha/kernel/setup.c:492: error: syntax error before "return"
This q&d patch fixes it for me:
--
--- lx-2.6.16.9.vanilla/arch/alpha/kernel/setup.c 2006-04-24 15:56:23.000000000 +0200
+++ lx-2.6.16.9/arch/alpha/kernel/setup.c 2006-04-24 15:36:50.000000000 +0200
@@ -483,7 +483,8 @@ register_cpus(void)
{
int i;
- for_each_possible_cpu(i) {
+ for (i = 0; i < NR_CPUS; i++)
+ if (cpu_possible(i)) {
struct cpu *p = kzalloc(sizeof(*p), GFP_KERNEL);
if (!p)
return -ENOMEM;
--
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: 2.6.16.9 alpha compile error
2006-04-24 14:08 2.6.16.9 alpha compile error Ernst Herzberg
@ 2006-04-24 18:25 ` Norbert Tretkowski
0 siblings, 0 replies; 2+ messages in thread
From: Norbert Tretkowski @ 2006-04-24 18:25 UTC (permalink / raw)
To: linux-kernel
* Ernst Herzberg wrote:
> arch/alpha/kernel/setup.c: In function `register_cpus':
> arch/alpha/kernel/setup.c:486: warning: implicit declaration of function `for_each_possible_cpu'
> arch/alpha/kernel/setup.c:486: error: syntax error before '{' token
> arch/alpha/kernel/setup.c:488: error: `p' undeclared (first use in this function)
> arch/alpha/kernel/setup.c:488: error: (Each undeclared identifier is reported only once
> arch/alpha/kernel/setup.c:488: error: for each function it appears in.)
> arch/alpha/kernel/setup.c: At top level:
> arch/alpha/kernel/setup.c:492: error: syntax error before "return"
From: Andrew Morton <akpm@osdl.org>
Backport for_each_possible_cpu() into 2.6.16. Fixes the alpha build, and any
future occurrences.
Signed-off-by: Andrew Morton <akpm@osdl.org>
---
include/linux/cpumask.h | 1 +
1 files changed, 1 insertion(+)
--- a/include/linux/cpumask.h 2006-04-24 19:28:56.000000000 +0200
+++ b/include/linux/cpumask.h 2006-04-24 19:29:21.000000000 +0200
@@ -408,6 +408,7 @@
})
#define for_each_cpu(cpu) for_each_cpu_mask((cpu), cpu_possible_map)
+#define for_each_possible_cpu(cpu) for_each_cpu_mask((cpu), cpu_possible_map)
#define for_each_online_cpu(cpu) for_each_cpu_mask((cpu), cpu_online_map)
#define for_each_present_cpu(cpu) for_each_cpu_mask((cpu), cpu_present_map)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-04-24 18:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-04-24 14:08 2.6.16.9 alpha compile error Ernst Herzberg
2006-04-24 18:25 ` Norbert Tretkowski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®