Skip to contentSkip to conversation

Scalable CPU bitmasks

PATCH Manfred Spraul 3 participants 3 messages Mar 18, 2002

lore
Share & tools
lore
#0 lore raw
Quoted 6 lines

NOTE: The cpumap_to_ulong() and cpumap_ulong_to_cpumap() interfaces
are provided specifically for migration. In their current form, they call BUG() if NR_CPUS is defined to be greater than the bit-size of (unsigned long).

Why BUG? NR_CPUS is known at compile time, is there a reason why you can't use a call to an undefined function in order to get a link time error message? (like __bad_udelay in linux/asm-i386/udelay.h)

--
Manfred

#1 lore raw
Quoted 8 lines
Quoted 4 lines

NOTE: The cpumap_to_ulong() and cpumap_ulong_to_cpumap() interfaces
are provided specifically for migration. In their current form, they call BUG() if NR_CPUS is defined to be greater than the bit-size of (unsigned long).

Why BUG? NR_CPUS is known at compile time, is there a reason why you can't use a call to an undefined function in order to get a link time error message? (like __bad_udelay in linux/asm-i386/udelay.h)

why that, rather than #error ?

#2 lore raw
In reply to Manfred Spraul

Good point - I'll catch this at compile time. I'll resubmit shortly...

- Russ

Quoted 12 lines · Tim Hockin
Quoted 8 lines
Quoted 4 lines

NOTE: The cpumap_to_ulong() and cpumap_ulong_to_cpumap() interfaces
are provided specifically for migration. In their current form, they call BUG() if NR_CPUS is defined to be greater than the bit-size of (unsigned long).

Why BUG? NR_CPUS is known at compile time, is there a reason why you can't use a call to an undefined function in order to get a link time error message? (like __bad_udelay in linux/asm-i386/udelay.h)

why that, rather than #error ?

Signature · 2 lines
Russ Weight ([email protected])
Linux Technology Center