View | Details | Raw Unified | Return to bug 121955
Collapse All | Expand All

(-)linux-2.6.13-15/arch/i386/kernel/io_apic.c (-7 / +13 lines)
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
(-)linux-2.6.13-15/arch/i386/kernel/mpparse.c (-4 / +11 lines)
Lines 893-898 void __init mp_register_ioapic ( Link Here
893
	u32			gsi_base)
893
	u32			gsi_base)
894
{
894
{
895
	int			idx = 0;
895
	int			idx = 0;
896
	int			apicid;
896
897
897
	if (nr_ioapics >= MAX_IO_APICS) {
898
	if (nr_ioapics >= MAX_IO_APICS) {
898
		printk(KERN_ERR "ERROR: Max # of I/O APICs (%d) exceeded "
899
		printk(KERN_ERR "ERROR: Max # of I/O APICs (%d) exceeded "
Lines 905-920 void __init mp_register_ioapic ( Link Here
905
		return;
906
		return;
906
	}
907
	}
907
908
908
	idx = nr_ioapics++;
909
	idx = nr_ioapics;
909
910
910
	mp_ioapics[idx].mpc_type = MP_IOAPIC;
911
	mp_ioapics[idx].mpc_type = MP_IOAPIC;
911
	mp_ioapics[idx].mpc_flags = MPC_APIC_USABLE;
912
	mp_ioapics[idx].mpc_flags = MPC_APIC_USABLE;
912
	mp_ioapics[idx].mpc_apicaddr = address;
913
	mp_ioapics[idx].mpc_apicaddr = address;
913
914
914
	set_fixmap_nocache(FIX_IO_APIC_BASE_0 + idx, address);
915
	set_fixmap_nocache(FIX_IO_APIC_BASE_0 + idx, address);
915
	if ((boot_cpu_data.x86_vendor == X86_VENDOR_INTEL) && (boot_cpu_data.x86 < 15))
916
	if ((boot_cpu_data.x86_vendor == X86_VENDOR_INTEL) && (boot_cpu_data.x86 < 15)) {
916
		mp_ioapics[idx].mpc_apicid = io_apic_get_unique_id(idx, id);
917
		apicid = io_apic_get_unique_id(idx, id);
917
	else
918
		if (apicid < 0) {
919
			clear_fixmap(FIX_IO_APIC_BASE_0 + idx);
920
			return;
921
		}
922
		mp_ioapics[idx].mpc_apicid = apicid;
923
	} else
918
		mp_ioapics[idx].mpc_apicid = id;
924
		mp_ioapics[idx].mpc_apicid = id;
919
	mp_ioapics[idx].mpc_apicver = io_apic_get_version(idx);
925
	mp_ioapics[idx].mpc_apicver = io_apic_get_version(idx);
920
	
926
	
Lines 927-932 void __init mp_register_ioapic ( Link Here
927
	mp_ioapic_routing[idx].gsi_end = gsi_base + 
933
	mp_ioapic_routing[idx].gsi_end = gsi_base + 
928
		io_apic_get_redir_entries(idx);
934
		io_apic_get_redir_entries(idx);
929
935
936
	nr_ioapics++;
930
	printk("IOAPIC[%d]: apic_id %d, version %d, address 0x%lx, "
937
	printk("IOAPIC[%d]: apic_id %d, version %d, address 0x%lx, "
931
		"GSI %d-%d\n", idx, mp_ioapics[idx].mpc_apicid, 
938
		"GSI %d-%d\n", idx, mp_ioapics[idx].mpc_apicid, 
932
		mp_ioapics[idx].mpc_apicver, mp_ioapics[idx].mpc_apicaddr,
939
		mp_ioapics[idx].mpc_apicver, mp_ioapics[idx].mpc_apicaddr,

Return to bug 121955