View Incident: http://co-op.engr.sgi.com/BugWorks/query.cgi/905415

Status: open                          Priority: 3                           
Assigned Engineer: djh                Submitter: steiner                    
Assigned Group: linux-kernel          Project: communitylinux               
Opened Date: 11/26/03                 Description:

The definition of pxm_to_nasid() is wrong in the 2.6 tree. 

In 2.6 the definition is:
	#define  ((pxm)<<1)

In 2.3, the correct definition is:
	#define  (((pxm)<<1) | (get_nasid() & ~0x1ff))

The upper bits of the nasid from the running cpu must be preserved because
pxm only has the low bits of the nasid (pxm is a byte - nasid is 11 bits).

In LBS 2.4, the function is different. When we merge the latest 2.4 code
into 2.6, pxm_to_nasid() should be ok. In the interim, if you run on
a system with > 512 nasids, you will need to fix your definition
of pxm_to_nasid().


Jesse - can you fix this in your tree.

--- linux_base/arch/ia64/sn/kernel/setup.c      Tue Nov 25 10:03:46 2003
+++ linux/arch/ia64/sn/kernel/setup.c   Wed Nov 26 11:11:02 2003
@@ -50,7 +50,7 @@
 
 DEFINE_PER_CPU(struct pda_s, pda_percpu);
 
-#define pxm_to_nasid(pxm) ((pxm)<<1)
+#define pxm_to_nasid(pxm) (((pxm)<<1) | (get_nasid() & ~0x1ff))
 
 #define MAX_PHYS_MEMORY                (1UL << 49)     /* 1 TB */
