SMP in machine/params.h
Pietro Cerutti
gahr at gahr.ch
Thu Jan 24 04:56:45 PST 2008
Attilio Rao wrote:
> 2008/1/24, Pietro Cerutti <gahr at gahr.ch>:
>> Hello,
>>
>> I'm running a Core2Duo on CURRENT, SMP kernel, but somehow the macro SMP
>> in machine/param.h 1.81 2006/01/09 line 68 is not defined, thus MAXCPU
>> is defined to 1. Any idea why?
>>
>>> uname -a
>> FreeBSD gahrtop.localhost 8.0-CURRENT FreeBSD 8.0-CURRENT #23: Tue Jan
>> 22 00:15:05 CET 2008
>> root at gahrtop.localhost:/usr/obj/usr/src/sys/MSI1034 i386
>>
>>> sysctl kern.smp.active kern.smp.maxcpus
>> kern.smp.active: 1
>> kern.smp.maxcpus: 16
>>
>>> cat smp.c
>> #include <sys/param.h>
>>
>> #ifndef SMP
>> # error SMP not defined
>> #endif
>>
>>
>>> make smp
>> cc -O2 -pipe -march=pentiumpro smp.c -o smp
>> smp.c:5:3: error: #error SMP not defined
>> *** Error code 1
>>
>>> cat maxcpu.c
>> #include <sys/param.h>
>> #include <stdio.h>
>>
>> int main(void)
>> {
>> return (MAXCPU);
>> }
>>
>>> ./maxcpu; echo $?
>> 1
>>
>> Any idea?
>
> Did you define SMP in your config file?
Yes. How could I have kern.smp.active: 1 otherwise?
> grep SMP /sys/i386/conf/MSI1034
# To make an SMP kernel, the next two lines are needed
options SMP # Symmetric MultiProcessor Kernel
>
> Attilio
>
>
--
Pietro Cerutti
PGP Public Key:
http://gahr.ch/pgp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 187 bytes
Desc: OpenPGP digital signature
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20080124/5799b30b/signature.pgp
More information about the freebsd-hackers
mailing list