From bb4e6e85daa52a9f6210fa06a5ec6269598a202b Mon Sep 17 00:00:00 2001 From: David S. Miller Date: Sat, 27 Sep 2014 11:05:21 -0700 Subject: sparc64: Adjust vmalloc region size based upon available virtual address bits. In order to accomodate embedded per-cpu allocation with large numbers of cpus and numa nodes, we have to use as much virtual address space as possible for the vmalloc region. Otherwise we can get things like: PERCPU: max_distance=0x380001c10000 too large for vmalloc space 0xff00000000 So, once we select a value for PAGE_OFFSET, derive the size of the vmalloc region based upon that. Signed-off-by: David S. Miller Acked-by: Bob Picco --- arch/sparc/include/asm/page_64.h | 1 - arch/sparc/include/asm/pgtable_64.h | 9 +++++---- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'arch/sparc/include') diff --git a/arch/sparc/include/asm/page_64.h b/arch/sparc/include/asm/page_64.h index 6784a3382826..8c2a8c937540 100644 --- a/arch/sparc/include/asm/page_64.h +++ b/arch/sparc/include/asm/page_64.h @@ -117,7 +117,6 @@ extern unsigned long sparc64_va_hole_bottom; #include -#define PAGE_OFFSET_BY_BITS(X) (-(_AC(1,UL) << (X))) extern unsigned long PAGE_OFFSET; #endif /* !(__ASSEMBLY__) */ diff --git a/arch/sparc/include/asm/pgtable_64.h b/arch/sparc/include/asm/pgtable_64.h index 0552957f6ddc..c0939228e4b1 100644 --- a/arch/sparc/include/asm/pgtable_64.h +++ b/arch/sparc/include/asm/pgtable_64.h @@ -40,10 +40,7 @@ #define LOW_OBP_ADDRESS _AC(0x00000000f0000000,UL) #define HI_OBP_ADDRESS _AC(0x0000000100000000,UL) #define VMALLOC_START _AC(0x0000000100000000,UL) -#define VMALLOC_END _AC(0x0000010000000000,UL) -#define VMEMMAP_BASE _AC(0x0000010000000000,UL) - -#define vmemmap ((struct page *)VMEMMAP_BASE) +#define VMEMMAP_BASE VMALLOC_END /* PMD_SHIFT determines the size of the area a second-level page * table can map @@ -81,6 +78,10 @@ #ifndef __ASSEMBLY__ +extern unsigned long VMALLOC_END; + +#define vmemmap ((struct page *)VMEMMAP_BASE) + #include bool kern_addr_valid(unsigned long addr); -- cgit v1.2.3-55-g7522