Re: How can I detect a SMP box with d-i kernel and tools ?
On Fri, Aug 13, 2004 at 12:13:20AM +0200, Thomas Poindessous wrote:
> I'm trying to add smp detection for Bug#265098
> I'm looking for a way to detect smp system with current d-i powerpc
> kernel and d-i tools.
> If you know such a trick, I will be glad to know it.
I think the easiest way would be to look in the /proc/device-tree, for the
info given to you by the OF. This naturally will probably only work on
newworld and chrp, not sure about oldworld and prep SMP boxes.
Anyway, on my pegasos2/G4, i have :
$ ls /proc/device-tree/cpus/
#address-cells #cpus linux,phandle name PowerPC,74x7 #size-cells
Presumably you have two processor nodes on SMP boxes.
Also, another way would (maybe) to look at the content of #cpus :
$ hexdump /proc/device-tree/cpus/#cpus
0000000 0000 0001
So, on my box, #cpus will contain 1, and presumably on SMP boxes, it will
contain 2 or more. I have not tested this, but please check on your system.