public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* smp_num_cpus redefined?  (compiling 2.2.18 for non-SMP?)
@ 2001-02-06  0:06 Miller, Brendan
  2001-02-06  6:39 ` Keith Owens
  0 siblings, 1 reply; 5+ messages in thread
From: Miller, Brendan @ 2001-02-06  0:06 UTC (permalink / raw)
  To: 'linux-kernel@vger.kernel.org'


I have a problem that would have started out as "I can't compile my device
driver with 2.2.18".  I was compiling my device driver for non-SMP while my
kernel (and thus /usr/src/linux) was SMP.  So I looked at compiling the
kernel for non-SMP so that my /usr/src/linux would be non-SMP and my device
driver would match.  Well, now just compiling 2.2.18 for non-SMP, I get

[root@multnomah linux]# make
cc -D__KERNEL__ -I/usr/src/linux-2.2.18/include -Wall -Wstrict-prototypes
-O2 -fomit-frame-pointer -
fno-strict-aliasing -pipe -fno-strength-reduce -m486 -malign-loops=2
-malign-jumps=2 -malign-functio
ns=2 -DCPU=686 -DUTS_MACHINE='"i386"' -c -o init/version.o init/version.c
make -C  kernel
make[1]: Entering directory `/usr/src/linux-2.2.18/kernel'
make all_targets
make[2]: Entering directory `/usr/src/linux-2.2.18/kernel'
cc -D__KERNEL__ -I/usr/src/linux-2.2.18/include -Wall -Wstrict-prototypes
-O2 -fomit-frame-pointer -
fno-strict-aliasing -pipe -fno-strength-reduce -m486 -malign-loops=2
-malign-jumps=2 -malign-functio
ns=2 -DCPU=686   -DEXPORT_SYMTAB -c ksyms.c
In file included from /usr/src/linux-2.2.18/include/linux/modversions.h:16,
                 from /usr/src/linux-2.2.18/include/linux/module.h:19,
                 from ksyms.c:14:
/usr/src/linux-2.2.18/include/linux/modules/i386_ksyms.ver:64: warning:
`cpu_data' redefined
/usr/src/linux-2.2.18/include/asm/processor.h:98: warning: this is the
location of the previous defi
nition
/usr/src/linux-2.2.18/include/linux/modules/i386_ksyms.ver:74: warning:
`smp_num_cpus' redefined
/usr/src/linux-2.2.18/include/linux/smp.h:77: warning: this is the location
of the previous definiti
on
/usr/src/linux-2.2.18/include/linux/modules/i386_ksyms.ver:78: warning:
`cpu_online_map' redefined
/usr/src/linux-2.2.18/include/linux/smp.h:84: warning: this is the location
of the previous definiti
on
/usr/src/linux-2.2.18/include/linux/modules/i386_ksyms.ver:100: warning:
`smp_call_function' redefin
ed
/usr/src/linux-2.2.18/include/linux/smp.h:83: warning: this is the location
of the previous definiti
on
In file included from /usr/src/linux-2.2.18/include/linux/interrupt.h:51,
                 from ksyms.c:21:
/usr/src/linux-2.2.18/include/asm/hardirq.h:23: warning: `synchronize_irq'
redefined
/usr/src/linux-2.2.18/include/linux/modules/i386_ksyms.ver:80: warning: this
is the location of the
previous definition
In file included from /usr/src/linux-2.2.18/include/linux/interrupt.h:52,
                 from ksyms.c:21:
/usr/src/linux-2.2.18/include/asm/softirq.h:75: warning: `synchronize_bh'
redefined
/usr/src/linux-2.2.18/include/linux/modules/i386_ksyms.ver:82: warning: this
is the location of the
previous definition
/usr/src/linux-2.2.18/include/linux/kernel_stat.h: In function `kstat_irqs':
In file included from ksyms.c:17:
/usr/src/linux-2.2.18/include/linux/kernel_stat.h:47: `smp_num_cpus'
undeclared (first use in this f
unction)
/usr/src/linux-2.2.18/include/linux/kernel_stat.h:47: (Each undeclared
identifier is reported only o
nce
/usr/src/linux-2.2.18/include/linux/kernel_stat.h:47: for each function it
appears in.)
make[2]: *** [ksyms.o] Error 1
make[2]: Leaving directory `/usr/src/linux-2.2.18/kernel'
make[1]: *** [first_rule] Error 2
make[1]: Leaving directory `/usr/src/linux-2.2.18/kernel'
make: *** [_dir_kernel] Error 2

I get these same warnings when I compile my driver against either SMP or
non-SMP 2.2.18 source.  FWIW, everything is fine with 2.2.14.  But I need
2.2.18 for the NFS fixups.  I've searched for this "smp_num_cpus" redefined,
and it seems that others have had the same problem, but no solutions have
been posted.

Did I describe the problem adequately?  Is there a solution?

Please cc: me as I'm not on the list.

Brendan Miller
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* Re: smp_num_cpus redefined? (compiling 2.2.18 for non-SMP?)
  2001-02-06  0:06 Miller, Brendan
@ 2001-02-06  6:39 ` Keith Owens
  0 siblings, 0 replies; 5+ messages in thread
From: Keith Owens @ 2001-02-06  6:39 UTC (permalink / raw)
  To: Miller, Brendan; +Cc: 'linux-kernel@vger.kernel.org'

On Mon, 5 Feb 2001 19:06:58 -0500 , 
"Miller, Brendan" <Brendan.Miller@Dialogic.com> wrote:
>I have a problem that would have started out as "I can't compile my device
>driver with 2.2.18".  I was compiling my device driver for non-SMP while my
>kernel (and thus /usr/src/linux) was SMP.  So I looked at compiling the
>kernel for non-SMP so that my /usr/src/linux would be non-SMP and my device
>driver would match.  Well, now just compiling 2.2.18 for non-SMP, I get
>
>In file included from /usr/src/linux-2.2.18/include/linux/modversions.h:16,
>                 from /usr/src/linux-2.2.18/include/linux/module.h:19,
>                 from ksyms.c:14:
>/usr/src/linux-2.2.18/include/linux/modules/i386_ksyms.ver:64: warning:
>`cpu_data' redefined

http://www.tux.org/lkml/#s8-8

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* Re: smp_num_cpus redefined? (compiling 2.2.18 for non-SMP?)
@ 2001-02-06 23:52 Juraj Bednar
  2001-02-06 23:59 ` J . A . Magallon
  0 siblings, 1 reply; 5+ messages in thread
From: Juraj Bednar @ 2001-02-06 23:52 UTC (permalink / raw)
  To: linux-kernel

Hello,


  the same for vanilla 2.4.1 and 2.4.1ac3. Everything works ok until I turn off SMP
support (which is required to make it possible to turn off the machine using APM, since
ACPI is completely broken in 2.4.1 for me).


             Juraj.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* Re: smp_num_cpus redefined? (compiling 2.2.18 for non-SMP?)
  2001-02-06 23:52 smp_num_cpus redefined? (compiling 2.2.18 for non-SMP?) Juraj Bednar
@ 2001-02-06 23:59 ` J . A . Magallon
  0 siblings, 0 replies; 5+ messages in thread
From: J . A . Magallon @ 2001-02-06 23:59 UTC (permalink / raw)
  To: Juraj Bednar; +Cc: linux-kernel


On 02.07 Juraj Bednar wrote:
> Hello,
> 
> 
>   the same for vanilla 2.4.1 and 2.4.1ac3. Everything works ok until I turn
> off SMP
> support (which is required to make it possible to turn off the machine using
> APM, since
> ACPI is completely broken in 2.4.1 for me).
> 

You do not need to do that. Enable both SMP and APM (just APM support, no
ACPI nor any other apm option). And add to your lilo.conf file a line:
append="apm=power-off".

At boot you will see a log message like:

apm: BIOS version 1.2 Flags 0x03 (Driver version 1.14)
apm: disabled - APM is not SMP safe (power off active).

So kernel diables APM but lets the power-off feature active.

-- 
J.A. Magallon                                                      $> cd pub
mailto:jamagallon@able.es                                          $> more beer

Linux werewolf 2.4.1-ac4 #1 SMP Tue Feb 6 22:06:38 CET 2001 i686

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* Re: smp_num_cpus redefined? (compiling 2.2.18 for non-SMP?)
@ 2001-02-07  0:17 Juraj Bednar
  0 siblings, 0 replies; 5+ messages in thread
From: Juraj Bednar @ 2001-02-07  0:17 UTC (permalink / raw)
  To: linux-kernel

Hello,


 sorry, too stupid not to look on the web first, but this should really _NOT_ appear
in the kernel source tree. I found that apm=power_off and make mrproper before
build helps. 





         Juraj.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

end of thread, other threads:[~2001-02-07  0:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-02-06 23:52 smp_num_cpus redefined? (compiling 2.2.18 for non-SMP?) Juraj Bednar
2001-02-06 23:59 ` J . A . Magallon
  -- strict thread matches above, loose matches on Subject: below --
2001-02-07  0:17 Juraj Bednar
2001-02-06  0:06 Miller, Brendan
2001-02-06  6:39 ` Keith Owens

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