volatile unsigned long cpu_online_map vs unsigned long cpu_online_map
Quoted 6 lines · David Mosberger
Andreas>
include/asm-ia64/smp.hhas 'extern unsigned long Andreas>cpu_online_map', butarch/ia64/kernel/setup.cand Andreas>arch/ia64/kernel/smpboot.chave 'volatile unsigned long Andreas>cpu_online_map'. Which one is correct?It should be volatile.
Also, shoudn't it be extern in at least one of setup.c/smpboot.c?
Bill
Bill Nottingham <[email protected]> writes:
|> David Mosberger ([email protected]) said: |> > Andreas> include/asm-ia64/smp.h has 'extern unsigned long |> > Andreas> cpu_online_map', but arch/ia64/kernel/setup.c and |> > Andreas> arch/ia64/kernel/smpboot.c have 'volatile unsigned long |> > Andreas> cpu_online_map'. Which one is correct? |> > |> > It should be volatile. |> |> Also, shoudn't it be extern in at least one of setup.c/smpboot.c?
No. The definition in setup.c is guarded by CONFIG_SMP, and smpboot.c is not use on non-SMP.
Andreas.
Signature · 5 lines
Andreas Schwab "And now for something SuSE Labs completely different." [email protected] SuSE GmbH, Schanzäckerstr. 10, D-90443 Nürnberg Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
Quoted 4 lines · Andreas Schwab
|> Also, shoudn't it be extern in at least one of
setup.c/smpboot.c?No. The definition in
setup.cis guarded byCONFIG_SMP, andsmpboot.cis not use on non-SMP.
But then on a SMP kernel you have two definitions of the same symbol, yes?
Bill
RE: [Linux-ia64] Re: volatile unsigned long cpu_online_map vs uns
In reply to Bill Nottinghamcpu_online_map gets used and defined only for SMP configurations. We will need to remove the definition of cpu_online_map from setup.c as it is defined in smpboot.c. For setup.c, cpu_online_map is done extern in smp.h (...change to volatile there..)
Below is the patch for setup.c
tmp/setup.c Tue Jun 26 09:46:40 2001 renamed from setup.c Fri Jun 1 15:15:53 2001 +0 -4
@@ -60,10 +60,6 @@ /* This tells _start which CPU is booting. */ int cpu_now_booting; -#ifdef CONFIG_SMP -volatile unsigned long cpu_online_map; -#endif - unsigned long ia64_iobase; /* virtual address for I/O accesses */ #define COMMAND_LINE_SIZE 512
-----Original Message-----
From: Andreas Schwab [mailto:[email protected]]
Sent: Tuesday, June 26, 2001 9:57 AM
To: David Mosberger
Cc: [email protected]
Subject: [Linux-ia64] Re: volatile unsigned long cpu_online_map vs unsigned long cpu_online_map
Bill Nottingham <[email protected]> writes:
|> David Mosberger ([email protected]) said: |> > Andreas> include/asm-ia64/smp.h has 'extern unsigned long |> > Andreas> cpu_online_map', but arch/ia64/kernel/setup.c and |> > Andreas> arch/ia64/kernel/smpboot.c have 'volatile unsigned long |> > Andreas> cpu_online_map'. Which one is correct? |> > |> > It should be volatile. |> |> Also, shoudn't it be extern in at least one of setup.c/smpboot.c?
No. The definition in setup.c is guarded by CONFIG_SMP, and smpboot.c is not use on non-SMP.
Andreas.
Signature · 10 lines
Andreas Schwab "And now for something SuSE Labs completely different." [email protected] SuSE GmbH, Schanzäckerstr. 10, D-90443 Nürnberg Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 _______________________________________________ Linux-IA64 mailing list [email protected] http://lists.linuxia64.org/lists/listinfo/linux-ia64
Bill Nottingham <[email protected]> writes:
|> Andreas Schwab ([email protected]) said: |> > |> Also, shoudn't it be extern in at least one of setup.c/smpboot.c? |> > |> > No. The definition in setup.c is guarded by CONFIG_SMP, and smpboot.c is |> > not use on non-SMP. |> |> But then on a SMP kernel you have two definitions of the same |> symbol, yes?
Yes, you are right, I got the logic wrong.
Andreas.
Signature · 5 lines
Andreas Schwab "And now for something SuSE Labs completely different." [email protected] SuSE GmbH, Schanzäckerstr. 10, D-90443 Nürnberg Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · Bill Nottingham
Bill> Also, shoudn't it be extern in at least one of Bill> setup.c/smpboot.c?
I already have taken care of that in the latest source tree. I don't think it causes any problems.
--david
David Mosberger <[email protected]> writes:
|> >>>>> On Tue, 26 Jun 2001 12:24:20 -0400, Bill Nottingham <[email protected]> said: |> |> Bill> Also, shoudn't it be extern in at least one of |> Bill> setup.c/smpboot.c? |> |> I already have taken care of that in the latest source tree. I don't |> think it causes any problems.
Only if you compile the kernel with -fno-common.
Andreas.
Signature · 5 lines
Andreas Schwab "And now for something SuSE Labs completely different." [email protected] SuSE GmbH, Schanzäckerstr. 10, D-90443 Nürnberg Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5