Skip to contentSkip to conversation

256 apic id for amd64

DISCUSSION Andi Kleen 2 participants 4 messages Jan 10, 2005 – Jan 11, 2005

lore
Share & tools
lore

Andi Kleen

author
#0 lore raw
Quoted 7 lines · Yinghai Lu

Resend

Andi,

I want to repeat the request:
Please consider to compute the phy_proc_id with x86_apicid (or the initial apic id).

Not sure what you want me to do exactly.

The phys_proc_id[] array? First that isn't really used for anything and then it is filled from CPUID 1 anyways. Or phys_pkg_id()? That uses cpuid too.

If you think something is wrong best you send a patch that makes it clear what you're talking about.

Quoted 10 lines

The reason is
Phy_proc_id will be used in smpboot.c to produce cpu_siblings_map.

The two systems I mentioned really exist.
System 1. 8 ways dual core opteron system and with 3 io apic. System 2. 4 ways dual core opteron system and with 15 io apic (7 amd 8131 and 1 amd 8111).

We have to lift the apicid of cpus to make io apic to use 0-15.

I don't understand why you want to do that. The IO-APIC and the local APIC ID space should separate as far as I know, so you could use 0 for both a CPU and an IO-APIC. But in theory it should work anyways even with an BSP CPU ID != 0.

Quoted 8 lines

Case 1: lift core0/node0 to use 16, and core1/node0 to use 17..... Case 2: core0/node0-->0, core1/node0-->1, core0/node1-->18, core1/node1-->19...
Case 3: core0/node0-->0, core1/node0-->17, core0/node1-->18, core1/node1-->19...

Case 1 will make jiffies not happy and it will hang on calibrate_dalay. ( jiffies is not changing).

That's because it needs physical APIC mode to handle CPU IDs >7, and that is
not implemented in the flat case. I added it now, but you likely don't need
it anyways.

-Andi

#1 lore raw

YH, I suggest you root cause the exact issue and if it turns out to be a platform issue, then we can have a kernel workaround for that specific platform. As Andi mentioned, we don't have any kernel limitations with BSP apicid != 0.

Quoted 7 lines · Andi Kleen
Quoted 6 lines · Yinghai Lu

Case 1: lift core0/node0 to use 16, and core1/node0 to use 17..... Case 2: core0/node0-->0, core1/node0-->1, core0/node1-->18, core1/node1-->19...
Case 3: core0/node0-->0, core1/node0-->17, core0/node1-->18, core1/node1-->19...

Quoted 6 lines
Quoted 2 lines

Case 1 will make jiffies not happy and it will hang on calibrate_dalay. ( jiffies is not changing).

That's because it needs physical APIC mode to handle CPU IDs >7, and that is
not implemented in the flat case. I added it now, but you likely don't need
it anyways.

Andi, we don't need physical APIC mode just to handle CPU APIC ID's > 7 when the total number of cpu's in the system is < 8. Right?

thanks,
suresh

author
#2 lore raw
Quoted 2 lines · Suresh B

Andi, we don't need physical APIC mode just to handle CPU APIC ID's > 7 when the total number of cpu's in the system is < 8. Right?

Yes, cutoff point is 8, not 7, agreed.

-Andi

author
#3 lore raw
In reply to Siddha, Suresh B
Quoted 7 lines · Yinghai Lu

Actually It seems the Opteron System with Nvidia chip set can lift the bsp (core0/node0) to 0x10, and the jiffies is still changing in for CPU0. I try to enable the 8259 PIC in SB, it will cause the jiffies not changing. At the same time in the AMD 8111 SB MB, the 8259 PIC is default enabled, So after I lift the APIC id, it will stop jiffies. The problem is after I disable the 8259 in amd8111, it will cause other booting problem. maybe the io-apic is not enabled properly.

There is code that assumes all legacy interrupts (that includes the timer) are routed to IO-APIC #0. I still didn't get quite why you want to change that anyways.

-Andi