aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m68k
diff options
context:
space:
mode:
Diffstat (limited to 'arch/m68k')
-rw-r--r--arch/m68k/Kconfig14
-rw-r--r--arch/m68k/Makefile11
-rw-r--r--arch/m68k/amiga/Makefile2
-rw-r--r--arch/m68k/amiga/amiga_ksyms.c33
-rw-r--r--arch/m68k/amiga/amisound.c5
-rw-r--r--arch/m68k/amiga/chipram.c7
-rw-r--r--arch/m68k/amiga/config.c12
-rw-r--r--arch/m68k/amiga/pcmcia.c9
-rw-r--r--arch/m68k/atari/Makefile2
-rw-r--r--arch/m68k/atari/ataints.c3
-rw-r--r--arch/m68k/atari/atari_ksyms.c35
-rw-r--r--arch/m68k/atari/atasound.c2
-rw-r--r--arch/m68k/atari/config.c11
-rw-r--r--arch/m68k/atari/debug.c6
-rw-r--r--arch/m68k/atari/hades-pci.c54
-rw-r--r--arch/m68k/atari/stdma.c5
-rw-r--r--arch/m68k/atari/stram.c3
-rw-r--r--arch/m68k/configs/mac_defconfig1
-rw-r--r--arch/m68k/hp300/Makefile2
-rw-r--r--arch/m68k/hp300/ksyms.c9
-rw-r--r--arch/m68k/kernel/entry.S2
-rw-r--r--arch/m68k/mac/Makefile2
-rw-r--r--arch/m68k/mac/config.c2
-rw-r--r--arch/m68k/mac/mac_ksyms.c8
-rw-r--r--arch/m68k/mac/via.c5
-rw-r--r--arch/m68k/mvme16x/Makefile2
-rw-r--r--arch/m68k/mvme16x/config.c2
-rw-r--r--arch/m68k/mvme16x/mvme16x_ksyms.c6
28 files changed, 105 insertions, 150 deletions
diff --git a/arch/m68k/Kconfig b/arch/m68k/Kconfig
index 8236e42ef711..ffabd01c45eb 100644
--- a/arch/m68k/Kconfig
+++ b/arch/m68k/Kconfig
@@ -577,20 +577,6 @@ config MAC_HID
577 depends on INPUT_ADBHID 577 depends on INPUT_ADBHID
578 default y 578 default y
579 579
580config MAC_ADBKEYCODES
581 bool "Support for ADB raw keycodes"
582 depends on INPUT_ADBHID
583 help
584 This provides support for sending raw ADB keycodes to console
585 devices. This is the default up to 2.4.0, but in future this may be
586 phased out in favor of generic Linux keycodes. If you say Y here,
587 you can dynamically switch via the
588 /proc/sys/dev/mac_hid/keyboard_sends_linux_keycodes
589 sysctl and with the "keyboard_sends_linux_keycodes=" kernel
590 argument.
591
592 If unsure, say Y here.
593
594config ADB_KEYBOARD 580config ADB_KEYBOARD
595 bool "Support for ADB keyboard (old driver)" 581 bool "Support for ADB keyboard (old driver)"
596 depends on MAC && !INPUT_ADBHID 582 depends on MAC && !INPUT_ADBHID
diff --git a/arch/m68k/Makefile b/arch/m68k/Makefile
index 4a1bd44ff162..2cba605cb59d 100644
--- a/arch/m68k/Makefile
+++ b/arch/m68k/Makefile
@@ -13,16 +13,15 @@
13# Copyright (C) 1994 by Hamish Macdonald 13# Copyright (C) 1994 by Hamish Macdonald
14# 14#
15 15
16# test for cross compiling
17COMPILE_ARCH = $(shell uname -m)
18
19# override top level makefile 16# override top level makefile
20AS += -m68020 17AS += -m68020
21LDFLAGS := -m m68kelf 18LDFLAGS := -m m68kelf
22LDFLAGS_MODULE += -T $(srctree)/arch/m68k/kernel/module.lds 19LDFLAGS_MODULE += -T $(srctree)/arch/m68k/kernel/module.lds
23ifneq ($(COMPILE_ARCH),$(ARCH)) 20ifneq ($(SUBARCH),$(ARCH))
24 # prefix for cross-compiling binaries 21 ifeq ($(CROSS_COMPILE),)
25 CROSS_COMPILE = m68k-linux-gnu- 22 CROSS_COMPILE := $(call cc-cross-prefix, \
23 m68k-linux-gnu- m68k-linux- m68k-unknown-linux-gnu-)
24 endif
26endif 25endif
27 26
28ifdef CONFIG_SUN3 27ifdef CONFIG_SUN3
diff --git a/arch/m68k/amiga/Makefile b/arch/m68k/amiga/Makefile
index 8b415651edee..6a0d7650f980 100644
--- a/arch/m68k/amiga/Makefile
+++ b/arch/m68k/amiga/Makefile
@@ -2,6 +2,6 @@
2# Makefile for Linux arch/m68k/amiga source directory 2# Makefile for Linux arch/m68k/amiga source directory
3# 3#
4 4
5obj-y := config.o amiints.o cia.o chipram.o amisound.o amiga_ksyms.o 5obj-y := config.o amiints.o cia.o chipram.o amisound.o
6 6
7obj-$(CONFIG_AMIGA_PCMCIA) += pcmcia.o 7obj-$(CONFIG_AMIGA_PCMCIA) += pcmcia.o
diff --git a/arch/m68k/amiga/amiga_ksyms.c b/arch/m68k/amiga/amiga_ksyms.c
deleted file mode 100644
index 7fdcf6bf3ada..000000000000
--- a/arch/m68k/amiga/amiga_ksyms.c
+++ /dev/null
@@ -1,33 +0,0 @@
1#include <linux/module.h>
2#include <linux/types.h>
3#include <asm/ptrace.h>
4#include <asm/amigahw.h>
5#include <asm/amigaints.h>
6#include <asm/amipcmcia.h>
7
8extern volatile u_short amiga_audio_min_period;
9extern u_short amiga_audio_period;
10
11/*
12 * Add things here when you find the need for it.
13 */
14EXPORT_SYMBOL(amiga_model);
15EXPORT_SYMBOL(amiga_chipset);
16EXPORT_SYMBOL(amiga_hw_present);
17EXPORT_SYMBOL(amiga_eclock);
18EXPORT_SYMBOL(amiga_colorclock);
19EXPORT_SYMBOL(amiga_chip_alloc);
20EXPORT_SYMBOL(amiga_chip_free);
21EXPORT_SYMBOL(amiga_chip_avail);
22EXPORT_SYMBOL(amiga_chip_size);
23EXPORT_SYMBOL(amiga_audio_period);
24EXPORT_SYMBOL(amiga_audio_min_period);
25
26#ifdef CONFIG_AMIGA_PCMCIA
27 EXPORT_SYMBOL(pcmcia_reset);
28 EXPORT_SYMBOL(pcmcia_copy_tuple);
29 EXPORT_SYMBOL(pcmcia_program_voltage);
30 EXPORT_SYMBOL(pcmcia_access_speed);
31 EXPORT_SYMBOL(pcmcia_write_enable);
32 EXPORT_SYMBOL(pcmcia_write_disable);
33#endif
diff --git a/arch/m68k/amiga/amisound.c b/arch/m68k/amiga/amisound.c
index 1f5bfb584297..61e5c54625ae 100644
--- a/arch/m68k/amiga/amisound.c
+++ b/arch/m68k/amiga/amisound.c
@@ -12,6 +12,7 @@
12#include <linux/timer.h> 12#include <linux/timer.h>
13#include <linux/init.h> 13#include <linux/init.h>
14#include <linux/string.h> 14#include <linux/string.h>
15#include <linux/module.h>
15 16
16#include <asm/system.h> 17#include <asm/system.h>
17#include <asm/amigahw.h> 18#include <asm/amigahw.h>
@@ -21,7 +22,7 @@ static const signed char sine_data[] = {
21 0, 39, 75, 103, 121, 127, 121, 103, 75, 39, 22 0, 39, 75, 103, 121, 127, 121, 103, 75, 39,
22 0, -39, -75, -103, -121, -127, -121, -103, -75, -39 23 0, -39, -75, -103, -121, -127, -121, -103, -75, -39
23}; 24};
24#define DATA_SIZE (sizeof(sine_data)/sizeof(sine_data[0])) 25#define DATA_SIZE ARRAY_SIZE(sine_data)
25 26
26#define custom amiga_custom 27#define custom amiga_custom
27 28
@@ -31,6 +32,7 @@ static const signed char sine_data[] = {
31 */ 32 */
32 33
33volatile unsigned short amiga_audio_min_period = 124; /* Default for pre-OCS */ 34volatile unsigned short amiga_audio_min_period = 124; /* Default for pre-OCS */
35EXPORT_SYMBOL(amiga_audio_min_period);
34 36
35#define MAX_PERIOD (65535) 37#define MAX_PERIOD (65535)
36 38
@@ -40,6 +42,7 @@ volatile unsigned short amiga_audio_min_period = 124; /* Default for pre-OCS */
40 */ 42 */
41 43
42unsigned short amiga_audio_period = MAX_PERIOD; 44unsigned short amiga_audio_period = MAX_PERIOD;
45EXPORT_SYMBOL(amiga_audio_period);
43 46
44static unsigned long clock_constant; 47static unsigned long clock_constant;
45 48
diff --git a/arch/m68k/amiga/chipram.c b/arch/m68k/amiga/chipram.c
index fa015d801617..d10726f9038b 100644
--- a/arch/m68k/amiga/chipram.c
+++ b/arch/m68k/amiga/chipram.c
@@ -13,10 +13,13 @@
13#include <linux/ioport.h> 13#include <linux/ioport.h>
14#include <linux/slab.h> 14#include <linux/slab.h>
15#include <linux/string.h> 15#include <linux/string.h>
16#include <linux/module.h>
17
16#include <asm/page.h> 18#include <asm/page.h>
17#include <asm/amigahw.h> 19#include <asm/amigahw.h>
18 20
19unsigned long amiga_chip_size; 21unsigned long amiga_chip_size;
22EXPORT_SYMBOL(amiga_chip_size);
20 23
21static struct resource chipram_res = { 24static struct resource chipram_res = {
22 .name = "Chip RAM", .start = CHIP_PHYSADDR 25 .name = "Chip RAM", .start = CHIP_PHYSADDR
@@ -67,6 +70,7 @@ void *amiga_chip_alloc(unsigned long size, const char *name)
67#endif 70#endif
68 return (void *)ZTWO_VADDR(res->start); 71 return (void *)ZTWO_VADDR(res->start);
69} 72}
73EXPORT_SYMBOL(amiga_chip_alloc);
70 74
71 75
72 /* 76 /*
@@ -120,6 +124,7 @@ void amiga_chip_free(void *ptr)
120 } 124 }
121 printk("amiga_chip_free: trying to free nonexistent region at %p\n", ptr); 125 printk("amiga_chip_free: trying to free nonexistent region at %p\n", ptr);
122} 126}
127EXPORT_SYMBOL(amiga_chip_free);
123 128
124 129
125unsigned long amiga_chip_avail(void) 130unsigned long amiga_chip_avail(void)
@@ -129,3 +134,5 @@ unsigned long amiga_chip_avail(void)
129#endif 134#endif
130 return chipavail; 135 return chipavail;
131} 136}
137EXPORT_SYMBOL(amiga_chip_avail);
138
diff --git a/arch/m68k/amiga/config.c b/arch/m68k/amiga/config.c
index 35748531327d..50f5daab46b7 100644
--- a/arch/m68k/amiga/config.c
+++ b/arch/m68k/amiga/config.c
@@ -23,6 +23,7 @@
23#include <linux/delay.h> 23#include <linux/delay.h>
24#include <linux/interrupt.h> 24#include <linux/interrupt.h>
25#include <linux/zorro.h> 25#include <linux/zorro.h>
26#include <linux/module.h>
26 27
27#include <asm/bootinfo.h> 28#include <asm/bootinfo.h>
28#include <asm/setup.h> 29#include <asm/setup.h>
@@ -36,13 +37,24 @@
36#include <asm/io.h> 37#include <asm/io.h>
37 38
38unsigned long amiga_model; 39unsigned long amiga_model;
40EXPORT_SYMBOL(amiga_model);
41
39unsigned long amiga_eclock; 42unsigned long amiga_eclock;
43EXPORT_SYMBOL(amiga_eclock);
44
40unsigned long amiga_masterclock; 45unsigned long amiga_masterclock;
46
41unsigned long amiga_colorclock; 47unsigned long amiga_colorclock;
48EXPORT_SYMBOL(amiga_colorclock);
49
42unsigned long amiga_chipset; 50unsigned long amiga_chipset;
51EXPORT_SYMBOL(amiga_chipset);
52
43unsigned char amiga_vblank; 53unsigned char amiga_vblank;
44unsigned char amiga_psfreq; 54unsigned char amiga_psfreq;
55
45struct amiga_hw_present amiga_hw_present; 56struct amiga_hw_present amiga_hw_present;
57EXPORT_SYMBOL(amiga_hw_present);
46 58
47static char s_a500[] __initdata = "A500"; 59static char s_a500[] __initdata = "A500";
48static char s_a500p[] __initdata = "A500+"; 60static char s_a500p[] __initdata = "A500+";
diff --git a/arch/m68k/amiga/pcmcia.c b/arch/m68k/amiga/pcmcia.c
index 186662ca1a89..7106f0c3639b 100644
--- a/arch/m68k/amiga/pcmcia.c
+++ b/arch/m68k/amiga/pcmcia.c
@@ -15,6 +15,8 @@
15#include <linux/types.h> 15#include <linux/types.h>
16#include <linux/jiffies.h> 16#include <linux/jiffies.h>
17#include <linux/timer.h> 17#include <linux/timer.h>
18#include <linux/module.h>
19
18#include <asm/amigayle.h> 20#include <asm/amigayle.h>
19#include <asm/amipcmcia.h> 21#include <asm/amipcmcia.h>
20 22
@@ -30,6 +32,7 @@ void pcmcia_reset(void)
30 while (time_before(jiffies, reset_start_time + 1*HZ/100)); 32 while (time_before(jiffies, reset_start_time + 1*HZ/100));
31 b = gayle_reset; 33 b = gayle_reset;
32} 34}
35EXPORT_SYMBOL(pcmcia_reset);
33 36
34 37
35/* copy a tuple, including tuple header. return nb bytes copied */ 38/* copy a tuple, including tuple header. return nb bytes copied */
@@ -61,6 +64,7 @@ int pcmcia_copy_tuple(unsigned char tuple_id, void *tuple, int max_len)
61 64
62 return 0; 65 return 0;
63} 66}
67EXPORT_SYMBOL(pcmcia_copy_tuple);
64 68
65void pcmcia_program_voltage(int voltage) 69void pcmcia_program_voltage(int voltage)
66{ 70{
@@ -84,6 +88,7 @@ void pcmcia_program_voltage(int voltage)
84 gayle.config = cfg_byte; 88 gayle.config = cfg_byte;
85 89
86} 90}
91EXPORT_SYMBOL(pcmcia_program_voltage);
87 92
88void pcmcia_access_speed(int speed) 93void pcmcia_access_speed(int speed)
89{ 94{
@@ -101,13 +106,17 @@ void pcmcia_access_speed(int speed)
101 cfg_byte = (cfg_byte & 0xf3) | s; 106 cfg_byte = (cfg_byte & 0xf3) | s;
102 gayle.config = cfg_byte; 107 gayle.config = cfg_byte;
103} 108}
109EXPORT_SYMBOL(pcmcia_access_speed);
104 110
105void pcmcia_write_enable(void) 111void pcmcia_write_enable(void)
106{ 112{
107 gayle.cardstatus = GAYLE_CS_WR|GAYLE_CS_DA; 113 gayle.cardstatus = GAYLE_CS_WR|GAYLE_CS_DA;
108} 114}
115EXPORT_SYMBOL(pcmcia_write_enable);
109 116
110void pcmcia_write_disable(void) 117void pcmcia_write_disable(void)
111{ 118{
112 gayle.cardstatus = 0; 119 gayle.cardstatus = 0;
113} 120}
121EXPORT_SYMBOL(pcmcia_write_disable);
122
diff --git a/arch/m68k/atari/Makefile b/arch/m68k/atari/Makefile
index 2cb86191f0aa..2cd905efe63a 100644
--- a/arch/m68k/atari/Makefile
+++ b/arch/m68k/atari/Makefile
@@ -3,7 +3,7 @@
3# 3#
4 4
5obj-y := config.o time.o debug.o ataints.o stdma.o \ 5obj-y := config.o time.o debug.o ataints.o stdma.o \
6 atasound.o stram.o atari_ksyms.o 6 atasound.o stram.o
7 7
8ifeq ($(CONFIG_PCI),y) 8ifeq ($(CONFIG_PCI),y)
9obj-$(CONFIG_HADES) += hades-pci.o 9obj-$(CONFIG_HADES) += hades-pci.o
diff --git a/arch/m68k/atari/ataints.c b/arch/m68k/atari/ataints.c
index b85ca22024c1..b45593a60bdd 100644
--- a/arch/m68k/atari/ataints.c
+++ b/arch/m68k/atari/ataints.c
@@ -40,6 +40,7 @@
40#include <linux/kernel_stat.h> 40#include <linux/kernel_stat.h>
41#include <linux/init.h> 41#include <linux/init.h>
42#include <linux/seq_file.h> 42#include <linux/seq_file.h>
43#include <linux/module.h>
43 44
44#include <asm/system.h> 45#include <asm/system.h>
45#include <asm/traps.h> 46#include <asm/traps.h>
@@ -446,6 +447,7 @@ unsigned long atari_register_vme_int(void)
446 free_vme_vec_bitmap |= 1 << i; 447 free_vme_vec_bitmap |= 1 << i;
447 return VME_SOURCE_BASE + i; 448 return VME_SOURCE_BASE + i;
448} 449}
450EXPORT_SYMBOL(atari_register_vme_int);
449 451
450 452
451void atari_unregister_vme_int(unsigned long irq) 453void atari_unregister_vme_int(unsigned long irq)
@@ -455,5 +457,6 @@ void atari_unregister_vme_int(unsigned long irq)
455 free_vme_vec_bitmap &= ~(1 << irq); 457 free_vme_vec_bitmap &= ~(1 << irq);
456 } 458 }
457} 459}
460EXPORT_SYMBOL(atari_unregister_vme_int);
458 461
459 462
diff --git a/arch/m68k/atari/atari_ksyms.c b/arch/m68k/atari/atari_ksyms.c
deleted file mode 100644
index a04757151538..000000000000
--- a/arch/m68k/atari/atari_ksyms.c
+++ /dev/null
@@ -1,35 +0,0 @@
1#include <linux/module.h>
2
3#include <asm/ptrace.h>
4#include <asm/traps.h>
5#include <asm/atarihw.h>
6#include <asm/atariints.h>
7#include <asm/atarikb.h>
8#include <asm/atari_joystick.h>
9#include <asm/atari_stdma.h>
10#include <asm/atari_stram.h>
11
12extern void atari_microwire_cmd( int cmd );
13extern int atari_MFP_init_done;
14extern int atari_SCC_init_done;
15extern int atari_SCC_reset_done;
16
17EXPORT_SYMBOL(atari_mch_cookie);
18EXPORT_SYMBOL(atari_mch_type);
19EXPORT_SYMBOL(atari_hw_present);
20EXPORT_SYMBOL(atari_switches);
21EXPORT_SYMBOL(atari_dont_touch_floppy_select);
22EXPORT_SYMBOL(atari_register_vme_int);
23EXPORT_SYMBOL(atari_unregister_vme_int);
24EXPORT_SYMBOL(stdma_lock);
25EXPORT_SYMBOL(stdma_release);
26EXPORT_SYMBOL(stdma_others_waiting);
27EXPORT_SYMBOL(stdma_islocked);
28EXPORT_SYMBOL(atari_stram_alloc);
29EXPORT_SYMBOL(atari_stram_free);
30
31EXPORT_SYMBOL(atari_MFP_init_done);
32EXPORT_SYMBOL(atari_SCC_init_done);
33EXPORT_SYMBOL(atari_SCC_reset_done);
34
35EXPORT_SYMBOL(atari_microwire_cmd);
diff --git a/arch/m68k/atari/atasound.c b/arch/m68k/atari/atasound.c
index ee04250eb56b..d266fe89c125 100644
--- a/arch/m68k/atari/atasound.c
+++ b/arch/m68k/atari/atasound.c
@@ -22,6 +22,7 @@
22#include <linux/fcntl.h> 22#include <linux/fcntl.h>
23#include <linux/errno.h> 23#include <linux/errno.h>
24#include <linux/mm.h> 24#include <linux/mm.h>
25#include <linux/module.h>
25 26
26#include <asm/atarihw.h> 27#include <asm/atarihw.h>
27#include <asm/system.h> 28#include <asm/system.h>
@@ -43,6 +44,7 @@ void atari_microwire_cmd (int cmd)
43 while( tt_microwire.mask != 0x7ff) 44 while( tt_microwire.mask != 0x7ff)
44 ; 45 ;
45} 46}
47EXPORT_SYMBOL(atari_microwire_cmd);
46 48
47 49
48/* PSG base frequency */ 50/* PSG base frequency */
diff --git a/arch/m68k/atari/config.c b/arch/m68k/atari/config.c
index e40e5dcaa347..5945e1505558 100644
--- a/arch/m68k/atari/config.c
+++ b/arch/m68k/atari/config.c
@@ -31,6 +31,7 @@
31#include <linux/delay.h> 31#include <linux/delay.h>
32#include <linux/ioport.h> 32#include <linux/ioport.h>
33#include <linux/vt_kern.h> 33#include <linux/vt_kern.h>
34#include <linux/module.h>
34 35
35#include <asm/bootinfo.h> 36#include <asm/bootinfo.h>
36#include <asm/setup.h> 37#include <asm/setup.h>
@@ -43,10 +44,20 @@
43#include <asm/io.h> 44#include <asm/io.h>
44 45
45u_long atari_mch_cookie; 46u_long atari_mch_cookie;
47EXPORT_SYMBOL(atari_mch_cookie);
48
46u_long atari_mch_type; 49u_long atari_mch_type;
50EXPORT_SYMBOL(atari_mch_type);
51
47struct atari_hw_present atari_hw_present; 52struct atari_hw_present atari_hw_present;
53EXPORT_SYMBOL(atari_hw_present);
54
48u_long atari_switches; 55u_long atari_switches;
56EXPORT_SYMBOL(atari_switches);
57
49int atari_dont_touch_floppy_select; 58int atari_dont_touch_floppy_select;
59EXPORT_SYMBOL(atari_dont_touch_floppy_select);
60
50int atari_rtc_year_offset; 61int atari_rtc_year_offset;
51 62
52/* local function prototypes */ 63/* local function prototypes */
diff --git a/arch/m68k/atari/debug.c b/arch/m68k/atari/debug.c
index fbeed8c8ecbc..043ddbc61c7b 100644
--- a/arch/m68k/atari/debug.c
+++ b/arch/m68k/atari/debug.c
@@ -15,17 +15,23 @@
15#include <linux/console.h> 15#include <linux/console.h>
16#include <linux/init.h> 16#include <linux/init.h>
17#include <linux/delay.h> 17#include <linux/delay.h>
18#include <linux/module.h>
18 19
19#include <asm/atarihw.h> 20#include <asm/atarihw.h>
20#include <asm/atariints.h> 21#include <asm/atariints.h>
21 22
22/* Flag that Modem1 port is already initialized and used */ 23/* Flag that Modem1 port is already initialized and used */
23int atari_MFP_init_done; 24int atari_MFP_init_done;
25EXPORT_SYMBOL(atari_MFP_init_done);
26
24/* Flag that Modem1 port is already initialized and used */ 27/* Flag that Modem1 port is already initialized and used */
25int atari_SCC_init_done; 28int atari_SCC_init_done;
29EXPORT_SYMBOL(atari_SCC_init_done);
30
26/* Can be set somewhere, if a SCC master reset has already be done and should 31/* Can be set somewhere, if a SCC master reset has already be done and should
27 * not be repeated; used by kgdb */ 32 * not be repeated; used by kgdb */
28int atari_SCC_reset_done; 33int atari_SCC_reset_done;
34EXPORT_SYMBOL(atari_SCC_reset_done);
29 35
30static struct console atari_console_driver = { 36static struct console atari_console_driver = {
31 .name = "debug", 37 .name = "debug",
diff --git a/arch/m68k/atari/hades-pci.c b/arch/m68k/atari/hades-pci.c
index bee2b1443e36..2bbabc008708 100644
--- a/arch/m68k/atari/hades-pci.c
+++ b/arch/m68k/atari/hades-pci.c
@@ -376,8 +376,8 @@ struct pci_bus_info * __init init_hades_pci(void)
376 */ 376 */
377 377
378 bus = kzalloc(sizeof(struct pci_bus_info), GFP_KERNEL); 378 bus = kzalloc(sizeof(struct pci_bus_info), GFP_KERNEL);
379 if (!bus) 379 if (unlikely(!bus))
380 return NULL; 380 goto iounmap_base_virt;
381 381
382 /* 382 /*
383 * Claim resources. The m68k has no separate I/O space, both 383 * Claim resources. The m68k has no separate I/O space, both
@@ -385,43 +385,25 @@ struct pci_bus_info * __init init_hades_pci(void)
385 * the I/O resources are requested in memory space as well. 385 * the I/O resources are requested in memory space as well.
386 */ 386 */
387 387
388 if (request_resource(&iomem_resource, &config_space) != 0) 388 if (unlikely(request_resource(&iomem_resource, &config_space) != 0))
389 { 389 goto free_bus;
390 kfree(bus);
391 return NULL;
392 }
393 390
394 if (request_resource(&iomem_resource, &io_space) != 0) 391 if (unlikely(request_resource(&iomem_resource, &io_space) != 0))
395 { 392 goto release_config_space;
396 release_resource(&config_space);
397 kfree(bus);
398 return NULL;
399 }
400 393
401 bus->mem_space.start = HADES_MEM_BASE; 394 bus->mem_space.start = HADES_MEM_BASE;
402 bus->mem_space.end = HADES_MEM_BASE + HADES_MEM_SIZE - 1; 395 bus->mem_space.end = HADES_MEM_BASE + HADES_MEM_SIZE - 1;
403 bus->mem_space.name = pci_mem_name; 396 bus->mem_space.name = pci_mem_name;
404#if 1 397#if 1
405 if (request_resource(&iomem_resource, &bus->mem_space) != 0) 398 if (unlikely(request_resource(&iomem_resource, &bus->mem_space) != 0))
406 { 399 goto release_io_space;
407 release_resource(&io_space);
408 release_resource(&config_space);
409 kfree(bus);
410 return NULL;
411 }
412#endif 400#endif
413 bus->io_space.start = pci_io_base_virt; 401 bus->io_space.start = pci_io_base_virt;
414 bus->io_space.end = pci_io_base_virt + HADES_VIRT_IO_SIZE - 1; 402 bus->io_space.end = pci_io_base_virt + HADES_VIRT_IO_SIZE - 1;
415 bus->io_space.name = pci_io_name; 403 bus->io_space.name = pci_io_name;
416#if 1 404#if 1
417 if (request_resource(&ioport_resource, &bus->io_space) != 0) 405 if (unlikely(request_resource(&ioport_resource, &bus->io_space) != 0))
418 { 406 goto release_bus_mem_space;
419 release_resource(&bus->mem_space);
420 release_resource(&io_space);
421 release_resource(&config_space);
422 kfree(bus);
423 return NULL;
424 }
425#endif 407#endif
426 /* 408 /*
427 * Set hardware dependent functions. 409 * Set hardware dependent functions.
@@ -438,5 +420,21 @@ struct pci_bus_info * __init init_hades_pci(void)
438 tt_mfp.active_edge &= ~0x27; 420 tt_mfp.active_edge &= ~0x27;
439 421
440 return bus; 422 return bus;
423
424release_bus_mem_space:
425 release_resource(&bus->mem_space);
426release_io_space:
427 release_resource(&io_space);
428release_config_space:
429 release_resource(&config_space);
430free_bus:
431 kfree(bus);
432iounmap_base_virt:
433 iounmap((void *)pci_io_base_virt);
434
435 for (i = 0; i < N_SLOTS; i++)
436 iounmap((void *)pci_conf_base_virt[i]);
437
438 return NULL;
441} 439}
442#endif 440#endif
diff --git a/arch/m68k/atari/stdma.c b/arch/m68k/atari/stdma.c
index ab3fd5202b24..d1bd029a34ac 100644
--- a/arch/m68k/atari/stdma.c
+++ b/arch/m68k/atari/stdma.c
@@ -35,6 +35,7 @@
35#include <linux/init.h> 35#include <linux/init.h>
36#include <linux/interrupt.h> 36#include <linux/interrupt.h>
37#include <linux/wait.h> 37#include <linux/wait.h>
38#include <linux/module.h>
38 39
39#include <asm/atari_stdma.h> 40#include <asm/atari_stdma.h>
40#include <asm/atariints.h> 41#include <asm/atariints.h>
@@ -91,6 +92,7 @@ void stdma_lock(irq_handler_t handler, void *data)
91 stdma_isr_data = data; 92 stdma_isr_data = data;
92 local_irq_restore(flags); 93 local_irq_restore(flags);
93} 94}
95EXPORT_SYMBOL(stdma_lock);
94 96
95 97
96/* 98/*
@@ -117,6 +119,7 @@ void stdma_release(void)
117 119
118 local_irq_restore(flags); 120 local_irq_restore(flags);
119} 121}
122EXPORT_SYMBOL(stdma_release);
120 123
121 124
122/* 125/*
@@ -134,6 +137,7 @@ int stdma_others_waiting(void)
134{ 137{
135 return waitqueue_active(&stdma_wait); 138 return waitqueue_active(&stdma_wait);
136} 139}
140EXPORT_SYMBOL(stdma_others_waiting);
137 141
138 142
139/* 143/*
@@ -155,6 +159,7 @@ int stdma_islocked(void)
155{ 159{
156 return stdma_locked; 160 return stdma_locked;
157} 161}
162EXPORT_SYMBOL(stdma_islocked);
158 163
159 164
160/* 165/*
diff --git a/arch/m68k/atari/stram.c b/arch/m68k/atari/stram.c
index bf4588cbe371..8dda6515887a 100644
--- a/arch/m68k/atari/stram.c
+++ b/arch/m68k/atari/stram.c
@@ -20,6 +20,7 @@
20#include <linux/bootmem.h> 20#include <linux/bootmem.h>
21#include <linux/mount.h> 21#include <linux/mount.h>
22#include <linux/blkdev.h> 22#include <linux/blkdev.h>
23#include <linux/module.h>
23 24
24#include <asm/setup.h> 25#include <asm/setup.h>
25#include <asm/machdep.h> 26#include <asm/machdep.h>
@@ -208,6 +209,7 @@ void *atari_stram_alloc(long size, const char *owner)
208 } 209 }
209 return( addr ); 210 return( addr );
210} 211}
212EXPORT_SYMBOL(atari_stram_alloc);
211 213
212void atari_stram_free( void *addr ) 214void atari_stram_free( void *addr )
213 215
@@ -237,6 +239,7 @@ void atari_stram_free( void *addr )
237 printk( KERN_ERR "atari_stram_free: cannot free block at %p " 239 printk( KERN_ERR "atari_stram_free: cannot free block at %p "
238 "(called from %p)\n", addr, __builtin_return_address(0) ); 240 "(called from %p)\n", addr, __builtin_return_address(0) );
239} 241}
242EXPORT_SYMBOL(atari_stram_free);
240 243
241 244
242/* ------------------------------------------------------------------------ */ 245/* ------------------------------------------------------------------------ */
diff --git a/arch/m68k/configs/mac_defconfig b/arch/m68k/configs/mac_defconfig
index 15b80abfe94a..ff9dffa5b860 100644
--- a/arch/m68k/configs/mac_defconfig
+++ b/arch/m68k/configs/mac_defconfig
@@ -678,7 +678,6 @@ CONFIG_LOGO_MAC_CLUT224=y
678# 678#
679CONFIG_MAC_SCC=y 679CONFIG_MAC_SCC=y
680CONFIG_MAC_HID=y 680CONFIG_MAC_HID=y
681CONFIG_MAC_ADBKEYCODES=y
682CONFIG_SERIAL_CONSOLE=y 681CONFIG_SERIAL_CONSOLE=y
683 682
684# 683#
diff --git a/arch/m68k/hp300/Makefile b/arch/m68k/hp300/Makefile
index 288b9c67c9bf..96d4244c82fd 100644
--- a/arch/m68k/hp300/Makefile
+++ b/arch/m68k/hp300/Makefile
@@ -2,4 +2,4 @@
2# Makefile for Linux arch/m68k/hp300 source directory 2# Makefile for Linux arch/m68k/hp300 source directory
3# 3#
4 4
5obj-y := ksyms.o config.o time.o reboot.o 5obj-y := config.o time.o reboot.o
diff --git a/arch/m68k/hp300/ksyms.c b/arch/m68k/hp300/ksyms.c
deleted file mode 100644
index 8202830763d1..000000000000
--- a/arch/m68k/hp300/ksyms.c
+++ /dev/null
@@ -1,9 +0,0 @@
1/*
2 * linux/arch/m68k/hp300/ksyms.c
3 *
4 * Copyright (C) 1998 Philip Blundell <philb@gnu.org>
5 *
6 * This file contains the HP300-specific kernel symbols. None yet. :-)
7 */
8
9#include <linux/module.h>
diff --git a/arch/m68k/kernel/entry.S b/arch/m68k/kernel/entry.S
index 918f5dbeaef6..6dfa3b3c0e2a 100644
--- a/arch/m68k/kernel/entry.S
+++ b/arch/m68k/kernel/entry.S
@@ -742,7 +742,7 @@ sys_call_table:
742 .long sys_epoll_pwait /* 315 */ 742 .long sys_epoll_pwait /* 315 */
743 .long sys_utimensat 743 .long sys_utimensat
744 .long sys_signalfd 744 .long sys_signalfd
745 .long sys_timerfd 745 .long sys_ni_syscall
746 .long sys_eventfd 746 .long sys_eventfd
747 .long sys_fallocate /* 320 */ 747 .long sys_fallocate /* 320 */
748 748
diff --git a/arch/m68k/mac/Makefile b/arch/m68k/mac/Makefile
index 995a09d912f5..1d265ba365ad 100644
--- a/arch/m68k/mac/Makefile
+++ b/arch/m68k/mac/Makefile
@@ -3,4 +3,4 @@
3# 3#
4 4
5obj-y := config.o bootparse.o macints.o iop.o via.o oss.o psc.o \ 5obj-y := config.o bootparse.o macints.o iop.o via.o oss.o psc.o \
6 baboon.o macboing.o debug.o misc.o mac_ksyms.o 6 baboon.o macboing.o debug.o misc.o
diff --git a/arch/m68k/mac/config.c b/arch/m68k/mac/config.c
index 01b468b9392e..735a49b4b936 100644
--- a/arch/m68k/mac/config.c
+++ b/arch/m68k/mac/config.c
@@ -58,8 +58,6 @@ extern struct mem_info m68k_memory[NUM_MEMINFO];
58 58
59extern struct mem_info m68k_ramdisk; 59extern struct mem_info m68k_ramdisk;
60 60
61extern char m68k_command_line[CL_SIZE];
62
63void *mac_env; /* Loaded by the boot asm */ 61void *mac_env; /* Loaded by the boot asm */
64 62
65/* The phys. video addr. - might be bogus on some machines */ 63/* The phys. video addr. - might be bogus on some machines */
diff --git a/arch/m68k/mac/mac_ksyms.c b/arch/m68k/mac/mac_ksyms.c
deleted file mode 100644
index 6e37ceb0f3b5..000000000000
--- a/arch/m68k/mac/mac_ksyms.c
+++ /dev/null
@@ -1,8 +0,0 @@
1#include <linux/module.h>
2#include <asm/ptrace.h>
3#include <asm/traps.h>
4
5/* Says whether we're using A/UX interrupts or not */
6extern int via_alt_mapping;
7
8EXPORT_SYMBOL(via_alt_mapping);
diff --git a/arch/m68k/mac/via.c b/arch/m68k/mac/via.c
index 8df270e950fa..fa485df4160e 100644
--- a/arch/m68k/mac/via.c
+++ b/arch/m68k/mac/via.c
@@ -28,6 +28,7 @@
28#include <linux/delay.h> 28#include <linux/delay.h>
29#include <linux/init.h> 29#include <linux/init.h>
30#include <linux/ide.h> 30#include <linux/ide.h>
31#include <linux/module.h>
31 32
32#include <asm/bootinfo.h> 33#include <asm/bootinfo.h>
33#include <asm/macintosh.h> 34#include <asm/macintosh.h>
@@ -41,7 +42,9 @@ volatile __u8 *via1, *via2;
41/* See note in mac_via.h about how this is possibly not useful */ 42/* See note in mac_via.h about how this is possibly not useful */
42volatile long *via_memory_bogon=(long *)&via_memory_bogon; 43volatile long *via_memory_bogon=(long *)&via_memory_bogon;
43#endif 44#endif
44int rbv_present, via_alt_mapping; 45int rbv_present;
46int via_alt_mapping;
47EXPORT_SYMBOL(via_alt_mapping);
45__u8 rbv_clear; 48__u8 rbv_clear;
46 49
47/* 50/*
diff --git a/arch/m68k/mvme16x/Makefile b/arch/m68k/mvme16x/Makefile
index 950e82f21640..edb3f6e6ee6a 100644
--- a/arch/m68k/mvme16x/Makefile
+++ b/arch/m68k/mvme16x/Makefile
@@ -2,4 +2,4 @@
2# Makefile for Linux arch/m68k/mvme16x source directory 2# Makefile for Linux arch/m68k/mvme16x source directory
3# 3#
4 4
5obj-y := config.o rtc.o mvme16x_ksyms.o 5obj-y := config.o rtc.o
diff --git a/arch/m68k/mvme16x/config.c b/arch/m68k/mvme16x/config.c
index daa785161401..24cbc3030454 100644
--- a/arch/m68k/mvme16x/config.c
+++ b/arch/m68k/mvme16x/config.c
@@ -25,6 +25,7 @@
25#include <linux/genhd.h> 25#include <linux/genhd.h>
26#include <linux/rtc.h> 26#include <linux/rtc.h>
27#include <linux/interrupt.h> 27#include <linux/interrupt.h>
28#include <linux/module.h>
28 29
29#include <asm/bootinfo.h> 30#include <asm/bootinfo.h>
30#include <asm/system.h> 31#include <asm/system.h>
@@ -58,6 +59,7 @@ static irq_handler_t tick_handler;
58 59
59 60
60unsigned short mvme16x_config; 61unsigned short mvme16x_config;
62EXPORT_SYMBOL(mvme16x_config);
61 63
62 64
63int mvme16x_parse_bootinfo(const struct bi_record *bi) 65int mvme16x_parse_bootinfo(const struct bi_record *bi)
diff --git a/arch/m68k/mvme16x/mvme16x_ksyms.c b/arch/m68k/mvme16x/mvme16x_ksyms.c
deleted file mode 100644
index 4a8a3634bb47..000000000000
--- a/arch/m68k/mvme16x/mvme16x_ksyms.c
+++ /dev/null
@@ -1,6 +0,0 @@
1#include <linux/module.h>
2#include <linux/types.h>
3#include <asm/ptrace.h>
4#include <asm/mvme16xhw.h>
5
6EXPORT_SYMBOL(mvme16x_config);