Skip to contentSkip to conversation

sparc64: Define PAGE_OFFSET in terms of physical address bits.

PATCH In review David Miller 2 participants 2 messages Sep 21, 2013 – Sep 22, 2013 SPARC + UltraSPARC (sparc/sparc64)

lore
Share & tools
lore

David Miller

author maintainer
#0 lore raw

PATCH 3/6 sparc64: Define PAGE_OFFSET in terms of physical address bits.

This makes clearer the implications for a given choosen value.

Based upon patches by Bob Picco.

---
 arch/sparc/include/asm/page_64.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
arch/sparc/include/asm/page_64.h +3 -1
index d959312..9dd0f73 100644
@@ -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__
 
Signature · 1 line
1.8.1.2