diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/sh/Kconfig | 10 | ||||
-rw-r--r-- | arch/sh/kernel/setup.c | 26 | ||||
-rw-r--r-- | arch/sh/mm/init.c | 21 |
3 files changed, 9 insertions, 48 deletions
diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig index 7d31d628cdec..64f5ae0ff96d 100644 --- a/arch/sh/Kconfig +++ b/arch/sh/Kconfig | |||
@@ -490,16 +490,6 @@ config CPU_SUBTYPE_ST40 | |||
490 | depends on CPU_SUBTYPE_ST40STB1 || CPU_SUBTYPE_ST40GX1 | 490 | depends on CPU_SUBTYPE_ST40STB1 || CPU_SUBTYPE_ST40GX1 |
491 | default y | 491 | default y |
492 | 492 | ||
493 | config ARCH_DISCONTIGMEM_ENABLE | ||
494 | bool | ||
495 | depends on SH_HP690 | ||
496 | default y | ||
497 | help | ||
498 | Say Y to upport efficient handling of discontiguous physical memory, | ||
499 | for architectures which are either NUMA (Non-Uniform Memory Access) | ||
500 | or have huge holes in the physical address space for other reasons. | ||
501 | See <file:Documentation/vm/numa> for more. | ||
502 | |||
503 | source "mm/Kconfig" | 493 | source "mm/Kconfig" |
504 | 494 | ||
505 | config ZERO_PAGE_OFFSET | 495 | config ZERO_PAGE_OFFSET |
diff --git a/arch/sh/kernel/setup.c b/arch/sh/kernel/setup.c index 25b9d9ebe858..036050b377cd 100644 --- a/arch/sh/kernel/setup.c +++ b/arch/sh/kernel/setup.c | |||
@@ -83,9 +83,9 @@ static struct sh_machine_vector* __init get_mv_byname(const char* name); | |||
83 | /* ... */ | 83 | /* ... */ |
84 | #define COMMAND_LINE ((char *) (PARAM+0x100)) | 84 | #define COMMAND_LINE ((char *) (PARAM+0x100)) |
85 | 85 | ||
86 | #define RAMDISK_IMAGE_START_MASK 0x07FF | 86 | #define RAMDISK_IMAGE_START_MASK 0x07FF |
87 | #define RAMDISK_PROMPT_FLAG 0x8000 | 87 | #define RAMDISK_PROMPT_FLAG 0x8000 |
88 | #define RAMDISK_LOAD_FLAG 0x4000 | 88 | #define RAMDISK_LOAD_FLAG 0x4000 |
89 | 89 | ||
90 | static char command_line[COMMAND_LINE_SIZE] = { 0, }; | 90 | static char command_line[COMMAND_LINE_SIZE] = { 0, }; |
91 | 91 | ||
@@ -284,18 +284,6 @@ void __init setup_arch(char **cmdline_p) | |||
284 | #define PFN_DOWN(x) ((x) >> PAGE_SHIFT) | 284 | #define PFN_DOWN(x) ((x) >> PAGE_SHIFT) |
285 | #define PFN_PHYS(x) ((x) << PAGE_SHIFT) | 285 | #define PFN_PHYS(x) ((x) << PAGE_SHIFT) |
286 | 286 | ||
287 | #ifdef CONFIG_DISCONTIGMEM | ||
288 | NODE_DATA(0)->bdata = &discontig_node_bdata[0]; | ||
289 | NODE_DATA(1)->bdata = &discontig_node_bdata[1]; | ||
290 | |||
291 | bootmap_size = init_bootmem_node(NODE_DATA(1), | ||
292 | PFN_UP(__MEMORY_START_2ND), | ||
293 | PFN_UP(__MEMORY_START_2ND), | ||
294 | PFN_DOWN(__MEMORY_START_2ND+__MEMORY_SIZE_2ND)); | ||
295 | free_bootmem_node(NODE_DATA(1), __MEMORY_START_2ND, __MEMORY_SIZE_2ND); | ||
296 | reserve_bootmem_node(NODE_DATA(1), __MEMORY_START_2ND, bootmap_size); | ||
297 | #endif | ||
298 | |||
299 | /* | 287 | /* |
300 | * Find the highest page frame number we have available | 288 | * Find the highest page frame number we have available |
301 | */ | 289 | */ |
@@ -306,10 +294,10 @@ void __init setup_arch(char **cmdline_p) | |||
306 | */ | 294 | */ |
307 | max_low_pfn = max_pfn; | 295 | max_low_pfn = max_pfn; |
308 | 296 | ||
309 | /* | 297 | /* |
310 | * Partially used pages are not usable - thus | 298 | * Partially used pages are not usable - thus |
311 | * we are rounding upwards: | 299 | * we are rounding upwards: |
312 | */ | 300 | */ |
313 | start_pfn = PFN_UP(__pa(_end)); | 301 | start_pfn = PFN_UP(__pa(_end)); |
314 | 302 | ||
315 | /* | 303 | /* |
@@ -360,12 +348,12 @@ void __init setup_arch(char **cmdline_p) | |||
360 | reserve_bootmem_node(NODE_DATA(0), __MEMORY_START, PAGE_SIZE); | 348 | reserve_bootmem_node(NODE_DATA(0), __MEMORY_START, PAGE_SIZE); |
361 | 349 | ||
362 | #ifdef CONFIG_BLK_DEV_INITRD | 350 | #ifdef CONFIG_BLK_DEV_INITRD |
363 | ROOT_DEV = MKDEV(RAMDISK_MAJOR, 0); | 351 | ROOT_DEV = MKDEV(RAMDISK_MAJOR, 0); |
364 | if (&__rd_start != &__rd_end) { | 352 | if (&__rd_start != &__rd_end) { |
365 | LOADER_TYPE = 1; | 353 | LOADER_TYPE = 1; |
366 | INITRD_START = PHYSADDR((unsigned long)&__rd_start) - __MEMORY_START; | 354 | INITRD_START = PHYSADDR((unsigned long)&__rd_start) - __MEMORY_START; |
367 | INITRD_SIZE = (unsigned long)&__rd_end - (unsigned long)&__rd_start; | 355 | INITRD_SIZE = (unsigned long)&__rd_end - (unsigned long)&__rd_start; |
368 | } | 356 | } |
369 | 357 | ||
370 | if (LOADER_TYPE && INITRD_START) { | 358 | if (LOADER_TYPE && INITRD_START) { |
371 | if (INITRD_START + INITRD_SIZE <= (max_low_pfn << PAGE_SHIFT)) { | 359 | if (INITRD_START + INITRD_SIZE <= (max_low_pfn << PAGE_SHIFT)) { |
diff --git a/arch/sh/mm/init.c b/arch/sh/mm/init.c index 4e9c854845a4..e342565f75fb 100644 --- a/arch/sh/mm/init.c +++ b/arch/sh/mm/init.c | |||
@@ -51,11 +51,6 @@ unsigned long mmu_context_cache = NO_CONTEXT; | |||
51 | #define MAX_LOW_PFN (NODE_DATA(0)->bdata->node_low_pfn) | 51 | #define MAX_LOW_PFN (NODE_DATA(0)->bdata->node_low_pfn) |
52 | #endif | 52 | #endif |
53 | 53 | ||
54 | #ifdef CONFIG_DISCONTIGMEM | ||
55 | pg_data_t discontig_page_data[MAX_NUMNODES]; | ||
56 | bootmem_data_t discontig_node_bdata[MAX_NUMNODES]; | ||
57 | #endif | ||
58 | |||
59 | void (*copy_page)(void *from, void *to); | 54 | void (*copy_page)(void *from, void *to); |
60 | void (*clear_page)(void *to); | 55 | void (*clear_page)(void *to); |
61 | 56 | ||
@@ -216,15 +211,6 @@ void __init paging_init(void) | |||
216 | #endif | 211 | #endif |
217 | NODE_DATA(0)->node_mem_map = NULL; | 212 | NODE_DATA(0)->node_mem_map = NULL; |
218 | free_area_init_node(0, NODE_DATA(0), zones_size, __MEMORY_START >> PAGE_SHIFT, 0); | 213 | free_area_init_node(0, NODE_DATA(0), zones_size, __MEMORY_START >> PAGE_SHIFT, 0); |
219 | |||
220 | #ifdef CONFIG_DISCONTIGMEM | ||
221 | /* | ||
222 | * And for discontig, do some more fixups on the zone sizes.. | ||
223 | */ | ||
224 | zones_size[ZONE_DMA] = __MEMORY_SIZE_2ND >> PAGE_SHIFT; | ||
225 | zones_size[ZONE_NORMAL] = 0; | ||
226 | free_area_init_node(1, NODE_DATA(1), zones_size, __MEMORY_START_2ND >> PAGE_SHIFT, 0); | ||
227 | #endif | ||
228 | } | 214 | } |
229 | 215 | ||
230 | void __init mem_init(void) | 216 | void __init mem_init(void) |
@@ -248,7 +234,7 @@ void __init mem_init(void) | |||
248 | memset(empty_zero_page, 0, PAGE_SIZE); | 234 | memset(empty_zero_page, 0, PAGE_SIZE); |
249 | __flush_wback_region(empty_zero_page, PAGE_SIZE); | 235 | __flush_wback_region(empty_zero_page, PAGE_SIZE); |
250 | 236 | ||
251 | /* | 237 | /* |
252 | * Setup wrappers for copy/clear_page(), these will get overridden | 238 | * Setup wrappers for copy/clear_page(), these will get overridden |
253 | * later in the boot process if a better method is available. | 239 | * later in the boot process if a better method is available. |
254 | */ | 240 | */ |
@@ -257,9 +243,6 @@ void __init mem_init(void) | |||
257 | 243 | ||
258 | /* this will put all low memory onto the freelists */ | 244 | /* this will put all low memory onto the freelists */ |
259 | totalram_pages += free_all_bootmem_node(NODE_DATA(0)); | 245 | totalram_pages += free_all_bootmem_node(NODE_DATA(0)); |
260 | #ifdef CONFIG_DISCONTIGMEM | ||
261 | totalram_pages += free_all_bootmem_node(NODE_DATA(1)); | ||
262 | #endif | ||
263 | reservedpages = 0; | 246 | reservedpages = 0; |
264 | for (tmp = 0; tmp < num_physpages; tmp++) | 247 | for (tmp = 0; tmp < num_physpages; tmp++) |
265 | /* | 248 | /* |
@@ -286,7 +269,7 @@ void __init mem_init(void) | |||
286 | void free_initmem(void) | 269 | void free_initmem(void) |
287 | { | 270 | { |
288 | unsigned long addr; | 271 | unsigned long addr; |
289 | 272 | ||
290 | addr = (unsigned long)(&__init_begin); | 273 | addr = (unsigned long)(&__init_begin); |
291 | for (; addr < (unsigned long)(&__init_end); addr += PAGE_SIZE) { | 274 | for (; addr < (unsigned long)(&__init_end); addr += PAGE_SIZE) { |
292 | ClearPageReserved(virt_to_page(addr)); | 275 | ClearPageReserved(virt_to_page(addr)); |