All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jesse Barnes <jbarnes@sgi.com>
To: linux-ia64@vger.kernel.org
Subject: [Linux-ia64] [PATCH] Another SN update [1/2]
Date: Mon, 24 Feb 2003 22:12:11 +0000	[thread overview]
Message-ID: <marc-linux-ia64-105590709805922@msgid-missing> (raw)

Here's an update to the ia64 mmzone.h file that adds some SN2 specific
defines (which will probably have to be changed later, but it's a
start).

Thanks,
Jesse

--- linux-2.5.60-ia64/include/asm-ia64/mmzone.h	Mon Feb 10 10:39:17 2003
+++ linux-2.5.60-ia64-sn/include/asm-ia64/mmzone.h	Mon Feb 24 12:32:26 2003
@@ -76,7 +76,7 @@
 
 #define pfn_to_page(pfn)	(struct page *)(node_mem_map(pfn_to_nid(pfn)) + node_localnr(pfn, pfn_to_nid(pfn)))
 
-#define pfn_to_nid(pfn)		 local_node_data->node_id_map[(pfn << PAGE_SHIFT) >> DIG_BANKSHIFT]
+#define pfn_to_nid(pfn)		 local_node_data->node_id_map[(pfn << PAGE_SHIFT) >> BANKSHIFT]
 
 #define page_to_pfn(page)	(long)((page - page_zone(page)->zone_mem_map) + page_zone(page)->zone_start_pfn)
 
@@ -110,15 +110,15 @@
  */
 #define NR_BANKS_PER_NODE	32
 #if defined(CONFIG_IA64_NODESIZE_16GB)
-# define DIG_BANKSHIFT		29
+# define BANKSHIFT		29
 #elif defined(CONFIG_IA64_NODESIZE_64GB)
-# define DIG_BANKSHIFT		31
+# define BANKSHIFT		31
 #elif defined(CONFIG_IA64_NODESIZE_256GB)
-# define DIG_BANKSHIFT		33
+# define BANKSHIFT		33
 #else
 # error Unsupported bank and nodesize!
 #endif
-#define BANKSIZE		(1UL << DIG_BANKSHIFT)
+#define BANKSIZE		(1UL << BANKSHIFT)
 #define BANK_OFFSET(addr)	((unsigned long)(addr) & (BANKSIZE-1))
 #define NR_BANKS		(NR_BANKS_PER_NODE * NR_NODES)
 
@@ -134,7 +134,30 @@
  * entry for the first page of the bank.
  */
 #define BANK_MEM_MAP_INDEX(kaddr) \
-	(((unsigned long)(kaddr) & (MAX_PHYS_MEMORY-1)) >> DIG_BANKSHIFT)
+	(((unsigned long)(kaddr) & (MAX_PHYS_MEMORY-1)) >> BANKSHIFT)
+
+#elif defined(CONFIG_IA64_SGI_SN2)
+/*
+ * SGI SN2 discontig definitions
+ */
+#define MAX_PHYSNODE_ID	2048	/* 2048 node ids (also called nasid) */
+#define NR_NODES	128	/* Maximum number of nodes in SSI */
+#define MAX_PHYS_MEMORY	(1UL << 49)
+
+#define BANKSHIFT		38
+#define NR_BANKS_PER_NODE	4
+#define SN2_NODE_SIZE		(64UL*1024*1024*1024)	/* 64GB per node */
+#define BANKSIZE		(SN2_NODE_SIZE/NR_BANKS_PER_NODE)
+#define BANK_OFFSET(addr)	((unsigned long)(addr) & (BANKSIZE-1))
+#define NR_BANKS		(NR_BANKS_PER_NODE * NR_NODES)
+#define VALID_MEM_KADDR(kaddr)	1
+
+/*
+ * Given a nodeid & a bank number, find the address of the mem_map
+ * entry for the first page of the bank.
+ */
+#define BANK_MEM_MAP_INDEX(kaddr) \
+	(((unsigned long)(kaddr) & (MAX_PHYS_MEMORY-1)) >> BANKSHIFT)
 
 #endif /* CONFIG_IA64_DIG */
 #endif /* _ASM_IA64_MMZONE_H */


                 reply	other threads:[~2003-02-24 22:12 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=marc-linux-ia64-105590709805922@msgid-missing \
    --to=jbarnes@sgi.com \
    --cc=linux-ia64@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.