This is a note to let you know that I've just added the patch titled sparc64: Increase MAX_PHYS_ADDRESS_BITS to 53. to the 3.17-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: sparc64-increase-max_phys_address_bits-to-53.patch and it can be found in the queue-3.17 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From foo@baz Tue Oct 28 11:21:07 CST 2014 From: "David S. Miller" <davem@xxxxxxxxxxxxx> Date: Wed, 24 Sep 2014 21:49:29 -0700 Subject: sparc64: Increase MAX_PHYS_ADDRESS_BITS to 53. From: "David S. Miller" <davem@xxxxxxxxxxxxx> 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@xxxxxxxxxxxxx> Acked-by: Bob Picco <bob.picco@xxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- arch/sparc/include/asm/page_64.h | 8 ++++---- arch/sparc/include/asm/pgtable_64.h | 4 ++++ arch/sparc/mm/init_64.c | 9 ++++++++- 3 files changed, 16 insertions(+), 5 deletions(-) --- 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; #endif /* !(__ASSEMBLY__) */ -/* The maximum number of physical memory address bits we support, this - * is used to size various tables used to manage kernel TLB misses and - * also the sparsemem code. +/* The maximum number of physical memory address bits we support. The + * largest value we can support is whatever "KPGD_SHIFT + KPTE_BITS" + * evaluates to. */ -#define MAX_PHYS_ADDRESS_BITS 47 +#define MAX_PHYS_ADDRESS_BITS 53 #define ILOG2_4MB 22 #define ILOG2_256MB 28 --- a/arch/sparc/include/asm/pgtable_64.h +++ b/arch/sparc/include/asm/pgtable_64.h @@ -67,6 +67,10 @@ #define PGDIR_MASK (~(PGDIR_SIZE-1)) #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 #error Page table parameters do not cover virtual address space properly. #endif --- a/arch/sparc/mm/init_64.c +++ b/arch/sparc/mm/init_64.c @@ -1690,12 +1690,19 @@ static void __init setup_page_offset(voi case SUN4V_CHIP_NIAGARA4: case SUN4V_CHIP_NIAGARA5: case SUN4V_CHIP_SPARC64X: - default: + case SUN4V_CHIP_SPARC_M6: /* T4 and later support 52-bit virtual addresses. */ sparc64_va_hole_top = 0xfff8000000000000UL; sparc64_va_hole_bottom = 0x0008000000000000UL; max_phys_bits = 47; 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; } } Patches currently in stable-queue which might be from davem@xxxxxxxxxxxxx are queue-3.17/sparc64-adjust-vmalloc-region-size-based-upon-available-virtual-address-bits.patch queue-3.17/sparc64-fix-fpu-register-corruption-with-aes-crypto-offload.patch queue-3.17/sparc64-move-request_irq-from-ldc_bind-to-ldc_alloc.patch queue-3.17/sparc32-dma_alloc_coherent-must-honour-gfp-flags.patch queue-3.17/sparc64-kill-unnecessary-tables-and-increase-max_banks.patch queue-3.17/sparc-let-memset-return-the-address-argument.patch queue-3.17/sparc64-use-kernel-page-tables-for-vmemmap.patch queue-3.17/sparc64-sparse-irq.patch queue-3.17/sparc64-fix-physical-memory-management-regressions-with-large-max_phys_bits.patch queue-3.17/sparc64-fix-lockdep-warnings-on-reboot-on-ultra-5.patch queue-3.17/sparc64-switch-to-4-level-page-tables.patch queue-3.17/sparc64-sun4v-tlb-error-power-off-events.patch queue-3.17/sparc64-increase-size-of-boot-string-to-1024-bytes.patch queue-3.17/sparc64-find_node-adjustment.patch queue-3.17/sparc64-fix-reversed-start-end-in-flush_tlb_kernel_range.patch queue-3.17/sparc64-increase-max_phys_address_bits-to-53.patch queue-3.17/sparc64-define-va-hole-at-run-time-rather-than-at-compile-time.patch queue-3.17/sparc64-fix-register-corruption-in-top-most-kernel-stack-frame-during-boot.patch queue-3.17/sparc64-support-m6-and-m7-for-building-cpu-distribution-map.patch queue-3.17/sparc64-cpu-hardware-caps-support-for-sparc-m6-and-m7.patch queue-3.17/sparc64-do-not-define-thread-fpregs-save-area-as-zero-length-array.patch queue-3.17/sparc64-t5-pmu.patch queue-3.17/sparc64-adjust-ktsb-assembler-to-support-larger-physical-addresses.patch queue-3.17/sparc64-implement-__get_user_pages_fast.patch queue-3.17/sparc64-fix-corrupted-thread-fault-code.patch queue-3.17/sparc64-fix-hibernation-code-refrence-to-page_offset.patch queue-3.17/sparc64-correctly-recognise-m6-and-m7-cpu-type.patch -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html