|
Lines 2453-2458
int __init io_apic_get_unique_id (int io
Link Here
|
| 2453 |
|
2453 |
|
| 2454 |
if (physids_empty(apic_id_map)) |
2454 |
if (physids_empty(apic_id_map)) |
| 2455 |
apic_id_map = ioapic_phys_id_map(phys_cpu_present_map); |
2455 |
apic_id_map = ioapic_phys_id_map(phys_cpu_present_map); |
|
|
2456 |
printk(KERN_INFO "IOAPIC: apic_id_map is %ld\n", apic_id_map.mask[0]); |
| 2456 |
|
2457 |
|
| 2457 |
spin_lock_irqsave(&ioapic_lock, flags); |
2458 |
spin_lock_irqsave(&ioapic_lock, flags); |
| 2458 |
reg_00.raw = io_apic_read(ioapic, 0); |
2459 |
reg_00.raw = io_apic_read(ioapic, 0); |
|
Lines 2475-2482
int __init io_apic_get_unique_id (int io
Link Here
|
| 2475 |
break; |
2476 |
break; |
| 2476 |
} |
2477 |
} |
| 2477 |
|
2478 |
|
| 2478 |
if (i == get_physical_broadcast()) |
2479 |
if (i == get_physical_broadcast()) { |
| 2479 |
panic("Max apic_id exceeded!\n"); |
2480 |
printk(KERN_ERR "Max apic_id exceeded!\n"); |
|
|
2481 |
return -1; |
| 2482 |
} |
| 2480 |
|
2483 |
|
| 2481 |
printk(KERN_WARNING "IOAPIC[%d]: apic_id %d already used, " |
2484 |
printk(KERN_WARNING "IOAPIC[%d]: apic_id %d already used, " |
| 2482 |
"trying %d\n", ioapic, apic_id, i); |
2485 |
"trying %d\n", ioapic, apic_id, i); |
|
Lines 2484-2492
int __init io_apic_get_unique_id (int io
Link Here
|
| 2484 |
apic_id = i; |
2487 |
apic_id = i; |
| 2485 |
} |
2488 |
} |
| 2486 |
|
2489 |
|
| 2487 |
tmp = apicid_to_cpu_present(apic_id); |
|
|
| 2488 |
physids_or(apic_id_map, apic_id_map, tmp); |
| 2489 |
|
| 2490 |
if (reg_00.bits.ID != apic_id) { |
2490 |
if (reg_00.bits.ID != apic_id) { |
| 2491 |
reg_00.bits.ID = apic_id; |
2491 |
reg_00.bits.ID = apic_id; |
| 2492 |
|
2492 |
|
|
Lines 2496-2505
int __init io_apic_get_unique_id (int io
Link Here
|
| 2496 |
spin_unlock_irqrestore(&ioapic_lock, flags); |
2496 |
spin_unlock_irqrestore(&ioapic_lock, flags); |
| 2497 |
|
2497 |
|
| 2498 |
/* Sanity check */ |
2498 |
/* Sanity check */ |
| 2499 |
if (reg_00.bits.ID != apic_id) |
2499 |
if (reg_00.bits.ID != apic_id) { |
| 2500 |
panic("IOAPIC[%d]: Unable change apic_id!\n", ioapic); |
2500 |
printk(KERN_ERR "IOAPIC[%d]: Unable change apic_id!\n", |
|
|
2501 |
ioapic); |
| 2502 |
return -1; |
| 2503 |
} |
| 2501 |
} |
2504 |
} |
| 2502 |
|
2505 |
|
|
|
2506 |
tmp = apicid_to_cpu_present(apic_id); |
| 2507 |
physids_or(apic_id_map, apic_id_map, tmp); |
| 2508 |
|
| 2503 |
apic_printk(APIC_VERBOSE, KERN_INFO |
2509 |
apic_printk(APIC_VERBOSE, KERN_INFO |
| 2504 |
"IOAPIC[%d]: Assigned apic_id %d\n", ioapic, apic_id); |
2510 |
"IOAPIC[%d]: Assigned apic_id %d\n", ioapic, apic_id); |
| 2505 |
|
2511 |
|