diff options
-rw-r--r-- | arch/m68k/Makefile | 13 | ||||
-rw-r--r-- | arch/m68k/amiga/platform.c | 126 | ||||
-rw-r--r-- | arch/m68k/atari/ataints.c | 4 | ||||
-rw-r--r-- | arch/m68k/include/asm/atariints.h | 4 | ||||
-rw-r--r-- | arch/m68k/include/asm/entry.h | 6 | ||||
-rw-r--r-- | arch/m68k/include/asm/io_mm.h | 7 | ||||
-rw-r--r-- | arch/m68k/include/asm/vga.h | 27 | ||||
-rw-r--r-- | arch/m68k/mm/fault.c | 42 | ||||
-rw-r--r-- | drivers/net/ethernet/amd/ariadne.c | 8 | ||||
-rw-r--r-- | drivers/net/ethernet/amd/atarilance.c | 11 | ||||
-rw-r--r-- | drivers/scsi/atari_scsi.c | 26 | ||||
-rw-r--r-- | drivers/scsi/atari_scsi.h | 5 | ||||
-rw-r--r-- | drivers/usb/musb/musb_io.h | 2 | ||||
-rw-r--r-- | include/video/vga.h | 22 |
14 files changed, 200 insertions, 103 deletions
diff --git a/arch/m68k/Makefile b/arch/m68k/Makefile index cf318f20c64d..41b3bc926bb1 100644 --- a/arch/m68k/Makefile +++ b/arch/m68k/Makefile | |||
@@ -16,6 +16,13 @@ | |||
16 | 16 | ||
17 | KBUILD_DEFCONFIG := multi_defconfig | 17 | KBUILD_DEFCONFIG := multi_defconfig |
18 | 18 | ||
19 | ifneq ($(SUBARCH),$(ARCH)) | ||
20 | ifeq ($(CROSS_COMPILE),) | ||
21 | CROSS_COMPILE := $(call cc-cross-prefix, \ | ||
22 | m68k-linux-gnu- m68k-linux- m68k-unknown-linux-gnu-) | ||
23 | endif | ||
24 | endif | ||
25 | |||
19 | # | 26 | # |
20 | # Enable processor type. Ordering of these is important - we want to | 27 | # Enable processor type. Ordering of these is important - we want to |
21 | # use the minimum processor type of the range we support. The logic | 28 | # use the minimum processor type of the range we support. The logic |
@@ -62,12 +69,6 @@ endif | |||
62 | 69 | ||
63 | LDFLAGS := -m m68kelf | 70 | LDFLAGS := -m m68kelf |
64 | KBUILD_LDFLAGS_MODULE += -T $(srctree)/arch/m68k/kernel/module.lds | 71 | KBUILD_LDFLAGS_MODULE += -T $(srctree)/arch/m68k/kernel/module.lds |
65 | ifneq ($(SUBARCH),$(ARCH)) | ||
66 | ifeq ($(CROSS_COMPILE),) | ||
67 | CROSS_COMPILE := $(call cc-cross-prefix, \ | ||
68 | m68k-linux-gnu- m68k-linux- m68k-unknown-linux-gnu-) | ||
69 | endif | ||
70 | endif | ||
71 | 72 | ||
72 | ifdef CONFIG_SUN3 | 73 | ifdef CONFIG_SUN3 |
73 | LDFLAGS_vmlinux = -N | 74 | LDFLAGS_vmlinux = -N |
diff --git a/arch/m68k/amiga/platform.c b/arch/m68k/amiga/platform.c index 7fd8b41723ea..80076d368b7e 100644 --- a/arch/m68k/amiga/platform.c +++ b/arch/m68k/amiga/platform.c | |||
@@ -6,6 +6,7 @@ | |||
6 | * for more details. | 6 | * for more details. |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/err.h> | ||
9 | #include <linux/init.h> | 10 | #include <linux/init.h> |
10 | #include <linux/platform_device.h> | 11 | #include <linux/platform_device.h> |
11 | #include <linux/zorro.h> | 12 | #include <linux/zorro.h> |
@@ -46,18 +47,25 @@ static const struct resource zorro_resources[] __initconst = { | |||
46 | 47 | ||
47 | static int __init amiga_init_bus(void) | 48 | static int __init amiga_init_bus(void) |
48 | { | 49 | { |
50 | struct platform_device *pdev; | ||
51 | unsigned int n; | ||
52 | |||
49 | if (!MACH_IS_AMIGA || !AMIGAHW_PRESENT(ZORRO)) | 53 | if (!MACH_IS_AMIGA || !AMIGAHW_PRESENT(ZORRO)) |
50 | return -ENODEV; | 54 | return -ENODEV; |
51 | 55 | ||
52 | platform_device_register_simple("amiga-zorro", -1, zorro_resources, | 56 | n = AMIGAHW_PRESENT(ZORRO3) ? 4 : 2; |
53 | AMIGAHW_PRESENT(ZORRO3) ? 4 : 2); | 57 | pdev = platform_device_register_simple("amiga-zorro", -1, |
58 | zorro_resources, n); | ||
59 | if (IS_ERR(pdev)) | ||
60 | return PTR_ERR(pdev); | ||
61 | |||
54 | return 0; | 62 | return 0; |
55 | } | 63 | } |
56 | 64 | ||
57 | subsys_initcall(amiga_init_bus); | 65 | subsys_initcall(amiga_init_bus); |
58 | 66 | ||
59 | 67 | ||
60 | static int z_dev_present(zorro_id id) | 68 | static int __init z_dev_present(zorro_id id) |
61 | { | 69 | { |
62 | unsigned int i; | 70 | unsigned int i; |
63 | 71 | ||
@@ -126,72 +134,122 @@ static const struct resource amiga_rtc_resource __initconst = { | |||
126 | static int __init amiga_init_devices(void) | 134 | static int __init amiga_init_devices(void) |
127 | { | 135 | { |
128 | struct platform_device *pdev; | 136 | struct platform_device *pdev; |
137 | int error; | ||
129 | 138 | ||
130 | if (!MACH_IS_AMIGA) | 139 | if (!MACH_IS_AMIGA) |
131 | return -ENODEV; | 140 | return -ENODEV; |
132 | 141 | ||
133 | /* video hardware */ | 142 | /* video hardware */ |
134 | if (AMIGAHW_PRESENT(AMI_VIDEO)) | 143 | if (AMIGAHW_PRESENT(AMI_VIDEO)) { |
135 | platform_device_register_simple("amiga-video", -1, NULL, 0); | 144 | pdev = platform_device_register_simple("amiga-video", -1, NULL, |
145 | 0); | ||
146 | if (IS_ERR(pdev)) | ||
147 | return PTR_ERR(pdev); | ||
148 | } | ||
136 | 149 | ||
137 | 150 | ||
138 | /* sound hardware */ | 151 | /* sound hardware */ |
139 | if (AMIGAHW_PRESENT(AMI_AUDIO)) | 152 | if (AMIGAHW_PRESENT(AMI_AUDIO)) { |
140 | platform_device_register_simple("amiga-audio", -1, NULL, 0); | 153 | pdev = platform_device_register_simple("amiga-audio", -1, NULL, |
154 | 0); | ||
155 | if (IS_ERR(pdev)) | ||
156 | return PTR_ERR(pdev); | ||
157 | } | ||
141 | 158 | ||
142 | 159 | ||
143 | /* storage interfaces */ | 160 | /* storage interfaces */ |
144 | if (AMIGAHW_PRESENT(AMI_FLOPPY)) | 161 | if (AMIGAHW_PRESENT(AMI_FLOPPY)) { |
145 | platform_device_register_simple("amiga-floppy", -1, NULL, 0); | 162 | pdev = platform_device_register_simple("amiga-floppy", -1, |
163 | NULL, 0); | ||
164 | if (IS_ERR(pdev)) | ||
165 | return PTR_ERR(pdev); | ||
166 | } | ||
146 | 167 | ||
147 | if (AMIGAHW_PRESENT(A3000_SCSI)) | 168 | if (AMIGAHW_PRESENT(A3000_SCSI)) { |
148 | platform_device_register_simple("amiga-a3000-scsi", -1, | 169 | pdev = platform_device_register_simple("amiga-a3000-scsi", -1, |
149 | &a3000_scsi_resource, 1); | 170 | &a3000_scsi_resource, 1); |
171 | if (IS_ERR(pdev)) | ||
172 | return PTR_ERR(pdev); | ||
173 | } | ||
150 | 174 | ||
151 | if (AMIGAHW_PRESENT(A4000_SCSI)) | 175 | if (AMIGAHW_PRESENT(A4000_SCSI)) { |
152 | platform_device_register_simple("amiga-a4000t-scsi", -1, | 176 | pdev = platform_device_register_simple("amiga-a4000t-scsi", -1, |
153 | &a4000t_scsi_resource, 1); | 177 | &a4000t_scsi_resource, |
178 | 1); | ||
179 | if (IS_ERR(pdev)) | ||
180 | return PTR_ERR(pdev); | ||
181 | } | ||
154 | 182 | ||
155 | if (AMIGAHW_PRESENT(A1200_IDE) || | 183 | if (AMIGAHW_PRESENT(A1200_IDE) || |
156 | z_dev_present(ZORRO_PROD_MTEC_VIPER_MK_V_E_MATRIX_530_SCSI_IDE)) { | 184 | z_dev_present(ZORRO_PROD_MTEC_VIPER_MK_V_E_MATRIX_530_SCSI_IDE)) { |
157 | pdev = platform_device_register_simple("amiga-gayle-ide", -1, | 185 | pdev = platform_device_register_simple("amiga-gayle-ide", -1, |
158 | &a1200_ide_resource, 1); | 186 | &a1200_ide_resource, 1); |
159 | platform_device_add_data(pdev, &a1200_ide_pdata, | 187 | if (IS_ERR(pdev)) |
160 | sizeof(a1200_ide_pdata)); | 188 | return PTR_ERR(pdev); |
189 | error = platform_device_add_data(pdev, &a1200_ide_pdata, | ||
190 | sizeof(a1200_ide_pdata)); | ||
191 | if (error) | ||
192 | return error; | ||
161 | } | 193 | } |
162 | 194 | ||
163 | if (AMIGAHW_PRESENT(A4000_IDE)) { | 195 | if (AMIGAHW_PRESENT(A4000_IDE)) { |
164 | pdev = platform_device_register_simple("amiga-gayle-ide", -1, | 196 | pdev = platform_device_register_simple("amiga-gayle-ide", -1, |
165 | &a4000_ide_resource, 1); | 197 | &a4000_ide_resource, 1); |
166 | platform_device_add_data(pdev, &a4000_ide_pdata, | 198 | if (IS_ERR(pdev)) |
167 | sizeof(a4000_ide_pdata)); | 199 | return PTR_ERR(pdev); |
200 | error = platform_device_add_data(pdev, &a4000_ide_pdata, | ||
201 | sizeof(a4000_ide_pdata)); | ||
202 | if (error) | ||
203 | return error; | ||
168 | } | 204 | } |
169 | 205 | ||
170 | 206 | ||
171 | /* other I/O hardware */ | 207 | /* other I/O hardware */ |
172 | if (AMIGAHW_PRESENT(AMI_KEYBOARD)) | 208 | if (AMIGAHW_PRESENT(AMI_KEYBOARD)) { |
173 | platform_device_register_simple("amiga-keyboard", -1, NULL, 0); | 209 | pdev = platform_device_register_simple("amiga-keyboard", -1, |
210 | NULL, 0); | ||
211 | if (IS_ERR(pdev)) | ||
212 | return PTR_ERR(pdev); | ||
213 | } | ||
174 | 214 | ||
175 | if (AMIGAHW_PRESENT(AMI_MOUSE)) | 215 | if (AMIGAHW_PRESENT(AMI_MOUSE)) { |
176 | platform_device_register_simple("amiga-mouse", -1, NULL, 0); | 216 | pdev = platform_device_register_simple("amiga-mouse", -1, NULL, |
217 | 0); | ||
218 | if (IS_ERR(pdev)) | ||
219 | return PTR_ERR(pdev); | ||
220 | } | ||
177 | 221 | ||
178 | if (AMIGAHW_PRESENT(AMI_SERIAL)) | 222 | if (AMIGAHW_PRESENT(AMI_SERIAL)) { |
179 | platform_device_register_simple("amiga-serial", -1, NULL, 0); | 223 | pdev = platform_device_register_simple("amiga-serial", -1, |
224 | NULL, 0); | ||
225 | if (IS_ERR(pdev)) | ||
226 | return PTR_ERR(pdev); | ||
227 | } | ||
180 | 228 | ||
181 | if (AMIGAHW_PRESENT(AMI_PARALLEL)) | 229 | if (AMIGAHW_PRESENT(AMI_PARALLEL)) { |
182 | platform_device_register_simple("amiga-parallel", -1, NULL, 0); | 230 | pdev = platform_device_register_simple("amiga-parallel", -1, |
231 | NULL, 0); | ||
232 | if (IS_ERR(pdev)) | ||
233 | return PTR_ERR(pdev); | ||
234 | } | ||
183 | 235 | ||
184 | 236 | ||
185 | /* real time clocks */ | 237 | /* real time clocks */ |
186 | if (AMIGAHW_PRESENT(A2000_CLK)) | 238 | if (AMIGAHW_PRESENT(A2000_CLK)) { |
187 | platform_device_register_simple("rtc-msm6242", -1, | 239 | pdev = platform_device_register_simple("rtc-msm6242", -1, |
188 | &amiga_rtc_resource, 1); | 240 | &amiga_rtc_resource, 1); |
241 | if (IS_ERR(pdev)) | ||
242 | return PTR_ERR(pdev); | ||
243 | } | ||
189 | 244 | ||
190 | if (AMIGAHW_PRESENT(A3000_CLK)) | 245 | if (AMIGAHW_PRESENT(A3000_CLK)) { |
191 | platform_device_register_simple("rtc-rp5c01", -1, | 246 | pdev = platform_device_register_simple("rtc-rp5c01", -1, |
192 | &amiga_rtc_resource, 1); | 247 | &amiga_rtc_resource, 1); |
248 | if (IS_ERR(pdev)) | ||
249 | return PTR_ERR(pdev); | ||
250 | } | ||
193 | 251 | ||
194 | return 0; | 252 | return 0; |
195 | } | 253 | } |
196 | 254 | ||
197 | device_initcall(amiga_init_devices); | 255 | arch_initcall(amiga_init_devices); |
diff --git a/arch/m68k/atari/ataints.c b/arch/m68k/atari/ataints.c index 783d8f02360d..3f41092d1b70 100644 --- a/arch/m68k/atari/ataints.c +++ b/arch/m68k/atari/ataints.c | |||
@@ -206,7 +206,7 @@ void __init atari_init_IRQ(void) | |||
206 | * hardware with a programmable int vector (probably a VME board). | 206 | * hardware with a programmable int vector (probably a VME board). |
207 | */ | 207 | */ |
208 | 208 | ||
209 | unsigned long atari_register_vme_int(void) | 209 | unsigned int atari_register_vme_int(void) |
210 | { | 210 | { |
211 | int i; | 211 | int i; |
212 | 212 | ||
@@ -223,7 +223,7 @@ unsigned long atari_register_vme_int(void) | |||
223 | EXPORT_SYMBOL(atari_register_vme_int); | 223 | EXPORT_SYMBOL(atari_register_vme_int); |
224 | 224 | ||
225 | 225 | ||
226 | void atari_unregister_vme_int(unsigned long irq) | 226 | void atari_unregister_vme_int(unsigned int irq) |
227 | { | 227 | { |
228 | if (irq >= VME_SOURCE_BASE && irq < VME_SOURCE_BASE + VME_MAX_SOURCES) { | 228 | if (irq >= VME_SOURCE_BASE && irq < VME_SOURCE_BASE + VME_MAX_SOURCES) { |
229 | irq -= VME_SOURCE_BASE; | 229 | irq -= VME_SOURCE_BASE; |
diff --git a/arch/m68k/include/asm/atariints.h b/arch/m68k/include/asm/atariints.h index 656bbbf5a6ff..5fc13bdf9044 100644 --- a/arch/m68k/include/asm/atariints.h +++ b/arch/m68k/include/asm/atariints.h | |||
@@ -198,7 +198,7 @@ static inline int atari_irq_pending( unsigned irq ) | |||
198 | return( get_mfp_bit( irq, MFP_PENDING ) ); | 198 | return( get_mfp_bit( irq, MFP_PENDING ) ); |
199 | } | 199 | } |
200 | 200 | ||
201 | unsigned long atari_register_vme_int( void ); | 201 | unsigned int atari_register_vme_int(void); |
202 | void atari_unregister_vme_int( unsigned long ); | 202 | void atari_unregister_vme_int(unsigned int); |
203 | 203 | ||
204 | #endif /* linux/atariints.h */ | 204 | #endif /* linux/atariints.h */ |
diff --git a/arch/m68k/include/asm/entry.h b/arch/m68k/include/asm/entry.h index 622138dc7288..d7de0f1a8957 100644 --- a/arch/m68k/include/asm/entry.h +++ b/arch/m68k/include/asm/entry.h | |||
@@ -33,13 +33,11 @@ | |||
33 | 33 | ||
34 | /* the following macro is used when enabling interrupts */ | 34 | /* the following macro is used when enabling interrupts */ |
35 | #if defined(MACH_ATARI_ONLY) | 35 | #if defined(MACH_ATARI_ONLY) |
36 | /* block out HSYNC on the atari */ | 36 | /* block out HSYNC = ipl 2 on the atari */ |
37 | #define ALLOWINT (~0x400) | 37 | #define ALLOWINT (~0x500) |
38 | #define MAX_NOINT_IPL 3 | ||
39 | #else | 38 | #else |
40 | /* portable version */ | 39 | /* portable version */ |
41 | #define ALLOWINT (~0x700) | 40 | #define ALLOWINT (~0x700) |
42 | #define MAX_NOINT_IPL 0 | ||
43 | #endif /* machine compilation types */ | 41 | #endif /* machine compilation types */ |
44 | 42 | ||
45 | #ifdef __ASSEMBLY__ | 43 | #ifdef __ASSEMBLY__ |
diff --git a/arch/m68k/include/asm/io_mm.h b/arch/m68k/include/asm/io_mm.h index 0fb3468000e7..fa4324bcf566 100644 --- a/arch/m68k/include/asm/io_mm.h +++ b/arch/m68k/include/asm/io_mm.h | |||
@@ -278,6 +278,13 @@ static inline void isa_delay(void) | |||
278 | #define readl(addr) in_le32(addr) | 278 | #define readl(addr) in_le32(addr) |
279 | #define writel(val,addr) out_le32((addr),(val)) | 279 | #define writel(val,addr) out_le32((addr),(val)) |
280 | 280 | ||
281 | #define readsb(port, buf, nr) raw_insb((port), (u8 *)(buf), (nr)) | ||
282 | #define readsw(port, buf, nr) raw_insw((port), (u16 *)(buf), (nr)) | ||
283 | #define readsl(port, buf, nr) raw_insl((port), (u32 *)(buf), (nr)) | ||
284 | #define writesb(port, buf, nr) raw_outsb((port), (u8 *)(buf), (nr)) | ||
285 | #define writesw(port, buf, nr) raw_outsw((port), (u16 *)(buf), (nr)) | ||
286 | #define writesl(port, buf, nr) raw_outsl((port), (u32 *)(buf), (nr)) | ||
287 | |||
281 | #define mmiowb() | 288 | #define mmiowb() |
282 | 289 | ||
283 | static inline void __iomem *ioremap(unsigned long physaddr, unsigned long size) | 290 | static inline void __iomem *ioremap(unsigned long physaddr, unsigned long size) |
diff --git a/arch/m68k/include/asm/vga.h b/arch/m68k/include/asm/vga.h new file mode 100644 index 000000000000..d3aa1401e7aa --- /dev/null +++ b/arch/m68k/include/asm/vga.h | |||
@@ -0,0 +1,27 @@ | |||
1 | #ifndef _ASM_M68K_VGA_H | ||
2 | #define _ASM_M68K_VGA_H | ||
3 | |||
4 | #include <asm/raw_io.h> | ||
5 | |||
6 | /* | ||
7 | * FIXME | ||
8 | * Ugh, we don't have PCI space, so map readb() and friends to use raw I/O | ||
9 | * accessors, which are identical to the z_*() Zorro bus accessors. | ||
10 | * This should make cirrusfb work again on Amiga | ||
11 | */ | ||
12 | #undef inb_p | ||
13 | #undef inw_p | ||
14 | #undef outb_p | ||
15 | #undef outw | ||
16 | #undef readb | ||
17 | #undef writeb | ||
18 | #undef writew | ||
19 | #define inb_p(port) 0 | ||
20 | #define inw_p(port) 0 | ||
21 | #define outb_p(port, val) do { } while (0) | ||
22 | #define outw(port, val) do { } while (0) | ||
23 | #define readb raw_inb | ||
24 | #define writeb raw_outb | ||
25 | #define writew raw_outw | ||
26 | |||
27 | #endif /* _ASM_M68K_VGA_H */ | ||
diff --git a/arch/m68k/mm/fault.c b/arch/m68k/mm/fault.c index 6b020a8461e7..aeebbb7b30f0 100644 --- a/arch/m68k/mm/fault.c +++ b/arch/m68k/mm/fault.c | |||
@@ -72,7 +72,8 @@ int do_page_fault(struct pt_regs *regs, unsigned long address, | |||
72 | { | 72 | { |
73 | struct mm_struct *mm = current->mm; | 73 | struct mm_struct *mm = current->mm; |
74 | struct vm_area_struct * vma; | 74 | struct vm_area_struct * vma; |
75 | int write, fault; | 75 | int fault; |
76 | unsigned int flags = FAULT_FLAG_ALLOW_RETRY | FAULT_FLAG_KILLABLE; | ||
76 | 77 | ||
77 | #ifdef DEBUG | 78 | #ifdef DEBUG |
78 | printk ("do page fault:\nregs->sr=%#x, regs->pc=%#lx, address=%#lx, %ld, %p\n", | 79 | printk ("do page fault:\nregs->sr=%#x, regs->pc=%#lx, address=%#lx, %ld, %p\n", |
@@ -87,6 +88,7 @@ int do_page_fault(struct pt_regs *regs, unsigned long address, | |||
87 | if (in_atomic() || !mm) | 88 | if (in_atomic() || !mm) |
88 | goto no_context; | 89 | goto no_context; |
89 | 90 | ||
91 | retry: | ||
90 | down_read(&mm->mmap_sem); | 92 | down_read(&mm->mmap_sem); |
91 | 93 | ||
92 | vma = find_vma(mm, address); | 94 | vma = find_vma(mm, address); |
@@ -117,14 +119,13 @@ good_area: | |||
117 | #ifdef DEBUG | 119 | #ifdef DEBUG |
118 | printk("do_page_fault: good_area\n"); | 120 | printk("do_page_fault: good_area\n"); |
119 | #endif | 121 | #endif |
120 | write = 0; | ||
121 | switch (error_code & 3) { | 122 | switch (error_code & 3) { |
122 | default: /* 3: write, present */ | 123 | default: /* 3: write, present */ |
123 | /* fall through */ | 124 | /* fall through */ |
124 | case 2: /* write, not present */ | 125 | case 2: /* write, not present */ |
125 | if (!(vma->vm_flags & VM_WRITE)) | 126 | if (!(vma->vm_flags & VM_WRITE)) |
126 | goto acc_err; | 127 | goto acc_err; |
127 | write++; | 128 | flags |= FAULT_FLAG_WRITE; |
128 | break; | 129 | break; |
129 | case 1: /* read, present */ | 130 | case 1: /* read, present */ |
130 | goto acc_err; | 131 | goto acc_err; |
@@ -139,10 +140,14 @@ good_area: | |||
139 | * the fault. | 140 | * the fault. |
140 | */ | 141 | */ |
141 | 142 | ||
142 | fault = handle_mm_fault(mm, vma, address, write ? FAULT_FLAG_WRITE : 0); | 143 | fault = handle_mm_fault(mm, vma, address, flags); |
143 | #ifdef DEBUG | 144 | #ifdef DEBUG |
144 | printk("handle_mm_fault returns %d\n",fault); | 145 | printk("handle_mm_fault returns %d\n",fault); |
145 | #endif | 146 | #endif |
147 | |||
148 | if ((fault & VM_FAULT_RETRY) && fatal_signal_pending(current)) | ||
149 | return 0; | ||
150 | |||
146 | if (unlikely(fault & VM_FAULT_ERROR)) { | 151 | if (unlikely(fault & VM_FAULT_ERROR)) { |
147 | if (fault & VM_FAULT_OOM) | 152 | if (fault & VM_FAULT_OOM) |
148 | goto out_of_memory; | 153 | goto out_of_memory; |
@@ -150,10 +155,31 @@ good_area: | |||
150 | goto bus_err; | 155 | goto bus_err; |
151 | BUG(); | 156 | BUG(); |
152 | } | 157 | } |
153 | if (fault & VM_FAULT_MAJOR) | 158 | |
154 | current->maj_flt++; | 159 | /* |
155 | else | 160 | * Major/minor page fault accounting is only done on the |
156 | current->min_flt++; | 161 | * initial attempt. If we go through a retry, it is extremely |
162 | * likely that the page will be found in page cache at that point. | ||
163 | */ | ||
164 | if (flags & FAULT_FLAG_ALLOW_RETRY) { | ||
165 | if (fault & VM_FAULT_MAJOR) | ||
166 | current->maj_flt++; | ||
167 | else | ||
168 | current->min_flt++; | ||
169 | if (fault & VM_FAULT_RETRY) { | ||
170 | /* Clear FAULT_FLAG_ALLOW_RETRY to avoid any risk | ||
171 | * of starvation. */ | ||
172 | flags &= ~FAULT_FLAG_ALLOW_RETRY; | ||
173 | |||
174 | /* | ||
175 | * No need to up_read(&mm->mmap_sem) as we would | ||
176 | * have already released it in __lock_page_or_retry | ||
177 | * in mm/filemap.c. | ||
178 | */ | ||
179 | |||
180 | goto retry; | ||
181 | } | ||
182 | } | ||
157 | 183 | ||
158 | up_read(&mm->mmap_sem); | 184 | up_read(&mm->mmap_sem); |
159 | return 0; | 185 | return 0; |
diff --git a/drivers/net/ethernet/amd/ariadne.c b/drivers/net/ethernet/amd/ariadne.c index f4c228e4d76c..f2958df9a1e4 100644 --- a/drivers/net/ethernet/amd/ariadne.c +++ b/drivers/net/ethernet/amd/ariadne.c | |||
@@ -213,10 +213,10 @@ static int ariadne_rx(struct net_device *dev) | |||
213 | (const void *)priv->rx_buff[entry], | 213 | (const void *)priv->rx_buff[entry], |
214 | pkt_len); | 214 | pkt_len); |
215 | skb->protocol = eth_type_trans(skb, dev); | 215 | skb->protocol = eth_type_trans(skb, dev); |
216 | netdev_dbg(dev, "RX pkt type 0x%04x from %pM to %pM data 0x%08x len %d\n", | 216 | netdev_dbg(dev, "RX pkt type 0x%04x from %pM to %pM data %p len %u\n", |
217 | ((u_short *)skb->data)[6], | 217 | ((u_short *)skb->data)[6], |
218 | skb->data + 6, skb->data, | 218 | skb->data + 6, skb->data, |
219 | (int)skb->data, (int)skb->len); | 219 | skb->data, skb->len); |
220 | 220 | ||
221 | netif_rx(skb); | 221 | netif_rx(skb); |
222 | dev->stats.rx_packets++; | 222 | dev->stats.rx_packets++; |
@@ -566,10 +566,10 @@ static netdev_tx_t ariadne_start_xmit(struct sk_buff *skb, | |||
566 | 566 | ||
567 | /* Fill in a Tx ring entry */ | 567 | /* Fill in a Tx ring entry */ |
568 | 568 | ||
569 | netdev_dbg(dev, "TX pkt type 0x%04x from %pM to %pM data 0x%08x len %d\n", | 569 | netdev_dbg(dev, "TX pkt type 0x%04x from %pM to %pM data %p len %u\n", |
570 | ((u_short *)skb->data)[6], | 570 | ((u_short *)skb->data)[6], |
571 | skb->data + 6, skb->data, | 571 | skb->data + 6, skb->data, |
572 | (int)skb->data, (int)skb->len); | 572 | skb->data, skb->len); |
573 | 573 | ||
574 | local_irq_save(flags); | 574 | local_irq_save(flags); |
575 | 575 | ||
diff --git a/drivers/net/ethernet/amd/atarilance.c b/drivers/net/ethernet/amd/atarilance.c index 70ed79c46245..84219df72f51 100644 --- a/drivers/net/ethernet/amd/atarilance.c +++ b/drivers/net/ethernet/amd/atarilance.c | |||
@@ -558,21 +558,18 @@ static unsigned long __init lance_probe1( struct net_device *dev, | |||
558 | printk( "Lance: request for irq %d failed\n", IRQ_AUTO_5 ); | 558 | printk( "Lance: request for irq %d failed\n", IRQ_AUTO_5 ); |
559 | return 0; | 559 | return 0; |
560 | } | 560 | } |
561 | dev->irq = (unsigned short)IRQ_AUTO_5; | 561 | dev->irq = IRQ_AUTO_5; |
562 | } | 562 | } |
563 | else { | 563 | else { |
564 | /* For VME-RieblCards, request a free VME int; | 564 | /* For VME-RieblCards, request a free VME int */ |
565 | * (This must be unsigned long, since dev->irq is short and the | 565 | unsigned int irq = atari_register_vme_int(); |
566 | * IRQ_MACHSPEC bit would be cut off...) | ||
567 | */ | ||
568 | unsigned long irq = atari_register_vme_int(); | ||
569 | if (!irq) { | 566 | if (!irq) { |
570 | printk( "Lance: request for VME interrupt failed\n" ); | 567 | printk( "Lance: request for VME interrupt failed\n" ); |
571 | return 0; | 568 | return 0; |
572 | } | 569 | } |
573 | if (request_irq(irq, lance_interrupt, IRQ_TYPE_PRIO, | 570 | if (request_irq(irq, lance_interrupt, IRQ_TYPE_PRIO, |
574 | "Riebl-VME Ethernet", dev)) { | 571 | "Riebl-VME Ethernet", dev)) { |
575 | printk( "Lance: request for irq %ld failed\n", irq ); | 572 | printk( "Lance: request for irq %u failed\n", irq ); |
576 | return 0; | 573 | return 0; |
577 | } | 574 | } |
578 | dev->irq = irq; | 575 | dev->irq = irq; |
diff --git a/drivers/scsi/atari_scsi.c b/drivers/scsi/atari_scsi.c index 04a154f87e3e..df740cbbaef4 100644 --- a/drivers/scsi/atari_scsi.c +++ b/drivers/scsi/atari_scsi.c | |||
@@ -572,7 +572,7 @@ static void falcon_get_lock(void) | |||
572 | } | 572 | } |
573 | 573 | ||
574 | 574 | ||
575 | int __init atari_scsi_detect(struct scsi_host_template *host) | 575 | static int __init atari_scsi_detect(struct scsi_host_template *host) |
576 | { | 576 | { |
577 | static int called = 0; | 577 | static int called = 0; |
578 | struct Scsi_Host *instance; | 578 | struct Scsi_Host *instance; |
@@ -724,7 +724,7 @@ int __init atari_scsi_detect(struct scsi_host_template *host) | |||
724 | return 1; | 724 | return 1; |
725 | } | 725 | } |
726 | 726 | ||
727 | int atari_scsi_release(struct Scsi_Host *sh) | 727 | static int atari_scsi_release(struct Scsi_Host *sh) |
728 | { | 728 | { |
729 | if (IS_A_TT()) | 729 | if (IS_A_TT()) |
730 | free_irq(IRQ_TT_MFP_SCSI, sh); | 730 | free_irq(IRQ_TT_MFP_SCSI, sh); |
@@ -734,17 +734,21 @@ int atari_scsi_release(struct Scsi_Host *sh) | |||
734 | return 1; | 734 | return 1; |
735 | } | 735 | } |
736 | 736 | ||
737 | void __init atari_scsi_setup(char *str, int *ints) | 737 | #ifndef MODULE |
738 | static int __init atari_scsi_setup(char *str) | ||
738 | { | 739 | { |
739 | /* Format of atascsi parameter is: | 740 | /* Format of atascsi parameter is: |
740 | * atascsi=<can_queue>,<cmd_per_lun>,<sg_tablesize>,<hostid>,<use_tags> | 741 | * atascsi=<can_queue>,<cmd_per_lun>,<sg_tablesize>,<hostid>,<use_tags> |
741 | * Defaults depend on TT or Falcon, hostid determined at run time. | 742 | * Defaults depend on TT or Falcon, hostid determined at run time. |
742 | * Negative values mean don't change. | 743 | * Negative values mean don't change. |
743 | */ | 744 | */ |
745 | int ints[6]; | ||
746 | |||
747 | get_options(str, ARRAY_SIZE(ints), ints); | ||
744 | 748 | ||
745 | if (ints[0] < 1) { | 749 | if (ints[0] < 1) { |
746 | printk("atari_scsi_setup: no arguments!\n"); | 750 | printk("atari_scsi_setup: no arguments!\n"); |
747 | return; | 751 | return 0; |
748 | } | 752 | } |
749 | 753 | ||
750 | if (ints[0] >= 1) { | 754 | if (ints[0] >= 1) { |
@@ -777,9 +781,14 @@ void __init atari_scsi_setup(char *str, int *ints) | |||
777 | setup_use_tagged_queuing = !!ints[5]; | 781 | setup_use_tagged_queuing = !!ints[5]; |
778 | } | 782 | } |
779 | #endif | 783 | #endif |
784 | |||
785 | return 1; | ||
780 | } | 786 | } |
781 | 787 | ||
782 | int atari_scsi_bus_reset(Scsi_Cmnd *cmd) | 788 | __setup("atascsi=", atari_scsi_setup); |
789 | #endif /* !MODULE */ | ||
790 | |||
791 | static int atari_scsi_bus_reset(Scsi_Cmnd *cmd) | ||
783 | { | 792 | { |
784 | int rv; | 793 | int rv; |
785 | struct NCR5380_hostdata *hostdata = | 794 | struct NCR5380_hostdata *hostdata = |
@@ -852,7 +861,7 @@ static void __init atari_scsi_reset_boot(void) | |||
852 | #endif | 861 | #endif |
853 | 862 | ||
854 | 863 | ||
855 | const char *atari_scsi_info(struct Scsi_Host *host) | 864 | static const char *atari_scsi_info(struct Scsi_Host *host) |
856 | { | 865 | { |
857 | /* atari_scsi_detect() is verbose enough... */ | 866 | /* atari_scsi_detect() is verbose enough... */ |
858 | static const char string[] = "Atari native SCSI"; | 867 | static const char string[] = "Atari native SCSI"; |
@@ -862,8 +871,9 @@ const char *atari_scsi_info(struct Scsi_Host *host) | |||
862 | 871 | ||
863 | #if defined(REAL_DMA) | 872 | #if defined(REAL_DMA) |
864 | 873 | ||
865 | unsigned long atari_scsi_dma_setup(struct Scsi_Host *instance, void *data, | 874 | static unsigned long atari_scsi_dma_setup(struct Scsi_Host *instance, |
866 | unsigned long count, int dir) | 875 | void *data, unsigned long count, |
876 | int dir) | ||
867 | { | 877 | { |
868 | unsigned long addr = virt_to_phys(data); | 878 | unsigned long addr = virt_to_phys(data); |
869 | 879 | ||
diff --git a/drivers/scsi/atari_scsi.h b/drivers/scsi/atari_scsi.h index efadb8d567c2..bd52df78b209 100644 --- a/drivers/scsi/atari_scsi.h +++ b/drivers/scsi/atari_scsi.h | |||
@@ -18,11 +18,6 @@ | |||
18 | /* (I_HAVE_OVERRUNS stuff removed) */ | 18 | /* (I_HAVE_OVERRUNS stuff removed) */ |
19 | 19 | ||
20 | #ifndef ASM | 20 | #ifndef ASM |
21 | int atari_scsi_detect (struct scsi_host_template *); | ||
22 | const char *atari_scsi_info (struct Scsi_Host *); | ||
23 | int atari_scsi_reset (Scsi_Cmnd *, unsigned int); | ||
24 | int atari_scsi_release (struct Scsi_Host *); | ||
25 | |||
26 | /* The values for CMD_PER_LUN and CAN_QUEUE are somehow arbitrary. Higher | 21 | /* The values for CMD_PER_LUN and CAN_QUEUE are somehow arbitrary. Higher |
27 | * values should work, too; try it! (but cmd_per_lun costs memory!) */ | 22 | * values should work, too; try it! (but cmd_per_lun costs memory!) */ |
28 | 23 | ||
diff --git a/drivers/usb/musb/musb_io.h b/drivers/usb/musb/musb_io.h index 1d5eda26fbd1..f7c1c8e2dc3f 100644 --- a/drivers/usb/musb/musb_io.h +++ b/drivers/usb/musb/musb_io.h | |||
@@ -40,7 +40,7 @@ | |||
40 | #if !defined(CONFIG_ARM) && !defined(CONFIG_SUPERH) \ | 40 | #if !defined(CONFIG_ARM) && !defined(CONFIG_SUPERH) \ |
41 | && !defined(CONFIG_AVR32) && !defined(CONFIG_PPC32) \ | 41 | && !defined(CONFIG_AVR32) && !defined(CONFIG_PPC32) \ |
42 | && !defined(CONFIG_PPC64) && !defined(CONFIG_BLACKFIN) \ | 42 | && !defined(CONFIG_PPC64) && !defined(CONFIG_BLACKFIN) \ |
43 | && !defined(CONFIG_MIPS) | 43 | && !defined(CONFIG_MIPS) && !defined(CONFIG_M68K) |
44 | static inline void readsl(const void __iomem *addr, void *buf, int len) | 44 | static inline void readsl(const void __iomem *addr, void *buf, int len) |
45 | { insl((unsigned long)addr, buf, len); } | 45 | { insl((unsigned long)addr, buf, len); } |
46 | static inline void readsw(const void __iomem *addr, void *buf, int len) | 46 | static inline void readsw(const void __iomem *addr, void *buf, int len) |
diff --git a/include/video/vga.h b/include/video/vga.h index 2b8691f7d256..cac567f22e62 100644 --- a/include/video/vga.h +++ b/include/video/vga.h | |||
@@ -19,29 +19,7 @@ | |||
19 | 19 | ||
20 | #include <linux/types.h> | 20 | #include <linux/types.h> |
21 | #include <asm/io.h> | 21 | #include <asm/io.h> |
22 | #ifndef CONFIG_AMIGA | ||
23 | #include <asm/vga.h> | 22 | #include <asm/vga.h> |
24 | #else | ||
25 | /* | ||
26 | * FIXME | ||
27 | * Ugh, we don't have PCI space, so map readb() and friends to use Zorro space | ||
28 | * for MMIO accesses. This should make cirrusfb work again on Amiga | ||
29 | */ | ||
30 | #undef inb_p | ||
31 | #undef inw_p | ||
32 | #undef outb_p | ||
33 | #undef outw | ||
34 | #undef readb | ||
35 | #undef writeb | ||
36 | #undef writew | ||
37 | #define inb_p(port) 0 | ||
38 | #define inw_p(port) 0 | ||
39 | #define outb_p(port, val) do { } while (0) | ||
40 | #define outw(port, val) do { } while (0) | ||
41 | #define readb z_readb | ||
42 | #define writeb z_writeb | ||
43 | #define writew z_writew | ||
44 | #endif | ||
45 | #include <asm/byteorder.h> | 23 | #include <asm/byteorder.h> |
46 | 24 | ||
47 | 25 | ||