diff -Bru 2.4-acpi/include/asm-i386/smpboot.h patched/include/asm-i386/smpboot.h --- 2.4-acpi/include/asm-i386/smpboot.h 2004-01-08 17:10:21.000000000 +0800 +++ patched/include/asm-i386/smpboot.h 2004-01-08 17:09:41.000000000 +0800 @@ -82,9 +82,13 @@ static inline unsigned long apicid_to_phys_cpu_present(int apicid) { + int shift_len; + + shift_len = apicid; if(clustered_apic_mode) - return 1UL << (((apicid >> 4) << 2) + (apicid & 0x3)); - return 1UL << apicid; + shift_len = ((apicid >> 4) << 2) + (apicid & 0x3); + + return shift_len >= sizeof(unsigned long) ? 0 : 1UL << shift_len; } #define physical_to_logical_apicid(phys_apic) ( (1ul << (phys_apic & 0x3)) | (phys_apic & 0xF0u) )