sparc64: Define PAGE_OFFSET in terms of physical address bits.
authorDavid S. Miller <davem@davemloft.net>
Wed, 18 Sep 2013 21:22:34 +0000 (14:22 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 12 Nov 2013 23:22:33 +0000 (15:22 -0800)
This makes clearer the implications for a given choosen
value.

Based upon patches by Bob Picco.

Signed-off-by: David S. Miller <davem@davemloft.net>
Acked-by: Bob Picco <bob.picco@oracle.com>
arch/sparc/include/asm/page_64.h

index d95931247feb2dd8292f9f95ec014987fe0c743e..9dd0f7360822f4c302d6c4a4b85df101af80cb88 100644 (file)
@@ -117,7 +117,9 @@ typedef pte_t *pgtable_t;
 /* We used to stick this into a hard-coded global register (%g4)
  * but that does not make sense anymore.
  */
-#define PAGE_OFFSET            _AC(0xFFFFF80000000000,UL)
+#define MAX_SUPPORTED_PA_BITS  43
+#define PAGE_OFFSET_BY_BITS(X) (-(_AC(1,UL) << (X)))
+#define PAGE_OFFSET            PAGE_OFFSET_BY_BITS(MAX_SUPPORTED_PA_BITS)
 
 #ifndef __ASSEMBLY__