diff options
author | David S. Miller <davem@davemloft.net> | 2014-09-25 00:49:29 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-10-05 19:53:40 -0400 |
commit | 7c0fa0f24bb76ce3d67be7f737b799846a04570f (patch) | |
tree | 5383bc77f280dc29c5cc422cae89283c6fcb8690 /arch/sparc | |
parent | c06240c7f5c39c83dfd7849c0770775562441b96 (diff) |
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: David S. Miller <davem@davemloft.net>
Acked-by: Bob Picco <bob.picco@oracle.com>
Diffstat (limited to 'arch/sparc')
-rw-r--r-- | arch/sparc/include/asm/page_64.h | 8 | ||||
-rw-r--r-- | arch/sparc/include/asm/pgtable_64.h | 4 | ||||
-rw-r--r-- | arch/sparc/mm/init_64.c | 9 |
3 files changed, 16 insertions, 5 deletions
diff --git a/arch/sparc/include/asm/page_64.h b/arch/sparc/include/asm/page_64.h index 732ba178a289..6784a3382826 100644 --- a/arch/sparc/include/asm/page_64.h +++ b/arch/sparc/include/asm/page_64.h | |||
@@ -122,11 +122,11 @@ extern unsigned long PAGE_OFFSET; | |||
122 | 122 | ||
123 | #endif /* !(__ASSEMBLY__) */ | 123 | #endif /* !(__ASSEMBLY__) */ |
124 | 124 | ||
125 | /* The maximum number of physical memory address bits we support, this | 125 | /* The maximum number of physical memory address bits we support. The |
126 | * is used to size various tables used to manage kernel TLB misses and | 126 | * largest value we can support is whatever "KPGD_SHIFT + KPTE_BITS" |
127 | * also the sparsemem code. | 127 | * evaluates to. |
128 | */ | 128 | */ |
129 | #define MAX_PHYS_ADDRESS_BITS 47 | 129 | #define MAX_PHYS_ADDRESS_BITS 53 |
130 | 130 | ||
131 | #define ILOG2_4MB 22 | 131 | #define ILOG2_4MB 22 |
132 | #define ILOG2_256MB 28 | 132 | #define ILOG2_256MB 28 |
diff --git a/arch/sparc/include/asm/pgtable_64.h b/arch/sparc/include/asm/pgtable_64.h index a305b22ab581..0552957f6ddc 100644 --- a/arch/sparc/include/asm/pgtable_64.h +++ b/arch/sparc/include/asm/pgtable_64.h | |||
@@ -67,6 +67,10 @@ | |||
67 | #define PGDIR_MASK (~(PGDIR_SIZE-1)) | 67 | #define PGDIR_MASK (~(PGDIR_SIZE-1)) |
68 | #define PGDIR_BITS (PAGE_SHIFT - 3) | 68 | #define PGDIR_BITS (PAGE_SHIFT - 3) |
69 | 69 | ||
70 | #if (MAX_PHYS_ADDRESS_BITS > PGDIR_SHIFT + PGDIR_BITS) | ||
71 | #error MAX_PHYS_ADDRESS_BITS exceeds what kernel page tables can support | ||
72 | #endif | ||
73 | |||
70 | #if (PGDIR_SHIFT + PGDIR_BITS) != 53 | 74 | #if (PGDIR_SHIFT + PGDIR_BITS) != 53 |
71 | #error Page table parameters do not cover virtual address space properly. | 75 | #error Page table parameters do not cover virtual address space properly. |
72 | #endif | 76 | #endif |
diff --git a/arch/sparc/mm/init_64.c b/arch/sparc/mm/init_64.c index 6d5d562a652e..e0c1206a44fa 100644 --- a/arch/sparc/mm/init_64.c +++ b/arch/sparc/mm/init_64.c | |||
@@ -1690,12 +1690,19 @@ static void __init setup_page_offset(void) | |||
1690 | case SUN4V_CHIP_NIAGARA4: | 1690 | case SUN4V_CHIP_NIAGARA4: |
1691 | case SUN4V_CHIP_NIAGARA5: | 1691 | case SUN4V_CHIP_NIAGARA5: |
1692 | case SUN4V_CHIP_SPARC64X: | 1692 | case SUN4V_CHIP_SPARC64X: |
1693 | default: | 1693 | case SUN4V_CHIP_SPARC_M6: |
1694 | /* T4 and later support 52-bit virtual addresses. */ | 1694 | /* T4 and later support 52-bit virtual addresses. */ |
1695 | sparc64_va_hole_top = 0xfff8000000000000UL; | 1695 | sparc64_va_hole_top = 0xfff8000000000000UL; |
1696 | sparc64_va_hole_bottom = 0x0008000000000000UL; | 1696 | sparc64_va_hole_bottom = 0x0008000000000000UL; |
1697 | max_phys_bits = 47; | 1697 | max_phys_bits = 47; |
1698 | break; | 1698 | break; |
1699 | case SUN4V_CHIP_SPARC_M7: | ||
1700 | default: | ||
1701 | /* M7 and later support 52-bit virtual addresses. */ | ||
1702 | sparc64_va_hole_top = 0xfff8000000000000UL; | ||
1703 | sparc64_va_hole_bottom = 0x0008000000000000UL; | ||
1704 | max_phys_bits = 49; | ||
1705 | break; | ||
1699 | } | 1706 | } |
1700 | } | 1707 | } |
1701 | 1708 | ||