Commit 7c0fa0f2 authored by David S. Miller's avatar David S. Miller

sparc64: Increase MAX_PHYS_ADDRESS_BITS to 53.

Make sure, at compile time, that the kernel can properly support
whatever MAX_PHYS_ADDRESS_BITS is defined to.

On M7 chips, use a max_phys_bits value of 49.

Based upon a patch by Bob Picco.
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Acked-by: default avatarBob Picco <bob.picco@oracle.com>
parent c06240c7
...@@ -122,11 +122,11 @@ extern unsigned long PAGE_OFFSET; ...@@ -122,11 +122,11 @@ extern unsigned long PAGE_OFFSET;
#endif /* !(__ASSEMBLY__) */ #endif /* !(__ASSEMBLY__) */
/* The maximum number of physical memory address bits we support, this /* The maximum number of physical memory address bits we support. The
* is used to size various tables used to manage kernel TLB misses and * largest value we can support is whatever "KPGD_SHIFT + KPTE_BITS"
* also the sparsemem code. * evaluates to.
*/ */
#define MAX_PHYS_ADDRESS_BITS 47 #define MAX_PHYS_ADDRESS_BITS 53
#define ILOG2_4MB 22 #define ILOG2_4MB 22
#define ILOG2_256MB 28 #define ILOG2_256MB 28
......
...@@ -67,6 +67,10 @@ ...@@ -67,6 +67,10 @@
#define PGDIR_MASK (~(PGDIR_SIZE-1)) #define PGDIR_MASK (~(PGDIR_SIZE-1))
#define PGDIR_BITS (PAGE_SHIFT - 3) #define PGDIR_BITS (PAGE_SHIFT - 3)
#if (MAX_PHYS_ADDRESS_BITS > PGDIR_SHIFT + PGDIR_BITS)
#error MAX_PHYS_ADDRESS_BITS exceeds what kernel page tables can support
#endif
#if (PGDIR_SHIFT + PGDIR_BITS) != 53 #if (PGDIR_SHIFT + PGDIR_BITS) != 53
#error Page table parameters do not cover virtual address space properly. #error Page table parameters do not cover virtual address space properly.
#endif #endif
......
...@@ -1690,12 +1690,19 @@ static void __init setup_page_offset(void) ...@@ -1690,12 +1690,19 @@ static void __init setup_page_offset(void)
case SUN4V_CHIP_NIAGARA4: case SUN4V_CHIP_NIAGARA4:
case SUN4V_CHIP_NIAGARA5: case SUN4V_CHIP_NIAGARA5:
case SUN4V_CHIP_SPARC64X: case SUN4V_CHIP_SPARC64X:
default: case SUN4V_CHIP_SPARC_M6:
/* T4 and later support 52-bit virtual addresses. */ /* T4 and later support 52-bit virtual addresses. */
sparc64_va_hole_top = 0xfff8000000000000UL; sparc64_va_hole_top = 0xfff8000000000000UL;
sparc64_va_hole_bottom = 0x0008000000000000UL; sparc64_va_hole_bottom = 0x0008000000000000UL;
max_phys_bits = 47; max_phys_bits = 47;
break; break;
case SUN4V_CHIP_SPARC_M7:
default:
/* M7 and later support 52-bit virtual addresses. */
sparc64_va_hole_top = 0xfff8000000000000UL;
sparc64_va_hole_bottom = 0x0008000000000000UL;
max_phys_bits = 49;
break;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment