Re: [RFT/PATCH]Unify mapping from pxm to node id (take 2).

From: Paul Jackson
Date: Thu Jan 26 2006 - 10:48:19 EST


This patch doesn't work for arch/ia64/sn (probably not for ia64/hp either).

The final link fails:
---------------------
arch/ia64/sn/built-in.o(.init.text+0x1c90): In function `sn_setup':
arch/ia64/sn/kernel/setup.c:151: undefined reference to `nid_to_pxm_map'
arch/ia64/sn/built-in.o(.init.text+0x1c91):arch/ia64/sn/kernel/setup.c:155: undefined reference to `pxm_to_nid_map'
arch/ia64/sn/built-in.o(.init.text+0x1ca0):arch/ia64/sn/kernel/setup.c:151: undefined reference to `nid_to_pxm_map'
arch/ia64/sn/built-in.o(.init.text+0x1cb0):arch/ia64/sn/kernel/setup.c:155: undefined reference to `pxm_to_nid_map'

It looks like you removed the definitions of pxm_to_nid_map and nid_to_pxm_map,
but did not remove all the uses. I recommend when removing global kernel
symbols that one grep all the kernel files for other uses.

A grep of the kernel (in Andrew's 2.6.16-rc1-mm3 quilt stack, just
after this patch and its first fix are applied) shows:

$ grep -rEIw pxm_to_nid_map\|nid_to_pxm_map * | grep -vE patches\|System.map
arch/i386/kernel/srat.c: u8 nid_to_pxm_map[MAX_NUMNODES];/* logical node ID to _PXM map */
arch/ia64/hp/common/sba_iommu.c: node = pxm_to_nid_map[pxm];
arch/ia64/sn/kernel/setup.c: nid = pxm_to_nid_map[pxm];
arch/ia64/sn/kernel/setup.c: nasid = pxm_to_nasid(nid_to_pxm_map[node]);
include/asm-ia64/acpi.h:extern int __devinitdata pxm_to_nid_map[MAX_PXM_DOMAINS];
include/asm-ia64/acpi.h:extern int __initdata nid_to_pxm_map[MAX_NUMNODES];

>From the above, I presume that arch/ia64/hp is broken, along with
arch/ia64/sn. And it looks like the nid_to_pxm_map[] in srat.c
is a waste of stack space, and the two remaining externs in
asm-ia64/acpi.h should be removed.

--
I won't rest till it's the best ...
Programmer, Linux Scalability
Paul Jackson <pj@xxxxxxx> 1.925.600.0401
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/