diff options
Diffstat (limited to 'arch/m68k')
37 files changed, 127 insertions, 117 deletions
diff --git a/arch/m68k/amiga/amiints.c b/arch/m68k/amiga/amiints.c index 907a5533c845..c5b5212cc3f9 100644 --- a/arch/m68k/amiga/amiints.c +++ b/arch/m68k/amiga/amiints.c | |||
@@ -72,10 +72,14 @@ static struct irq_controller amiga_irq_controller = { | |||
72 | 72 | ||
73 | void __init amiga_init_IRQ(void) | 73 | void __init amiga_init_IRQ(void) |
74 | { | 74 | { |
75 | request_irq(IRQ_AUTO_1, ami_int1, 0, "int1", NULL); | 75 | if (request_irq(IRQ_AUTO_1, ami_int1, 0, "int1", NULL)) |
76 | request_irq(IRQ_AUTO_3, ami_int3, 0, "int3", NULL); | 76 | pr_err("Couldn't register int%d\n", 1); |
77 | request_irq(IRQ_AUTO_4, ami_int4, 0, "int4", NULL); | 77 | if (request_irq(IRQ_AUTO_3, ami_int3, 0, "int3", NULL)) |
78 | request_irq(IRQ_AUTO_5, ami_int5, 0, "int5", NULL); | 78 | pr_err("Couldn't register int%d\n", 3); |
79 | if (request_irq(IRQ_AUTO_4, ami_int4, 0, "int4", NULL)) | ||
80 | pr_err("Couldn't register int%d\n", 4); | ||
81 | if (request_irq(IRQ_AUTO_5, ami_int5, 0, "int5", NULL)) | ||
82 | pr_err("Couldn't register int%d\n", 5); | ||
79 | 83 | ||
80 | m68k_setup_irq_controller(&amiga_irq_controller, IRQ_USER, AMI_STD_IRQS); | 84 | m68k_setup_irq_controller(&amiga_irq_controller, IRQ_USER, AMI_STD_IRQS); |
81 | 85 | ||
diff --git a/arch/m68k/amiga/cia.c b/arch/m68k/amiga/cia.c index 343fab49bd9a..ecd0f7ca6f0e 100644 --- a/arch/m68k/amiga/cia.c +++ b/arch/m68k/amiga/cia.c | |||
@@ -176,5 +176,7 @@ void __init cia_init_IRQ(struct ciabase *base) | |||
176 | /* override auto int and install CIA handler */ | 176 | /* override auto int and install CIA handler */ |
177 | m68k_setup_irq_controller(&auto_irq_controller, base->handler_irq, 1); | 177 | m68k_setup_irq_controller(&auto_irq_controller, base->handler_irq, 1); |
178 | m68k_irq_startup(base->handler_irq); | 178 | m68k_irq_startup(base->handler_irq); |
179 | request_irq(base->handler_irq, cia_handler, IRQF_SHARED, base->name, base); | 179 | if (request_irq(base->handler_irq, cia_handler, IRQF_SHARED, |
180 | base->name, base)) | ||
181 | pr_err("Couldn't register %s interrupt\n", base->name); | ||
180 | } | 182 | } |
diff --git a/arch/m68k/amiga/config.c b/arch/m68k/amiga/config.c index ab9862c3a136..6e562751ad51 100644 --- a/arch/m68k/amiga/config.c +++ b/arch/m68k/amiga/config.c | |||
@@ -493,7 +493,8 @@ static void __init amiga_sched_init(irq_handler_t timer_routine) | |||
493 | * Please don't change this to use ciaa, as it interferes with the | 493 | * Please don't change this to use ciaa, as it interferes with the |
494 | * SCSI code. We'll have to take a look at this later | 494 | * SCSI code. We'll have to take a look at this later |
495 | */ | 495 | */ |
496 | request_irq(IRQ_AMIGA_CIAB_TA, timer_routine, 0, "timer", NULL); | 496 | if (request_irq(IRQ_AMIGA_CIAB_TA, timer_routine, 0, "timer", NULL)) |
497 | pr_err("Couldn't register timer interrupt\n"); | ||
497 | /* start timer */ | 498 | /* start timer */ |
498 | ciab.cra |= 0x11; | 499 | ciab.cra |= 0x11; |
499 | } | 500 | } |
diff --git a/arch/m68k/apollo/config.c b/arch/m68k/apollo/config.c index 78df98f2029a..8d3eafab1ffe 100644 --- a/arch/m68k/apollo/config.c +++ b/arch/m68k/apollo/config.c | |||
@@ -31,10 +31,6 @@ extern unsigned long dn_gettimeoffset(void); | |||
31 | extern int dn_dummy_hwclk(int, struct rtc_time *); | 31 | extern int dn_dummy_hwclk(int, struct rtc_time *); |
32 | extern int dn_dummy_set_clock_mmss(unsigned long); | 32 | extern int dn_dummy_set_clock_mmss(unsigned long); |
33 | extern void dn_dummy_reset(void); | 33 | extern void dn_dummy_reset(void); |
34 | extern void dn_dummy_waitbut(void); | ||
35 | extern struct fb_info *dn_fb_init(long *); | ||
36 | extern void dn_dummy_debug_init(void); | ||
37 | extern irqreturn_t dn_process_int(int irq, struct pt_regs *fp); | ||
38 | #ifdef CONFIG_HEARTBEAT | 34 | #ifdef CONFIG_HEARTBEAT |
39 | static void dn_heartbeat(int on); | 35 | static void dn_heartbeat(int on); |
40 | #endif | 36 | #endif |
@@ -204,7 +200,8 @@ void dn_sched_init(irq_handler_t timer_routine) | |||
204 | printk("*(0x10803) %02x\n",*(volatile unsigned char *)(timer+0x3)); | 200 | printk("*(0x10803) %02x\n",*(volatile unsigned char *)(timer+0x3)); |
205 | #endif | 201 | #endif |
206 | 202 | ||
207 | request_irq(IRQ_APOLLO, dn_timer_int, 0, "time", timer_routine); | 203 | if (request_irq(IRQ_APOLLO, dn_timer_int, 0, "time", timer_routine)) |
204 | pr_err("Couldn't register timer interrupt\n"); | ||
208 | } | 205 | } |
209 | 206 | ||
210 | unsigned long dn_gettimeoffset(void) { | 207 | unsigned long dn_gettimeoffset(void) { |
diff --git a/arch/m68k/atari/atakeyb.c b/arch/m68k/atari/atakeyb.c index c038b7c7eff0..a5f33c059979 100644 --- a/arch/m68k/atari/atakeyb.c +++ b/arch/m68k/atari/atakeyb.c | |||
@@ -33,7 +33,6 @@ | |||
33 | #include <asm/atari_joystick.h> | 33 | #include <asm/atari_joystick.h> |
34 | #include <asm/irq.h> | 34 | #include <asm/irq.h> |
35 | 35 | ||
36 | extern unsigned int keymap_count; | ||
37 | 36 | ||
38 | /* Hook for MIDI serial driver */ | 37 | /* Hook for MIDI serial driver */ |
39 | void (*atari_MIDI_interrupt_hook) (void); | 38 | void (*atari_MIDI_interrupt_hook) (void); |
@@ -567,14 +566,19 @@ static int atari_keyb_done = 0; | |||
567 | 566 | ||
568 | int atari_keyb_init(void) | 567 | int atari_keyb_init(void) |
569 | { | 568 | { |
569 | int error; | ||
570 | |||
570 | if (atari_keyb_done) | 571 | if (atari_keyb_done) |
571 | return 0; | 572 | return 0; |
572 | 573 | ||
573 | kb_state.state = KEYBOARD; | 574 | kb_state.state = KEYBOARD; |
574 | kb_state.len = 0; | 575 | kb_state.len = 0; |
575 | 576 | ||
576 | request_irq(IRQ_MFP_ACIA, atari_keyboard_interrupt, IRQ_TYPE_SLOW, | 577 | error = request_irq(IRQ_MFP_ACIA, atari_keyboard_interrupt, |
577 | "keyboard/mouse/MIDI", atari_keyboard_interrupt); | 578 | IRQ_TYPE_SLOW, "keyboard/mouse/MIDI", |
579 | atari_keyboard_interrupt); | ||
580 | if (error) | ||
581 | return error; | ||
578 | 582 | ||
579 | atari_turnoff_irq(IRQ_MFP_ACIA); | 583 | atari_turnoff_irq(IRQ_MFP_ACIA); |
580 | do { | 584 | do { |
diff --git a/arch/m68k/atari/stdma.c b/arch/m68k/atari/stdma.c index d1bd029a34ac..604329fafbb8 100644 --- a/arch/m68k/atari/stdma.c +++ b/arch/m68k/atari/stdma.c | |||
@@ -179,8 +179,9 @@ EXPORT_SYMBOL(stdma_islocked); | |||
179 | void __init stdma_init(void) | 179 | void __init stdma_init(void) |
180 | { | 180 | { |
181 | stdma_isr = NULL; | 181 | stdma_isr = NULL; |
182 | request_irq(IRQ_MFP_FDC, stdma_int, IRQ_TYPE_SLOW | IRQF_SHARED, | 182 | if (request_irq(IRQ_MFP_FDC, stdma_int, IRQ_TYPE_SLOW | IRQF_SHARED, |
183 | "ST-DMA: floppy/ACSI/IDE/Falcon-SCSI", stdma_int); | 183 | "ST-DMA: floppy/ACSI/IDE/Falcon-SCSI", stdma_int)) |
184 | pr_err("Couldn't register ST-DMA interrupt\n"); | ||
184 | } | 185 | } |
185 | 186 | ||
186 | 187 | ||
diff --git a/arch/m68k/atari/time.c b/arch/m68k/atari/time.c index 1edde27fa32d..d076ff8d1b39 100644 --- a/arch/m68k/atari/time.c +++ b/arch/m68k/atari/time.c | |||
@@ -31,8 +31,9 @@ atari_sched_init(irq_handler_t timer_routine) | |||
31 | /* start timer C, div = 1:100 */ | 31 | /* start timer C, div = 1:100 */ |
32 | mfp.tim_ct_cd = (mfp.tim_ct_cd & 15) | 0x60; | 32 | mfp.tim_ct_cd = (mfp.tim_ct_cd & 15) | 0x60; |
33 | /* install interrupt service routine for MFP Timer C */ | 33 | /* install interrupt service routine for MFP Timer C */ |
34 | request_irq(IRQ_MFP_TIMC, timer_routine, IRQ_TYPE_SLOW, | 34 | if (request_irq(IRQ_MFP_TIMC, timer_routine, IRQ_TYPE_SLOW, |
35 | "timer", timer_routine); | 35 | "timer", timer_routine)) |
36 | pr_err("Couldn't register timer interrupt\n"); | ||
36 | } | 37 | } |
37 | 38 | ||
38 | /* ++andreas: gettimeoffset fixed to check for pending interrupt */ | 39 | /* ++andreas: gettimeoffset fixed to check for pending interrupt */ |
diff --git a/arch/m68k/bvme6000/config.c b/arch/m68k/bvme6000/config.c index c072595928c0..9fe6fefb5e14 100644 --- a/arch/m68k/bvme6000/config.c +++ b/arch/m68k/bvme6000/config.c | |||
@@ -43,7 +43,6 @@ extern unsigned long bvme6000_gettimeoffset (void); | |||
43 | extern int bvme6000_hwclk (int, struct rtc_time *); | 43 | extern int bvme6000_hwclk (int, struct rtc_time *); |
44 | extern int bvme6000_set_clock_mmss (unsigned long); | 44 | extern int bvme6000_set_clock_mmss (unsigned long); |
45 | extern void bvme6000_reset (void); | 45 | extern void bvme6000_reset (void); |
46 | extern void bvme6000_waitbut(void); | ||
47 | void bvme6000_set_vectors (void); | 46 | void bvme6000_set_vectors (void); |
48 | 47 | ||
49 | /* Save tick handler routine pointer, will point to do_timer() in | 48 | /* Save tick handler routine pointer, will point to do_timer() in |
diff --git a/arch/m68k/hp300/time.c b/arch/m68k/hp300/time.c index dd7c8a2583d3..f6312c7d8727 100644 --- a/arch/m68k/hp300/time.c +++ b/arch/m68k/hp300/time.c | |||
@@ -70,7 +70,8 @@ void __init hp300_sched_init(irq_handler_t vector) | |||
70 | 70 | ||
71 | asm volatile(" movpw %0,%1@(5)" : : "d" (INTVAL), "a" (CLOCKBASE)); | 71 | asm volatile(" movpw %0,%1@(5)" : : "d" (INTVAL), "a" (CLOCKBASE)); |
72 | 72 | ||
73 | request_irq(IRQ_AUTO_6, hp300_tick, IRQ_FLG_STD, "timer tick", vector); | 73 | if (request_irq(IRQ_AUTO_6, hp300_tick, IRQ_FLG_STD, "timer tick", vector)) |
74 | pr_err("Couldn't register timer interrupt\n"); | ||
74 | 75 | ||
75 | out_8(CLOCKBASE + CLKCR2, 0x1); /* select CR1 */ | 76 | out_8(CLOCKBASE + CLKCR2, 0x1); /* select CR1 */ |
76 | out_8(CLOCKBASE + CLKCR1, 0x40); /* enable irq */ | 77 | out_8(CLOCKBASE + CLKCR1, 0x40); /* enable irq */ |
diff --git a/arch/m68k/include/asm/Kbuild b/arch/m68k/include/asm/Kbuild index 52fd96b4142a..1a922fad76f7 100644 --- a/arch/m68k/include/asm/Kbuild +++ b/arch/m68k/include/asm/Kbuild | |||
@@ -1,3 +1,2 @@ | |||
1 | include include/asm-generic/Kbuild.asm | 1 | include include/asm-generic/Kbuild.asm |
2 | header-y += cachectl.h | 2 | header-y += cachectl.h |
3 | unifdef-y += swab.h | ||
diff --git a/arch/m68k/include/asm/byteorder_mm.h b/arch/m68k/include/asm/byteorder_mm.h index 300866523b86..31b260a88803 100644 --- a/arch/m68k/include/asm/byteorder_mm.h +++ b/arch/m68k/include/asm/byteorder_mm.h | |||
@@ -1,7 +1,6 @@ | |||
1 | #ifndef _M68K_BYTEORDER_H | 1 | #ifndef _M68K_BYTEORDER_H |
2 | #define _M68K_BYTEORDER_H | 2 | #define _M68K_BYTEORDER_H |
3 | 3 | ||
4 | #include <asm/swab.h> | ||
5 | #include <linux/byteorder/big_endian.h> | 4 | #include <linux/byteorder/big_endian.h> |
6 | 5 | ||
7 | #endif /* _M68K_BYTEORDER_H */ | 6 | #endif /* _M68K_BYTEORDER_H */ |
diff --git a/arch/m68k/include/asm/byteorder_no.h b/arch/m68k/include/asm/byteorder_no.h index a6f0b8f7f622..9c6c76a15041 100644 --- a/arch/m68k/include/asm/byteorder_no.h +++ b/arch/m68k/include/asm/byteorder_no.h | |||
@@ -1,7 +1,6 @@ | |||
1 | #ifndef _M68KNOMMU_BYTEORDER_H | 1 | #ifndef _M68KNOMMU_BYTEORDER_H |
2 | #define _M68KNOMMU_BYTEORDER_H | 2 | #define _M68KNOMMU_BYTEORDER_H |
3 | 3 | ||
4 | #include <asm/swab.h> | ||
5 | #include <linux/byteorder/big_endian.h> | 4 | #include <linux/byteorder/big_endian.h> |
6 | 5 | ||
7 | #endif /* _M68KNOMMU_BYTEORDER_H */ | 6 | #endif /* _M68KNOMMU_BYTEORDER_H */ |
diff --git a/arch/m68k/include/asm/unistd_mm.h b/arch/m68k/include/asm/unistd_mm.h index 965abb8bc7ff..3c19027331fa 100644 --- a/arch/m68k/include/asm/unistd_mm.h +++ b/arch/m68k/include/asm/unistd_mm.h | |||
@@ -5,6 +5,7 @@ | |||
5 | * This file contains the system call numbers. | 5 | * This file contains the system call numbers. |
6 | */ | 6 | */ |
7 | 7 | ||
8 | #define __NR_restart_syscall 0 | ||
8 | #define __NR_exit 1 | 9 | #define __NR_exit 1 |
9 | #define __NR_fork 2 | 10 | #define __NR_fork 2 |
10 | #define __NR_read 3 | 11 | #define __NR_read 3 |
@@ -359,9 +360,6 @@ | |||
359 | #define __ARCH_WANT_SYS_SIGPROCMASK | 360 | #define __ARCH_WANT_SYS_SIGPROCMASK |
360 | #define __ARCH_WANT_SYS_RT_SIGACTION | 361 | #define __ARCH_WANT_SYS_RT_SIGACTION |
361 | 362 | ||
362 | /* whitelist for checksyscalls */ | ||
363 | #define __IGNORE_restart_syscall | ||
364 | |||
365 | /* | 363 | /* |
366 | * "Conditional" syscalls | 364 | * "Conditional" syscalls |
367 | * | 365 | * |
diff --git a/arch/m68k/kernel/.gitignore b/arch/m68k/kernel/.gitignore new file mode 100644 index 000000000000..c5f676c3c224 --- /dev/null +++ b/arch/m68k/kernel/.gitignore | |||
@@ -0,0 +1 @@ | |||
vmlinux.lds | |||
diff --git a/arch/m68k/kernel/entry.S b/arch/m68k/kernel/entry.S index f28404d9a2bc..5c332f2b9b83 100644 --- a/arch/m68k/kernel/entry.S +++ b/arch/m68k/kernel/entry.S | |||
@@ -424,7 +424,7 @@ resume: | |||
424 | .data | 424 | .data |
425 | ALIGN | 425 | ALIGN |
426 | sys_call_table: | 426 | sys_call_table: |
427 | .long sys_ni_syscall /* 0 - old "setup()" system call*/ | 427 | .long sys_restart_syscall /* 0 - old "setup()" system call, used for restarting */ |
428 | .long sys_exit | 428 | .long sys_exit |
429 | .long sys_fork | 429 | .long sys_fork |
430 | .long sys_read | 430 | .long sys_read |
@@ -513,7 +513,7 @@ sys_call_table: | |||
513 | .long sys_uselib | 513 | .long sys_uselib |
514 | .long sys_swapon | 514 | .long sys_swapon |
515 | .long sys_reboot | 515 | .long sys_reboot |
516 | .long old_readdir | 516 | .long sys_old_readdir |
517 | .long old_mmap /* 90 */ | 517 | .long old_mmap /* 90 */ |
518 | .long sys_munmap | 518 | .long sys_munmap |
519 | .long sys_truncate | 519 | .long sys_truncate |
diff --git a/arch/m68k/kernel/setup.c b/arch/m68k/kernel/setup.c index 4d97bd2bd573..303730afb1c9 100644 --- a/arch/m68k/kernel/setup.c +++ b/arch/m68k/kernel/setup.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/initrd.h> | 26 | #include <linux/initrd.h> |
27 | 27 | ||
28 | #include <asm/bootinfo.h> | 28 | #include <asm/bootinfo.h> |
29 | #include <asm/sections.h> | ||
29 | #include <asm/setup.h> | 30 | #include <asm/setup.h> |
30 | #include <asm/fpu.h> | 31 | #include <asm/fpu.h> |
31 | #include <asm/irq.h> | 32 | #include <asm/irq.h> |
@@ -62,7 +63,6 @@ EXPORT_SYMBOL(vme_brdtype); | |||
62 | int m68k_is040or060; | 63 | int m68k_is040or060; |
63 | EXPORT_SYMBOL(m68k_is040or060); | 64 | EXPORT_SYMBOL(m68k_is040or060); |
64 | 65 | ||
65 | extern int end; | ||
66 | extern unsigned long availmem; | 66 | extern unsigned long availmem; |
67 | 67 | ||
68 | int m68k_num_memory; | 68 | int m68k_num_memory; |
@@ -215,11 +215,10 @@ static void __init m68k_parse_bootinfo(const struct bi_record *record) | |||
215 | 215 | ||
216 | void __init setup_arch(char **cmdline_p) | 216 | void __init setup_arch(char **cmdline_p) |
217 | { | 217 | { |
218 | extern int _etext, _edata, _end; | ||
219 | int i; | 218 | int i; |
220 | 219 | ||
221 | /* The bootinfo is located right after the kernel bss */ | 220 | /* The bootinfo is located right after the kernel bss */ |
222 | m68k_parse_bootinfo((const struct bi_record *)&_end); | 221 | m68k_parse_bootinfo((const struct bi_record *)_end); |
223 | 222 | ||
224 | if (CPU_IS_040) | 223 | if (CPU_IS_040) |
225 | m68k_is040or060 = 4; | 224 | m68k_is040or060 = 4; |
@@ -252,9 +251,9 @@ void __init setup_arch(char **cmdline_p) | |||
252 | } | 251 | } |
253 | 252 | ||
254 | init_mm.start_code = PAGE_OFFSET; | 253 | init_mm.start_code = PAGE_OFFSET; |
255 | init_mm.end_code = (unsigned long) &_etext; | 254 | init_mm.end_code = (unsigned long)_etext; |
256 | init_mm.end_data = (unsigned long) &_edata; | 255 | init_mm.end_data = (unsigned long)_edata; |
257 | init_mm.brk = (unsigned long) &_end; | 256 | init_mm.brk = (unsigned long)_end; |
258 | 257 | ||
259 | *cmdline_p = m68k_command_line; | 258 | *cmdline_p = m68k_command_line; |
260 | memcpy(boot_command_line, *cmdline_p, CL_SIZE); | 259 | memcpy(boot_command_line, *cmdline_p, CL_SIZE); |
diff --git a/arch/m68k/kernel/signal.c b/arch/m68k/kernel/signal.c index f9af893cd289..de2d05ddd86d 100644 --- a/arch/m68k/kernel/signal.c +++ b/arch/m68k/kernel/signal.c | |||
@@ -326,6 +326,9 @@ restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *usc, void __u | |||
326 | struct sigcontext context; | 326 | struct sigcontext context; |
327 | int err; | 327 | int err; |
328 | 328 | ||
329 | /* Always make any pending restarted system calls return -EINTR */ | ||
330 | current_thread_info()->restart_block.fn = do_no_restart_syscall; | ||
331 | |||
329 | /* get previous context */ | 332 | /* get previous context */ |
330 | if (copy_from_user(&context, usc, sizeof(context))) | 333 | if (copy_from_user(&context, usc, sizeof(context))) |
331 | goto badframe; | 334 | goto badframe; |
@@ -411,6 +414,9 @@ rt_restore_ucontext(struct pt_regs *regs, struct switch_stack *sw, | |||
411 | unsigned long usp; | 414 | unsigned long usp; |
412 | int err; | 415 | int err; |
413 | 416 | ||
417 | /* Always make any pending restarted system calls return -EINTR */ | ||
418 | current_thread_info()->restart_block.fn = do_no_restart_syscall; | ||
419 | |||
414 | err = __get_user(temp, &uc->uc_mcontext.version); | 420 | err = __get_user(temp, &uc->uc_mcontext.version); |
415 | if (temp != MCONTEXT_VERSION) | 421 | if (temp != MCONTEXT_VERSION) |
416 | goto badframe; | 422 | goto badframe; |
@@ -937,6 +943,15 @@ handle_restart(struct pt_regs *regs, struct k_sigaction *ka, int has_handler) | |||
937 | regs->d0 = -EINTR; | 943 | regs->d0 = -EINTR; |
938 | break; | 944 | break; |
939 | 945 | ||
946 | case -ERESTART_RESTARTBLOCK: | ||
947 | if (!has_handler) { | ||
948 | regs->d0 = __NR_restart_syscall; | ||
949 | regs->pc -= 2; | ||
950 | break; | ||
951 | } | ||
952 | regs->d0 = -EINTR; | ||
953 | break; | ||
954 | |||
940 | case -ERESTARTSYS: | 955 | case -ERESTARTSYS: |
941 | if (has_handler && !(ka->sa.sa_flags & SA_RESTART)) { | 956 | if (has_handler && !(ka->sa.sa_flags & SA_RESTART)) { |
942 | regs->d0 = -EINTR; | 957 | regs->d0 = -EINTR; |
diff --git a/arch/m68k/kernel/vmlinux-sun3.lds b/arch/m68k/kernel/vmlinux-sun3.lds index 8a4919e4d36a..d9368c0709ba 100644 --- a/arch/m68k/kernel/vmlinux-sun3.lds +++ b/arch/m68k/kernel/vmlinux-sun3.lds | |||
@@ -33,6 +33,7 @@ SECTIONS | |||
33 | } :data | 33 | } :data |
34 | /* End of data goes *here* so that freeing init code works properly. */ | 34 | /* End of data goes *here* so that freeing init code works properly. */ |
35 | _edata = .; | 35 | _edata = .; |
36 | NOTES | ||
36 | 37 | ||
37 | /* will be freed after init */ | 38 | /* will be freed after init */ |
38 | . = ALIGN(PAGE_SIZE); /* Init code and data */ | 39 | . = ALIGN(PAGE_SIZE); /* Init code and data */ |
diff --git a/arch/m68k/mac/baboon.c b/arch/m68k/mac/baboon.c index 245d16d078ad..2a96bebd8969 100644 --- a/arch/m68k/mac/baboon.c +++ b/arch/m68k/mac/baboon.c | |||
@@ -92,7 +92,8 @@ static irqreturn_t baboon_irq(int irq, void *dev_id) | |||
92 | void __init baboon_register_interrupts(void) | 92 | void __init baboon_register_interrupts(void) |
93 | { | 93 | { |
94 | baboon_disabled = 0; | 94 | baboon_disabled = 0; |
95 | request_irq(IRQ_NUBUS_C, baboon_irq, 0, "baboon", (void *)baboon); | 95 | if (request_irq(IRQ_NUBUS_C, baboon_irq, 0, "baboon", (void *)baboon)) |
96 | pr_err("Couldn't register baboon interrupt\n"); | ||
96 | } | 97 | } |
97 | 98 | ||
98 | /* | 99 | /* |
diff --git a/arch/m68k/mac/config.c b/arch/m68k/mac/config.c index 8819b97be324..98b6bcfb37bf 100644 --- a/arch/m68k/mac/config.c +++ b/arch/m68k/mac/config.c | |||
@@ -47,13 +47,6 @@ | |||
47 | 47 | ||
48 | struct mac_booter_data mac_bi_data; | 48 | struct mac_booter_data mac_bi_data; |
49 | 49 | ||
50 | /* New m68k bootinfo stuff and videobase */ | ||
51 | |||
52 | extern int m68k_num_memory; | ||
53 | extern struct mem_info m68k_memory[NUM_MEMINFO]; | ||
54 | |||
55 | extern struct mem_info m68k_ramdisk; | ||
56 | |||
57 | /* The phys. video addr. - might be bogus on some machines */ | 50 | /* The phys. video addr. - might be bogus on some machines */ |
58 | static unsigned long mac_orig_videoaddr; | 51 | static unsigned long mac_orig_videoaddr; |
59 | 52 | ||
@@ -61,7 +54,6 @@ static unsigned long mac_orig_videoaddr; | |||
61 | extern unsigned long mac_gettimeoffset(void); | 54 | extern unsigned long mac_gettimeoffset(void); |
62 | extern int mac_hwclk(int, struct rtc_time *); | 55 | extern int mac_hwclk(int, struct rtc_time *); |
63 | extern int mac_set_clock_mmss(unsigned long); | 56 | extern int mac_set_clock_mmss(unsigned long); |
64 | extern int show_mac_interrupts(struct seq_file *, void *); | ||
65 | extern void iop_preinit(void); | 57 | extern void iop_preinit(void); |
66 | extern void iop_init(void); | 58 | extern void iop_init(void); |
67 | extern void via_init(void); | 59 | extern void via_init(void); |
@@ -805,10 +797,6 @@ static void __init mac_identify(void) | |||
805 | mac_bi_data.boottime, mac_bi_data.gmtbias); | 797 | mac_bi_data.boottime, mac_bi_data.gmtbias); |
806 | printk(KERN_DEBUG " Machine ID: %ld CPUid: 0x%lx memory size: 0x%lx \n", | 798 | printk(KERN_DEBUG " Machine ID: %ld CPUid: 0x%lx memory size: 0x%lx \n", |
807 | mac_bi_data.id, mac_bi_data.cpuid, mac_bi_data.memsize); | 799 | mac_bi_data.id, mac_bi_data.cpuid, mac_bi_data.memsize); |
808 | #if 0 | ||
809 | printk("Ramdisk: addr 0x%lx size 0x%lx\n", | ||
810 | m68k_ramdisk.addr, m68k_ramdisk.size); | ||
811 | #endif | ||
812 | 800 | ||
813 | iop_init(); | 801 | iop_init(); |
814 | via_init(); | 802 | via_init(); |
diff --git a/arch/m68k/mac/debug.c b/arch/m68k/mac/debug.c index 65dd77a742a3..bce074ceb768 100644 --- a/arch/m68k/mac/debug.c +++ b/arch/m68k/mac/debug.c | |||
@@ -27,7 +27,6 @@ | |||
27 | #include <asm/macints.h> | 27 | #include <asm/macints.h> |
28 | 28 | ||
29 | extern unsigned long mac_videobase; | 29 | extern unsigned long mac_videobase; |
30 | extern unsigned long mac_videodepth; | ||
31 | extern unsigned long mac_rowbytes; | 30 | extern unsigned long mac_rowbytes; |
32 | 31 | ||
33 | extern void mac_serial_print(const char *); | 32 | extern void mac_serial_print(const char *); |
diff --git a/arch/m68k/mac/iop.c b/arch/m68k/mac/iop.c index 326fb9978094..1ad4e9d80eba 100644 --- a/arch/m68k/mac/iop.c +++ b/arch/m68k/mac/iop.c | |||
@@ -305,14 +305,16 @@ void __init iop_register_interrupts(void) | |||
305 | { | 305 | { |
306 | if (iop_ism_present) { | 306 | if (iop_ism_present) { |
307 | if (oss_present) { | 307 | if (oss_present) { |
308 | request_irq(OSS_IRQLEV_IOPISM, iop_ism_irq, | 308 | if (request_irq(OSS_IRQLEV_IOPISM, iop_ism_irq, |
309 | IRQ_FLG_LOCK, "ISM IOP", | 309 | IRQ_FLG_LOCK, "ISM IOP", |
310 | (void *) IOP_NUM_ISM); | 310 | (void *) IOP_NUM_ISM)) |
311 | pr_err("Couldn't register ISM IOP interrupt\n"); | ||
311 | oss_irq_enable(IRQ_MAC_ADB); | 312 | oss_irq_enable(IRQ_MAC_ADB); |
312 | } else { | 313 | } else { |
313 | request_irq(IRQ_VIA2_0, iop_ism_irq, | 314 | if (request_irq(IRQ_VIA2_0, iop_ism_irq, |
314 | IRQ_FLG_LOCK|IRQ_FLG_FAST, "ISM IOP", | 315 | IRQ_FLG_LOCK|IRQ_FLG_FAST, "ISM IOP", |
315 | (void *) IOP_NUM_ISM); | 316 | (void *) IOP_NUM_ISM)) |
317 | pr_err("Couldn't register ISM IOP interrupt\n"); | ||
316 | } | 318 | } |
317 | if (!iop_alive(iop_base[IOP_NUM_ISM])) { | 319 | if (!iop_alive(iop_base[IOP_NUM_ISM])) { |
318 | printk("IOP: oh my god, they killed the ISM IOP!\n"); | 320 | printk("IOP: oh my god, they killed the ISM IOP!\n"); |
diff --git a/arch/m68k/mac/macints.c b/arch/m68k/mac/macints.c index 82e560c076ce..23711074e0e2 100644 --- a/arch/m68k/mac/macints.c +++ b/arch/m68k/mac/macints.c | |||
@@ -134,6 +134,7 @@ | |||
134 | #include <asm/errno.h> | 134 | #include <asm/errno.h> |
135 | #include <asm/macints.h> | 135 | #include <asm/macints.h> |
136 | #include <asm/irq_regs.h> | 136 | #include <asm/irq_regs.h> |
137 | #include <asm/mac_oss.h> | ||
137 | 138 | ||
138 | #define DEBUG_SPURIOUS | 139 | #define DEBUG_SPURIOUS |
139 | #define SHUTUP_SONIC | 140 | #define SHUTUP_SONIC |
@@ -146,7 +147,6 @@ static int scc_mask; | |||
146 | * VIA/RBV hooks | 147 | * VIA/RBV hooks |
147 | */ | 148 | */ |
148 | 149 | ||
149 | extern void via_init(void); | ||
150 | extern void via_register_interrupts(void); | 150 | extern void via_register_interrupts(void); |
151 | extern void via_irq_enable(int); | 151 | extern void via_irq_enable(int); |
152 | extern void via_irq_disable(int); | 152 | extern void via_irq_disable(int); |
@@ -157,9 +157,6 @@ extern int via_irq_pending(int); | |||
157 | * OSS hooks | 157 | * OSS hooks |
158 | */ | 158 | */ |
159 | 159 | ||
160 | extern int oss_present; | ||
161 | |||
162 | extern void oss_init(void); | ||
163 | extern void oss_register_interrupts(void); | 160 | extern void oss_register_interrupts(void); |
164 | extern void oss_irq_enable(int); | 161 | extern void oss_irq_enable(int); |
165 | extern void oss_irq_disable(int); | 162 | extern void oss_irq_disable(int); |
@@ -170,9 +167,6 @@ extern int oss_irq_pending(int); | |||
170 | * PSC hooks | 167 | * PSC hooks |
171 | */ | 168 | */ |
172 | 169 | ||
173 | extern int psc_present; | ||
174 | |||
175 | extern void psc_init(void); | ||
176 | extern void psc_register_interrupts(void); | 170 | extern void psc_register_interrupts(void); |
177 | extern void psc_irq_enable(int); | 171 | extern void psc_irq_enable(int); |
178 | extern void psc_irq_disable(int); | 172 | extern void psc_irq_disable(int); |
@@ -191,12 +185,10 @@ extern void iop_register_interrupts(void); | |||
191 | 185 | ||
192 | extern int baboon_present; | 186 | extern int baboon_present; |
193 | 187 | ||
194 | extern void baboon_init(void); | ||
195 | extern void baboon_register_interrupts(void); | 188 | extern void baboon_register_interrupts(void); |
196 | extern void baboon_irq_enable(int); | 189 | extern void baboon_irq_enable(int); |
197 | extern void baboon_irq_disable(int); | 190 | extern void baboon_irq_disable(int); |
198 | extern void baboon_irq_clear(int); | 191 | extern void baboon_irq_clear(int); |
199 | extern int baboon_irq_pending(int); | ||
200 | 192 | ||
201 | /* | 193 | /* |
202 | * SCC interrupt routines | 194 | * SCC interrupt routines |
@@ -258,8 +250,9 @@ void __init mac_init_IRQ(void) | |||
258 | if (baboon_present) | 250 | if (baboon_present) |
259 | baboon_register_interrupts(); | 251 | baboon_register_interrupts(); |
260 | iop_register_interrupts(); | 252 | iop_register_interrupts(); |
261 | request_irq(IRQ_AUTO_7, mac_nmi_handler, 0, "NMI", | 253 | if (request_irq(IRQ_AUTO_7, mac_nmi_handler, 0, "NMI", |
262 | mac_nmi_handler); | 254 | mac_nmi_handler)) |
255 | pr_err("Couldn't register NMI\n"); | ||
263 | #ifdef DEBUG_MACINTS | 256 | #ifdef DEBUG_MACINTS |
264 | printk("mac_init_IRQ(): Done!\n"); | 257 | printk("mac_init_IRQ(): Done!\n"); |
265 | #endif | 258 | #endif |
diff --git a/arch/m68k/mac/misc.c b/arch/m68k/mac/misc.c index a44c7086ab39..5d818568b343 100644 --- a/arch/m68k/mac/misc.c +++ b/arch/m68k/mac/misc.c | |||
@@ -35,7 +35,6 @@ | |||
35 | 35 | ||
36 | #define RTC_OFFSET 2082844800 | 36 | #define RTC_OFFSET 2082844800 |
37 | 37 | ||
38 | extern struct mac_booter_data mac_bi_data; | ||
39 | static void (*rom_reset)(void); | 38 | static void (*rom_reset)(void); |
40 | 39 | ||
41 | #ifdef CONFIG_ADB_CUDA | 40 | #ifdef CONFIG_ADB_CUDA |
diff --git a/arch/m68k/mac/oss.c b/arch/m68k/mac/oss.c index 8426501119ca..f3d23d6ebcf8 100644 --- a/arch/m68k/mac/oss.c +++ b/arch/m68k/mac/oss.c | |||
@@ -66,16 +66,21 @@ void __init oss_init(void) | |||
66 | 66 | ||
67 | void __init oss_register_interrupts(void) | 67 | void __init oss_register_interrupts(void) |
68 | { | 68 | { |
69 | request_irq(OSS_IRQLEV_SCSI, oss_irq, IRQ_FLG_LOCK, | 69 | if (request_irq(OSS_IRQLEV_SCSI, oss_irq, IRQ_FLG_LOCK, |
70 | "scsi", (void *) oss); | 70 | "scsi", (void *) oss)) |
71 | request_irq(OSS_IRQLEV_IOPSCC, mac_scc_dispatch, IRQ_FLG_LOCK, | 71 | pr_err("Couldn't register %s interrupt\n", "scsi"); |
72 | "scc", mac_scc_dispatch); | 72 | if (request_irq(OSS_IRQLEV_IOPSCC, mac_scc_dispatch, IRQ_FLG_LOCK, |
73 | request_irq(OSS_IRQLEV_NUBUS, oss_nubus_irq, IRQ_FLG_LOCK, | 73 | "scc", mac_scc_dispatch)) |
74 | "nubus", (void *) oss); | 74 | pr_err("Couldn't register %s interrupt\n", "scc"); |
75 | request_irq(OSS_IRQLEV_SOUND, oss_irq, IRQ_FLG_LOCK, | 75 | if (request_irq(OSS_IRQLEV_NUBUS, oss_nubus_irq, IRQ_FLG_LOCK, |
76 | "sound", (void *) oss); | 76 | "nubus", (void *) oss)) |
77 | request_irq(OSS_IRQLEV_VIA1, via1_irq, IRQ_FLG_LOCK, | 77 | pr_err("Couldn't register %s interrupt\n", "nubus"); |
78 | "via1", (void *) via1); | 78 | if (request_irq(OSS_IRQLEV_SOUND, oss_irq, IRQ_FLG_LOCK, |
79 | "sound", (void *) oss)) | ||
80 | pr_err("Couldn't register %s interrupt\n", "sound"); | ||
81 | if (request_irq(OSS_IRQLEV_VIA1, via1_irq, IRQ_FLG_LOCK, | ||
82 | "via1", (void *) via1)) | ||
83 | pr_err("Couldn't register %s interrupt\n", "via1"); | ||
79 | } | 84 | } |
80 | 85 | ||
81 | /* | 86 | /* |
diff --git a/arch/m68k/mac/psc.c b/arch/m68k/mac/psc.c index f84a4dd64f94..ba6ccab64018 100644 --- a/arch/m68k/mac/psc.c +++ b/arch/m68k/mac/psc.c | |||
@@ -117,10 +117,14 @@ void __init psc_init(void) | |||
117 | 117 | ||
118 | void __init psc_register_interrupts(void) | 118 | void __init psc_register_interrupts(void) |
119 | { | 119 | { |
120 | request_irq(IRQ_AUTO_3, psc_irq, 0, "psc3", (void *) 0x30); | 120 | if (request_irq(IRQ_AUTO_3, psc_irq, 0, "psc3", (void *) 0x30)) |
121 | request_irq(IRQ_AUTO_4, psc_irq, 0, "psc4", (void *) 0x40); | 121 | pr_err("Couldn't register psc%d interrupt\n", 3); |
122 | request_irq(IRQ_AUTO_5, psc_irq, 0, "psc5", (void *) 0x50); | 122 | if (request_irq(IRQ_AUTO_4, psc_irq, 0, "psc4", (void *) 0x40)) |
123 | request_irq(IRQ_AUTO_6, psc_irq, 0, "psc6", (void *) 0x60); | 123 | pr_err("Couldn't register psc%d interrupt\n", 4); |
124 | if (request_irq(IRQ_AUTO_5, psc_irq, 0, "psc5", (void *) 0x50)) | ||
125 | pr_err("Couldn't register psc%d interrupt\n", 5); | ||
126 | if (request_irq(IRQ_AUTO_6, psc_irq, 0, "psc6", (void *) 0x60)) | ||
127 | pr_err("Couldn't register psc%d interrupt\n", 6); | ||
124 | } | 128 | } |
125 | 129 | ||
126 | /* | 130 | /* |
diff --git a/arch/m68k/mac/via.c b/arch/m68k/mac/via.c index f01d418e64fe..7d97ba54536e 100644 --- a/arch/m68k/mac/via.c +++ b/arch/m68k/mac/via.c | |||
@@ -34,6 +34,7 @@ | |||
34 | #include <asm/macints.h> | 34 | #include <asm/macints.h> |
35 | #include <asm/mac_via.h> | 35 | #include <asm/mac_via.h> |
36 | #include <asm/mac_psc.h> | 36 | #include <asm/mac_psc.h> |
37 | #include <asm/mac_oss.h> | ||
37 | 38 | ||
38 | volatile __u8 *via1, *via2; | 39 | volatile __u8 *via1, *via2; |
39 | int rbv_present; | 40 | int rbv_present; |
@@ -84,7 +85,6 @@ void via_irq_disable(int irq); | |||
84 | void via_irq_clear(int irq); | 85 | void via_irq_clear(int irq); |
85 | 86 | ||
86 | extern irqreturn_t mac_scc_dispatch(int, void *); | 87 | extern irqreturn_t mac_scc_dispatch(int, void *); |
87 | extern int oss_present; | ||
88 | 88 | ||
89 | /* | 89 | /* |
90 | * Initialize the VIAs | 90 | * Initialize the VIAs |
@@ -283,7 +283,8 @@ void __init via_init_clock(irq_handler_t func) | |||
283 | via1[vT1CL] = MAC_CLOCK_LOW; | 283 | via1[vT1CL] = MAC_CLOCK_LOW; |
284 | via1[vT1CH] = MAC_CLOCK_HIGH; | 284 | via1[vT1CH] = MAC_CLOCK_HIGH; |
285 | 285 | ||
286 | request_irq(IRQ_MAC_TIMER_1, func, IRQ_FLG_LOCK, "timer", func); | 286 | if (request_irq(IRQ_MAC_TIMER_1, func, IRQ_FLG_LOCK, "timer", func)) |
287 | pr_err("Couldn't register %s interrupt\n", "timer"); | ||
287 | } | 288 | } |
288 | 289 | ||
289 | /* | 290 | /* |
@@ -293,25 +294,31 @@ void __init via_init_clock(irq_handler_t func) | |||
293 | void __init via_register_interrupts(void) | 294 | void __init via_register_interrupts(void) |
294 | { | 295 | { |
295 | if (via_alt_mapping) { | 296 | if (via_alt_mapping) { |
296 | request_irq(IRQ_AUTO_1, via1_irq, | 297 | if (request_irq(IRQ_AUTO_1, via1_irq, |
297 | IRQ_FLG_LOCK|IRQ_FLG_FAST, "software", | 298 | IRQ_FLG_LOCK|IRQ_FLG_FAST, "software", |
298 | (void *) via1); | 299 | (void *) via1)) |
299 | request_irq(IRQ_AUTO_6, via1_irq, | 300 | pr_err("Couldn't register %s interrupt\n", "software"); |
301 | if (request_irq(IRQ_AUTO_6, via1_irq, | ||
300 | IRQ_FLG_LOCK|IRQ_FLG_FAST, "via1", | 302 | IRQ_FLG_LOCK|IRQ_FLG_FAST, "via1", |
301 | (void *) via1); | 303 | (void *) via1)) |
304 | pr_err("Couldn't register %s interrupt\n", "via1"); | ||
302 | } else { | 305 | } else { |
303 | request_irq(IRQ_AUTO_1, via1_irq, | 306 | if (request_irq(IRQ_AUTO_1, via1_irq, |
304 | IRQ_FLG_LOCK|IRQ_FLG_FAST, "via1", | 307 | IRQ_FLG_LOCK|IRQ_FLG_FAST, "via1", |
305 | (void *) via1); | 308 | (void *) via1)) |
309 | pr_err("Couldn't register %s interrupt\n", "via1"); | ||
306 | } | 310 | } |
307 | request_irq(IRQ_AUTO_2, via2_irq, IRQ_FLG_LOCK|IRQ_FLG_FAST, | 311 | if (request_irq(IRQ_AUTO_2, via2_irq, IRQ_FLG_LOCK|IRQ_FLG_FAST, |
308 | "via2", (void *) via2); | 312 | "via2", (void *) via2)) |
313 | pr_err("Couldn't register %s interrupt\n", "via2"); | ||
309 | if (!psc_present) { | 314 | if (!psc_present) { |
310 | request_irq(IRQ_AUTO_4, mac_scc_dispatch, IRQ_FLG_LOCK, | 315 | if (request_irq(IRQ_AUTO_4, mac_scc_dispatch, IRQ_FLG_LOCK, |
311 | "scc", mac_scc_dispatch); | 316 | "scc", mac_scc_dispatch)) |
317 | pr_err("Couldn't register %s interrupt\n", "scc"); | ||
312 | } | 318 | } |
313 | request_irq(IRQ_MAC_NUBUS, via_nubus_irq, IRQ_FLG_LOCK|IRQ_FLG_FAST, | 319 | if (request_irq(IRQ_MAC_NUBUS, via_nubus_irq, |
314 | "nubus", (void *) via2); | 320 | IRQ_FLG_LOCK|IRQ_FLG_FAST, "nubus", (void *) via2)) |
321 | pr_err("Couldn't register %s interrupt\n", "nubus"); | ||
315 | } | 322 | } |
316 | 323 | ||
317 | /* | 324 | /* |
diff --git a/arch/m68k/math-emu/fp_log.c b/arch/m68k/math-emu/fp_log.c index b1033ae0d6f0..367ecee2f981 100644 --- a/arch/m68k/math-emu/fp_log.c +++ b/arch/m68k/math-emu/fp_log.c | |||
@@ -24,7 +24,6 @@ static const struct fp_ext fp_one = | |||
24 | 24 | ||
25 | extern struct fp_ext *fp_fadd(struct fp_ext *dest, const struct fp_ext *src); | 25 | extern struct fp_ext *fp_fadd(struct fp_ext *dest, const struct fp_ext *src); |
26 | extern struct fp_ext *fp_fdiv(struct fp_ext *dest, const struct fp_ext *src); | 26 | extern struct fp_ext *fp_fdiv(struct fp_ext *dest, const struct fp_ext *src); |
27 | extern struct fp_ext *fp_fmul(struct fp_ext *dest, const struct fp_ext *src); | ||
28 | 27 | ||
29 | struct fp_ext * | 28 | struct fp_ext * |
30 | fp_fsqrt(struct fp_ext *dest, struct fp_ext *src) | 29 | fp_fsqrt(struct fp_ext *dest, struct fp_ext *src) |
diff --git a/arch/m68k/mm/init.c b/arch/m68k/mm/init.c index 81bb08ceec18..0007b2adf3a3 100644 --- a/arch/m68k/mm/init.c +++ b/arch/m68k/mm/init.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #ifdef CONFIG_ATARI | 28 | #ifdef CONFIG_ATARI |
29 | #include <asm/atari_stram.h> | 29 | #include <asm/atari_stram.h> |
30 | #endif | 30 | #endif |
31 | #include <asm/sections.h> | ||
31 | #include <asm/tlb.h> | 32 | #include <asm/tlb.h> |
32 | 33 | ||
33 | DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); | 34 | DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); |
@@ -73,9 +74,6 @@ extern void init_pointer_table(unsigned long ptable); | |||
73 | 74 | ||
74 | /* References to section boundaries */ | 75 | /* References to section boundaries */ |
75 | 76 | ||
76 | extern char _text[], _etext[]; | ||
77 | extern char __init_begin[], __init_end[]; | ||
78 | |||
79 | extern pmd_t *zero_pgtable; | 77 | extern pmd_t *zero_pgtable; |
80 | 78 | ||
81 | void __init mem_init(void) | 79 | void __init mem_init(void) |
diff --git a/arch/m68k/mm/motorola.c b/arch/m68k/mm/motorola.c index c5dbb9bdb322..4665fc84b7dc 100644 --- a/arch/m68k/mm/motorola.c +++ b/arch/m68k/mm/motorola.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #ifdef CONFIG_ATARI | 30 | #ifdef CONFIG_ATARI |
31 | #include <asm/atari_stram.h> | 31 | #include <asm/atari_stram.h> |
32 | #endif | 32 | #endif |
33 | #include <asm/sections.h> | ||
33 | 34 | ||
34 | #undef DEBUG | 35 | #undef DEBUG |
35 | 36 | ||
@@ -301,14 +302,12 @@ void __init paging_init(void) | |||
301 | } | 302 | } |
302 | } | 303 | } |
303 | 304 | ||
304 | extern char __init_begin, __init_end; | ||
305 | |||
306 | void free_initmem(void) | 305 | void free_initmem(void) |
307 | { | 306 | { |
308 | unsigned long addr; | 307 | unsigned long addr; |
309 | 308 | ||
310 | addr = (unsigned long)&__init_begin; | 309 | addr = (unsigned long)__init_begin; |
311 | for (; addr < (unsigned long)&__init_end; addr += PAGE_SIZE) { | 310 | for (; addr < (unsigned long)__init_end; addr += PAGE_SIZE) { |
312 | virt_to_page(addr)->flags &= ~(1 << PG_reserved); | 311 | virt_to_page(addr)->flags &= ~(1 << PG_reserved); |
313 | init_page_count(virt_to_page(addr)); | 312 | init_page_count(virt_to_page(addr)); |
314 | free_page(addr); | 313 | free_page(addr); |
diff --git a/arch/m68k/mvme147/config.c b/arch/m68k/mvme147/config.c index 43cdf476ffab..100baaa692a1 100644 --- a/arch/m68k/mvme147/config.c +++ b/arch/m68k/mvme147/config.c | |||
@@ -42,7 +42,6 @@ extern unsigned long mvme147_gettimeoffset (void); | |||
42 | extern int mvme147_hwclk (int, struct rtc_time *); | 42 | extern int mvme147_hwclk (int, struct rtc_time *); |
43 | extern int mvme147_set_clock_mmss (unsigned long); | 43 | extern int mvme147_set_clock_mmss (unsigned long); |
44 | extern void mvme147_reset (void); | 44 | extern void mvme147_reset (void); |
45 | extern void mvme147_waitbut(void); | ||
46 | 45 | ||
47 | 46 | ||
48 | static int bcd2int (unsigned char b); | 47 | static int bcd2int (unsigned char b); |
@@ -115,8 +114,9 @@ static irqreturn_t mvme147_timer_int (int irq, void *dev_id) | |||
115 | void mvme147_sched_init (irq_handler_t timer_routine) | 114 | void mvme147_sched_init (irq_handler_t timer_routine) |
116 | { | 115 | { |
117 | tick_handler = timer_routine; | 116 | tick_handler = timer_routine; |
118 | request_irq (PCC_IRQ_TIMER1, mvme147_timer_int, | 117 | if (request_irq(PCC_IRQ_TIMER1, mvme147_timer_int, IRQ_FLG_REPLACE, |
119 | IRQ_FLG_REPLACE, "timer 1", NULL); | 118 | "timer 1", NULL)) |
119 | pr_err("Couldn't register timer interrupt\n"); | ||
120 | 120 | ||
121 | /* Init the clock with a value */ | 121 | /* Init the clock with a value */ |
122 | /* our clock goes off every 6.25us */ | 122 | /* our clock goes off every 6.25us */ |
diff --git a/arch/m68k/mvme16x/config.c b/arch/m68k/mvme16x/config.c index 1521826fc3c7..11edf61cc2c4 100644 --- a/arch/m68k/mvme16x/config.c +++ b/arch/m68k/mvme16x/config.c | |||
@@ -48,7 +48,6 @@ extern unsigned long mvme16x_gettimeoffset (void); | |||
48 | extern int mvme16x_hwclk (int, struct rtc_time *); | 48 | extern int mvme16x_hwclk (int, struct rtc_time *); |
49 | extern int mvme16x_set_clock_mmss (unsigned long); | 49 | extern int mvme16x_set_clock_mmss (unsigned long); |
50 | extern void mvme16x_reset (void); | 50 | extern void mvme16x_reset (void); |
51 | extern void mvme16x_waitbut(void); | ||
52 | 51 | ||
53 | int bcd2int (unsigned char b); | 52 | int bcd2int (unsigned char b); |
54 | 53 | ||
diff --git a/arch/m68k/q40/config.c b/arch/m68k/q40/config.c index 7110546e3c00..31ab3f08bbda 100644 --- a/arch/m68k/q40/config.c +++ b/arch/m68k/q40/config.c | |||
@@ -36,7 +36,6 @@ | |||
36 | #include <asm/machdep.h> | 36 | #include <asm/machdep.h> |
37 | #include <asm/q40_master.h> | 37 | #include <asm/q40_master.h> |
38 | 38 | ||
39 | extern irqreturn_t q40_process_int(int level, struct pt_regs *regs); | ||
40 | extern void q40_init_IRQ(void); | 39 | extern void q40_init_IRQ(void); |
41 | static void q40_get_model(char *model); | 40 | static void q40_get_model(char *model); |
42 | extern void q40_sched_init(irq_handler_t handler); | 41 | extern void q40_sched_init(irq_handler_t handler); |
@@ -47,8 +46,6 @@ static unsigned int q40_get_ss(void); | |||
47 | static int q40_set_clock_mmss(unsigned long); | 46 | static int q40_set_clock_mmss(unsigned long); |
48 | static int q40_get_rtc_pll(struct rtc_pll_info *pll); | 47 | static int q40_get_rtc_pll(struct rtc_pll_info *pll); |
49 | static int q40_set_rtc_pll(struct rtc_pll_info *pll); | 48 | static int q40_set_rtc_pll(struct rtc_pll_info *pll); |
50 | extern void q40_waitbut(void); | ||
51 | void q40_set_vectors(void); | ||
52 | 49 | ||
53 | extern void q40_mksound(unsigned int /*freq*/, unsigned int /*ticks*/); | 50 | extern void q40_mksound(unsigned int /*freq*/, unsigned int /*ticks*/); |
54 | 51 | ||
diff --git a/arch/m68k/sun3/config.c b/arch/m68k/sun3/config.c index 8dfaa201342e..2ca25bd01a96 100644 --- a/arch/m68k/sun3/config.c +++ b/arch/m68k/sun3/config.c | |||
@@ -27,23 +27,21 @@ | |||
27 | #include <asm/sun3mmu.h> | 27 | #include <asm/sun3mmu.h> |
28 | #include <asm/rtc.h> | 28 | #include <asm/rtc.h> |
29 | #include <asm/machdep.h> | 29 | #include <asm/machdep.h> |
30 | #include <asm/idprom.h> | ||
30 | #include <asm/intersil.h> | 31 | #include <asm/intersil.h> |
31 | #include <asm/irq.h> | 32 | #include <asm/irq.h> |
33 | #include <asm/sections.h> | ||
32 | #include <asm/segment.h> | 34 | #include <asm/segment.h> |
33 | #include <asm/sun3ints.h> | 35 | #include <asm/sun3ints.h> |
34 | 36 | ||
35 | extern char _text, _end; | ||
36 | |||
37 | char sun3_reserved_pmeg[SUN3_PMEGS_NUM]; | 37 | char sun3_reserved_pmeg[SUN3_PMEGS_NUM]; |
38 | 38 | ||
39 | extern unsigned long sun3_gettimeoffset(void); | 39 | extern unsigned long sun3_gettimeoffset(void); |
40 | static void sun3_sched_init(irq_handler_t handler); | 40 | static void sun3_sched_init(irq_handler_t handler); |
41 | extern void sun3_get_model (char* model); | 41 | extern void sun3_get_model (char* model); |
42 | extern void idprom_init (void); | ||
43 | extern int sun3_hwclk(int set, struct rtc_time *t); | 42 | extern int sun3_hwclk(int set, struct rtc_time *t); |
44 | 43 | ||
45 | volatile char* clock_va; | 44 | volatile char* clock_va; |
46 | extern volatile unsigned char* sun3_intreg; | ||
47 | extern unsigned long availmem; | 45 | extern unsigned long availmem; |
48 | unsigned long num_pages; | 46 | unsigned long num_pages; |
49 | 47 | ||
@@ -149,7 +147,7 @@ void __init config_sun3(void) | |||
149 | mach_halt = sun3_halt; | 147 | mach_halt = sun3_halt; |
150 | mach_get_hardware_list = sun3_get_hardware_list; | 148 | mach_get_hardware_list = sun3_get_hardware_list; |
151 | 149 | ||
152 | memory_start = ((((int)&_end) + 0x2000) & ~0x1fff); | 150 | memory_start = ((((unsigned long)_end) + 0x2000) & ~0x1fff); |
153 | // PROM seems to want the last couple of physical pages. --m | 151 | // PROM seems to want the last couple of physical pages. --m |
154 | memory_end = *(romvec->pv_sun3mem) + PAGE_OFFSET - 2*PAGE_SIZE; | 152 | memory_end = *(romvec->pv_sun3mem) + PAGE_OFFSET - 2*PAGE_SIZE; |
155 | 153 | ||
diff --git a/arch/m68k/sun3/mmu_emu.c b/arch/m68k/sun3/mmu_emu.c index 60f9d4500d72..3cd19390aae5 100644 --- a/arch/m68k/sun3/mmu_emu.c +++ b/arch/m68k/sun3/mmu_emu.c | |||
@@ -27,7 +27,6 @@ | |||
27 | #include <asm/mmu_context.h> | 27 | #include <asm/mmu_context.h> |
28 | #include <asm/dvma.h> | 28 | #include <asm/dvma.h> |
29 | 29 | ||
30 | extern void prom_reboot (char *) __attribute__ ((__noreturn__)); | ||
31 | 30 | ||
32 | #undef DEBUG_MMU_EMU | 31 | #undef DEBUG_MMU_EMU |
33 | #define DEBUG_PROM_MAPS | 32 | #define DEBUG_PROM_MAPS |
diff --git a/arch/m68k/sun3/sun3ints.c b/arch/m68k/sun3/sun3ints.c index 7364cd67455e..ad90393a3361 100644 --- a/arch/m68k/sun3/sun3ints.c +++ b/arch/m68k/sun3/sun3ints.c | |||
@@ -105,7 +105,10 @@ void __init sun3_init_IRQ(void) | |||
105 | m68k_setup_irq_controller(&sun3_irq_controller, IRQ_AUTO_1, 7); | 105 | m68k_setup_irq_controller(&sun3_irq_controller, IRQ_AUTO_1, 7); |
106 | m68k_setup_user_interrupt(VEC_USER, 128, NULL); | 106 | m68k_setup_user_interrupt(VEC_USER, 128, NULL); |
107 | 107 | ||
108 | request_irq(IRQ_AUTO_5, sun3_int5, 0, "int5", NULL); | 108 | if (request_irq(IRQ_AUTO_5, sun3_int5, 0, "int5", NULL)) |
109 | request_irq(IRQ_AUTO_7, sun3_int7, 0, "int7", NULL); | 109 | pr_err("Couldn't register %s interrupt\n", "int5"); |
110 | request_irq(IRQ_USER+127, sun3_vec255, 0, "vec255", NULL); | 110 | if (request_irq(IRQ_AUTO_7, sun3_int7, 0, "int7", NULL)) |
111 | pr_err("Couldn't register %s interrupt\n", "int7"); | ||
112 | if (request_irq(IRQ_USER+127, sun3_vec255, 0, "vec255", NULL)) | ||
113 | pr_err("Couldn't register %s interrupt\n", "vec255"); | ||
111 | } | 114 | } |
diff --git a/arch/m68k/sun3x/config.c b/arch/m68k/sun3x/config.c index 2b1ca2db070f..fc599fad4a54 100644 --- a/arch/m68k/sun3x/config.c +++ b/arch/m68k/sun3x/config.c | |||
@@ -23,7 +23,6 @@ | |||
23 | #include "time.h" | 23 | #include "time.h" |
24 | 24 | ||
25 | volatile char *clock_va; | 25 | volatile char *clock_va; |
26 | extern volatile unsigned char *sun3_intreg; | ||
27 | 26 | ||
28 | extern void sun3_get_model(char *model); | 27 | extern void sun3_get_model(char *model); |
29 | 28 | ||