diff options
Diffstat (limited to 'arch/ppc')
-rw-r--r-- | arch/ppc/4xx_io/serial_sicc.c | 2 | ||||
-rw-r--r-- | arch/ppc/Kconfig | 3 | ||||
-rw-r--r-- | arch/ppc/kernel/misc.S | 18 | ||||
-rw-r--r-- | arch/ppc/kernel/setup.c | 4 | ||||
-rw-r--r-- | arch/ppc/kernel/time.c | 13 | ||||
-rw-r--r-- | arch/ppc/kernel/traps.c | 2 | ||||
-rw-r--r-- | arch/ppc/mm/fault.c | 4 | ||||
-rw-r--r-- | arch/ppc/mm/init.c | 23 |
8 files changed, 29 insertions, 40 deletions
diff --git a/arch/ppc/4xx_io/serial_sicc.c b/arch/ppc/4xx_io/serial_sicc.c index b81a367dc278..87fe9a89dba7 100644 --- a/arch/ppc/4xx_io/serial_sicc.c +++ b/arch/ppc/4xx_io/serial_sicc.c | |||
@@ -1720,7 +1720,7 @@ static int siccuart_open(struct tty_struct *tty, struct file *filp) | |||
1720 | return 0; | 1720 | return 0; |
1721 | } | 1721 | } |
1722 | 1722 | ||
1723 | static struct tty_operations sicc_ops = { | 1723 | static const struct tty_operations sicc_ops = { |
1724 | .open = siccuart_open, | 1724 | .open = siccuart_open, |
1725 | .close = siccuart_close, | 1725 | .close = siccuart_close, |
1726 | .write = siccuart_write, | 1726 | .write = siccuart_write, |
diff --git a/arch/ppc/Kconfig b/arch/ppc/Kconfig index 8fa10cf661a8..fdd9e7b66244 100644 --- a/arch/ppc/Kconfig +++ b/arch/ppc/Kconfig | |||
@@ -953,6 +953,9 @@ config NR_CPUS | |||
953 | config HIGHMEM | 953 | config HIGHMEM |
954 | bool "High memory support" | 954 | bool "High memory support" |
955 | 955 | ||
956 | config ARCH_POPULATES_NODE_MAP | ||
957 | def_bool y | ||
958 | |||
956 | source kernel/Kconfig.hz | 959 | source kernel/Kconfig.hz |
957 | source kernel/Kconfig.preempt | 960 | source kernel/Kconfig.preempt |
958 | source "mm/Kconfig" | 961 | source "mm/Kconfig" |
diff --git a/arch/ppc/kernel/misc.S b/arch/ppc/kernel/misc.S index 50b4bbd06804..5f6684012ded 100644 --- a/arch/ppc/kernel/misc.S +++ b/arch/ppc/kernel/misc.S | |||
@@ -942,20 +942,16 @@ _GLOBAL(kernel_thread) | |||
942 | addi r1,r1,16 | 942 | addi r1,r1,16 |
943 | blr | 943 | blr |
944 | 944 | ||
945 | _GLOBAL(kernel_execve) | ||
946 | li r0,__NR_execve | ||
947 | sc | ||
948 | bnslr | ||
949 | neg r3,r3 | ||
950 | blr | ||
951 | |||
945 | /* | 952 | /* |
946 | * This routine is just here to keep GCC happy - sigh... | 953 | * This routine is just here to keep GCC happy - sigh... |
947 | */ | 954 | */ |
948 | _GLOBAL(__main) | 955 | _GLOBAL(__main) |
949 | blr | 956 | blr |
950 | 957 | ||
951 | #define SYSCALL(name) \ | ||
952 | _GLOBAL(name) \ | ||
953 | li r0,__NR_##name; \ | ||
954 | sc; \ | ||
955 | bnslr; \ | ||
956 | lis r4,errno@ha; \ | ||
957 | stw r3,errno@l(r4); \ | ||
958 | li r3,-1; \ | ||
959 | blr | ||
960 | |||
961 | SYSCALL(execve) | ||
diff --git a/arch/ppc/kernel/setup.c b/arch/ppc/kernel/setup.c index 5458ac5da7c3..75fe13815be2 100644 --- a/arch/ppc/kernel/setup.c +++ b/arch/ppc/kernel/setup.c | |||
@@ -86,10 +86,6 @@ int ppc_do_canonicalize_irqs; | |||
86 | EXPORT_SYMBOL(ppc_do_canonicalize_irqs); | 86 | EXPORT_SYMBOL(ppc_do_canonicalize_irqs); |
87 | #endif | 87 | #endif |
88 | 88 | ||
89 | #ifdef CONFIG_MAGIC_SYSRQ | ||
90 | unsigned long SYSRQ_KEY = 0x54; | ||
91 | #endif /* CONFIG_MAGIC_SYSRQ */ | ||
92 | |||
93 | #ifdef CONFIG_VGA_CONSOLE | 89 | #ifdef CONFIG_VGA_CONSOLE |
94 | unsigned long vgacon_remap_base; | 90 | unsigned long vgacon_remap_base; |
95 | #endif | 91 | #endif |
diff --git a/arch/ppc/kernel/time.c b/arch/ppc/kernel/time.c index 6ab8cc7226ab..187388625a76 100644 --- a/arch/ppc/kernel/time.c +++ b/arch/ppc/kernel/time.c | |||
@@ -80,8 +80,6 @@ unsigned tb_to_us; | |||
80 | unsigned tb_last_stamp; | 80 | unsigned tb_last_stamp; |
81 | unsigned long tb_to_ns_scale; | 81 | unsigned long tb_to_ns_scale; |
82 | 82 | ||
83 | extern unsigned long wall_jiffies; | ||
84 | |||
85 | /* used for timezone offset */ | 83 | /* used for timezone offset */ |
86 | static long timezone_offset; | 84 | static long timezone_offset; |
87 | 85 | ||
@@ -153,7 +151,7 @@ void timer_interrupt(struct pt_regs * regs) | |||
153 | /* We are in an interrupt, no need to save/restore flags */ | 151 | /* We are in an interrupt, no need to save/restore flags */ |
154 | write_seqlock(&xtime_lock); | 152 | write_seqlock(&xtime_lock); |
155 | tb_last_stamp = jiffy_stamp; | 153 | tb_last_stamp = jiffy_stamp; |
156 | do_timer(regs); | 154 | do_timer(1); |
157 | 155 | ||
158 | /* | 156 | /* |
159 | * update the rtc when needed, this should be performed on the | 157 | * update the rtc when needed, this should be performed on the |
@@ -173,8 +171,7 @@ void timer_interrupt(struct pt_regs * regs) | |||
173 | */ | 171 | */ |
174 | if ( ppc_md.set_rtc_time && ntp_synced() && | 172 | if ( ppc_md.set_rtc_time && ntp_synced() && |
175 | xtime.tv_sec - last_rtc_update >= 659 && | 173 | xtime.tv_sec - last_rtc_update >= 659 && |
176 | abs((xtime.tv_nsec / 1000) - (1000000-1000000/HZ)) < 500000/HZ && | 174 | abs((xtime.tv_nsec / 1000) - (1000000-1000000/HZ)) < 500000/HZ) { |
177 | jiffies - wall_jiffies == 1) { | ||
178 | if (ppc_md.set_rtc_time(xtime.tv_sec+1 + timezone_offset) == 0) | 175 | if (ppc_md.set_rtc_time(xtime.tv_sec+1 + timezone_offset) == 0) |
179 | last_rtc_update = xtime.tv_sec+1; | 176 | last_rtc_update = xtime.tv_sec+1; |
180 | else | 177 | else |
@@ -200,7 +197,7 @@ void do_gettimeofday(struct timeval *tv) | |||
200 | { | 197 | { |
201 | unsigned long flags; | 198 | unsigned long flags; |
202 | unsigned long seq; | 199 | unsigned long seq; |
203 | unsigned delta, lost_ticks, usec, sec; | 200 | unsigned delta, usec, sec; |
204 | 201 | ||
205 | do { | 202 | do { |
206 | seq = read_seqbegin_irqsave(&xtime_lock, flags); | 203 | seq = read_seqbegin_irqsave(&xtime_lock, flags); |
@@ -214,10 +211,9 @@ void do_gettimeofday(struct timeval *tv) | |||
214 | if (!smp_tb_synchronized) | 211 | if (!smp_tb_synchronized) |
215 | delta = 0; | 212 | delta = 0; |
216 | #endif /* CONFIG_SMP */ | 213 | #endif /* CONFIG_SMP */ |
217 | lost_ticks = jiffies - wall_jiffies; | ||
218 | } while (read_seqretry_irqrestore(&xtime_lock, seq, flags)); | 214 | } while (read_seqretry_irqrestore(&xtime_lock, seq, flags)); |
219 | 215 | ||
220 | usec += mulhwu(tb_to_us, tb_ticks_per_jiffy * lost_ticks + delta); | 216 | usec += mulhwu(tb_to_us, delta); |
221 | while (usec >= 1000000) { | 217 | while (usec >= 1000000) { |
222 | sec++; | 218 | sec++; |
223 | usec -= 1000000; | 219 | usec -= 1000000; |
@@ -258,7 +254,6 @@ int do_settimeofday(struct timespec *tv) | |||
258 | * still reasonable when gettimeofday resolution is 1 jiffy. | 254 | * still reasonable when gettimeofday resolution is 1 jiffy. |
259 | */ | 255 | */ |
260 | tb_delta = tb_ticks_since(last_jiffy_stamp(smp_processor_id())); | 256 | tb_delta = tb_ticks_since(last_jiffy_stamp(smp_processor_id())); |
261 | tb_delta += (jiffies - wall_jiffies) * tb_ticks_per_jiffy; | ||
262 | 257 | ||
263 | new_nsec -= 1000 * mulhwu(tb_to_us, tb_delta); | 258 | new_nsec -= 1000 * mulhwu(tb_to_us, tb_delta); |
264 | 259 | ||
diff --git a/arch/ppc/kernel/traps.c b/arch/ppc/kernel/traps.c index d7a433049b48..aafc8e8893d1 100644 --- a/arch/ppc/kernel/traps.c +++ b/arch/ppc/kernel/traps.c | |||
@@ -119,7 +119,7 @@ void _exception(int signr, struct pt_regs *regs, int code, unsigned long addr) | |||
119 | * generate the same exception over and over again and we get | 119 | * generate the same exception over and over again and we get |
120 | * nowhere. Better to kill it and let the kernel panic. | 120 | * nowhere. Better to kill it and let the kernel panic. |
121 | */ | 121 | */ |
122 | if (current->pid == 1) { | 122 | if (is_init(current)) { |
123 | __sighandler_t handler; | 123 | __sighandler_t handler; |
124 | 124 | ||
125 | spin_lock_irq(¤t->sighand->siglock); | 125 | spin_lock_irq(¤t->sighand->siglock); |
diff --git a/arch/ppc/mm/fault.c b/arch/ppc/mm/fault.c index 5cdfb71fcb07..465f451f3bc3 100644 --- a/arch/ppc/mm/fault.c +++ b/arch/ppc/mm/fault.c | |||
@@ -239,7 +239,7 @@ good_area: | |||
239 | /* protection fault */ | 239 | /* protection fault */ |
240 | if (error_code & 0x08000000) | 240 | if (error_code & 0x08000000) |
241 | goto bad_area; | 241 | goto bad_area; |
242 | if (!(vma->vm_flags & (VM_READ | VM_EXEC))) | 242 | if (!(vma->vm_flags & (VM_READ | VM_EXEC | VM_WRITE))) |
243 | goto bad_area; | 243 | goto bad_area; |
244 | } | 244 | } |
245 | 245 | ||
@@ -291,7 +291,7 @@ bad_area: | |||
291 | */ | 291 | */ |
292 | out_of_memory: | 292 | out_of_memory: |
293 | up_read(&mm->mmap_sem); | 293 | up_read(&mm->mmap_sem); |
294 | if (current->pid == 1) { | 294 | if (is_init(current)) { |
295 | yield(); | 295 | yield(); |
296 | down_read(&mm->mmap_sem); | 296 | down_read(&mm->mmap_sem); |
297 | goto survive; | 297 | goto survive; |
diff --git a/arch/ppc/mm/init.c b/arch/ppc/mm/init.c index 523392d460fa..410200046af1 100644 --- a/arch/ppc/mm/init.c +++ b/arch/ppc/mm/init.c | |||
@@ -358,8 +358,8 @@ void __init do_init_bootmem(void) | |||
358 | */ | 358 | */ |
359 | void __init paging_init(void) | 359 | void __init paging_init(void) |
360 | { | 360 | { |
361 | unsigned long zones_size[MAX_NR_ZONES], i; | 361 | unsigned long start_pfn, end_pfn; |
362 | 362 | unsigned long max_zone_pfns[MAX_NR_ZONES]; | |
363 | #ifdef CONFIG_HIGHMEM | 363 | #ifdef CONFIG_HIGHMEM |
364 | map_page(PKMAP_BASE, 0, 0); /* XXX gross */ | 364 | map_page(PKMAP_BASE, 0, 0); /* XXX gross */ |
365 | pkmap_page_table = pte_offset_kernel(pmd_offset(pgd_offset_k | 365 | pkmap_page_table = pte_offset_kernel(pmd_offset(pgd_offset_k |
@@ -369,19 +369,18 @@ void __init paging_init(void) | |||
369 | (KMAP_FIX_BEGIN), KMAP_FIX_BEGIN), KMAP_FIX_BEGIN); | 369 | (KMAP_FIX_BEGIN), KMAP_FIX_BEGIN), KMAP_FIX_BEGIN); |
370 | kmap_prot = PAGE_KERNEL; | 370 | kmap_prot = PAGE_KERNEL; |
371 | #endif /* CONFIG_HIGHMEM */ | 371 | #endif /* CONFIG_HIGHMEM */ |
372 | 372 | /* All pages are DMA-able so we put them all in the DMA zone. */ | |
373 | /* | 373 | start_pfn = __pa(PAGE_OFFSET) >> PAGE_SHIFT; |
374 | * All pages are DMA-able so we put them all in the DMA zone. | 374 | end_pfn = start_pfn + (total_memory >> PAGE_SHIFT); |
375 | */ | 375 | add_active_range(0, start_pfn, end_pfn); |
376 | zones_size[ZONE_DMA] = total_lowmem >> PAGE_SHIFT; | ||
377 | for (i = 1; i < MAX_NR_ZONES; i++) | ||
378 | zones_size[i] = 0; | ||
379 | 376 | ||
380 | #ifdef CONFIG_HIGHMEM | 377 | #ifdef CONFIG_HIGHMEM |
381 | zones_size[ZONE_HIGHMEM] = (total_memory - total_lowmem) >> PAGE_SHIFT; | 378 | max_zone_pfns[0] = total_lowmem >> PAGE_SHIFT; |
379 | max_zone_pfns[1] = total_memory >> PAGE_SHIFT; | ||
380 | #else | ||
381 | max_zone_pfns[0] = total_memory >> PAGE_SHIFT; | ||
382 | #endif /* CONFIG_HIGHMEM */ | 382 | #endif /* CONFIG_HIGHMEM */ |
383 | 383 | free_area_init_nodes(max_zone_pfns); | |
384 | free_area_init(zones_size); | ||
385 | } | 384 | } |
386 | 385 | ||
387 | void __init mem_init(void) | 386 | void __init mem_init(void) |