summaryrefslogtreecommitdiffstats
path: root/include/asm-mips64
diff options
context:
space:
mode:
authorKanoj Sarcar <kanoj@engr.sgi.com>2000-02-10 07:28:35 +0000
committerKanoj Sarcar <kanoj@engr.sgi.com>2000-02-10 07:28:35 +0000
commitccd309e0011c2343f720b04f2b3fa2b1c2b3e530 (patch)
tree39df413f3b162ba9ca13ad11cfee09f38c7064bf /include/asm-mips64
parent1f41140cdc718accc9b0eb15fda56c9aa3ce3025 (diff)
Header file cleanup: put basic defines into sn/arch.h.
Diffstat (limited to 'include/asm-mips64')
-rw-r--r--include/asm-mips64/mmzone.h7
-rw-r--r--include/asm-mips64/sn/arch.h15
2 files changed, 17 insertions, 5 deletions
diff --git a/include/asm-mips64/mmzone.h b/include/asm-mips64/mmzone.h
index 227bec969..9df5dc0b5 100644
--- a/include/asm-mips64/mmzone.h
+++ b/include/asm-mips64/mmzone.h
@@ -8,8 +8,6 @@
#include <asm/sn/addrs.h>
#include <asm/sn/arch.h>
-extern cnodeid_t nasid_to_compact_node[]; /* to sn/arch.h */
-
typedef struct plat_pglist_data {
pg_data_t gendata;
unsigned long physstart;
@@ -21,9 +19,8 @@ typedef struct plat_pglist_data {
* Following are macros that are specific to this numa platform.
*/
-extern pg_data_t node_data[];
-extern plat_pg_data_t plat_node_data[];
extern int numa_debug(void);
+extern plat_pg_data_t plat_node_data[];
#define PHYSADDR_TO_NID(pa) NASID_TO_COMPACT_NODEID(NASID_GET(pa))
#define PLAT_NODE_DATA(n) (plat_node_data + (n))
@@ -52,7 +49,7 @@ extern int numa_debug(void);
/*
* Return a pointer to the node data for node n.
*/
-#define NODE_DATA(n) (&((plat_node_data + (n))->gendata))
+#define NODE_DATA(n) (&((PLAT_NODE_DATA(n))->gendata))
/*
* NODE_MEM_MAP gives the kaddr for the mem_map of the node.
diff --git a/include/asm-mips64/sn/arch.h b/include/asm-mips64/sn/arch.h
index b711a28a8..c1c001ed5 100644
--- a/include/asm-mips64/sn/arch.h
+++ b/include/asm-mips64/sn/arch.h
@@ -45,6 +45,13 @@ typedef u64 nic_t;
#define INVALID_PARTID (partid_t)-1
extern nasid_t get_nasid(void);
+/*
+ * NO ONE should access these arrays directly. The only reason we refer to
+ * them here is to avoid the procedure call that would be required in the
+ * macros below. (Really want private data members here :-)
+ */
+extern cnodeid_t nasid_to_compact_node[MAX_NASIDS];
+extern nasid_t compact_to_nasid_node[MAX_COMPACT_NODES];
/*
* These macros are used by various parts of the kernel to convert
@@ -91,4 +98,12 @@ extern int node_getlastslot(cnodeid_t);
#define NODE_MAX_MEM_SIZE SLOT_SIZE * MAX_MEM_SLOTS
#endif /* SABLE */
+/*
+ * New stuff in here from Irix sys/pfdat.h.
+ */
+#define SLOT_PFNSHIFT (SLOT_SHIFT - PAGE_SHIFT)
+#define PFN_NASIDSHFT (NASID_SHFT - PAGE_SHIFT)
+#define mkpfn(nasid, off) (((pfn_t)(nasid) << PFN_NASIDSHFT) | (off))
+#define slot_getbasepfn(node,slot) \
+ (mkpfn(COMPACT_TO_NASID_NODEID(node), slot<<SLOT_PFNSHIFT))
#endif /* _ASM_SN_ARCH_H */