diff options
| author | Richard Weinberger <richard@nod.at> | 2015-03-18 16:59:35 -0400 |
|---|---|---|
| committer | Richard Weinberger <richard@nod.at> | 2015-04-13 15:01:02 -0400 |
| commit | a98a6d864d3b84219a6ec6213b00c260fb52f9f4 (patch) | |
| tree | ea56c345b3547a6701ad23cba78e285569af5a88 /arch/um | |
| parent | 28fa468f53163bc0b867b4cc75a9e36e7ed4dbbd (diff) | |
um: Remove broken highmem support
Highmem was always buggy and experimental on UML(i386).
In times where 64 bit computers are default we can
remove that experimental code.
Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'arch/um')
| -rw-r--r-- | arch/um/Kconfig.um | 12 | ||||
| -rw-r--r-- | arch/um/include/asm/fixmap.h | 4 | ||||
| -rw-r--r-- | arch/um/include/asm/pgtable.h | 6 | ||||
| -rw-r--r-- | arch/um/kernel/mem.c | 66 | ||||
| -rw-r--r-- | arch/um/kernel/um_arch.c | 5 |
5 files changed, 1 insertions, 92 deletions
diff --git a/arch/um/Kconfig.um b/arch/um/Kconfig.um index ff86fbedc2fc..8c46978ff70b 100644 --- a/arch/um/Kconfig.um +++ b/arch/um/Kconfig.um | |||
| @@ -95,18 +95,6 @@ config MAGIC_SYSRQ | |||
| 95 | The keys are documented in <file:Documentation/sysrq.txt>. Don't say Y | 95 | The keys are documented in <file:Documentation/sysrq.txt>. Don't say Y |
| 96 | unless you really know what this hack does. | 96 | unless you really know what this hack does. |
| 97 | 97 | ||
| 98 | config HIGHMEM | ||
| 99 | bool "Highmem support" | ||
| 100 | depends on !64BIT && BROKEN | ||
| 101 | default n | ||
| 102 | help | ||
| 103 | This was used to allow UML to run with big amounts of memory. | ||
| 104 | Currently it is unstable, so if unsure say N. | ||
| 105 | |||
| 106 | To use big amounts of memory, it is recommended enable static | ||
| 107 | linking (i.e. CONFIG_STATIC_LINK) - this should allow the | ||
| 108 | guest to use up to 2.75G of memory. | ||
| 109 | |||
| 110 | config KERNEL_STACK_ORDER | 98 | config KERNEL_STACK_ORDER |
| 111 | int "Kernel stack size order" | 99 | int "Kernel stack size order" |
| 112 | default 1 if 64BIT | 100 | default 1 if 64BIT |
diff --git a/arch/um/include/asm/fixmap.h b/arch/um/include/asm/fixmap.h index 3094ea3c73b0..1761fd75bf13 100644 --- a/arch/um/include/asm/fixmap.h +++ b/arch/um/include/asm/fixmap.h | |||
| @@ -33,10 +33,6 @@ | |||
| 33 | * fix-mapped? | 33 | * fix-mapped? |
| 34 | */ | 34 | */ |
| 35 | enum fixed_addresses { | 35 | enum fixed_addresses { |
| 36 | #ifdef CONFIG_HIGHMEM | ||
| 37 | FIX_KMAP_BEGIN, /* reserved pte's for temporary kernel mappings */ | ||
| 38 | FIX_KMAP_END = FIX_KMAP_BEGIN+(KM_TYPE_NR*NR_CPUS)-1, | ||
| 39 | #endif | ||
| 40 | __end_of_fixed_addresses | 36 | __end_of_fixed_addresses |
| 41 | }; | 37 | }; |
| 42 | 38 | ||
diff --git a/arch/um/include/asm/pgtable.h b/arch/um/include/asm/pgtable.h index 2324b624f195..18eb9924dda3 100644 --- a/arch/um/include/asm/pgtable.h +++ b/arch/um/include/asm/pgtable.h | |||
| @@ -47,11 +47,7 @@ extern unsigned long end_iomem; | |||
| 47 | #define VMALLOC_OFFSET (__va_space) | 47 | #define VMALLOC_OFFSET (__va_space) |
| 48 | #define VMALLOC_START ((end_iomem + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1)) | 48 | #define VMALLOC_START ((end_iomem + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1)) |
| 49 | #define PKMAP_BASE ((FIXADDR_START - LAST_PKMAP * PAGE_SIZE) & PMD_MASK) | 49 | #define PKMAP_BASE ((FIXADDR_START - LAST_PKMAP * PAGE_SIZE) & PMD_MASK) |
| 50 | #ifdef CONFIG_HIGHMEM | 50 | #define VMALLOC_END (FIXADDR_START-2*PAGE_SIZE) |
| 51 | # define VMALLOC_END (PKMAP_BASE-2*PAGE_SIZE) | ||
| 52 | #else | ||
| 53 | # define VMALLOC_END (FIXADDR_START-2*PAGE_SIZE) | ||
| 54 | #endif | ||
| 55 | #define MODULES_VADDR VMALLOC_START | 51 | #define MODULES_VADDR VMALLOC_START |
| 56 | #define MODULES_END VMALLOC_END | 52 | #define MODULES_END VMALLOC_END |
| 57 | #define MODULES_LEN (MODULES_VADDR - MODULES_END) | 53 | #define MODULES_LEN (MODULES_VADDR - MODULES_END) |
diff --git a/arch/um/kernel/mem.c b/arch/um/kernel/mem.c index 8636e905426f..b2a2dff50b4e 100644 --- a/arch/um/kernel/mem.c +++ b/arch/um/kernel/mem.c | |||
| @@ -38,19 +38,6 @@ int kmalloc_ok = 0; | |||
| 38 | /* Used during early boot */ | 38 | /* Used during early boot */ |
| 39 | static unsigned long brk_end; | 39 | static unsigned long brk_end; |
| 40 | 40 | ||
| 41 | #ifdef CONFIG_HIGHMEM | ||
| 42 | static void setup_highmem(unsigned long highmem_start, | ||
| 43 | unsigned long highmem_len) | ||
| 44 | { | ||
| 45 | unsigned long highmem_pfn; | ||
| 46 | int i; | ||
| 47 | |||
| 48 | highmem_pfn = __pa(highmem_start) >> PAGE_SHIFT; | ||
| 49 | for (i = 0; i < highmem_len >> PAGE_SHIFT; i++) | ||
| 50 | free_highmem_page(&mem_map[highmem_pfn + i]); | ||
| 51 | } | ||
| 52 | #endif | ||
| 53 | |||
| 54 | void __init mem_init(void) | 41 | void __init mem_init(void) |
| 55 | { | 42 | { |
| 56 | /* clear the zero-page */ | 43 | /* clear the zero-page */ |
| @@ -67,9 +54,6 @@ void __init mem_init(void) | |||
| 67 | /* this will put all low memory onto the freelists */ | 54 | /* this will put all low memory onto the freelists */ |
| 68 | free_all_bootmem(); | 55 | free_all_bootmem(); |
| 69 | max_low_pfn = totalram_pages; | 56 | max_low_pfn = totalram_pages; |
| 70 | #ifdef CONFIG_HIGHMEM | ||
| 71 | setup_highmem(end_iomem, highmem); | ||
| 72 | #endif | ||
| 73 | max_pfn = totalram_pages; | 57 | max_pfn = totalram_pages; |
| 74 | mem_init_print_info(NULL); | 58 | mem_init_print_info(NULL); |
| 75 | kmalloc_ok = 1; | 59 | kmalloc_ok = 1; |
| @@ -127,49 +111,6 @@ static void __init fixrange_init(unsigned long start, unsigned long end, | |||
| 127 | } | 111 | } |
| 128 | } | 112 | } |
| 129 | 113 | ||
| 130 | #ifdef CONFIG_HIGHMEM | ||
| 131 | pte_t *kmap_pte; | ||
| 132 | pgprot_t kmap_prot; | ||
| 133 | |||
| 134 | #define kmap_get_fixmap_pte(vaddr) \ | ||
| 135 | pte_offset_kernel(pmd_offset(pud_offset(pgd_offset_k(vaddr), (vaddr)),\ | ||
| 136 | (vaddr)), (vaddr)) | ||
| 137 | |||
| 138 | static void __init kmap_init(void) | ||
| 139 | { | ||
| 140 | unsigned long kmap_vstart; | ||
| 141 | |||
| 142 | /* cache the first kmap pte */ | ||
| 143 | kmap_vstart = __fix_to_virt(FIX_KMAP_BEGIN); | ||
| 144 | kmap_pte = kmap_get_fixmap_pte(kmap_vstart); | ||
| 145 | |||
| 146 | kmap_prot = PAGE_KERNEL; | ||
| 147 | } | ||
| 148 | |||
| 149 | static void __init init_highmem(void) | ||
| 150 | { | ||
| 151 | pgd_t *pgd; | ||
| 152 | pud_t *pud; | ||
| 153 | pmd_t *pmd; | ||
| 154 | pte_t *pte; | ||
| 155 | unsigned long vaddr; | ||
| 156 | |||
| 157 | /* | ||
| 158 | * Permanent kmaps: | ||
| 159 | */ | ||
| 160 | vaddr = PKMAP_BASE; | ||
| 161 | fixrange_init(vaddr, vaddr + PAGE_SIZE*LAST_PKMAP, swapper_pg_dir); | ||
| 162 | |||
| 163 | pgd = swapper_pg_dir + pgd_index(vaddr); | ||
| 164 | pud = pud_offset(pgd, vaddr); | ||
| 165 | pmd = pmd_offset(pud, vaddr); | ||
| 166 | pte = pte_offset_kernel(pmd, vaddr); | ||
| 167 | pkmap_page_table = pte; | ||
| 168 | |||
| 169 | kmap_init(); | ||
| 170 | } | ||
| 171 | #endif /* CONFIG_HIGHMEM */ | ||
| 172 | |||
| 173 | static void __init fixaddr_user_init( void) | 114 | static void __init fixaddr_user_init( void) |
| 174 | { | 115 | { |
| 175 | #ifdef CONFIG_ARCH_REUSE_HOST_VSYSCALL_AREA | 116 | #ifdef CONFIG_ARCH_REUSE_HOST_VSYSCALL_AREA |
| @@ -211,9 +152,6 @@ void __init paging_init(void) | |||
| 211 | 152 | ||
| 212 | zones_size[ZONE_NORMAL] = (end_iomem >> PAGE_SHIFT) - | 153 | zones_size[ZONE_NORMAL] = (end_iomem >> PAGE_SHIFT) - |
| 213 | (uml_physmem >> PAGE_SHIFT); | 154 | (uml_physmem >> PAGE_SHIFT); |
| 214 | #ifdef CONFIG_HIGHMEM | ||
| 215 | zones_size[ZONE_HIGHMEM] = highmem >> PAGE_SHIFT; | ||
| 216 | #endif | ||
| 217 | free_area_init(zones_size); | 155 | free_area_init(zones_size); |
| 218 | 156 | ||
| 219 | /* | 157 | /* |
| @@ -224,10 +162,6 @@ void __init paging_init(void) | |||
| 224 | fixrange_init(vaddr, FIXADDR_TOP, swapper_pg_dir); | 162 | fixrange_init(vaddr, FIXADDR_TOP, swapper_pg_dir); |
| 225 | 163 | ||
| 226 | fixaddr_user_init(); | 164 | fixaddr_user_init(); |
| 227 | |||
| 228 | #ifdef CONFIG_HIGHMEM | ||
| 229 | init_highmem(); | ||
| 230 | #endif | ||
| 231 | } | 165 | } |
| 232 | 166 | ||
| 233 | /* | 167 | /* |
diff --git a/arch/um/kernel/um_arch.c b/arch/um/kernel/um_arch.c index cd09285facf4..9b06957e98ce 100644 --- a/arch/um/kernel/um_arch.c +++ b/arch/um/kernel/um_arch.c | |||
| @@ -301,11 +301,6 @@ int __init linux_main(int argc, char **argv) | |||
| 301 | if (physmem_size + iomem_size > max_physmem) { | 301 | if (physmem_size + iomem_size > max_physmem) { |
| 302 | highmem = physmem_size + iomem_size - max_physmem; | 302 | highmem = physmem_size + iomem_size - max_physmem; |
| 303 | physmem_size -= highmem; | 303 | physmem_size -= highmem; |
| 304 | #ifndef CONFIG_HIGHMEM | ||
| 305 | highmem = 0; | ||
| 306 | printf("CONFIG_HIGHMEM not enabled - physical memory shrunk " | ||
| 307 | "to %Lu bytes\n", physmem_size); | ||
| 308 | #endif | ||
| 309 | } | 304 | } |
| 310 | 305 | ||
| 311 | high_physmem = uml_physmem + physmem_size; | 306 | high_physmem = uml_physmem + physmem_size; |
