Then sepertate that into init_amd and init_intel.
YH
-----Original Message-----
From: James Cleverdon [mailto:[email protected]]
Sent: Friday, January 07, 2005 4:13 PM
To: YhLu
Cc: Andi Kleen; Matt Domsch; [email protected];
[email protected]; [email protected]
Subject: Re: 256 apic id for amd64
Clustered APIC systems need the phys_proc_id to come from the APIC ID
register. Intel prefers that non-clustered systems get their
phys_proc_id from the cpuid opcode.
So, using c->x86_apicid is unlikely to satisfy both parties.
On Friday 07 January 2005 04:04 pm, YhLu wrote:
> arch/x86_64/kernel/setup.c
>
> static void __init detect_ht(struct cpuinfo_x86 *c)
>
> phys_proc_id[cpu] = phys_pkg_id(index_msb);
>
> --->
> Phy_proc_id[cpu] = cpu_to_node[cpu];
> Or
> // that is initial apicid
> phys_proc_id[cpu] = c->x86_apicid >>
> hweight32(c->x86_num_cores - 1);
>
> YH
>
> -----Original Message-----
> From: Andi Kleen [mailto:[email protected]]
> Sent: Friday, January 07, 2005 2:18 PM
> To: YhLu
> Cc: Matt Domsch; [email protected]; [email protected];
> [email protected]; [email protected]
> Subject: Re: 256 apic id for amd64
>
> On Fri, Jan 07, 2005 at 01:44:19PM -0800, YhLu wrote:
> > Can you consider to use c->x86_apicid to get phy_proc_id, that is
> > initial apicid.?
>
> Where?
>
> -Andi
--
James Cleverdon
IBM LTC (xSeries Linux Solutions)
{jamesclv(Unix, preferred), cleverdj(Notes)} at us dot ibm dot comm
Already done, although not dividing along AMD vs. Intel lines.
phys_pkg_id() indirects through the subarch table. See
genapic_cluster.c and genapic_flat.c for details.
We may need a third subarch for AMD's Extended APIC mode boxes.
Can you suggest some heuristics for detecting such a system and
discerning it from a clustered APIC box? (Hopefully, without using MPS
or ACPI table ID string lookups.)
On Friday 07 January 2005 04:28 pm, YhLu wrote:
> Then sepertate that into init_amd and init_intel.
>
> YH
>
> -----Original Message-----
> From: James Cleverdon [mailto:[email protected]]
> Sent: Friday, January 07, 2005 4:13 PM
> To: YhLu
> Cc: Andi Kleen; Matt Domsch; [email protected];
> [email protected]; [email protected]
> Subject: Re: 256 apic id for amd64
>
> Clustered APIC systems need the phys_proc_id to come from the APIC ID
> register. Intel prefers that non-clustered systems get their
> phys_proc_id from the cpuid opcode.
>
> So, using c->x86_apicid is unlikely to satisfy both parties.
>
> On Friday 07 January 2005 04:04 pm, YhLu wrote:
> > arch/x86_64/kernel/setup.c
> >
> > static void __init detect_ht(struct cpuinfo_x86 *c)
> >
> > phys_proc_id[cpu] = phys_pkg_id(index_msb);
> >
> > --->
> > Phy_proc_id[cpu] = cpu_to_node[cpu];
> > Or
> > // that is initial apicid
> > phys_proc_id[cpu] = c->x86_apicid >>
> > hweight32(c->x86_num_cores - 1);
> >
> > YH
> >
> > -----Original Message-----
> > From: Andi Kleen [mailto:[email protected]]
> > Sent: Friday, January 07, 2005 2:18 PM
> > To: YhLu
> > Cc: Matt Domsch; [email protected]; [email protected];
> > [email protected]; [email protected]
> > Subject: Re: 256 apic id for amd64
> >
> > On Fri, Jan 07, 2005 at 01:44:19PM -0800, YhLu wrote:
> > > Can you consider to use c->x86_apicid to get phy_proc_id, that is
> > > initial apicid.?
> >
> > Where?
> >
> > -Andi
--
James Cleverdon
IBM LTC (xSeries Linux Solutions)
{jamesclv(Unix, preferred), cleverdj(Notes)} at us dot ibm dot comm
On Fri, Jan 07, 2005 at 04:26:57PM -0800, James Cleverdon wrote:
> Already done, although not dividing along AMD vs. Intel lines.
> phys_pkg_id() indirects through the subarch table. See
> genapic_cluster.c and genapic_flat.c for details.
>
> We may need a third subarch for AMD's Extended APIC mode boxes.
I'm not convinced we do. Things seem to work with BSP APIC-ID = 0.
Is there any real reason to not just require that?
>
> Can you suggest some heuristics for detecting such a system and
> discerning it from a clustered APIC box? (Hopefully, without using MPS
> or ACPI table ID string lookups.)
Early PCI scan would work in the worst case. All Opterons have a builtin
northbridge with a specific ID. There is already other code that
checks for these.
-Andi