Strange problem: on a dual P3 Xeon system, if I run cat /proc/cpuinfo, it shows 2 processors, processor: 0 and processor: 1. But if in a kernel module I write, say,
Code:
#include <asm/smp.h> //or #include <linux/smp.h>, both have same result
printk(KERN_ALERT "# Cpu's %i , %i", smp_num_cpus, NR_CPUS);
It prints:
which means for some reason it only sees one CPU?
The reason that this is a problem is that in a module I'm writing, calling smp_call_function checks smp_num_cpus to make sure it isn't 1. Since it is, for some reason, it returns immediately.
Any ideas as to why this is so and how I can fix it? Googling hasn't come up with anything. Links, thoughts, anything would be helpful.
-Dagda
Dual P3 Xeon
Slackware 10.0
Linux 2.4.26
SMP enabled
Gcc 3.3.4