lkml.org 
[lkml]   [2011]   [Feb]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 10/26] x86-64, NUMA: Move apicid to numa mapping initialization from amd_scan_nodes() to amd_numa_init()
Hello, Cyrill.

On Tue, Feb 15, 2011 at 01:59:26AM +0300, Cyrill Gorcunov wrote:
> >+ /* get the APIC ID of the BSP early for systems with apicid lifting */
> >+ early_get_boot_cpu_id();
> >+ if (boot_cpu_physical_apicid> 0) {
> >+ pr_info("BSP APIC ID: %02x\n", boot_cpu_physical_apicid);
> >+ apicid_base = boot_cpu_physical_apicid;
> ^^^
> >+ }
> >+
> >+ for_each_node_mask(i, cpu_nodes_parsed)
> >+ for (j = apicid_base; j< cores + apicid_base; j++)
> >+ set_apicid_to_node((i<< bits) + j, i);
> >+
> > return 0;
> > }
> >
>
> Hi Tejun, while you at it, it seems apicid_base conditional assignment is
> redundant here (boot_cpu_physical_apicid is unsigned int) so we might have
> something like
>
> apicid_start = boot_cpu_physical_apicid;
> apicid_end = apicid_start + cores;
>
> for_each_node_mask(i, cpu_nodes_parsed) {
> for (j = apicid_start; j < apicid_end; j++)
> set_apicid_to_node((i << bits) + j, i);
> }

Right, I think the intention there was

if (boot_cpu_physical_apicid == -1U)

because that's the initial value and we don't really want to index the
apicid nid table with -1U. Care to send a patch? I'm gonna have to
rebase anyway and can put the patch at the front.

Thanks.

--
tejun


\
 
 \ /
  Last update: 2011-02-15 10:39    [W:0.106 / U:3.164 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site