diff options
| author | Ingo Molnar <mingo@elte.hu> | 2008-10-03 13:28:46 -0400 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2008-10-03 13:28:46 -0400 |
| commit | f68ec0c24755e5cdb779be6240925f2175311d84 (patch) | |
| tree | a7b7128e61a8456385d82bd1c7ca5f14eecbf2ca /arch/m32r | |
| parent | 98920dc3d1113b883cbc73e3293446d3525c6042 (diff) | |
| parent | 94aca1dac6f6d21f4b07e4864baf7768cabcc6e7 (diff) | |
Merge commit 'v2.6.27-rc8' into x86/setup
Diffstat (limited to 'arch/m32r')
| -rw-r--r-- | arch/m32r/Kconfig | 10 | ||||
| -rw-r--r-- | arch/m32r/boot/compressed/misc.c | 37 | ||||
| -rw-r--r-- | arch/m32r/kernel/entry.S | 2 | ||||
| -rw-r--r-- | arch/m32r/kernel/head.S | 1 | ||||
| -rw-r--r-- | arch/m32r/kernel/irq.c | 6 | ||||
| -rw-r--r-- | arch/m32r/kernel/m32r_ksyms.c | 2 | ||||
| -rw-r--r-- | arch/m32r/kernel/process.c | 30 | ||||
| -rw-r--r-- | arch/m32r/kernel/smp.c | 4 | ||||
| -rw-r--r-- | arch/m32r/kernel/time.c | 5 | ||||
| -rw-r--r-- | arch/m32r/kernel/traps.c | 8 | ||||
| -rw-r--r-- | arch/m32r/lib/delay.c | 2 | ||||
| -rw-r--r-- | arch/m32r/mm/discontig.c | 10 | ||||
| -rw-r--r-- | arch/m32r/mm/init.c | 42 |
13 files changed, 21 insertions, 138 deletions
diff --git a/arch/m32r/Kconfig b/arch/m32r/Kconfig index a5f864c445b2..f57113f1f892 100644 --- a/arch/m32r/Kconfig +++ b/arch/m32r/Kconfig | |||
| @@ -216,10 +216,6 @@ config MEMORY_SIZE | |||
| 216 | default "01000000" if PLAT_M32104UT | 216 | default "01000000" if PLAT_M32104UT |
| 217 | default "00800000" if PLAT_OAKS32R | 217 | default "00800000" if PLAT_OAKS32R |
| 218 | 218 | ||
| 219 | config NOHIGHMEM | ||
| 220 | bool | ||
| 221 | default y | ||
| 222 | |||
| 223 | config ARCH_DISCONTIGMEM_ENABLE | 219 | config ARCH_DISCONTIGMEM_ENABLE |
| 224 | bool "Internal RAM Support" | 220 | bool "Internal RAM Support" |
| 225 | depends on CHIP_M32700 || CHIP_M32102 || CHIP_VDEC2 || CHIP_OPSP || CHIP_M32104 | 221 | depends on CHIP_M32700 || CHIP_M32102 || CHIP_VDEC2 || CHIP_OPSP || CHIP_M32104 |
| @@ -410,11 +406,7 @@ config PCI_DIRECT | |||
| 410 | source "drivers/pci/Kconfig" | 406 | source "drivers/pci/Kconfig" |
| 411 | 407 | ||
| 412 | config ISA | 408 | config ISA |
| 413 | bool "ISA support" | 409 | bool |
| 414 | help | ||
| 415 | Find out whether you have ISA slots on your motherboard. ISA is the | ||
| 416 | name of a bus system, i.e. the way the CPU talks to the other stuff | ||
| 417 | inside your box. If you have ISA, say Y, otherwise N. | ||
| 418 | 410 | ||
| 419 | source "drivers/pcmcia/Kconfig" | 411 | source "drivers/pcmcia/Kconfig" |
| 420 | 412 | ||
diff --git a/arch/m32r/boot/compressed/misc.c b/arch/m32r/boot/compressed/misc.c index 600d40e33495..d394292498c0 100644 --- a/arch/m32r/boot/compressed/misc.c +++ b/arch/m32r/boot/compressed/misc.c | |||
| @@ -70,8 +70,6 @@ static unsigned outcnt = 0; /* bytes in output buffer */ | |||
| 70 | static int fill_inbuf(void); | 70 | static int fill_inbuf(void); |
| 71 | static void flush_window(void); | 71 | static void flush_window(void); |
| 72 | static void error(char *m); | 72 | static void error(char *m); |
| 73 | static void gzip_mark(void **); | ||
| 74 | static void gzip_release(void **); | ||
| 75 | 73 | ||
| 76 | static unsigned char *input_data; | 74 | static unsigned char *input_data; |
| 77 | static int input_len; | 75 | static int input_len; |
| @@ -82,9 +80,6 @@ static unsigned long output_ptr = 0; | |||
| 82 | 80 | ||
| 83 | #include "m32r_sio.c" | 81 | #include "m32r_sio.c" |
| 84 | 82 | ||
| 85 | static void *malloc(int size); | ||
| 86 | static void free(void *where); | ||
| 87 | |||
| 88 | static unsigned long free_mem_ptr; | 83 | static unsigned long free_mem_ptr; |
| 89 | static unsigned long free_mem_end_ptr; | 84 | static unsigned long free_mem_end_ptr; |
| 90 | 85 | ||
| @@ -92,38 +87,6 @@ static unsigned long free_mem_end_ptr; | |||
| 92 | 87 | ||
| 93 | #include "../../../../lib/inflate.c" | 88 | #include "../../../../lib/inflate.c" |
| 94 | 89 | ||
| 95 | static void *malloc(int size) | ||
| 96 | { | ||
| 97 | void *p; | ||
| 98 | |||
| 99 | if (size <0) error("Malloc error"); | ||
| 100 | if (free_mem_ptr == 0) error("Memory error"); | ||
| 101 | |||
| 102 | free_mem_ptr = (free_mem_ptr + 3) & ~3; /* Align */ | ||
| 103 | |||
| 104 | p = (void *)free_mem_ptr; | ||
| 105 | free_mem_ptr += size; | ||
| 106 | |||
| 107 | if (free_mem_ptr >= free_mem_end_ptr) | ||
| 108 | error("Out of memory"); | ||
| 109 | |||
| 110 | return p; | ||
| 111 | } | ||
| 112 | |||
| 113 | static void free(void *where) | ||
| 114 | { /* Don't care */ | ||
| 115 | } | ||
| 116 | |||
| 117 | static void gzip_mark(void **ptr) | ||
| 118 | { | ||
| 119 | *ptr = (void *) free_mem_ptr; | ||
| 120 | } | ||
| 121 | |||
| 122 | static void gzip_release(void **ptr) | ||
| 123 | { | ||
| 124 | free_mem_ptr = (long) *ptr; | ||
| 125 | } | ||
| 126 | |||
| 127 | void* memset(void* s, int c, size_t n) | 90 | void* memset(void* s, int c, size_t n) |
| 128 | { | 91 | { |
| 129 | int i; | 92 | int i; |
diff --git a/arch/m32r/kernel/entry.S b/arch/m32r/kernel/entry.S index d4eaa2fd1818..612d35b082a6 100644 --- a/arch/m32r/kernel/entry.S +++ b/arch/m32r/kernel/entry.S | |||
| @@ -143,7 +143,7 @@ ret_from_intr: | |||
| 143 | and3 r4, r4, #0x8000 ; check BSM bit | 143 | and3 r4, r4, #0x8000 ; check BSM bit |
| 144 | #endif | 144 | #endif |
| 145 | beqz r4, resume_kernel | 145 | beqz r4, resume_kernel |
| 146 | ENTRY(resume_userspace) | 146 | resume_userspace: |
| 147 | DISABLE_INTERRUPTS(r4) ; make sure we don't miss an interrupt | 147 | DISABLE_INTERRUPTS(r4) ; make sure we don't miss an interrupt |
| 148 | ; setting need_resched or sigpending | 148 | ; setting need_resched or sigpending |
| 149 | ; between sampling and the iret | 149 | ; between sampling and the iret |
diff --git a/arch/m32r/kernel/head.S b/arch/m32r/kernel/head.S index dab7436d7bbe..40180778a5c7 100644 --- a/arch/m32r/kernel/head.S +++ b/arch/m32r/kernel/head.S | |||
| @@ -29,7 +29,6 @@ __INITDATA | |||
| 29 | .global _end | 29 | .global _end |
| 30 | ENTRY(stext) | 30 | ENTRY(stext) |
| 31 | ENTRY(_stext) | 31 | ENTRY(_stext) |
| 32 | ENTRY(startup_32) | ||
| 33 | /* Setup up the stack pointer */ | 32 | /* Setup up the stack pointer */ |
| 34 | LDIMM (r0, spi_stack_top) | 33 | LDIMM (r0, spi_stack_top) |
| 35 | LDIMM (r1, spu_stack_top) | 34 | LDIMM (r1, spu_stack_top) |
diff --git a/arch/m32r/kernel/irq.c b/arch/m32r/kernel/irq.c index d0c5b0b7da2f..2aeae4670098 100644 --- a/arch/m32r/kernel/irq.c +++ b/arch/m32r/kernel/irq.c | |||
| @@ -22,9 +22,6 @@ | |||
| 22 | #include <linux/module.h> | 22 | #include <linux/module.h> |
| 23 | #include <asm/uaccess.h> | 23 | #include <asm/uaccess.h> |
| 24 | 24 | ||
| 25 | atomic_t irq_err_count; | ||
| 26 | atomic_t irq_mis_count; | ||
| 27 | |||
| 28 | /* | 25 | /* |
| 29 | * Generic, controller-independent functions: | 26 | * Generic, controller-independent functions: |
| 30 | */ | 27 | */ |
| @@ -63,9 +60,6 @@ int show_interrupts(struct seq_file *p, void *v) | |||
| 63 | seq_putc(p, '\n'); | 60 | seq_putc(p, '\n'); |
| 64 | skip: | 61 | skip: |
| 65 | spin_unlock_irqrestore(&irq_desc[i].lock, flags); | 62 | spin_unlock_irqrestore(&irq_desc[i].lock, flags); |
| 66 | } else if (i == NR_IRQS) { | ||
| 67 | seq_printf(p, "ERR: %10u\n", atomic_read(&irq_err_count)); | ||
| 68 | seq_printf(p, "MIS: %10u\n", atomic_read(&irq_mis_count)); | ||
| 69 | } | 63 | } |
| 70 | return 0; | 64 | return 0; |
| 71 | } | 65 | } |
diff --git a/arch/m32r/kernel/m32r_ksyms.c b/arch/m32r/kernel/m32r_ksyms.c index 16bcb189a383..22624b51d4d3 100644 --- a/arch/m32r/kernel/m32r_ksyms.c +++ b/arch/m32r/kernel/m32r_ksyms.c | |||
| @@ -14,6 +14,7 @@ | |||
| 14 | #include <asm/delay.h> | 14 | #include <asm/delay.h> |
| 15 | #include <asm/irq.h> | 15 | #include <asm/irq.h> |
| 16 | #include <asm/tlbflush.h> | 16 | #include <asm/tlbflush.h> |
| 17 | #include <asm/pgtable.h> | ||
| 17 | 18 | ||
| 18 | /* platform dependent support */ | 19 | /* platform dependent support */ |
| 19 | EXPORT_SYMBOL(boot_cpu_data); | 20 | EXPORT_SYMBOL(boot_cpu_data); |
| @@ -65,6 +66,7 @@ EXPORT_SYMBOL(memset); | |||
| 65 | EXPORT_SYMBOL(copy_page); | 66 | EXPORT_SYMBOL(copy_page); |
| 66 | EXPORT_SYMBOL(clear_page); | 67 | EXPORT_SYMBOL(clear_page); |
| 67 | EXPORT_SYMBOL(strlen); | 68 | EXPORT_SYMBOL(strlen); |
| 69 | EXPORT_SYMBOL(empty_zero_page); | ||
| 68 | 70 | ||
| 69 | EXPORT_SYMBOL(_inb); | 71 | EXPORT_SYMBOL(_inb); |
| 70 | EXPORT_SYMBOL(_inw); | 72 | EXPORT_SYMBOL(_inw); |
diff --git a/arch/m32r/kernel/process.c b/arch/m32r/kernel/process.c index a689e2978b6e..5be4faaf5b1c 100644 --- a/arch/m32r/kernel/process.c +++ b/arch/m32r/kernel/process.c | |||
| @@ -35,8 +35,6 @@ | |||
| 35 | 35 | ||
| 36 | #include <linux/err.h> | 36 | #include <linux/err.h> |
| 37 | 37 | ||
| 38 | static int hlt_counter=0; | ||
| 39 | |||
| 40 | /* | 38 | /* |
| 41 | * Return saved PC of a blocked thread. | 39 | * Return saved PC of a blocked thread. |
| 42 | */ | 40 | */ |
| @@ -48,31 +46,16 @@ unsigned long thread_saved_pc(struct task_struct *tsk) | |||
| 48 | /* | 46 | /* |
| 49 | * Powermanagement idle function, if any.. | 47 | * Powermanagement idle function, if any.. |
| 50 | */ | 48 | */ |
| 51 | void (*pm_idle)(void) = NULL; | 49 | static void (*pm_idle)(void) = NULL; |
| 52 | EXPORT_SYMBOL(pm_idle); | ||
| 53 | 50 | ||
| 54 | void (*pm_power_off)(void) = NULL; | 51 | void (*pm_power_off)(void) = NULL; |
| 55 | EXPORT_SYMBOL(pm_power_off); | 52 | EXPORT_SYMBOL(pm_power_off); |
| 56 | 53 | ||
| 57 | void disable_hlt(void) | ||
| 58 | { | ||
| 59 | hlt_counter++; | ||
| 60 | } | ||
| 61 | |||
| 62 | EXPORT_SYMBOL(disable_hlt); | ||
| 63 | |||
| 64 | void enable_hlt(void) | ||
| 65 | { | ||
| 66 | hlt_counter--; | ||
| 67 | } | ||
| 68 | |||
| 69 | EXPORT_SYMBOL(enable_hlt); | ||
| 70 | |||
| 71 | /* | 54 | /* |
| 72 | * We use this is we don't have any better | 55 | * We use this is we don't have any better |
| 73 | * idle routine.. | 56 | * idle routine.. |
| 74 | */ | 57 | */ |
| 75 | void default_idle(void) | 58 | static void default_idle(void) |
| 76 | { | 59 | { |
| 77 | /* M32R_FIXME: Please use "cpu_sleep" mode. */ | 60 | /* M32R_FIXME: Please use "cpu_sleep" mode. */ |
| 78 | cpu_relax(); | 61 | cpu_relax(); |
| @@ -260,15 +243,6 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long spu, | |||
| 260 | return 0; | 243 | return 0; |
| 261 | } | 244 | } |
| 262 | 245 | ||
| 263 | /* | ||
| 264 | * Capture the user space registers if the task is not running (in user space) | ||
| 265 | */ | ||
| 266 | int dump_task_regs(struct task_struct *tsk, elf_gregset_t *regs) | ||
| 267 | { | ||
| 268 | /* M32R_FIXME */ | ||
| 269 | return 1; | ||
| 270 | } | ||
| 271 | |||
| 272 | asmlinkage int sys_fork(unsigned long r0, unsigned long r1, unsigned long r2, | 246 | asmlinkage int sys_fork(unsigned long r0, unsigned long r1, unsigned long r2, |
| 273 | unsigned long r3, unsigned long r4, unsigned long r5, unsigned long r6, | 247 | unsigned long r3, unsigned long r4, unsigned long r5, unsigned long r6, |
| 274 | struct pt_regs regs) | 248 | struct pt_regs regs) |
diff --git a/arch/m32r/kernel/smp.c b/arch/m32r/kernel/smp.c index 7577f971ea4e..929e5c9d3ad9 100644 --- a/arch/m32r/kernel/smp.c +++ b/arch/m32r/kernel/smp.c | |||
| @@ -84,7 +84,7 @@ void smp_send_timer(void); | |||
| 84 | void smp_ipi_timer_interrupt(struct pt_regs *); | 84 | void smp_ipi_timer_interrupt(struct pt_regs *); |
| 85 | void smp_local_timer_interrupt(void); | 85 | void smp_local_timer_interrupt(void); |
| 86 | 86 | ||
| 87 | void send_IPI_allbutself(int, int); | 87 | static void send_IPI_allbutself(int, int); |
| 88 | static void send_IPI_mask(cpumask_t, int, int); | 88 | static void send_IPI_mask(cpumask_t, int, int); |
| 89 | unsigned long send_IPI_mask_phys(cpumask_t, int, int); | 89 | unsigned long send_IPI_mask_phys(cpumask_t, int, int); |
| 90 | 90 | ||
| @@ -722,7 +722,7 @@ void smp_local_timer_interrupt(void) | |||
| 722 | * ---------- --- -------------------------------------------------------- | 722 | * ---------- --- -------------------------------------------------------- |
| 723 | * | 723 | * |
| 724 | *==========================================================================*/ | 724 | *==========================================================================*/ |
| 725 | void send_IPI_allbutself(int ipi_num, int try) | 725 | static void send_IPI_allbutself(int ipi_num, int try) |
| 726 | { | 726 | { |
| 727 | cpumask_t cpumask; | 727 | cpumask_t cpumask; |
| 728 | 728 | ||
diff --git a/arch/m32r/kernel/time.c b/arch/m32r/kernel/time.c index 994cc1556355..6ea017727cce 100644 --- a/arch/m32r/kernel/time.c +++ b/arch/m32r/kernel/time.c | |||
| @@ -34,7 +34,6 @@ | |||
| 34 | #include <asm/hw_irq.h> | 34 | #include <asm/hw_irq.h> |
| 35 | 35 | ||
| 36 | #ifdef CONFIG_SMP | 36 | #ifdef CONFIG_SMP |
| 37 | extern void send_IPI_allbutself(int, int); | ||
| 38 | extern void smp_local_timer_interrupt(void); | 37 | extern void smp_local_timer_interrupt(void); |
| 39 | #endif | 38 | #endif |
| 40 | 39 | ||
| @@ -188,7 +187,7 @@ static long last_rtc_update = 0; | |||
| 188 | * timer_interrupt() needs to keep up the real-time clock, | 187 | * timer_interrupt() needs to keep up the real-time clock, |
| 189 | * as well as call the "do_timer()" routine every clocktick | 188 | * as well as call the "do_timer()" routine every clocktick |
| 190 | */ | 189 | */ |
| 191 | irqreturn_t timer_interrupt(int irq, void *dev_id) | 190 | static irqreturn_t timer_interrupt(int irq, void *dev_id) |
| 192 | { | 191 | { |
| 193 | #ifndef CONFIG_SMP | 192 | #ifndef CONFIG_SMP |
| 194 | profile_tick(CPU_PROFILING); | 193 | profile_tick(CPU_PROFILING); |
| @@ -228,7 +227,7 @@ irqreturn_t timer_interrupt(int irq, void *dev_id) | |||
| 228 | return IRQ_HANDLED; | 227 | return IRQ_HANDLED; |
| 229 | } | 228 | } |
| 230 | 229 | ||
| 231 | struct irqaction irq0 = { | 230 | static struct irqaction irq0 = { |
| 232 | .handler = timer_interrupt, | 231 | .handler = timer_interrupt, |
| 233 | .flags = IRQF_DISABLED, | 232 | .flags = IRQF_DISABLED, |
| 234 | .mask = CPU_MASK_NONE, | 233 | .mask = CPU_MASK_NONE, |
diff --git a/arch/m32r/kernel/traps.c b/arch/m32r/kernel/traps.c index 46159a4e644b..03b14e55cd89 100644 --- a/arch/m32r/kernel/traps.c +++ b/arch/m32r/kernel/traps.c | |||
| @@ -61,7 +61,7 @@ extern unsigned long eit_vector[]; | |||
| 61 | ((unsigned long)func - (unsigned long)eit_vector - entry*4)/4 \ | 61 | ((unsigned long)func - (unsigned long)eit_vector - entry*4)/4 \ |
| 62 | + 0xff000000UL | 62 | + 0xff000000UL |
| 63 | 63 | ||
| 64 | void set_eit_vector_entries(void) | 64 | static void set_eit_vector_entries(void) |
| 65 | { | 65 | { |
| 66 | extern void default_eit_handler(void); | 66 | extern void default_eit_handler(void); |
| 67 | extern void system_call(void); | 67 | extern void system_call(void); |
| @@ -121,9 +121,9 @@ void __init trap_init(void) | |||
| 121 | cpu_init(); | 121 | cpu_init(); |
| 122 | } | 122 | } |
| 123 | 123 | ||
| 124 | int kstack_depth_to_print = 24; | 124 | static int kstack_depth_to_print = 24; |
| 125 | 125 | ||
| 126 | void show_trace(struct task_struct *task, unsigned long *stack) | 126 | static void show_trace(struct task_struct *task, unsigned long *stack) |
| 127 | { | 127 | { |
| 128 | unsigned long addr; | 128 | unsigned long addr; |
| 129 | 129 | ||
| @@ -224,7 +224,7 @@ bad: | |||
| 224 | printk("\n"); | 224 | printk("\n"); |
| 225 | } | 225 | } |
| 226 | 226 | ||
| 227 | DEFINE_SPINLOCK(die_lock); | 227 | static DEFINE_SPINLOCK(die_lock); |
| 228 | 228 | ||
| 229 | void die(const char * str, struct pt_regs * regs, long err) | 229 | void die(const char * str, struct pt_regs * regs, long err) |
| 230 | { | 230 | { |
diff --git a/arch/m32r/lib/delay.c b/arch/m32r/lib/delay.c index 59bfc34e0d9f..ced549be80f5 100644 --- a/arch/m32r/lib/delay.c +++ b/arch/m32r/lib/delay.c | |||
| @@ -6,6 +6,7 @@ | |||
| 6 | */ | 6 | */ |
| 7 | 7 | ||
| 8 | #include <linux/param.h> | 8 | #include <linux/param.h> |
| 9 | #include <linux/module.h> | ||
| 9 | #ifdef CONFIG_SMP | 10 | #ifdef CONFIG_SMP |
| 10 | #include <linux/sched.h> | 11 | #include <linux/sched.h> |
| 11 | #include <asm/current.h> | 12 | #include <asm/current.h> |
| @@ -121,3 +122,4 @@ void __ndelay(unsigned long nsecs) | |||
| 121 | { | 122 | { |
| 122 | __const_udelay(nsecs * 0x00005); /* 2**32 / 1000000000 (rounded up) */ | 123 | __const_udelay(nsecs * 0x00005); /* 2**32 / 1000000000 (rounded up) */ |
| 123 | } | 124 | } |
| 125 | EXPORT_SYMBOL(__ndelay); | ||
diff --git a/arch/m32r/mm/discontig.c b/arch/m32r/mm/discontig.c index 07c1af7dc0e2..cbc3c4c54566 100644 --- a/arch/m32r/mm/discontig.c +++ b/arch/m32r/mm/discontig.c | |||
| @@ -20,7 +20,6 @@ extern char _end[]; | |||
| 20 | 20 | ||
| 21 | struct pglist_data *node_data[MAX_NUMNODES]; | 21 | struct pglist_data *node_data[MAX_NUMNODES]; |
| 22 | EXPORT_SYMBOL(node_data); | 22 | EXPORT_SYMBOL(node_data); |
| 23 | static bootmem_data_t node_bdata[MAX_NUMNODES] __initdata; | ||
| 24 | 23 | ||
| 25 | pg_data_t m32r_node_data[MAX_NUMNODES]; | 24 | pg_data_t m32r_node_data[MAX_NUMNODES]; |
| 26 | 25 | ||
| @@ -81,7 +80,7 @@ unsigned long __init setup_memory(void) | |||
| 81 | for_each_online_node(nid) { | 80 | for_each_online_node(nid) { |
| 82 | mp = &mem_prof[nid]; | 81 | mp = &mem_prof[nid]; |
| 83 | NODE_DATA(nid)=(pg_data_t *)&m32r_node_data[nid]; | 82 | NODE_DATA(nid)=(pg_data_t *)&m32r_node_data[nid]; |
| 84 | NODE_DATA(nid)->bdata = &node_bdata[nid]; | 83 | NODE_DATA(nid)->bdata = &bootmem_node_data[nid]; |
| 85 | min_pfn = mp->start_pfn; | 84 | min_pfn = mp->start_pfn; |
| 86 | max_pfn = mp->start_pfn + mp->pages; | 85 | max_pfn = mp->start_pfn + mp->pages; |
| 87 | bootmap_size = init_bootmem_node(NODE_DATA(nid), mp->free_pfn, | 86 | bootmap_size = init_bootmem_node(NODE_DATA(nid), mp->free_pfn, |
| @@ -124,8 +123,7 @@ unsigned long __init setup_memory(void) | |||
| 124 | return max_low_pfn; | 123 | return max_low_pfn; |
| 125 | } | 124 | } |
| 126 | 125 | ||
| 127 | #define START_PFN(nid) \ | 126 | #define START_PFN(nid) (NODE_DATA(nid)->bdata->node_min_pfn) |
| 128 | (NODE_DATA(nid)->bdata->node_boot_start >> PAGE_SHIFT) | ||
| 129 | #define MAX_LOW_PFN(nid) (NODE_DATA(nid)->bdata->node_low_pfn) | 127 | #define MAX_LOW_PFN(nid) (NODE_DATA(nid)->bdata->node_low_pfn) |
| 130 | 128 | ||
| 131 | unsigned long __init zone_sizes_init(void) | 129 | unsigned long __init zone_sizes_init(void) |
| @@ -148,8 +146,7 @@ unsigned long __init zone_sizes_init(void) | |||
| 148 | zholes_size[ZONE_DMA] = mp->holes; | 146 | zholes_size[ZONE_DMA] = mp->holes; |
| 149 | holes += zholes_size[ZONE_DMA]; | 147 | holes += zholes_size[ZONE_DMA]; |
| 150 | 148 | ||
| 151 | free_area_init_node(nid, NODE_DATA(nid), zones_size, | 149 | free_area_init_node(nid, zones_size, start_pfn, zholes_size); |
| 152 | start_pfn, zholes_size); | ||
| 153 | } | 150 | } |
| 154 | 151 | ||
| 155 | /* | 152 | /* |
| @@ -163,4 +160,3 @@ unsigned long __init zone_sizes_init(void) | |||
| 163 | 160 | ||
| 164 | return holes; | 161 | return holes; |
| 165 | } | 162 | } |
| 166 | |||
diff --git a/arch/m32r/mm/init.c b/arch/m32r/mm/init.c index bbd97c85bc5d..24d429f9358a 100644 --- a/arch/m32r/mm/init.c +++ b/arch/m32r/mm/init.c | |||
| @@ -36,42 +36,6 @@ pgd_t swapper_pg_dir[1024]; | |||
| 36 | 36 | ||
| 37 | DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); | 37 | DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); |
| 38 | 38 | ||
| 39 | void show_mem(void) | ||
| 40 | { | ||
| 41 | int total = 0, reserved = 0; | ||
| 42 | int shared = 0, cached = 0; | ||
| 43 | int highmem = 0; | ||
| 44 | struct page *page; | ||
| 45 | pg_data_t *pgdat; | ||
| 46 | unsigned long i; | ||
| 47 | |||
| 48 | printk("Mem-info:\n"); | ||
| 49 | show_free_areas(); | ||
| 50 | printk("Free swap: %6ldkB\n",nr_swap_pages<<(PAGE_SHIFT-10)); | ||
| 51 | for_each_online_pgdat(pgdat) { | ||
| 52 | unsigned long flags; | ||
| 53 | pgdat_resize_lock(pgdat, &flags); | ||
| 54 | for (i = 0; i < pgdat->node_spanned_pages; ++i) { | ||
| 55 | page = pgdat_page_nr(pgdat, i); | ||
| 56 | total++; | ||
| 57 | if (PageHighMem(page)) | ||
| 58 | highmem++; | ||
| 59 | if (PageReserved(page)) | ||
| 60 | reserved++; | ||
| 61 | else if (PageSwapCache(page)) | ||
| 62 | cached++; | ||
| 63 | else if (page_count(page)) | ||
| 64 | shared += page_count(page) - 1; | ||
| 65 | } | ||
| 66 | pgdat_resize_unlock(pgdat, &flags); | ||
| 67 | } | ||
| 68 | printk("%d pages of RAM\n", total); | ||
| 69 | printk("%d pages of HIGHMEM\n",highmem); | ||
| 70 | printk("%d reserved pages\n",reserved); | ||
| 71 | printk("%d pages shared\n",shared); | ||
| 72 | printk("%d pages swap cached\n",cached); | ||
| 73 | } | ||
| 74 | |||
| 75 | /* | 39 | /* |
| 76 | * Cache of MMU context last used. | 40 | * Cache of MMU context last used. |
| 77 | */ | 41 | */ |
| @@ -93,8 +57,7 @@ void free_initrd_mem(unsigned long, unsigned long); | |||
| 93 | #endif | 57 | #endif |
| 94 | 58 | ||
| 95 | /* It'd be good if these lines were in the standard header file. */ | 59 | /* It'd be good if these lines were in the standard header file. */ |
| 96 | #define START_PFN(nid) \ | 60 | #define START_PFN(nid) (NODE_DATA(nid)->bdata->node_min_pfn) |
| 97 | (NODE_DATA(nid)->bdata->node_boot_start >> PAGE_SHIFT) | ||
| 98 | #define MAX_LOW_PFN(nid) (NODE_DATA(nid)->bdata->node_low_pfn) | 61 | #define MAX_LOW_PFN(nid) (NODE_DATA(nid)->bdata->node_low_pfn) |
| 99 | 62 | ||
| 100 | #ifndef CONFIG_DISCONTIGMEM | 63 | #ifndef CONFIG_DISCONTIGMEM |
| @@ -123,7 +86,7 @@ unsigned long __init zone_sizes_init(void) | |||
| 123 | start_pfn = __MEMORY_START >> PAGE_SHIFT; | 86 | start_pfn = __MEMORY_START >> PAGE_SHIFT; |
| 124 | #endif /* CONFIG_MMU */ | 87 | #endif /* CONFIG_MMU */ |
| 125 | 88 | ||
| 126 | free_area_init_node(0, NODE_DATA(0), zones_size, start_pfn, 0); | 89 | free_area_init_node(0, zones_size, start_pfn, 0); |
| 127 | 90 | ||
| 128 | return 0; | 91 | return 0; |
| 129 | } | 92 | } |
| @@ -252,4 +215,3 @@ void free_initrd_mem(unsigned long start, unsigned long end) | |||
| 252 | printk (KERN_INFO "Freeing initrd memory: %ldk freed\n", (end - start) >> 10); | 215 | printk (KERN_INFO "Freeing initrd memory: %ldk freed\n", (end - start) >> 10); |
| 253 | } | 216 | } |
| 254 | #endif | 217 | #endif |
| 255 | |||
