public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
* [Linux-ia64] Re: volatile unsigned long cpu_online_map vs unsigned long cpu_online_map
@ 2001-06-26 16:24 Bill Nottingham
  2001-06-26 16:56 ` Andreas Schwab
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Bill Nottingham @ 2001-06-26 16:24 UTC (permalink / raw)
  To: linux-ia64

David Mosberger (davidm@hpl.hp.com) 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?

Bill


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Linux-ia64] Re: volatile unsigned long cpu_online_map vs unsigned long cpu_online_map
  2001-06-26 16:24 [Linux-ia64] Re: volatile unsigned long cpu_online_map vs unsigned long cpu_online_map Bill Nottingham
@ 2001-06-26 16:56 ` Andreas Schwab
  2001-06-26 17:04 ` Bill Nottingham
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Andreas Schwab @ 2001-06-26 16:56 UTC (permalink / raw)
  To: linux-ia64

Bill Nottingham <notting@redhat.com> writes:

|> David Mosberger (davidm@hpl.hp.com) 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.

-- 
Andreas Schwab                                  "And now for something
SuSE Labs                                        completely different."
Andreas.Schwab@suse.de
SuSE GmbH, Schanzäckerstr. 10, D-90443 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Linux-ia64] Re: volatile unsigned long cpu_online_map vs unsigned long cpu_online_map
  2001-06-26 16:24 [Linux-ia64] Re: volatile unsigned long cpu_online_map vs unsigned long cpu_online_map Bill Nottingham
  2001-06-26 16:56 ` Andreas Schwab
@ 2001-06-26 17:04 ` Bill Nottingham
  2001-06-26 17:11 ` [Linux-ia64] Re: volatile unsigned long cpu_online_map vs uns Seth, Rohit
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Bill Nottingham @ 2001-06-26 17:04 UTC (permalink / raw)
  To: linux-ia64

Andreas Schwab (schwab@suse.de) 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?

Bill


^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: [Linux-ia64] Re: volatile unsigned long cpu_online_map vs uns
  2001-06-26 16:24 [Linux-ia64] Re: volatile unsigned long cpu_online_map vs unsigned long cpu_online_map Bill Nottingham
  2001-06-26 16:56 ` Andreas Schwab
  2001-06-26 17:04 ` Bill Nottingham
@ 2001-06-26 17:11 ` Seth, Rohit
  2001-06-26 17:15 ` [Linux-ia64] Re: volatile unsigned long cpu_online_map vs unsigned long cpu_online_map Andreas Schwab
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Seth, Rohit @ 2001-06-26 17:11 UTC (permalink / raw)
  To: linux-ia64

cpu_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


--- kernel/setup.c      Fri Jun  1 15:15:53 2001
+++ /tmp/setup.c        Tue Jun 26 09:46:40 2001
@@ -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:schwab@suse.de]
Sent: Tuesday, June 26, 2001 9:57 AM
To: David Mosberger
Cc: linux-ia64@linuxia64.org
Subject: [Linux-ia64] Re: volatile unsigned long cpu_online_map vs
unsigned long cpu_online_map


Bill Nottingham <notting@redhat.com> writes:

|> David Mosberger (davidm@hpl.hp.com) 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.

-- 
Andreas Schwab                                  "And now for something
SuSE Labs                                        completely different."
Andreas.Schwab@suse.de
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
Linux-IA64@linuxia64.org
http://lists.linuxia64.org/lists/listinfo/linux-ia64



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Linux-ia64] Re: volatile unsigned long cpu_online_map vs unsigned long cpu_online_map
  2001-06-26 16:24 [Linux-ia64] Re: volatile unsigned long cpu_online_map vs unsigned long cpu_online_map Bill Nottingham
                   ` (2 preceding siblings ...)
  2001-06-26 17:11 ` [Linux-ia64] Re: volatile unsigned long cpu_online_map vs uns Seth, Rohit
@ 2001-06-26 17:15 ` Andreas Schwab
  2001-06-26 17:30 ` David Mosberger
  2001-06-26 18:54 ` Andreas Schwab
  5 siblings, 0 replies; 7+ messages in thread
From: Andreas Schwab @ 2001-06-26 17:15 UTC (permalink / raw)
  To: linux-ia64

Bill Nottingham <notting@redhat.com> writes:

|> Andreas Schwab (schwab@suse.de) 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.

-- 
Andreas Schwab                                  "And now for something
SuSE Labs                                        completely different."
Andreas.Schwab@suse.de
SuSE GmbH, Schanzäckerstr. 10, D-90443 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Linux-ia64] Re: volatile unsigned long cpu_online_map vs unsigned long cpu_online_map
  2001-06-26 16:24 [Linux-ia64] Re: volatile unsigned long cpu_online_map vs unsigned long cpu_online_map Bill Nottingham
                   ` (3 preceding siblings ...)
  2001-06-26 17:15 ` [Linux-ia64] Re: volatile unsigned long cpu_online_map vs unsigned long cpu_online_map Andreas Schwab
@ 2001-06-26 17:30 ` David Mosberger
  2001-06-26 18:54 ` Andreas Schwab
  5 siblings, 0 replies; 7+ messages in thread
From: David Mosberger @ 2001-06-26 17:30 UTC (permalink / raw)
  To: linux-ia64

>>>>> On Tue, 26 Jun 2001 12:24:20 -0400, Bill Nottingham <notting@redhat.com> 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.

	--david


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Linux-ia64] Re: volatile unsigned long cpu_online_map vs unsigned long cpu_online_map
  2001-06-26 16:24 [Linux-ia64] Re: volatile unsigned long cpu_online_map vs unsigned long cpu_online_map Bill Nottingham
                   ` (4 preceding siblings ...)
  2001-06-26 17:30 ` David Mosberger
@ 2001-06-26 18:54 ` Andreas Schwab
  5 siblings, 0 replies; 7+ messages in thread
From: Andreas Schwab @ 2001-06-26 18:54 UTC (permalink / raw)
  To: linux-ia64

David Mosberger <davidm@hpl.hp.com> writes:

|> >>>>> On Tue, 26 Jun 2001 12:24:20 -0400, Bill Nottingham <notting@redhat.com> 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.

-- 
Andreas Schwab                                  "And now for something
SuSE Labs                                        completely different."
Andreas.Schwab@suse.de
SuSE GmbH, Schanzäckerstr. 10, D-90443 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2001-06-26 18:54 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-06-26 16:24 [Linux-ia64] Re: volatile unsigned long cpu_online_map vs unsigned long cpu_online_map Bill Nottingham
2001-06-26 16:56 ` Andreas Schwab
2001-06-26 17:04 ` Bill Nottingham
2001-06-26 17:11 ` [Linux-ia64] Re: volatile unsigned long cpu_online_map vs uns Seth, Rohit
2001-06-26 17:15 ` [Linux-ia64] Re: volatile unsigned long cpu_online_map vs unsigned long cpu_online_map Andreas Schwab
2001-06-26 17:30 ` David Mosberger
2001-06-26 18:54 ` Andreas Schwab

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox