Patchwork [3/9] sparc64: Define PAGE_OFFSET in terms of physical address bits.

login
register
mail settings
Submitter David Miller
Date Sept. 30, 2013, 4:31 p.m.
Message ID <20130930.123147.2184661331750783415.davem@davemloft.net>
Download mbox | patch
Permalink /patch/279193/
State Changes Requested
Delegated to: David Miller
Headers show

Comments

David Miller - Sept. 30, 2013, 4:31 p.m.
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 | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Patch

diff --git a/arch/sparc/include/asm/page_64.h b/arch/sparc/include/asm/page_64.h
index d959312..9dd0f73 100644
--- a/arch/sparc/include/asm/page_64.h
+++ b/arch/sparc/include/asm/page_64.h
@@ -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__