aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sh')
-rw-r--r--arch/sh/Kconfig2
-rw-r--r--arch/sh/include/asm/mutex-llsc.h4
-rw-r--r--arch/sh/include/asm/pgtable.h3
-rw-r--r--arch/sh/mm/init.c43
4 files changed, 12 insertions, 40 deletions
diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig
index 8c868cf2cf93..1020dd85431a 100644
--- a/arch/sh/Kconfig
+++ b/arch/sh/Kconfig
@@ -748,7 +748,7 @@ config NR_CPUS
748 748
749config HOTPLUG_CPU 749config HOTPLUG_CPU
750 bool "Support for hot-pluggable CPUs (EXPERIMENTAL)" 750 bool "Support for hot-pluggable CPUs (EXPERIMENTAL)"
751 depends on SMP && HOTPLUG 751 depends on SMP
752 help 752 help
753 Say Y here to experiment with turning CPUs off and on. CPUs 753 Say Y here to experiment with turning CPUs off and on. CPUs
754 can be controlled through /sys/devices/system/cpu. 754 can be controlled through /sys/devices/system/cpu.
diff --git a/arch/sh/include/asm/mutex-llsc.h b/arch/sh/include/asm/mutex-llsc.h
index 090358a7e1bb..dad29b687bd3 100644
--- a/arch/sh/include/asm/mutex-llsc.h
+++ b/arch/sh/include/asm/mutex-llsc.h
@@ -37,7 +37,7 @@ __mutex_fastpath_lock(atomic_t *count, void (*fail_fn)(atomic_t *))
37} 37}
38 38
39static inline int 39static inline int
40__mutex_fastpath_lock_retval(atomic_t *count, int (*fail_fn)(atomic_t *)) 40__mutex_fastpath_lock_retval(atomic_t *count)
41{ 41{
42 int __done, __res; 42 int __done, __res;
43 43
@@ -51,7 +51,7 @@ __mutex_fastpath_lock_retval(atomic_t *count, int (*fail_fn)(atomic_t *))
51 : "t"); 51 : "t");
52 52
53 if (unlikely(!__done || __res != 0)) 53 if (unlikely(!__done || __res != 0))
54 __res = fail_fn(count); 54 __res = -1;
55 55
56 return __res; 56 return __res;
57} 57}
diff --git a/arch/sh/include/asm/pgtable.h b/arch/sh/include/asm/pgtable.h
index 9210e93a92c3..cf434c64408d 100644
--- a/arch/sh/include/asm/pgtable.h
+++ b/arch/sh/include/asm/pgtable.h
@@ -124,9 +124,6 @@ typedef pte_t *pte_addr_t;
124 124
125#define kern_addr_valid(addr) (1) 125#define kern_addr_valid(addr) (1)
126 126
127#define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \
128 remap_pfn_range(vma, vaddr, pfn, size, prot)
129
130#define pte_pfn(x) ((unsigned long)(((x).pte_low >> PAGE_SHIFT))) 127#define pte_pfn(x) ((unsigned long)(((x).pte_low >> PAGE_SHIFT)))
131 128
132/* 129/*
diff --git a/arch/sh/mm/init.c b/arch/sh/mm/init.c
index 20f9ead650d3..33890fd267cb 100644
--- a/arch/sh/mm/init.c
+++ b/arch/sh/mm/init.c
@@ -407,30 +407,16 @@ unsigned int mem_init_done = 0;
407 407
408void __init mem_init(void) 408void __init mem_init(void)
409{ 409{
410 int codesize, datasize, initsize; 410 pg_data_t *pgdat;
411 int nid;
412 411
413 iommu_init(); 412 iommu_init();
414 413
415 num_physpages = 0;
416 high_memory = NULL; 414 high_memory = NULL;
415 for_each_online_pgdat(pgdat)
416 high_memory = max_t(void *, high_memory,
417 __va(pgdat_end_pfn(pgdat) << PAGE_SHIFT));
417 418
418 for_each_online_node(nid) { 419 free_all_bootmem();
419 pg_data_t *pgdat = NODE_DATA(nid);
420 void *node_high_memory;
421
422 num_physpages += pgdat->node_present_pages;
423
424 if (pgdat->node_spanned_pages)
425 totalram_pages += free_all_bootmem_node(pgdat);
426
427
428 node_high_memory = (void *)__va((pgdat->node_start_pfn +
429 pgdat->node_spanned_pages) <<
430 PAGE_SHIFT);
431 if (node_high_memory > high_memory)
432 high_memory = node_high_memory;
433 }
434 420
435 /* Set this up early, so we can take care of the zero page */ 421 /* Set this up early, so we can take care of the zero page */
436 cpu_cache_init(); 422 cpu_cache_init();
@@ -441,19 +427,8 @@ void __init mem_init(void)
441 427
442 vsyscall_init(); 428 vsyscall_init();
443 429
444 codesize = (unsigned long) &_etext - (unsigned long) &_text; 430 mem_init_print_info(NULL);
445 datasize = (unsigned long) &_edata - (unsigned long) &_etext; 431 pr_info("virtual kernel memory layout:\n"
446 initsize = (unsigned long) &__init_end - (unsigned long) &__init_begin;
447
448 printk(KERN_INFO "Memory: %luk/%luk available (%dk kernel code, "
449 "%dk data, %dk init)\n",
450 nr_free_pages() << (PAGE_SHIFT-10),
451 num_physpages << (PAGE_SHIFT-10),
452 codesize >> 10,
453 datasize >> 10,
454 initsize >> 10);
455
456 printk(KERN_INFO "virtual kernel memory layout:\n"
457 " fixmap : 0x%08lx - 0x%08lx (%4ld kB)\n" 432 " fixmap : 0x%08lx - 0x%08lx (%4ld kB)\n"
458#ifdef CONFIG_HIGHMEM 433#ifdef CONFIG_HIGHMEM
459 " pkmap : 0x%08lx - 0x%08lx (%4ld kB)\n" 434 " pkmap : 0x%08lx - 0x%08lx (%4ld kB)\n"
@@ -499,13 +474,13 @@ void __init mem_init(void)
499 474
500void free_initmem(void) 475void free_initmem(void)
501{ 476{
502 free_initmem_default(0); 477 free_initmem_default(-1);
503} 478}
504 479
505#ifdef CONFIG_BLK_DEV_INITRD 480#ifdef CONFIG_BLK_DEV_INITRD
506void free_initrd_mem(unsigned long start, unsigned long end) 481void free_initrd_mem(unsigned long start, unsigned long end)
507{ 482{
508 free_reserved_area(start, end, 0, "initrd"); 483 free_reserved_area((void *)start, (void *)end, -1, "initrd");
509} 484}
510#endif 485#endif
511 486