diff options
910 files changed, 10663 insertions, 4555 deletions
diff --git a/Documentation/DocBook/videobook.tmpl b/Documentation/DocBook/videobook.tmpl index fdff984a5161..b629da33951d 100644 --- a/Documentation/DocBook/videobook.tmpl +++ b/Documentation/DocBook/videobook.tmpl | |||
@@ -976,7 +976,7 @@ static int camera_close(struct video_device *dev) | |||
976 | <title>Interrupt Handling</title> | 976 | <title>Interrupt Handling</title> |
977 | <para> | 977 | <para> |
978 | Our example handler is for an ISA bus device. If it was PCI you would be | 978 | Our example handler is for an ISA bus device. If it was PCI you would be |
979 | able to share the interrupt and would have set SA_SHIRQ to indicate a | 979 | able to share the interrupt and would have set IRQF_SHARED to indicate a |
980 | shared IRQ. We pass the device pointer as the interrupt routine argument. We | 980 | shared IRQ. We pass the device pointer as the interrupt routine argument. We |
981 | don't need to since we only support one card but doing this will make it | 981 | don't need to since we only support one card but doing this will make it |
982 | easier to upgrade the driver for multiple devices in the future. | 982 | easier to upgrade the driver for multiple devices in the future. |
diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt index 1cbbb8e28999..99f219a01e0e 100644 --- a/Documentation/feature-removal-schedule.txt +++ b/Documentation/feature-removal-schedule.txt | |||
@@ -257,3 +257,12 @@ Why: Code does no longer build since at least 2.6.0, apparently there is | |||
257 | Who: Ralf Baechle <ralf@linux-mips.org> | 257 | Who: Ralf Baechle <ralf@linux-mips.org> |
258 | 258 | ||
259 | --------------------------- | 259 | --------------------------- |
260 | |||
261 | What: Interrupt only SA_* flags | ||
262 | When: Januar 2007 | ||
263 | Why: The interrupt related SA_* flags are replaced by IRQF_* to move them | ||
264 | out of the signal namespace. | ||
265 | |||
266 | Who: Thomas Gleixner <tglx@linutronix.de> | ||
267 | |||
268 | --------------------------- | ||
diff --git a/Documentation/pci.txt b/Documentation/pci.txt index 3242e5c1ee9c..2b395e478961 100644 --- a/Documentation/pci.txt +++ b/Documentation/pci.txt | |||
@@ -225,7 +225,7 @@ Generic flavors of pci_request_region() are request_mem_region() | |||
225 | Use these for address resources that are not described by "normal" PCI | 225 | Use these for address resources that are not described by "normal" PCI |
226 | interfaces (e.g. BAR). | 226 | interfaces (e.g. BAR). |
227 | 227 | ||
228 | All interrupt handlers should be registered with SA_SHIRQ and use the devid | 228 | All interrupt handlers should be registered with IRQF_SHARED and use the devid |
229 | to map IRQs to devices (remember that all PCI interrupts are shared). | 229 | to map IRQs to devices (remember that all PCI interrupts are shared). |
230 | 230 | ||
231 | 231 | ||
diff --git a/Documentation/scsi/tmscsim.txt b/Documentation/scsi/tmscsim.txt index e165229adf50..df7a02bfb5bf 100644 --- a/Documentation/scsi/tmscsim.txt +++ b/Documentation/scsi/tmscsim.txt | |||
@@ -109,7 +109,7 @@ than the 33.33 MHz being in the PCI spec. | |||
109 | 109 | ||
110 | If you want to share the IRQ with another device and the driver refuses to | 110 | If you want to share the IRQ with another device and the driver refuses to |
111 | do so, you might succeed with changing the DC390_IRQ type in tmscsim.c to | 111 | do so, you might succeed with changing the DC390_IRQ type in tmscsim.c to |
112 | SA_SHIRQ | SA_INTERRUPT. | 112 | IRQF_SHARED | IRQF_DISABLED. |
113 | 113 | ||
114 | 114 | ||
115 | 3.Features | 115 | 3.Features |
diff --git a/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl b/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl index bb18115d5170..69866d5997a4 100644 --- a/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl +++ b/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl | |||
@@ -1149,7 +1149,7 @@ | |||
1149 | } | 1149 | } |
1150 | chip->port = pci_resource_start(pci, 0); | 1150 | chip->port = pci_resource_start(pci, 0); |
1151 | if (request_irq(pci->irq, snd_mychip_interrupt, | 1151 | if (request_irq(pci->irq, snd_mychip_interrupt, |
1152 | SA_INTERRUPT|SA_SHIRQ, "My Chip", chip)) { | 1152 | IRQF_DISABLED|IRQF_SHARED, "My Chip", chip)) { |
1153 | printk(KERN_ERR "cannot grab irq %d\n", pci->irq); | 1153 | printk(KERN_ERR "cannot grab irq %d\n", pci->irq); |
1154 | snd_mychip_free(chip); | 1154 | snd_mychip_free(chip); |
1155 | return -EBUSY; | 1155 | return -EBUSY; |
@@ -1323,7 +1323,7 @@ | |||
1323 | <programlisting> | 1323 | <programlisting> |
1324 | <![CDATA[ | 1324 | <![CDATA[ |
1325 | if (request_irq(pci->irq, snd_mychip_interrupt, | 1325 | if (request_irq(pci->irq, snd_mychip_interrupt, |
1326 | SA_INTERRUPT|SA_SHIRQ, "My Chip", chip)) { | 1326 | IRQF_DISABLED|IRQF_SHARED, "My Chip", chip)) { |
1327 | printk(KERN_ERR "cannot grab irq %d\n", pci->irq); | 1327 | printk(KERN_ERR "cannot grab irq %d\n", pci->irq); |
1328 | snd_mychip_free(chip); | 1328 | snd_mychip_free(chip); |
1329 | return -EBUSY; | 1329 | return -EBUSY; |
@@ -1342,7 +1342,7 @@ | |||
1342 | 1342 | ||
1343 | <para> | 1343 | <para> |
1344 | On the PCI bus, the interrupts can be shared. Thus, | 1344 | On the PCI bus, the interrupts can be shared. Thus, |
1345 | <constant>SA_SHIRQ</constant> is given as the interrupt flag of | 1345 | <constant>IRQF_SHARED</constant> is given as the interrupt flag of |
1346 | <function>request_irq()</function>. | 1346 | <function>request_irq()</function>. |
1347 | </para> | 1347 | </para> |
1348 | 1348 | ||
@@ -41,8 +41,9 @@ ifndef KBUILD_VERBOSE | |||
41 | KBUILD_VERBOSE = 0 | 41 | KBUILD_VERBOSE = 0 |
42 | endif | 42 | endif |
43 | 43 | ||
44 | # Call sparse as part of compilation of C files | 44 | # Call checker as part of compilation of C files |
45 | # Use 'make C=1' to enable sparse checking | 45 | # Use 'make C=1' to enable checking (sparse, by default) |
46 | # Override with 'make C=1 CHECK=checker_executable CHECKFLAGS=....' | ||
46 | 47 | ||
47 | ifdef C | 48 | ifdef C |
48 | ifeq ("$(origin C)", "command line") | 49 | ifeq ("$(origin C)", "command line") |
@@ -1060,8 +1061,8 @@ help: | |||
1060 | 1061 | ||
1061 | @echo ' make V=0|1 [targets] 0 => quiet build (default), 1 => verbose build' | 1062 | @echo ' make V=0|1 [targets] 0 => quiet build (default), 1 => verbose build' |
1062 | @echo ' make O=dir [targets] Locate all output files in "dir", including .config' | 1063 | @echo ' make O=dir [targets] Locate all output files in "dir", including .config' |
1063 | @echo ' make C=1 [targets] Check all c source with $$CHECK (sparse)' | 1064 | @echo ' make C=1 [targets] Check all c source with $$CHECK (sparse by default)' |
1064 | @echo ' make C=2 [targets] Force check of all c source with $$CHECK (sparse)' | 1065 | @echo ' make C=2 [targets] Force check of all c source with $$CHECK' |
1065 | @echo '' | 1066 | @echo '' |
1066 | @echo 'Execute "make" or "make all" to build all targets marked with [*] ' | 1067 | @echo 'Execute "make" or "make all" to build all targets marked with [*] ' |
1067 | @echo 'For further info see the ./README file' | 1068 | @echo 'For further info see the ./README file' |
@@ -1352,7 +1353,7 @@ quiet_cmd_rmfiles = $(if $(wildcard $(rm-files)),CLEAN $(wildcard $(rm-files)) | |||
1352 | 1353 | ||
1353 | a_flags = -Wp,-MD,$(depfile) $(AFLAGS) $(AFLAGS_KERNEL) \ | 1354 | a_flags = -Wp,-MD,$(depfile) $(AFLAGS) $(AFLAGS_KERNEL) \ |
1354 | $(NOSTDINC_FLAGS) $(CPPFLAGS) \ | 1355 | $(NOSTDINC_FLAGS) $(CPPFLAGS) \ |
1355 | $(modkern_aflags) $(EXTRA_AFLAGS) $(AFLAGS_$(*F).o) | 1356 | $(modkern_aflags) $(EXTRA_AFLAGS) $(AFLAGS_$(basetarget).o) |
1356 | 1357 | ||
1357 | quiet_cmd_as_o_S = AS $@ | 1358 | quiet_cmd_as_o_S = AS $@ |
1358 | cmd_as_o_S = $(CC) $(a_flags) -c -o $@ $< | 1359 | cmd_as_o_S = $(CC) $(a_flags) -c -o $@ $< |
diff --git a/arch/alpha/kernel/irq.c b/arch/alpha/kernel/irq.c index bd193ffd6fe0..729c475d2269 100644 --- a/arch/alpha/kernel/irq.c +++ b/arch/alpha/kernel/irq.c | |||
@@ -94,12 +94,12 @@ show_interrupts(struct seq_file *p, void *v) | |||
94 | #endif | 94 | #endif |
95 | seq_printf(p, " %14s", irq_desc[irq].chip->typename); | 95 | seq_printf(p, " %14s", irq_desc[irq].chip->typename); |
96 | seq_printf(p, " %c%s", | 96 | seq_printf(p, " %c%s", |
97 | (action->flags & SA_INTERRUPT)?'+':' ', | 97 | (action->flags & IRQF_DISABLED)?'+':' ', |
98 | action->name); | 98 | action->name); |
99 | 99 | ||
100 | for (action=action->next; action; action = action->next) { | 100 | for (action=action->next; action; action = action->next) { |
101 | seq_printf(p, ", %c%s", | 101 | seq_printf(p, ", %c%s", |
102 | (action->flags & SA_INTERRUPT)?'+':' ', | 102 | (action->flags & IRQF_DISABLED)?'+':' ', |
103 | action->name); | 103 | action->name); |
104 | } | 104 | } |
105 | 105 | ||
diff --git a/arch/alpha/kernel/irq_alpha.c b/arch/alpha/kernel/irq_alpha.c index ffa4ac543cf2..ddf5cf8dcb0b 100644 --- a/arch/alpha/kernel/irq_alpha.c +++ b/arch/alpha/kernel/irq_alpha.c | |||
@@ -214,7 +214,7 @@ static unsigned int rtc_startup(unsigned int irq) { return 0; } | |||
214 | 214 | ||
215 | struct irqaction timer_irqaction = { | 215 | struct irqaction timer_irqaction = { |
216 | .handler = timer_interrupt, | 216 | .handler = timer_interrupt, |
217 | .flags = SA_INTERRUPT, | 217 | .flags = IRQF_DISABLED, |
218 | .name = "timer", | 218 | .name = "timer", |
219 | }; | 219 | }; |
220 | 220 | ||
diff --git a/arch/alpha/kernel/sys_jensen.c b/arch/alpha/kernel/sys_jensen.c index 0148e095638f..4ac2b328b8de 100644 --- a/arch/alpha/kernel/sys_jensen.c +++ b/arch/alpha/kernel/sys_jensen.c | |||
@@ -74,7 +74,7 @@ jensen_local_startup(unsigned int irq) | |||
74 | * the IPL from being dropped during handler processing. | 74 | * the IPL from being dropped during handler processing. |
75 | */ | 75 | */ |
76 | if (irq_desc[irq].action) | 76 | if (irq_desc[irq].action) |
77 | irq_desc[irq].action->flags |= SA_INTERRUPT; | 77 | irq_desc[irq].action->flags |= IRQF_DISABLED; |
78 | return 0; | 78 | return 0; |
79 | } | 79 | } |
80 | 80 | ||
diff --git a/arch/alpha/kernel/sys_titan.c b/arch/alpha/kernel/sys_titan.c index a8bfc8c16a7d..302aab38d95f 100644 --- a/arch/alpha/kernel/sys_titan.c +++ b/arch/alpha/kernel/sys_titan.c | |||
@@ -279,15 +279,15 @@ titan_late_init(void) | |||
279 | * all reported to the kernel as machine checks, so the handler | 279 | * all reported to the kernel as machine checks, so the handler |
280 | * is a nop so it can be called to count the individual events. | 280 | * is a nop so it can be called to count the individual events. |
281 | */ | 281 | */ |
282 | request_irq(63+16, titan_intr_nop, SA_INTERRUPT, | 282 | request_irq(63+16, titan_intr_nop, IRQF_DISABLED, |
283 | "CChip Error", NULL); | 283 | "CChip Error", NULL); |
284 | request_irq(62+16, titan_intr_nop, SA_INTERRUPT, | 284 | request_irq(62+16, titan_intr_nop, IRQF_DISABLED, |
285 | "PChip 0 H_Error", NULL); | 285 | "PChip 0 H_Error", NULL); |
286 | request_irq(61+16, titan_intr_nop, SA_INTERRUPT, | 286 | request_irq(61+16, titan_intr_nop, IRQF_DISABLED, |
287 | "PChip 1 H_Error", NULL); | 287 | "PChip 1 H_Error", NULL); |
288 | request_irq(60+16, titan_intr_nop, SA_INTERRUPT, | 288 | request_irq(60+16, titan_intr_nop, IRQF_DISABLED, |
289 | "PChip 0 C_Error", NULL); | 289 | "PChip 0 C_Error", NULL); |
290 | request_irq(59+16, titan_intr_nop, SA_INTERRUPT, | 290 | request_irq(59+16, titan_intr_nop, IRQF_DISABLED, |
291 | "PChip 1 C_Error", NULL); | 291 | "PChip 1 C_Error", NULL); |
292 | 292 | ||
293 | /* | 293 | /* |
@@ -348,9 +348,9 @@ privateer_init_pci(void) | |||
348 | * Hook a couple of extra err interrupts that the | 348 | * Hook a couple of extra err interrupts that the |
349 | * common titan code won't. | 349 | * common titan code won't. |
350 | */ | 350 | */ |
351 | request_irq(53+16, titan_intr_nop, SA_INTERRUPT, | 351 | request_irq(53+16, titan_intr_nop, IRQF_DISABLED, |
352 | "NMI", NULL); | 352 | "NMI", NULL); |
353 | request_irq(50+16, titan_intr_nop, SA_INTERRUPT, | 353 | request_irq(50+16, titan_intr_nop, IRQF_DISABLED, |
354 | "Temperature Warning", NULL); | 354 | "Temperature Warning", NULL); |
355 | 355 | ||
356 | /* | 356 | /* |
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 531661ac01b4..f81a62380add 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -133,11 +133,11 @@ config ARCH_VERSATILE | |||
133 | help | 133 | help |
134 | This enables support for ARM Ltd Versatile board. | 134 | This enables support for ARM Ltd Versatile board. |
135 | 135 | ||
136 | config ARCH_AT91RM9200 | 136 | config ARCH_AT91 |
137 | bool "Atmel AT91RM9200" | 137 | bool "Atmel AT91" |
138 | help | 138 | help |
139 | Say Y here if you intend to run this kernel on an Atmel | 139 | This enables support for systems based on the Atmel AT91RM9200 |
140 | AT91RM9200-based board. | 140 | and AT91SAM9xxx processors. |
141 | 141 | ||
142 | config ARCH_CLPS7500 | 142 | config ARCH_CLPS7500 |
143 | bool "Cirrus CL-PS7500FE" | 143 | bool "Cirrus CL-PS7500FE" |
@@ -559,7 +559,7 @@ config LEDS | |||
559 | ARCH_LUBBOCK || MACH_MAINSTONE || ARCH_NETWINDER || \ | 559 | ARCH_LUBBOCK || MACH_MAINSTONE || ARCH_NETWINDER || \ |
560 | ARCH_OMAP || ARCH_P720T || ARCH_PXA_IDP || \ | 560 | ARCH_OMAP || ARCH_P720T || ARCH_PXA_IDP || \ |
561 | ARCH_SA1100 || ARCH_SHARK || ARCH_VERSATILE || \ | 561 | ARCH_SA1100 || ARCH_SHARK || ARCH_VERSATILE || \ |
562 | ARCH_AT91RM9200 | 562 | ARCH_AT91RM9200 || MACH_TRIZEPS4 |
563 | help | 563 | help |
564 | If you say Y here, the LEDs on your machine will be used | 564 | If you say Y here, the LEDs on your machine will be used |
565 | to provide useful information about your current system status. | 565 | to provide useful information about your current system status. |
@@ -690,7 +690,7 @@ config XIP_PHYS_ADDR | |||
690 | 690 | ||
691 | endmenu | 691 | endmenu |
692 | 692 | ||
693 | if (ARCH_SA1100 || ARCH_INTEGRATOR || ARCH_OMAP1) | 693 | if (ARCH_SA1100 || ARCH_INTEGRATOR || ARCH_OMAP) |
694 | 694 | ||
695 | menu "CPU Frequency scaling" | 695 | menu "CPU Frequency scaling" |
696 | 696 | ||
diff --git a/arch/arm/Makefile b/arch/arm/Makefile index a3bbaaf480b9..3345c6d0fd1e 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile | |||
@@ -114,7 +114,7 @@ endif | |||
114 | machine-$(CONFIG_ARCH_H720X) := h720x | 114 | machine-$(CONFIG_ARCH_H720X) := h720x |
115 | machine-$(CONFIG_ARCH_AAEC2000) := aaec2000 | 115 | machine-$(CONFIG_ARCH_AAEC2000) := aaec2000 |
116 | machine-$(CONFIG_ARCH_REALVIEW) := realview | 116 | machine-$(CONFIG_ARCH_REALVIEW) := realview |
117 | machine-$(CONFIG_ARCH_AT91RM9200) := at91rm9200 | 117 | machine-$(CONFIG_ARCH_AT91) := at91rm9200 |
118 | machine-$(CONFIG_ARCH_EP93XX) := ep93xx | 118 | machine-$(CONFIG_ARCH_EP93XX) := ep93xx |
119 | machine-$(CONFIG_ARCH_PNX4008) := pnx4008 | 119 | machine-$(CONFIG_ARCH_PNX4008) := pnx4008 |
120 | machine-$(CONFIG_ARCH_NETX) := netx | 120 | machine-$(CONFIG_ARCH_NETX) := netx |
diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S index f7b5c6db30f5..14a9ff9c68df 100644 --- a/arch/arm/boot/compressed/head.S +++ b/arch/arm/boot/compressed/head.S | |||
@@ -447,8 +447,11 @@ __common_mmu_cache_on: | |||
447 | mov r1, #-1 | 447 | mov r1, #-1 |
448 | mcr p15, 0, r3, c2, c0, 0 @ load page table pointer | 448 | mcr p15, 0, r3, c2, c0, 0 @ load page table pointer |
449 | mcr p15, 0, r1, c3, c0, 0 @ load domain access control | 449 | mcr p15, 0, r1, c3, c0, 0 @ load domain access control |
450 | mcr p15, 0, r0, c1, c0, 0 @ load control register | 450 | b 1f |
451 | mov pc, lr | 451 | .align 5 @ cache line aligned |
452 | 1: mcr p15, 0, r0, c1, c0, 0 @ load control register | ||
453 | mrc p15, 0, r0, c1, c0, 0 @ and read it back to | ||
454 | sub pc, lr, r0, lsr #32 @ properly flush pipeline | ||
452 | 455 | ||
453 | /* | 456 | /* |
454 | * All code following this line is relocatable. It is relocated by | 457 | * All code following this line is relocatable. It is relocated by |
diff --git a/arch/arm/configs/at91rm9200dk_defconfig b/arch/arm/configs/at91rm9200dk_defconfig index 9e1c1cceb735..4f3d8d37741e 100644 --- a/arch/arm/configs/at91rm9200dk_defconfig +++ b/arch/arm/configs/at91rm9200dk_defconfig | |||
@@ -103,6 +103,7 @@ CONFIG_DEFAULT_IOSCHED="anticipatory" | |||
103 | # CONFIG_ARCH_IMX is not set | 103 | # CONFIG_ARCH_IMX is not set |
104 | # CONFIG_ARCH_H720X is not set | 104 | # CONFIG_ARCH_H720X is not set |
105 | # CONFIG_ARCH_AAEC2000 is not set | 105 | # CONFIG_ARCH_AAEC2000 is not set |
106 | CONFIG_ARCH_AT91=y | ||
106 | CONFIG_ARCH_AT91RM9200=y | 107 | CONFIG_ARCH_AT91RM9200=y |
107 | 108 | ||
108 | # | 109 | # |
diff --git a/arch/arm/configs/at91rm9200ek_defconfig b/arch/arm/configs/at91rm9200ek_defconfig index 6e0805a971d7..08b5dc38876f 100644 --- a/arch/arm/configs/at91rm9200ek_defconfig +++ b/arch/arm/configs/at91rm9200ek_defconfig | |||
@@ -103,6 +103,7 @@ CONFIG_DEFAULT_IOSCHED="anticipatory" | |||
103 | # CONFIG_ARCH_IMX is not set | 103 | # CONFIG_ARCH_IMX is not set |
104 | # CONFIG_ARCH_H720X is not set | 104 | # CONFIG_ARCH_H720X is not set |
105 | # CONFIG_ARCH_AAEC2000 is not set | 105 | # CONFIG_ARCH_AAEC2000 is not set |
106 | CONFIG_ARCH_AT91=y | ||
106 | CONFIG_ARCH_AT91RM9200=y | 107 | CONFIG_ARCH_AT91RM9200=y |
107 | 108 | ||
108 | # | 109 | # |
diff --git a/arch/arm/configs/ateb9200_defconfig b/arch/arm/configs/ateb9200_defconfig index 69c39e098743..bee7813d040e 100644 --- a/arch/arm/configs/ateb9200_defconfig +++ b/arch/arm/configs/ateb9200_defconfig | |||
@@ -105,6 +105,7 @@ CONFIG_DEFAULT_IOSCHED="anticipatory" | |||
105 | # CONFIG_ARCH_IMX is not set | 105 | # CONFIG_ARCH_IMX is not set |
106 | # CONFIG_ARCH_H720X is not set | 106 | # CONFIG_ARCH_H720X is not set |
107 | # CONFIG_ARCH_AAEC2000 is not set | 107 | # CONFIG_ARCH_AAEC2000 is not set |
108 | CONFIG_ARCH_AT91=y | ||
108 | CONFIG_ARCH_AT91RM9200=y | 109 | CONFIG_ARCH_AT91RM9200=y |
109 | 110 | ||
110 | # | 111 | # |
diff --git a/arch/arm/configs/carmeva_defconfig b/arch/arm/configs/carmeva_defconfig index 5ccd29a7c1fb..8a075c8ecc63 100644 --- a/arch/arm/configs/carmeva_defconfig +++ b/arch/arm/configs/carmeva_defconfig | |||
@@ -82,6 +82,7 @@ CONFIG_OBSOLETE_MODPARM=y | |||
82 | # CONFIG_ARCH_VERSATILE is not set | 82 | # CONFIG_ARCH_VERSATILE is not set |
83 | # CONFIG_ARCH_IMX is not set | 83 | # CONFIG_ARCH_IMX is not set |
84 | # CONFIG_ARCH_H720X is not set | 84 | # CONFIG_ARCH_H720X is not set |
85 | CONFIG_ARCH_AT91=y | ||
85 | CONFIG_ARCH_AT91RM9200=y | 86 | CONFIG_ARCH_AT91RM9200=y |
86 | 87 | ||
87 | # | 88 | # |
diff --git a/arch/arm/configs/csb337_defconfig b/arch/arm/configs/csb337_defconfig index 94bd9932a402..3594155a8137 100644 --- a/arch/arm/configs/csb337_defconfig +++ b/arch/arm/configs/csb337_defconfig | |||
@@ -103,6 +103,7 @@ CONFIG_DEFAULT_IOSCHED="anticipatory" | |||
103 | # CONFIG_ARCH_IMX is not set | 103 | # CONFIG_ARCH_IMX is not set |
104 | # CONFIG_ARCH_H720X is not set | 104 | # CONFIG_ARCH_H720X is not set |
105 | # CONFIG_ARCH_AAEC2000 is not set | 105 | # CONFIG_ARCH_AAEC2000 is not set |
106 | CONFIG_ARCH_AT91=y | ||
106 | CONFIG_ARCH_AT91RM9200=y | 107 | CONFIG_ARCH_AT91RM9200=y |
107 | 108 | ||
108 | # | 109 | # |
diff --git a/arch/arm/configs/csb637_defconfig b/arch/arm/configs/csb637_defconfig index 1519124c5501..640d70c1f066 100644 --- a/arch/arm/configs/csb637_defconfig +++ b/arch/arm/configs/csb637_defconfig | |||
@@ -103,6 +103,7 @@ CONFIG_DEFAULT_IOSCHED="anticipatory" | |||
103 | # CONFIG_ARCH_IMX is not set | 103 | # CONFIG_ARCH_IMX is not set |
104 | # CONFIG_ARCH_H720X is not set | 104 | # CONFIG_ARCH_H720X is not set |
105 | # CONFIG_ARCH_AAEC2000 is not set | 105 | # CONFIG_ARCH_AAEC2000 is not set |
106 | CONFIG_ARCH_AT91=y | ||
106 | CONFIG_ARCH_AT91RM9200=y | 107 | CONFIG_ARCH_AT91RM9200=y |
107 | 108 | ||
108 | # | 109 | # |
diff --git a/arch/arm/configs/kafa_defconfig b/arch/arm/configs/kafa_defconfig index 51ded20e3f64..1db633e2c940 100644 --- a/arch/arm/configs/kafa_defconfig +++ b/arch/arm/configs/kafa_defconfig | |||
@@ -105,6 +105,7 @@ CONFIG_DEFAULT_IOSCHED="deadline" | |||
105 | # CONFIG_ARCH_IMX is not set | 105 | # CONFIG_ARCH_IMX is not set |
106 | # CONFIG_ARCH_H720X is not set | 106 | # CONFIG_ARCH_H720X is not set |
107 | # CONFIG_ARCH_AAEC2000 is not set | 107 | # CONFIG_ARCH_AAEC2000 is not set |
108 | CONFIG_ARCH_AT91=y | ||
108 | CONFIG_ARCH_AT91RM9200=y | 109 | CONFIG_ARCH_AT91RM9200=y |
109 | 110 | ||
110 | # | 111 | # |
diff --git a/arch/arm/configs/kb9202_defconfig b/arch/arm/configs/kb9202_defconfig index fee4f566452e..45396e087196 100644 --- a/arch/arm/configs/kb9202_defconfig +++ b/arch/arm/configs/kb9202_defconfig | |||
@@ -80,6 +80,7 @@ CONFIG_KMOD=y | |||
80 | # CONFIG_ARCH_IMX is not set | 80 | # CONFIG_ARCH_IMX is not set |
81 | # CONFIG_ARCH_H720X is not set | 81 | # CONFIG_ARCH_H720X is not set |
82 | # CONFIG_ARCH_AAEC2000 is not set | 82 | # CONFIG_ARCH_AAEC2000 is not set |
83 | CONFIG_ARCH_AT91=y | ||
83 | CONFIG_ARCH_AT91RM9200=y | 84 | CONFIG_ARCH_AT91RM9200=y |
84 | 85 | ||
85 | # | 86 | # |
diff --git a/arch/arm/configs/omap_h2_1610_defconfig b/arch/arm/configs/omap_h2_1610_defconfig index ee3ecbd9002d..05adb0b34e72 100644 --- a/arch/arm/configs/omap_h2_1610_defconfig +++ b/arch/arm/configs/omap_h2_1610_defconfig | |||
@@ -1,19 +1,20 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.14 | 3 | # Linux kernel version: 2.6.17 |
4 | # Wed Nov 9 18:53:40 2005 | 4 | # Thu Jun 29 15:25:18 2006 |
5 | # | 5 | # |
6 | CONFIG_ARM=y | 6 | CONFIG_ARM=y |
7 | CONFIG_MMU=y | 7 | CONFIG_MMU=y |
8 | CONFIG_UID16=y | ||
9 | CONFIG_RWSEM_GENERIC_SPINLOCK=y | 8 | CONFIG_RWSEM_GENERIC_SPINLOCK=y |
9 | CONFIG_GENERIC_HWEIGHT=y | ||
10 | CONFIG_GENERIC_CALIBRATE_DELAY=y | 10 | CONFIG_GENERIC_CALIBRATE_DELAY=y |
11 | CONFIG_VECTORS_BASE=0xffff0000 | ||
12 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | ||
11 | 13 | ||
12 | # | 14 | # |
13 | # Code maturity level options | 15 | # Code maturity level options |
14 | # | 16 | # |
15 | CONFIG_EXPERIMENTAL=y | 17 | CONFIG_EXPERIMENTAL=y |
16 | CONFIG_CLEAN_COMPILE=y | ||
17 | CONFIG_BROKEN_ON_SMP=y | 18 | CONFIG_BROKEN_ON_SMP=y |
18 | CONFIG_LOCK_KERNEL=y | 19 | CONFIG_LOCK_KERNEL=y |
19 | CONFIG_INIT_ENV_ARG_LIMIT=32 | 20 | CONFIG_INIT_ENV_ARG_LIMIT=32 |
@@ -29,26 +30,26 @@ CONFIG_SYSVIPC=y | |||
29 | # CONFIG_BSD_PROCESS_ACCT is not set | 30 | # CONFIG_BSD_PROCESS_ACCT is not set |
30 | CONFIG_SYSCTL=y | 31 | CONFIG_SYSCTL=y |
31 | # CONFIG_AUDIT is not set | 32 | # CONFIG_AUDIT is not set |
32 | # CONFIG_HOTPLUG is not set | ||
33 | CONFIG_KOBJECT_UEVENT=y | ||
34 | # CONFIG_IKCONFIG is not set | 33 | # CONFIG_IKCONFIG is not set |
34 | # CONFIG_RELAY is not set | ||
35 | CONFIG_INITRAMFS_SOURCE="" | 35 | CONFIG_INITRAMFS_SOURCE="" |
36 | CONFIG_UID16=y | ||
37 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | ||
36 | # CONFIG_EMBEDDED is not set | 38 | # CONFIG_EMBEDDED is not set |
37 | CONFIG_KALLSYMS=y | 39 | CONFIG_KALLSYMS=y |
38 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | 40 | # CONFIG_KALLSYMS_EXTRA_PASS is not set |
41 | CONFIG_HOTPLUG=y | ||
39 | CONFIG_PRINTK=y | 42 | CONFIG_PRINTK=y |
40 | CONFIG_BUG=y | 43 | CONFIG_BUG=y |
44 | CONFIG_ELF_CORE=y | ||
41 | CONFIG_BASE_FULL=y | 45 | CONFIG_BASE_FULL=y |
42 | CONFIG_FUTEX=y | 46 | CONFIG_FUTEX=y |
43 | CONFIG_EPOLL=y | 47 | CONFIG_EPOLL=y |
44 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | ||
45 | CONFIG_SHMEM=y | 48 | CONFIG_SHMEM=y |
46 | CONFIG_CC_ALIGN_FUNCTIONS=0 | 49 | CONFIG_SLAB=y |
47 | CONFIG_CC_ALIGN_LABELS=0 | ||
48 | CONFIG_CC_ALIGN_LOOPS=0 | ||
49 | CONFIG_CC_ALIGN_JUMPS=0 | ||
50 | # CONFIG_TINY_SHMEM is not set | 50 | # CONFIG_TINY_SHMEM is not set |
51 | CONFIG_BASE_SMALL=0 | 51 | CONFIG_BASE_SMALL=0 |
52 | # CONFIG_SLOB is not set | ||
52 | 53 | ||
53 | # | 54 | # |
54 | # Loadable module support | 55 | # Loadable module support |
@@ -56,7 +57,6 @@ CONFIG_BASE_SMALL=0 | |||
56 | CONFIG_MODULES=y | 57 | CONFIG_MODULES=y |
57 | CONFIG_MODULE_UNLOAD=y | 58 | CONFIG_MODULE_UNLOAD=y |
58 | # CONFIG_MODULE_FORCE_UNLOAD is not set | 59 | # CONFIG_MODULE_FORCE_UNLOAD is not set |
59 | CONFIG_OBSOLETE_MODPARM=y | ||
60 | # CONFIG_MODVERSIONS is not set | 60 | # CONFIG_MODVERSIONS is not set |
61 | # CONFIG_MODULE_SRCVERSION_ALL is not set | 61 | # CONFIG_MODULE_SRCVERSION_ALL is not set |
62 | # CONFIG_KMOD is not set | 62 | # CONFIG_KMOD is not set |
@@ -64,6 +64,7 @@ CONFIG_OBSOLETE_MODPARM=y | |||
64 | # | 64 | # |
65 | # Block layer | 65 | # Block layer |
66 | # | 66 | # |
67 | # CONFIG_BLK_DEV_IO_TRACE is not set | ||
67 | 68 | ||
68 | # | 69 | # |
69 | # IO Schedulers | 70 | # IO Schedulers |
@@ -81,16 +82,26 @@ CONFIG_DEFAULT_IOSCHED="anticipatory" | |||
81 | # | 82 | # |
82 | # System Type | 83 | # System Type |
83 | # | 84 | # |
85 | # CONFIG_ARCH_AAEC2000 is not set | ||
86 | # CONFIG_ARCH_INTEGRATOR is not set | ||
87 | # CONFIG_ARCH_REALVIEW is not set | ||
88 | # CONFIG_ARCH_VERSATILE is not set | ||
89 | # CONFIG_ARCH_AT91RM9200 is not set | ||
84 | # CONFIG_ARCH_CLPS7500 is not set | 90 | # CONFIG_ARCH_CLPS7500 is not set |
85 | # CONFIG_ARCH_CLPS711X is not set | 91 | # CONFIG_ARCH_CLPS711X is not set |
86 | # CONFIG_ARCH_CO285 is not set | 92 | # CONFIG_ARCH_CO285 is not set |
87 | # CONFIG_ARCH_EBSA110 is not set | 93 | # CONFIG_ARCH_EBSA110 is not set |
94 | # CONFIG_ARCH_EP93XX is not set | ||
88 | # CONFIG_ARCH_FOOTBRIDGE is not set | 95 | # CONFIG_ARCH_FOOTBRIDGE is not set |
89 | # CONFIG_ARCH_INTEGRATOR is not set | 96 | # CONFIG_ARCH_NETX is not set |
97 | # CONFIG_ARCH_H720X is not set | ||
98 | # CONFIG_ARCH_IMX is not set | ||
90 | # CONFIG_ARCH_IOP3XX is not set | 99 | # CONFIG_ARCH_IOP3XX is not set |
91 | # CONFIG_ARCH_IXP4XX is not set | 100 | # CONFIG_ARCH_IXP4XX is not set |
92 | # CONFIG_ARCH_IXP2000 is not set | 101 | # CONFIG_ARCH_IXP2000 is not set |
102 | # CONFIG_ARCH_IXP23XX is not set | ||
93 | # CONFIG_ARCH_L7200 is not set | 103 | # CONFIG_ARCH_L7200 is not set |
104 | # CONFIG_ARCH_PNX4008 is not set | ||
94 | # CONFIG_ARCH_PXA is not set | 105 | # CONFIG_ARCH_PXA is not set |
95 | # CONFIG_ARCH_RPC is not set | 106 | # CONFIG_ARCH_RPC is not set |
96 | # CONFIG_ARCH_SA1100 is not set | 107 | # CONFIG_ARCH_SA1100 is not set |
@@ -98,11 +109,6 @@ CONFIG_DEFAULT_IOSCHED="anticipatory" | |||
98 | # CONFIG_ARCH_SHARK is not set | 109 | # CONFIG_ARCH_SHARK is not set |
99 | # CONFIG_ARCH_LH7A40X is not set | 110 | # CONFIG_ARCH_LH7A40X is not set |
100 | CONFIG_ARCH_OMAP=y | 111 | CONFIG_ARCH_OMAP=y |
101 | # CONFIG_ARCH_VERSATILE is not set | ||
102 | # CONFIG_ARCH_REALVIEW is not set | ||
103 | # CONFIG_ARCH_IMX is not set | ||
104 | # CONFIG_ARCH_H720X is not set | ||
105 | # CONFIG_ARCH_AAEC2000 is not set | ||
106 | 112 | ||
107 | # | 113 | # |
108 | # TI OMAP Implementations | 114 | # TI OMAP Implementations |
@@ -141,6 +147,7 @@ CONFIG_ARCH_OMAP16XX=y | |||
141 | CONFIG_MACH_OMAP_H2=y | 147 | CONFIG_MACH_OMAP_H2=y |
142 | # CONFIG_MACH_OMAP_H3 is not set | 148 | # CONFIG_MACH_OMAP_H3 is not set |
143 | # CONFIG_MACH_OMAP_OSK is not set | 149 | # CONFIG_MACH_OMAP_OSK is not set |
150 | # CONFIG_MACH_NOKIA770 is not set | ||
144 | # CONFIG_MACH_OMAP_GENERIC is not set | 151 | # CONFIG_MACH_OMAP_GENERIC is not set |
145 | 152 | ||
146 | # | 153 | # |
@@ -177,7 +184,6 @@ CONFIG_ARM_THUMB=y | |||
177 | # | 184 | # |
178 | # Bus support | 185 | # Bus support |
179 | # | 186 | # |
180 | CONFIG_ISA_DMA_API=y | ||
181 | 187 | ||
182 | # | 188 | # |
183 | # PCCARD (PCMCIA/CardBus) support | 189 | # PCCARD (PCMCIA/CardBus) support |
@@ -189,6 +195,8 @@ CONFIG_ISA_DMA_API=y | |||
189 | # | 195 | # |
190 | CONFIG_PREEMPT=y | 196 | CONFIG_PREEMPT=y |
191 | CONFIG_NO_IDLE_HZ=y | 197 | CONFIG_NO_IDLE_HZ=y |
198 | CONFIG_HZ=128 | ||
199 | # CONFIG_AEABI is not set | ||
192 | # CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set | 200 | # CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set |
193 | CONFIG_SELECT_MEMORY_MODEL=y | 201 | CONFIG_SELECT_MEMORY_MODEL=y |
194 | CONFIG_FLATMEM_MANUAL=y | 202 | CONFIG_FLATMEM_MANUAL=y |
@@ -249,6 +257,8 @@ CONFIG_BINFMT_AOUT=y | |||
249 | # Power management options | 257 | # Power management options |
250 | # | 258 | # |
251 | CONFIG_PM=y | 259 | CONFIG_PM=y |
260 | CONFIG_PM_LEGACY=y | ||
261 | # CONFIG_PM_DEBUG is not set | ||
252 | # CONFIG_APM is not set | 262 | # CONFIG_APM is not set |
253 | 263 | ||
254 | # | 264 | # |
@@ -259,9 +269,12 @@ CONFIG_NET=y | |||
259 | # | 269 | # |
260 | # Networking options | 270 | # Networking options |
261 | # | 271 | # |
272 | # CONFIG_NETDEBUG is not set | ||
262 | CONFIG_PACKET=y | 273 | CONFIG_PACKET=y |
263 | # CONFIG_PACKET_MMAP is not set | 274 | # CONFIG_PACKET_MMAP is not set |
264 | CONFIG_UNIX=y | 275 | CONFIG_UNIX=y |
276 | CONFIG_XFRM=y | ||
277 | # CONFIG_XFRM_USER is not set | ||
265 | # CONFIG_NET_KEY is not set | 278 | # CONFIG_NET_KEY is not set |
266 | CONFIG_INET=y | 279 | CONFIG_INET=y |
267 | # CONFIG_IP_MULTICAST is not set | 280 | # CONFIG_IP_MULTICAST is not set |
@@ -278,12 +291,18 @@ CONFIG_IP_PNP_BOOTP=y | |||
278 | # CONFIG_INET_AH is not set | 291 | # CONFIG_INET_AH is not set |
279 | # CONFIG_INET_ESP is not set | 292 | # CONFIG_INET_ESP is not set |
280 | # CONFIG_INET_IPCOMP is not set | 293 | # CONFIG_INET_IPCOMP is not set |
294 | # CONFIG_INET_XFRM_TUNNEL is not set | ||
281 | # CONFIG_INET_TUNNEL is not set | 295 | # CONFIG_INET_TUNNEL is not set |
296 | CONFIG_INET_XFRM_MODE_TRANSPORT=y | ||
297 | CONFIG_INET_XFRM_MODE_TUNNEL=y | ||
282 | CONFIG_INET_DIAG=y | 298 | CONFIG_INET_DIAG=y |
283 | CONFIG_INET_TCP_DIAG=y | 299 | CONFIG_INET_TCP_DIAG=y |
284 | # CONFIG_TCP_CONG_ADVANCED is not set | 300 | # CONFIG_TCP_CONG_ADVANCED is not set |
285 | CONFIG_TCP_CONG_BIC=y | 301 | CONFIG_TCP_CONG_BIC=y |
286 | # CONFIG_IPV6 is not set | 302 | # CONFIG_IPV6 is not set |
303 | # CONFIG_INET6_XFRM_TUNNEL is not set | ||
304 | # CONFIG_INET6_TUNNEL is not set | ||
305 | # CONFIG_NETWORK_SECMARK is not set | ||
287 | # CONFIG_NETFILTER is not set | 306 | # CONFIG_NETFILTER is not set |
288 | 307 | ||
289 | # | 308 | # |
@@ -295,6 +314,11 @@ CONFIG_TCP_CONG_BIC=y | |||
295 | # SCTP Configuration (EXPERIMENTAL) | 314 | # SCTP Configuration (EXPERIMENTAL) |
296 | # | 315 | # |
297 | # CONFIG_IP_SCTP is not set | 316 | # CONFIG_IP_SCTP is not set |
317 | |||
318 | # | ||
319 | # TIPC Configuration (EXPERIMENTAL) | ||
320 | # | ||
321 | # CONFIG_TIPC is not set | ||
298 | # CONFIG_ATM is not set | 322 | # CONFIG_ATM is not set |
299 | # CONFIG_BRIDGE is not set | 323 | # CONFIG_BRIDGE is not set |
300 | # CONFIG_VLAN_8021Q is not set | 324 | # CONFIG_VLAN_8021Q is not set |
@@ -312,7 +336,6 @@ CONFIG_TCP_CONG_BIC=y | |||
312 | # QoS and/or fair queueing | 336 | # QoS and/or fair queueing |
313 | # | 337 | # |
314 | # CONFIG_NET_SCHED is not set | 338 | # CONFIG_NET_SCHED is not set |
315 | # CONFIG_NET_CLS_ROUTE is not set | ||
316 | 339 | ||
317 | # | 340 | # |
318 | # Network testing | 341 | # Network testing |
@@ -333,6 +356,12 @@ CONFIG_TCP_CONG_BIC=y | |||
333 | CONFIG_STANDALONE=y | 356 | CONFIG_STANDALONE=y |
334 | CONFIG_PREVENT_FIRMWARE_BUILD=y | 357 | CONFIG_PREVENT_FIRMWARE_BUILD=y |
335 | # CONFIG_FW_LOADER is not set | 358 | # CONFIG_FW_LOADER is not set |
359 | # CONFIG_SYS_HYPERVISOR is not set | ||
360 | |||
361 | # | ||
362 | # Connector - unified userspace <-> kernelspace linker | ||
363 | # | ||
364 | # CONFIG_CONNECTOR is not set | ||
336 | 365 | ||
337 | # | 366 | # |
338 | # Memory Technology Devices (MTD) | 367 | # Memory Technology Devices (MTD) |
@@ -526,6 +555,7 @@ CONFIG_SERIO_SERPORT=y | |||
526 | CONFIG_VT=y | 555 | CONFIG_VT=y |
527 | CONFIG_VT_CONSOLE=y | 556 | CONFIG_VT_CONSOLE=y |
528 | CONFIG_HW_CONSOLE=y | 557 | CONFIG_HW_CONSOLE=y |
558 | # CONFIG_VT_HW_CONSOLE_BINDING is not set | ||
529 | # CONFIG_SERIAL_NONSTANDARD is not set | 559 | # CONFIG_SERIAL_NONSTANDARD is not set |
530 | 560 | ||
531 | # | 561 | # |
@@ -534,6 +564,7 @@ CONFIG_HW_CONSOLE=y | |||
534 | CONFIG_SERIAL_8250=y | 564 | CONFIG_SERIAL_8250=y |
535 | CONFIG_SERIAL_8250_CONSOLE=y | 565 | CONFIG_SERIAL_8250_CONSOLE=y |
536 | CONFIG_SERIAL_8250_NR_UARTS=4 | 566 | CONFIG_SERIAL_8250_NR_UARTS=4 |
567 | CONFIG_SERIAL_8250_RUNTIME_UARTS=4 | ||
537 | # CONFIG_SERIAL_8250_EXTENDED is not set | 568 | # CONFIG_SERIAL_8250_EXTENDED is not set |
538 | 569 | ||
539 | # | 570 | # |
@@ -559,8 +590,8 @@ CONFIG_WATCHDOG_NOWAYOUT=y | |||
559 | # Watchdog Device Drivers | 590 | # Watchdog Device Drivers |
560 | # | 591 | # |
561 | # CONFIG_SOFT_WATCHDOG is not set | 592 | # CONFIG_SOFT_WATCHDOG is not set |
593 | # CONFIG_HW_RANDOM is not set | ||
562 | # CONFIG_NVRAM is not set | 594 | # CONFIG_NVRAM is not set |
563 | # CONFIG_RTC is not set | ||
564 | # CONFIG_DTLK is not set | 595 | # CONFIG_DTLK is not set |
565 | # CONFIG_R3964 is not set | 596 | # CONFIG_R3964 is not set |
566 | 597 | ||
@@ -572,6 +603,7 @@ CONFIG_WATCHDOG_NOWAYOUT=y | |||
572 | # | 603 | # |
573 | # TPM devices | 604 | # TPM devices |
574 | # | 605 | # |
606 | # CONFIG_TCG_TPM is not set | ||
575 | # CONFIG_TELCLOCK is not set | 607 | # CONFIG_TELCLOCK is not set |
576 | 608 | ||
577 | # | 609 | # |
@@ -580,10 +612,22 @@ CONFIG_WATCHDOG_NOWAYOUT=y | |||
580 | # CONFIG_I2C is not set | 612 | # CONFIG_I2C is not set |
581 | 613 | ||
582 | # | 614 | # |
615 | # SPI support | ||
616 | # | ||
617 | # CONFIG_SPI is not set | ||
618 | # CONFIG_SPI_MASTER is not set | ||
619 | |||
620 | # | ||
621 | # Dallas's 1-wire bus | ||
622 | # | ||
623 | |||
624 | # | ||
583 | # Hardware Monitoring support | 625 | # Hardware Monitoring support |
584 | # | 626 | # |
585 | CONFIG_HWMON=y | 627 | CONFIG_HWMON=y |
586 | # CONFIG_HWMON_VID is not set | 628 | # CONFIG_HWMON_VID is not set |
629 | # CONFIG_SENSORS_ABITUGURU is not set | ||
630 | # CONFIG_SENSORS_F71805F is not set | ||
587 | # CONFIG_HWMON_DEBUG_CHIP is not set | 631 | # CONFIG_HWMON_DEBUG_CHIP is not set |
588 | 632 | ||
589 | # | 633 | # |
@@ -591,13 +635,23 @@ CONFIG_HWMON=y | |||
591 | # | 635 | # |
592 | 636 | ||
593 | # | 637 | # |
594 | # Multimedia Capabilities Port drivers | 638 | # LED devices |
639 | # | ||
640 | # CONFIG_NEW_LEDS is not set | ||
641 | |||
642 | # | ||
643 | # LED drivers | ||
644 | # | ||
645 | |||
646 | # | ||
647 | # LED Triggers | ||
595 | # | 648 | # |
596 | 649 | ||
597 | # | 650 | # |
598 | # Multimedia devices | 651 | # Multimedia devices |
599 | # | 652 | # |
600 | # CONFIG_VIDEO_DEV is not set | 653 | # CONFIG_VIDEO_DEV is not set |
654 | CONFIG_VIDEO_V4L2=y | ||
601 | 655 | ||
602 | # | 656 | # |
603 | # Digital Video Broadcasting Devices | 657 | # Digital Video Broadcasting Devices |
@@ -607,11 +661,13 @@ CONFIG_HWMON=y | |||
607 | # | 661 | # |
608 | # Graphics support | 662 | # Graphics support |
609 | # | 663 | # |
664 | CONFIG_FIRMWARE_EDID=y | ||
610 | CONFIG_FB=y | 665 | CONFIG_FB=y |
611 | # CONFIG_FB_CFB_FILLRECT is not set | 666 | # CONFIG_FB_CFB_FILLRECT is not set |
612 | # CONFIG_FB_CFB_COPYAREA is not set | 667 | # CONFIG_FB_CFB_COPYAREA is not set |
613 | # CONFIG_FB_CFB_IMAGEBLIT is not set | 668 | # CONFIG_FB_CFB_IMAGEBLIT is not set |
614 | # CONFIG_FB_MACMODES is not set | 669 | # CONFIG_FB_MACMODES is not set |
670 | # CONFIG_FB_BACKLIGHT is not set | ||
615 | CONFIG_FB_MODE_HELPERS=y | 671 | CONFIG_FB_MODE_HELPERS=y |
616 | # CONFIG_FB_TILEBLITTING is not set | 672 | # CONFIG_FB_TILEBLITTING is not set |
617 | # CONFIG_FB_S1D13XXX is not set | 673 | # CONFIG_FB_S1D13XXX is not set |
@@ -635,7 +691,6 @@ CONFIG_FONT_8x16=y | |||
635 | # CONFIG_FONT_SUN8x16 is not set | 691 | # CONFIG_FONT_SUN8x16 is not set |
636 | # CONFIG_FONT_SUN12x22 is not set | 692 | # CONFIG_FONT_SUN12x22 is not set |
637 | # CONFIG_FONT_10x18 is not set | 693 | # CONFIG_FONT_10x18 is not set |
638 | # CONFIG_FONT_RL is not set | ||
639 | 694 | ||
640 | # | 695 | # |
641 | # Logo configuration | 696 | # Logo configuration |
@@ -660,16 +715,15 @@ CONFIG_SOUND=y | |||
660 | # Open Sound System | 715 | # Open Sound System |
661 | # | 716 | # |
662 | CONFIG_SOUND_PRIME=y | 717 | CONFIG_SOUND_PRIME=y |
663 | # CONFIG_OBSOLETE_OSS_DRIVER is not set | ||
664 | # CONFIG_SOUND_MSNDCLAS is not set | 718 | # CONFIG_SOUND_MSNDCLAS is not set |
665 | # CONFIG_SOUND_MSNDPIN is not set | 719 | # CONFIG_SOUND_MSNDPIN is not set |
666 | # CONFIG_SOUND_OSS is not set | ||
667 | 720 | ||
668 | # | 721 | # |
669 | # USB support | 722 | # USB support |
670 | # | 723 | # |
671 | CONFIG_USB_ARCH_HAS_HCD=y | 724 | CONFIG_USB_ARCH_HAS_HCD=y |
672 | CONFIG_USB_ARCH_HAS_OHCI=y | 725 | CONFIG_USB_ARCH_HAS_OHCI=y |
726 | # CONFIG_USB_ARCH_HAS_EHCI is not set | ||
673 | # CONFIG_USB is not set | 727 | # CONFIG_USB is not set |
674 | 728 | ||
675 | # | 729 | # |
@@ -680,17 +734,6 @@ CONFIG_USB_ARCH_HAS_OHCI=y | |||
680 | # USB Gadget Support | 734 | # USB Gadget Support |
681 | # | 735 | # |
682 | # CONFIG_USB_GADGET is not set | 736 | # CONFIG_USB_GADGET is not set |
683 | # CONFIG_USB_GADGET_NET2280 is not set | ||
684 | # CONFIG_USB_GADGET_PXA2XX is not set | ||
685 | # CONFIG_USB_GADGET_GOKU is not set | ||
686 | # CONFIG_USB_GADGET_LH7A40X is not set | ||
687 | # CONFIG_USB_GADGET_OMAP is not set | ||
688 | # CONFIG_USB_GADGET_DUMMY_HCD is not set | ||
689 | # CONFIG_USB_ZERO is not set | ||
690 | # CONFIG_USB_ETH is not set | ||
691 | # CONFIG_USB_GADGETFS is not set | ||
692 | # CONFIG_USB_FILE_STORAGE is not set | ||
693 | # CONFIG_USB_G_SERIAL is not set | ||
694 | 737 | ||
695 | # | 738 | # |
696 | # MMC/SD Card support | 739 | # MMC/SD Card support |
@@ -698,20 +741,27 @@ CONFIG_USB_ARCH_HAS_OHCI=y | |||
698 | # CONFIG_MMC is not set | 741 | # CONFIG_MMC is not set |
699 | 742 | ||
700 | # | 743 | # |
744 | # Real Time Clock | ||
745 | # | ||
746 | CONFIG_RTC_LIB=y | ||
747 | # CONFIG_RTC_CLASS is not set | ||
748 | |||
749 | # | ||
701 | # File systems | 750 | # File systems |
702 | # | 751 | # |
703 | CONFIG_EXT2_FS=y | 752 | CONFIG_EXT2_FS=y |
704 | # CONFIG_EXT2_FS_XATTR is not set | 753 | # CONFIG_EXT2_FS_XATTR is not set |
705 | # CONFIG_EXT2_FS_XIP is not set | 754 | # CONFIG_EXT2_FS_XIP is not set |
706 | # CONFIG_EXT3_FS is not set | 755 | # CONFIG_EXT3_FS is not set |
707 | # CONFIG_JBD is not set | ||
708 | # CONFIG_REISERFS_FS is not set | 756 | # CONFIG_REISERFS_FS is not set |
709 | # CONFIG_JFS_FS is not set | 757 | # CONFIG_JFS_FS is not set |
710 | # CONFIG_FS_POSIX_ACL is not set | 758 | # CONFIG_FS_POSIX_ACL is not set |
711 | # CONFIG_XFS_FS is not set | 759 | # CONFIG_XFS_FS is not set |
760 | # CONFIG_OCFS2_FS is not set | ||
712 | # CONFIG_MINIX_FS is not set | 761 | # CONFIG_MINIX_FS is not set |
713 | CONFIG_ROMFS_FS=y | 762 | CONFIG_ROMFS_FS=y |
714 | CONFIG_INOTIFY=y | 763 | CONFIG_INOTIFY=y |
764 | CONFIG_INOTIFY_USER=y | ||
715 | # CONFIG_QUOTA is not set | 765 | # CONFIG_QUOTA is not set |
716 | CONFIG_DNOTIFY=y | 766 | CONFIG_DNOTIFY=y |
717 | # CONFIG_AUTOFS_FS is not set | 767 | # CONFIG_AUTOFS_FS is not set |
@@ -741,7 +791,7 @@ CONFIG_SYSFS=y | |||
741 | # CONFIG_TMPFS is not set | 791 | # CONFIG_TMPFS is not set |
742 | # CONFIG_HUGETLB_PAGE is not set | 792 | # CONFIG_HUGETLB_PAGE is not set |
743 | CONFIG_RAMFS=y | 793 | CONFIG_RAMFS=y |
744 | # CONFIG_RELAYFS_FS is not set | 794 | # CONFIG_CONFIGFS_FS is not set |
745 | 795 | ||
746 | # | 796 | # |
747 | # Miscellaneous filesystems | 797 | # Miscellaneous filesystems |
@@ -843,10 +893,13 @@ CONFIG_NLS_DEFAULT="iso8859-1" | |||
843 | # Kernel hacking | 893 | # Kernel hacking |
844 | # | 894 | # |
845 | # CONFIG_PRINTK_TIME is not set | 895 | # CONFIG_PRINTK_TIME is not set |
896 | # CONFIG_MAGIC_SYSRQ is not set | ||
846 | # CONFIG_DEBUG_KERNEL is not set | 897 | # CONFIG_DEBUG_KERNEL is not set |
847 | CONFIG_LOG_BUF_SHIFT=14 | 898 | CONFIG_LOG_BUF_SHIFT=14 |
848 | CONFIG_DEBUG_BUGVERBOSE=y | 899 | CONFIG_DEBUG_BUGVERBOSE=y |
900 | # CONFIG_DEBUG_FS is not set | ||
849 | CONFIG_FRAME_POINTER=y | 901 | CONFIG_FRAME_POINTER=y |
902 | # CONFIG_UNWIND_INFO is not set | ||
850 | # CONFIG_DEBUG_USER is not set | 903 | # CONFIG_DEBUG_USER is not set |
851 | 904 | ||
852 | # | 905 | # |
diff --git a/arch/arm/configs/onearm_defconfig b/arch/arm/configs/onearm_defconfig index 5401c01caefe..2b4a63be03f7 100644 --- a/arch/arm/configs/onearm_defconfig +++ b/arch/arm/configs/onearm_defconfig | |||
@@ -85,6 +85,7 @@ CONFIG_DEFAULT_IOSCHED="anticipatory" | |||
85 | # CONFIG_ARCH_INTEGRATOR is not set | 85 | # CONFIG_ARCH_INTEGRATOR is not set |
86 | # CONFIG_ARCH_REALVIEW is not set | 86 | # CONFIG_ARCH_REALVIEW is not set |
87 | # CONFIG_ARCH_VERSATILE is not set | 87 | # CONFIG_ARCH_VERSATILE is not set |
88 | CONFIG_ARCH_AT91=y | ||
88 | CONFIG_ARCH_AT91RM9200=y | 89 | CONFIG_ARCH_AT91RM9200=y |
89 | # CONFIG_ARCH_CLPS7500 is not set | 90 | # CONFIG_ARCH_CLPS7500 is not set |
90 | # CONFIG_ARCH_CLPS711X is not set | 91 | # CONFIG_ARCH_CLPS711X is not set |
diff --git a/arch/arm/configs/trizeps4_defconfig b/arch/arm/configs/trizeps4_defconfig new file mode 100644 index 000000000000..a6698dc4f6b9 --- /dev/null +++ b/arch/arm/configs/trizeps4_defconfig | |||
@@ -0,0 +1,1579 @@ | |||
1 | # | ||
2 | # Automatically generated make config: don't edit | ||
3 | # Linux kernel version: 2.6.17 | ||
4 | # Sat Jun 24 22:45:14 2006 | ||
5 | # | ||
6 | CONFIG_ARM=y | ||
7 | CONFIG_MMU=y | ||
8 | CONFIG_RWSEM_GENERIC_SPINLOCK=y | ||
9 | CONFIG_GENERIC_HWEIGHT=y | ||
10 | CONFIG_GENERIC_CALIBRATE_DELAY=y | ||
11 | CONFIG_ARCH_MTD_XIP=y | ||
12 | CONFIG_VECTORS_BASE=0xffff0000 | ||
13 | |||
14 | # | ||
15 | # Code maturity level options | ||
16 | # | ||
17 | CONFIG_EXPERIMENTAL=y | ||
18 | CONFIG_BROKEN_ON_SMP=y | ||
19 | CONFIG_LOCK_KERNEL=y | ||
20 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
21 | |||
22 | # | ||
23 | # General setup | ||
24 | # | ||
25 | CONFIG_LOCALVERSION="" | ||
26 | CONFIG_LOCALVERSION_AUTO=y | ||
27 | CONFIG_SWAP=y | ||
28 | CONFIG_SYSVIPC=y | ||
29 | CONFIG_POSIX_MQUEUE=y | ||
30 | CONFIG_BSD_PROCESS_ACCT=y | ||
31 | CONFIG_BSD_PROCESS_ACCT_V3=y | ||
32 | CONFIG_SYSCTL=y | ||
33 | CONFIG_AUDIT=y | ||
34 | CONFIG_IKCONFIG=y | ||
35 | CONFIG_IKCONFIG_PROC=y | ||
36 | # CONFIG_RELAY is not set | ||
37 | CONFIG_INITRAMFS_SOURCE="" | ||
38 | CONFIG_UID16=y | ||
39 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | ||
40 | CONFIG_EMBEDDED=y | ||
41 | CONFIG_KALLSYMS=y | ||
42 | CONFIG_KALLSYMS_EXTRA_PASS=y | ||
43 | CONFIG_HOTPLUG=y | ||
44 | CONFIG_PRINTK=y | ||
45 | CONFIG_BUG=y | ||
46 | CONFIG_ELF_CORE=y | ||
47 | CONFIG_BASE_FULL=y | ||
48 | CONFIG_FUTEX=y | ||
49 | CONFIG_EPOLL=y | ||
50 | CONFIG_SHMEM=y | ||
51 | CONFIG_SLAB=y | ||
52 | # CONFIG_TINY_SHMEM is not set | ||
53 | CONFIG_BASE_SMALL=0 | ||
54 | # CONFIG_SLOB is not set | ||
55 | CONFIG_OBSOLETE_INTERMODULE=y | ||
56 | |||
57 | # | ||
58 | # Loadable module support | ||
59 | # | ||
60 | CONFIG_MODULES=y | ||
61 | CONFIG_MODULE_UNLOAD=y | ||
62 | CONFIG_MODULE_FORCE_UNLOAD=y | ||
63 | # CONFIG_MODVERSIONS is not set | ||
64 | CONFIG_MODULE_SRCVERSION_ALL=y | ||
65 | CONFIG_KMOD=y | ||
66 | |||
67 | # | ||
68 | # Block layer | ||
69 | # | ||
70 | # CONFIG_BLK_DEV_IO_TRACE is not set | ||
71 | |||
72 | # | ||
73 | # IO Schedulers | ||
74 | # | ||
75 | CONFIG_IOSCHED_NOOP=y | ||
76 | CONFIG_IOSCHED_AS=y | ||
77 | CONFIG_IOSCHED_DEADLINE=y | ||
78 | CONFIG_IOSCHED_CFQ=y | ||
79 | CONFIG_DEFAULT_AS=y | ||
80 | # CONFIG_DEFAULT_DEADLINE is not set | ||
81 | # CONFIG_DEFAULT_CFQ is not set | ||
82 | # CONFIG_DEFAULT_NOOP is not set | ||
83 | CONFIG_DEFAULT_IOSCHED="anticipatory" | ||
84 | |||
85 | # | ||
86 | # System Type | ||
87 | # | ||
88 | # CONFIG_ARCH_CLPS7500 is not set | ||
89 | # CONFIG_ARCH_CLPS711X is not set | ||
90 | # CONFIG_ARCH_CO285 is not set | ||
91 | # CONFIG_ARCH_EBSA110 is not set | ||
92 | # CONFIG_ARCH_EP93XX is not set | ||
93 | # CONFIG_ARCH_FOOTBRIDGE is not set | ||
94 | # CONFIG_ARCH_INTEGRATOR is not set | ||
95 | # CONFIG_ARCH_IOP3XX is not set | ||
96 | # CONFIG_ARCH_IXP4XX is not set | ||
97 | # CONFIG_ARCH_IXP2000 is not set | ||
98 | # CONFIG_ARCH_IXP23XX is not set | ||
99 | # CONFIG_ARCH_L7200 is not set | ||
100 | CONFIG_ARCH_PXA=y | ||
101 | # CONFIG_ARCH_RPC is not set | ||
102 | # CONFIG_ARCH_SA1100 is not set | ||
103 | # CONFIG_ARCH_S3C2410 is not set | ||
104 | # CONFIG_ARCH_SHARK is not set | ||
105 | # CONFIG_ARCH_LH7A40X is not set | ||
106 | # CONFIG_ARCH_OMAP is not set | ||
107 | # CONFIG_ARCH_VERSATILE is not set | ||
108 | # CONFIG_ARCH_REALVIEW is not set | ||
109 | # CONFIG_ARCH_IMX is not set | ||
110 | # CONFIG_ARCH_H720X is not set | ||
111 | # CONFIG_ARCH_AAEC2000 is not set | ||
112 | # CONFIG_ARCH_AT91RM9200 is not set | ||
113 | |||
114 | # | ||
115 | # Intel PXA2xx Implementations | ||
116 | # | ||
117 | # CONFIG_ARCH_LUBBOCK is not set | ||
118 | # CONFIG_MACH_LOGICPD_PXA270 is not set | ||
119 | # CONFIG_MACH_MAINSTONE is not set | ||
120 | # CONFIG_ARCH_PXA_IDP is not set | ||
121 | # CONFIG_PXA_SHARPSL is not set | ||
122 | CONFIG_MACH_TRIZEPS4=y | ||
123 | CONFIG_MACH_TRIZEPS4_CONXS=y | ||
124 | # CONFIG_MACH_TRIZEPS4_ANY is not set | ||
125 | CONFIG_PXA27x=y | ||
126 | |||
127 | # | ||
128 | # Processor Type | ||
129 | # | ||
130 | CONFIG_CPU_32=y | ||
131 | CONFIG_CPU_XSCALE=y | ||
132 | CONFIG_CPU_32v5=y | ||
133 | CONFIG_CPU_ABRT_EV5T=y | ||
134 | CONFIG_CPU_CACHE_VIVT=y | ||
135 | CONFIG_CPU_TLB_V4WBI=y | ||
136 | |||
137 | # | ||
138 | # Processor Features | ||
139 | # | ||
140 | CONFIG_ARM_THUMB=y | ||
141 | CONFIG_XSCALE_PMU=y | ||
142 | |||
143 | # | ||
144 | # Bus support | ||
145 | # | ||
146 | |||
147 | # | ||
148 | # PCCARD (PCMCIA/CardBus) support | ||
149 | # | ||
150 | CONFIG_PCCARD=m | ||
151 | # CONFIG_PCMCIA_DEBUG is not set | ||
152 | CONFIG_PCMCIA=m | ||
153 | CONFIG_PCMCIA_LOAD_CIS=y | ||
154 | CONFIG_PCMCIA_IOCTL=y | ||
155 | |||
156 | # | ||
157 | # PC-card bridges | ||
158 | # | ||
159 | CONFIG_PCMCIA_PXA2XX=m | ||
160 | |||
161 | # | ||
162 | # Kernel Features | ||
163 | # | ||
164 | CONFIG_PREEMPT=y | ||
165 | # CONFIG_NO_IDLE_HZ is not set | ||
166 | CONFIG_HZ=100 | ||
167 | # CONFIG_AEABI is not set | ||
168 | # CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set | ||
169 | CONFIG_SELECT_MEMORY_MODEL=y | ||
170 | CONFIG_FLATMEM_MANUAL=y | ||
171 | # CONFIG_DISCONTIGMEM_MANUAL is not set | ||
172 | # CONFIG_SPARSEMEM_MANUAL is not set | ||
173 | CONFIG_FLATMEM=y | ||
174 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
175 | # CONFIG_SPARSEMEM_STATIC is not set | ||
176 | CONFIG_SPLIT_PTLOCK_CPUS=4096 | ||
177 | CONFIG_LEDS=y | ||
178 | CONFIG_LEDS_TIMER=y | ||
179 | CONFIG_LEDS_CPU=y | ||
180 | CONFIG_ALIGNMENT_TRAP=y | ||
181 | |||
182 | # | ||
183 | # Boot options | ||
184 | # | ||
185 | CONFIG_ZBOOT_ROM_TEXT=0 | ||
186 | CONFIG_ZBOOT_ROM_BSS=0 | ||
187 | CONFIG_CMDLINE="root=/dev/nfs ip=bootp console=ttyS0,115200n8" | ||
188 | # CONFIG_XIP_KERNEL is not set | ||
189 | |||
190 | # | ||
191 | # Floating point emulation | ||
192 | # | ||
193 | |||
194 | # | ||
195 | # At least one emulation must be selected | ||
196 | # | ||
197 | CONFIG_FPE_NWFPE=y | ||
198 | CONFIG_FPE_NWFPE_XP=y | ||
199 | # CONFIG_FPE_FASTFPE is not set | ||
200 | |||
201 | # | ||
202 | # Userspace binary formats | ||
203 | # | ||
204 | CONFIG_BINFMT_ELF=y | ||
205 | # CONFIG_BINFMT_AOUT is not set | ||
206 | CONFIG_BINFMT_MISC=m | ||
207 | # CONFIG_ARTHUR is not set | ||
208 | |||
209 | # | ||
210 | # Power management options | ||
211 | # | ||
212 | CONFIG_PM=y | ||
213 | CONFIG_PM_LEGACY=y | ||
214 | # CONFIG_PM_DEBUG is not set | ||
215 | CONFIG_APM=y | ||
216 | |||
217 | # | ||
218 | # Networking | ||
219 | # | ||
220 | CONFIG_NET=y | ||
221 | |||
222 | # | ||
223 | # Networking options | ||
224 | # | ||
225 | # CONFIG_NETDEBUG is not set | ||
226 | CONFIG_PACKET=y | ||
227 | CONFIG_PACKET_MMAP=y | ||
228 | CONFIG_UNIX=y | ||
229 | CONFIG_XFRM=y | ||
230 | CONFIG_XFRM_USER=m | ||
231 | CONFIG_NET_KEY=y | ||
232 | CONFIG_INET=y | ||
233 | # CONFIG_IP_MULTICAST is not set | ||
234 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
235 | CONFIG_IP_FIB_HASH=y | ||
236 | CONFIG_IP_PNP=y | ||
237 | CONFIG_IP_PNP_DHCP=y | ||
238 | CONFIG_IP_PNP_BOOTP=y | ||
239 | # CONFIG_IP_PNP_RARP is not set | ||
240 | # CONFIG_NET_IPIP is not set | ||
241 | # CONFIG_NET_IPGRE is not set | ||
242 | # CONFIG_ARPD is not set | ||
243 | # CONFIG_SYN_COOKIES is not set | ||
244 | # CONFIG_INET_AH is not set | ||
245 | # CONFIG_INET_ESP is not set | ||
246 | # CONFIG_INET_IPCOMP is not set | ||
247 | # CONFIG_INET_XFRM_TUNNEL is not set | ||
248 | # CONFIG_INET_TUNNEL is not set | ||
249 | CONFIG_INET_DIAG=y | ||
250 | CONFIG_INET_TCP_DIAG=y | ||
251 | # CONFIG_TCP_CONG_ADVANCED is not set | ||
252 | CONFIG_TCP_CONG_BIC=y | ||
253 | |||
254 | # | ||
255 | # IP: Virtual Server Configuration | ||
256 | # | ||
257 | # CONFIG_IP_VS is not set | ||
258 | CONFIG_IPV6=m | ||
259 | # CONFIG_IPV6_PRIVACY is not set | ||
260 | # CONFIG_IPV6_ROUTER_PREF is not set | ||
261 | # CONFIG_INET6_AH is not set | ||
262 | # CONFIG_INET6_ESP is not set | ||
263 | # CONFIG_INET6_IPCOMP is not set | ||
264 | # CONFIG_INET6_XFRM_TUNNEL is not set | ||
265 | # CONFIG_INET6_TUNNEL is not set | ||
266 | # CONFIG_IPV6_TUNNEL is not set | ||
267 | CONFIG_NETFILTER=y | ||
268 | # CONFIG_NETFILTER_DEBUG is not set | ||
269 | |||
270 | # | ||
271 | # Core Netfilter Configuration | ||
272 | # | ||
273 | # CONFIG_NETFILTER_NETLINK is not set | ||
274 | # CONFIG_NETFILTER_XTABLES is not set | ||
275 | |||
276 | # | ||
277 | # IP: Netfilter Configuration | ||
278 | # | ||
279 | CONFIG_IP_NF_CONNTRACK=m | ||
280 | CONFIG_IP_NF_CT_ACCT=y | ||
281 | CONFIG_IP_NF_CONNTRACK_MARK=y | ||
282 | # CONFIG_IP_NF_CONNTRACK_EVENTS is not set | ||
283 | # CONFIG_IP_NF_CT_PROTO_SCTP is not set | ||
284 | CONFIG_IP_NF_FTP=m | ||
285 | CONFIG_IP_NF_IRC=m | ||
286 | # CONFIG_IP_NF_NETBIOS_NS is not set | ||
287 | CONFIG_IP_NF_TFTP=m | ||
288 | CONFIG_IP_NF_AMANDA=m | ||
289 | # CONFIG_IP_NF_PPTP is not set | ||
290 | # CONFIG_IP_NF_H323 is not set | ||
291 | CONFIG_IP_NF_QUEUE=m | ||
292 | |||
293 | # | ||
294 | # IPv6: Netfilter Configuration (EXPERIMENTAL) | ||
295 | # | ||
296 | # CONFIG_IP6_NF_QUEUE is not set | ||
297 | |||
298 | # | ||
299 | # DCCP Configuration (EXPERIMENTAL) | ||
300 | # | ||
301 | # CONFIG_IP_DCCP is not set | ||
302 | |||
303 | # | ||
304 | # SCTP Configuration (EXPERIMENTAL) | ||
305 | # | ||
306 | # CONFIG_IP_SCTP is not set | ||
307 | |||
308 | # | ||
309 | # TIPC Configuration (EXPERIMENTAL) | ||
310 | # | ||
311 | # CONFIG_TIPC is not set | ||
312 | # CONFIG_ATM is not set | ||
313 | # CONFIG_BRIDGE is not set | ||
314 | CONFIG_VLAN_8021Q=m | ||
315 | # CONFIG_DECNET is not set | ||
316 | # CONFIG_LLC2 is not set | ||
317 | # CONFIG_IPX is not set | ||
318 | # CONFIG_ATALK is not set | ||
319 | # CONFIG_X25 is not set | ||
320 | # CONFIG_LAPB is not set | ||
321 | # CONFIG_NET_DIVERT is not set | ||
322 | # CONFIG_ECONET is not set | ||
323 | # CONFIG_WAN_ROUTER is not set | ||
324 | |||
325 | # | ||
326 | # QoS and/or fair queueing | ||
327 | # | ||
328 | # CONFIG_NET_SCHED is not set | ||
329 | |||
330 | # | ||
331 | # Network testing | ||
332 | # | ||
333 | # CONFIG_NET_PKTGEN is not set | ||
334 | # CONFIG_HAMRADIO is not set | ||
335 | CONFIG_IRDA=m | ||
336 | |||
337 | # | ||
338 | # IrDA protocols | ||
339 | # | ||
340 | CONFIG_IRLAN=m | ||
341 | CONFIG_IRNET=m | ||
342 | CONFIG_IRCOMM=m | ||
343 | CONFIG_IRDA_ULTRA=y | ||
344 | |||
345 | # | ||
346 | # IrDA options | ||
347 | # | ||
348 | CONFIG_IRDA_CACHE_LAST_LSAP=y | ||
349 | CONFIG_IRDA_FAST_RR=y | ||
350 | # CONFIG_IRDA_DEBUG is not set | ||
351 | |||
352 | # | ||
353 | # Infrared-port device drivers | ||
354 | # | ||
355 | |||
356 | # | ||
357 | # SIR device drivers | ||
358 | # | ||
359 | CONFIG_IRTTY_SIR=m | ||
360 | |||
361 | # | ||
362 | # Dongle support | ||
363 | # | ||
364 | # CONFIG_DONGLE is not set | ||
365 | |||
366 | # | ||
367 | # Old SIR device drivers | ||
368 | # | ||
369 | # CONFIG_IRPORT_SIR is not set | ||
370 | |||
371 | # | ||
372 | # Old Serial dongle support | ||
373 | # | ||
374 | |||
375 | # | ||
376 | # FIR device drivers | ||
377 | # | ||
378 | # CONFIG_USB_IRDA is not set | ||
379 | # CONFIG_SIGMATEL_FIR is not set | ||
380 | # CONFIG_PXA_FICP is not set | ||
381 | CONFIG_BT=m | ||
382 | CONFIG_BT_L2CAP=m | ||
383 | CONFIG_BT_SCO=m | ||
384 | CONFIG_BT_RFCOMM=m | ||
385 | CONFIG_BT_RFCOMM_TTY=y | ||
386 | CONFIG_BT_BNEP=m | ||
387 | CONFIG_BT_BNEP_MC_FILTER=y | ||
388 | CONFIG_BT_BNEP_PROTO_FILTER=y | ||
389 | CONFIG_BT_HIDP=m | ||
390 | |||
391 | # | ||
392 | # Bluetooth device drivers | ||
393 | # | ||
394 | # CONFIG_BT_HCIUSB is not set | ||
395 | # CONFIG_BT_HCIUART is not set | ||
396 | # CONFIG_BT_HCIBCM203X is not set | ||
397 | # CONFIG_BT_HCIBPA10X is not set | ||
398 | # CONFIG_BT_HCIBFUSB is not set | ||
399 | # CONFIG_BT_HCIDTL1 is not set | ||
400 | # CONFIG_BT_HCIBT3C is not set | ||
401 | # CONFIG_BT_HCIBLUECARD is not set | ||
402 | # CONFIG_BT_HCIBTUART is not set | ||
403 | # CONFIG_BT_HCIVHCI is not set | ||
404 | CONFIG_IEEE80211=m | ||
405 | # CONFIG_IEEE80211_DEBUG is not set | ||
406 | CONFIG_IEEE80211_CRYPT_WEP=m | ||
407 | CONFIG_IEEE80211_CRYPT_CCMP=m | ||
408 | CONFIG_IEEE80211_CRYPT_TKIP=m | ||
409 | CONFIG_IEEE80211_SOFTMAC=m | ||
410 | # CONFIG_IEEE80211_SOFTMAC_DEBUG is not set | ||
411 | CONFIG_WIRELESS_EXT=y | ||
412 | |||
413 | # | ||
414 | # Device Drivers | ||
415 | # | ||
416 | |||
417 | # | ||
418 | # Generic Driver Options | ||
419 | # | ||
420 | CONFIG_STANDALONE=y | ||
421 | CONFIG_PREVENT_FIRMWARE_BUILD=y | ||
422 | CONFIG_FW_LOADER=y | ||
423 | |||
424 | # | ||
425 | # Connector - unified userspace <-> kernelspace linker | ||
426 | # | ||
427 | CONFIG_CONNECTOR=y | ||
428 | CONFIG_PROC_EVENTS=y | ||
429 | |||
430 | # | ||
431 | # Memory Technology Devices (MTD) | ||
432 | # | ||
433 | CONFIG_MTD=y | ||
434 | # CONFIG_MTD_DEBUG is not set | ||
435 | CONFIG_MTD_CONCAT=y | ||
436 | CONFIG_MTD_PARTITIONS=y | ||
437 | CONFIG_MTD_REDBOOT_PARTS=y | ||
438 | CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1 | ||
439 | CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED=y | ||
440 | CONFIG_MTD_REDBOOT_PARTS_READONLY=y | ||
441 | # CONFIG_MTD_CMDLINE_PARTS is not set | ||
442 | # CONFIG_MTD_AFS_PARTS is not set | ||
443 | |||
444 | # | ||
445 | # User Modules And Translation Layers | ||
446 | # | ||
447 | CONFIG_MTD_CHAR=y | ||
448 | CONFIG_MTD_BLOCK=y | ||
449 | # CONFIG_FTL is not set | ||
450 | CONFIG_NFTL=y | ||
451 | CONFIG_NFTL_RW=y | ||
452 | CONFIG_INFTL=y | ||
453 | # CONFIG_RFD_FTL is not set | ||
454 | |||
455 | # | ||
456 | # RAM/ROM/Flash chip drivers | ||
457 | # | ||
458 | CONFIG_MTD_CFI=y | ||
459 | CONFIG_MTD_JEDECPROBE=y | ||
460 | CONFIG_MTD_GEN_PROBE=y | ||
461 | CONFIG_MTD_CFI_ADV_OPTIONS=y | ||
462 | # CONFIG_MTD_CFI_NOSWAP is not set | ||
463 | # CONFIG_MTD_CFI_BE_BYTE_SWAP is not set | ||
464 | CONFIG_MTD_CFI_LE_BYTE_SWAP=y | ||
465 | CONFIG_MTD_CFI_GEOMETRY=y | ||
466 | CONFIG_MTD_MAP_BANK_WIDTH_1=y | ||
467 | CONFIG_MTD_MAP_BANK_WIDTH_2=y | ||
468 | CONFIG_MTD_MAP_BANK_WIDTH_4=y | ||
469 | # CONFIG_MTD_MAP_BANK_WIDTH_8 is not set | ||
470 | # CONFIG_MTD_MAP_BANK_WIDTH_16 is not set | ||
471 | # CONFIG_MTD_MAP_BANK_WIDTH_32 is not set | ||
472 | CONFIG_MTD_CFI_I1=y | ||
473 | CONFIG_MTD_CFI_I2=y | ||
474 | # CONFIG_MTD_CFI_I4 is not set | ||
475 | # CONFIG_MTD_CFI_I8 is not set | ||
476 | # CONFIG_MTD_OTP is not set | ||
477 | CONFIG_MTD_CFI_INTELEXT=y | ||
478 | CONFIG_MTD_CFI_AMDSTD=y | ||
479 | # CONFIG_MTD_CFI_STAA is not set | ||
480 | CONFIG_MTD_CFI_UTIL=y | ||
481 | # CONFIG_MTD_RAM is not set | ||
482 | # CONFIG_MTD_ROM is not set | ||
483 | # CONFIG_MTD_ABSENT is not set | ||
484 | # CONFIG_MTD_OBSOLETE_CHIPS is not set | ||
485 | # CONFIG_MTD_XIP is not set | ||
486 | |||
487 | # | ||
488 | # Mapping drivers for chip access | ||
489 | # | ||
490 | CONFIG_MTD_COMPLEX_MAPPINGS=y | ||
491 | CONFIG_MTD_PHYSMAP=y | ||
492 | CONFIG_MTD_PHYSMAP_START=0x0 | ||
493 | CONFIG_MTD_PHYSMAP_LEN=0x4000000 | ||
494 | CONFIG_MTD_PHYSMAP_BANKWIDTH=2 | ||
495 | # CONFIG_MTD_TRIZEPS4 is not set | ||
496 | # CONFIG_MTD_ARM_INTEGRATOR is not set | ||
497 | # CONFIG_MTD_IMPA7 is not set | ||
498 | # CONFIG_MTD_SHARP_SL is not set | ||
499 | # CONFIG_MTD_PLATRAM is not set | ||
500 | |||
501 | # | ||
502 | # Self-contained MTD device drivers | ||
503 | # | ||
504 | # CONFIG_MTD_DATAFLASH is not set | ||
505 | # CONFIG_MTD_M25P80 is not set | ||
506 | # CONFIG_MTD_SLRAM is not set | ||
507 | # CONFIG_MTD_PHRAM is not set | ||
508 | # CONFIG_MTD_MTDRAM is not set | ||
509 | # CONFIG_MTD_BLOCK2MTD is not set | ||
510 | |||
511 | # | ||
512 | # Disk-On-Chip Device Drivers | ||
513 | # | ||
514 | # CONFIG_MTD_DOC2000 is not set | ||
515 | # CONFIG_MTD_DOC2001 is not set | ||
516 | CONFIG_MTD_DOC2001PLUS=y | ||
517 | CONFIG_MTD_DOCPROBE=y | ||
518 | CONFIG_MTD_DOCECC=y | ||
519 | # CONFIG_MTD_DOCPROBE_ADVANCED is not set | ||
520 | CONFIG_MTD_DOCPROBE_ADDRESS=0 | ||
521 | |||
522 | # | ||
523 | # NAND Flash Device Drivers | ||
524 | # | ||
525 | CONFIG_MTD_NAND=y | ||
526 | # CONFIG_MTD_NAND_VERIFY_WRITE is not set | ||
527 | # CONFIG_MTD_NAND_H1900 is not set | ||
528 | CONFIG_MTD_NAND_IDS=y | ||
529 | CONFIG_MTD_NAND_DISKONCHIP=y | ||
530 | # CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADVANCED is not set | ||
531 | CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADDRESS=0 | ||
532 | # CONFIG_MTD_NAND_DISKONCHIP_BBTWRITE is not set | ||
533 | # CONFIG_MTD_NAND_SHARPSL is not set | ||
534 | # CONFIG_MTD_NAND_NANDSIM is not set | ||
535 | |||
536 | # | ||
537 | # OneNAND Flash Device Drivers | ||
538 | # | ||
539 | # CONFIG_MTD_ONENAND is not set | ||
540 | |||
541 | # | ||
542 | # Parallel port support | ||
543 | # | ||
544 | # CONFIG_PARPORT is not set | ||
545 | |||
546 | # | ||
547 | # Plug and Play support | ||
548 | # | ||
549 | |||
550 | # | ||
551 | # Block devices | ||
552 | # | ||
553 | # CONFIG_BLK_DEV_COW_COMMON is not set | ||
554 | CONFIG_BLK_DEV_LOOP=y | ||
555 | CONFIG_BLK_DEV_CRYPTOLOOP=m | ||
556 | CONFIG_BLK_DEV_NBD=y | ||
557 | # CONFIG_BLK_DEV_UB is not set | ||
558 | CONFIG_BLK_DEV_RAM=y | ||
559 | CONFIG_BLK_DEV_RAM_COUNT=4 | ||
560 | CONFIG_BLK_DEV_RAM_SIZE=4096 | ||
561 | CONFIG_BLK_DEV_INITRD=y | ||
562 | # CONFIG_CDROM_PKTCDVD is not set | ||
563 | # CONFIG_ATA_OVER_ETH is not set | ||
564 | |||
565 | # | ||
566 | # ATA/ATAPI/MFM/RLL support | ||
567 | # | ||
568 | CONFIG_IDE=y | ||
569 | CONFIG_BLK_DEV_IDE=y | ||
570 | |||
571 | # | ||
572 | # Please see Documentation/ide.txt for help/info on IDE drives | ||
573 | # | ||
574 | # CONFIG_BLK_DEV_IDE_SATA is not set | ||
575 | CONFIG_BLK_DEV_IDEDISK=y | ||
576 | CONFIG_IDEDISK_MULTI_MODE=y | ||
577 | CONFIG_BLK_DEV_IDECS=m | ||
578 | # CONFIG_BLK_DEV_IDECD is not set | ||
579 | # CONFIG_BLK_DEV_IDETAPE is not set | ||
580 | # CONFIG_BLK_DEV_IDEFLOPPY is not set | ||
581 | # CONFIG_BLK_DEV_IDESCSI is not set | ||
582 | # CONFIG_IDE_TASK_IOCTL is not set | ||
583 | |||
584 | # | ||
585 | # IDE chipset support/bugfixes | ||
586 | # | ||
587 | CONFIG_IDE_GENERIC=y | ||
588 | CONFIG_IDE_PXA_CF=y | ||
589 | CONFIG_IDE_ARM=y | ||
590 | # CONFIG_BLK_DEV_IDEDMA is not set | ||
591 | # CONFIG_IDEDMA_AUTO is not set | ||
592 | # CONFIG_BLK_DEV_HD is not set | ||
593 | |||
594 | # | ||
595 | # SCSI device support | ||
596 | # | ||
597 | # CONFIG_RAID_ATTRS is not set | ||
598 | CONFIG_SCSI=m | ||
599 | CONFIG_SCSI_PROC_FS=y | ||
600 | |||
601 | # | ||
602 | # SCSI support type (disk, tape, CD-ROM) | ||
603 | # | ||
604 | CONFIG_BLK_DEV_SD=m | ||
605 | # CONFIG_CHR_DEV_ST is not set | ||
606 | # CONFIG_CHR_DEV_OSST is not set | ||
607 | # CONFIG_BLK_DEV_SR is not set | ||
608 | CONFIG_CHR_DEV_SG=m | ||
609 | # CONFIG_CHR_DEV_SCH is not set | ||
610 | |||
611 | # | ||
612 | # Some SCSI devices (e.g. CD jukebox) support multiple LUNs | ||
613 | # | ||
614 | CONFIG_SCSI_MULTI_LUN=y | ||
615 | # CONFIG_SCSI_CONSTANTS is not set | ||
616 | # CONFIG_SCSI_LOGGING is not set | ||
617 | |||
618 | # | ||
619 | # SCSI Transport Attributes | ||
620 | # | ||
621 | # CONFIG_SCSI_SPI_ATTRS is not set | ||
622 | # CONFIG_SCSI_FC_ATTRS is not set | ||
623 | # CONFIG_SCSI_ISCSI_ATTRS is not set | ||
624 | # CONFIG_SCSI_SAS_ATTRS is not set | ||
625 | |||
626 | # | ||
627 | # SCSI low-level drivers | ||
628 | # | ||
629 | # CONFIG_ISCSI_TCP is not set | ||
630 | # CONFIG_SCSI_SATA is not set | ||
631 | # CONFIG_SCSI_DEBUG is not set | ||
632 | |||
633 | # | ||
634 | # PCMCIA SCSI adapter support | ||
635 | # | ||
636 | # CONFIG_PCMCIA_AHA152X is not set | ||
637 | # CONFIG_PCMCIA_FDOMAIN is not set | ||
638 | # CONFIG_PCMCIA_NINJA_SCSI is not set | ||
639 | # CONFIG_PCMCIA_QLOGIC is not set | ||
640 | # CONFIG_PCMCIA_SYM53C500 is not set | ||
641 | |||
642 | # | ||
643 | # Multi-device support (RAID and LVM) | ||
644 | # | ||
645 | # CONFIG_MD is not set | ||
646 | |||
647 | # | ||
648 | # Fusion MPT device support | ||
649 | # | ||
650 | # CONFIG_FUSION is not set | ||
651 | |||
652 | # | ||
653 | # IEEE 1394 (FireWire) support | ||
654 | # | ||
655 | |||
656 | # | ||
657 | # I2O device support | ||
658 | # | ||
659 | |||
660 | # | ||
661 | # Network device support | ||
662 | # | ||
663 | CONFIG_NETDEVICES=y | ||
664 | # CONFIG_DUMMY is not set | ||
665 | # CONFIG_BONDING is not set | ||
666 | # CONFIG_EQUALIZER is not set | ||
667 | # CONFIG_TUN is not set | ||
668 | |||
669 | # | ||
670 | # PHY device support | ||
671 | # | ||
672 | CONFIG_PHYLIB=y | ||
673 | |||
674 | # | ||
675 | # MII PHY device drivers | ||
676 | # | ||
677 | # CONFIG_MARVELL_PHY is not set | ||
678 | CONFIG_DAVICOM_PHY=y | ||
679 | # CONFIG_QSEMI_PHY is not set | ||
680 | # CONFIG_LXT_PHY is not set | ||
681 | # CONFIG_CICADA_PHY is not set | ||
682 | |||
683 | # | ||
684 | # Ethernet (10 or 100Mbit) | ||
685 | # | ||
686 | CONFIG_NET_ETHERNET=y | ||
687 | CONFIG_MII=y | ||
688 | # CONFIG_SMC91X is not set | ||
689 | CONFIG_DM9000=y | ||
690 | |||
691 | # | ||
692 | # Ethernet (1000 Mbit) | ||
693 | # | ||
694 | |||
695 | # | ||
696 | # Ethernet (10000 Mbit) | ||
697 | # | ||
698 | |||
699 | # | ||
700 | # Token Ring devices | ||
701 | # | ||
702 | |||
703 | # | ||
704 | # Wireless LAN (non-hamradio) | ||
705 | # | ||
706 | CONFIG_NET_RADIO=y | ||
707 | # CONFIG_NET_WIRELESS_RTNETLINK is not set | ||
708 | |||
709 | # | ||
710 | # Obsolete Wireless cards support (pre-802.11) | ||
711 | # | ||
712 | # CONFIG_STRIP is not set | ||
713 | # CONFIG_PCMCIA_WAVELAN is not set | ||
714 | # CONFIG_PCMCIA_NETWAVE is not set | ||
715 | |||
716 | # | ||
717 | # Wireless 802.11 Frequency Hopping cards support | ||
718 | # | ||
719 | # CONFIG_PCMCIA_RAYCS is not set | ||
720 | |||
721 | # | ||
722 | # Wireless 802.11b ISA/PCI cards support | ||
723 | # | ||
724 | CONFIG_HERMES=m | ||
725 | # CONFIG_ATMEL is not set | ||
726 | |||
727 | # | ||
728 | # Wireless 802.11b Pcmcia/Cardbus cards support | ||
729 | # | ||
730 | CONFIG_PCMCIA_HERMES=m | ||
731 | # CONFIG_PCMCIA_SPECTRUM is not set | ||
732 | CONFIG_AIRO_CS=m | ||
733 | # CONFIG_PCMCIA_WL3501 is not set | ||
734 | CONFIG_HOSTAP=m | ||
735 | CONFIG_HOSTAP_FIRMWARE=y | ||
736 | CONFIG_HOSTAP_FIRMWARE_NVRAM=y | ||
737 | CONFIG_HOSTAP_CS=m | ||
738 | CONFIG_NET_WIRELESS=y | ||
739 | |||
740 | # | ||
741 | # PCMCIA network device support | ||
742 | # | ||
743 | # CONFIG_NET_PCMCIA is not set | ||
744 | |||
745 | # | ||
746 | # Wan interfaces | ||
747 | # | ||
748 | # CONFIG_WAN is not set | ||
749 | CONFIG_PPP=m | ||
750 | CONFIG_PPP_MULTILINK=y | ||
751 | CONFIG_PPP_FILTER=y | ||
752 | CONFIG_PPP_ASYNC=m | ||
753 | CONFIG_PPP_SYNC_TTY=m | ||
754 | CONFIG_PPP_DEFLATE=m | ||
755 | CONFIG_PPP_BSDCOMP=m | ||
756 | CONFIG_PPP_MPPE=m | ||
757 | # CONFIG_PPPOE is not set | ||
758 | # CONFIG_SLIP is not set | ||
759 | # CONFIG_SHAPER is not set | ||
760 | # CONFIG_NETCONSOLE is not set | ||
761 | # CONFIG_NETPOLL is not set | ||
762 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
763 | |||
764 | # | ||
765 | # ISDN subsystem | ||
766 | # | ||
767 | # CONFIG_ISDN is not set | ||
768 | |||
769 | # | ||
770 | # Input device support | ||
771 | # | ||
772 | CONFIG_INPUT=y | ||
773 | |||
774 | # | ||
775 | # Userland interfaces | ||
776 | # | ||
777 | CONFIG_INPUT_MOUSEDEV=y | ||
778 | CONFIG_INPUT_MOUSEDEV_PSAUX=y | ||
779 | CONFIG_INPUT_MOUSEDEV_SCREEN_X=640 | ||
780 | CONFIG_INPUT_MOUSEDEV_SCREEN_Y=480 | ||
781 | # CONFIG_INPUT_JOYDEV is not set | ||
782 | CONFIG_INPUT_TSDEV=y | ||
783 | CONFIG_INPUT_TSDEV_SCREEN_X=640 | ||
784 | CONFIG_INPUT_TSDEV_SCREEN_Y=480 | ||
785 | CONFIG_INPUT_EVDEV=y | ||
786 | # CONFIG_INPUT_EVBUG is not set | ||
787 | |||
788 | # | ||
789 | # Input Device Drivers | ||
790 | # | ||
791 | CONFIG_INPUT_KEYBOARD=y | ||
792 | CONFIG_KEYBOARD_ATKBD=y | ||
793 | # CONFIG_KEYBOARD_SUNKBD is not set | ||
794 | # CONFIG_KEYBOARD_LKKBD is not set | ||
795 | # CONFIG_KEYBOARD_XTKBD is not set | ||
796 | # CONFIG_KEYBOARD_NEWTON is not set | ||
797 | CONFIG_INPUT_MOUSE=y | ||
798 | # CONFIG_MOUSE_PS2 is not set | ||
799 | CONFIG_MOUSE_SERIAL=y | ||
800 | # CONFIG_MOUSE_VSXXXAA is not set | ||
801 | # CONFIG_INPUT_JOYSTICK is not set | ||
802 | CONFIG_INPUT_TOUCHSCREEN=y | ||
803 | # CONFIG_TOUCHSCREEN_ADS7846 is not set | ||
804 | # CONFIG_TOUCHSCREEN_GUNZE is not set | ||
805 | # CONFIG_TOUCHSCREEN_ELO is not set | ||
806 | # CONFIG_TOUCHSCREEN_MTOUCH is not set | ||
807 | # CONFIG_TOUCHSCREEN_MK712 is not set | ||
808 | CONFIG_INPUT_MISC=y | ||
809 | CONFIG_INPUT_UINPUT=m | ||
810 | |||
811 | # | ||
812 | # Hardware I/O ports | ||
813 | # | ||
814 | CONFIG_SERIO=y | ||
815 | CONFIG_SERIO_SERPORT=y | ||
816 | CONFIG_SERIO_LIBPS2=y | ||
817 | # CONFIG_SERIO_RAW is not set | ||
818 | # CONFIG_GAMEPORT is not set | ||
819 | |||
820 | # | ||
821 | # Character devices | ||
822 | # | ||
823 | CONFIG_VT=y | ||
824 | CONFIG_VT_CONSOLE=y | ||
825 | CONFIG_HW_CONSOLE=y | ||
826 | # CONFIG_SERIAL_NONSTANDARD is not set | ||
827 | |||
828 | # | ||
829 | # Serial drivers | ||
830 | # | ||
831 | # CONFIG_SERIAL_8250 is not set | ||
832 | |||
833 | # | ||
834 | # Non-8250 serial port support | ||
835 | # | ||
836 | CONFIG_SERIAL_PXA=y | ||
837 | CONFIG_SERIAL_PXA_CONSOLE=y | ||
838 | CONFIG_SERIAL_CORE=y | ||
839 | CONFIG_SERIAL_CORE_CONSOLE=y | ||
840 | CONFIG_UNIX98_PTYS=y | ||
841 | CONFIG_LEGACY_PTYS=y | ||
842 | CONFIG_LEGACY_PTY_COUNT=256 | ||
843 | |||
844 | # | ||
845 | # IPMI | ||
846 | # | ||
847 | # CONFIG_IPMI_HANDLER is not set | ||
848 | |||
849 | # | ||
850 | # Watchdog Cards | ||
851 | # | ||
852 | CONFIG_WATCHDOG=y | ||
853 | # CONFIG_WATCHDOG_NOWAYOUT is not set | ||
854 | |||
855 | # | ||
856 | # Watchdog Device Drivers | ||
857 | # | ||
858 | # CONFIG_SOFT_WATCHDOG is not set | ||
859 | CONFIG_SA1100_WATCHDOG=y | ||
860 | |||
861 | # | ||
862 | # USB-based Watchdog Cards | ||
863 | # | ||
864 | # CONFIG_USBPCWATCHDOG is not set | ||
865 | # CONFIG_NVRAM is not set | ||
866 | # CONFIG_DTLK is not set | ||
867 | # CONFIG_R3964 is not set | ||
868 | |||
869 | # | ||
870 | # Ftape, the floppy tape device driver | ||
871 | # | ||
872 | |||
873 | # | ||
874 | # PCMCIA character devices | ||
875 | # | ||
876 | # CONFIG_SYNCLINK_CS is not set | ||
877 | # CONFIG_CARDMAN_4000 is not set | ||
878 | # CONFIG_CARDMAN_4040 is not set | ||
879 | # CONFIG_RAW_DRIVER is not set | ||
880 | |||
881 | # | ||
882 | # TPM devices | ||
883 | # | ||
884 | # CONFIG_TCG_TPM is not set | ||
885 | # CONFIG_TELCLOCK is not set | ||
886 | |||
887 | # | ||
888 | # I2C support | ||
889 | # | ||
890 | CONFIG_I2C=y | ||
891 | CONFIG_I2C_CHARDEV=y | ||
892 | |||
893 | # | ||
894 | # I2C Algorithms | ||
895 | # | ||
896 | # CONFIG_I2C_ALGOBIT is not set | ||
897 | # CONFIG_I2C_ALGOPCF is not set | ||
898 | # CONFIG_I2C_ALGOPCA is not set | ||
899 | |||
900 | # | ||
901 | # I2C Hardware Bus support | ||
902 | # | ||
903 | CONFIG_I2C_PXA=y | ||
904 | CONFIG_I2C_PXA_SLAVE=y | ||
905 | # CONFIG_I2C_PARPORT_LIGHT is not set | ||
906 | # CONFIG_I2C_STUB is not set | ||
907 | # CONFIG_I2C_PCA_ISA is not set | ||
908 | |||
909 | # | ||
910 | # Miscellaneous I2C Chip support | ||
911 | # | ||
912 | # CONFIG_SENSORS_DS1337 is not set | ||
913 | # CONFIG_SENSORS_DS1374 is not set | ||
914 | CONFIG_SENSORS_EEPROM=m | ||
915 | # CONFIG_SENSORS_PCF8574 is not set | ||
916 | # CONFIG_SENSORS_PCA9539 is not set | ||
917 | # CONFIG_SENSORS_PCF8591 is not set | ||
918 | # CONFIG_SENSORS_MAX6875 is not set | ||
919 | # CONFIG_I2C_DEBUG_CORE is not set | ||
920 | # CONFIG_I2C_DEBUG_ALGO is not set | ||
921 | # CONFIG_I2C_DEBUG_BUS is not set | ||
922 | # CONFIG_I2C_DEBUG_CHIP is not set | ||
923 | |||
924 | # | ||
925 | # SPI support | ||
926 | # | ||
927 | CONFIG_SPI=y | ||
928 | CONFIG_SPI_MASTER=y | ||
929 | |||
930 | # | ||
931 | # SPI Master Controller Drivers | ||
932 | # | ||
933 | # CONFIG_SPI_BITBANG is not set | ||
934 | CONFIG_SPI_PXA2XX=m | ||
935 | |||
936 | # | ||
937 | # SPI Protocol Masters | ||
938 | # | ||
939 | |||
940 | # | ||
941 | # Dallas's 1-wire bus | ||
942 | # | ||
943 | # CONFIG_W1 is not set | ||
944 | |||
945 | # | ||
946 | # Hardware Monitoring support | ||
947 | # | ||
948 | CONFIG_HWMON=y | ||
949 | # CONFIG_HWMON_VID is not set | ||
950 | # CONFIG_SENSORS_ADM1021 is not set | ||
951 | # CONFIG_SENSORS_ADM1025 is not set | ||
952 | # CONFIG_SENSORS_ADM1026 is not set | ||
953 | # CONFIG_SENSORS_ADM1031 is not set | ||
954 | # CONFIG_SENSORS_ADM9240 is not set | ||
955 | # CONFIG_SENSORS_ASB100 is not set | ||
956 | # CONFIG_SENSORS_ATXP1 is not set | ||
957 | # CONFIG_SENSORS_DS1621 is not set | ||
958 | # CONFIG_SENSORS_F71805F is not set | ||
959 | # CONFIG_SENSORS_FSCHER is not set | ||
960 | # CONFIG_SENSORS_FSCPOS is not set | ||
961 | # CONFIG_SENSORS_GL518SM is not set | ||
962 | # CONFIG_SENSORS_GL520SM is not set | ||
963 | # CONFIG_SENSORS_IT87 is not set | ||
964 | # CONFIG_SENSORS_LM63 is not set | ||
965 | # CONFIG_SENSORS_LM75 is not set | ||
966 | # CONFIG_SENSORS_LM77 is not set | ||
967 | # CONFIG_SENSORS_LM78 is not set | ||
968 | # CONFIG_SENSORS_LM80 is not set | ||
969 | # CONFIG_SENSORS_LM83 is not set | ||
970 | # CONFIG_SENSORS_LM85 is not set | ||
971 | # CONFIG_SENSORS_LM87 is not set | ||
972 | # CONFIG_SENSORS_LM90 is not set | ||
973 | # CONFIG_SENSORS_LM92 is not set | ||
974 | # CONFIG_SENSORS_MAX1619 is not set | ||
975 | # CONFIG_SENSORS_PC87360 is not set | ||
976 | # CONFIG_SENSORS_SMSC47M1 is not set | ||
977 | # CONFIG_SENSORS_SMSC47B397 is not set | ||
978 | # CONFIG_SENSORS_W83781D is not set | ||
979 | # CONFIG_SENSORS_W83792D is not set | ||
980 | # CONFIG_SENSORS_W83L785TS is not set | ||
981 | # CONFIG_SENSORS_W83627HF is not set | ||
982 | # CONFIG_SENSORS_W83627EHF is not set | ||
983 | # CONFIG_HWMON_DEBUG_CHIP is not set | ||
984 | |||
985 | # | ||
986 | # Misc devices | ||
987 | # | ||
988 | |||
989 | # | ||
990 | # Multimedia Capabilities Port drivers | ||
991 | # | ||
992 | CONFIG_UCB1400=y | ||
993 | CONFIG_UCB1400_TS=y | ||
994 | |||
995 | # | ||
996 | # LED devices | ||
997 | # | ||
998 | CONFIG_NEW_LEDS=y | ||
999 | CONFIG_LEDS_CLASS=y | ||
1000 | |||
1001 | # | ||
1002 | # LED drivers | ||
1003 | # | ||
1004 | |||
1005 | # | ||
1006 | # LED Triggers | ||
1007 | # | ||
1008 | CONFIG_LEDS_TRIGGERS=y | ||
1009 | CONFIG_LEDS_TRIGGER_TIMER=y | ||
1010 | CONFIG_LEDS_TRIGGER_IDE_DISK=y | ||
1011 | |||
1012 | # | ||
1013 | # Multimedia devices | ||
1014 | # | ||
1015 | # CONFIG_VIDEO_DEV is not set | ||
1016 | CONFIG_VIDEO_V4L2=y | ||
1017 | |||
1018 | # | ||
1019 | # Digital Video Broadcasting Devices | ||
1020 | # | ||
1021 | # CONFIG_DVB is not set | ||
1022 | # CONFIG_USB_DABUSB is not set | ||
1023 | |||
1024 | # | ||
1025 | # Graphics support | ||
1026 | # | ||
1027 | CONFIG_FB=y | ||
1028 | CONFIG_FB_CFB_FILLRECT=y | ||
1029 | CONFIG_FB_CFB_COPYAREA=y | ||
1030 | CONFIG_FB_CFB_IMAGEBLIT=y | ||
1031 | # CONFIG_FB_MACMODES is not set | ||
1032 | CONFIG_FB_FIRMWARE_EDID=y | ||
1033 | # CONFIG_FB_MODE_HELPERS is not set | ||
1034 | # CONFIG_FB_TILEBLITTING is not set | ||
1035 | # CONFIG_FB_S1D13XXX is not set | ||
1036 | CONFIG_FB_PXA=y | ||
1037 | # CONFIG_FB_PXA_PARAMETERS is not set | ||
1038 | # CONFIG_FB_VIRTUAL is not set | ||
1039 | |||
1040 | # | ||
1041 | # Console display driver support | ||
1042 | # | ||
1043 | # CONFIG_VGA_CONSOLE is not set | ||
1044 | CONFIG_DUMMY_CONSOLE=y | ||
1045 | CONFIG_FRAMEBUFFER_CONSOLE=y | ||
1046 | CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y | ||
1047 | CONFIG_FONTS=y | ||
1048 | CONFIG_FONT_8x8=y | ||
1049 | CONFIG_FONT_8x16=y | ||
1050 | # CONFIG_FONT_6x11 is not set | ||
1051 | # CONFIG_FONT_7x14 is not set | ||
1052 | # CONFIG_FONT_PEARL_8x8 is not set | ||
1053 | # CONFIG_FONT_ACORN_8x8 is not set | ||
1054 | # CONFIG_FONT_MINI_4x6 is not set | ||
1055 | # CONFIG_FONT_SUN8x16 is not set | ||
1056 | # CONFIG_FONT_SUN12x22 is not set | ||
1057 | # CONFIG_FONT_10x18 is not set | ||
1058 | |||
1059 | # | ||
1060 | # Logo configuration | ||
1061 | # | ||
1062 | CONFIG_LOGO=y | ||
1063 | CONFIG_LOGO_LINUX_MONO=y | ||
1064 | CONFIG_LOGO_LINUX_VGA16=y | ||
1065 | CONFIG_LOGO_LINUX_CLUT224=y | ||
1066 | CONFIG_BACKLIGHT_LCD_SUPPORT=y | ||
1067 | CONFIG_BACKLIGHT_CLASS_DEVICE=y | ||
1068 | CONFIG_BACKLIGHT_DEVICE=y | ||
1069 | CONFIG_LCD_CLASS_DEVICE=y | ||
1070 | CONFIG_LCD_DEVICE=y | ||
1071 | |||
1072 | # | ||
1073 | # Sound | ||
1074 | # | ||
1075 | CONFIG_SOUND=y | ||
1076 | |||
1077 | # | ||
1078 | # Advanced Linux Sound Architecture | ||
1079 | # | ||
1080 | CONFIG_SND=y | ||
1081 | CONFIG_SND_TIMER=y | ||
1082 | CONFIG_SND_PCM=y | ||
1083 | CONFIG_SND_HWDEP=m | ||
1084 | CONFIG_SND_RAWMIDI=m | ||
1085 | CONFIG_SND_SEQUENCER=m | ||
1086 | # CONFIG_SND_SEQ_DUMMY is not set | ||
1087 | CONFIG_SND_OSSEMUL=y | ||
1088 | CONFIG_SND_MIXER_OSS=y | ||
1089 | CONFIG_SND_PCM_OSS=y | ||
1090 | CONFIG_SND_PCM_OSS_PLUGINS=y | ||
1091 | # CONFIG_SND_SEQUENCER_OSS is not set | ||
1092 | # CONFIG_SND_DYNAMIC_MINORS is not set | ||
1093 | CONFIG_SND_SUPPORT_OLD_API=y | ||
1094 | CONFIG_SND_VERBOSE_PROCFS=y | ||
1095 | CONFIG_SND_VERBOSE_PRINTK=y | ||
1096 | # CONFIG_SND_DEBUG is not set | ||
1097 | |||
1098 | # | ||
1099 | # Generic devices | ||
1100 | # | ||
1101 | CONFIG_SND_AC97_CODEC=y | ||
1102 | CONFIG_SND_AC97_BUS=y | ||
1103 | # CONFIG_SND_DUMMY is not set | ||
1104 | # CONFIG_SND_VIRMIDI is not set | ||
1105 | # CONFIG_SND_MTPAV is not set | ||
1106 | # CONFIG_SND_SERIAL_U16550 is not set | ||
1107 | # CONFIG_SND_MPU401 is not set | ||
1108 | |||
1109 | # | ||
1110 | # ALSA ARM devices | ||
1111 | # | ||
1112 | CONFIG_SND_PXA2XX_PCM=y | ||
1113 | CONFIG_SND_PXA2XX_AC97=y | ||
1114 | |||
1115 | # | ||
1116 | # USB devices | ||
1117 | # | ||
1118 | CONFIG_SND_USB_AUDIO=m | ||
1119 | |||
1120 | # | ||
1121 | # PCMCIA devices | ||
1122 | # | ||
1123 | # CONFIG_SND_VXPOCKET is not set | ||
1124 | # CONFIG_SND_PDAUDIOCF is not set | ||
1125 | |||
1126 | # | ||
1127 | # Open Sound System | ||
1128 | # | ||
1129 | # CONFIG_SOUND_PRIME is not set | ||
1130 | |||
1131 | # | ||
1132 | # USB support | ||
1133 | # | ||
1134 | CONFIG_USB_ARCH_HAS_HCD=y | ||
1135 | CONFIG_USB_ARCH_HAS_OHCI=y | ||
1136 | # CONFIG_USB_ARCH_HAS_EHCI is not set | ||
1137 | CONFIG_USB=y | ||
1138 | # CONFIG_USB_DEBUG is not set | ||
1139 | |||
1140 | # | ||
1141 | # Miscellaneous USB options | ||
1142 | # | ||
1143 | CONFIG_USB_DEVICEFS=y | ||
1144 | # CONFIG_USB_BANDWIDTH is not set | ||
1145 | # CONFIG_USB_DYNAMIC_MINORS is not set | ||
1146 | # CONFIG_USB_SUSPEND is not set | ||
1147 | # CONFIG_USB_OTG is not set | ||
1148 | |||
1149 | # | ||
1150 | # USB Host Controller Drivers | ||
1151 | # | ||
1152 | # CONFIG_USB_ISP116X_HCD is not set | ||
1153 | CONFIG_USB_OHCI_HCD=y | ||
1154 | # CONFIG_USB_OHCI_BIG_ENDIAN is not set | ||
1155 | CONFIG_USB_OHCI_LITTLE_ENDIAN=y | ||
1156 | # CONFIG_USB_SL811_HCD is not set | ||
1157 | |||
1158 | # | ||
1159 | # USB Device Class drivers | ||
1160 | # | ||
1161 | # CONFIG_USB_ACM is not set | ||
1162 | # CONFIG_USB_PRINTER is not set | ||
1163 | |||
1164 | # | ||
1165 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' | ||
1166 | # | ||
1167 | |||
1168 | # | ||
1169 | # may also be needed; see USB_STORAGE Help for more information | ||
1170 | # | ||
1171 | CONFIG_USB_STORAGE=m | ||
1172 | # CONFIG_USB_STORAGE_DEBUG is not set | ||
1173 | # CONFIG_USB_STORAGE_DATAFAB is not set | ||
1174 | # CONFIG_USB_STORAGE_FREECOM is not set | ||
1175 | # CONFIG_USB_STORAGE_ISD200 is not set | ||
1176 | # CONFIG_USB_STORAGE_DPCM is not set | ||
1177 | # CONFIG_USB_STORAGE_USBAT is not set | ||
1178 | # CONFIG_USB_STORAGE_SDDR09 is not set | ||
1179 | # CONFIG_USB_STORAGE_SDDR55 is not set | ||
1180 | # CONFIG_USB_STORAGE_JUMPSHOT is not set | ||
1181 | # CONFIG_USB_STORAGE_ALAUDA is not set | ||
1182 | # CONFIG_USB_LIBUSUAL is not set | ||
1183 | |||
1184 | # | ||
1185 | # USB Input Devices | ||
1186 | # | ||
1187 | CONFIG_USB_HID=m | ||
1188 | CONFIG_USB_HIDINPUT=y | ||
1189 | # CONFIG_USB_HIDINPUT_POWERBOOK is not set | ||
1190 | # CONFIG_HID_FF is not set | ||
1191 | # CONFIG_USB_HIDDEV is not set | ||
1192 | |||
1193 | # | ||
1194 | # USB HID Boot Protocol drivers | ||
1195 | # | ||
1196 | # CONFIG_USB_KBD is not set | ||
1197 | # CONFIG_USB_MOUSE is not set | ||
1198 | # CONFIG_USB_AIPTEK is not set | ||
1199 | # CONFIG_USB_WACOM is not set | ||
1200 | # CONFIG_USB_ACECAD is not set | ||
1201 | # CONFIG_USB_KBTAB is not set | ||
1202 | # CONFIG_USB_POWERMATE is not set | ||
1203 | CONFIG_USB_TOUCHSCREEN=m | ||
1204 | # CONFIG_USB_TOUCHSCREEN_EGALAX is not set | ||
1205 | # CONFIG_USB_TOUCHSCREEN_PANJIT is not set | ||
1206 | # CONFIG_USB_TOUCHSCREEN_3M is not set | ||
1207 | # CONFIG_USB_TOUCHSCREEN_ITM is not set | ||
1208 | # CONFIG_USB_YEALINK is not set | ||
1209 | # CONFIG_USB_XPAD is not set | ||
1210 | # CONFIG_USB_ATI_REMOTE is not set | ||
1211 | # CONFIG_USB_ATI_REMOTE2 is not set | ||
1212 | # CONFIG_USB_KEYSPAN_REMOTE is not set | ||
1213 | # CONFIG_USB_APPLETOUCH is not set | ||
1214 | |||
1215 | # | ||
1216 | # USB Imaging devices | ||
1217 | # | ||
1218 | # CONFIG_USB_MDC800 is not set | ||
1219 | # CONFIG_USB_MICROTEK is not set | ||
1220 | |||
1221 | # | ||
1222 | # USB Network Adapters | ||
1223 | # | ||
1224 | # CONFIG_USB_CATC is not set | ||
1225 | # CONFIG_USB_KAWETH is not set | ||
1226 | # CONFIG_USB_PEGASUS is not set | ||
1227 | # CONFIG_USB_RTL8150 is not set | ||
1228 | # CONFIG_USB_USBNET is not set | ||
1229 | # CONFIG_USB_ZD1201 is not set | ||
1230 | CONFIG_USB_MON=y | ||
1231 | |||
1232 | # | ||
1233 | # USB port drivers | ||
1234 | # | ||
1235 | |||
1236 | # | ||
1237 | # USB Serial Converter support | ||
1238 | # | ||
1239 | # CONFIG_USB_SERIAL is not set | ||
1240 | |||
1241 | # | ||
1242 | # USB Miscellaneous drivers | ||
1243 | # | ||
1244 | # CONFIG_USB_EMI62 is not set | ||
1245 | # CONFIG_USB_EMI26 is not set | ||
1246 | # CONFIG_USB_AUERSWALD is not set | ||
1247 | # CONFIG_USB_RIO500 is not set | ||
1248 | # CONFIG_USB_LEGOTOWER is not set | ||
1249 | # CONFIG_USB_LCD is not set | ||
1250 | # CONFIG_USB_LED is not set | ||
1251 | # CONFIG_USB_CYTHERM is not set | ||
1252 | # CONFIG_USB_PHIDGETKIT is not set | ||
1253 | # CONFIG_USB_PHIDGETSERVO is not set | ||
1254 | # CONFIG_USB_IDMOUSE is not set | ||
1255 | # CONFIG_USB_LD is not set | ||
1256 | # CONFIG_USB_TEST is not set | ||
1257 | |||
1258 | # | ||
1259 | # USB DSL modem support | ||
1260 | # | ||
1261 | |||
1262 | # | ||
1263 | # USB Gadget Support | ||
1264 | # | ||
1265 | CONFIG_USB_GADGET=y | ||
1266 | # CONFIG_USB_GADGET_DEBUG_FILES is not set | ||
1267 | CONFIG_USB_GADGET_SELECTED=y | ||
1268 | # CONFIG_USB_GADGET_NET2280 is not set | ||
1269 | # CONFIG_USB_GADGET_PXA2XX is not set | ||
1270 | # CONFIG_USB_GADGET_GOKU is not set | ||
1271 | # CONFIG_USB_GADGET_LH7A40X is not set | ||
1272 | # CONFIG_USB_GADGET_OMAP is not set | ||
1273 | # CONFIG_USB_GADGET_AT91 is not set | ||
1274 | CONFIG_USB_GADGET_DUMMY_HCD=y | ||
1275 | CONFIG_USB_DUMMY_HCD=y | ||
1276 | CONFIG_USB_GADGET_DUALSPEED=y | ||
1277 | # CONFIG_USB_ZERO is not set | ||
1278 | CONFIG_USB_ETH=m | ||
1279 | CONFIG_USB_ETH_RNDIS=y | ||
1280 | CONFIG_USB_GADGETFS=m | ||
1281 | CONFIG_USB_FILE_STORAGE=m | ||
1282 | # CONFIG_USB_FILE_STORAGE_TEST is not set | ||
1283 | CONFIG_USB_G_SERIAL=m | ||
1284 | |||
1285 | # | ||
1286 | # MMC/SD Card support | ||
1287 | # | ||
1288 | CONFIG_MMC=y | ||
1289 | # CONFIG_MMC_DEBUG is not set | ||
1290 | CONFIG_MMC_BLOCK=y | ||
1291 | CONFIG_MMC_PXA=y | ||
1292 | |||
1293 | # | ||
1294 | # Real Time Clock | ||
1295 | # | ||
1296 | CONFIG_RTC_LIB=y | ||
1297 | CONFIG_RTC_CLASS=y | ||
1298 | CONFIG_RTC_HCTOSYS=y | ||
1299 | CONFIG_RTC_HCTOSYS_DEVICE="rtc0" | ||
1300 | |||
1301 | # | ||
1302 | # RTC interfaces | ||
1303 | # | ||
1304 | CONFIG_RTC_INTF_SYSFS=y | ||
1305 | CONFIG_RTC_INTF_PROC=y | ||
1306 | CONFIG_RTC_INTF_DEV=y | ||
1307 | |||
1308 | # | ||
1309 | # RTC drivers | ||
1310 | # | ||
1311 | # CONFIG_RTC_DRV_X1205 is not set | ||
1312 | # CONFIG_RTC_DRV_DS1672 is not set | ||
1313 | # CONFIG_RTC_DRV_PCF8563 is not set | ||
1314 | # CONFIG_RTC_DRV_RS5C372 is not set | ||
1315 | # CONFIG_RTC_DRV_M48T86 is not set | ||
1316 | CONFIG_RTC_DRV_SA1100=y | ||
1317 | # CONFIG_RTC_DRV_TEST is not set | ||
1318 | |||
1319 | # | ||
1320 | # File systems | ||
1321 | # | ||
1322 | CONFIG_EXT2_FS=y | ||
1323 | CONFIG_EXT2_FS_XATTR=y | ||
1324 | CONFIG_EXT2_FS_POSIX_ACL=y | ||
1325 | CONFIG_EXT2_FS_SECURITY=y | ||
1326 | # CONFIG_EXT2_FS_XIP is not set | ||
1327 | CONFIG_EXT3_FS=y | ||
1328 | CONFIG_EXT3_FS_XATTR=y | ||
1329 | CONFIG_EXT3_FS_POSIX_ACL=y | ||
1330 | CONFIG_EXT3_FS_SECURITY=y | ||
1331 | CONFIG_JBD=y | ||
1332 | # CONFIG_JBD_DEBUG is not set | ||
1333 | CONFIG_FS_MBCACHE=y | ||
1334 | # CONFIG_REISERFS_FS is not set | ||
1335 | # CONFIG_JFS_FS is not set | ||
1336 | CONFIG_FS_POSIX_ACL=y | ||
1337 | # CONFIG_XFS_FS is not set | ||
1338 | # CONFIG_OCFS2_FS is not set | ||
1339 | # CONFIG_MINIX_FS is not set | ||
1340 | # CONFIG_ROMFS_FS is not set | ||
1341 | CONFIG_INOTIFY=y | ||
1342 | # CONFIG_QUOTA is not set | ||
1343 | CONFIG_DNOTIFY=y | ||
1344 | # CONFIG_AUTOFS_FS is not set | ||
1345 | CONFIG_AUTOFS4_FS=y | ||
1346 | # CONFIG_FUSE_FS is not set | ||
1347 | |||
1348 | # | ||
1349 | # CD-ROM/DVD Filesystems | ||
1350 | # | ||
1351 | # CONFIG_ISO9660_FS is not set | ||
1352 | # CONFIG_UDF_FS is not set | ||
1353 | |||
1354 | # | ||
1355 | # DOS/FAT/NT Filesystems | ||
1356 | # | ||
1357 | CONFIG_FAT_FS=m | ||
1358 | CONFIG_MSDOS_FS=m | ||
1359 | CONFIG_VFAT_FS=m | ||
1360 | CONFIG_FAT_DEFAULT_CODEPAGE=437 | ||
1361 | CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-15" | ||
1362 | # CONFIG_NTFS_FS is not set | ||
1363 | |||
1364 | # | ||
1365 | # Pseudo filesystems | ||
1366 | # | ||
1367 | CONFIG_PROC_FS=y | ||
1368 | CONFIG_SYSFS=y | ||
1369 | CONFIG_TMPFS=y | ||
1370 | # CONFIG_HUGETLB_PAGE is not set | ||
1371 | CONFIG_RAMFS=y | ||
1372 | # CONFIG_CONFIGFS_FS is not set | ||
1373 | |||
1374 | # | ||
1375 | # Miscellaneous filesystems | ||
1376 | # | ||
1377 | # CONFIG_ADFS_FS is not set | ||
1378 | # CONFIG_AFFS_FS is not set | ||
1379 | # CONFIG_HFS_FS is not set | ||
1380 | # CONFIG_HFSPLUS_FS is not set | ||
1381 | # CONFIG_BEFS_FS is not set | ||
1382 | # CONFIG_BFS_FS is not set | ||
1383 | # CONFIG_EFS_FS is not set | ||
1384 | CONFIG_JFFS_FS=y | ||
1385 | CONFIG_JFFS_FS_VERBOSE=0 | ||
1386 | CONFIG_JFFS_PROC_FS=y | ||
1387 | CONFIG_JFFS2_FS=y | ||
1388 | CONFIG_JFFS2_FS_DEBUG=0 | ||
1389 | CONFIG_JFFS2_FS_WRITEBUFFER=y | ||
1390 | # CONFIG_JFFS2_SUMMARY is not set | ||
1391 | CONFIG_JFFS2_COMPRESSION_OPTIONS=y | ||
1392 | CONFIG_JFFS2_ZLIB=y | ||
1393 | CONFIG_JFFS2_RTIME=y | ||
1394 | # CONFIG_JFFS2_RUBIN is not set | ||
1395 | # CONFIG_JFFS2_CMODE_NONE is not set | ||
1396 | CONFIG_JFFS2_CMODE_PRIORITY=y | ||
1397 | # CONFIG_JFFS2_CMODE_SIZE is not set | ||
1398 | # CONFIG_CRAMFS is not set | ||
1399 | # CONFIG_VXFS_FS is not set | ||
1400 | # CONFIG_HPFS_FS is not set | ||
1401 | # CONFIG_QNX4FS_FS is not set | ||
1402 | # CONFIG_SYSV_FS is not set | ||
1403 | # CONFIG_UFS_FS is not set | ||
1404 | |||
1405 | # | ||
1406 | # Network File Systems | ||
1407 | # | ||
1408 | CONFIG_NFS_FS=y | ||
1409 | CONFIG_NFS_V3=y | ||
1410 | CONFIG_NFS_V3_ACL=y | ||
1411 | CONFIG_NFS_V4=y | ||
1412 | # CONFIG_NFS_DIRECTIO is not set | ||
1413 | CONFIG_NFSD=y | ||
1414 | CONFIG_NFSD_V2_ACL=y | ||
1415 | CONFIG_NFSD_V3=y | ||
1416 | CONFIG_NFSD_V3_ACL=y | ||
1417 | CONFIG_NFSD_V4=y | ||
1418 | CONFIG_NFSD_TCP=y | ||
1419 | CONFIG_ROOT_NFS=y | ||
1420 | CONFIG_LOCKD=y | ||
1421 | CONFIG_LOCKD_V4=y | ||
1422 | CONFIG_EXPORTFS=y | ||
1423 | CONFIG_NFS_ACL_SUPPORT=y | ||
1424 | CONFIG_NFS_COMMON=y | ||
1425 | CONFIG_SUNRPC=y | ||
1426 | CONFIG_SUNRPC_GSS=y | ||
1427 | CONFIG_RPCSEC_GSS_KRB5=y | ||
1428 | # CONFIG_RPCSEC_GSS_SPKM3 is not set | ||
1429 | CONFIG_SMB_FS=m | ||
1430 | # CONFIG_SMB_NLS_DEFAULT is not set | ||
1431 | CONFIG_CIFS=m | ||
1432 | # CONFIG_CIFS_STATS is not set | ||
1433 | # CONFIG_CIFS_XATTR is not set | ||
1434 | # CONFIG_CIFS_EXPERIMENTAL is not set | ||
1435 | # CONFIG_NCP_FS is not set | ||
1436 | # CONFIG_CODA_FS is not set | ||
1437 | # CONFIG_AFS_FS is not set | ||
1438 | # CONFIG_9P_FS is not set | ||
1439 | |||
1440 | # | ||
1441 | # Partition Types | ||
1442 | # | ||
1443 | CONFIG_PARTITION_ADVANCED=y | ||
1444 | # CONFIG_ACORN_PARTITION is not set | ||
1445 | # CONFIG_OSF_PARTITION is not set | ||
1446 | # CONFIG_AMIGA_PARTITION is not set | ||
1447 | # CONFIG_ATARI_PARTITION is not set | ||
1448 | # CONFIG_MAC_PARTITION is not set | ||
1449 | CONFIG_MSDOS_PARTITION=y | ||
1450 | # CONFIG_BSD_DISKLABEL is not set | ||
1451 | # CONFIG_MINIX_SUBPARTITION is not set | ||
1452 | # CONFIG_SOLARIS_X86_PARTITION is not set | ||
1453 | # CONFIG_UNIXWARE_DISKLABEL is not set | ||
1454 | CONFIG_LDM_PARTITION=y | ||
1455 | # CONFIG_LDM_DEBUG is not set | ||
1456 | # CONFIG_SGI_PARTITION is not set | ||
1457 | # CONFIG_ULTRIX_PARTITION is not set | ||
1458 | # CONFIG_SUN_PARTITION is not set | ||
1459 | # CONFIG_KARMA_PARTITION is not set | ||
1460 | # CONFIG_EFI_PARTITION is not set | ||
1461 | |||
1462 | # | ||
1463 | # Native Language Support | ||
1464 | # | ||
1465 | CONFIG_NLS=y | ||
1466 | CONFIG_NLS_DEFAULT="iso8859-15" | ||
1467 | CONFIG_NLS_CODEPAGE_437=y | ||
1468 | # CONFIG_NLS_CODEPAGE_737 is not set | ||
1469 | # CONFIG_NLS_CODEPAGE_775 is not set | ||
1470 | CONFIG_NLS_CODEPAGE_850=y | ||
1471 | # CONFIG_NLS_CODEPAGE_852 is not set | ||
1472 | # CONFIG_NLS_CODEPAGE_855 is not set | ||
1473 | # CONFIG_NLS_CODEPAGE_857 is not set | ||
1474 | # CONFIG_NLS_CODEPAGE_860 is not set | ||
1475 | # CONFIG_NLS_CODEPAGE_861 is not set | ||
1476 | # CONFIG_NLS_CODEPAGE_862 is not set | ||
1477 | # CONFIG_NLS_CODEPAGE_863 is not set | ||
1478 | # CONFIG_NLS_CODEPAGE_864 is not set | ||
1479 | # CONFIG_NLS_CODEPAGE_865 is not set | ||
1480 | # CONFIG_NLS_CODEPAGE_866 is not set | ||
1481 | # CONFIG_NLS_CODEPAGE_869 is not set | ||
1482 | # CONFIG_NLS_CODEPAGE_936 is not set | ||
1483 | # CONFIG_NLS_CODEPAGE_950 is not set | ||
1484 | # CONFIG_NLS_CODEPAGE_932 is not set | ||
1485 | # CONFIG_NLS_CODEPAGE_949 is not set | ||
1486 | # CONFIG_NLS_CODEPAGE_874 is not set | ||
1487 | # CONFIG_NLS_ISO8859_8 is not set | ||
1488 | # CONFIG_NLS_CODEPAGE_1250 is not set | ||
1489 | # CONFIG_NLS_CODEPAGE_1251 is not set | ||
1490 | CONFIG_NLS_ASCII=y | ||
1491 | CONFIG_NLS_ISO8859_1=m | ||
1492 | # CONFIG_NLS_ISO8859_2 is not set | ||
1493 | # CONFIG_NLS_ISO8859_3 is not set | ||
1494 | # CONFIG_NLS_ISO8859_4 is not set | ||
1495 | # CONFIG_NLS_ISO8859_5 is not set | ||
1496 | # CONFIG_NLS_ISO8859_6 is not set | ||
1497 | # CONFIG_NLS_ISO8859_7 is not set | ||
1498 | # CONFIG_NLS_ISO8859_9 is not set | ||
1499 | # CONFIG_NLS_ISO8859_13 is not set | ||
1500 | # CONFIG_NLS_ISO8859_14 is not set | ||
1501 | CONFIG_NLS_ISO8859_15=m | ||
1502 | # CONFIG_NLS_KOI8_R is not set | ||
1503 | # CONFIG_NLS_KOI8_U is not set | ||
1504 | CONFIG_NLS_UTF8=m | ||
1505 | |||
1506 | # | ||
1507 | # Profiling support | ||
1508 | # | ||
1509 | CONFIG_PROFILING=y | ||
1510 | CONFIG_OPROFILE=y | ||
1511 | |||
1512 | # | ||
1513 | # Kernel hacking | ||
1514 | # | ||
1515 | # CONFIG_PRINTK_TIME is not set | ||
1516 | CONFIG_MAGIC_SYSRQ=y | ||
1517 | # CONFIG_DEBUG_KERNEL is not set | ||
1518 | CONFIG_LOG_BUF_SHIFT=14 | ||
1519 | # CONFIG_DEBUG_BUGVERBOSE is not set | ||
1520 | # CONFIG_DEBUG_FS is not set | ||
1521 | CONFIG_FRAME_POINTER=y | ||
1522 | # CONFIG_UNWIND_INFO is not set | ||
1523 | CONFIG_DEBUG_USER=y | ||
1524 | |||
1525 | # | ||
1526 | # Security options | ||
1527 | # | ||
1528 | CONFIG_KEYS=y | ||
1529 | CONFIG_KEYS_DEBUG_PROC_KEYS=y | ||
1530 | CONFIG_SECURITY=y | ||
1531 | # CONFIG_SECURITY_NETWORK is not set | ||
1532 | CONFIG_SECURITY_CAPABILITIES=y | ||
1533 | # CONFIG_SECURITY_ROOTPLUG is not set | ||
1534 | # CONFIG_SECURITY_SECLVL is not set | ||
1535 | |||
1536 | # | ||
1537 | # Cryptographic options | ||
1538 | # | ||
1539 | CONFIG_CRYPTO=y | ||
1540 | # CONFIG_CRYPTO_HMAC is not set | ||
1541 | # CONFIG_CRYPTO_NULL is not set | ||
1542 | CONFIG_CRYPTO_MD4=y | ||
1543 | CONFIG_CRYPTO_MD5=y | ||
1544 | CONFIG_CRYPTO_SHA1=m | ||
1545 | CONFIG_CRYPTO_SHA256=m | ||
1546 | CONFIG_CRYPTO_SHA512=m | ||
1547 | # CONFIG_CRYPTO_WP512 is not set | ||
1548 | # CONFIG_CRYPTO_TGR192 is not set | ||
1549 | CONFIG_CRYPTO_DES=y | ||
1550 | # CONFIG_CRYPTO_BLOWFISH is not set | ||
1551 | # CONFIG_CRYPTO_TWOFISH is not set | ||
1552 | # CONFIG_CRYPTO_SERPENT is not set | ||
1553 | CONFIG_CRYPTO_AES=m | ||
1554 | # CONFIG_CRYPTO_CAST5 is not set | ||
1555 | # CONFIG_CRYPTO_CAST6 is not set | ||
1556 | # CONFIG_CRYPTO_TEA is not set | ||
1557 | CONFIG_CRYPTO_ARC4=m | ||
1558 | # CONFIG_CRYPTO_KHAZAD is not set | ||
1559 | # CONFIG_CRYPTO_ANUBIS is not set | ||
1560 | CONFIG_CRYPTO_DEFLATE=m | ||
1561 | CONFIG_CRYPTO_MICHAEL_MIC=m | ||
1562 | CONFIG_CRYPTO_CRC32C=y | ||
1563 | # CONFIG_CRYPTO_TEST is not set | ||
1564 | |||
1565 | # | ||
1566 | # Hardware crypto devices | ||
1567 | # | ||
1568 | |||
1569 | # | ||
1570 | # Library routines | ||
1571 | # | ||
1572 | CONFIG_CRC_CCITT=y | ||
1573 | CONFIG_CRC16=y | ||
1574 | CONFIG_CRC32=y | ||
1575 | CONFIG_LIBCRC32C=y | ||
1576 | CONFIG_ZLIB_INFLATE=y | ||
1577 | CONFIG_ZLIB_DEFLATE=y | ||
1578 | CONFIG_REED_SOLOMON=y | ||
1579 | CONFIG_REED_SOLOMON_DEC16=y | ||
diff --git a/arch/arm/kernel/Makefile b/arch/arm/kernel/Makefile index 7cffbaef064b..f0c0cdb1c183 100644 --- a/arch/arm/kernel/Makefile +++ b/arch/arm/kernel/Makefile | |||
@@ -25,7 +25,7 @@ obj-$(CONFIG_OABI_COMPAT) += sys_oabi-compat.o | |||
25 | obj-$(CONFIG_CRUNCH) += crunch.o crunch-bits.o | 25 | obj-$(CONFIG_CRUNCH) += crunch.o crunch-bits.o |
26 | AFLAGS_crunch-bits.o := -Wa,-mcpu=ep9312 | 26 | AFLAGS_crunch-bits.o := -Wa,-mcpu=ep9312 |
27 | 27 | ||
28 | obj-$(CONFIG_IWMMXT) += iwmmxt.o | 28 | obj-$(CONFIG_IWMMXT) += iwmmxt.o iwmmxt-notifier.o |
29 | AFLAGS_iwmmxt.o := -Wa,-mcpu=iwmmxt | 29 | AFLAGS_iwmmxt.o := -Wa,-mcpu=iwmmxt |
30 | 30 | ||
31 | ifneq ($(CONFIG_ARCH_EBSA110),y) | 31 | ifneq ($(CONFIG_ARCH_EBSA110),y) |
diff --git a/arch/arm/kernel/asm-offsets.c b/arch/arm/kernel/asm-offsets.c index 447ede5143a8..cc2d58d028e1 100644 --- a/arch/arm/kernel/asm-offsets.c +++ b/arch/arm/kernel/asm-offsets.c | |||
@@ -105,6 +105,7 @@ int main(void) | |||
105 | BLANK(); | 105 | BLANK(); |
106 | DEFINE(PROC_INFO_SZ, sizeof(struct proc_info_list)); | 106 | DEFINE(PROC_INFO_SZ, sizeof(struct proc_info_list)); |
107 | DEFINE(PROCINFO_INITFUNC, offsetof(struct proc_info_list, __cpu_flush)); | 107 | DEFINE(PROCINFO_INITFUNC, offsetof(struct proc_info_list, __cpu_flush)); |
108 | DEFINE(PROCINFO_MMUFLAGS, offsetof(struct proc_info_list, __cpu_mmu_flags)); | 108 | DEFINE(PROCINFO_MM_MMUFLAGS, offsetof(struct proc_info_list, __cpu_mm_mmu_flags)); |
109 | DEFINE(PROCINFO_IO_MMUFLAGS, offsetof(struct proc_info_list, __cpu_io_mmu_flags)); | ||
109 | return 0; | 110 | return 0; |
110 | } | 111 | } |
diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S index 26f197afd204..7ea5f01dfc7b 100644 --- a/arch/arm/kernel/entry-armv.S +++ b/arch/arm/kernel/entry-armv.S | |||
@@ -589,9 +589,7 @@ ENTRY(__switch_to) | |||
589 | #ifdef CONFIG_MMU | 589 | #ifdef CONFIG_MMU |
590 | mcr p15, 0, r6, c3, c0, 0 @ Set domain register | 590 | mcr p15, 0, r6, c3, c0, 0 @ Set domain register |
591 | #endif | 591 | #endif |
592 | #if defined(CONFIG_IWMMXT) | 592 | #if defined(CONFIG_CPU_XSCALE) && !defined(CONFIG_IWMMXT) |
593 | bl iwmmxt_task_switch | ||
594 | #elif defined(CONFIG_CPU_XSCALE) | ||
595 | add r4, r2, #TI_CPU_DOMAIN + 40 @ cpu_context_save->extra | 593 | add r4, r2, #TI_CPU_DOMAIN + 40 @ cpu_context_save->extra |
596 | ldmib r4, {r4, r5} | 594 | ldmib r4, {r4, r5} |
597 | mar acc0, r4, r5 | 595 | mar acc0, r4, r5 |
diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S index 518b80cd87de..2242f5f7cb7d 100644 --- a/arch/arm/kernel/head.S +++ b/arch/arm/kernel/head.S | |||
@@ -220,7 +220,7 @@ __create_page_tables: | |||
220 | teq r0, r6 | 220 | teq r0, r6 |
221 | bne 1b | 221 | bne 1b |
222 | 222 | ||
223 | ldr r7, [r10, #PROCINFO_MMUFLAGS] @ mmuflags | 223 | ldr r7, [r10, #PROCINFO_MM_MMUFLAGS] @ mm_mmuflags |
224 | 224 | ||
225 | /* | 225 | /* |
226 | * Create identity mapping for first MB of kernel to | 226 | * Create identity mapping for first MB of kernel to |
@@ -271,8 +271,7 @@ __create_page_tables: | |||
271 | #endif | 271 | #endif |
272 | 272 | ||
273 | #ifdef CONFIG_DEBUG_LL | 273 | #ifdef CONFIG_DEBUG_LL |
274 | bic r7, r7, #0x0c @ turn off cacheable | 274 | ldr r7, [r10, #PROCINFO_IO_MMUFLAGS] @ io_mmuflags |
275 | @ and bufferable bits | ||
276 | /* | 275 | /* |
277 | * Map in IO space for serial debugging. | 276 | * Map in IO space for serial debugging. |
278 | * This allows debug messages to be output | 277 | * This allows debug messages to be output |
diff --git a/arch/arm/kernel/iwmmxt-notifier.c b/arch/arm/kernel/iwmmxt-notifier.c new file mode 100644 index 000000000000..44a86c33796e --- /dev/null +++ b/arch/arm/kernel/iwmmxt-notifier.c | |||
@@ -0,0 +1,64 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/kernel/iwmmxt-notifier.c | ||
3 | * | ||
4 | * XScale iWMMXt (Concan) context switching and handling | ||
5 | * | ||
6 | * Initial code: | ||
7 | * Copyright (c) 2003, Intel Corporation | ||
8 | * | ||
9 | * Full lazy switching support, optimizations and more, by Nicolas Pitre | ||
10 | * Copyright (c) 2003-2004, MontaVista Software, Inc. | ||
11 | * | ||
12 | * This program is free software; you can redistribute it and/or modify | ||
13 | * it under the terms of the GNU General Public License version 2 as | ||
14 | * published by the Free Software Foundation. | ||
15 | */ | ||
16 | |||
17 | #include <linux/module.h> | ||
18 | #include <linux/config.h> | ||
19 | #include <linux/types.h> | ||
20 | #include <linux/kernel.h> | ||
21 | #include <linux/signal.h> | ||
22 | #include <linux/sched.h> | ||
23 | #include <linux/init.h> | ||
24 | #include <asm/thread_notify.h> | ||
25 | #include <asm/io.h> | ||
26 | |||
27 | static int iwmmxt_do(struct notifier_block *self, unsigned long cmd, void *t) | ||
28 | { | ||
29 | struct thread_info *thread = t; | ||
30 | |||
31 | switch (cmd) { | ||
32 | case THREAD_NOTIFY_FLUSH: | ||
33 | /* | ||
34 | * flush_thread() zeroes thread->fpstate, so no need | ||
35 | * to do anything here. | ||
36 | * | ||
37 | * FALLTHROUGH: Ensure we don't try to overwrite our newly | ||
38 | * initialised state information on the first fault. | ||
39 | */ | ||
40 | |||
41 | case THREAD_NOTIFY_RELEASE: | ||
42 | iwmmxt_task_release(thread); | ||
43 | break; | ||
44 | |||
45 | case THREAD_NOTIFY_SWITCH: | ||
46 | iwmmxt_task_switch(thread); | ||
47 | break; | ||
48 | } | ||
49 | |||
50 | return NOTIFY_DONE; | ||
51 | } | ||
52 | |||
53 | static struct notifier_block iwmmxt_notifier_block = { | ||
54 | .notifier_call = iwmmxt_do, | ||
55 | }; | ||
56 | |||
57 | static int __init iwmmxt_init(void) | ||
58 | { | ||
59 | thread_register_notifier(&iwmmxt_notifier_block); | ||
60 | |||
61 | return 0; | ||
62 | } | ||
63 | |||
64 | late_initcall(iwmmxt_init); | ||
diff --git a/arch/arm/kernel/iwmmxt.S b/arch/arm/kernel/iwmmxt.S index a3bae95e536c..b63b528f22a6 100644 --- a/arch/arm/kernel/iwmmxt.S +++ b/arch/arm/kernel/iwmmxt.S | |||
@@ -271,30 +271,27 @@ ENTRY(iwmmxt_task_restore) | |||
271 | /* | 271 | /* |
272 | * Concan handling on task switch | 272 | * Concan handling on task switch |
273 | * | 273 | * |
274 | * r0 = previous task_struct pointer (must be preserved) | 274 | * r0 = next thread_info pointer |
275 | * r1 = previous thread_info pointer | ||
276 | * r2 = next thread_info pointer (must be preserved) | ||
277 | * | 275 | * |
278 | * Called only from __switch_to with task preemption disabled. | 276 | * Called only from the iwmmxt notifier with task preemption disabled. |
279 | * No need to care about preserving r4 and above. | ||
280 | */ | 277 | */ |
281 | ENTRY(iwmmxt_task_switch) | 278 | ENTRY(iwmmxt_task_switch) |
282 | 279 | ||
283 | mrc p15, 0, r4, c15, c1, 0 | 280 | mrc p15, 0, r1, c15, c1, 0 |
284 | tst r4, #0x3 @ CP0 and CP1 accessible? | 281 | tst r1, #0x3 @ CP0 and CP1 accessible? |
285 | bne 1f @ yes: block them for next task | 282 | bne 1f @ yes: block them for next task |
286 | 283 | ||
287 | ldr r5, =concan_owner | 284 | ldr r2, =concan_owner |
288 | add r6, r2, #TI_IWMMXT_STATE @ get next task Concan save area | 285 | add r3, r0, #TI_IWMMXT_STATE @ get next task Concan save area |
289 | ldr r5, [r5] @ get current Concan owner | 286 | ldr r2, [r2] @ get current Concan owner |
290 | teq r5, r6 @ next task owns it? | 287 | teq r2, r3 @ next task owns it? |
291 | movne pc, lr @ no: leave Concan disabled | 288 | movne pc, lr @ no: leave Concan disabled |
292 | 289 | ||
293 | 1: eor r4, r4, #3 @ flip Concan access | 290 | 1: eor r1, r1, #3 @ flip Concan access |
294 | mcr p15, 0, r4, c15, c1, 0 | 291 | mcr p15, 0, r1, c15, c1, 0 |
295 | 292 | ||
296 | mrc p15, 0, r4, c2, c0, 0 | 293 | mrc p15, 0, r1, c2, c0, 0 |
297 | sub pc, lr, r4, lsr #32 @ cpwait and return | 294 | sub pc, lr, r1, lsr #32 @ cpwait and return |
298 | 295 | ||
299 | /* | 296 | /* |
300 | * Remove Concan ownership of given task | 297 | * Remove Concan ownership of given task |
diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c index c3258b763c5d..3079535afccd 100644 --- a/arch/arm/kernel/process.c +++ b/arch/arm/kernel/process.c | |||
@@ -352,9 +352,6 @@ void flush_thread(void) | |||
352 | memset(&thread->fpstate, 0, sizeof(union fp_state)); | 352 | memset(&thread->fpstate, 0, sizeof(union fp_state)); |
353 | 353 | ||
354 | thread_notify(THREAD_NOTIFY_FLUSH, thread); | 354 | thread_notify(THREAD_NOTIFY_FLUSH, thread); |
355 | #if defined(CONFIG_IWMMXT) | ||
356 | iwmmxt_task_release(thread); | ||
357 | #endif | ||
358 | } | 355 | } |
359 | 356 | ||
360 | void release_thread(struct task_struct *dead_task) | 357 | void release_thread(struct task_struct *dead_task) |
@@ -362,9 +359,6 @@ void release_thread(struct task_struct *dead_task) | |||
362 | struct thread_info *thread = task_thread_info(dead_task); | 359 | struct thread_info *thread = task_thread_info(dead_task); |
363 | 360 | ||
364 | thread_notify(THREAD_NOTIFY_RELEASE, thread); | 361 | thread_notify(THREAD_NOTIFY_RELEASE, thread); |
365 | #if defined(CONFIG_IWMMXT) | ||
366 | iwmmxt_task_release(thread); | ||
367 | #endif | ||
368 | } | 362 | } |
369 | 363 | ||
370 | asmlinkage void ret_from_fork(void) __asm__("ret_from_fork"); | 364 | asmlinkage void ret_from_fork(void) __asm__("ret_from_fork"); |
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c index 7447a1987322..7d6a516c0b9f 100644 --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c | |||
@@ -344,9 +344,9 @@ static void __init setup_processor(void) | |||
344 | cpu_cache = *list->cache; | 344 | cpu_cache = *list->cache; |
345 | #endif | 345 | #endif |
346 | 346 | ||
347 | printk("CPU: %s [%08x] revision %d (ARMv%s)\n", | 347 | printk("CPU: %s [%08x] revision %d (ARMv%s), cr=%08x\n", |
348 | cpu_name, processor_id, (int)processor_id & 15, | 348 | cpu_name, processor_id, (int)processor_id & 15, |
349 | proc_arch[cpu_architecture()]); | 349 | proc_arch[cpu_architecture()], cr_alignment); |
350 | 350 | ||
351 | sprintf(system_utsname.machine, "%s%c", list->arch_name, ENDIANNESS); | 351 | sprintf(system_utsname.machine, "%s%c", list->arch_name, ENDIANNESS); |
352 | sprintf(elf_platform, "%s%c", list->elf_name, ENDIANNESS); | 352 | sprintf(elf_platform, "%s%c", list->elf_name, ENDIANNESS); |
diff --git a/arch/arm/mach-at91rm9200/Kconfig b/arch/arm/mach-at91rm9200/Kconfig index 70d402f76ce5..2f85e8693b1b 100644 --- a/arch/arm/mach-at91rm9200/Kconfig +++ b/arch/arm/mach-at91rm9200/Kconfig | |||
@@ -1,6 +1,21 @@ | |||
1 | if ARCH_AT91RM9200 | 1 | if ARCH_AT91 |
2 | |||
3 | menu "Atmel AT91 System-on-Chip" | ||
4 | |||
5 | comment "Atmel AT91 Processors" | ||
6 | |||
7 | config ARCH_AT91RM9200 | ||
8 | bool "AT91RM9200" | ||
2 | 9 | ||
3 | menu "AT91RM9200 Implementations" | 10 | config ARCH_AT91SAM9260 |
11 | bool "AT91SAM9260" | ||
12 | |||
13 | config ARCH_AT91SAM9261 | ||
14 | bool "AT91SAM9261" | ||
15 | |||
16 | # ---------------------------------------------------------- | ||
17 | |||
18 | if ARCH_AT91RM9200 | ||
4 | 19 | ||
5 | comment "AT91RM9200 Board Type" | 20 | comment "AT91RM9200 Board Type" |
6 | 21 | ||
@@ -8,58 +23,87 @@ config MACH_ONEARM | |||
8 | bool "Ajeco 1ARM Single Board Computer" | 23 | bool "Ajeco 1ARM Single Board Computer" |
9 | depends on ARCH_AT91RM9200 | 24 | depends on ARCH_AT91RM9200 |
10 | help | 25 | help |
11 | Select this if you are using Ajeco's 1ARM Single Board Computer | 26 | Select this if you are using Ajeco's 1ARM Single Board Computer. |
27 | <http://www.ajeco.fi/products.htm> | ||
12 | 28 | ||
13 | config ARCH_AT91RM9200DK | 29 | config ARCH_AT91RM9200DK |
14 | bool "Atmel AT91RM9200-DK Development board" | 30 | bool "Atmel AT91RM9200-DK Development board" |
15 | depends on ARCH_AT91RM9200 | 31 | depends on ARCH_AT91RM9200 |
16 | help | 32 | help |
17 | Select this if you are using Atmel's AT91RM9200-DK Development board | 33 | Select this if you are using Atmel's AT91RM9200-DK Development board. |
34 | (Discontinued) | ||
35 | |||
18 | 36 | ||
19 | config MACH_AT91RM9200EK | 37 | config MACH_AT91RM9200EK |
20 | bool "Atmel AT91RM9200-EK Evaluation Kit" | 38 | bool "Atmel AT91RM9200-EK Evaluation Kit" |
21 | depends on ARCH_AT91RM9200 | 39 | depends on ARCH_AT91RM9200 |
22 | help | 40 | help |
23 | Select this if you are using Atmel's AT91RM9200-EK Evaluation Kit | 41 | Select this if you are using Atmel's AT91RM9200-EK Evaluation Kit. |
42 | <http://www.atmel.com/dyn/products/tools_card.asp?tool_id=3507> | ||
24 | 43 | ||
25 | config MACH_CSB337 | 44 | config MACH_CSB337 |
26 | bool "Cogent CSB337 board" | 45 | bool "Cogent CSB337" |
27 | depends on ARCH_AT91RM9200 | 46 | depends on ARCH_AT91RM9200 |
28 | help | 47 | help |
29 | Select this if you are using Cogent's CSB337 board | 48 | Select this if you are using Cogent's CSB337 board. |
49 | <http://www.cogcomp.com/csb_csb337.htm> | ||
30 | 50 | ||
31 | config MACH_CSB637 | 51 | config MACH_CSB637 |
32 | bool "Cogent CSB637 board" | 52 | bool "Cogent CSB637" |
33 | depends on ARCH_AT91RM9200 | 53 | depends on ARCH_AT91RM9200 |
34 | help | 54 | help |
35 | Select this if you are using Cogent's CSB637 board | 55 | Select this if you are using Cogent's CSB637 board. |
56 | <http://www.cogcomp.com/csb_csb637.htm> | ||
36 | 57 | ||
37 | config MACH_CARMEVA | 58 | config MACH_CARMEVA |
38 | bool "Conitec's ARM&EVA" | 59 | bool "Conitec ARM&EVA" |
39 | depends on ARCH_AT91RM9200 | 60 | depends on ARCH_AT91RM9200 |
40 | help | 61 | help |
41 | Select this if you are using Conitec's AT91RM9200-MCU-Module | 62 | Select this if you are using Conitec's AT91RM9200-MCU-Module. |
63 | <http://www.conitec.net/english/linuxboard.htm> | ||
42 | 64 | ||
43 | config MACH_KB9200 | 65 | config MACH_ATEB9200 |
44 | bool "KwikByte's KB920x" | 66 | bool "Embest ATEB9200" |
45 | depends on ARCH_AT91RM9200 | 67 | depends on ARCH_AT91RM9200 |
46 | help | 68 | help |
47 | Select this if you are using KwikByte's KB920x board | 69 | Select this if you are using Embest's ATEB9200 board. |
70 | <http://www.embedinfo.com/english/product/ATEB9200.asp> | ||
48 | 71 | ||
49 | config MACH_ATEB9200 | 72 | config MACH_KB9200 |
50 | bool "Embest's ATEB9200" | 73 | bool "KwikByte KB920x" |
51 | depends on ARCH_AT91RM9200 | 74 | depends on ARCH_AT91RM9200 |
52 | help | 75 | help |
53 | Select this if you are using Embest's ATEB9200 board | 76 | Select this if you are using KwikByte's KB920x board. |
77 | <http://kwikbyte.com/KB9202_description_new.htm> | ||
54 | 78 | ||
55 | config MACH_KAFA | 79 | config MACH_KAFA |
56 | bool "Sperry-Sun KAFA board" | 80 | bool "Sperry-Sun KAFA board" |
57 | depends on ARCH_AT91RM9200 | 81 | depends on ARCH_AT91RM9200 |
58 | help | 82 | help |
59 | Select this if you are using Sperry-Sun's KAFA board | 83 | Select this if you are using Sperry-Sun's KAFA board. |
84 | |||
85 | endif | ||
86 | |||
87 | # ---------------------------------------------------------- | ||
88 | |||
89 | if ARCH_AT91SAM9260 | ||
90 | |||
91 | comment "AT91SAM9260 Board Type" | ||
92 | |||
93 | endif | ||
94 | |||
95 | # ---------------------------------------------------------- | ||
96 | |||
97 | if ARCH_AT91SAM9261 | ||
98 | |||
99 | comment "AT91SAM9261 Board Type" | ||
100 | |||
101 | endif | ||
102 | |||
60 | 103 | ||
104 | # ---------------------------------------------------------- | ||
61 | 105 | ||
62 | comment "AT91RM9200 Feature Selections" | 106 | comment "AT91 Feature Selections" |
63 | 107 | ||
64 | config AT91_PROGRAMMABLE_CLOCKS | 108 | config AT91_PROGRAMMABLE_CLOCKS |
65 | bool "Programmable Clocks" | 109 | bool "Programmable Clocks" |
diff --git a/arch/arm/mach-at91rm9200/Makefile b/arch/arm/mach-at91rm9200/Makefile index 82db957322df..c174805c24e5 100644 --- a/arch/arm/mach-at91rm9200/Makefile +++ b/arch/arm/mach-at91rm9200/Makefile | |||
@@ -2,14 +2,19 @@ | |||
2 | # Makefile for the linux kernel. | 2 | # Makefile for the linux kernel. |
3 | # | 3 | # |
4 | 4 | ||
5 | obj-y := clock.o irq.o time.o gpio.o common.o devices.o | 5 | obj-y := clock.o irq.o gpio.o devices.o |
6 | obj-m := | 6 | obj-m := |
7 | obj-n := | 7 | obj-n := |
8 | obj- := | 8 | obj- := |
9 | 9 | ||
10 | obj-$(CONFIG_PM) += pm.o | 10 | obj-$(CONFIG_PM) += pm.o |
11 | 11 | ||
12 | # Board-specific support | 12 | # CPU-specific support |
13 | obj-$(CONFIG_ARCH_AT91RM9200) += at91rm9200.o at91rm9200_time.o | ||
14 | obj-$(CONFIG_ARCH_AT91SAM9260) += | ||
15 | obj-$(CONFIG_ARCH_AT91SAM9261) += | ||
16 | |||
17 | # AT91RM9200 Board-specific support | ||
13 | obj-$(CONFIG_MACH_ONEARM) += board-1arm.o | 18 | obj-$(CONFIG_MACH_ONEARM) += board-1arm.o |
14 | obj-$(CONFIG_ARCH_AT91RM9200DK) += board-dk.o | 19 | obj-$(CONFIG_ARCH_AT91RM9200DK) += board-dk.o |
15 | obj-$(CONFIG_MACH_AT91RM9200EK) += board-ek.o | 20 | obj-$(CONFIG_MACH_AT91RM9200EK) += board-ek.o |
@@ -20,6 +25,10 @@ obj-$(CONFIG_MACH_KB9200) += board-kb9202.o | |||
20 | obj-$(CONFIG_MACH_ATEB9200) += board-eb9200.o | 25 | obj-$(CONFIG_MACH_ATEB9200) += board-eb9200.o |
21 | obj-$(CONFIG_MACH_KAFA) += board-kafa.o | 26 | obj-$(CONFIG_MACH_KAFA) += board-kafa.o |
22 | 27 | ||
28 | # AT91SAM9260 board-specific support | ||
29 | |||
30 | # AT91SAM9261 board-specific support | ||
31 | |||
23 | # LEDs support | 32 | # LEDs support |
24 | led-$(CONFIG_ARCH_AT91RM9200DK) += leds.o | 33 | led-$(CONFIG_ARCH_AT91RM9200DK) += leds.o |
25 | led-$(CONFIG_MACH_AT91RM9200EK) += leds.o | 34 | led-$(CONFIG_MACH_AT91RM9200EK) += leds.o |
diff --git a/arch/arm/mach-at91rm9200/common.c b/arch/arm/mach-at91rm9200/at91rm9200.c index cc55f4c28d95..7e1d072bdd80 100644 --- a/arch/arm/mach-at91rm9200/common.c +++ b/arch/arm/mach-at91rm9200/at91rm9200.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * arch/arm/mach-at91rm9200/common.c | 2 | * arch/arm/mach-at91rm9200/at91rm9200.c |
3 | * | 3 | * |
4 | * Copyright (C) 2005 SAN People | 4 | * Copyright (C) 2005 SAN People |
5 | * | 5 | * |
diff --git a/arch/arm/mach-at91rm9200/time.c b/arch/arm/mach-at91rm9200/at91rm9200_time.c index 1f080e6ea509..0aa22650a00f 100644 --- a/arch/arm/mach-at91rm9200/time.c +++ b/arch/arm/mach-at91rm9200/at91rm9200_time.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/arch/arm/mach-at91rm9200/time.c | 2 | * linux/arch/arm/mach-at91rm9200/at91rm9200_time.c |
3 | * | 3 | * |
4 | * Copyright (C) 2003 SAN People | 4 | * Copyright (C) 2003 SAN People |
5 | * Copyright (C) 2003 ATMEL | 5 | * Copyright (C) 2003 ATMEL |
diff --git a/arch/arm/mach-ep93xx/Kconfig b/arch/arm/mach-ep93xx/Kconfig index e15e4c54a253..f1b740083aee 100644 --- a/arch/arm/mach-ep93xx/Kconfig +++ b/arch/arm/mach-ep93xx/Kconfig | |||
@@ -9,12 +9,24 @@ config CRUNCH | |||
9 | 9 | ||
10 | comment "EP93xx Platforms" | 10 | comment "EP93xx Platforms" |
11 | 11 | ||
12 | config MACH_EDB9302 | ||
13 | bool "Support Cirrus Logic EDB9302" | ||
14 | help | ||
15 | Say 'Y' here if you want your kernel to support the Cirrus | ||
16 | Logic EDB9302 Evaluation Board. | ||
17 | |||
12 | config MACH_EDB9315 | 18 | config MACH_EDB9315 |
13 | bool "Support Cirrus Logic EDB9315" | 19 | bool "Support Cirrus Logic EDB9315" |
14 | help | 20 | help |
15 | Say 'Y' here if you want your kernel to support the Cirrus | 21 | Say 'Y' here if you want your kernel to support the Cirrus |
16 | Logic EDB9315 Evaluation Board. | 22 | Logic EDB9315 Evaluation Board. |
17 | 23 | ||
24 | config MACH_EDB9315A | ||
25 | bool "Support Cirrus Logic EDB9315A" | ||
26 | help | ||
27 | Say 'Y' here if you want your kernel to support the Cirrus | ||
28 | Logic EDB9315A Evaluation Board. | ||
29 | |||
18 | config MACH_GESBC9312 | 30 | config MACH_GESBC9312 |
19 | bool "Support Glomation GESBC-9312-sx" | 31 | bool "Support Glomation GESBC-9312-sx" |
20 | help | 32 | help |
diff --git a/arch/arm/mach-ep93xx/Makefile b/arch/arm/mach-ep93xx/Makefile index dfa7e2e8a18b..1f5a6b0487ee 100644 --- a/arch/arm/mach-ep93xx/Makefile +++ b/arch/arm/mach-ep93xx/Makefile | |||
@@ -6,6 +6,8 @@ obj-m := | |||
6 | obj-n := | 6 | obj-n := |
7 | obj- := | 7 | obj- := |
8 | 8 | ||
9 | obj-$(CONFIG_MACH_EDB9302) += edb9302.o | ||
9 | obj-$(CONFIG_MACH_EDB9315) += edb9315.o | 10 | obj-$(CONFIG_MACH_EDB9315) += edb9315.o |
11 | obj-$(CONFIG_MACH_EDB9315A) += edb9315a.o | ||
10 | obj-$(CONFIG_MACH_GESBC9312) += gesbc9312.o | 12 | obj-$(CONFIG_MACH_GESBC9312) += gesbc9312.o |
11 | obj-$(CONFIG_MACH_TS72XX) += ts72xx.o | 13 | obj-$(CONFIG_MACH_TS72XX) += ts72xx.o |
diff --git a/arch/arm/mach-ep93xx/edb9302.c b/arch/arm/mach-ep93xx/edb9302.c new file mode 100644 index 000000000000..62a8efd23256 --- /dev/null +++ b/arch/arm/mach-ep93xx/edb9302.c | |||
@@ -0,0 +1,62 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ep93xx/edb9302.c | ||
3 | * Cirrus Logic EDB9302 support. | ||
4 | * | ||
5 | * Copyright (C) 2006 George Kashperko <george@chas.com.ua> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or (at | ||
10 | * your option) any later version. | ||
11 | */ | ||
12 | |||
13 | #include <linux/config.h> | ||
14 | #include <linux/kernel.h> | ||
15 | #include <linux/init.h> | ||
16 | #include <linux/mm.h> | ||
17 | #include <linux/sched.h> | ||
18 | #include <linux/interrupt.h> | ||
19 | #include <linux/ioport.h> | ||
20 | #include <linux/mtd/physmap.h> | ||
21 | #include <linux/platform_device.h> | ||
22 | #include <asm/io.h> | ||
23 | #include <asm/hardware.h> | ||
24 | #include <asm/mach-types.h> | ||
25 | #include <asm/mach/arch.h> | ||
26 | |||
27 | static struct physmap_flash_data edb9302_flash_data = { | ||
28 | .width = 2, | ||
29 | }; | ||
30 | |||
31 | static struct resource edb9302_flash_resource = { | ||
32 | .start = 0x60000000, | ||
33 | .end = 0x60ffffff, | ||
34 | .flags = IORESOURCE_MEM, | ||
35 | }; | ||
36 | |||
37 | static struct platform_device edb9302_flash = { | ||
38 | .name = "physmap-flash", | ||
39 | .id = 0, | ||
40 | .dev = { | ||
41 | .platform_data = &edb9302_flash_data, | ||
42 | }, | ||
43 | .num_resources = 1, | ||
44 | .resource = &edb9302_flash_resource, | ||
45 | }; | ||
46 | |||
47 | static void __init edb9302_init_machine(void) | ||
48 | { | ||
49 | ep93xx_init_devices(); | ||
50 | platform_device_register(&edb9302_flash); | ||
51 | } | ||
52 | |||
53 | MACHINE_START(EDB9302, "Cirrus Logic EDB9302 Evaluation Board") | ||
54 | /* Maintainer: George Kashperko <george@chas.com.ua> */ | ||
55 | .phys_io = EP93XX_APB_PHYS_BASE, | ||
56 | .io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc, | ||
57 | .boot_params = 0x00000100, | ||
58 | .map_io = ep93xx_map_io, | ||
59 | .init_irq = ep93xx_init_irq, | ||
60 | .timer = &ep93xx_timer, | ||
61 | .init_machine = edb9302_init_machine, | ||
62 | MACHINE_END | ||
diff --git a/arch/arm/mach-ep93xx/edb9315a.c b/arch/arm/mach-ep93xx/edb9315a.c new file mode 100644 index 000000000000..bfefdaa8f794 --- /dev/null +++ b/arch/arm/mach-ep93xx/edb9315a.c | |||
@@ -0,0 +1,62 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ep93xx/edb9315a.c | ||
3 | * Cirrus Logic EDB9315A support. | ||
4 | * | ||
5 | * Copyright (C) 2006 Lennert Buytenhek <buytenh@wantstofly.org> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or (at | ||
10 | * your option) any later version. | ||
11 | */ | ||
12 | |||
13 | #include <linux/config.h> | ||
14 | #include <linux/kernel.h> | ||
15 | #include <linux/init.h> | ||
16 | #include <linux/mm.h> | ||
17 | #include <linux/sched.h> | ||
18 | #include <linux/interrupt.h> | ||
19 | #include <linux/ioport.h> | ||
20 | #include <linux/mtd/physmap.h> | ||
21 | #include <linux/platform_device.h> | ||
22 | #include <asm/io.h> | ||
23 | #include <asm/hardware.h> | ||
24 | #include <asm/mach-types.h> | ||
25 | #include <asm/mach/arch.h> | ||
26 | |||
27 | static struct physmap_flash_data edb9315a_flash_data = { | ||
28 | .width = 2, | ||
29 | }; | ||
30 | |||
31 | static struct resource edb9315a_flash_resource = { | ||
32 | .start = 0x60000000, | ||
33 | .end = 0x60ffffff, | ||
34 | .flags = IORESOURCE_MEM, | ||
35 | }; | ||
36 | |||
37 | static struct platform_device edb9315a_flash = { | ||
38 | .name = "physmap-flash", | ||
39 | .id = 0, | ||
40 | .dev = { | ||
41 | .platform_data = &edb9315a_flash_data, | ||
42 | }, | ||
43 | .num_resources = 1, | ||
44 | .resource = &edb9315a_flash_resource, | ||
45 | }; | ||
46 | |||
47 | static void __init edb9315a_init_machine(void) | ||
48 | { | ||
49 | ep93xx_init_devices(); | ||
50 | platform_device_register(&edb9315a_flash); | ||
51 | } | ||
52 | |||
53 | MACHINE_START(EDB9315A, "Cirrus Logic EDB9315A Evaluation Board") | ||
54 | /* Maintainer: Lennert Buytenhek <buytenh@wantstofly.org> */ | ||
55 | .phys_io = EP93XX_APB_PHYS_BASE, | ||
56 | .io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc, | ||
57 | .boot_params = 0xc0000100, | ||
58 | .map_io = ep93xx_map_io, | ||
59 | .init_irq = ep93xx_init_irq, | ||
60 | .timer = &ep93xx_timer, | ||
61 | .init_machine = edb9315a_init_machine, | ||
62 | MACHINE_END | ||
diff --git a/arch/arm/mach-iop3xx/Kconfig b/arch/arm/mach-iop3xx/Kconfig index 2bfe8c729f9f..4422f2388607 100644 --- a/arch/arm/mach-iop3xx/Kconfig +++ b/arch/arm/mach-iop3xx/Kconfig | |||
@@ -30,12 +30,15 @@ config MACH_IQ80332 | |||
30 | select ARCH_IOP331 | 30 | select ARCH_IOP331 |
31 | help | 31 | help |
32 | Say Y here if you want to run your kernel on the Intel IQ80332 | 32 | Say Y here if you want to run your kernel on the Intel IQ80332 |
33 | evaluation kit for the IOP332 chipset | 33 | evaluation kit for the IOP332 chipset. |
34 | 34 | ||
35 | config ARCH_EP80219 | 35 | config ARCH_EP80219 |
36 | bool "Enable support for EP80219" | 36 | bool "Enable support for EP80219" |
37 | select ARCH_IOP321 | 37 | select ARCH_IOP321 |
38 | select ARCH_IQ31244 | 38 | select ARCH_IQ31244 |
39 | help | ||
40 | Say Y here if you want to run your kernel on the Intel EP80219 | ||
41 | evaluation kit for the Intel 80219 chipset (a IOP321 variant). | ||
39 | 42 | ||
40 | # Which IOP variant are we running? | 43 | # Which IOP variant are we running? |
41 | config ARCH_IOP321 | 44 | config ARCH_IOP321 |
@@ -56,8 +59,8 @@ config IOP331_STEPD | |||
56 | bool "Chip stepping D of the IOP80331 processor or IOP80333" | 59 | bool "Chip stepping D of the IOP80331 processor or IOP80333" |
57 | depends on (ARCH_IOP331) | 60 | depends on (ARCH_IOP331) |
58 | help | 61 | help |
59 | Say Y here if you have StepD of the IOP80331 or IOP8033 | 62 | Say Y here if you have StepD of the IOP80331 or IOP8033 |
60 | based platforms. | 63 | based platforms. |
61 | 64 | ||
62 | endmenu | 65 | endmenu |
63 | endif | 66 | endif |
diff --git a/arch/arm/mach-omap1/Kconfig b/arch/arm/mach-omap1/Kconfig index f8d716ccc1df..d135568dc9e7 100644 --- a/arch/arm/mach-omap1/Kconfig +++ b/arch/arm/mach-omap1/Kconfig | |||
@@ -62,6 +62,13 @@ config MACH_OMAP_PERSEUS2 | |||
62 | Support for TI OMAP 730 Perseus2 board. Say Y here if you have such | 62 | Support for TI OMAP 730 Perseus2 board. Say Y here if you have such |
63 | a board. | 63 | a board. |
64 | 64 | ||
65 | config MACH_OMAP_FSAMPLE | ||
66 | bool "TI F-Sample" | ||
67 | depends on ARCH_OMAP1 && ARCH_OMAP730 | ||
68 | help | ||
69 | Support for TI OMAP 850 F-Sample board. Say Y here if you have such | ||
70 | a board. | ||
71 | |||
65 | config MACH_VOICEBLUE | 72 | config MACH_VOICEBLUE |
66 | bool "Voiceblue" | 73 | bool "Voiceblue" |
67 | depends on ARCH_OMAP1 && ARCH_OMAP15XX | 74 | depends on ARCH_OMAP1 && ARCH_OMAP15XX |
diff --git a/arch/arm/mach-omap1/Makefile b/arch/arm/mach-omap1/Makefile index 9ea719550ad3..7165f74f78da 100644 --- a/arch/arm/mach-omap1/Makefile +++ b/arch/arm/mach-omap1/Makefile | |||
@@ -17,6 +17,7 @@ obj-$(CONFIG_MACH_OMAP_H2) += board-h2.o | |||
17 | obj-$(CONFIG_MACH_OMAP_INNOVATOR) += board-innovator.o | 17 | obj-$(CONFIG_MACH_OMAP_INNOVATOR) += board-innovator.o |
18 | obj-$(CONFIG_MACH_OMAP_GENERIC) += board-generic.o | 18 | obj-$(CONFIG_MACH_OMAP_GENERIC) += board-generic.o |
19 | obj-$(CONFIG_MACH_OMAP_PERSEUS2) += board-perseus2.o | 19 | obj-$(CONFIG_MACH_OMAP_PERSEUS2) += board-perseus2.o |
20 | obj-$(CONFIG_MACH_OMAP_FSAMPLE) += board-fsample.o | ||
20 | obj-$(CONFIG_MACH_OMAP_OSK) += board-osk.o | 21 | obj-$(CONFIG_MACH_OMAP_OSK) += board-osk.o |
21 | obj-$(CONFIG_MACH_OMAP_H3) += board-h3.o | 22 | obj-$(CONFIG_MACH_OMAP_H3) += board-h3.o |
22 | obj-$(CONFIG_MACH_VOICEBLUE) += board-voiceblue.o | 23 | obj-$(CONFIG_MACH_VOICEBLUE) += board-voiceblue.o |
diff --git a/arch/arm/mach-omap1/board-ams-delta.c b/arch/arm/mach-omap1/board-ams-delta.c index 73df32aac4c4..8437d065ada5 100644 --- a/arch/arm/mach-omap1/board-ams-delta.c +++ b/arch/arm/mach-omap1/board-ams-delta.c | |||
@@ -80,8 +80,15 @@ static struct omap_uart_config ams_delta_uart_config __initdata = { | |||
80 | .enabled_uarts = 1, | 80 | .enabled_uarts = 1, |
81 | }; | 81 | }; |
82 | 82 | ||
83 | static struct omap_usb_config ams_delta_usb_config __initdata = { | ||
84 | .register_host = 1, | ||
85 | .hmc_mode = 16, | ||
86 | .pins[0] = 2, | ||
87 | }; | ||
88 | |||
83 | static struct omap_board_config_kernel ams_delta_config[] = { | 89 | static struct omap_board_config_kernel ams_delta_config[] = { |
84 | { OMAP_TAG_UART, &ams_delta_uart_config }, | 90 | { OMAP_TAG_UART, &ams_delta_uart_config }, |
91 | { OMAP_TAG_USB, &ams_delta_usb_config }, | ||
85 | }; | 92 | }; |
86 | 93 | ||
87 | static struct platform_device ams_delta_led_device = { | 94 | static struct platform_device ams_delta_led_device = { |
diff --git a/arch/arm/mach-omap1/board-fsample.c b/arch/arm/mach-omap1/board-fsample.c new file mode 100644 index 000000000000..c753a3c5aadd --- /dev/null +++ b/arch/arm/mach-omap1/board-fsample.c | |||
@@ -0,0 +1,319 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-omap1/board-fsample.c | ||
3 | * | ||
4 | * Modified from board-perseus2.c | ||
5 | * | ||
6 | * Original OMAP730 support by Jean Pihet <j-pihet@ti.com> | ||
7 | * Updated for 2.6 by Kevin Hilman <kjh@hilman.org> | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify | ||
10 | * it under the terms of the GNU General Public License version 2 as | ||
11 | * published by the Free Software Foundation. | ||
12 | */ | ||
13 | |||
14 | #include <linux/kernel.h> | ||
15 | #include <linux/init.h> | ||
16 | #include <linux/platform_device.h> | ||
17 | #include <linux/delay.h> | ||
18 | #include <linux/mtd/mtd.h> | ||
19 | #include <linux/mtd/nand.h> | ||
20 | #include <linux/mtd/partitions.h> | ||
21 | #include <linux/input.h> | ||
22 | |||
23 | #include <asm/hardware.h> | ||
24 | #include <asm/mach-types.h> | ||
25 | #include <asm/mach/arch.h> | ||
26 | #include <asm/mach/flash.h> | ||
27 | #include <asm/mach/map.h> | ||
28 | |||
29 | #include <asm/arch/tc.h> | ||
30 | #include <asm/arch/gpio.h> | ||
31 | #include <asm/arch/mux.h> | ||
32 | #include <asm/arch/fpga.h> | ||
33 | #include <asm/arch/keypad.h> | ||
34 | #include <asm/arch/common.h> | ||
35 | #include <asm/arch/board.h> | ||
36 | #include <asm/arch/board-fsample.h> | ||
37 | |||
38 | static int fsample_keymap[] = { | ||
39 | KEY(0,0,KEY_UP), | ||
40 | KEY(0,1,KEY_RIGHT), | ||
41 | KEY(0,2,KEY_LEFT), | ||
42 | KEY(0,3,KEY_DOWN), | ||
43 | KEY(0,4,KEY_CENTER), | ||
44 | KEY(0,5,KEY_0_5), | ||
45 | KEY(1,0,KEY_SOFT2), | ||
46 | KEY(1,1,KEY_SEND), | ||
47 | KEY(1,2,KEY_END), | ||
48 | KEY(1,3,KEY_VOLUMEDOWN), | ||
49 | KEY(1,4,KEY_VOLUMEUP), | ||
50 | KEY(1,5,KEY_RECORD), | ||
51 | KEY(2,0,KEY_SOFT1), | ||
52 | KEY(2,1,KEY_3), | ||
53 | KEY(2,2,KEY_6), | ||
54 | KEY(2,3,KEY_9), | ||
55 | KEY(2,4,KEY_SHARP), | ||
56 | KEY(2,5,KEY_2_5), | ||
57 | KEY(3,0,KEY_BACK), | ||
58 | KEY(3,1,KEY_2), | ||
59 | KEY(3,2,KEY_5), | ||
60 | KEY(3,3,KEY_8), | ||
61 | KEY(3,4,KEY_0), | ||
62 | KEY(3,5,KEY_HEADSETHOOK), | ||
63 | KEY(4,0,KEY_HOME), | ||
64 | KEY(4,1,KEY_1), | ||
65 | KEY(4,2,KEY_4), | ||
66 | KEY(4,3,KEY_7), | ||
67 | KEY(4,4,KEY_STAR), | ||
68 | KEY(4,5,KEY_POWER), | ||
69 | 0 | ||
70 | }; | ||
71 | |||
72 | static struct resource smc91x_resources[] = { | ||
73 | [0] = { | ||
74 | .start = H2P2_DBG_FPGA_ETHR_START, /* Physical */ | ||
75 | .end = H2P2_DBG_FPGA_ETHR_START + 0xf, | ||
76 | .flags = IORESOURCE_MEM, | ||
77 | }, | ||
78 | [1] = { | ||
79 | .start = INT_730_MPU_EXT_NIRQ, | ||
80 | .end = 0, | ||
81 | .flags = IORESOURCE_IRQ, | ||
82 | }, | ||
83 | }; | ||
84 | |||
85 | static struct mtd_partition nor_partitions[] = { | ||
86 | /* bootloader (U-Boot, etc) in first sector */ | ||
87 | { | ||
88 | .name = "bootloader", | ||
89 | .offset = 0, | ||
90 | .size = SZ_128K, | ||
91 | .mask_flags = MTD_WRITEABLE, /* force read-only */ | ||
92 | }, | ||
93 | /* bootloader params in the next sector */ | ||
94 | { | ||
95 | .name = "params", | ||
96 | .offset = MTDPART_OFS_APPEND, | ||
97 | .size = SZ_128K, | ||
98 | .mask_flags = 0, | ||
99 | }, | ||
100 | /* kernel */ | ||
101 | { | ||
102 | .name = "kernel", | ||
103 | .offset = MTDPART_OFS_APPEND, | ||
104 | .size = SZ_2M, | ||
105 | .mask_flags = 0 | ||
106 | }, | ||
107 | /* rest of flash is a file system */ | ||
108 | { | ||
109 | .name = "rootfs", | ||
110 | .offset = MTDPART_OFS_APPEND, | ||
111 | .size = MTDPART_SIZ_FULL, | ||
112 | .mask_flags = 0 | ||
113 | }, | ||
114 | }; | ||
115 | |||
116 | static struct flash_platform_data nor_data = { | ||
117 | .map_name = "cfi_probe", | ||
118 | .width = 2, | ||
119 | .parts = nor_partitions, | ||
120 | .nr_parts = ARRAY_SIZE(nor_partitions), | ||
121 | }; | ||
122 | |||
123 | static struct resource nor_resource = { | ||
124 | .start = OMAP_CS0_PHYS, | ||
125 | .end = OMAP_CS0_PHYS + SZ_32M - 1, | ||
126 | .flags = IORESOURCE_MEM, | ||
127 | }; | ||
128 | |||
129 | static struct platform_device nor_device = { | ||
130 | .name = "omapflash", | ||
131 | .id = 0, | ||
132 | .dev = { | ||
133 | .platform_data = &nor_data, | ||
134 | }, | ||
135 | .num_resources = 1, | ||
136 | .resource = &nor_resource, | ||
137 | }; | ||
138 | |||
139 | static struct nand_platform_data nand_data = { | ||
140 | .options = NAND_SAMSUNG_LP_OPTIONS, | ||
141 | }; | ||
142 | |||
143 | static struct resource nand_resource = { | ||
144 | .start = OMAP_CS3_PHYS, | ||
145 | .end = OMAP_CS3_PHYS + SZ_4K - 1, | ||
146 | .flags = IORESOURCE_MEM, | ||
147 | }; | ||
148 | |||
149 | static struct platform_device nand_device = { | ||
150 | .name = "omapnand", | ||
151 | .id = 0, | ||
152 | .dev = { | ||
153 | .platform_data = &nand_data, | ||
154 | }, | ||
155 | .num_resources = 1, | ||
156 | .resource = &nand_resource, | ||
157 | }; | ||
158 | |||
159 | static struct platform_device smc91x_device = { | ||
160 | .name = "smc91x", | ||
161 | .id = 0, | ||
162 | .num_resources = ARRAY_SIZE(smc91x_resources), | ||
163 | .resource = smc91x_resources, | ||
164 | }; | ||
165 | |||
166 | static struct resource kp_resources[] = { | ||
167 | [0] = { | ||
168 | .start = INT_730_MPUIO_KEYPAD, | ||
169 | .end = INT_730_MPUIO_KEYPAD, | ||
170 | .flags = IORESOURCE_IRQ, | ||
171 | }, | ||
172 | }; | ||
173 | |||
174 | static struct omap_kp_platform_data kp_data = { | ||
175 | .rows = 8, | ||
176 | .cols = 8, | ||
177 | .keymap = fsample_keymap, | ||
178 | }; | ||
179 | |||
180 | static struct platform_device kp_device = { | ||
181 | .name = "omap-keypad", | ||
182 | .id = -1, | ||
183 | .dev = { | ||
184 | .platform_data = &kp_data, | ||
185 | }, | ||
186 | .num_resources = ARRAY_SIZE(kp_resources), | ||
187 | .resource = kp_resources, | ||
188 | }; | ||
189 | |||
190 | static struct platform_device lcd_device = { | ||
191 | .name = "lcd_p2", | ||
192 | .id = -1, | ||
193 | }; | ||
194 | |||
195 | static struct platform_device *devices[] __initdata = { | ||
196 | &nor_device, | ||
197 | &nand_device, | ||
198 | &smc91x_device, | ||
199 | &kp_device, | ||
200 | &lcd_device, | ||
201 | }; | ||
202 | |||
203 | #define P2_NAND_RB_GPIO_PIN 62 | ||
204 | |||
205 | static int nand_dev_ready(struct nand_platform_data *data) | ||
206 | { | ||
207 | return omap_get_gpio_datain(P2_NAND_RB_GPIO_PIN); | ||
208 | } | ||
209 | |||
210 | static struct omap_uart_config fsample_uart_config __initdata = { | ||
211 | .enabled_uarts = ((1 << 0) | (1 << 1)), | ||
212 | }; | ||
213 | |||
214 | static struct omap_lcd_config fsample_lcd_config __initdata = { | ||
215 | .ctrl_name = "internal", | ||
216 | }; | ||
217 | |||
218 | static struct omap_board_config_kernel fsample_config[] = { | ||
219 | { OMAP_TAG_UART, &fsample_uart_config }, | ||
220 | { OMAP_TAG_LCD, &fsample_lcd_config }, | ||
221 | }; | ||
222 | |||
223 | static void __init omap_fsample_init(void) | ||
224 | { | ||
225 | if (!(omap_request_gpio(P2_NAND_RB_GPIO_PIN))) | ||
226 | nand_data.dev_ready = nand_dev_ready; | ||
227 | |||
228 | omap_cfg_reg(L3_1610_FLASH_CS2B_OE); | ||
229 | omap_cfg_reg(M8_1610_FLASH_CS2B_WE); | ||
230 | |||
231 | platform_add_devices(devices, ARRAY_SIZE(devices)); | ||
232 | |||
233 | omap_board_config = fsample_config; | ||
234 | omap_board_config_size = ARRAY_SIZE(fsample_config); | ||
235 | omap_serial_init(); | ||
236 | } | ||
237 | |||
238 | static void __init fsample_init_smc91x(void) | ||
239 | { | ||
240 | fpga_write(1, H2P2_DBG_FPGA_LAN_RESET); | ||
241 | mdelay(50); | ||
242 | fpga_write(fpga_read(H2P2_DBG_FPGA_LAN_RESET) & ~1, | ||
243 | H2P2_DBG_FPGA_LAN_RESET); | ||
244 | mdelay(50); | ||
245 | } | ||
246 | |||
247 | void omap_fsample_init_irq(void) | ||
248 | { | ||
249 | omap1_init_common_hw(); | ||
250 | omap_init_irq(); | ||
251 | omap_gpio_init(); | ||
252 | fsample_init_smc91x(); | ||
253 | } | ||
254 | |||
255 | /* Only FPGA needs to be mapped here. All others are done with ioremap */ | ||
256 | static struct map_desc omap_fsample_io_desc[] __initdata = { | ||
257 | { | ||
258 | .virtual = H2P2_DBG_FPGA_BASE, | ||
259 | .pfn = __phys_to_pfn(H2P2_DBG_FPGA_START), | ||
260 | .length = H2P2_DBG_FPGA_SIZE, | ||
261 | .type = MT_DEVICE | ||
262 | }, | ||
263 | { | ||
264 | .virtual = FSAMPLE_CPLD_BASE, | ||
265 | .pfn = __phys_to_pfn(FSAMPLE_CPLD_START), | ||
266 | .length = FSAMPLE_CPLD_SIZE, | ||
267 | .type = MT_DEVICE | ||
268 | } | ||
269 | }; | ||
270 | |||
271 | static void __init omap_fsample_map_io(void) | ||
272 | { | ||
273 | omap1_map_common_io(); | ||
274 | iotable_init(omap_fsample_io_desc, | ||
275 | ARRAY_SIZE(omap_fsample_io_desc)); | ||
276 | |||
277 | /* Early, board-dependent init */ | ||
278 | |||
279 | /* | ||
280 | * Hold GSM Reset until needed | ||
281 | */ | ||
282 | omap_writew(omap_readw(OMAP730_DSP_M_CTL) & ~1, OMAP730_DSP_M_CTL); | ||
283 | |||
284 | /* | ||
285 | * UARTs -> done automagically by 8250 driver | ||
286 | */ | ||
287 | |||
288 | /* | ||
289 | * CSx timings, GPIO Mux ... setup | ||
290 | */ | ||
291 | |||
292 | /* Flash: CS0 timings setup */ | ||
293 | omap_writel(0x0000fff3, OMAP730_FLASH_CFG_0); | ||
294 | omap_writel(0x00000088, OMAP730_FLASH_ACFG_0); | ||
295 | |||
296 | /* | ||
297 | * Ethernet support through the debug board | ||
298 | * CS1 timings setup | ||
299 | */ | ||
300 | omap_writel(0x0000fff3, OMAP730_FLASH_CFG_1); | ||
301 | omap_writel(0x00000000, OMAP730_FLASH_ACFG_1); | ||
302 | |||
303 | /* | ||
304 | * Configure MPU_EXT_NIRQ IO in IO_CONF9 register, | ||
305 | * It is used as the Ethernet controller interrupt | ||
306 | */ | ||
307 | omap_writel(omap_readl(OMAP730_IO_CONF_9) & 0x1FFFFFFF, OMAP730_IO_CONF_9); | ||
308 | } | ||
309 | |||
310 | MACHINE_START(OMAP_FSAMPLE, "OMAP730 F-Sample") | ||
311 | /* Maintainer: Brian Swetland <swetland@google.com> */ | ||
312 | .phys_io = 0xfff00000, | ||
313 | .io_pg_offst = ((0xfef00000) >> 18) & 0xfffc, | ||
314 | .boot_params = 0x10000100, | ||
315 | .map_io = omap_fsample_map_io, | ||
316 | .init_irq = omap_fsample_init_irq, | ||
317 | .init_machine = omap_fsample_init, | ||
318 | .timer = &omap_timer, | ||
319 | MACHINE_END | ||
diff --git a/arch/arm/mach-omap1/board-innovator.c b/arch/arm/mach-omap1/board-innovator.c index e90c137a4cf3..4cbc62db5b5d 100644 --- a/arch/arm/mach-omap1/board-innovator.c +++ b/arch/arm/mach-omap1/board-innovator.c | |||
@@ -37,6 +37,8 @@ | |||
37 | #include <asm/arch/usb.h> | 37 | #include <asm/arch/usb.h> |
38 | #include <asm/arch/keypad.h> | 38 | #include <asm/arch/keypad.h> |
39 | #include <asm/arch/common.h> | 39 | #include <asm/arch/common.h> |
40 | #include <asm/arch/mcbsp.h> | ||
41 | #include <asm/arch/omap-alsa.h> | ||
40 | 42 | ||
41 | static int innovator_keymap[] = { | 43 | static int innovator_keymap[] = { |
42 | KEY(0, 0, KEY_F1), | 44 | KEY(0, 0, KEY_F1), |
@@ -112,6 +114,42 @@ static struct platform_device innovator_flash_device = { | |||
112 | .resource = &innovator_flash_resource, | 114 | .resource = &innovator_flash_resource, |
113 | }; | 115 | }; |
114 | 116 | ||
117 | #define DEFAULT_BITPERSAMPLE 16 | ||
118 | |||
119 | static struct omap_mcbsp_reg_cfg mcbsp_regs = { | ||
120 | .spcr2 = FREE | FRST | GRST | XRST | XINTM(3), | ||
121 | .spcr1 = RINTM(3) | RRST, | ||
122 | .rcr2 = RPHASE | RFRLEN2(OMAP_MCBSP_WORD_8) | | ||
123 | RWDLEN2(OMAP_MCBSP_WORD_16) | RDATDLY(0), | ||
124 | .rcr1 = RFRLEN1(OMAP_MCBSP_WORD_8) | RWDLEN1(OMAP_MCBSP_WORD_16), | ||
125 | .xcr2 = XPHASE | XFRLEN2(OMAP_MCBSP_WORD_8) | | ||
126 | XWDLEN2(OMAP_MCBSP_WORD_16) | XDATDLY(0) | XFIG, | ||
127 | .xcr1 = XFRLEN1(OMAP_MCBSP_WORD_8) | XWDLEN1(OMAP_MCBSP_WORD_16), | ||
128 | .srgr1 = FWID(DEFAULT_BITPERSAMPLE - 1), | ||
129 | .srgr2 = GSYNC | CLKSP | FSGM | FPER(DEFAULT_BITPERSAMPLE * 2 - 1), | ||
130 | /*.pcr0 = FSXM | FSRM | CLKXM | CLKRM | CLKXP | CLKRP,*/ /* mcbsp: master */ | ||
131 | .pcr0 = CLKXP | CLKRP, /* mcbsp: slave */ | ||
132 | }; | ||
133 | |||
134 | static struct omap_alsa_codec_config alsa_config = { | ||
135 | .name = "OMAP Innovator AIC23", | ||
136 | .mcbsp_regs_alsa = &mcbsp_regs, | ||
137 | .codec_configure_dev = NULL, // aic23_configure, | ||
138 | .codec_set_samplerate = NULL, // aic23_set_samplerate, | ||
139 | .codec_clock_setup = NULL, // aic23_clock_setup, | ||
140 | .codec_clock_on = NULL, // aic23_clock_on, | ||
141 | .codec_clock_off = NULL, // aic23_clock_off, | ||
142 | .get_default_samplerate = NULL, // aic23_get_default_samplerate, | ||
143 | }; | ||
144 | |||
145 | static struct platform_device innovator_mcbsp1_device = { | ||
146 | .name = "omap_alsa_mcbsp", | ||
147 | .id = 1, | ||
148 | .dev = { | ||
149 | .platform_data = &alsa_config, | ||
150 | }, | ||
151 | }; | ||
152 | |||
115 | static struct resource innovator_kp_resources[] = { | 153 | static struct resource innovator_kp_resources[] = { |
116 | [0] = { | 154 | [0] = { |
117 | .start = INT_KEYBOARD, | 155 | .start = INT_KEYBOARD, |
@@ -139,6 +177,10 @@ static struct platform_device innovator_kp_device = { | |||
139 | 177 | ||
140 | #ifdef CONFIG_ARCH_OMAP15XX | 178 | #ifdef CONFIG_ARCH_OMAP15XX |
141 | 179 | ||
180 | #include <linux/spi/spi.h> | ||
181 | #include <linux/spi/ads7846.h> | ||
182 | |||
183 | |||
142 | /* Only FPGA needs to be mapped here. All others are done with ioremap */ | 184 | /* Only FPGA needs to be mapped here. All others are done with ioremap */ |
143 | static struct map_desc innovator1510_io_desc[] __initdata = { | 185 | static struct map_desc innovator1510_io_desc[] __initdata = { |
144 | { | 186 | { |
@@ -174,13 +216,44 @@ static struct platform_device innovator1510_lcd_device = { | |||
174 | .id = -1, | 216 | .id = -1, |
175 | }; | 217 | }; |
176 | 218 | ||
219 | static struct platform_device innovator1510_spi_device = { | ||
220 | .name = "spi_inn1510", | ||
221 | .id = -1, | ||
222 | }; | ||
223 | |||
177 | static struct platform_device *innovator1510_devices[] __initdata = { | 224 | static struct platform_device *innovator1510_devices[] __initdata = { |
178 | &innovator_flash_device, | 225 | &innovator_flash_device, |
179 | &innovator1510_smc91x_device, | 226 | &innovator1510_smc91x_device, |
227 | &innovator_mcbsp1_device, | ||
180 | &innovator_kp_device, | 228 | &innovator_kp_device, |
181 | &innovator1510_lcd_device, | 229 | &innovator1510_lcd_device, |
230 | &innovator1510_spi_device, | ||
182 | }; | 231 | }; |
183 | 232 | ||
233 | static int innovator_get_pendown_state(void) | ||
234 | { | ||
235 | return !(fpga_read(OMAP1510_FPGA_TOUCHSCREEN) & (1 << 5)); | ||
236 | } | ||
237 | |||
238 | static const struct ads7846_platform_data innovator1510_ts_info = { | ||
239 | .model = 7846, | ||
240 | .vref_delay_usecs = 100, /* internal, no capacitor */ | ||
241 | .x_plate_ohms = 419, | ||
242 | .y_plate_ohms = 486, | ||
243 | .get_pendown_state = innovator_get_pendown_state, | ||
244 | }; | ||
245 | |||
246 | static struct spi_board_info __initdata innovator1510_boardinfo[] = { { | ||
247 | /* FPGA (bus "10") CS0 has an ads7846e */ | ||
248 | .modalias = "ads7846", | ||
249 | .platform_data = &innovator1510_ts_info, | ||
250 | .irq = OMAP1510_INT_FPGA_TS, | ||
251 | .max_speed_hz = 120000 /* max sample rate at 3V */ | ||
252 | * 26 /* command + data + overhead */, | ||
253 | .bus_num = 10, | ||
254 | .chip_select = 0, | ||
255 | } }; | ||
256 | |||
184 | #endif /* CONFIG_ARCH_OMAP15XX */ | 257 | #endif /* CONFIG_ARCH_OMAP15XX */ |
185 | 258 | ||
186 | #ifdef CONFIG_ARCH_OMAP16XX | 259 | #ifdef CONFIG_ARCH_OMAP16XX |
@@ -311,6 +384,8 @@ static void __init innovator_init(void) | |||
311 | #ifdef CONFIG_ARCH_OMAP15XX | 384 | #ifdef CONFIG_ARCH_OMAP15XX |
312 | if (cpu_is_omap1510()) { | 385 | if (cpu_is_omap1510()) { |
313 | platform_add_devices(innovator1510_devices, ARRAY_SIZE(innovator1510_devices)); | 386 | platform_add_devices(innovator1510_devices, ARRAY_SIZE(innovator1510_devices)); |
387 | spi_register_board_info(innovator1510_boardinfo, | ||
388 | ARRAY_SIZE(innovator1510_boardinfo)); | ||
314 | } | 389 | } |
315 | #endif | 390 | #endif |
316 | #ifdef CONFIG_ARCH_OMAP16XX | 391 | #ifdef CONFIG_ARCH_OMAP16XX |
diff --git a/arch/arm/mach-omap1/board-osk.c b/arch/arm/mach-omap1/board-osk.c index ef7685d224d5..91933301bb73 100644 --- a/arch/arm/mach-omap1/board-osk.c +++ b/arch/arm/mach-omap1/board-osk.c | |||
@@ -33,7 +33,6 @@ | |||
33 | 33 | ||
34 | #include <linux/mtd/mtd.h> | 34 | #include <linux/mtd/mtd.h> |
35 | #include <linux/mtd/partitions.h> | 35 | #include <linux/mtd/partitions.h> |
36 | #include <linux/input.h> | ||
37 | 36 | ||
38 | #include <asm/hardware.h> | 37 | #include <asm/hardware.h> |
39 | #include <asm/mach-types.h> | 38 | #include <asm/mach-types.h> |
@@ -45,25 +44,10 @@ | |||
45 | #include <asm/arch/usb.h> | 44 | #include <asm/arch/usb.h> |
46 | #include <asm/arch/mux.h> | 45 | #include <asm/arch/mux.h> |
47 | #include <asm/arch/tc.h> | 46 | #include <asm/arch/tc.h> |
48 | #include <asm/arch/keypad.h> | ||
49 | #include <asm/arch/common.h> | 47 | #include <asm/arch/common.h> |
50 | #include <asm/arch/mcbsp.h> | 48 | #include <asm/arch/mcbsp.h> |
51 | #include <asm/arch/omap-alsa.h> | 49 | #include <asm/arch/omap-alsa.h> |
52 | 50 | ||
53 | static int osk_keymap[] = { | ||
54 | KEY(0, 0, KEY_F1), | ||
55 | KEY(0, 3, KEY_UP), | ||
56 | KEY(1, 1, KEY_LEFTCTRL), | ||
57 | KEY(1, 2, KEY_LEFT), | ||
58 | KEY(2, 0, KEY_SPACE), | ||
59 | KEY(2, 1, KEY_ESC), | ||
60 | KEY(2, 2, KEY_DOWN), | ||
61 | KEY(3, 2, KEY_ENTER), | ||
62 | KEY(3, 3, KEY_RIGHT), | ||
63 | 0 | ||
64 | }; | ||
65 | |||
66 | |||
67 | static struct mtd_partition osk_partitions[] = { | 51 | static struct mtd_partition osk_partitions[] = { |
68 | /* bootloader (U-Boot, etc) in first sector */ | 52 | /* bootloader (U-Boot, etc) in first sector */ |
69 | { | 53 | { |
@@ -181,48 +165,17 @@ static struct omap_alsa_codec_config alsa_config = { | |||
181 | 165 | ||
182 | static struct platform_device osk5912_mcbsp1_device = { | 166 | static struct platform_device osk5912_mcbsp1_device = { |
183 | .name = "omap_alsa_mcbsp", | 167 | .name = "omap_alsa_mcbsp", |
184 | .id = 1, | 168 | .id = 1, |
185 | .dev = { | 169 | .dev = { |
186 | .platform_data = &alsa_config, | 170 | .platform_data = &alsa_config, |
187 | }, | 171 | }, |
188 | }; | 172 | }; |
189 | 173 | ||
190 | static struct resource osk5912_kp_resources[] = { | ||
191 | [0] = { | ||
192 | .start = INT_KEYBOARD, | ||
193 | .end = INT_KEYBOARD, | ||
194 | .flags = IORESOURCE_IRQ, | ||
195 | }, | ||
196 | }; | ||
197 | |||
198 | static struct omap_kp_platform_data osk_kp_data = { | ||
199 | .rows = 8, | ||
200 | .cols = 8, | ||
201 | .keymap = osk_keymap, | ||
202 | }; | ||
203 | |||
204 | static struct platform_device osk5912_kp_device = { | ||
205 | .name = "omap-keypad", | ||
206 | .id = -1, | ||
207 | .dev = { | ||
208 | .platform_data = &osk_kp_data, | ||
209 | }, | ||
210 | .num_resources = ARRAY_SIZE(osk5912_kp_resources), | ||
211 | .resource = osk5912_kp_resources, | ||
212 | }; | ||
213 | |||
214 | static struct platform_device osk5912_lcd_device = { | ||
215 | .name = "lcd_osk", | ||
216 | .id = -1, | ||
217 | }; | ||
218 | |||
219 | static struct platform_device *osk5912_devices[] __initdata = { | 174 | static struct platform_device *osk5912_devices[] __initdata = { |
220 | &osk5912_flash_device, | 175 | &osk5912_flash_device, |
221 | &osk5912_smc91x_device, | 176 | &osk5912_smc91x_device, |
222 | &osk5912_cf_device, | 177 | &osk5912_cf_device, |
223 | &osk5912_mcbsp1_device, | 178 | &osk5912_mcbsp1_device, |
224 | &osk5912_kp_device, | ||
225 | &osk5912_lcd_device, | ||
226 | }; | 179 | }; |
227 | 180 | ||
228 | static void __init osk_init_smc91x(void) | 181 | static void __init osk_init_smc91x(void) |
@@ -276,18 +229,100 @@ static struct omap_uart_config osk_uart_config __initdata = { | |||
276 | .enabled_uarts = (1 << 0), | 229 | .enabled_uarts = (1 << 0), |
277 | }; | 230 | }; |
278 | 231 | ||
232 | #ifdef CONFIG_OMAP_OSK_MISTRAL | ||
279 | static struct omap_lcd_config osk_lcd_config __initdata = { | 233 | static struct omap_lcd_config osk_lcd_config __initdata = { |
280 | .ctrl_name = "internal", | 234 | .ctrl_name = "internal", |
281 | }; | 235 | }; |
236 | #endif | ||
282 | 237 | ||
283 | static struct omap_board_config_kernel osk_config[] = { | 238 | static struct omap_board_config_kernel osk_config[] = { |
284 | { OMAP_TAG_USB, &osk_usb_config }, | 239 | { OMAP_TAG_USB, &osk_usb_config }, |
285 | { OMAP_TAG_UART, &osk_uart_config }, | 240 | { OMAP_TAG_UART, &osk_uart_config }, |
241 | #ifdef CONFIG_OMAP_OSK_MISTRAL | ||
286 | { OMAP_TAG_LCD, &osk_lcd_config }, | 242 | { OMAP_TAG_LCD, &osk_lcd_config }, |
243 | #endif | ||
287 | }; | 244 | }; |
288 | 245 | ||
289 | #ifdef CONFIG_OMAP_OSK_MISTRAL | 246 | #ifdef CONFIG_OMAP_OSK_MISTRAL |
290 | 247 | ||
248 | #include <linux/input.h> | ||
249 | #include <linux/spi/spi.h> | ||
250 | #include <linux/spi/ads7846.h> | ||
251 | |||
252 | #include <asm/arch/keypad.h> | ||
253 | |||
254 | static const int osk_keymap[] = { | ||
255 | /* KEY(col, row, code) */ | ||
256 | KEY(0, 0, KEY_F1), /* SW4 */ | ||
257 | KEY(0, 3, KEY_UP), /* (sw2/up) */ | ||
258 | KEY(1, 1, KEY_LEFTCTRL), /* SW5 */ | ||
259 | KEY(1, 2, KEY_LEFT), /* (sw2/left) */ | ||
260 | KEY(2, 0, KEY_SPACE), /* SW3 */ | ||
261 | KEY(2, 1, KEY_ESC), /* SW6 */ | ||
262 | KEY(2, 2, KEY_DOWN), /* (sw2/down) */ | ||
263 | KEY(3, 2, KEY_ENTER), /* (sw2/select) */ | ||
264 | KEY(3, 3, KEY_RIGHT), /* (sw2/right) */ | ||
265 | 0 | ||
266 | }; | ||
267 | |||
268 | static struct omap_kp_platform_data osk_kp_data = { | ||
269 | .rows = 8, | ||
270 | .cols = 8, | ||
271 | .keymap = (int *) osk_keymap, | ||
272 | }; | ||
273 | |||
274 | static struct resource osk5912_kp_resources[] = { | ||
275 | [0] = { | ||
276 | .start = INT_KEYBOARD, | ||
277 | .end = INT_KEYBOARD, | ||
278 | .flags = IORESOURCE_IRQ, | ||
279 | }, | ||
280 | }; | ||
281 | |||
282 | static struct platform_device osk5912_kp_device = { | ||
283 | .name = "omap-keypad", | ||
284 | .id = -1, | ||
285 | .dev = { | ||
286 | .platform_data = &osk_kp_data, | ||
287 | }, | ||
288 | .num_resources = ARRAY_SIZE(osk5912_kp_resources), | ||
289 | .resource = osk5912_kp_resources, | ||
290 | }; | ||
291 | |||
292 | static struct platform_device osk5912_lcd_device = { | ||
293 | .name = "lcd_osk", | ||
294 | .id = -1, | ||
295 | }; | ||
296 | |||
297 | static struct platform_device *mistral_devices[] __initdata = { | ||
298 | &osk5912_kp_device, | ||
299 | &osk5912_lcd_device, | ||
300 | }; | ||
301 | |||
302 | static int mistral_get_pendown_state(void) | ||
303 | { | ||
304 | return !omap_get_gpio_datain(4); | ||
305 | } | ||
306 | |||
307 | static const struct ads7846_platform_data mistral_ts_info = { | ||
308 | .model = 7846, | ||
309 | .vref_delay_usecs = 100, /* internal, no capacitor */ | ||
310 | .x_plate_ohms = 419, | ||
311 | .y_plate_ohms = 486, | ||
312 | .get_pendown_state = mistral_get_pendown_state, | ||
313 | }; | ||
314 | |||
315 | static struct spi_board_info __initdata mistral_boardinfo[] = { { | ||
316 | /* MicroWire (bus 2) CS0 has an ads7846e */ | ||
317 | .modalias = "ads7846", | ||
318 | .platform_data = &mistral_ts_info, | ||
319 | .irq = OMAP_GPIO_IRQ(4), | ||
320 | .max_speed_hz = 120000 /* max sample rate at 3V */ | ||
321 | * 26 /* command + data + overhead */, | ||
322 | .bus_num = 2, | ||
323 | .chip_select = 0, | ||
324 | } }; | ||
325 | |||
291 | #ifdef CONFIG_PM | 326 | #ifdef CONFIG_PM |
292 | static irqreturn_t | 327 | static irqreturn_t |
293 | osk_mistral_wake_interrupt(int irq, void *ignored, struct pt_regs *regs) | 328 | osk_mistral_wake_interrupt(int irq, void *ignored, struct pt_regs *regs) |
@@ -298,14 +333,18 @@ osk_mistral_wake_interrupt(int irq, void *ignored, struct pt_regs *regs) | |||
298 | 333 | ||
299 | static void __init osk_mistral_init(void) | 334 | static void __init osk_mistral_init(void) |
300 | { | 335 | { |
301 | /* FIXME here's where to feed in framebuffer, touchpad, and | 336 | /* NOTE: we could actually tell if there's a Mistral board |
302 | * keyboard setup ... not in the drivers for those devices! | ||
303 | * | ||
304 | * NOTE: we could actually tell if there's a Mistral board | ||
305 | * attached, e.g. by trying to read something from the ads7846. | 337 | * attached, e.g. by trying to read something from the ads7846. |
306 | * But this is too early for that... | 338 | * But this arch_init() code is too early for that, since we |
339 | * can't talk to the ads or even the i2c eeprom. | ||
307 | */ | 340 | */ |
308 | 341 | ||
342 | // omap_cfg_reg(P19_1610_GPIO6); // BUSY | ||
343 | omap_cfg_reg(P20_1610_GPIO4); // PENIRQ | ||
344 | set_irq_type(OMAP_GPIO_IRQ(4), IRQT_FALLING); | ||
345 | spi_register_board_info(mistral_boardinfo, | ||
346 | ARRAY_SIZE(mistral_boardinfo)); | ||
347 | |||
309 | /* the sideways button (SW1) is for use as a "wakeup" button */ | 348 | /* the sideways button (SW1) is for use as a "wakeup" button */ |
310 | omap_cfg_reg(N15_1610_MPUIO2); | 349 | omap_cfg_reg(N15_1610_MPUIO2); |
311 | if (omap_request_gpio(OMAP_MPUIO(2)) == 0) { | 350 | if (omap_request_gpio(OMAP_MPUIO(2)) == 0) { |
@@ -329,6 +368,8 @@ static void __init osk_mistral_init(void) | |||
329 | #endif | 368 | #endif |
330 | } else | 369 | } else |
331 | printk(KERN_ERR "OSK+Mistral: wakeup button is awol\n"); | 370 | printk(KERN_ERR "OSK+Mistral: wakeup button is awol\n"); |
371 | |||
372 | platform_add_devices(mistral_devices, ARRAY_SIZE(mistral_devices)); | ||
332 | } | 373 | } |
333 | #else | 374 | #else |
334 | static void __init osk_mistral_init(void) { } | 375 | static void __init osk_mistral_init(void) { } |
diff --git a/arch/arm/mach-omap1/clock.c b/arch/arm/mach-omap1/clock.c index 619db18144ea..f1958e882e86 100644 --- a/arch/arm/mach-omap1/clock.c +++ b/arch/arm/mach-omap1/clock.c | |||
@@ -1,3 +1,4 @@ | |||
1 | //kernel/linux-omap-fsample/arch/arm/mach-omap1/clock.c#2 - edit change 3808 (text) | ||
1 | /* | 2 | /* |
2 | * linux/arch/arm/mach-omap1/clock.c | 3 | * linux/arch/arm/mach-omap1/clock.c |
3 | * | 4 | * |
@@ -20,6 +21,7 @@ | |||
20 | 21 | ||
21 | #include <asm/io.h> | 22 | #include <asm/io.h> |
22 | 23 | ||
24 | #include <asm/arch/cpu.h> | ||
23 | #include <asm/arch/usb.h> | 25 | #include <asm/arch/usb.h> |
24 | #include <asm/arch/clock.h> | 26 | #include <asm/arch/clock.h> |
25 | #include <asm/arch/sram.h> | 27 | #include <asm/arch/sram.h> |
@@ -270,8 +272,12 @@ static int omap1_select_table_rate(struct clk * clk, unsigned long rate) | |||
270 | /* | 272 | /* |
271 | * In most cases we should not need to reprogram DPLL. | 273 | * In most cases we should not need to reprogram DPLL. |
272 | * Reprogramming the DPLL is tricky, it must be done from SRAM. | 274 | * Reprogramming the DPLL is tricky, it must be done from SRAM. |
275 | * (on 730, bit 13 must always be 1) | ||
273 | */ | 276 | */ |
274 | omap_sram_reprogram_clock(ptr->dpllctl_val, ptr->ckctl_val); | 277 | if (cpu_is_omap730()) |
278 | omap_sram_reprogram_clock(ptr->dpllctl_val, ptr->ckctl_val | 0x2000); | ||
279 | else | ||
280 | omap_sram_reprogram_clock(ptr->dpllctl_val, ptr->ckctl_val); | ||
275 | 281 | ||
276 | ck_dpll1.rate = ptr->pll_rate; | 282 | ck_dpll1.rate = ptr->pll_rate; |
277 | propagate_rate(&ck_dpll1); | 283 | propagate_rate(&ck_dpll1); |
@@ -748,7 +754,7 @@ int __init omap1_clk_init(void) | |||
748 | printk(KERN_ERR "System frequencies not set. Check your config.\n"); | 754 | printk(KERN_ERR "System frequencies not set. Check your config.\n"); |
749 | /* Guess sane values (60MHz) */ | 755 | /* Guess sane values (60MHz) */ |
750 | omap_writew(0x2290, DPLL_CTL); | 756 | omap_writew(0x2290, DPLL_CTL); |
751 | omap_writew(0x1005, ARM_CKCTL); | 757 | omap_writew(cpu_is_omap730() ? 0x3005 : 0x1005, ARM_CKCTL); |
752 | ck_dpll1.rate = 60000000; | 758 | ck_dpll1.rate = 60000000; |
753 | propagate_rate(&ck_dpll1); | 759 | propagate_rate(&ck_dpll1); |
754 | } | 760 | } |
@@ -761,13 +767,17 @@ int __init omap1_clk_init(void) | |||
761 | ck_dpll1.rate / 1000000, (ck_dpll1.rate / 100000) % 10, | 767 | ck_dpll1.rate / 1000000, (ck_dpll1.rate / 100000) % 10, |
762 | arm_ck.rate / 1000000, (arm_ck.rate / 100000) % 10); | 768 | arm_ck.rate / 1000000, (arm_ck.rate / 100000) % 10); |
763 | 769 | ||
764 | #ifdef CONFIG_MACH_OMAP_PERSEUS2 | 770 | #if defined(CONFIG_MACH_OMAP_PERSEUS2) || defined(CONFIG_MACH_OMAP_FSAMPLE) |
765 | /* Select slicer output as OMAP input clock */ | 771 | /* Select slicer output as OMAP input clock */ |
766 | omap_writew(omap_readw(OMAP730_PCC_UPLD_CTRL) & ~0x1, OMAP730_PCC_UPLD_CTRL); | 772 | omap_writew(omap_readw(OMAP730_PCC_UPLD_CTRL) & ~0x1, OMAP730_PCC_UPLD_CTRL); |
767 | #endif | 773 | #endif |
768 | 774 | ||
769 | /* Turn off DSP and ARM_TIMXO. Make sure ARM_INTHCK is not divided */ | 775 | /* Turn off DSP and ARM_TIMXO. Make sure ARM_INTHCK is not divided */ |
770 | omap_writew(omap_readw(ARM_CKCTL) & 0x0fff, ARM_CKCTL); | 776 | /* (on 730, bit 13 must not be cleared) */ |
777 | if (cpu_is_omap730()) | ||
778 | omap_writew(omap_readw(ARM_CKCTL) & 0x2fff, ARM_CKCTL); | ||
779 | else | ||
780 | omap_writew(omap_readw(ARM_CKCTL) & 0x0fff, ARM_CKCTL); | ||
771 | 781 | ||
772 | /* Put DSP/MPUI into reset until needed */ | 782 | /* Put DSP/MPUI into reset until needed */ |
773 | omap_writew(0, ARM_RSTCT1); | 783 | omap_writew(0, ARM_RSTCT1); |
diff --git a/arch/arm/mach-omap1/pm.c b/arch/arm/mach-omap1/pm.c index ddf6b07dc9c7..1b4e1d57afb1 100644 --- a/arch/arm/mach-omap1/pm.c +++ b/arch/arm/mach-omap1/pm.c | |||
@@ -1,3 +1,4 @@ | |||
1 | //kernel/linux-omap-fsample/arch/arm/mach-omap1/pm.c#3 - integrate change 4545 (text) | ||
1 | /* | 2 | /* |
2 | * linux/arch/arm/mach-omap1/pm.c | 3 | * linux/arch/arm/mach-omap1/pm.c |
3 | * | 4 | * |
@@ -50,6 +51,7 @@ | |||
50 | #include <asm/mach/irq.h> | 51 | #include <asm/mach/irq.h> |
51 | #include <asm/mach-types.h> | 52 | #include <asm/mach-types.h> |
52 | 53 | ||
54 | #include <asm/arch/cpu.h> | ||
53 | #include <asm/arch/irqs.h> | 55 | #include <asm/arch/irqs.h> |
54 | #include <asm/arch/clock.h> | 56 | #include <asm/arch/clock.h> |
55 | #include <asm/arch/sram.h> | 57 | #include <asm/arch/sram.h> |
@@ -326,8 +328,9 @@ void omap_pm_suspend(void) | |||
326 | /* stop DSP */ | 328 | /* stop DSP */ |
327 | omap_writew(omap_readw(ARM_RSTCT1) & ~(1 << DSP_EN), ARM_RSTCT1); | 329 | omap_writew(omap_readw(ARM_RSTCT1) & ~(1 << DSP_EN), ARM_RSTCT1); |
328 | 330 | ||
329 | /* shut down dsp_ck */ | 331 | /* shut down dsp_ck */ |
330 | omap_writew(omap_readw(ARM_CKCTL) & ~(1 << EN_DSPCK), ARM_CKCTL); | 332 | if (!cpu_is_omap730()) |
333 | omap_writew(omap_readw(ARM_CKCTL) & ~(1 << EN_DSPCK), ARM_CKCTL); | ||
331 | 334 | ||
332 | /* temporarily enabling api_ck to access DSP registers */ | 335 | /* temporarily enabling api_ck to access DSP registers */ |
333 | omap_writew(omap_readw(ARM_IDLECT2) | 1 << EN_APICK, ARM_IDLECT2); | 336 | omap_writew(omap_readw(ARM_IDLECT2) | 1 << EN_APICK, ARM_IDLECT2); |
diff --git a/arch/arm/mach-omap1/time.c b/arch/arm/mach-omap1/time.c index c2d3205bc592..a01f0efdae14 100644 --- a/arch/arm/mach-omap1/time.c +++ b/arch/arm/mach-omap1/time.c | |||
@@ -93,7 +93,7 @@ static inline unsigned long long cycles_2_ns(unsigned long long cyc) | |||
93 | * will break. On P2, the timer count rate is 6.5 MHz after programming PTV | 93 | * will break. On P2, the timer count rate is 6.5 MHz after programming PTV |
94 | * with 0. This divides the 13MHz input by 2, and is undocumented. | 94 | * with 0. This divides the 13MHz input by 2, and is undocumented. |
95 | */ | 95 | */ |
96 | #ifdef CONFIG_MACH_OMAP_PERSEUS2 | 96 | #if defined(CONFIG_MACH_OMAP_PERSEUS2) || defined(CONFIG_MACH_OMAP_FSAMPLE) |
97 | /* REVISIT: This ifdef construct should be replaced by a query to clock | 97 | /* REVISIT: This ifdef construct should be replaced by a query to clock |
98 | * framework to see if timer base frequency is 12.0, 13.0 or 19.2 MHz. | 98 | * framework to see if timer base frequency is 12.0, 13.0 or 19.2 MHz. |
99 | */ | 99 | */ |
diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig index 537dd2e6d380..aab97ccf1e63 100644 --- a/arch/arm/mach-omap2/Kconfig +++ b/arch/arm/mach-omap2/Kconfig | |||
@@ -8,6 +8,7 @@ config ARCH_OMAP24XX | |||
8 | config ARCH_OMAP2420 | 8 | config ARCH_OMAP2420 |
9 | bool "OMAP2420 support" | 9 | bool "OMAP2420 support" |
10 | depends on ARCH_OMAP24XX | 10 | depends on ARCH_OMAP24XX |
11 | select OMAP_DM_TIMER | ||
11 | 12 | ||
12 | comment "OMAP Board Type" | 13 | comment "OMAP Board Type" |
13 | depends on ARCH_OMAP2 | 14 | depends on ARCH_OMAP2 |
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile index 111eaa64258f..266d88e77bdc 100644 --- a/arch/arm/mach-omap2/Makefile +++ b/arch/arm/mach-omap2/Makefile | |||
@@ -3,12 +3,13 @@ | |||
3 | # | 3 | # |
4 | 4 | ||
5 | # Common support | 5 | # Common support |
6 | obj-y := irq.o id.o io.o sram-fn.o memory.o prcm.o clock.o mux.o devices.o serial.o | 6 | obj-y := irq.o id.o io.o sram-fn.o memory.o prcm.o clock.o mux.o devices.o \ |
7 | serial.o gpmc.o | ||
7 | 8 | ||
8 | obj-$(CONFIG_OMAP_MPU_TIMER) += timer-gp.o | 9 | obj-$(CONFIG_OMAP_MPU_TIMER) += timer-gp.o |
9 | 10 | ||
10 | # Power Management | 11 | # Power Management |
11 | obj-$(CONFIG_PM) += pm.o sleep.o | 12 | obj-$(CONFIG_PM) += pm.o pm-domain.o sleep.o |
12 | 13 | ||
13 | # Specific board support | 14 | # Specific board support |
14 | obj-$(CONFIG_MACH_OMAP_GENERIC) += board-generic.o | 15 | obj-$(CONFIG_MACH_OMAP_GENERIC) += board-generic.o |
diff --git a/arch/arm/mach-omap2/clock.c b/arch/arm/mach-omap2/clock.c index 7edf0f69da1e..d1b648a4efbf 100644 --- a/arch/arm/mach-omap2/clock.c +++ b/arch/arm/mach-omap2/clock.c | |||
@@ -659,26 +659,35 @@ static int omap2_clk_set_rate(struct clk *clk, unsigned long rate) | |||
659 | 659 | ||
660 | /* Isolate control register */ | 660 | /* Isolate control register */ |
661 | div_sel = (SRC_RATE_SEL_MASK & clk->flags); | 661 | div_sel = (SRC_RATE_SEL_MASK & clk->flags); |
662 | div_off = clk->src_offset; | 662 | div_off = clk->rate_offset; |
663 | 663 | ||
664 | validrate = omap2_clksel_round_rate(clk, rate, &new_div); | 664 | validrate = omap2_clksel_round_rate(clk, rate, &new_div); |
665 | if(validrate != rate) | 665 | if (validrate != rate) |
666 | return(ret); | 666 | return(ret); |
667 | 667 | ||
668 | field_val = omap2_get_clksel(&div_sel, &field_mask, clk); | 668 | field_val = omap2_get_clksel(&div_sel, &field_mask, clk); |
669 | if (div_sel == 0) | 669 | if (div_sel == 0) |
670 | return ret; | 670 | return ret; |
671 | 671 | ||
672 | if(clk->flags & CM_SYSCLKOUT_SEL1){ | 672 | if (clk->flags & CM_SYSCLKOUT_SEL1) { |
673 | switch(new_div){ | 673 | switch (new_div) { |
674 | case 16: field_val = 4; break; | 674 | case 16: |
675 | case 8: field_val = 3; break; | 675 | field_val = 4; |
676 | case 4: field_val = 2; break; | 676 | break; |
677 | case 2: field_val = 1; break; | 677 | case 8: |
678 | case 1: field_val = 0; break; | 678 | field_val = 3; |
679 | break; | ||
680 | case 4: | ||
681 | field_val = 2; | ||
682 | break; | ||
683 | case 2: | ||
684 | field_val = 1; | ||
685 | break; | ||
686 | case 1: | ||
687 | field_val = 0; | ||
688 | break; | ||
679 | } | 689 | } |
680 | } | 690 | } else |
681 | else | ||
682 | field_val = new_div; | 691 | field_val = new_div; |
683 | 692 | ||
684 | reg = (void __iomem *)div_sel; | 693 | reg = (void __iomem *)div_sel; |
@@ -743,7 +752,7 @@ static u32 omap2_get_src_field(u32 *type_to_addr, u32 reg_offset, | |||
743 | val = 0x2; | 752 | val = 0x2; |
744 | break; | 753 | break; |
745 | case CM_WKUP_SEL1: | 754 | case CM_WKUP_SEL1: |
746 | src_reg_addr = (u32)&CM_CLKSEL2_CORE; | 755 | src_reg_addr = (u32)&CM_CLKSEL_WKUP; |
747 | mask = 0x3; | 756 | mask = 0x3; |
748 | if (src_clk == &func_32k_ck) | 757 | if (src_clk == &func_32k_ck) |
749 | val = 0x0; | 758 | val = 0x0; |
@@ -783,9 +792,9 @@ static u32 omap2_get_src_field(u32 *type_to_addr, u32 reg_offset, | |||
783 | val = 0; | 792 | val = 0; |
784 | if (src_clk == &sys_ck) | 793 | if (src_clk == &sys_ck) |
785 | val = 1; | 794 | val = 1; |
786 | if (src_clk == &func_54m_ck) | ||
787 | val = 2; | ||
788 | if (src_clk == &func_96m_ck) | 795 | if (src_clk == &func_96m_ck) |
796 | val = 2; | ||
797 | if (src_clk == &func_54m_ck) | ||
789 | val = 3; | 798 | val = 3; |
790 | break; | 799 | break; |
791 | } | 800 | } |
diff --git a/arch/arm/mach-omap2/clock.h b/arch/arm/mach-omap2/clock.h index 6c78d471fab7..2781dfbc5164 100644 --- a/arch/arm/mach-omap2/clock.h +++ b/arch/arm/mach-omap2/clock.h | |||
@@ -1062,7 +1062,7 @@ static struct clk gpt2_ick = { | |||
1062 | .parent = &l4_ck, | 1062 | .parent = &l4_ck, |
1063 | .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X, | 1063 | .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X, |
1064 | .enable_reg = (void __iomem *)&CM_ICLKEN1_CORE, /* Bit4 */ | 1064 | .enable_reg = (void __iomem *)&CM_ICLKEN1_CORE, /* Bit4 */ |
1065 | .enable_bit = 0, | 1065 | .enable_bit = 4, |
1066 | .recalc = &omap2_followparent_recalc, | 1066 | .recalc = &omap2_followparent_recalc, |
1067 | }; | 1067 | }; |
1068 | 1068 | ||
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c index 4842ffe26705..aa4322451e8b 100644 --- a/arch/arm/mach-omap2/devices.c +++ b/arch/arm/mach-omap2/devices.c | |||
@@ -104,6 +104,51 @@ static inline void omap_init_sti(void) | |||
104 | static inline void omap_init_sti(void) {} | 104 | static inline void omap_init_sti(void) {} |
105 | #endif | 105 | #endif |
106 | 106 | ||
107 | #if defined(CONFIG_SPI_OMAP24XX) | ||
108 | |||
109 | #include <asm/arch/mcspi.h> | ||
110 | |||
111 | #define OMAP2_MCSPI1_BASE 0x48098000 | ||
112 | #define OMAP2_MCSPI2_BASE 0x4809a000 | ||
113 | |||
114 | /* FIXME: use resources instead */ | ||
115 | |||
116 | static struct omap2_mcspi_platform_config omap2_mcspi1_config = { | ||
117 | .base = io_p2v(OMAP2_MCSPI1_BASE), | ||
118 | .num_cs = 4, | ||
119 | }; | ||
120 | |||
121 | struct platform_device omap2_mcspi1 = { | ||
122 | .name = "omap2_mcspi", | ||
123 | .id = 1, | ||
124 | .dev = { | ||
125 | .platform_data = &omap2_mcspi1_config, | ||
126 | }, | ||
127 | }; | ||
128 | |||
129 | static struct omap2_mcspi_platform_config omap2_mcspi2_config = { | ||
130 | .base = io_p2v(OMAP2_MCSPI2_BASE), | ||
131 | .num_cs = 2, | ||
132 | }; | ||
133 | |||
134 | struct platform_device omap2_mcspi2 = { | ||
135 | .name = "omap2_mcspi", | ||
136 | .id = 2, | ||
137 | .dev = { | ||
138 | .platform_data = &omap2_mcspi2_config, | ||
139 | }, | ||
140 | }; | ||
141 | |||
142 | static void omap_init_mcspi(void) | ||
143 | { | ||
144 | platform_device_register(&omap2_mcspi1); | ||
145 | platform_device_register(&omap2_mcspi2); | ||
146 | } | ||
147 | |||
148 | #else | ||
149 | static inline void omap_init_mcspi(void) {} | ||
150 | #endif | ||
151 | |||
107 | /*-------------------------------------------------------------------------*/ | 152 | /*-------------------------------------------------------------------------*/ |
108 | 153 | ||
109 | static int __init omap2_init_devices(void) | 154 | static int __init omap2_init_devices(void) |
@@ -112,6 +157,7 @@ static int __init omap2_init_devices(void) | |||
112 | * in alphabetical order so they're easier to sort through. | 157 | * in alphabetical order so they're easier to sort through. |
113 | */ | 158 | */ |
114 | omap_init_i2c(); | 159 | omap_init_i2c(); |
160 | omap_init_mcspi(); | ||
115 | omap_init_sti(); | 161 | omap_init_sti(); |
116 | 162 | ||
117 | return 0; | 163 | return 0; |
diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c new file mode 100644 index 000000000000..c7a48f921fef --- /dev/null +++ b/arch/arm/mach-omap2/gpmc.c | |||
@@ -0,0 +1,209 @@ | |||
1 | /* | ||
2 | * GPMC support functions | ||
3 | * | ||
4 | * Copyright (C) 2005-2006 Nokia Corporation | ||
5 | * | ||
6 | * Author: Juha Yrjola | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | #include <linux/kernel.h> | ||
13 | #include <linux/init.h> | ||
14 | #include <linux/err.h> | ||
15 | #include <linux/clk.h> | ||
16 | |||
17 | #include <asm/io.h> | ||
18 | #include <asm/arch/gpmc.h> | ||
19 | |||
20 | #undef DEBUG | ||
21 | |||
22 | #define GPMC_BASE 0x6800a000 | ||
23 | #define GPMC_REVISION 0x00 | ||
24 | #define GPMC_SYSCONFIG 0x10 | ||
25 | #define GPMC_SYSSTATUS 0x14 | ||
26 | #define GPMC_IRQSTATUS 0x18 | ||
27 | #define GPMC_IRQENABLE 0x1c | ||
28 | #define GPMC_TIMEOUT_CONTROL 0x40 | ||
29 | #define GPMC_ERR_ADDRESS 0x44 | ||
30 | #define GPMC_ERR_TYPE 0x48 | ||
31 | #define GPMC_CONFIG 0x50 | ||
32 | #define GPMC_STATUS 0x54 | ||
33 | #define GPMC_PREFETCH_CONFIG1 0x1e0 | ||
34 | #define GPMC_PREFETCH_CONFIG2 0x1e4 | ||
35 | #define GPMC_PREFETCH_CONTROL 0x1e8 | ||
36 | #define GPMC_PREFETCH_STATUS 0x1f0 | ||
37 | #define GPMC_ECC_CONFIG 0x1f4 | ||
38 | #define GPMC_ECC_CONTROL 0x1f8 | ||
39 | #define GPMC_ECC_SIZE_CONFIG 0x1fc | ||
40 | |||
41 | #define GPMC_CS0 0x60 | ||
42 | #define GPMC_CS_SIZE 0x30 | ||
43 | |||
44 | static void __iomem *gpmc_base = | ||
45 | (void __iomem *) IO_ADDRESS(GPMC_BASE); | ||
46 | static void __iomem *gpmc_cs_base = | ||
47 | (void __iomem *) IO_ADDRESS(GPMC_BASE) + GPMC_CS0; | ||
48 | |||
49 | static struct clk *gpmc_l3_clk; | ||
50 | |||
51 | static void gpmc_write_reg(int idx, u32 val) | ||
52 | { | ||
53 | __raw_writel(val, gpmc_base + idx); | ||
54 | } | ||
55 | |||
56 | static u32 gpmc_read_reg(int idx) | ||
57 | { | ||
58 | return __raw_readl(gpmc_base + idx); | ||
59 | } | ||
60 | |||
61 | void gpmc_cs_write_reg(int cs, int idx, u32 val) | ||
62 | { | ||
63 | void __iomem *reg_addr; | ||
64 | |||
65 | reg_addr = gpmc_cs_base + (cs * GPMC_CS_SIZE) + idx; | ||
66 | __raw_writel(val, reg_addr); | ||
67 | } | ||
68 | |||
69 | u32 gpmc_cs_read_reg(int cs, int idx) | ||
70 | { | ||
71 | return __raw_readl(gpmc_cs_base + (cs * GPMC_CS_SIZE) + idx); | ||
72 | } | ||
73 | |||
74 | /* TODO: Add support for gpmc_fck to clock framework and use it */ | ||
75 | static unsigned long gpmc_get_fclk_period(void) | ||
76 | { | ||
77 | /* In picoseconds */ | ||
78 | return 1000000000 / ((clk_get_rate(gpmc_l3_clk)) / 1000); | ||
79 | } | ||
80 | |||
81 | unsigned int gpmc_ns_to_ticks(unsigned int time_ns) | ||
82 | { | ||
83 | unsigned long tick_ps; | ||
84 | |||
85 | /* Calculate in picosecs to yield more exact results */ | ||
86 | tick_ps = gpmc_get_fclk_period(); | ||
87 | |||
88 | return (time_ns * 1000 + tick_ps - 1) / tick_ps; | ||
89 | } | ||
90 | |||
91 | #ifdef DEBUG | ||
92 | static int set_gpmc_timing_reg(int cs, int reg, int st_bit, int end_bit, | ||
93 | int time, const char *name) | ||
94 | #else | ||
95 | static int set_gpmc_timing_reg(int cs, int reg, int st_bit, int end_bit, | ||
96 | int time) | ||
97 | #endif | ||
98 | { | ||
99 | u32 l; | ||
100 | int ticks, mask, nr_bits; | ||
101 | |||
102 | if (time == 0) | ||
103 | ticks = 0; | ||
104 | else | ||
105 | ticks = gpmc_ns_to_ticks(time); | ||
106 | nr_bits = end_bit - st_bit + 1; | ||
107 | if (ticks >= 1 << nr_bits) | ||
108 | return -1; | ||
109 | |||
110 | mask = (1 << nr_bits) - 1; | ||
111 | l = gpmc_cs_read_reg(cs, reg); | ||
112 | #ifdef DEBUG | ||
113 | printk(KERN_INFO "GPMC CS%d: %-10s: %d ticks, %3lu ns (was %i ticks)\n", | ||
114 | cs, name, ticks, gpmc_get_fclk_period() * ticks / 1000, | ||
115 | (l >> st_bit) & mask); | ||
116 | #endif | ||
117 | l &= ~(mask << st_bit); | ||
118 | l |= ticks << st_bit; | ||
119 | gpmc_cs_write_reg(cs, reg, l); | ||
120 | |||
121 | return 0; | ||
122 | } | ||
123 | |||
124 | #ifdef DEBUG | ||
125 | #define GPMC_SET_ONE(reg, st, end, field) \ | ||
126 | if (set_gpmc_timing_reg(cs, (reg), (st), (end), \ | ||
127 | t->field, #field) < 0) \ | ||
128 | return -1 | ||
129 | #else | ||
130 | #define GPMC_SET_ONE(reg, st, end, field) \ | ||
131 | if (set_gpmc_timing_reg(cs, (reg), (st), (end), t->field) < 0) \ | ||
132 | return -1 | ||
133 | #endif | ||
134 | |||
135 | int gpmc_cs_calc_divider(int cs, unsigned int sync_clk) | ||
136 | { | ||
137 | int div; | ||
138 | u32 l; | ||
139 | |||
140 | l = sync_clk * 1000 + (gpmc_get_fclk_period() - 1); | ||
141 | div = l / gpmc_get_fclk_period(); | ||
142 | if (div > 4) | ||
143 | return -1; | ||
144 | if (div < 0) | ||
145 | div = 1; | ||
146 | |||
147 | return div; | ||
148 | } | ||
149 | |||
150 | int gpmc_cs_set_timings(int cs, const struct gpmc_timings *t) | ||
151 | { | ||
152 | int div; | ||
153 | u32 l; | ||
154 | |||
155 | div = gpmc_cs_calc_divider(cs, t->sync_clk); | ||
156 | if (div < 0) | ||
157 | return -1; | ||
158 | |||
159 | GPMC_SET_ONE(GPMC_CS_CONFIG2, 0, 3, cs_on); | ||
160 | GPMC_SET_ONE(GPMC_CS_CONFIG2, 8, 12, cs_rd_off); | ||
161 | GPMC_SET_ONE(GPMC_CS_CONFIG2, 16, 20, cs_wr_off); | ||
162 | |||
163 | GPMC_SET_ONE(GPMC_CS_CONFIG3, 0, 3, adv_on); | ||
164 | GPMC_SET_ONE(GPMC_CS_CONFIG3, 8, 12, adv_rd_off); | ||
165 | GPMC_SET_ONE(GPMC_CS_CONFIG3, 16, 20, adv_wr_off); | ||
166 | |||
167 | GPMC_SET_ONE(GPMC_CS_CONFIG4, 0, 3, oe_on); | ||
168 | GPMC_SET_ONE(GPMC_CS_CONFIG4, 8, 12, oe_off); | ||
169 | GPMC_SET_ONE(GPMC_CS_CONFIG4, 16, 19, we_on); | ||
170 | GPMC_SET_ONE(GPMC_CS_CONFIG4, 24, 28, we_off); | ||
171 | |||
172 | GPMC_SET_ONE(GPMC_CS_CONFIG5, 0, 4, rd_cycle); | ||
173 | GPMC_SET_ONE(GPMC_CS_CONFIG5, 8, 12, wr_cycle); | ||
174 | GPMC_SET_ONE(GPMC_CS_CONFIG5, 16, 20, access); | ||
175 | |||
176 | GPMC_SET_ONE(GPMC_CS_CONFIG5, 24, 27, page_burst_access); | ||
177 | |||
178 | #ifdef DEBUG | ||
179 | printk(KERN_INFO "GPMC CS%d CLK period is %lu (div %d)\n", | ||
180 | cs, gpmc_get_fclk_period(), div); | ||
181 | #endif | ||
182 | |||
183 | l = gpmc_cs_read_reg(cs, GPMC_CS_CONFIG1); | ||
184 | l &= ~0x03; | ||
185 | l |= (div - 1); | ||
186 | |||
187 | return 0; | ||
188 | } | ||
189 | |||
190 | unsigned long gpmc_cs_get_base_addr(int cs) | ||
191 | { | ||
192 | return (gpmc_cs_read_reg(cs, GPMC_CS_CONFIG7) & 0x1f) << 24; | ||
193 | } | ||
194 | |||
195 | void __init gpmc_init(void) | ||
196 | { | ||
197 | u32 l; | ||
198 | |||
199 | gpmc_l3_clk = clk_get(NULL, "core_l3_ck"); | ||
200 | BUG_ON(IS_ERR(gpmc_l3_clk)); | ||
201 | |||
202 | l = gpmc_read_reg(GPMC_REVISION); | ||
203 | printk(KERN_INFO "GPMC revision %d.%d\n", (l >> 4) & 0x0f, l & 0x0f); | ||
204 | /* Set smart idle mode and automatic L3 clock gating */ | ||
205 | l = gpmc_read_reg(GPMC_SYSCONFIG); | ||
206 | l &= 0x03 << 3; | ||
207 | l |= (0x02 << 3) | (1 << 0); | ||
208 | gpmc_write_reg(GPMC_SYSCONFIG, l); | ||
209 | } | ||
diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c index 20dd6e74e91d..a0728c33e5d9 100644 --- a/arch/arm/mach-omap2/io.c +++ b/arch/arm/mach-omap2/io.c | |||
@@ -26,6 +26,7 @@ | |||
26 | extern void omap_sram_init(void); | 26 | extern void omap_sram_init(void); |
27 | extern int omap2_clk_init(void); | 27 | extern int omap2_clk_init(void); |
28 | extern void omap2_check_revision(void); | 28 | extern void omap2_check_revision(void); |
29 | extern void gpmc_init(void); | ||
29 | 30 | ||
30 | /* | 31 | /* |
31 | * The machine specific code may provide the extra mapping besides the | 32 | * The machine specific code may provide the extra mapping besides the |
@@ -66,4 +67,5 @@ void __init omap2_init_common_hw(void) | |||
66 | { | 67 | { |
67 | omap2_mux_init(); | 68 | omap2_mux_init(); |
68 | omap2_clk_init(); | 69 | omap2_clk_init(); |
70 | gpmc_init(); | ||
69 | } | 71 | } |
diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c index 4c5f2c04883e..60ef084faffd 100644 --- a/arch/arm/mach-omap2/mux.c +++ b/arch/arm/mach-omap2/mux.c | |||
@@ -52,6 +52,12 @@ MUX_CFG_24XX("W19_24XX_SYS_NIRQ", 0x12c, 0, 1, 1, 1) | |||
52 | /* 24xx clocks */ | 52 | /* 24xx clocks */ |
53 | MUX_CFG_24XX("W14_24XX_SYS_CLKOUT", 0x137, 0, 1, 1, 1) | 53 | MUX_CFG_24XX("W14_24XX_SYS_CLKOUT", 0x137, 0, 1, 1, 1) |
54 | 54 | ||
55 | /* 24xx GPMC wait pin monitoring */ | ||
56 | MUX_CFG_24XX("L3_GPMC_WAIT0", 0x09a, 0, 1, 1, 1) | ||
57 | MUX_CFG_24XX("N7_GPMC_WAIT1", 0x09b, 0, 1, 1, 1) | ||
58 | MUX_CFG_24XX("M1_GPMC_WAIT2", 0x09c, 0, 1, 1, 1) | ||
59 | MUX_CFG_24XX("P1_GPMC_WAIT3", 0x09d, 0, 1, 1, 1) | ||
60 | |||
55 | /* 24xx McBSP */ | 61 | /* 24xx McBSP */ |
56 | MUX_CFG_24XX("Y15_24XX_MCBSP2_CLKX", 0x124, 1, 1, 0, 1) | 62 | MUX_CFG_24XX("Y15_24XX_MCBSP2_CLKX", 0x124, 1, 1, 0, 1) |
57 | MUX_CFG_24XX("R14_24XX_MCBSP2_FSX", 0x125, 1, 1, 0, 1) | 63 | MUX_CFG_24XX("R14_24XX_MCBSP2_FSX", 0x125, 1, 1, 0, 1) |
@@ -59,18 +65,38 @@ MUX_CFG_24XX("W15_24XX_MCBSP2_DR", 0x126, 1, 1, 0, 1) | |||
59 | MUX_CFG_24XX("V15_24XX_MCBSP2_DX", 0x127, 1, 1, 0, 1) | 65 | MUX_CFG_24XX("V15_24XX_MCBSP2_DX", 0x127, 1, 1, 0, 1) |
60 | 66 | ||
61 | /* 24xx GPIO */ | 67 | /* 24xx GPIO */ |
62 | MUX_CFG_24XX("M21_242X_GPIO11", 0x0c9, 3, 1, 1, 1) | 68 | MUX_CFG_24XX("M21_242X_GPIO11", 0x0c9, 3, 1, 1, 1) |
63 | MUX_CFG_24XX("AA10_242X_GPIO13", 0x0e5, 3, 0, 0, 1) | 69 | MUX_CFG_24XX("AA10_242X_GPIO13", 0x0e5, 3, 0, 0, 1) |
64 | MUX_CFG_24XX("AA6_242X_GPIO14", 0x0e6, 3, 0, 0, 1) | 70 | MUX_CFG_24XX("AA6_242X_GPIO14", 0x0e6, 3, 0, 0, 1) |
65 | MUX_CFG_24XX("AA4_242X_GPIO15", 0x0e7, 3, 0, 0, 1) | 71 | MUX_CFG_24XX("AA4_242X_GPIO15", 0x0e7, 3, 0, 0, 1) |
66 | MUX_CFG_24XX("Y11_242X_GPIO16", 0x0e8, 3, 0, 0, 1) | 72 | MUX_CFG_24XX("Y11_242X_GPIO16", 0x0e8, 3, 0, 0, 1) |
67 | MUX_CFG_24XX("AA12_242X_GPIO17", 0x0e9, 3, 0, 0, 1) | 73 | MUX_CFG_24XX("AA12_242X_GPIO17", 0x0e9, 3, 0, 0, 1) |
68 | MUX_CFG_24XX("AA8_242X_GPIO58", 0x0ea, 3, 0, 0, 1) | 74 | MUX_CFG_24XX("AA8_242X_GPIO58", 0x0ea, 3, 0, 0, 1) |
69 | MUX_CFG_24XX("Y20_24XX_GPIO60", 0x12c, 3, 0, 0, 1) | 75 | MUX_CFG_24XX("Y20_24XX_GPIO60", 0x12c, 3, 0, 0, 1) |
70 | MUX_CFG_24XX("W4__24XX_GPIO74", 0x0f2, 3, 0, 0, 1) | 76 | MUX_CFG_24XX("W4__24XX_GPIO74", 0x0f2, 3, 0, 0, 1) |
71 | MUX_CFG_24XX("M15_24XX_GPIO92", 0x10a, 3, 0, 0, 1) | 77 | MUX_CFG_24XX("M15_24XX_GPIO92", 0x10a, 3, 0, 0, 1) |
72 | MUX_CFG_24XX("V14_24XX_GPIO117", 0x128, 3, 1, 0, 1) | 78 | MUX_CFG_24XX("V14_24XX_GPIO117", 0x128, 3, 1, 0, 1) |
73 | 79 | ||
80 | /* 242x DBG GPIO */ | ||
81 | MUX_CFG_24XX("V4_242X_GPIO49", 0xd3, 3, 0, 0, 1) | ||
82 | MUX_CFG_24XX("W2_242X_GPIO50", 0xd4, 3, 0, 0, 1) | ||
83 | MUX_CFG_24XX("U4_242X_GPIO51", 0xd5, 3, 0, 0, 1) | ||
84 | MUX_CFG_24XX("V3_242X_GPIO52", 0xd6, 3, 0, 0, 1) | ||
85 | MUX_CFG_24XX("V2_242X_GPIO53", 0xd7, 3, 0, 0, 1) | ||
86 | MUX_CFG_24XX("V6_242X_GPIO53", 0xcf, 3, 0, 0, 1) | ||
87 | MUX_CFG_24XX("T4_242X_GPIO54", 0xd8, 3, 0, 0, 1) | ||
88 | MUX_CFG_24XX("Y4_242X_GPIO54", 0xd0, 3, 0, 0, 1) | ||
89 | MUX_CFG_24XX("T3_242X_GPIO55", 0xd9, 3, 0, 0, 1) | ||
90 | MUX_CFG_24XX("U2_242X_GPIO56", 0xda, 3, 0, 0, 1) | ||
91 | |||
92 | /* 24xx external DMA requests */ | ||
93 | MUX_CFG_24XX("AA10_242X_DMAREQ0", 0x0e5, 2, 0, 0, 1) | ||
94 | MUX_CFG_24XX("AA6_242X_DMAREQ1", 0x0e6, 2, 0, 0, 1) | ||
95 | MUX_CFG_24XX("E4_242X_DMAREQ2", 0x074, 2, 0, 0, 1) | ||
96 | MUX_CFG_24XX("G4_242X_DMAREQ3", 0x073, 2, 0, 0, 1) | ||
97 | MUX_CFG_24XX("D3_242X_DMAREQ4", 0x072, 2, 0, 0, 1) | ||
98 | MUX_CFG_24XX("E3_242X_DMAREQ5", 0x071, 2, 0, 0, 1) | ||
99 | |||
74 | /* TSC IRQ */ | 100 | /* TSC IRQ */ |
75 | MUX_CFG_24XX("P20_24XX_TSC_IRQ", 0x108, 0, 0, 0, 1) | 101 | MUX_CFG_24XX("P20_24XX_TSC_IRQ", 0x108, 0, 0, 0, 1) |
76 | 102 | ||
diff --git a/arch/arm/mach-omap2/pm-domain.c b/arch/arm/mach-omap2/pm-domain.c new file mode 100644 index 000000000000..5e20e740cde5 --- /dev/null +++ b/arch/arm/mach-omap2/pm-domain.c | |||
@@ -0,0 +1,300 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-omap2/pm-domain.c | ||
3 | * | ||
4 | * Power domain functions for OMAP2 | ||
5 | * | ||
6 | * Copyright (C) 2006 Nokia Corporation | ||
7 | * Tony Lindgren <tony@atomide.com> | ||
8 | * | ||
9 | * Some code based on earlier OMAP2 sample PM code | ||
10 | * Copyright (C) 2005 Texas Instruments, Inc. | ||
11 | * Richard Woodruff <r-woodruff2@ti.com> | ||
12 | * | ||
13 | * This program is free software; you can redistribute it and/or modify | ||
14 | * it under the terms of the GNU General Public License version 2 as | ||
15 | * published by the Free Software Foundation. | ||
16 | */ | ||
17 | |||
18 | #include <linux/config.h> | ||
19 | #include <linux/module.h> | ||
20 | #include <linux/init.h> | ||
21 | #include <linux/clk.h> | ||
22 | |||
23 | #include <asm/io.h> | ||
24 | |||
25 | #include "prcm-regs.h" | ||
26 | |||
27 | /* Power domain offsets */ | ||
28 | #define PM_MPU_OFFSET 0x100 | ||
29 | #define PM_CORE_OFFSET 0x200 | ||
30 | #define PM_GFX_OFFSET 0x300 | ||
31 | #define PM_WKUP_OFFSET 0x400 /* Autoidle only */ | ||
32 | #define PM_PLL_OFFSET 0x500 /* Autoidle only */ | ||
33 | #define PM_DSP_OFFSET 0x800 | ||
34 | #define PM_MDM_OFFSET 0xc00 | ||
35 | |||
36 | /* Power domain wake-up dependency control register */ | ||
37 | #define PM_WKDEP_OFFSET 0xc8 | ||
38 | #define EN_MDM (1 << 5) | ||
39 | #define EN_WKUP (1 << 4) | ||
40 | #define EN_GFX (1 << 3) | ||
41 | #define EN_DSP (1 << 2) | ||
42 | #define EN_MPU (1 << 1) | ||
43 | #define EN_CORE (1 << 0) | ||
44 | |||
45 | /* Core power domain state transition control register */ | ||
46 | #define PM_PWSTCTRL_OFFSET 0xe0 | ||
47 | #define FORCESTATE (1 << 18) /* Only for DSP & GFX */ | ||
48 | #define MEM4RETSTATE (1 << 6) | ||
49 | #define MEM3RETSTATE (1 << 5) | ||
50 | #define MEM2RETSTATE (1 << 4) | ||
51 | #define MEM1RETSTATE (1 << 3) | ||
52 | #define LOGICRETSTATE (1 << 2) /* Logic is retained */ | ||
53 | #define POWERSTATE_OFF 0x3 | ||
54 | #define POWERSTATE_RETENTION 0x1 | ||
55 | #define POWERSTATE_ON 0x0 | ||
56 | |||
57 | /* Power domain state register */ | ||
58 | #define PM_PWSTST_OFFSET 0xe4 | ||
59 | |||
60 | /* Hardware supervised state transition control register */ | ||
61 | #define CM_CLKSTCTRL_OFFSET 0x48 | ||
62 | #define AUTOSTAT_MPU (1 << 0) /* MPU */ | ||
63 | #define AUTOSTAT_DSS (1 << 2) /* Core */ | ||
64 | #define AUTOSTAT_L4 (1 << 1) /* Core */ | ||
65 | #define AUTOSTAT_L3 (1 << 0) /* Core */ | ||
66 | #define AUTOSTAT_GFX (1 << 0) /* GFX */ | ||
67 | #define AUTOSTAT_IVA (1 << 8) /* 2420 IVA in DSP domain */ | ||
68 | #define AUTOSTAT_DSP (1 << 0) /* DSP */ | ||
69 | #define AUTOSTAT_MDM (1 << 0) /* MDM */ | ||
70 | |||
71 | /* Automatic control of interface clock idling */ | ||
72 | #define CM_AUTOIDLE1_OFFSET 0x30 | ||
73 | #define CM_AUTOIDLE2_OFFSET 0x34 /* Core only */ | ||
74 | #define CM_AUTOIDLE3_OFFSET 0x38 /* Core only */ | ||
75 | #define CM_AUTOIDLE4_OFFSET 0x3c /* Core only */ | ||
76 | #define AUTO_54M(x) (((x) & 0x3) << 6) | ||
77 | #define AUTO_96M(x) (((x) & 0x3) << 2) | ||
78 | #define AUTO_DPLL(x) (((x) & 0x3) << 0) | ||
79 | #define AUTO_STOPPED 0x3 | ||
80 | #define AUTO_BYPASS_FAST 0x2 /* DPLL only */ | ||
81 | #define AUTO_BYPASS_LOW_POWER 0x1 /* DPLL only */ | ||
82 | #define AUTO_DISABLED 0x0 | ||
83 | |||
84 | /* Voltage control PRCM_VOLTCTRL bits */ | ||
85 | #define AUTO_EXTVOLT (1 << 15) | ||
86 | #define FORCE_EXTVOLT (1 << 14) | ||
87 | #define SETOFF_LEVEL(x) (((x) & 0x3) << 12) | ||
88 | #define MEMRETCTRL (1 << 8) | ||
89 | #define SETRET_LEVEL(x) (((x) & 0x3) << 6) | ||
90 | #define VOLT_LEVEL(x) (((x) & 0x3) << 0) | ||
91 | |||
92 | #define OMAP24XX_PRCM_VBASE IO_ADDRESS(OMAP24XX_PRCM_BASE) | ||
93 | #define prcm_readl(r) __raw_readl(OMAP24XX_PRCM_VBASE + (r)) | ||
94 | #define prcm_writel(v, r) __raw_writel((v), OMAP24XX_PRCM_VBASE + (r)) | ||
95 | |||
96 | static u32 pmdomain_get_wakeup_dependencies(int domain_offset) | ||
97 | { | ||
98 | return prcm_readl(domain_offset + PM_WKDEP_OFFSET); | ||
99 | } | ||
100 | |||
101 | static void pmdomain_set_wakeup_dependencies(u32 state, int domain_offset) | ||
102 | { | ||
103 | prcm_writel(state, domain_offset + PM_WKDEP_OFFSET); | ||
104 | } | ||
105 | |||
106 | static u32 pmdomain_get_powerstate(int domain_offset) | ||
107 | { | ||
108 | return prcm_readl(domain_offset + PM_PWSTCTRL_OFFSET); | ||
109 | } | ||
110 | |||
111 | static void pmdomain_set_powerstate(u32 state, int domain_offset) | ||
112 | { | ||
113 | prcm_writel(state, domain_offset + PM_PWSTCTRL_OFFSET); | ||
114 | } | ||
115 | |||
116 | static u32 pmdomain_get_clock_autocontrol(int domain_offset) | ||
117 | { | ||
118 | return prcm_readl(domain_offset + CM_CLKSTCTRL_OFFSET); | ||
119 | } | ||
120 | |||
121 | static void pmdomain_set_clock_autocontrol(u32 state, int domain_offset) | ||
122 | { | ||
123 | prcm_writel(state, domain_offset + CM_CLKSTCTRL_OFFSET); | ||
124 | } | ||
125 | |||
126 | static u32 pmdomain_get_clock_autoidle1(int domain_offset) | ||
127 | { | ||
128 | return prcm_readl(domain_offset + CM_AUTOIDLE1_OFFSET); | ||
129 | } | ||
130 | |||
131 | /* Core domain only */ | ||
132 | static u32 pmdomain_get_clock_autoidle2(int domain_offset) | ||
133 | { | ||
134 | return prcm_readl(domain_offset + CM_AUTOIDLE2_OFFSET); | ||
135 | } | ||
136 | |||
137 | /* Core domain only */ | ||
138 | static u32 pmdomain_get_clock_autoidle3(int domain_offset) | ||
139 | { | ||
140 | return prcm_readl(domain_offset + CM_AUTOIDLE3_OFFSET); | ||
141 | } | ||
142 | |||
143 | /* Core domain only */ | ||
144 | static u32 pmdomain_get_clock_autoidle4(int domain_offset) | ||
145 | { | ||
146 | return prcm_readl(domain_offset + CM_AUTOIDLE4_OFFSET); | ||
147 | } | ||
148 | |||
149 | static void pmdomain_set_clock_autoidle1(u32 state, int domain_offset) | ||
150 | { | ||
151 | prcm_writel(state, CM_AUTOIDLE1_OFFSET + domain_offset); | ||
152 | } | ||
153 | |||
154 | /* Core domain only */ | ||
155 | static void pmdomain_set_clock_autoidle2(u32 state, int domain_offset) | ||
156 | { | ||
157 | prcm_writel(state, CM_AUTOIDLE2_OFFSET + domain_offset); | ||
158 | } | ||
159 | |||
160 | /* Core domain only */ | ||
161 | static void pmdomain_set_clock_autoidle3(u32 state, int domain_offset) | ||
162 | { | ||
163 | prcm_writel(state, CM_AUTOIDLE3_OFFSET + domain_offset); | ||
164 | } | ||
165 | |||
166 | /* Core domain only */ | ||
167 | static void pmdomain_set_clock_autoidle4(u32 state, int domain_offset) | ||
168 | { | ||
169 | prcm_writel(state, CM_AUTOIDLE4_OFFSET + domain_offset); | ||
170 | } | ||
171 | |||
172 | /* | ||
173 | * Configures power management domains to idle clocks automatically. | ||
174 | */ | ||
175 | void pmdomain_set_autoidle(void) | ||
176 | { | ||
177 | u32 val; | ||
178 | |||
179 | /* Set PLL auto stop for 54M, 96M & DPLL */ | ||
180 | pmdomain_set_clock_autoidle1(AUTO_54M(AUTO_STOPPED) | | ||
181 | AUTO_96M(AUTO_STOPPED) | | ||
182 | AUTO_DPLL(AUTO_STOPPED), PM_PLL_OFFSET); | ||
183 | |||
184 | /* External clock input control | ||
185 | * REVISIT: Should this be in clock framework? | ||
186 | */ | ||
187 | PRCM_CLKSRC_CTRL |= (0x3 << 3); | ||
188 | |||
189 | /* Configure number of 32KHz clock cycles for sys_clk */ | ||
190 | PRCM_CLKSSETUP = 0x00ff; | ||
191 | |||
192 | /* Configure automatic voltage transition */ | ||
193 | PRCM_VOLTSETUP = 0; | ||
194 | val = PRCM_VOLTCTRL; | ||
195 | val &= ~(SETOFF_LEVEL(0x3) | VOLT_LEVEL(0x3)); | ||
196 | val |= SETOFF_LEVEL(1) | VOLT_LEVEL(1) | AUTO_EXTVOLT; | ||
197 | PRCM_VOLTCTRL = val; | ||
198 | |||
199 | /* Disable emulation tools functional clock */ | ||
200 | PRCM_CLKEMUL_CTRL = 0x0; | ||
201 | |||
202 | /* Set core memory retention state */ | ||
203 | val = pmdomain_get_powerstate(PM_CORE_OFFSET); | ||
204 | if (cpu_is_omap2420()) { | ||
205 | val &= ~(0x7 << 3); | ||
206 | val |= (MEM3RETSTATE | MEM2RETSTATE | MEM1RETSTATE); | ||
207 | } else { | ||
208 | val &= ~(0xf << 3); | ||
209 | val |= (MEM4RETSTATE | MEM3RETSTATE | MEM2RETSTATE | | ||
210 | MEM1RETSTATE); | ||
211 | } | ||
212 | pmdomain_set_powerstate(val, PM_CORE_OFFSET); | ||
213 | |||
214 | /* OCP interface smart idle. REVISIT: Enable autoidle bit0 ? */ | ||
215 | val = SMS_SYSCONFIG; | ||
216 | val &= ~(0x3 << 3); | ||
217 | val |= (0x2 << 3) | (1 << 0); | ||
218 | SMS_SYSCONFIG |= val; | ||
219 | |||
220 | val = SDRC_SYSCONFIG; | ||
221 | val &= ~(0x3 << 3); | ||
222 | val |= (0x2 << 3); | ||
223 | SDRC_SYSCONFIG = val; | ||
224 | |||
225 | /* Configure L3 interface for smart idle. | ||
226 | * REVISIT: Enable autoidle bit0 ? | ||
227 | */ | ||
228 | val = GPMC_SYSCONFIG; | ||
229 | val &= ~(0x3 << 3); | ||
230 | val |= (0x2 << 3) | (1 << 0); | ||
231 | GPMC_SYSCONFIG = val; | ||
232 | |||
233 | pmdomain_set_powerstate(LOGICRETSTATE | POWERSTATE_RETENTION, | ||
234 | PM_MPU_OFFSET); | ||
235 | pmdomain_set_powerstate(POWERSTATE_RETENTION, PM_CORE_OFFSET); | ||
236 | if (!cpu_is_omap2420()) | ||
237 | pmdomain_set_powerstate(POWERSTATE_RETENTION, PM_MDM_OFFSET); | ||
238 | |||
239 | /* Assume suspend function has saved the state for DSP and GFX */ | ||
240 | pmdomain_set_powerstate(FORCESTATE | POWERSTATE_OFF, PM_DSP_OFFSET); | ||
241 | pmdomain_set_powerstate(FORCESTATE | POWERSTATE_OFF, PM_GFX_OFFSET); | ||
242 | |||
243 | #if 0 | ||
244 | /* REVISIT: Internal USB needs special handling */ | ||
245 | force_standby_usb(); | ||
246 | if (cpu_is_omap2430()) | ||
247 | force_hsmmc(); | ||
248 | sdram_self_refresh_on_idle_req(1); | ||
249 | #endif | ||
250 | |||
251 | /* Enable clock auto control for all domains. | ||
252 | * Note that CORE domain includes also DSS, L4 & L3. | ||
253 | */ | ||
254 | pmdomain_set_clock_autocontrol(AUTOSTAT_MPU, PM_MPU_OFFSET); | ||
255 | pmdomain_set_clock_autocontrol(AUTOSTAT_GFX, PM_GFX_OFFSET); | ||
256 | pmdomain_set_clock_autocontrol(AUTOSTAT_DSS | AUTOSTAT_L4 | AUTOSTAT_L3, | ||
257 | PM_CORE_OFFSET); | ||
258 | if (cpu_is_omap2420()) | ||
259 | pmdomain_set_clock_autocontrol(AUTOSTAT_IVA | AUTOSTAT_DSP, | ||
260 | PM_DSP_OFFSET); | ||
261 | else { | ||
262 | pmdomain_set_clock_autocontrol(AUTOSTAT_DSP, PM_DSP_OFFSET); | ||
263 | pmdomain_set_clock_autocontrol(AUTOSTAT_MDM, PM_MDM_OFFSET); | ||
264 | } | ||
265 | |||
266 | /* Enable clock autoidle for all domains */ | ||
267 | pmdomain_set_clock_autoidle1(0x2, PM_DSP_OFFSET); | ||
268 | if (cpu_is_omap2420()) { | ||
269 | pmdomain_set_clock_autoidle1(0xfffffff9, PM_CORE_OFFSET); | ||
270 | pmdomain_set_clock_autoidle2(0x7, PM_CORE_OFFSET); | ||
271 | pmdomain_set_clock_autoidle1(0x3f, PM_WKUP_OFFSET); | ||
272 | } else { | ||
273 | pmdomain_set_clock_autoidle1(0xeafffff1, PM_CORE_OFFSET); | ||
274 | pmdomain_set_clock_autoidle2(0xfff, PM_CORE_OFFSET); | ||
275 | pmdomain_set_clock_autoidle1(0x7f, PM_WKUP_OFFSET); | ||
276 | pmdomain_set_clock_autoidle1(0x3, PM_MDM_OFFSET); | ||
277 | } | ||
278 | pmdomain_set_clock_autoidle3(0x7, PM_CORE_OFFSET); | ||
279 | pmdomain_set_clock_autoidle4(0x1f, PM_CORE_OFFSET); | ||
280 | } | ||
281 | |||
282 | /* | ||
283 | * Initializes power domains by removing wake-up dependencies and powering | ||
284 | * down DSP and GFX. Gets called from PM init. Note that DSP and IVA code | ||
285 | * must re-enable DSP and GFX when used. | ||
286 | */ | ||
287 | void __init pmdomain_init(void) | ||
288 | { | ||
289 | /* Remove all domain wakeup dependencies */ | ||
290 | pmdomain_set_wakeup_dependencies(EN_WKUP | EN_CORE, PM_MPU_OFFSET); | ||
291 | pmdomain_set_wakeup_dependencies(0, PM_DSP_OFFSET); | ||
292 | pmdomain_set_wakeup_dependencies(0, PM_GFX_OFFSET); | ||
293 | pmdomain_set_wakeup_dependencies(EN_WKUP | EN_MPU, PM_CORE_OFFSET); | ||
294 | if (cpu_is_omap2430()) | ||
295 | pmdomain_set_wakeup_dependencies(0, PM_MDM_OFFSET); | ||
296 | |||
297 | /* Power down DSP and GFX */ | ||
298 | pmdomain_set_powerstate(POWERSTATE_OFF | FORCESTATE, PM_DSP_OFFSET); | ||
299 | pmdomain_set_powerstate(POWERSTATE_OFF | FORCESTATE, PM_GFX_OFFSET); | ||
300 | } | ||
diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c index 562168fa2b16..d7eee99b7e3f 100644 --- a/arch/arm/mach-omap2/pm.c +++ b/arch/arm/mach-omap2/pm.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/interrupt.h> | 23 | #include <linux/interrupt.h> |
24 | #include <linux/sysfs.h> | 24 | #include <linux/sysfs.h> |
25 | #include <linux/module.h> | 25 | #include <linux/module.h> |
26 | #include <linux/delay.h> | ||
26 | 27 | ||
27 | #include <asm/io.h> | 28 | #include <asm/io.h> |
28 | #include <asm/irq.h> | 29 | #include <asm/irq.h> |
@@ -36,11 +37,18 @@ | |||
36 | #include <asm/arch/sram.h> | 37 | #include <asm/arch/sram.h> |
37 | #include <asm/arch/pm.h> | 38 | #include <asm/arch/pm.h> |
38 | 39 | ||
40 | #include "prcm-regs.h" | ||
41 | |||
39 | static struct clk *vclk; | 42 | static struct clk *vclk; |
40 | static void (*omap2_sram_idle)(void); | 43 | static void (*omap2_sram_idle)(void); |
41 | static void (*omap2_sram_suspend)(int dllctrl, int cpu_rev); | 44 | static void (*omap2_sram_suspend)(int dllctrl, int cpu_rev); |
42 | static void (*saved_idle)(void); | 45 | static void (*saved_idle)(void); |
43 | 46 | ||
47 | extern void __init pmdomain_init(void); | ||
48 | extern void pmdomain_set_autoidle(void); | ||
49 | |||
50 | static unsigned int omap24xx_sleep_save[OMAP24XX_SLEEP_SAVE_SIZE]; | ||
51 | |||
44 | void omap2_pm_idle(void) | 52 | void omap2_pm_idle(void) |
45 | { | 53 | { |
46 | local_irq_disable(); | 54 | local_irq_disable(); |
@@ -87,23 +95,272 @@ static int omap2_pm_prepare(suspend_state_t state) | |||
87 | return error; | 95 | return error; |
88 | } | 96 | } |
89 | 97 | ||
98 | #define INT0_WAKE_MASK (OMAP_IRQ_BIT(INT_24XX_GPIO_BANK1) | \ | ||
99 | OMAP_IRQ_BIT(INT_24XX_GPIO_BANK2) | \ | ||
100 | OMAP_IRQ_BIT(INT_24XX_GPIO_BANK3)) | ||
101 | |||
102 | #define INT1_WAKE_MASK (OMAP_IRQ_BIT(INT_24XX_GPIO_BANK4)) | ||
103 | |||
104 | #define INT2_WAKE_MASK (OMAP_IRQ_BIT(INT_24XX_UART1_IRQ) | \ | ||
105 | OMAP_IRQ_BIT(INT_24XX_UART2_IRQ) | \ | ||
106 | OMAP_IRQ_BIT(INT_24XX_UART3_IRQ)) | ||
107 | |||
108 | #define preg(reg) printk("%s\t(0x%p):\t0x%08x\n", #reg, ®, reg); | ||
109 | |||
110 | static void omap2_pm_debug(char * desc) | ||
111 | { | ||
112 | printk("%s:\n", desc); | ||
113 | |||
114 | preg(CM_CLKSTCTRL_MPU); | ||
115 | preg(CM_CLKSTCTRL_CORE); | ||
116 | preg(CM_CLKSTCTRL_GFX); | ||
117 | preg(CM_CLKSTCTRL_DSP); | ||
118 | preg(CM_CLKSTCTRL_MDM); | ||
119 | |||
120 | preg(PM_PWSTCTRL_MPU); | ||
121 | preg(PM_PWSTCTRL_CORE); | ||
122 | preg(PM_PWSTCTRL_GFX); | ||
123 | preg(PM_PWSTCTRL_DSP); | ||
124 | preg(PM_PWSTCTRL_MDM); | ||
125 | |||
126 | preg(PM_PWSTST_MPU); | ||
127 | preg(PM_PWSTST_CORE); | ||
128 | preg(PM_PWSTST_GFX); | ||
129 | preg(PM_PWSTST_DSP); | ||
130 | preg(PM_PWSTST_MDM); | ||
131 | |||
132 | preg(CM_AUTOIDLE1_CORE); | ||
133 | preg(CM_AUTOIDLE2_CORE); | ||
134 | preg(CM_AUTOIDLE3_CORE); | ||
135 | preg(CM_AUTOIDLE4_CORE); | ||
136 | preg(CM_AUTOIDLE_WKUP); | ||
137 | preg(CM_AUTOIDLE_PLL); | ||
138 | preg(CM_AUTOIDLE_DSP); | ||
139 | preg(CM_AUTOIDLE_MDM); | ||
140 | |||
141 | preg(CM_ICLKEN1_CORE); | ||
142 | preg(CM_ICLKEN2_CORE); | ||
143 | preg(CM_ICLKEN3_CORE); | ||
144 | preg(CM_ICLKEN4_CORE); | ||
145 | preg(CM_ICLKEN_GFX); | ||
146 | preg(CM_ICLKEN_WKUP); | ||
147 | preg(CM_ICLKEN_DSP); | ||
148 | preg(CM_ICLKEN_MDM); | ||
149 | |||
150 | preg(CM_IDLEST1_CORE); | ||
151 | preg(CM_IDLEST2_CORE); | ||
152 | preg(CM_IDLEST3_CORE); | ||
153 | preg(CM_IDLEST4_CORE); | ||
154 | preg(CM_IDLEST_GFX); | ||
155 | preg(CM_IDLEST_WKUP); | ||
156 | preg(CM_IDLEST_CKGEN); | ||
157 | preg(CM_IDLEST_DSP); | ||
158 | preg(CM_IDLEST_MDM); | ||
159 | |||
160 | preg(RM_RSTST_MPU); | ||
161 | preg(RM_RSTST_GFX); | ||
162 | preg(RM_RSTST_WKUP); | ||
163 | preg(RM_RSTST_DSP); | ||
164 | preg(RM_RSTST_MDM); | ||
165 | |||
166 | preg(PM_WKDEP_MPU); | ||
167 | preg(PM_WKDEP_CORE); | ||
168 | preg(PM_WKDEP_GFX); | ||
169 | preg(PM_WKDEP_DSP); | ||
170 | preg(PM_WKDEP_MDM); | ||
171 | |||
172 | preg(CM_FCLKEN_WKUP); | ||
173 | preg(CM_ICLKEN_WKUP); | ||
174 | preg(CM_IDLEST_WKUP); | ||
175 | preg(CM_AUTOIDLE_WKUP); | ||
176 | preg(CM_CLKSEL_WKUP); | ||
177 | |||
178 | preg(PM_WKEN_WKUP); | ||
179 | preg(PM_WKST_WKUP); | ||
180 | } | ||
181 | |||
182 | static inline void omap2_pm_save_registers(void) | ||
183 | { | ||
184 | /* Save interrupt registers */ | ||
185 | OMAP24XX_SAVE(INTC_MIR0); | ||
186 | OMAP24XX_SAVE(INTC_MIR1); | ||
187 | OMAP24XX_SAVE(INTC_MIR2); | ||
188 | |||
189 | /* Save power control registers */ | ||
190 | OMAP24XX_SAVE(CM_CLKSTCTRL_MPU); | ||
191 | OMAP24XX_SAVE(CM_CLKSTCTRL_CORE); | ||
192 | OMAP24XX_SAVE(CM_CLKSTCTRL_GFX); | ||
193 | OMAP24XX_SAVE(CM_CLKSTCTRL_DSP); | ||
194 | OMAP24XX_SAVE(CM_CLKSTCTRL_MDM); | ||
195 | |||
196 | /* Save power state registers */ | ||
197 | OMAP24XX_SAVE(PM_PWSTCTRL_MPU); | ||
198 | OMAP24XX_SAVE(PM_PWSTCTRL_CORE); | ||
199 | OMAP24XX_SAVE(PM_PWSTCTRL_GFX); | ||
200 | OMAP24XX_SAVE(PM_PWSTCTRL_DSP); | ||
201 | OMAP24XX_SAVE(PM_PWSTCTRL_MDM); | ||
202 | |||
203 | /* Save autoidle registers */ | ||
204 | OMAP24XX_SAVE(CM_AUTOIDLE1_CORE); | ||
205 | OMAP24XX_SAVE(CM_AUTOIDLE2_CORE); | ||
206 | OMAP24XX_SAVE(CM_AUTOIDLE3_CORE); | ||
207 | OMAP24XX_SAVE(CM_AUTOIDLE4_CORE); | ||
208 | OMAP24XX_SAVE(CM_AUTOIDLE_WKUP); | ||
209 | OMAP24XX_SAVE(CM_AUTOIDLE_PLL); | ||
210 | OMAP24XX_SAVE(CM_AUTOIDLE_DSP); | ||
211 | OMAP24XX_SAVE(CM_AUTOIDLE_MDM); | ||
212 | |||
213 | /* Save idle state registers */ | ||
214 | OMAP24XX_SAVE(CM_IDLEST1_CORE); | ||
215 | OMAP24XX_SAVE(CM_IDLEST2_CORE); | ||
216 | OMAP24XX_SAVE(CM_IDLEST3_CORE); | ||
217 | OMAP24XX_SAVE(CM_IDLEST4_CORE); | ||
218 | OMAP24XX_SAVE(CM_IDLEST_GFX); | ||
219 | OMAP24XX_SAVE(CM_IDLEST_WKUP); | ||
220 | OMAP24XX_SAVE(CM_IDLEST_CKGEN); | ||
221 | OMAP24XX_SAVE(CM_IDLEST_DSP); | ||
222 | OMAP24XX_SAVE(CM_IDLEST_MDM); | ||
223 | |||
224 | /* Save clock registers */ | ||
225 | OMAP24XX_SAVE(CM_FCLKEN1_CORE); | ||
226 | OMAP24XX_SAVE(CM_FCLKEN2_CORE); | ||
227 | OMAP24XX_SAVE(CM_ICLKEN1_CORE); | ||
228 | OMAP24XX_SAVE(CM_ICLKEN2_CORE); | ||
229 | OMAP24XX_SAVE(CM_ICLKEN3_CORE); | ||
230 | OMAP24XX_SAVE(CM_ICLKEN4_CORE); | ||
231 | } | ||
232 | |||
233 | static inline void omap2_pm_restore_registers(void) | ||
234 | { | ||
235 | /* Restore clock state registers */ | ||
236 | OMAP24XX_RESTORE(CM_CLKSTCTRL_MPU); | ||
237 | OMAP24XX_RESTORE(CM_CLKSTCTRL_CORE); | ||
238 | OMAP24XX_RESTORE(CM_CLKSTCTRL_GFX); | ||
239 | OMAP24XX_RESTORE(CM_CLKSTCTRL_DSP); | ||
240 | OMAP24XX_RESTORE(CM_CLKSTCTRL_MDM); | ||
241 | |||
242 | /* Restore power state registers */ | ||
243 | OMAP24XX_RESTORE(PM_PWSTCTRL_MPU); | ||
244 | OMAP24XX_RESTORE(PM_PWSTCTRL_CORE); | ||
245 | OMAP24XX_RESTORE(PM_PWSTCTRL_GFX); | ||
246 | OMAP24XX_RESTORE(PM_PWSTCTRL_DSP); | ||
247 | OMAP24XX_RESTORE(PM_PWSTCTRL_MDM); | ||
248 | |||
249 | /* Restore idle state registers */ | ||
250 | OMAP24XX_RESTORE(CM_IDLEST1_CORE); | ||
251 | OMAP24XX_RESTORE(CM_IDLEST2_CORE); | ||
252 | OMAP24XX_RESTORE(CM_IDLEST3_CORE); | ||
253 | OMAP24XX_RESTORE(CM_IDLEST4_CORE); | ||
254 | OMAP24XX_RESTORE(CM_IDLEST_GFX); | ||
255 | OMAP24XX_RESTORE(CM_IDLEST_WKUP); | ||
256 | OMAP24XX_RESTORE(CM_IDLEST_CKGEN); | ||
257 | OMAP24XX_RESTORE(CM_IDLEST_DSP); | ||
258 | OMAP24XX_RESTORE(CM_IDLEST_MDM); | ||
259 | |||
260 | /* Restore autoidle registers */ | ||
261 | OMAP24XX_RESTORE(CM_AUTOIDLE1_CORE); | ||
262 | OMAP24XX_RESTORE(CM_AUTOIDLE2_CORE); | ||
263 | OMAP24XX_RESTORE(CM_AUTOIDLE3_CORE); | ||
264 | OMAP24XX_RESTORE(CM_AUTOIDLE4_CORE); | ||
265 | OMAP24XX_RESTORE(CM_AUTOIDLE_WKUP); | ||
266 | OMAP24XX_RESTORE(CM_AUTOIDLE_PLL); | ||
267 | OMAP24XX_RESTORE(CM_AUTOIDLE_DSP); | ||
268 | OMAP24XX_RESTORE(CM_AUTOIDLE_MDM); | ||
269 | |||
270 | /* Restore clock registers */ | ||
271 | OMAP24XX_RESTORE(CM_FCLKEN1_CORE); | ||
272 | OMAP24XX_RESTORE(CM_FCLKEN2_CORE); | ||
273 | OMAP24XX_RESTORE(CM_ICLKEN1_CORE); | ||
274 | OMAP24XX_RESTORE(CM_ICLKEN2_CORE); | ||
275 | OMAP24XX_RESTORE(CM_ICLKEN3_CORE); | ||
276 | OMAP24XX_RESTORE(CM_ICLKEN4_CORE); | ||
277 | |||
278 | /* REVISIT: Clear interrupts here */ | ||
279 | |||
280 | /* Restore interrupt registers */ | ||
281 | OMAP24XX_RESTORE(INTC_MIR0); | ||
282 | OMAP24XX_RESTORE(INTC_MIR1); | ||
283 | OMAP24XX_RESTORE(INTC_MIR2); | ||
284 | } | ||
285 | |||
286 | static int omap2_pm_suspend(void) | ||
287 | { | ||
288 | int processor_type = 0; | ||
289 | |||
290 | /* REVISIT: 0x21 or 0x26? */ | ||
291 | if (cpu_is_omap2420()) | ||
292 | processor_type = 0x21; | ||
293 | |||
294 | if (!processor_type) | ||
295 | return -ENOTSUPP; | ||
296 | |||
297 | local_irq_disable(); | ||
298 | local_fiq_disable(); | ||
299 | |||
300 | omap2_pm_save_registers(); | ||
301 | |||
302 | /* Disable interrupts except for the wake events */ | ||
303 | INTC_MIR_SET0 = 0xffffffff & ~INT0_WAKE_MASK; | ||
304 | INTC_MIR_SET1 = 0xffffffff & ~INT1_WAKE_MASK; | ||
305 | INTC_MIR_SET2 = 0xffffffff & ~INT2_WAKE_MASK; | ||
306 | |||
307 | pmdomain_set_autoidle(); | ||
308 | |||
309 | /* Clear old wake-up events */ | ||
310 | PM_WKST1_CORE = 0; | ||
311 | PM_WKST2_CORE = 0; | ||
312 | PM_WKST_WKUP = 0; | ||
313 | |||
314 | /* Enable wake-up events */ | ||
315 | PM_WKEN1_CORE = (1 << 22) | (1 << 21); /* UART1 & 2 */ | ||
316 | PM_WKEN2_CORE = (1 << 2); /* UART3 */ | ||
317 | PM_WKEN_WKUP = (1 << 2) | (1 << 0); /* GPIO & GPT1 */ | ||
318 | |||
319 | /* Disable clocks except for CM_ICLKEN2_CORE. It gets disabled | ||
320 | * in the SRAM suspend code */ | ||
321 | CM_FCLKEN1_CORE = 0; | ||
322 | CM_FCLKEN2_CORE = 0; | ||
323 | CM_ICLKEN1_CORE = 0; | ||
324 | CM_ICLKEN3_CORE = 0; | ||
325 | CM_ICLKEN4_CORE = 0; | ||
326 | |||
327 | omap2_pm_debug("Status before suspend"); | ||
328 | |||
329 | /* Must wait for serial buffers to clear */ | ||
330 | mdelay(200); | ||
331 | |||
332 | /* Jump to SRAM suspend code | ||
333 | * REVISIT: When is this SDRC_DLLB_CTRL? | ||
334 | */ | ||
335 | omap2_sram_suspend(SDRC_DLLA_CTRL, processor_type); | ||
336 | |||
337 | /* Back from sleep */ | ||
338 | omap2_pm_restore_registers(); | ||
339 | |||
340 | local_fiq_enable(); | ||
341 | local_irq_enable(); | ||
342 | |||
343 | return 0; | ||
344 | } | ||
345 | |||
90 | static int omap2_pm_enter(suspend_state_t state) | 346 | static int omap2_pm_enter(suspend_state_t state) |
91 | { | 347 | { |
348 | int ret = 0; | ||
349 | |||
92 | switch (state) | 350 | switch (state) |
93 | { | 351 | { |
94 | case PM_SUSPEND_STANDBY: | 352 | case PM_SUSPEND_STANDBY: |
95 | case PM_SUSPEND_MEM: | 353 | case PM_SUSPEND_MEM: |
96 | /* FIXME: Add suspend */ | 354 | ret = omap2_pm_suspend(); |
97 | break; | 355 | break; |
98 | |||
99 | case PM_SUSPEND_DISK: | 356 | case PM_SUSPEND_DISK: |
100 | return -ENOTSUPP; | 357 | ret = -ENOTSUPP; |
101 | 358 | break; | |
102 | default: | 359 | default: |
103 | return -EINVAL; | 360 | ret = -EINVAL; |
104 | } | 361 | } |
105 | 362 | ||
106 | return 0; | 363 | return ret; |
107 | } | 364 | } |
108 | 365 | ||
109 | static int omap2_pm_finish(suspend_state_t state) | 366 | static int omap2_pm_finish(suspend_state_t state) |
@@ -143,6 +400,8 @@ int __init omap2_pm_init(void) | |||
143 | pm_set_ops(&omap_pm_ops); | 400 | pm_set_ops(&omap_pm_ops); |
144 | pm_idle = omap2_pm_idle; | 401 | pm_idle = omap2_pm_idle; |
145 | 402 | ||
403 | pmdomain_init(); | ||
404 | |||
146 | return 0; | 405 | return 0; |
147 | } | 406 | } |
148 | 407 | ||
diff --git a/arch/arm/mach-omap2/timer-gp.c b/arch/arm/mach-omap2/timer-gp.c index 1d2f5ac2f69b..cf78e6c5a277 100644 --- a/arch/arm/mach-omap2/timer-gp.c +++ b/arch/arm/mach-omap2/timer-gp.c | |||
@@ -6,6 +6,7 @@ | |||
6 | * Copyright (C) 2005 Nokia Corporation | 6 | * Copyright (C) 2005 Nokia Corporation |
7 | * Author: Paul Mundt <paul.mundt@nokia.com> | 7 | * Author: Paul Mundt <paul.mundt@nokia.com> |
8 | * Juha Yrjölä <juha.yrjola@nokia.com> | 8 | * Juha Yrjölä <juha.yrjola@nokia.com> |
9 | * OMAP Dual-mode timer framework support by Timo Teras | ||
9 | * | 10 | * |
10 | * Some parts based off of TI's 24xx code: | 11 | * Some parts based off of TI's 24xx code: |
11 | * | 12 | * |
@@ -22,54 +23,18 @@ | |||
22 | #include <linux/interrupt.h> | 23 | #include <linux/interrupt.h> |
23 | #include <linux/err.h> | 24 | #include <linux/err.h> |
24 | #include <linux/clk.h> | 25 | #include <linux/clk.h> |
26 | #include <linux/delay.h> | ||
25 | 27 | ||
26 | #include <asm/mach/time.h> | 28 | #include <asm/mach/time.h> |
27 | #include <asm/delay.h> | 29 | #include <asm/arch/dmtimer.h> |
28 | #include <asm/io.h> | ||
29 | 30 | ||
30 | #define OMAP2_GP_TIMER1_BASE 0x48028000 | 31 | static struct omap_dm_timer *gptimer; |
31 | #define OMAP2_GP_TIMER2_BASE 0x4802a000 | ||
32 | #define OMAP2_GP_TIMER3_BASE 0x48078000 | ||
33 | #define OMAP2_GP_TIMER4_BASE 0x4807a000 | ||
34 | 32 | ||
35 | #define GP_TIMER_TIDR 0x00 | 33 | static inline void omap2_gp_timer_start(unsigned long load_val) |
36 | #define GP_TIMER_TISR 0x18 | ||
37 | #define GP_TIMER_TIER 0x1c | ||
38 | #define GP_TIMER_TCLR 0x24 | ||
39 | #define GP_TIMER_TCRR 0x28 | ||
40 | #define GP_TIMER_TLDR 0x2c | ||
41 | #define GP_TIMER_TSICR 0x40 | ||
42 | |||
43 | #define OS_TIMER_NR 1 /* GP timer 2 */ | ||
44 | |||
45 | static unsigned long timer_base[] = { | ||
46 | IO_ADDRESS(OMAP2_GP_TIMER1_BASE), | ||
47 | IO_ADDRESS(OMAP2_GP_TIMER2_BASE), | ||
48 | IO_ADDRESS(OMAP2_GP_TIMER3_BASE), | ||
49 | IO_ADDRESS(OMAP2_GP_TIMER4_BASE), | ||
50 | }; | ||
51 | |||
52 | static inline unsigned int timer_read_reg(int nr, unsigned int reg) | ||
53 | { | ||
54 | return __raw_readl(timer_base[nr] + reg); | ||
55 | } | ||
56 | |||
57 | static inline void timer_write_reg(int nr, unsigned int reg, unsigned int val) | ||
58 | { | ||
59 | __raw_writel(val, timer_base[nr] + reg); | ||
60 | } | ||
61 | |||
62 | /* Note that we always enable the clock prescale divider bit */ | ||
63 | static inline void omap2_gp_timer_start(int nr, unsigned long load_val) | ||
64 | { | 34 | { |
65 | unsigned int tmp; | 35 | omap_dm_timer_set_load(gptimer, 1, 0xffffffff - load_val); |
66 | 36 | omap_dm_timer_set_int_enable(gptimer, OMAP_TIMER_INT_OVERFLOW); | |
67 | tmp = 0xffffffff - load_val; | 37 | omap_dm_timer_start(gptimer); |
68 | |||
69 | timer_write_reg(nr, GP_TIMER_TLDR, tmp); | ||
70 | timer_write_reg(nr, GP_TIMER_TCRR, tmp); | ||
71 | timer_write_reg(nr, GP_TIMER_TIER, 1 << 1); | ||
72 | timer_write_reg(nr, GP_TIMER_TCLR, (1 << 5) | (1 << 1) | 1); | ||
73 | } | 38 | } |
74 | 39 | ||
75 | static irqreturn_t omap2_gp_timer_interrupt(int irq, void *dev_id, | 40 | static irqreturn_t omap2_gp_timer_interrupt(int irq, void *dev_id, |
@@ -77,7 +42,7 @@ static irqreturn_t omap2_gp_timer_interrupt(int irq, void *dev_id, | |||
77 | { | 42 | { |
78 | write_seqlock(&xtime_lock); | 43 | write_seqlock(&xtime_lock); |
79 | 44 | ||
80 | timer_write_reg(OS_TIMER_NR, GP_TIMER_TISR, 1 << 1); | 45 | omap_dm_timer_write_status(gptimer, OMAP_TIMER_INT_OVERFLOW); |
81 | timer_tick(regs); | 46 | timer_tick(regs); |
82 | 47 | ||
83 | write_sequnlock(&xtime_lock); | 48 | write_sequnlock(&xtime_lock); |
@@ -87,41 +52,26 @@ static irqreturn_t omap2_gp_timer_interrupt(int irq, void *dev_id, | |||
87 | 52 | ||
88 | static struct irqaction omap2_gp_timer_irq = { | 53 | static struct irqaction omap2_gp_timer_irq = { |
89 | .name = "gp timer", | 54 | .name = "gp timer", |
90 | .flags = SA_INTERRUPT, | 55 | .flags = SA_INTERRUPT | SA_TIMER, |
91 | .handler = omap2_gp_timer_interrupt, | 56 | .handler = omap2_gp_timer_interrupt, |
92 | }; | 57 | }; |
93 | 58 | ||
94 | static void __init omap2_gp_timer_init(void) | 59 | static void __init omap2_gp_timer_init(void) |
95 | { | 60 | { |
96 | struct clk * sys_ck; | 61 | u32 tick_period; |
97 | u32 tick_period = 120000; | ||
98 | u32 l; | ||
99 | 62 | ||
100 | /* Reset clock and prescale value */ | 63 | omap_dm_timer_init(); |
101 | timer_write_reg(OS_TIMER_NR, GP_TIMER_TCLR, 0); | 64 | gptimer = omap_dm_timer_request_specific(1); |
65 | BUG_ON(gptimer == NULL); | ||
102 | 66 | ||
103 | sys_ck = clk_get(NULL, "sys_ck"); | 67 | omap_dm_timer_set_source(gptimer, OMAP_TIMER_SRC_SYS_CLK); |
104 | if (IS_ERR(sys_ck)) | 68 | tick_period = clk_get_rate(omap_dm_timer_get_fclk(gptimer)) / 100; |
105 | printk(KERN_ERR "Could not get sys_ck\n"); | ||
106 | else { | ||
107 | clk_enable(sys_ck); | ||
108 | tick_period = clk_get_rate(sys_ck) / 100; | ||
109 | clk_put(sys_ck); | ||
110 | } | ||
111 | |||
112 | tick_period /= 2; /* Minimum prescale divider is 2 */ | ||
113 | tick_period -= 1; | 69 | tick_period -= 1; |
114 | 70 | ||
115 | l = timer_read_reg(OS_TIMER_NR, GP_TIMER_TIDR); | 71 | setup_irq(omap_dm_timer_get_irq(gptimer), &omap2_gp_timer_irq); |
116 | printk(KERN_INFO "OMAP2 GP timer (HW version %d.%d)\n", | 72 | omap2_gp_timer_start(tick_period); |
117 | (l >> 4) & 0x0f, l & 0x0f); | ||
118 | |||
119 | setup_irq(38, &omap2_gp_timer_irq); | ||
120 | |||
121 | omap2_gp_timer_start(OS_TIMER_NR, tick_period); | ||
122 | } | 73 | } |
123 | 74 | ||
124 | struct sys_timer omap_timer = { | 75 | struct sys_timer omap_timer = { |
125 | .init = omap2_gp_timer_init, | 76 | .init = omap2_gp_timer_init, |
126 | }; | 77 | }; |
127 | |||
diff --git a/arch/arm/mach-pxa/Kconfig b/arch/arm/mach-pxa/Kconfig index ea5137f319c4..03d07cae26c8 100644 --- a/arch/arm/mach-pxa/Kconfig +++ b/arch/arm/mach-pxa/Kconfig | |||
@@ -35,6 +35,10 @@ config PXA_SHARPSL | |||
35 | SL-C3000 (Spitz), SL-C3100 (Borzoi) or SL-C6000x (Tosa) | 35 | SL-C3000 (Spitz), SL-C3100 (Borzoi) or SL-C6000x (Tosa) |
36 | handheld computer. | 36 | handheld computer. |
37 | 37 | ||
38 | config MACH_TRIZEPS4 | ||
39 | bool "Keith und Koep Trizeps4 DIMM-Module" | ||
40 | select PXA27x | ||
41 | |||
38 | endchoice | 42 | endchoice |
39 | 43 | ||
40 | if PXA_SHARPSL | 44 | if PXA_SHARPSL |
@@ -55,6 +59,21 @@ endchoice | |||
55 | 59 | ||
56 | endif | 60 | endif |
57 | 61 | ||
62 | if MACH_TRIZEPS4 | ||
63 | |||
64 | choice | ||
65 | prompt "Select base board for Trizeps 4 module" | ||
66 | |||
67 | config MACH_TRIZEPS4_CONXS | ||
68 | bool "ConXS Eval Board" | ||
69 | |||
70 | config MACH_TRIZEPS4_ANY | ||
71 | bool "another Board" | ||
72 | |||
73 | endchoice | ||
74 | |||
75 | endif | ||
76 | |||
58 | endmenu | 77 | endmenu |
59 | 78 | ||
60 | config MACH_POODLE | 79 | config MACH_POODLE |
diff --git a/arch/arm/mach-pxa/Makefile b/arch/arm/mach-pxa/Makefile index 1610690be419..9093eb1c94eb 100644 --- a/arch/arm/mach-pxa/Makefile +++ b/arch/arm/mach-pxa/Makefile | |||
@@ -12,6 +12,7 @@ obj-$(CONFIG_ARCH_LUBBOCK) += lubbock.o | |||
12 | obj-$(CONFIG_MACH_LOGICPD_PXA270) += lpd270.o | 12 | obj-$(CONFIG_MACH_LOGICPD_PXA270) += lpd270.o |
13 | obj-$(CONFIG_MACH_MAINSTONE) += mainstone.o | 13 | obj-$(CONFIG_MACH_MAINSTONE) += mainstone.o |
14 | obj-$(CONFIG_ARCH_PXA_IDP) += idp.o | 14 | obj-$(CONFIG_ARCH_PXA_IDP) += idp.o |
15 | obj-$(CONFIG_MACH_TRIZEPS4) += trizeps4.o | ||
15 | obj-$(CONFIG_PXA_SHARP_C7xx) += corgi.o corgi_ssp.o corgi_lcd.o sharpsl_pm.o corgi_pm.o | 16 | obj-$(CONFIG_PXA_SHARP_C7xx) += corgi.o corgi_ssp.o corgi_lcd.o sharpsl_pm.o corgi_pm.o |
16 | obj-$(CONFIG_PXA_SHARP_Cxx00) += spitz.o corgi_ssp.o corgi_lcd.o sharpsl_pm.o spitz_pm.o | 17 | obj-$(CONFIG_PXA_SHARP_Cxx00) += spitz.o corgi_ssp.o corgi_lcd.o sharpsl_pm.o spitz_pm.o |
17 | obj-$(CONFIG_MACH_AKITA) += akita-ioexp.o | 18 | obj-$(CONFIG_MACH_AKITA) += akita-ioexp.o |
@@ -23,6 +24,7 @@ led-y := leds.o | |||
23 | led-$(CONFIG_ARCH_LUBBOCK) += leds-lubbock.o | 24 | led-$(CONFIG_ARCH_LUBBOCK) += leds-lubbock.o |
24 | led-$(CONFIG_MACH_MAINSTONE) += leds-mainstone.o | 25 | led-$(CONFIG_MACH_MAINSTONE) += leds-mainstone.o |
25 | led-$(CONFIG_ARCH_PXA_IDP) += leds-idp.o | 26 | led-$(CONFIG_ARCH_PXA_IDP) += leds-idp.o |
27 | led-$(CONFIG_MACH_TRIZEPS4) += leds-trizeps4.o | ||
26 | 28 | ||
27 | obj-$(CONFIG_LEDS) += $(led-y) | 29 | obj-$(CONFIG_LEDS) += $(led-y) |
28 | 30 | ||
diff --git a/arch/arm/mach-pxa/leds-trizeps4.c b/arch/arm/mach-pxa/leds-trizeps4.c new file mode 100644 index 000000000000..14cfc85e44b5 --- /dev/null +++ b/arch/arm/mach-pxa/leds-trizeps4.c | |||
@@ -0,0 +1,134 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-pxa/leds-trizeps4.c | ||
3 | * | ||
4 | * Author: Jürgen Schindele | ||
5 | * Created: 20 02, 2006 | ||
6 | * Copyright: Jürgen Schindele | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #include <linux/config.h> | ||
14 | #include <linux/init.h> | ||
15 | |||
16 | #include <asm/hardware.h> | ||
17 | #include <asm/system.h> | ||
18 | #include <asm/types.h> | ||
19 | #include <asm/leds.h> | ||
20 | |||
21 | #include <asm/arch/pxa-regs.h> | ||
22 | #include <asm/arch/trizeps4.h> | ||
23 | |||
24 | #include "leds.h" | ||
25 | |||
26 | #define LED_STATE_ENABLED 1 | ||
27 | #define LED_STATE_CLAIMED 2 | ||
28 | |||
29 | #define SYS_BUSY 0x01 | ||
30 | #define HEARTBEAT 0x02 | ||
31 | #define BLINK 0x04 | ||
32 | |||
33 | static unsigned int led_state; | ||
34 | static unsigned int hw_led_state; | ||
35 | |||
36 | void trizeps4_leds_event(led_event_t evt) | ||
37 | { | ||
38 | unsigned long flags; | ||
39 | |||
40 | local_irq_save(flags); | ||
41 | |||
42 | switch (evt) { | ||
43 | case led_start: | ||
44 | hw_led_state = 0; | ||
45 | pxa_gpio_mode( GPIO_SYS_BUSY_LED | GPIO_OUT); /* LED1 */ | ||
46 | pxa_gpio_mode( GPIO_HEARTBEAT_LED | GPIO_OUT); /* LED2 */ | ||
47 | led_state = LED_STATE_ENABLED; | ||
48 | break; | ||
49 | |||
50 | case led_stop: | ||
51 | led_state &= ~LED_STATE_ENABLED; | ||
52 | break; | ||
53 | |||
54 | case led_claim: | ||
55 | led_state |= LED_STATE_CLAIMED; | ||
56 | hw_led_state = 0; | ||
57 | break; | ||
58 | |||
59 | case led_release: | ||
60 | led_state &= ~LED_STATE_CLAIMED; | ||
61 | hw_led_state = 0; | ||
62 | break; | ||
63 | |||
64 | #ifdef CONFIG_LEDS_TIMER | ||
65 | case led_timer: | ||
66 | hw_led_state ^= HEARTBEAT; | ||
67 | break; | ||
68 | #endif | ||
69 | |||
70 | #ifdef CONFIG_LEDS_CPU | ||
71 | case led_idle_start: | ||
72 | hw_led_state &= ~SYS_BUSY; | ||
73 | break; | ||
74 | |||
75 | case led_idle_end: | ||
76 | hw_led_state |= SYS_BUSY; | ||
77 | break; | ||
78 | #endif | ||
79 | |||
80 | case led_halted: | ||
81 | break; | ||
82 | |||
83 | case led_green_on: | ||
84 | hw_led_state |= BLINK; | ||
85 | break; | ||
86 | |||
87 | case led_green_off: | ||
88 | hw_led_state &= ~BLINK; | ||
89 | break; | ||
90 | |||
91 | case led_amber_on: | ||
92 | break; | ||
93 | |||
94 | case led_amber_off: | ||
95 | break; | ||
96 | |||
97 | case led_red_on: | ||
98 | break; | ||
99 | |||
100 | case led_red_off: | ||
101 | break; | ||
102 | |||
103 | default: | ||
104 | break; | ||
105 | } | ||
106 | |||
107 | if (led_state & LED_STATE_ENABLED) { | ||
108 | switch (hw_led_state) { | ||
109 | case 0: | ||
110 | GPSR(GPIO_SYS_BUSY_LED) |= GPIO_bit(GPIO_SYS_BUSY_LED); | ||
111 | GPSR(GPIO_HEARTBEAT_LED) |= GPIO_bit(GPIO_HEARTBEAT_LED); | ||
112 | break; | ||
113 | case 1: | ||
114 | GPCR(GPIO_SYS_BUSY_LED) |= GPIO_bit(GPIO_SYS_BUSY_LED); | ||
115 | GPSR(GPIO_HEARTBEAT_LED) |= GPIO_bit(GPIO_HEARTBEAT_LED); | ||
116 | break; | ||
117 | case 2: | ||
118 | GPSR(GPIO_SYS_BUSY_LED) |= GPIO_bit(GPIO_SYS_BUSY_LED); | ||
119 | GPCR(GPIO_HEARTBEAT_LED) |= GPIO_bit(GPIO_HEARTBEAT_LED); | ||
120 | break; | ||
121 | case 3: | ||
122 | GPCR(GPIO_SYS_BUSY_LED) |= GPIO_bit(GPIO_SYS_BUSY_LED); | ||
123 | GPCR(GPIO_HEARTBEAT_LED) |= GPIO_bit(GPIO_HEARTBEAT_LED); | ||
124 | break; | ||
125 | } | ||
126 | } | ||
127 | else { | ||
128 | /* turn all off */ | ||
129 | GPSR(GPIO_SYS_BUSY_LED) |= GPIO_bit(GPIO_SYS_BUSY_LED); | ||
130 | GPSR(GPIO_HEARTBEAT_LED) |= GPIO_bit(GPIO_HEARTBEAT_LED); | ||
131 | } | ||
132 | |||
133 | local_irq_restore(flags); | ||
134 | } | ||
diff --git a/arch/arm/mach-pxa/leds.c b/arch/arm/mach-pxa/leds.c index bbe4d5f6afaa..e13eb841e48d 100644 --- a/arch/arm/mach-pxa/leds.c +++ b/arch/arm/mach-pxa/leds.c | |||
@@ -24,6 +24,8 @@ pxa_leds_init(void) | |||
24 | leds_event = mainstone_leds_event; | 24 | leds_event = mainstone_leds_event; |
25 | if (machine_is_pxa_idp()) | 25 | if (machine_is_pxa_idp()) |
26 | leds_event = idp_leds_event; | 26 | leds_event = idp_leds_event; |
27 | if (machine_is_trizeps4()) | ||
28 | leds_event = trizeps4_leds_event; | ||
27 | 29 | ||
28 | leds_event(led_start); | 30 | leds_event(led_start); |
29 | return 0; | 31 | return 0; |
diff --git a/arch/arm/mach-pxa/leds.h b/arch/arm/mach-pxa/leds.h index d98f6e93c12b..4f829b8c39dd 100644 --- a/arch/arm/mach-pxa/leds.h +++ b/arch/arm/mach-pxa/leds.h | |||
@@ -10,3 +10,4 @@ | |||
10 | extern void idp_leds_event(led_event_t evt); | 10 | extern void idp_leds_event(led_event_t evt); |
11 | extern void lubbock_leds_event(led_event_t evt); | 11 | extern void lubbock_leds_event(led_event_t evt); |
12 | extern void mainstone_leds_event(led_event_t evt); | 12 | extern void mainstone_leds_event(led_event_t evt); |
13 | extern void trizeps4_leds_event(led_event_t evt); | ||
diff --git a/arch/arm/mach-pxa/lpd270.c b/arch/arm/mach-pxa/lpd270.c index ec0f43a102c7..1a5f5c21481e 100644 --- a/arch/arm/mach-pxa/lpd270.c +++ b/arch/arm/mach-pxa/lpd270.c | |||
@@ -248,58 +248,137 @@ static void lpd270_backlight_power(int on) | |||
248 | 248 | ||
249 | /* 5.7" TFT QVGA (LoLo display number 1) */ | 249 | /* 5.7" TFT QVGA (LoLo display number 1) */ |
250 | static struct pxafb_mach_info sharp_lq057q3dc02 __initdata = { | 250 | static struct pxafb_mach_info sharp_lq057q3dc02 __initdata = { |
251 | .pixclock = 100000, | 251 | .pixclock = 150000, |
252 | .xres = 240, | 252 | .xres = 320, |
253 | .yres = 320, | 253 | .yres = 240, |
254 | .bpp = 16, | 254 | .bpp = 16, |
255 | .hsync_len = 64, | 255 | .hsync_len = 0x14, |
256 | .left_margin = 0x27, | 256 | .left_margin = 0x28, |
257 | .right_margin = 0x09, | 257 | .right_margin = 0x0a, |
258 | .vsync_len = 0x04, | 258 | .vsync_len = 0x02, |
259 | .upper_margin = 0x08, | 259 | .upper_margin = 0x08, |
260 | .lower_margin = 0x14, | 260 | .lower_margin = 0x14, |
261 | .sync = 0, | 261 | .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, |
262 | .lccr0 = 0x07800080, | 262 | .lccr0 = 0x07800080, |
263 | .lccr3 = 0x04400007, | 263 | .lccr3 = 0x00400000, |
264 | .pxafb_backlight_power = lpd270_backlight_power, | ||
265 | }; | ||
266 | |||
267 | /* 12.1" TFT SVGA (LoLo display number 2) */ | ||
268 | static struct pxafb_mach_info sharp_lq121s1dg31 __initdata = { | ||
269 | .pixclock = 50000, | ||
270 | .xres = 800, | ||
271 | .yres = 600, | ||
272 | .bpp = 16, | ||
273 | .hsync_len = 0x05, | ||
274 | .left_margin = 0x52, | ||
275 | .right_margin = 0x05, | ||
276 | .vsync_len = 0x04, | ||
277 | .upper_margin = 0x14, | ||
278 | .lower_margin = 0x0a, | ||
279 | .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, | ||
280 | .lccr0 = 0x07800080, | ||
281 | .lccr3 = 0x00400000, | ||
282 | .pxafb_backlight_power = lpd270_backlight_power, | ||
283 | }; | ||
284 | |||
285 | /* 3.6" TFT QVGA (LoLo display number 3) */ | ||
286 | static struct pxafb_mach_info sharp_lq036q1da01 __initdata = { | ||
287 | .pixclock = 150000, | ||
288 | .xres = 320, | ||
289 | .yres = 240, | ||
290 | .bpp = 16, | ||
291 | .hsync_len = 0x0e, | ||
292 | .left_margin = 0x04, | ||
293 | .right_margin = 0x0a, | ||
294 | .vsync_len = 0x03, | ||
295 | .upper_margin = 0x03, | ||
296 | .lower_margin = 0x03, | ||
297 | .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, | ||
298 | .lccr0 = 0x07800080, | ||
299 | .lccr3 = 0x00400000, | ||
264 | .pxafb_backlight_power = lpd270_backlight_power, | 300 | .pxafb_backlight_power = lpd270_backlight_power, |
265 | }; | 301 | }; |
266 | 302 | ||
267 | /* 6.4" TFT VGA (LoLo display number 5) */ | 303 | /* 6.4" TFT VGA (LoLo display number 5) */ |
268 | static struct pxafb_mach_info sharp_lq64d343 __initdata = { | 304 | static struct pxafb_mach_info sharp_lq64d343 __initdata = { |
269 | .pixclock = 20000, | 305 | .pixclock = 25000, |
270 | .xres = 640, | 306 | .xres = 640, |
271 | .yres = 480, | 307 | .yres = 480, |
272 | .bpp = 16, | 308 | .bpp = 16, |
273 | .hsync_len = 49, | 309 | .hsync_len = 0x31, |
274 | .left_margin = 0x89, | 310 | .left_margin = 0x89, |
275 | .right_margin = 0x19, | 311 | .right_margin = 0x19, |
276 | .vsync_len = 18, | 312 | .vsync_len = 0x12, |
277 | .upper_margin = 0x22, | 313 | .upper_margin = 0x22, |
278 | .lower_margin = 0, | 314 | .lower_margin = 0x00, |
279 | .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, | 315 | .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, |
280 | .lccr0 = 0x07800080, | 316 | .lccr0 = 0x07800080, |
281 | .lccr3 = 0x04400001, | 317 | .lccr3 = 0x00400000, |
318 | .pxafb_backlight_power = lpd270_backlight_power, | ||
319 | }; | ||
320 | |||
321 | /* 10.4" TFT VGA (LoLo display number 7) */ | ||
322 | static struct pxafb_mach_info sharp_lq10d368 __initdata = { | ||
323 | .pixclock = 25000, | ||
324 | .xres = 640, | ||
325 | .yres = 480, | ||
326 | .bpp = 16, | ||
327 | .hsync_len = 0x31, | ||
328 | .left_margin = 0x89, | ||
329 | .right_margin = 0x19, | ||
330 | .vsync_len = 0x12, | ||
331 | .upper_margin = 0x22, | ||
332 | .lower_margin = 0x00, | ||
333 | .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, | ||
334 | .lccr0 = 0x07800080, | ||
335 | .lccr3 = 0x00400000, | ||
282 | .pxafb_backlight_power = lpd270_backlight_power, | 336 | .pxafb_backlight_power = lpd270_backlight_power, |
283 | }; | 337 | }; |
284 | 338 | ||
285 | /* 3.5" TFT QVGA (LoLo display number 8) */ | 339 | /* 3.5" TFT QVGA (LoLo display number 8) */ |
286 | static struct pxafb_mach_info sharp_lq035q7db02_20 __initdata = { | 340 | static struct pxafb_mach_info sharp_lq035q7db02_20 __initdata = { |
287 | .pixclock = 100000, | 341 | .pixclock = 150000, |
288 | .xres = 240, | 342 | .xres = 240, |
289 | .yres = 320, | 343 | .yres = 320, |
290 | .bpp = 16, | 344 | .bpp = 16, |
291 | .hsync_len = 0x34, | 345 | .hsync_len = 0x0e, |
292 | .left_margin = 0x09, | 346 | .left_margin = 0x0a, |
293 | .right_margin = 0x09, | 347 | .right_margin = 0x0a, |
294 | .vsync_len = 0x08, | 348 | .vsync_len = 0x03, |
295 | .upper_margin = 0x05, | 349 | .upper_margin = 0x05, |
296 | .lower_margin = 0x14, | 350 | .lower_margin = 0x14, |
297 | .sync = 0, | 351 | .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, |
298 | .lccr0 = 0x07800080, | 352 | .lccr0 = 0x07800080, |
299 | .lccr3 = 0x04400007, | 353 | .lccr3 = 0x00400000, |
300 | .pxafb_backlight_power = lpd270_backlight_power, | 354 | .pxafb_backlight_power = lpd270_backlight_power, |
301 | }; | 355 | }; |
302 | 356 | ||
357 | static struct pxafb_mach_info *lpd270_lcd_to_use; | ||
358 | |||
359 | static int __init lpd270_set_lcd(char *str) | ||
360 | { | ||
361 | if (!strnicmp(str, "lq057q3dc02", 11)) { | ||
362 | lpd270_lcd_to_use = &sharp_lq057q3dc02; | ||
363 | } else if (!strnicmp(str, "lq121s1dg31", 11)) { | ||
364 | lpd270_lcd_to_use = &sharp_lq121s1dg31; | ||
365 | } else if (!strnicmp(str, "lq036q1da01", 11)) { | ||
366 | lpd270_lcd_to_use = &sharp_lq036q1da01; | ||
367 | } else if (!strnicmp(str, "lq64d343", 8)) { | ||
368 | lpd270_lcd_to_use = &sharp_lq64d343; | ||
369 | } else if (!strnicmp(str, "lq10d368", 8)) { | ||
370 | lpd270_lcd_to_use = &sharp_lq10d368; | ||
371 | } else if (!strnicmp(str, "lq035q7db02-20", 14)) { | ||
372 | lpd270_lcd_to_use = &sharp_lq035q7db02_20; | ||
373 | } else { | ||
374 | printk(KERN_INFO "lpd270: unknown lcd panel [%s]\n", str); | ||
375 | } | ||
376 | |||
377 | return 1; | ||
378 | } | ||
379 | |||
380 | __setup("lcd=", lpd270_set_lcd); | ||
381 | |||
303 | static struct platform_device *platform_devices[] __initdata = { | 382 | static struct platform_device *platform_devices[] __initdata = { |
304 | &smc91x_device, | 383 | &smc91x_device, |
305 | &lpd270_audio_device, | 384 | &lpd270_audio_device, |
@@ -345,9 +424,8 @@ static void __init lpd270_init(void) | |||
345 | 424 | ||
346 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); | 425 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); |
347 | 426 | ||
348 | // set_pxa_fb_info(&sharp_lq057q3dc02); | 427 | if (lpd270_lcd_to_use != NULL) |
349 | set_pxa_fb_info(&sharp_lq64d343); | 428 | set_pxa_fb_info(lpd270_lcd_to_use); |
350 | // set_pxa_fb_info(&sharp_lq035q7db02_20); | ||
351 | 429 | ||
352 | pxa_set_ohci_info(&lpd270_ohci_platform_data); | 430 | pxa_set_ohci_info(&lpd270_ohci_platform_data); |
353 | } | 431 | } |
diff --git a/arch/arm/mach-pxa/trizeps4.c b/arch/arm/mach-pxa/trizeps4.c new file mode 100644 index 000000000000..4ffff9e95eca --- /dev/null +++ b/arch/arm/mach-pxa/trizeps4.c | |||
@@ -0,0 +1,471 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-pxa/trizeps4.c | ||
3 | * | ||
4 | * Support for the Keith und Koep Trizeps4 Module Platform. | ||
5 | * | ||
6 | * Author: Jürgen Schindele | ||
7 | * Created: 20 02, 2006 | ||
8 | * Copyright: Jürgen Schindele | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | */ | ||
14 | |||
15 | #include <linux/init.h> | ||
16 | #include <linux/kernel.h> | ||
17 | #include <linux/platform_device.h> | ||
18 | #include <linux/sysdev.h> | ||
19 | #include <linux/interrupt.h> | ||
20 | #include <linux/sched.h> | ||
21 | #include <linux/bitops.h> | ||
22 | #include <linux/fb.h> | ||
23 | #include <linux/ioport.h> | ||
24 | #include <linux/delay.h> | ||
25 | #include <linux/serial_8250.h> | ||
26 | #include <linux/mtd/mtd.h> | ||
27 | #include <linux/mtd/partitions.h> | ||
28 | |||
29 | #include <asm/types.h> | ||
30 | #include <asm/setup.h> | ||
31 | #include <asm/memory.h> | ||
32 | #include <asm/mach-types.h> | ||
33 | #include <asm/hardware.h> | ||
34 | #include <asm/irq.h> | ||
35 | #include <asm/sizes.h> | ||
36 | |||
37 | #include <asm/mach/arch.h> | ||
38 | #include <asm/mach/map.h> | ||
39 | #include <asm/mach/irq.h> | ||
40 | #include <asm/mach/flash.h> | ||
41 | |||
42 | #include <asm/arch/pxa-regs.h> | ||
43 | #include <asm/arch/trizeps4.h> | ||
44 | #include <asm/arch/audio.h> | ||
45 | #include <asm/arch/pxafb.h> | ||
46 | #include <asm/arch/mmc.h> | ||
47 | #include <asm/arch/irda.h> | ||
48 | #include <asm/arch/ohci.h> | ||
49 | |||
50 | #include "generic.h" | ||
51 | |||
52 | /******************************************************************************************** | ||
53 | * ONBOARD FLASH | ||
54 | ********************************************************************************************/ | ||
55 | static struct mtd_partition trizeps4_partitions[] = { | ||
56 | { | ||
57 | .name = "Bootloader", | ||
58 | .size = 0x00040000, | ||
59 | .offset = 0, | ||
60 | .mask_flags = MTD_WRITEABLE /* force read-only */ | ||
61 | },{ | ||
62 | .name = "Kernel", | ||
63 | .size = 0x00400000, | ||
64 | .offset = 0x00040000 | ||
65 | },{ | ||
66 | .name = "Filesystem", | ||
67 | .size = MTDPART_SIZ_FULL, | ||
68 | .offset = 0x00440000 | ||
69 | } | ||
70 | }; | ||
71 | |||
72 | static struct flash_platform_data trizeps4_flash_data[] = { | ||
73 | { | ||
74 | .map_name = "cfi_probe", | ||
75 | .parts = trizeps4_partitions, | ||
76 | .nr_parts = ARRAY_SIZE(trizeps4_partitions) | ||
77 | } | ||
78 | }; | ||
79 | |||
80 | static struct resource flash_resource = { | ||
81 | .start = PXA_CS0_PHYS, | ||
82 | .end = PXA_CS0_PHYS + SZ_64M - 1, | ||
83 | .flags = IORESOURCE_MEM, | ||
84 | }; | ||
85 | |||
86 | static struct platform_device flash_device = { | ||
87 | .name = "pxa2xx-flash", | ||
88 | .id = 0, | ||
89 | .dev = { | ||
90 | .platform_data = &trizeps4_flash_data, | ||
91 | }, | ||
92 | .resource = &flash_resource, | ||
93 | .num_resources = 1, | ||
94 | }; | ||
95 | |||
96 | /******************************************************************************************** | ||
97 | * DAVICOM DM9000 Ethernet | ||
98 | ********************************************************************************************/ | ||
99 | static struct resource dm9000_resources[] = { | ||
100 | [0] = { | ||
101 | .start = TRIZEPS4_ETH_PHYS+0x300, | ||
102 | .end = TRIZEPS4_ETH_PHYS+0x400-1, | ||
103 | .flags = IORESOURCE_MEM, | ||
104 | }, | ||
105 | [1] = { | ||
106 | .start = TRIZEPS4_ETH_PHYS+0x8300, | ||
107 | .end = TRIZEPS4_ETH_PHYS+0x8400-1, | ||
108 | .flags = IORESOURCE_MEM, | ||
109 | }, | ||
110 | [2] = { | ||
111 | .start = TRIZEPS4_ETH_IRQ, | ||
112 | .end = TRIZEPS4_ETH_IRQ, | ||
113 | .flags = (IORESOURCE_IRQ | IRQT_RISING), | ||
114 | }, | ||
115 | }; | ||
116 | |||
117 | static struct platform_device dm9000_device = { | ||
118 | .name = "dm9000", | ||
119 | .id = -1, | ||
120 | .num_resources = ARRAY_SIZE(dm9000_resources), | ||
121 | .resource = dm9000_resources, | ||
122 | }; | ||
123 | |||
124 | /******************************************************************************************** | ||
125 | * PXA270 serial ports | ||
126 | ********************************************************************************************/ | ||
127 | static struct plat_serial8250_port tri_serial_ports[] = { | ||
128 | #ifdef CONFIG_SERIAL_PXA | ||
129 | /* this uses the own PXA driver */ | ||
130 | { | ||
131 | 0, | ||
132 | }, | ||
133 | #else | ||
134 | /* this uses the generic 8520 driver */ | ||
135 | [0] = { | ||
136 | .membase = (void *)&FFUART, | ||
137 | .irq = IRQ_FFUART, | ||
138 | .flags = UPF_BOOT_AUTOCONF, | ||
139 | .iotype = UPIO_MEM32, | ||
140 | .regshift = 2, | ||
141 | .uartclk = (921600*16), | ||
142 | }, | ||
143 | [1] = { | ||
144 | .membase = (void *)&BTUART, | ||
145 | .irq = IRQ_BTUART, | ||
146 | .flags = UPF_BOOT_AUTOCONF, | ||
147 | .iotype = UPIO_MEM32, | ||
148 | .regshift = 2, | ||
149 | .uartclk = (921600*16), | ||
150 | }, | ||
151 | { | ||
152 | 0, | ||
153 | }, | ||
154 | #endif | ||
155 | }; | ||
156 | |||
157 | static struct platform_device uart_devices = { | ||
158 | .name = "serial8250", | ||
159 | .id = 0, | ||
160 | .dev = { | ||
161 | .platform_data = tri_serial_ports, | ||
162 | }, | ||
163 | .num_resources = 0, | ||
164 | .resource = NULL, | ||
165 | }; | ||
166 | |||
167 | /******************************************************************************************** | ||
168 | * PXA270 ac97 sound codec | ||
169 | ********************************************************************************************/ | ||
170 | static struct platform_device ac97_audio_device = { | ||
171 | .name = "pxa2xx-ac97", | ||
172 | .id = -1, | ||
173 | }; | ||
174 | |||
175 | static struct platform_device * trizeps4_devices[] __initdata = { | ||
176 | &flash_device, | ||
177 | &uart_devices, | ||
178 | &dm9000_device, | ||
179 | &ac97_audio_device, | ||
180 | }; | ||
181 | |||
182 | #ifdef CONFIG_MACH_TRIZEPS4_CONXS | ||
183 | static short trizeps_conxs_bcr; | ||
184 | |||
185 | /* PCCARD power switching supports only 3,3V */ | ||
186 | void board_pcmcia_power(int power) | ||
187 | { | ||
188 | if (power) { | ||
189 | /* switch power on, put in reset and enable buffers */ | ||
190 | trizeps_conxs_bcr |= power; | ||
191 | trizeps_conxs_bcr |= ConXS_BCR_CF_RESET; | ||
192 | trizeps_conxs_bcr &= ~(ConXS_BCR_CF_BUF_EN); | ||
193 | ConXS_BCR = trizeps_conxs_bcr; | ||
194 | /* wait a little */ | ||
195 | udelay(2000); | ||
196 | /* take reset away */ | ||
197 | trizeps_conxs_bcr &= ~(ConXS_BCR_CF_RESET); | ||
198 | ConXS_BCR = trizeps_conxs_bcr; | ||
199 | udelay(2000); | ||
200 | } else { | ||
201 | /* put in reset */ | ||
202 | trizeps_conxs_bcr |= ConXS_BCR_CF_RESET; | ||
203 | ConXS_BCR = trizeps_conxs_bcr; | ||
204 | udelay(1000); | ||
205 | /* switch power off */ | ||
206 | trizeps_conxs_bcr &= ~(0xf); | ||
207 | ConXS_BCR = trizeps_conxs_bcr; | ||
208 | |||
209 | } | ||
210 | pr_debug("%s: o%s 0x%x\n", __FUNCTION__, power ? "n": "ff", trizeps_conxs_bcr); | ||
211 | } | ||
212 | |||
213 | /* backlight power switching for LCD panel */ | ||
214 | static void board_backlight_power(int on) | ||
215 | { | ||
216 | if (on) { | ||
217 | trizeps_conxs_bcr |= ConXS_BCR_L_DISP; | ||
218 | } else { | ||
219 | trizeps_conxs_bcr &= ~ConXS_BCR_L_DISP; | ||
220 | } | ||
221 | pr_debug("%s: o%s 0x%x\n", __FUNCTION__, on ? "n" : "ff", trizeps_conxs_bcr); | ||
222 | ConXS_BCR = trizeps_conxs_bcr; | ||
223 | } | ||
224 | |||
225 | /* Powersupply for MMC/SD cardslot */ | ||
226 | static void board_mci_power(struct device *dev, unsigned int vdd) | ||
227 | { | ||
228 | struct pxamci_platform_data* p_d = dev->platform_data; | ||
229 | |||
230 | if (( 1 << vdd) & p_d->ocr_mask) { | ||
231 | pr_debug("%s: on\n", __FUNCTION__); | ||
232 | /* FIXME fill in values here */ | ||
233 | } else { | ||
234 | pr_debug("%s: off\n", __FUNCTION__); | ||
235 | /* FIXME fill in values here */ | ||
236 | } | ||
237 | } | ||
238 | |||
239 | static short trizeps_conxs_ircr; | ||
240 | |||
241 | /* Switch modes and Power for IRDA receiver */ | ||
242 | static void board_irda_mode(struct device *dev, int mode) | ||
243 | { | ||
244 | unsigned long flags; | ||
245 | |||
246 | local_irq_save(flags); | ||
247 | if (mode & IR_SIRMODE) { | ||
248 | /* Slow mode */ | ||
249 | trizeps_conxs_ircr &= ~ConXS_IRCR_MODE; | ||
250 | } else if (mode & IR_FIRMODE) { | ||
251 | /* Fast mode */ | ||
252 | trizeps_conxs_ircr |= ConXS_IRCR_MODE; | ||
253 | } | ||
254 | if (mode & IR_OFF) { | ||
255 | trizeps_conxs_ircr |= ConXS_IRCR_SD; | ||
256 | } else { | ||
257 | trizeps_conxs_ircr &= ~ConXS_IRCR_SD; | ||
258 | } | ||
259 | /* FIXME write values to register */ | ||
260 | local_irq_restore(flags); | ||
261 | } | ||
262 | |||
263 | #else | ||
264 | /* for other baseboards define dummies */ | ||
265 | void board_pcmcia_power(int power) {;} | ||
266 | #define board_backlight_power NULL | ||
267 | #define board_mci_power NULL | ||
268 | #define board_irda_mode NULL | ||
269 | |||
270 | #endif /* CONFIG_MACH_TRIZEPS4_CONXS */ | ||
271 | EXPORT_SYMBOL(board_pcmcia_power); | ||
272 | |||
273 | static int trizeps4_mci_init(struct device *dev, irqreturn_t (*mci_detect_int)(int, void *, struct pt_regs *), void *data) | ||
274 | { | ||
275 | int err; | ||
276 | /* setup GPIO for PXA27x MMC controller */ | ||
277 | pxa_gpio_mode(GPIO32_MMCCLK_MD); | ||
278 | pxa_gpio_mode(GPIO112_MMCCMD_MD); | ||
279 | pxa_gpio_mode(GPIO92_MMCDAT0_MD); | ||
280 | pxa_gpio_mode(GPIO109_MMCDAT1_MD); | ||
281 | pxa_gpio_mode(GPIO110_MMCDAT2_MD); | ||
282 | pxa_gpio_mode(GPIO111_MMCDAT3_MD); | ||
283 | |||
284 | pxa_gpio_mode(GPIO_MMC_DET | GPIO_IN); | ||
285 | |||
286 | err = request_irq(TRIZEPS4_MMC_IRQ, mci_detect_int, SA_INTERRUPT | SA_TRIGGER_RISING, "MMC card detect", data); | ||
287 | if (err) { | ||
288 | printk(KERN_ERR "trizeps4_mci_init: MMC/SD: can't request MMC card detect IRQ\n"); | ||
289 | return -1; | ||
290 | } | ||
291 | return 0; | ||
292 | } | ||
293 | |||
294 | static void trizeps4_mci_exit(struct device *dev, void *data) | ||
295 | { | ||
296 | free_irq(TRIZEPS4_MMC_IRQ, data); | ||
297 | } | ||
298 | |||
299 | static struct pxamci_platform_data trizeps4_mci_platform_data = { | ||
300 | .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, | ||
301 | .init = trizeps4_mci_init, | ||
302 | .exit = trizeps4_mci_exit, | ||
303 | .setpower = board_mci_power, | ||
304 | }; | ||
305 | |||
306 | static struct pxaficp_platform_data trizeps4_ficp_platform_data = { | ||
307 | .transceiver_cap = IR_SIRMODE | IR_FIRMODE | IR_OFF, | ||
308 | .transceiver_mode = board_irda_mode, | ||
309 | }; | ||
310 | |||
311 | static int trizeps4_ohci_init(struct device *dev) | ||
312 | { | ||
313 | /* setup Port1 GPIO pin. */ | ||
314 | pxa_gpio_mode( 88 | GPIO_ALT_FN_1_IN); /* USBHPWR1 */ | ||
315 | pxa_gpio_mode( 89 | GPIO_ALT_FN_2_OUT); /* USBHPEN1 */ | ||
316 | |||
317 | /* Set the Power Control Polarity Low and Power Sense | ||
318 | Polarity Low to active low. */ | ||
319 | UHCHR = (UHCHR | UHCHR_PCPL | UHCHR_PSPL) & | ||
320 | ~(UHCHR_SSEP1 | UHCHR_SSEP2 | UHCHR_SSEP3 | UHCHR_SSE); | ||
321 | |||
322 | return 0; | ||
323 | } | ||
324 | |||
325 | static void trizeps4_ohci_exit(struct device *dev) | ||
326 | { | ||
327 | ; | ||
328 | } | ||
329 | |||
330 | static struct pxaohci_platform_data trizeps4_ohci_platform_data = { | ||
331 | .port_mode = PMM_PERPORT_MODE, | ||
332 | .init = trizeps4_ohci_init, | ||
333 | .exit = trizeps4_ohci_exit, | ||
334 | }; | ||
335 | |||
336 | static struct map_desc trizeps4_io_desc[] __initdata = { | ||
337 | { /* ConXS CFSR */ | ||
338 | .virtual = TRIZEPS4_CFSR_VIRT, | ||
339 | .pfn = __phys_to_pfn(TRIZEPS4_CFSR_PHYS), | ||
340 | .length = 0x00001000, | ||
341 | .type = MT_DEVICE | ||
342 | }, | ||
343 | { /* ConXS BCR */ | ||
344 | .virtual = TRIZEPS4_BOCR_VIRT, | ||
345 | .pfn = __phys_to_pfn(TRIZEPS4_BOCR_PHYS), | ||
346 | .length = 0x00001000, | ||
347 | .type = MT_DEVICE | ||
348 | }, | ||
349 | { /* ConXS IRCR */ | ||
350 | .virtual = TRIZEPS4_IRCR_VIRT, | ||
351 | .pfn = __phys_to_pfn(TRIZEPS4_IRCR_PHYS), | ||
352 | .length = 0x00001000, | ||
353 | .type = MT_DEVICE | ||
354 | }, | ||
355 | { /* ConXS DCR */ | ||
356 | .virtual = TRIZEPS4_DICR_VIRT, | ||
357 | .pfn = __phys_to_pfn(TRIZEPS4_DICR_PHYS), | ||
358 | .length = 0x00001000, | ||
359 | .type = MT_DEVICE | ||
360 | }, | ||
361 | { /* ConXS UPSR */ | ||
362 | .virtual = TRIZEPS4_UPSR_VIRT, | ||
363 | .pfn = __phys_to_pfn(TRIZEPS4_UPSR_PHYS), | ||
364 | .length = 0x00001000, | ||
365 | .type = MT_DEVICE | ||
366 | } | ||
367 | }; | ||
368 | |||
369 | static struct pxafb_mach_info sharp_lcd __initdata = { | ||
370 | .pixclock = 78000, | ||
371 | .xres = 640, | ||
372 | .yres = 480, | ||
373 | .bpp = 8, | ||
374 | .hsync_len = 4, | ||
375 | .left_margin = 4, | ||
376 | .right_margin = 4, | ||
377 | .vsync_len = 2, | ||
378 | .upper_margin = 0, | ||
379 | .lower_margin = 0, | ||
380 | .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, | ||
381 | .cmap_greyscale = 0, | ||
382 | .cmap_inverse = 0, | ||
383 | .cmap_static = 0, | ||
384 | .lccr0 = LCCR0_Color | LCCR0_Pas | LCCR0_Dual, | ||
385 | .lccr3 = 0x0340ff02, | ||
386 | .pxafb_backlight_power = board_backlight_power, | ||
387 | }; | ||
388 | |||
389 | static void __init trizeps4_fixup(struct machine_desc *desc, struct tag *tags, char **cmdline, struct meminfo *mi) | ||
390 | { | ||
391 | } | ||
392 | |||
393 | static void __init trizeps4_init(void) | ||
394 | { | ||
395 | platform_add_devices(trizeps4_devices, ARRAY_SIZE(trizeps4_devices)); | ||
396 | |||
397 | set_pxa_fb_info(&sharp_lcd); | ||
398 | |||
399 | pxa_set_mci_info(&trizeps4_mci_platform_data); | ||
400 | pxa_set_ficp_info(&trizeps4_ficp_platform_data); | ||
401 | pxa_set_ohci_info(&trizeps4_ohci_platform_data); | ||
402 | } | ||
403 | |||
404 | static void __init trizeps4_map_io(void) | ||
405 | { | ||
406 | pxa_map_io(); | ||
407 | iotable_init(trizeps4_io_desc, ARRAY_SIZE(trizeps4_io_desc)); | ||
408 | |||
409 | /* for DiskOnChip */ | ||
410 | pxa_gpio_mode(GPIO15_nCS_1_MD); | ||
411 | |||
412 | /* for off-module PIC on ConXS board */ | ||
413 | pxa_gpio_mode(GPIO_PIC | GPIO_IN); | ||
414 | |||
415 | /* UCB1400 irq */ | ||
416 | pxa_gpio_mode(GPIO_UCB1400 | GPIO_IN); | ||
417 | |||
418 | /* for DM9000 LAN */ | ||
419 | pxa_gpio_mode(GPIO78_nCS_2_MD); | ||
420 | pxa_gpio_mode(GPIO_DM9000 | GPIO_IN); | ||
421 | |||
422 | /* for PCMCIA device */ | ||
423 | pxa_gpio_mode(GPIO_PCD | GPIO_IN); | ||
424 | pxa_gpio_mode(GPIO_PRDY | GPIO_IN); | ||
425 | |||
426 | /* for I2C adapter */ | ||
427 | pxa_gpio_mode(GPIO117_I2CSCL_MD); | ||
428 | pxa_gpio_mode(GPIO118_I2CSDA_MD); | ||
429 | |||
430 | /* MMC_DET s.o. */ | ||
431 | pxa_gpio_mode(GPIO_MMC_DET | GPIO_IN); | ||
432 | |||
433 | /* whats that for ??? */ | ||
434 | pxa_gpio_mode(GPIO79_nCS_3_MD); | ||
435 | |||
436 | pxa_gpio_mode( GPIO_SYS_BUSY_LED | GPIO_OUT); /* LED1 */ | ||
437 | pxa_gpio_mode( GPIO_HEARTBEAT_LED | GPIO_OUT); /* LED2 */ | ||
438 | |||
439 | #ifdef CONFIG_MACH_TRIZEPS4_CONXS | ||
440 | #ifdef CONFIG_IDE_PXA_CF | ||
441 | /* if boot direct from compact flash dont disable power */ | ||
442 | trizeps_conxs_bcr = 0x0009; | ||
443 | #else | ||
444 | /* this is the reset value */ | ||
445 | trizeps_conxs_bcr = 0x00A0; | ||
446 | #endif | ||
447 | ConXS_BCR = trizeps_conxs_bcr; | ||
448 | #endif | ||
449 | |||
450 | PWER = 0x00000002; | ||
451 | PFER = 0x00000000; | ||
452 | PRER = 0x00000002; | ||
453 | PGSR0 = 0x0158C000; | ||
454 | PGSR1 = 0x00FF0080; | ||
455 | PGSR2 = 0x0001C004; | ||
456 | /* Stop 3.6MHz and drive HIGH to PCMCIA and CS */ | ||
457 | PCFR |= PCFR_OPDE; | ||
458 | } | ||
459 | |||
460 | MACHINE_START(TRIZEPS4, "Keith und Koep Trizeps IV module") | ||
461 | /* MAINTAINER("Jürgen Schindele") */ | ||
462 | .phys_io = 0x40000000, | ||
463 | .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, | ||
464 | .boot_params = TRIZEPS4_SDRAM_BASE + 0x100, | ||
465 | .fixup = trizeps4_fixup, | ||
466 | .init_machine = trizeps4_init, | ||
467 | .map_io = trizeps4_map_io, | ||
468 | .init_irq = pxa_init_irq, | ||
469 | .timer = &pxa_timer, | ||
470 | MACHINE_END | ||
471 | |||
diff --git a/arch/arm/mach-sa1100/cpu-sa1110.c b/arch/arm/mach-sa1100/cpu-sa1110.c index 04c94ab6c18b..639597729932 100644 --- a/arch/arm/mach-sa1100/cpu-sa1110.c +++ b/arch/arm/mach-sa1100/cpu-sa1110.c | |||
@@ -15,7 +15,10 @@ | |||
15 | * SDRAM reads (rev A0, B0, B1) | 15 | * SDRAM reads (rev A0, B0, B1) |
16 | * | 16 | * |
17 | * We ignore rev. A0 and B0 devices; I don't think they're worth supporting. | 17 | * We ignore rev. A0 and B0 devices; I don't think they're worth supporting. |
18 | * | ||
19 | * The SDRAM type can be passed on the command line as cpu_sa1110.sdram=type | ||
18 | */ | 20 | */ |
21 | #include <linux/moduleparam.h> | ||
19 | #include <linux/types.h> | 22 | #include <linux/types.h> |
20 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
21 | #include <linux/sched.h> | 24 | #include <linux/sched.h> |
@@ -35,6 +38,7 @@ | |||
35 | static struct cpufreq_driver sa1110_driver; | 38 | static struct cpufreq_driver sa1110_driver; |
36 | 39 | ||
37 | struct sdram_params { | 40 | struct sdram_params { |
41 | const char name[16]; | ||
38 | u_char rows; /* bits */ | 42 | u_char rows; /* bits */ |
39 | u_char cas_latency; /* cycles */ | 43 | u_char cas_latency; /* cycles */ |
40 | u_char tck; /* clock cycle time (ns) */ | 44 | u_char tck; /* clock cycle time (ns) */ |
@@ -50,54 +54,53 @@ struct sdram_info { | |||
50 | u_int mdcas[3]; | 54 | u_int mdcas[3]; |
51 | }; | 55 | }; |
52 | 56 | ||
53 | static struct sdram_params tc59sm716_cl2_params __initdata = { | 57 | static struct sdram_params sdram_tbl[] __initdata = { |
54 | .rows = 12, | 58 | { /* Toshiba TC59SM716 CL2 */ |
55 | .tck = 10, | 59 | .name = "TC59SM716-CL2", |
56 | .trcd = 20, | 60 | .rows = 12, |
57 | .trp = 20, | 61 | .tck = 10, |
58 | .twr = 10, | 62 | .trcd = 20, |
59 | .refresh = 64000, | 63 | .trp = 20, |
60 | .cas_latency = 2, | 64 | .twr = 10, |
61 | }; | 65 | .refresh = 64000, |
62 | 66 | .cas_latency = 2, | |
63 | static struct sdram_params tc59sm716_cl3_params __initdata = { | 67 | }, { /* Toshiba TC59SM716 CL3 */ |
64 | .rows = 12, | 68 | .name = "TC59SM716-CL3", |
65 | .tck = 8, | 69 | .rows = 12, |
66 | .trcd = 20, | 70 | .tck = 8, |
67 | .trp = 20, | 71 | .trcd = 20, |
68 | .twr = 8, | 72 | .trp = 20, |
69 | .refresh = 64000, | 73 | .twr = 8, |
70 | .cas_latency = 3, | 74 | .refresh = 64000, |
71 | }; | 75 | .cas_latency = 3, |
72 | 76 | }, { /* Samsung K4S641632D TC75 */ | |
73 | static struct sdram_params samsung_k4s641632d_tc75 __initdata = { | 77 | .name = "K4S641632D", |
74 | .rows = 14, | 78 | .rows = 14, |
75 | .tck = 9, | 79 | .tck = 9, |
76 | .trcd = 27, | 80 | .trcd = 27, |
77 | .trp = 20, | 81 | .trp = 20, |
78 | .twr = 9, | 82 | .twr = 9, |
79 | .refresh = 64000, | 83 | .refresh = 64000, |
80 | .cas_latency = 3, | 84 | .cas_latency = 3, |
81 | }; | 85 | }, { /* Samsung KM416S4030CT */ |
82 | 86 | .name = "KM416S4030CT", | |
83 | static struct sdram_params samsung_km416s4030ct __initdata = { | 87 | .rows = 13, |
84 | .rows = 13, | 88 | .tck = 8, |
85 | .tck = 8, | 89 | .trcd = 24, /* 3 CLKs */ |
86 | .trcd = 24, /* 3 CLKs */ | 90 | .trp = 24, /* 3 CLKs */ |
87 | .trp = 24, /* 3 CLKs */ | 91 | .twr = 16, /* Trdl: 2 CLKs */ |
88 | .twr = 16, /* Trdl: 2 CLKs */ | 92 | .refresh = 64000, |
89 | .refresh = 64000, | 93 | .cas_latency = 3, |
90 | .cas_latency = 3, | 94 | }, { /* Winbond W982516AH75L CL3 */ |
91 | }; | 95 | .name = "W982516AH75L", |
92 | 96 | .rows = 16, | |
93 | static struct sdram_params wbond_w982516ah75l_cl3_params __initdata = { | 97 | .tck = 8, |
94 | .rows = 16, | 98 | .trcd = 20, |
95 | .tck = 8, | 99 | .trp = 20, |
96 | .trcd = 20, | 100 | .twr = 8, |
97 | .trp = 20, | 101 | .refresh = 64000, |
98 | .twr = 8, | 102 | .cas_latency = 3, |
99 | .refresh = 64000, | 103 | }, |
100 | .cas_latency = 3, | ||
101 | }; | 104 | }; |
102 | 105 | ||
103 | static struct sdram_params sdram_params; | 106 | static struct sdram_params sdram_params; |
@@ -336,19 +339,36 @@ static struct cpufreq_driver sa1110_driver = { | |||
336 | .name = "sa1110", | 339 | .name = "sa1110", |
337 | }; | 340 | }; |
338 | 341 | ||
342 | static struct sdram_params *sa1110_find_sdram(const char *name) | ||
343 | { | ||
344 | struct sdram_params *sdram; | ||
345 | |||
346 | for (sdram = sdram_tbl; sdram < sdram_tbl + ARRAY_SIZE(sdram_tbl); sdram++) | ||
347 | if (strcmp(name, sdram->name) == 0) | ||
348 | return sdram; | ||
349 | |||
350 | return NULL; | ||
351 | } | ||
352 | |||
353 | static char sdram_name[16]; | ||
354 | |||
339 | static int __init sa1110_clk_init(void) | 355 | static int __init sa1110_clk_init(void) |
340 | { | 356 | { |
341 | struct sdram_params *sdram = NULL; | 357 | struct sdram_params *sdram; |
358 | const char *name = sdram_name; | ||
342 | 359 | ||
343 | if (machine_is_assabet()) | 360 | if (!name[0]) { |
344 | sdram = &tc59sm716_cl3_params; | 361 | if (machine_is_assabet()) |
362 | name = "TC59SM716-CL3"; | ||
345 | 363 | ||
346 | if (machine_is_pt_system3()) | 364 | if (machine_is_pt_system3()) |
347 | sdram = &samsung_k4s641632d_tc75; | 365 | name = "K4S641632D"; |
348 | 366 | ||
349 | if (machine_is_h3100()) | 367 | if (machine_is_h3100()) |
350 | sdram = &samsung_km416s4030ct; | 368 | name = "KM416S4030CT"; |
369 | } | ||
351 | 370 | ||
371 | sdram = sa1110_find_sdram(name); | ||
352 | if (sdram) { | 372 | if (sdram) { |
353 | printk(KERN_DEBUG "SDRAM: tck: %d trcd: %d trp: %d" | 373 | printk(KERN_DEBUG "SDRAM: tck: %d trcd: %d trp: %d" |
354 | " twr: %d refresh: %d cas_latency: %d\n", | 374 | " twr: %d refresh: %d cas_latency: %d\n", |
@@ -363,4 +383,5 @@ static int __init sa1110_clk_init(void) | |||
363 | return 0; | 383 | return 0; |
364 | } | 384 | } |
365 | 385 | ||
386 | module_param_string(sdram, sdram_name, sizeof(sdram_name), 0); | ||
366 | arch_initcall(sa1110_clk_init); | 387 | arch_initcall(sa1110_clk_init); |
diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig index c4bca753165b..5f80f184cd32 100644 --- a/arch/arm/mm/Kconfig +++ b/arch/arm/mm/Kconfig | |||
@@ -121,8 +121,8 @@ config CPU_ARM925T | |||
121 | # ARM926T | 121 | # ARM926T |
122 | config CPU_ARM926T | 122 | config CPU_ARM926T |
123 | bool "Support ARM926T processor" | 123 | bool "Support ARM926T processor" |
124 | depends on ARCH_INTEGRATOR || ARCH_VERSATILE_PB || MACH_VERSATILE_AB || ARCH_OMAP730 || ARCH_OMAP16XX || MACH_REALVIEW_EB || ARCH_PNX4008 || ARCH_NETX || CPU_S3C2412 | 124 | depends on ARCH_INTEGRATOR || ARCH_VERSATILE_PB || MACH_VERSATILE_AB || ARCH_OMAP730 || ARCH_OMAP16XX || MACH_REALVIEW_EB || ARCH_PNX4008 || ARCH_NETX || CPU_S3C2412 || ARCH_AT91SAM9260 || ARCH_AT91SAM9261 |
125 | default y if ARCH_VERSATILE_PB || MACH_VERSATILE_AB || ARCH_OMAP730 || ARCH_OMAP16XX || ARCH_PNX4008 || ARCH_NETX || CPU_S3C2412 | 125 | default y if ARCH_VERSATILE_PB || MACH_VERSATILE_AB || ARCH_OMAP730 || ARCH_OMAP16XX || ARCH_PNX4008 || ARCH_NETX || CPU_S3C2412 || ARCH_AT91SAM9260 || ARCH_AT91SAM9261 |
126 | select CPU_32v5 | 126 | select CPU_32v5 |
127 | select CPU_ABRT_EV5TJ | 127 | select CPU_ABRT_EV5TJ |
128 | select CPU_CACHE_VIVT | 128 | select CPU_CACHE_VIVT |
diff --git a/arch/arm/mm/ioremap.c b/arch/arm/mm/ioremap.c index 7691cfdba567..7eac87f05180 100644 --- a/arch/arm/mm/ioremap.c +++ b/arch/arm/mm/ioremap.c | |||
@@ -27,7 +27,16 @@ | |||
27 | 27 | ||
28 | #include <asm/cacheflush.h> | 28 | #include <asm/cacheflush.h> |
29 | #include <asm/io.h> | 29 | #include <asm/io.h> |
30 | #include <asm/mmu_context.h> | ||
31 | #include <asm/pgalloc.h> | ||
30 | #include <asm/tlbflush.h> | 32 | #include <asm/tlbflush.h> |
33 | #include <asm/sizes.h> | ||
34 | |||
35 | /* | ||
36 | * Used by ioremap() and iounmap() code to mark (super)section-mapped | ||
37 | * I/O regions in vm_struct->flags field. | ||
38 | */ | ||
39 | #define VM_ARM_SECTION_MAPPING 0x80000000 | ||
31 | 40 | ||
32 | static inline void | 41 | static inline void |
33 | remap_area_pte(pte_t * pte, unsigned long address, unsigned long size, | 42 | remap_area_pte(pte_t * pte, unsigned long address, unsigned long size, |
@@ -113,10 +122,168 @@ remap_area_pages(unsigned long start, unsigned long pfn, | |||
113 | dir++; | 122 | dir++; |
114 | } while (address && (address < end)); | 123 | } while (address && (address < end)); |
115 | 124 | ||
116 | flush_cache_vmap(start, end); | ||
117 | return err; | 125 | return err; |
118 | } | 126 | } |
119 | 127 | ||
128 | |||
129 | void __check_kvm_seq(struct mm_struct *mm) | ||
130 | { | ||
131 | unsigned int seq; | ||
132 | |||
133 | do { | ||
134 | seq = init_mm.context.kvm_seq; | ||
135 | memcpy(pgd_offset(mm, VMALLOC_START), | ||
136 | pgd_offset_k(VMALLOC_START), | ||
137 | sizeof(pgd_t) * (pgd_index(VMALLOC_END) - | ||
138 | pgd_index(VMALLOC_START))); | ||
139 | mm->context.kvm_seq = seq; | ||
140 | } while (seq != init_mm.context.kvm_seq); | ||
141 | } | ||
142 | |||
143 | #ifndef CONFIG_SMP | ||
144 | /* | ||
145 | * Section support is unsafe on SMP - If you iounmap and ioremap a region, | ||
146 | * the other CPUs will not see this change until their next context switch. | ||
147 | * Meanwhile, (eg) if an interrupt comes in on one of those other CPUs | ||
148 | * which requires the new ioremap'd region to be referenced, the CPU will | ||
149 | * reference the _old_ region. | ||
150 | * | ||
151 | * Note that get_vm_area() allocates a guard 4K page, so we need to mask | ||
152 | * the size back to 1MB aligned or we will overflow in the loop below. | ||
153 | */ | ||
154 | static void unmap_area_sections(unsigned long virt, unsigned long size) | ||
155 | { | ||
156 | unsigned long addr = virt, end = virt + (size & ~SZ_1M); | ||
157 | pgd_t *pgd; | ||
158 | |||
159 | flush_cache_vunmap(addr, end); | ||
160 | pgd = pgd_offset_k(addr); | ||
161 | do { | ||
162 | pmd_t pmd, *pmdp = pmd_offset(pgd, addr); | ||
163 | |||
164 | pmd = *pmdp; | ||
165 | if (!pmd_none(pmd)) { | ||
166 | /* | ||
167 | * Clear the PMD from the page table, and | ||
168 | * increment the kvm sequence so others | ||
169 | * notice this change. | ||
170 | * | ||
171 | * Note: this is still racy on SMP machines. | ||
172 | */ | ||
173 | pmd_clear(pmdp); | ||
174 | init_mm.context.kvm_seq++; | ||
175 | |||
176 | /* | ||
177 | * Free the page table, if there was one. | ||
178 | */ | ||
179 | if ((pmd_val(pmd) & PMD_TYPE_MASK) == PMD_TYPE_TABLE) | ||
180 | pte_free_kernel(pmd_page_kernel(pmd)); | ||
181 | } | ||
182 | |||
183 | addr += PGDIR_SIZE; | ||
184 | pgd++; | ||
185 | } while (addr < end); | ||
186 | |||
187 | /* | ||
188 | * Ensure that the active_mm is up to date - we want to | ||
189 | * catch any use-after-iounmap cases. | ||
190 | */ | ||
191 | if (current->active_mm->context.kvm_seq != init_mm.context.kvm_seq) | ||
192 | __check_kvm_seq(current->active_mm); | ||
193 | |||
194 | flush_tlb_kernel_range(virt, end); | ||
195 | } | ||
196 | |||
197 | static int | ||
198 | remap_area_sections(unsigned long virt, unsigned long pfn, | ||
199 | unsigned long size, unsigned long flags) | ||
200 | { | ||
201 | unsigned long prot, addr = virt, end = virt + size; | ||
202 | pgd_t *pgd; | ||
203 | |||
204 | /* | ||
205 | * Remove and free any PTE-based mapping, and | ||
206 | * sync the current kernel mapping. | ||
207 | */ | ||
208 | unmap_area_sections(virt, size); | ||
209 | |||
210 | prot = PMD_TYPE_SECT | PMD_SECT_AP_WRITE | PMD_DOMAIN(DOMAIN_IO) | | ||
211 | (flags & (L_PTE_CACHEABLE | L_PTE_BUFFERABLE)); | ||
212 | |||
213 | /* | ||
214 | * ARMv6 and above need XN set to prevent speculative prefetches | ||
215 | * hitting IO. | ||
216 | */ | ||
217 | if (cpu_architecture() >= CPU_ARCH_ARMv6) | ||
218 | prot |= PMD_SECT_XN; | ||
219 | |||
220 | pgd = pgd_offset_k(addr); | ||
221 | do { | ||
222 | pmd_t *pmd = pmd_offset(pgd, addr); | ||
223 | |||
224 | pmd[0] = __pmd(__pfn_to_phys(pfn) | prot); | ||
225 | pfn += SZ_1M >> PAGE_SHIFT; | ||
226 | pmd[1] = __pmd(__pfn_to_phys(pfn) | prot); | ||
227 | pfn += SZ_1M >> PAGE_SHIFT; | ||
228 | flush_pmd_entry(pmd); | ||
229 | |||
230 | addr += PGDIR_SIZE; | ||
231 | pgd++; | ||
232 | } while (addr < end); | ||
233 | |||
234 | return 0; | ||
235 | } | ||
236 | |||
237 | static int | ||
238 | remap_area_supersections(unsigned long virt, unsigned long pfn, | ||
239 | unsigned long size, unsigned long flags) | ||
240 | { | ||
241 | unsigned long prot, addr = virt, end = virt + size; | ||
242 | pgd_t *pgd; | ||
243 | |||
244 | /* | ||
245 | * Remove and free any PTE-based mapping, and | ||
246 | * sync the current kernel mapping. | ||
247 | */ | ||
248 | unmap_area_sections(virt, size); | ||
249 | |||
250 | prot = PMD_TYPE_SECT | PMD_SECT_SUPER | PMD_SECT_AP_WRITE | | ||
251 | PMD_DOMAIN(DOMAIN_IO) | | ||
252 | (flags & (L_PTE_CACHEABLE | L_PTE_BUFFERABLE)); | ||
253 | |||
254 | /* | ||
255 | * ARMv6 and above need XN set to prevent speculative prefetches | ||
256 | * hitting IO. | ||
257 | */ | ||
258 | if (cpu_architecture() >= CPU_ARCH_ARMv6) | ||
259 | prot |= PMD_SECT_XN; | ||
260 | |||
261 | pgd = pgd_offset_k(virt); | ||
262 | do { | ||
263 | unsigned long super_pmd_val, i; | ||
264 | |||
265 | super_pmd_val = __pfn_to_phys(pfn) | prot; | ||
266 | super_pmd_val |= ((pfn >> (32 - PAGE_SHIFT)) & 0xf) << 20; | ||
267 | |||
268 | for (i = 0; i < 8; i++) { | ||
269 | pmd_t *pmd = pmd_offset(pgd, addr); | ||
270 | |||
271 | pmd[0] = __pmd(super_pmd_val); | ||
272 | pmd[1] = __pmd(super_pmd_val); | ||
273 | flush_pmd_entry(pmd); | ||
274 | |||
275 | addr += PGDIR_SIZE; | ||
276 | pgd++; | ||
277 | } | ||
278 | |||
279 | pfn += SUPERSECTION_SIZE >> PAGE_SHIFT; | ||
280 | } while (addr < end); | ||
281 | |||
282 | return 0; | ||
283 | } | ||
284 | #endif | ||
285 | |||
286 | |||
120 | /* | 287 | /* |
121 | * Remap an arbitrary physical address space into the kernel virtual | 288 | * Remap an arbitrary physical address space into the kernel virtual |
122 | * address space. Needed when the kernel wants to access high addresses | 289 | * address space. Needed when the kernel wants to access high addresses |
@@ -133,18 +300,42 @@ void __iomem * | |||
133 | __ioremap_pfn(unsigned long pfn, unsigned long offset, size_t size, | 300 | __ioremap_pfn(unsigned long pfn, unsigned long offset, size_t size, |
134 | unsigned long flags) | 301 | unsigned long flags) |
135 | { | 302 | { |
303 | int err; | ||
136 | unsigned long addr; | 304 | unsigned long addr; |
137 | struct vm_struct * area; | 305 | struct vm_struct * area; |
306 | unsigned int cr = get_cr(); | ||
307 | |||
308 | /* | ||
309 | * High mappings must be supersection aligned | ||
310 | */ | ||
311 | if (pfn >= 0x100000 && (__pfn_to_phys(pfn) & ~SUPERSECTION_MASK)) | ||
312 | return NULL; | ||
138 | 313 | ||
139 | area = get_vm_area(size, VM_IOREMAP); | 314 | area = get_vm_area(size, VM_IOREMAP); |
140 | if (!area) | 315 | if (!area) |
141 | return NULL; | 316 | return NULL; |
142 | addr = (unsigned long)area->addr; | 317 | addr = (unsigned long)area->addr; |
143 | if (remap_area_pages(addr, pfn, size, flags)) { | 318 | |
319 | #ifndef CONFIG_SMP | ||
320 | if ((((cpu_architecture() >= CPU_ARCH_ARMv6) && (cr & CR_XP)) || | ||
321 | cpu_is_xsc3()) && | ||
322 | !((__pfn_to_phys(pfn) | size | addr) & ~SUPERSECTION_MASK)) { | ||
323 | area->flags |= VM_ARM_SECTION_MAPPING; | ||
324 | err = remap_area_supersections(addr, pfn, size, flags); | ||
325 | } else if (!((__pfn_to_phys(pfn) | size | addr) & ~PMD_MASK)) { | ||
326 | area->flags |= VM_ARM_SECTION_MAPPING; | ||
327 | err = remap_area_sections(addr, pfn, size, flags); | ||
328 | } else | ||
329 | #endif | ||
330 | err = remap_area_pages(addr, pfn, size, flags); | ||
331 | |||
332 | if (err) { | ||
144 | vunmap((void *)addr); | 333 | vunmap((void *)addr); |
145 | return NULL; | 334 | return NULL; |
146 | } | 335 | } |
147 | return (void __iomem *) (offset + (char *)addr); | 336 | |
337 | flush_cache_vmap(addr, addr + size); | ||
338 | return (void __iomem *) (offset + addr); | ||
148 | } | 339 | } |
149 | EXPORT_SYMBOL(__ioremap_pfn); | 340 | EXPORT_SYMBOL(__ioremap_pfn); |
150 | 341 | ||
@@ -173,6 +364,34 @@ EXPORT_SYMBOL(__ioremap); | |||
173 | 364 | ||
174 | void __iounmap(void __iomem *addr) | 365 | void __iounmap(void __iomem *addr) |
175 | { | 366 | { |
176 | vunmap((void *)(PAGE_MASK & (unsigned long)addr)); | 367 | struct vm_struct **p, *tmp; |
368 | unsigned int section_mapping = 0; | ||
369 | |||
370 | addr = (void __iomem *)(PAGE_MASK & (unsigned long)addr); | ||
371 | |||
372 | /* | ||
373 | * If this is a section based mapping we need to handle it | ||
374 | * specially as the VM subysystem does not know how to handle | ||
375 | * such a beast. We need the lock here b/c we need to clear | ||
376 | * all the mappings before the area can be reclaimed | ||
377 | * by someone else. | ||
378 | */ | ||
379 | write_lock(&vmlist_lock); | ||
380 | for (p = &vmlist ; (tmp = *p) ; p = &tmp->next) { | ||
381 | if((tmp->flags & VM_IOREMAP) && (tmp->addr == addr)) { | ||
382 | if (tmp->flags & VM_ARM_SECTION_MAPPING) { | ||
383 | *p = tmp->next; | ||
384 | unmap_area_sections((unsigned long)tmp->addr, | ||
385 | tmp->size); | ||
386 | kfree(tmp); | ||
387 | section_mapping = 1; | ||
388 | } | ||
389 | break; | ||
390 | } | ||
391 | } | ||
392 | write_unlock(&vmlist_lock); | ||
393 | |||
394 | if (!section_mapping) | ||
395 | vunmap(addr); | ||
177 | } | 396 | } |
178 | EXPORT_SYMBOL(__iounmap); | 397 | EXPORT_SYMBOL(__iounmap); |
diff --git a/arch/arm/mm/mm-armv.c b/arch/arm/mm/mm-armv.c index b0242c6ea066..38769f5862bc 100644 --- a/arch/arm/mm/mm-armv.c +++ b/arch/arm/mm/mm-armv.c | |||
@@ -302,16 +302,16 @@ static struct mem_types mem_types[] __initdata = { | |||
302 | .prot_pte = L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY | | 302 | .prot_pte = L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY | |
303 | L_PTE_WRITE, | 303 | L_PTE_WRITE, |
304 | .prot_l1 = PMD_TYPE_TABLE, | 304 | .prot_l1 = PMD_TYPE_TABLE, |
305 | .prot_sect = PMD_TYPE_SECT | PMD_SECT_UNCACHED | | 305 | .prot_sect = PMD_TYPE_SECT | PMD_BIT4 | PMD_SECT_UNCACHED | |
306 | PMD_SECT_AP_WRITE, | 306 | PMD_SECT_AP_WRITE, |
307 | .domain = DOMAIN_IO, | 307 | .domain = DOMAIN_IO, |
308 | }, | 308 | }, |
309 | [MT_CACHECLEAN] = { | 309 | [MT_CACHECLEAN] = { |
310 | .prot_sect = PMD_TYPE_SECT, | 310 | .prot_sect = PMD_TYPE_SECT | PMD_BIT4, |
311 | .domain = DOMAIN_KERNEL, | 311 | .domain = DOMAIN_KERNEL, |
312 | }, | 312 | }, |
313 | [MT_MINICLEAN] = { | 313 | [MT_MINICLEAN] = { |
314 | .prot_sect = PMD_TYPE_SECT | PMD_SECT_MINICACHE, | 314 | .prot_sect = PMD_TYPE_SECT | PMD_BIT4 | PMD_SECT_MINICACHE, |
315 | .domain = DOMAIN_KERNEL, | 315 | .domain = DOMAIN_KERNEL, |
316 | }, | 316 | }, |
317 | [MT_LOW_VECTORS] = { | 317 | [MT_LOW_VECTORS] = { |
@@ -327,25 +327,25 @@ static struct mem_types mem_types[] __initdata = { | |||
327 | .domain = DOMAIN_USER, | 327 | .domain = DOMAIN_USER, |
328 | }, | 328 | }, |
329 | [MT_MEMORY] = { | 329 | [MT_MEMORY] = { |
330 | .prot_sect = PMD_TYPE_SECT | PMD_SECT_AP_WRITE, | 330 | .prot_sect = PMD_TYPE_SECT | PMD_BIT4 | PMD_SECT_AP_WRITE, |
331 | .domain = DOMAIN_KERNEL, | 331 | .domain = DOMAIN_KERNEL, |
332 | }, | 332 | }, |
333 | [MT_ROM] = { | 333 | [MT_ROM] = { |
334 | .prot_sect = PMD_TYPE_SECT, | 334 | .prot_sect = PMD_TYPE_SECT | PMD_BIT4, |
335 | .domain = DOMAIN_KERNEL, | 335 | .domain = DOMAIN_KERNEL, |
336 | }, | 336 | }, |
337 | [MT_IXP2000_DEVICE] = { /* IXP2400 requires XCB=101 for on-chip I/O */ | 337 | [MT_IXP2000_DEVICE] = { /* IXP2400 requires XCB=101 for on-chip I/O */ |
338 | .prot_pte = L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY | | 338 | .prot_pte = L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY | |
339 | L_PTE_WRITE, | 339 | L_PTE_WRITE, |
340 | .prot_l1 = PMD_TYPE_TABLE, | 340 | .prot_l1 = PMD_TYPE_TABLE, |
341 | .prot_sect = PMD_TYPE_SECT | PMD_SECT_UNCACHED | | 341 | .prot_sect = PMD_TYPE_SECT | PMD_BIT4 | PMD_SECT_UNCACHED | |
342 | PMD_SECT_AP_WRITE | PMD_SECT_BUFFERABLE | | 342 | PMD_SECT_AP_WRITE | PMD_SECT_BUFFERABLE | |
343 | PMD_SECT_TEX(1), | 343 | PMD_SECT_TEX(1), |
344 | .domain = DOMAIN_IO, | 344 | .domain = DOMAIN_IO, |
345 | }, | 345 | }, |
346 | [MT_NONSHARED_DEVICE] = { | 346 | [MT_NONSHARED_DEVICE] = { |
347 | .prot_l1 = PMD_TYPE_TABLE, | 347 | .prot_l1 = PMD_TYPE_TABLE, |
348 | .prot_sect = PMD_TYPE_SECT | PMD_SECT_NONSHARED_DEV | | 348 | .prot_sect = PMD_TYPE_SECT | PMD_BIT4 | PMD_SECT_NONSHARED_DEV | |
349 | PMD_SECT_AP_WRITE, | 349 | PMD_SECT_AP_WRITE, |
350 | .domain = DOMAIN_IO, | 350 | .domain = DOMAIN_IO, |
351 | } | 351 | } |
@@ -375,14 +375,21 @@ void __init build_mem_type_table(void) | |||
375 | ecc_mask = 0; | 375 | ecc_mask = 0; |
376 | } | 376 | } |
377 | 377 | ||
378 | if (cpu_arch <= CPU_ARCH_ARMv5TEJ && !cpu_is_xscale()) { | 378 | /* |
379 | for (i = 0; i < ARRAY_SIZE(mem_types); i++) { | 379 | * Xscale must not have PMD bit 4 set for section mappings. |
380 | */ | ||
381 | if (cpu_is_xscale()) | ||
382 | for (i = 0; i < ARRAY_SIZE(mem_types); i++) | ||
383 | mem_types[i].prot_sect &= ~PMD_BIT4; | ||
384 | |||
385 | /* | ||
386 | * ARMv5 and lower, excluding Xscale, bit 4 must be set for | ||
387 | * page tables. | ||
388 | */ | ||
389 | if (cpu_arch < CPU_ARCH_ARMv6 && !cpu_is_xscale()) | ||
390 | for (i = 0; i < ARRAY_SIZE(mem_types); i++) | ||
380 | if (mem_types[i].prot_l1) | 391 | if (mem_types[i].prot_l1) |
381 | mem_types[i].prot_l1 |= PMD_BIT4; | 392 | mem_types[i].prot_l1 |= PMD_BIT4; |
382 | if (mem_types[i].prot_sect) | ||
383 | mem_types[i].prot_sect |= PMD_BIT4; | ||
384 | } | ||
385 | } | ||
386 | 393 | ||
387 | cp = &cache_policies[cachepolicy]; | 394 | cp = &cache_policies[cachepolicy]; |
388 | kern_pgprot = user_pgprot = cp->pte; | 395 | kern_pgprot = user_pgprot = cp->pte; |
@@ -406,8 +413,8 @@ void __init build_mem_type_table(void) | |||
406 | * bit 4 becomes XN which we must clear for the | 413 | * bit 4 becomes XN which we must clear for the |
407 | * kernel memory mapping. | 414 | * kernel memory mapping. |
408 | */ | 415 | */ |
409 | mem_types[MT_MEMORY].prot_sect &= ~PMD_BIT4; | 416 | mem_types[MT_MEMORY].prot_sect &= ~PMD_SECT_XN; |
410 | mem_types[MT_ROM].prot_sect &= ~PMD_BIT4; | 417 | mem_types[MT_ROM].prot_sect &= ~PMD_SECT_XN; |
411 | 418 | ||
412 | /* | 419 | /* |
413 | * Mark cache clean areas and XIP ROM read only | 420 | * Mark cache clean areas and XIP ROM read only |
diff --git a/arch/arm/mm/proc-arm1020.S b/arch/arm/mm/proc-arm1020.S index cc609666df05..700297ae4a55 100644 --- a/arch/arm/mm/proc-arm1020.S +++ b/arch/arm/mm/proc-arm1020.S | |||
@@ -439,11 +439,12 @@ __arm1020_setup: | |||
439 | #ifdef CONFIG_MMU | 439 | #ifdef CONFIG_MMU |
440 | mcr p15, 0, r0, c8, c7 @ invalidate I,D TLBs on v4 | 440 | mcr p15, 0, r0, c8, c7 @ invalidate I,D TLBs on v4 |
441 | #endif | 441 | #endif |
442 | |||
443 | adr r5, arm1020_crval | ||
444 | ldmia r5, {r5, r6} | ||
442 | mrc p15, 0, r0, c1, c0 @ get control register v4 | 445 | mrc p15, 0, r0, c1, c0 @ get control register v4 |
443 | ldr r5, arm1020_cr1_clear | ||
444 | bic r0, r0, r5 | 446 | bic r0, r0, r5 |
445 | ldr r5, arm1020_cr1_set | 447 | orr r0, r0, r6 |
446 | orr r0, r0, r5 | ||
447 | #ifdef CONFIG_CPU_CACHE_ROUND_ROBIN | 448 | #ifdef CONFIG_CPU_CACHE_ROUND_ROBIN |
448 | orr r0, r0, #0x4000 @ .R.. .... .... .... | 449 | orr r0, r0, #0x4000 @ .R.. .... .... .... |
449 | #endif | 450 | #endif |
@@ -455,12 +456,9 @@ __arm1020_setup: | |||
455 | * .RVI ZFRS BLDP WCAM | 456 | * .RVI ZFRS BLDP WCAM |
456 | * .011 1001 ..11 0101 | 457 | * .011 1001 ..11 0101 |
457 | */ | 458 | */ |
458 | .type arm1020_cr1_clear, #object | 459 | .type arm1020_crval, #object |
459 | .type arm1020_cr1_set, #object | 460 | arm1020_crval: |
460 | arm1020_cr1_clear: | 461 | crval clear=0x0000593f, mmuset=0x00003935, ucset=0x00001930 |
461 | .word 0x593f | ||
462 | arm1020_cr1_set: | ||
463 | .word 0x3935 | ||
464 | 462 | ||
465 | __INITDATA | 463 | __INITDATA |
466 | 464 | ||
@@ -526,6 +524,9 @@ __arm1020_proc_info: | |||
526 | .long PMD_TYPE_SECT | \ | 524 | .long PMD_TYPE_SECT | \ |
527 | PMD_SECT_AP_WRITE | \ | 525 | PMD_SECT_AP_WRITE | \ |
528 | PMD_SECT_AP_READ | 526 | PMD_SECT_AP_READ |
527 | .long PMD_TYPE_SECT | \ | ||
528 | PMD_SECT_AP_WRITE | \ | ||
529 | PMD_SECT_AP_READ | ||
529 | b __arm1020_setup | 530 | b __arm1020_setup |
530 | .long cpu_arch_name | 531 | .long cpu_arch_name |
531 | .long cpu_elf_name | 532 | .long cpu_elf_name |
diff --git a/arch/arm/mm/proc-arm1020e.S b/arch/arm/mm/proc-arm1020e.S index 117a946c28c8..0c33a5ed5a61 100644 --- a/arch/arm/mm/proc-arm1020e.S +++ b/arch/arm/mm/proc-arm1020e.S | |||
@@ -421,11 +421,11 @@ __arm1020e_setup: | |||
421 | #ifdef CONFIG_MMU | 421 | #ifdef CONFIG_MMU |
422 | mcr p15, 0, r0, c8, c7 @ invalidate I,D TLBs on v4 | 422 | mcr p15, 0, r0, c8, c7 @ invalidate I,D TLBs on v4 |
423 | #endif | 423 | #endif |
424 | adr r5, arm1020e_crval | ||
425 | ldmia r5, {r5, r6} | ||
424 | mrc p15, 0, r0, c1, c0 @ get control register v4 | 426 | mrc p15, 0, r0, c1, c0 @ get control register v4 |
425 | ldr r5, arm1020e_cr1_clear | ||
426 | bic r0, r0, r5 | 427 | bic r0, r0, r5 |
427 | ldr r5, arm1020e_cr1_set | 428 | orr r0, r0, r6 |
428 | orr r0, r0, r5 | ||
429 | #ifdef CONFIG_CPU_CACHE_ROUND_ROBIN | 429 | #ifdef CONFIG_CPU_CACHE_ROUND_ROBIN |
430 | orr r0, r0, #0x4000 @ .R.. .... .... .... | 430 | orr r0, r0, #0x4000 @ .R.. .... .... .... |
431 | #endif | 431 | #endif |
@@ -437,12 +437,9 @@ __arm1020e_setup: | |||
437 | * .RVI ZFRS BLDP WCAM | 437 | * .RVI ZFRS BLDP WCAM |
438 | * .011 1001 ..11 0101 | 438 | * .011 1001 ..11 0101 |
439 | */ | 439 | */ |
440 | .type arm1020e_cr1_clear, #object | 440 | .type arm1020e_crval, #object |
441 | .type arm1020e_cr1_set, #object | 441 | arm1020e_crval: |
442 | arm1020e_cr1_clear: | 442 | crval clear=0x00007f3f, mmuset=0x00003935, ucset=0x00001930 |
443 | .word 0x5f3f | ||
444 | arm1020e_cr1_set: | ||
445 | .word 0x3935 | ||
446 | 443 | ||
447 | __INITDATA | 444 | __INITDATA |
448 | 445 | ||
@@ -476,25 +473,7 @@ cpu_elf_name: | |||
476 | 473 | ||
477 | .type cpu_arm1020e_name, #object | 474 | .type cpu_arm1020e_name, #object |
478 | cpu_arm1020e_name: | 475 | cpu_arm1020e_name: |
479 | .ascii "ARM1020E" | 476 | .asciz "ARM1020E" |
480 | #ifndef CONFIG_CPU_ICACHE_DISABLE | ||
481 | .ascii "i" | ||
482 | #endif | ||
483 | #ifndef CONFIG_CPU_DCACHE_DISABLE | ||
484 | .ascii "d" | ||
485 | #ifdef CONFIG_CPU_DCACHE_WRITETHROUGH | ||
486 | .ascii "(wt)" | ||
487 | #else | ||
488 | .ascii "(wb)" | ||
489 | #endif | ||
490 | #endif | ||
491 | #ifndef CONFIG_CPU_BPREDICT_DISABLE | ||
492 | .ascii "B" | ||
493 | #endif | ||
494 | #ifdef CONFIG_CPU_CACHE_ROUND_ROBIN | ||
495 | .ascii "RR" | ||
496 | #endif | ||
497 | .ascii "\0" | ||
498 | .size cpu_arm1020e_name, . - cpu_arm1020e_name | 477 | .size cpu_arm1020e_name, . - cpu_arm1020e_name |
499 | 478 | ||
500 | .align | 479 | .align |
@@ -509,6 +488,10 @@ __arm1020e_proc_info: | |||
509 | PMD_BIT4 | \ | 488 | PMD_BIT4 | \ |
510 | PMD_SECT_AP_WRITE | \ | 489 | PMD_SECT_AP_WRITE | \ |
511 | PMD_SECT_AP_READ | 490 | PMD_SECT_AP_READ |
491 | .long PMD_TYPE_SECT | \ | ||
492 | PMD_BIT4 | \ | ||
493 | PMD_SECT_AP_WRITE | \ | ||
494 | PMD_SECT_AP_READ | ||
512 | b __arm1020e_setup | 495 | b __arm1020e_setup |
513 | .long cpu_arch_name | 496 | .long cpu_arch_name |
514 | .long cpu_elf_name | 497 | .long cpu_elf_name |
diff --git a/arch/arm/mm/proc-arm1022.S b/arch/arm/mm/proc-arm1022.S index 39b7c102180a..566a55653072 100644 --- a/arch/arm/mm/proc-arm1022.S +++ b/arch/arm/mm/proc-arm1022.S | |||
@@ -403,11 +403,11 @@ __arm1022_setup: | |||
403 | #ifdef CONFIG_MMU | 403 | #ifdef CONFIG_MMU |
404 | mcr p15, 0, r0, c8, c7 @ invalidate I,D TLBs on v4 | 404 | mcr p15, 0, r0, c8, c7 @ invalidate I,D TLBs on v4 |
405 | #endif | 405 | #endif |
406 | adr r5, arm1022_crval | ||
407 | ldmia r5, {r5, r6} | ||
406 | mrc p15, 0, r0, c1, c0 @ get control register v4 | 408 | mrc p15, 0, r0, c1, c0 @ get control register v4 |
407 | ldr r5, arm1022_cr1_clear | ||
408 | bic r0, r0, r5 | 409 | bic r0, r0, r5 |
409 | ldr r5, arm1022_cr1_set | 410 | orr r0, r0, r6 |
410 | orr r0, r0, r5 | ||
411 | #ifdef CONFIG_CPU_CACHE_ROUND_ROBIN | 411 | #ifdef CONFIG_CPU_CACHE_ROUND_ROBIN |
412 | orr r0, r0, #0x4000 @ .R.............. | 412 | orr r0, r0, #0x4000 @ .R.............. |
413 | #endif | 413 | #endif |
@@ -420,12 +420,9 @@ __arm1022_setup: | |||
420 | * .011 1001 ..11 0101 | 420 | * .011 1001 ..11 0101 |
421 | * | 421 | * |
422 | */ | 422 | */ |
423 | .type arm1022_cr1_clear, #object | 423 | .type arm1022_crval, #object |
424 | .type arm1022_cr1_set, #object | 424 | arm1022_crval: |
425 | arm1022_cr1_clear: | 425 | crval clear=0x00007f3f, mmuset=0x00003935, ucset=0x00001930 |
426 | .word 0x7f3f | ||
427 | arm1022_cr1_set: | ||
428 | .word 0x3935 | ||
429 | 426 | ||
430 | __INITDATA | 427 | __INITDATA |
431 | 428 | ||
@@ -459,25 +456,7 @@ cpu_elf_name: | |||
459 | 456 | ||
460 | .type cpu_arm1022_name, #object | 457 | .type cpu_arm1022_name, #object |
461 | cpu_arm1022_name: | 458 | cpu_arm1022_name: |
462 | .ascii "arm1022" | 459 | .asciz "ARM1022" |
463 | #ifndef CONFIG_CPU_ICACHE_DISABLE | ||
464 | .ascii "i" | ||
465 | #endif | ||
466 | #ifndef CONFIG_CPU_DCACHE_DISABLE | ||
467 | .ascii "d" | ||
468 | #ifdef CONFIG_CPU_DCACHE_WRITETHROUGH | ||
469 | .ascii "(wt)" | ||
470 | #else | ||
471 | .ascii "(wb)" | ||
472 | #endif | ||
473 | #endif | ||
474 | #ifndef CONFIG_CPU_BPREDICT_DISABLE | ||
475 | .ascii "B" | ||
476 | #endif | ||
477 | #ifdef CONFIG_CPU_CACHE_ROUND_ROBIN | ||
478 | .ascii "RR" | ||
479 | #endif | ||
480 | .ascii "\0" | ||
481 | .size cpu_arm1022_name, . - cpu_arm1022_name | 460 | .size cpu_arm1022_name, . - cpu_arm1022_name |
482 | 461 | ||
483 | .align | 462 | .align |
@@ -492,6 +471,10 @@ __arm1022_proc_info: | |||
492 | PMD_BIT4 | \ | 471 | PMD_BIT4 | \ |
493 | PMD_SECT_AP_WRITE | \ | 472 | PMD_SECT_AP_WRITE | \ |
494 | PMD_SECT_AP_READ | 473 | PMD_SECT_AP_READ |
474 | .long PMD_TYPE_SECT | \ | ||
475 | PMD_BIT4 | \ | ||
476 | PMD_SECT_AP_WRITE | \ | ||
477 | PMD_SECT_AP_READ | ||
495 | b __arm1022_setup | 478 | b __arm1022_setup |
496 | .long cpu_arch_name | 479 | .long cpu_arch_name |
497 | .long cpu_elf_name | 480 | .long cpu_elf_name |
diff --git a/arch/arm/mm/proc-arm1026.S b/arch/arm/mm/proc-arm1026.S index 33e1ab8eb1d6..6ea76321d0df 100644 --- a/arch/arm/mm/proc-arm1026.S +++ b/arch/arm/mm/proc-arm1026.S | |||
@@ -398,11 +398,11 @@ __arm1026_setup: | |||
398 | mov r0, #4 @ explicitly disable writeback | 398 | mov r0, #4 @ explicitly disable writeback |
399 | mcr p15, 7, r0, c15, c0, 0 | 399 | mcr p15, 7, r0, c15, c0, 0 |
400 | #endif | 400 | #endif |
401 | adr r5, arm1026_crval | ||
402 | ldmia r5, {r5, r6} | ||
401 | mrc p15, 0, r0, c1, c0 @ get control register v4 | 403 | mrc p15, 0, r0, c1, c0 @ get control register v4 |
402 | ldr r5, arm1026_cr1_clear | ||
403 | bic r0, r0, r5 | 404 | bic r0, r0, r5 |
404 | ldr r5, arm1026_cr1_set | 405 | orr r0, r0, r6 |
405 | orr r0, r0, r5 | ||
406 | #ifdef CONFIG_CPU_CACHE_ROUND_ROBIN | 406 | #ifdef CONFIG_CPU_CACHE_ROUND_ROBIN |
407 | orr r0, r0, #0x4000 @ .R.. .... .... .... | 407 | orr r0, r0, #0x4000 @ .R.. .... .... .... |
408 | #endif | 408 | #endif |
@@ -415,12 +415,9 @@ __arm1026_setup: | |||
415 | * .011 1001 ..11 0101 | 415 | * .011 1001 ..11 0101 |
416 | * | 416 | * |
417 | */ | 417 | */ |
418 | .type arm1026_cr1_clear, #object | 418 | .type arm1026_crval, #object |
419 | .type arm1026_cr1_set, #object | 419 | arm1026_crval: |
420 | arm1026_cr1_clear: | 420 | crval clear=0x00007f3f, mmuset=0x00003935, ucset=0x00001934 |
421 | .word 0x7f3f | ||
422 | arm1026_cr1_set: | ||
423 | .word 0x3935 | ||
424 | 421 | ||
425 | __INITDATA | 422 | __INITDATA |
426 | 423 | ||
@@ -455,25 +452,7 @@ cpu_elf_name: | |||
455 | 452 | ||
456 | .type cpu_arm1026_name, #object | 453 | .type cpu_arm1026_name, #object |
457 | cpu_arm1026_name: | 454 | cpu_arm1026_name: |
458 | .ascii "ARM1026EJ-S" | 455 | .asciz "ARM1026EJ-S" |
459 | #ifndef CONFIG_CPU_ICACHE_DISABLE | ||
460 | .ascii "i" | ||
461 | #endif | ||
462 | #ifndef CONFIG_CPU_DCACHE_DISABLE | ||
463 | .ascii "d" | ||
464 | #ifdef CONFIG_CPU_DCACHE_WRITETHROUGH | ||
465 | .ascii "(wt)" | ||
466 | #else | ||
467 | .ascii "(wb)" | ||
468 | #endif | ||
469 | #endif | ||
470 | #ifndef CONFIG_CPU_BPREDICT_DISABLE | ||
471 | .ascii "B" | ||
472 | #endif | ||
473 | #ifdef CONFIG_CPU_CACHE_ROUND_ROBIN | ||
474 | .ascii "RR" | ||
475 | #endif | ||
476 | .ascii "\0" | ||
477 | .size cpu_arm1026_name, . - cpu_arm1026_name | 456 | .size cpu_arm1026_name, . - cpu_arm1026_name |
478 | 457 | ||
479 | .align | 458 | .align |
@@ -488,6 +467,10 @@ __arm1026_proc_info: | |||
488 | PMD_BIT4 | \ | 467 | PMD_BIT4 | \ |
489 | PMD_SECT_AP_WRITE | \ | 468 | PMD_SECT_AP_WRITE | \ |
490 | PMD_SECT_AP_READ | 469 | PMD_SECT_AP_READ |
470 | .long PMD_TYPE_SECT | \ | ||
471 | PMD_BIT4 | \ | ||
472 | PMD_SECT_AP_WRITE | \ | ||
473 | PMD_SECT_AP_READ | ||
491 | b __arm1026_setup | 474 | b __arm1026_setup |
492 | .long cpu_arch_name | 475 | .long cpu_arch_name |
493 | .long cpu_elf_name | 476 | .long cpu_elf_name |
diff --git a/arch/arm/mm/proc-arm6_7.S b/arch/arm/mm/proc-arm6_7.S index 7a705edfa4b2..0432e4806888 100644 --- a/arch/arm/mm/proc-arm6_7.S +++ b/arch/arm/mm/proc-arm6_7.S | |||
@@ -355,6 +355,10 @@ __arm6_proc_info: | |||
355 | .long 0x41560600 | 355 | .long 0x41560600 |
356 | .long 0xfffffff0 | 356 | .long 0xfffffff0 |
357 | .long 0x00000c1e | 357 | .long 0x00000c1e |
358 | .long PMD_TYPE_SECT | \ | ||
359 | PMD_BIT4 | \ | ||
360 | PMD_SECT_AP_WRITE | \ | ||
361 | PMD_SECT_AP_READ | ||
358 | b __arm6_setup | 362 | b __arm6_setup |
359 | .long cpu_arch_name | 363 | .long cpu_arch_name |
360 | .long cpu_elf_name | 364 | .long cpu_elf_name |
@@ -371,6 +375,10 @@ __arm610_proc_info: | |||
371 | .long 0x41560610 | 375 | .long 0x41560610 |
372 | .long 0xfffffff0 | 376 | .long 0xfffffff0 |
373 | .long 0x00000c1e | 377 | .long 0x00000c1e |
378 | .long PMD_TYPE_SECT | \ | ||
379 | PMD_BIT4 | \ | ||
380 | PMD_SECT_AP_WRITE | \ | ||
381 | PMD_SECT_AP_READ | ||
374 | b __arm6_setup | 382 | b __arm6_setup |
375 | .long cpu_arch_name | 383 | .long cpu_arch_name |
376 | .long cpu_elf_name | 384 | .long cpu_elf_name |
@@ -387,6 +395,10 @@ __arm7_proc_info: | |||
387 | .long 0x41007000 | 395 | .long 0x41007000 |
388 | .long 0xffffff00 | 396 | .long 0xffffff00 |
389 | .long 0x00000c1e | 397 | .long 0x00000c1e |
398 | .long PMD_TYPE_SECT | \ | ||
399 | PMD_BIT4 | \ | ||
400 | PMD_SECT_AP_WRITE | \ | ||
401 | PMD_SECT_AP_READ | ||
390 | b __arm7_setup | 402 | b __arm7_setup |
391 | .long cpu_arch_name | 403 | .long cpu_arch_name |
392 | .long cpu_elf_name | 404 | .long cpu_elf_name |
@@ -408,6 +420,10 @@ __arm710_proc_info: | |||
408 | PMD_BIT4 | \ | 420 | PMD_BIT4 | \ |
409 | PMD_SECT_AP_WRITE | \ | 421 | PMD_SECT_AP_WRITE | \ |
410 | PMD_SECT_AP_READ | 422 | PMD_SECT_AP_READ |
423 | .long PMD_TYPE_SECT | \ | ||
424 | PMD_BIT4 | \ | ||
425 | PMD_SECT_AP_WRITE | \ | ||
426 | PMD_SECT_AP_READ | ||
411 | b __arm7_setup | 427 | b __arm7_setup |
412 | .long cpu_arch_name | 428 | .long cpu_arch_name |
413 | .long cpu_elf_name | 429 | .long cpu_elf_name |
diff --git a/arch/arm/mm/proc-arm720.S b/arch/arm/mm/proc-arm720.S index 86102467d37f..0e6946ab6e5b 100644 --- a/arch/arm/mm/proc-arm720.S +++ b/arch/arm/mm/proc-arm720.S | |||
@@ -169,11 +169,11 @@ __arm720_setup: | |||
169 | #ifdef CONFIG_MMU | 169 | #ifdef CONFIG_MMU |
170 | mcr p15, 0, r0, c8, c7, 0 @ flush TLB (v4) | 170 | mcr p15, 0, r0, c8, c7, 0 @ flush TLB (v4) |
171 | #endif | 171 | #endif |
172 | adr r5, arm720_crval | ||
173 | ldmia r5, {r5, r6} | ||
172 | mrc p15, 0, r0, c1, c0 @ get control register | 174 | mrc p15, 0, r0, c1, c0 @ get control register |
173 | ldr r5, arm720_cr1_clear | ||
174 | bic r0, r0, r5 | 175 | bic r0, r0, r5 |
175 | ldr r5, arm720_cr1_set | 176 | orr r0, r0, r6 |
176 | orr r0, r0, r5 | ||
177 | mov pc, lr @ __ret (head.S) | 177 | mov pc, lr @ __ret (head.S) |
178 | .size __arm720_setup, . - __arm720_setup | 178 | .size __arm720_setup, . - __arm720_setup |
179 | 179 | ||
@@ -183,12 +183,9 @@ __arm720_setup: | |||
183 | * ..1. 1001 ..11 1101 | 183 | * ..1. 1001 ..11 1101 |
184 | * | 184 | * |
185 | */ | 185 | */ |
186 | .type arm720_cr1_clear, #object | 186 | .type arm720_crval, #object |
187 | .type arm720_cr1_set, #object | 187 | arm720_crval: |
188 | arm720_cr1_clear: | 188 | crval clear=0x00002f3f, mmuset=0x0000213d, ucset=0x00000130 |
189 | .word 0x2f3f | ||
190 | arm720_cr1_set: | ||
191 | .word 0x213d | ||
192 | 189 | ||
193 | __INITDATA | 190 | __INITDATA |
194 | 191 | ||
@@ -246,6 +243,10 @@ __arm710_proc_info: | |||
246 | PMD_BIT4 | \ | 243 | PMD_BIT4 | \ |
247 | PMD_SECT_AP_WRITE | \ | 244 | PMD_SECT_AP_WRITE | \ |
248 | PMD_SECT_AP_READ | 245 | PMD_SECT_AP_READ |
246 | .long PMD_TYPE_SECT | \ | ||
247 | PMD_BIT4 | \ | ||
248 | PMD_SECT_AP_WRITE | \ | ||
249 | PMD_SECT_AP_READ | ||
249 | b __arm710_setup @ cpu_flush | 250 | b __arm710_setup @ cpu_flush |
250 | .long cpu_arch_name @ arch_name | 251 | .long cpu_arch_name @ arch_name |
251 | .long cpu_elf_name @ elf_name | 252 | .long cpu_elf_name @ elf_name |
@@ -267,6 +268,10 @@ __arm720_proc_info: | |||
267 | PMD_BIT4 | \ | 268 | PMD_BIT4 | \ |
268 | PMD_SECT_AP_WRITE | \ | 269 | PMD_SECT_AP_WRITE | \ |
269 | PMD_SECT_AP_READ | 270 | PMD_SECT_AP_READ |
271 | .long PMD_TYPE_SECT | \ | ||
272 | PMD_BIT4 | \ | ||
273 | PMD_SECT_AP_WRITE | \ | ||
274 | PMD_SECT_AP_READ | ||
270 | b __arm720_setup @ cpu_flush | 275 | b __arm720_setup @ cpu_flush |
271 | .long cpu_arch_name @ arch_name | 276 | .long cpu_arch_name @ arch_name |
272 | .long cpu_elf_name @ elf_name | 277 | .long cpu_elf_name @ elf_name |
diff --git a/arch/arm/mm/proc-arm920.S b/arch/arm/mm/proc-arm920.S index 6f0db29ab842..4adb46b3a4e0 100644 --- a/arch/arm/mm/proc-arm920.S +++ b/arch/arm/mm/proc-arm920.S | |||
@@ -390,11 +390,11 @@ __arm920_setup: | |||
390 | #ifdef CONFIG_MMU | 390 | #ifdef CONFIG_MMU |
391 | mcr p15, 0, r0, c8, c7 @ invalidate I,D TLBs on v4 | 391 | mcr p15, 0, r0, c8, c7 @ invalidate I,D TLBs on v4 |
392 | #endif | 392 | #endif |
393 | adr r5, arm920_crval | ||
394 | ldmia r5, {r5, r6} | ||
393 | mrc p15, 0, r0, c1, c0 @ get control register v4 | 395 | mrc p15, 0, r0, c1, c0 @ get control register v4 |
394 | ldr r5, arm920_cr1_clear | ||
395 | bic r0, r0, r5 | 396 | bic r0, r0, r5 |
396 | ldr r5, arm920_cr1_set | 397 | orr r0, r0, r6 |
397 | orr r0, r0, r5 | ||
398 | mov pc, lr | 398 | mov pc, lr |
399 | .size __arm920_setup, . - __arm920_setup | 399 | .size __arm920_setup, . - __arm920_setup |
400 | 400 | ||
@@ -404,12 +404,9 @@ __arm920_setup: | |||
404 | * ..11 0001 ..11 0101 | 404 | * ..11 0001 ..11 0101 |
405 | * | 405 | * |
406 | */ | 406 | */ |
407 | .type arm920_cr1_clear, #object | 407 | .type arm920_crval, #object |
408 | .type arm920_cr1_set, #object | 408 | arm920_crval: |
409 | arm920_cr1_clear: | 409 | crval clear=0x00003f3f, mmuset=0x00003135, ucset=0x00001130 |
410 | .word 0x3f3f | ||
411 | arm920_cr1_set: | ||
412 | .word 0x3135 | ||
413 | 410 | ||
414 | __INITDATA | 411 | __INITDATA |
415 | 412 | ||
@@ -443,19 +440,7 @@ cpu_elf_name: | |||
443 | 440 | ||
444 | .type cpu_arm920_name, #object | 441 | .type cpu_arm920_name, #object |
445 | cpu_arm920_name: | 442 | cpu_arm920_name: |
446 | .ascii "ARM920T" | 443 | .asciz "ARM920T" |
447 | #ifndef CONFIG_CPU_ICACHE_DISABLE | ||
448 | .ascii "i" | ||
449 | #endif | ||
450 | #ifndef CONFIG_CPU_DCACHE_DISABLE | ||
451 | .ascii "d" | ||
452 | #ifdef CONFIG_CPU_DCACHE_WRITETHROUGH | ||
453 | .ascii "(wt)" | ||
454 | #else | ||
455 | .ascii "(wb)" | ||
456 | #endif | ||
457 | #endif | ||
458 | .ascii "\0" | ||
459 | .size cpu_arm920_name, . - cpu_arm920_name | 444 | .size cpu_arm920_name, . - cpu_arm920_name |
460 | 445 | ||
461 | .align | 446 | .align |
@@ -472,6 +457,10 @@ __arm920_proc_info: | |||
472 | PMD_BIT4 | \ | 457 | PMD_BIT4 | \ |
473 | PMD_SECT_AP_WRITE | \ | 458 | PMD_SECT_AP_WRITE | \ |
474 | PMD_SECT_AP_READ | 459 | PMD_SECT_AP_READ |
460 | .long PMD_TYPE_SECT | \ | ||
461 | PMD_BIT4 | \ | ||
462 | PMD_SECT_AP_WRITE | \ | ||
463 | PMD_SECT_AP_READ | ||
475 | b __arm920_setup | 464 | b __arm920_setup |
476 | .long cpu_arch_name | 465 | .long cpu_arch_name |
477 | .long cpu_elf_name | 466 | .long cpu_elf_name |
diff --git a/arch/arm/mm/proc-arm922.S b/arch/arm/mm/proc-arm922.S index 1ad464cc7bcb..571f082f0247 100644 --- a/arch/arm/mm/proc-arm922.S +++ b/arch/arm/mm/proc-arm922.S | |||
@@ -394,11 +394,11 @@ __arm922_setup: | |||
394 | #ifdef CONFIG_MMU | 394 | #ifdef CONFIG_MMU |
395 | mcr p15, 0, r0, c8, c7 @ invalidate I,D TLBs on v4 | 395 | mcr p15, 0, r0, c8, c7 @ invalidate I,D TLBs on v4 |
396 | #endif | 396 | #endif |
397 | adr r5, arm922_crval | ||
398 | ldmia r5, {r5, r6} | ||
397 | mrc p15, 0, r0, c1, c0 @ get control register v4 | 399 | mrc p15, 0, r0, c1, c0 @ get control register v4 |
398 | ldr r5, arm922_cr1_clear | ||
399 | bic r0, r0, r5 | 400 | bic r0, r0, r5 |
400 | ldr r5, arm922_cr1_set | 401 | orr r0, r0, r6 |
401 | orr r0, r0, r5 | ||
402 | mov pc, lr | 402 | mov pc, lr |
403 | .size __arm922_setup, . - __arm922_setup | 403 | .size __arm922_setup, . - __arm922_setup |
404 | 404 | ||
@@ -408,12 +408,9 @@ __arm922_setup: | |||
408 | * ..11 0001 ..11 0101 | 408 | * ..11 0001 ..11 0101 |
409 | * | 409 | * |
410 | */ | 410 | */ |
411 | .type arm922_cr1_clear, #object | 411 | .type arm922_crval, #object |
412 | .type arm922_cr1_set, #object | 412 | arm922_crval: |
413 | arm922_cr1_clear: | 413 | crval clear=0x00003f3f, mmuset=0x00003135, ucset=0x00001130 |
414 | .word 0x3f3f | ||
415 | arm922_cr1_set: | ||
416 | .word 0x3135 | ||
417 | 414 | ||
418 | __INITDATA | 415 | __INITDATA |
419 | 416 | ||
@@ -447,19 +444,7 @@ cpu_elf_name: | |||
447 | 444 | ||
448 | .type cpu_arm922_name, #object | 445 | .type cpu_arm922_name, #object |
449 | cpu_arm922_name: | 446 | cpu_arm922_name: |
450 | .ascii "ARM922T" | 447 | .asciz "ARM922T" |
451 | #ifndef CONFIG_CPU_ICACHE_DISABLE | ||
452 | .ascii "i" | ||
453 | #endif | ||
454 | #ifndef CONFIG_CPU_DCACHE_DISABLE | ||
455 | .ascii "d" | ||
456 | #ifdef CONFIG_CPU_DCACHE_WRITETHROUGH | ||
457 | .ascii "(wt)" | ||
458 | #else | ||
459 | .ascii "(wb)" | ||
460 | #endif | ||
461 | #endif | ||
462 | .ascii "\0" | ||
463 | .size cpu_arm922_name, . - cpu_arm922_name | 448 | .size cpu_arm922_name, . - cpu_arm922_name |
464 | 449 | ||
465 | .align | 450 | .align |
@@ -476,6 +461,10 @@ __arm922_proc_info: | |||
476 | PMD_BIT4 | \ | 461 | PMD_BIT4 | \ |
477 | PMD_SECT_AP_WRITE | \ | 462 | PMD_SECT_AP_WRITE | \ |
478 | PMD_SECT_AP_READ | 463 | PMD_SECT_AP_READ |
464 | .long PMD_TYPE_SECT | \ | ||
465 | PMD_BIT4 | \ | ||
466 | PMD_SECT_AP_WRITE | \ | ||
467 | PMD_SECT_AP_READ | ||
479 | b __arm922_setup | 468 | b __arm922_setup |
480 | .long cpu_arch_name | 469 | .long cpu_arch_name |
481 | .long cpu_elf_name | 470 | .long cpu_elf_name |
diff --git a/arch/arm/mm/proc-arm925.S b/arch/arm/mm/proc-arm925.S index a55d56ce2264..ad15f8503d51 100644 --- a/arch/arm/mm/proc-arm925.S +++ b/arch/arm/mm/proc-arm925.S | |||
@@ -454,11 +454,10 @@ __arm925_setup: | |||
454 | mcr p15, 7, r0, c15, c0, 0 | 454 | mcr p15, 7, r0, c15, c0, 0 |
455 | #endif | 455 | #endif |
456 | 456 | ||
457 | adr r5, {r5, r6} | ||
457 | mrc p15, 0, r0, c1, c0 @ get control register v4 | 458 | mrc p15, 0, r0, c1, c0 @ get control register v4 |
458 | ldr r5, arm925_cr1_clear | ||
459 | bic r0, r0, r5 | 459 | bic r0, r0, r5 |
460 | ldr r5, arm925_cr1_set | 460 | orr r0, r0, r6 |
461 | orr r0, r0, r5 | ||
462 | #ifdef CONFIG_CPU_CACHE_ROUND_ROBIN | 461 | #ifdef CONFIG_CPU_CACHE_ROUND_ROBIN |
463 | orr r0, r0, #0x4000 @ .1.. .... .... .... | 462 | orr r0, r0, #0x4000 @ .1.. .... .... .... |
464 | #endif | 463 | #endif |
@@ -471,12 +470,9 @@ __arm925_setup: | |||
471 | * .011 0001 ..11 1101 | 470 | * .011 0001 ..11 1101 |
472 | * | 471 | * |
473 | */ | 472 | */ |
474 | .type arm925_cr1_clear, #object | 473 | .type arm925_crval, #object |
475 | .type arm925_cr1_set, #object | 474 | arm925_crval: |
476 | arm925_cr1_clear: | 475 | crval clear=0x00007f3f, mmuset=0x0000313d, ucset=0x00001130 |
477 | .word 0x7f3f | ||
478 | arm925_cr1_set: | ||
479 | .word 0x313d | ||
480 | 476 | ||
481 | __INITDATA | 477 | __INITDATA |
482 | 478 | ||
@@ -510,22 +506,7 @@ cpu_elf_name: | |||
510 | 506 | ||
511 | .type cpu_arm925_name, #object | 507 | .type cpu_arm925_name, #object |
512 | cpu_arm925_name: | 508 | cpu_arm925_name: |
513 | .ascii "ARM925T" | 509 | .asciz "ARM925T" |
514 | #ifndef CONFIG_CPU_ICACHE_DISABLE | ||
515 | .ascii "i" | ||
516 | #endif | ||
517 | #ifndef CONFIG_CPU_DCACHE_DISABLE | ||
518 | .ascii "d" | ||
519 | #ifdef CONFIG_CPU_DCACHE_WRITETHROUGH | ||
520 | .ascii "(wt)" | ||
521 | #else | ||
522 | .ascii "(wb)" | ||
523 | #endif | ||
524 | #ifdef CONFIG_CPU_CACHE_ROUND_ROBIN | ||
525 | .ascii "RR" | ||
526 | #endif | ||
527 | #endif | ||
528 | .ascii "\0" | ||
529 | .size cpu_arm925_name, . - cpu_arm925_name | 510 | .size cpu_arm925_name, . - cpu_arm925_name |
530 | 511 | ||
531 | .align | 512 | .align |
@@ -540,6 +521,10 @@ __arm925_proc_info: | |||
540 | PMD_BIT4 | \ | 521 | PMD_BIT4 | \ |
541 | PMD_SECT_AP_WRITE | \ | 522 | PMD_SECT_AP_WRITE | \ |
542 | PMD_SECT_AP_READ | 523 | PMD_SECT_AP_READ |
524 | .long PMD_TYPE_SECT | \ | ||
525 | PMD_BIT4 | \ | ||
526 | PMD_SECT_AP_WRITE | \ | ||
527 | PMD_SECT_AP_READ | ||
543 | b __arm925_setup | 528 | b __arm925_setup |
544 | .long cpu_arch_name | 529 | .long cpu_arch_name |
545 | .long cpu_elf_name | 530 | .long cpu_elf_name |
@@ -559,6 +544,10 @@ __arm915_proc_info: | |||
559 | PMD_BIT4 | \ | 544 | PMD_BIT4 | \ |
560 | PMD_SECT_AP_WRITE | \ | 545 | PMD_SECT_AP_WRITE | \ |
561 | PMD_SECT_AP_READ | 546 | PMD_SECT_AP_READ |
547 | .long PMD_TYPE_SECT | \ | ||
548 | PMD_BIT4 | \ | ||
549 | PMD_SECT_AP_WRITE | \ | ||
550 | PMD_SECT_AP_READ | ||
562 | b __arm925_setup | 551 | b __arm925_setup |
563 | .long cpu_arch_name | 552 | .long cpu_arch_name |
564 | .long cpu_elf_name | 553 | .long cpu_elf_name |
diff --git a/arch/arm/mm/proc-arm926.S b/arch/arm/mm/proc-arm926.S index 20275967663d..1e89d4080474 100644 --- a/arch/arm/mm/proc-arm926.S +++ b/arch/arm/mm/proc-arm926.S | |||
@@ -403,11 +403,11 @@ __arm926_setup: | |||
403 | mcr p15, 7, r0, c15, c0, 0 | 403 | mcr p15, 7, r0, c15, c0, 0 |
404 | #endif | 404 | #endif |
405 | 405 | ||
406 | adr r5, arm926_crval | ||
407 | ldmia r5, {r5, r6} | ||
406 | mrc p15, 0, r0, c1, c0 @ get control register v4 | 408 | mrc p15, 0, r0, c1, c0 @ get control register v4 |
407 | ldr r5, arm926_cr1_clear | ||
408 | bic r0, r0, r5 | 409 | bic r0, r0, r5 |
409 | ldr r5, arm926_cr1_set | 410 | orr r0, r0, r6 |
410 | orr r0, r0, r5 | ||
411 | #ifdef CONFIG_CPU_CACHE_ROUND_ROBIN | 411 | #ifdef CONFIG_CPU_CACHE_ROUND_ROBIN |
412 | orr r0, r0, #0x4000 @ .1.. .... .... .... | 412 | orr r0, r0, #0x4000 @ .1.. .... .... .... |
413 | #endif | 413 | #endif |
@@ -420,12 +420,9 @@ __arm926_setup: | |||
420 | * .011 0001 ..11 0101 | 420 | * .011 0001 ..11 0101 |
421 | * | 421 | * |
422 | */ | 422 | */ |
423 | .type arm926_cr1_clear, #object | 423 | .type arm926_crval, #object |
424 | .type arm926_cr1_set, #object | 424 | arm926_crval: |
425 | arm926_cr1_clear: | 425 | crval clear=0x00007f3f, mmuset=0x00003135, ucset=0x00001134 |
426 | .word 0x7f3f | ||
427 | arm926_cr1_set: | ||
428 | .word 0x3135 | ||
429 | 426 | ||
430 | __INITDATA | 427 | __INITDATA |
431 | 428 | ||
@@ -459,22 +456,7 @@ cpu_elf_name: | |||
459 | 456 | ||
460 | .type cpu_arm926_name, #object | 457 | .type cpu_arm926_name, #object |
461 | cpu_arm926_name: | 458 | cpu_arm926_name: |
462 | .ascii "ARM926EJ-S" | 459 | .asciz "ARM926EJ-S" |
463 | #ifndef CONFIG_CPU_ICACHE_DISABLE | ||
464 | .ascii "i" | ||
465 | #endif | ||
466 | #ifndef CONFIG_CPU_DCACHE_DISABLE | ||
467 | .ascii "d" | ||
468 | #ifdef CONFIG_CPU_DCACHE_WRITETHROUGH | ||
469 | .ascii "(wt)" | ||
470 | #else | ||
471 | .ascii "(wb)" | ||
472 | #endif | ||
473 | #ifdef CONFIG_CPU_CACHE_ROUND_ROBIN | ||
474 | .ascii "RR" | ||
475 | #endif | ||
476 | #endif | ||
477 | .ascii "\0" | ||
478 | .size cpu_arm926_name, . - cpu_arm926_name | 460 | .size cpu_arm926_name, . - cpu_arm926_name |
479 | 461 | ||
480 | .align | 462 | .align |
@@ -491,6 +473,10 @@ __arm926_proc_info: | |||
491 | PMD_BIT4 | \ | 473 | PMD_BIT4 | \ |
492 | PMD_SECT_AP_WRITE | \ | 474 | PMD_SECT_AP_WRITE | \ |
493 | PMD_SECT_AP_READ | 475 | PMD_SECT_AP_READ |
476 | .long PMD_TYPE_SECT | \ | ||
477 | PMD_BIT4 | \ | ||
478 | PMD_SECT_AP_WRITE | \ | ||
479 | PMD_SECT_AP_READ | ||
494 | b __arm926_setup | 480 | b __arm926_setup |
495 | .long cpu_arch_name | 481 | .long cpu_arch_name |
496 | .long cpu_elf_name | 482 | .long cpu_elf_name |
diff --git a/arch/arm/mm/proc-macros.S b/arch/arm/mm/proc-macros.S index 7cfc2604a1ee..9e2c89eb2115 100644 --- a/arch/arm/mm/proc-macros.S +++ b/arch/arm/mm/proc-macros.S | |||
@@ -49,3 +49,13 @@ | |||
49 | .macro asid, rd, rn | 49 | .macro asid, rd, rn |
50 | and \rd, \rn, #255 | 50 | and \rd, \rn, #255 |
51 | .endm | 51 | .endm |
52 | |||
53 | .macro crval, clear, mmuset, ucset | ||
54 | #ifdef CONFIG_MMU | ||
55 | .word \clear | ||
56 | .word \mmuset | ||
57 | #else | ||
58 | .word \clear | ||
59 | .word \ucset | ||
60 | #endif | ||
61 | .endm | ||
diff --git a/arch/arm/mm/proc-sa110.S b/arch/arm/mm/proc-sa110.S index 5a760a2c629c..e812246277cf 100644 --- a/arch/arm/mm/proc-sa110.S +++ b/arch/arm/mm/proc-sa110.S | |||
@@ -185,11 +185,12 @@ __sa110_setup: | |||
185 | #ifdef CONFIG_MMU | 185 | #ifdef CONFIG_MMU |
186 | mcr p15, 0, r10, c8, c7 @ invalidate I,D TLBs on v4 | 186 | mcr p15, 0, r10, c8, c7 @ invalidate I,D TLBs on v4 |
187 | #endif | 187 | #endif |
188 | |||
189 | adr r5, sa110_crval | ||
190 | ldmia r5, {r5, r6} | ||
188 | mrc p15, 0, r0, c1, c0 @ get control register v4 | 191 | mrc p15, 0, r0, c1, c0 @ get control register v4 |
189 | ldr r5, sa110_cr1_clear | ||
190 | bic r0, r0, r5 | 192 | bic r0, r0, r5 |
191 | ldr r5, sa110_cr1_set | 193 | orr r0, r0, r6 |
192 | orr r0, r0, r5 | ||
193 | mov pc, lr | 194 | mov pc, lr |
194 | .size __sa110_setup, . - __sa110_setup | 195 | .size __sa110_setup, . - __sa110_setup |
195 | 196 | ||
@@ -199,12 +200,9 @@ __sa110_setup: | |||
199 | * ..01 0001 ..11 1101 | 200 | * ..01 0001 ..11 1101 |
200 | * | 201 | * |
201 | */ | 202 | */ |
202 | .type sa110_cr1_clear, #object | 203 | .type sa110_crval, #object |
203 | .type sa110_cr1_set, #object | 204 | sa110_crval: |
204 | sa110_cr1_clear: | 205 | crval clear=0x00003f3f, mmuset=0x0000113d, ucset=0x00001130 |
205 | .word 0x3f3f | ||
206 | sa110_cr1_set: | ||
207 | .word 0x113d | ||
208 | 206 | ||
209 | __INITDATA | 207 | __INITDATA |
210 | 208 | ||
@@ -255,6 +253,9 @@ __sa110_proc_info: | |||
255 | PMD_SECT_CACHEABLE | \ | 253 | PMD_SECT_CACHEABLE | \ |
256 | PMD_SECT_AP_WRITE | \ | 254 | PMD_SECT_AP_WRITE | \ |
257 | PMD_SECT_AP_READ | 255 | PMD_SECT_AP_READ |
256 | .long PMD_TYPE_SECT | \ | ||
257 | PMD_SECT_AP_WRITE | \ | ||
258 | PMD_SECT_AP_READ | ||
258 | b __sa110_setup | 259 | b __sa110_setup |
259 | .long cpu_arch_name | 260 | .long cpu_arch_name |
260 | .long cpu_elf_name | 261 | .long cpu_elf_name |
diff --git a/arch/arm/mm/proc-sa1100.S b/arch/arm/mm/proc-sa1100.S index 0a2107ad4c32..ba32cc6296a0 100644 --- a/arch/arm/mm/proc-sa1100.S +++ b/arch/arm/mm/proc-sa1100.S | |||
@@ -198,11 +198,11 @@ __sa1100_setup: | |||
198 | #ifdef CONFIG_MMU | 198 | #ifdef CONFIG_MMU |
199 | mcr p15, 0, r0, c8, c7 @ invalidate I,D TLBs on v4 | 199 | mcr p15, 0, r0, c8, c7 @ invalidate I,D TLBs on v4 |
200 | #endif | 200 | #endif |
201 | adr r5, sa1100_crval | ||
202 | ldmia r5, {r5, r6} | ||
201 | mrc p15, 0, r0, c1, c0 @ get control register v4 | 203 | mrc p15, 0, r0, c1, c0 @ get control register v4 |
202 | ldr r5, sa1100_cr1_clear | ||
203 | bic r0, r0, r5 | 204 | bic r0, r0, r5 |
204 | ldr r5, sa1100_cr1_set | 205 | orr r0, r0, r6 |
205 | orr r0, r0, r5 | ||
206 | mov pc, lr | 206 | mov pc, lr |
207 | .size __sa1100_setup, . - __sa1100_setup | 207 | .size __sa1100_setup, . - __sa1100_setup |
208 | 208 | ||
@@ -212,12 +212,9 @@ __sa1100_setup: | |||
212 | * ..11 0001 ..11 1101 | 212 | * ..11 0001 ..11 1101 |
213 | * | 213 | * |
214 | */ | 214 | */ |
215 | .type sa1100_cr1_clear, #object | 215 | .type sa1100_crval, #object |
216 | .type sa1100_cr1_set, #object | 216 | sa1100_crval: |
217 | sa1100_cr1_clear: | 217 | crval clear=0x00003f3f, mmuset=0x0000313d, ucset=0x00001130 |
218 | .word 0x3f3f | ||
219 | sa1100_cr1_set: | ||
220 | .word 0x313d | ||
221 | 218 | ||
222 | __INITDATA | 219 | __INITDATA |
223 | 220 | ||
@@ -276,6 +273,9 @@ __sa1100_proc_info: | |||
276 | PMD_SECT_CACHEABLE | \ | 273 | PMD_SECT_CACHEABLE | \ |
277 | PMD_SECT_AP_WRITE | \ | 274 | PMD_SECT_AP_WRITE | \ |
278 | PMD_SECT_AP_READ | 275 | PMD_SECT_AP_READ |
276 | .long PMD_TYPE_SECT | \ | ||
277 | PMD_SECT_AP_WRITE | \ | ||
278 | PMD_SECT_AP_READ | ||
279 | b __sa1100_setup | 279 | b __sa1100_setup |
280 | .long cpu_arch_name | 280 | .long cpu_arch_name |
281 | .long cpu_elf_name | 281 | .long cpu_elf_name |
@@ -296,6 +296,9 @@ __sa1110_proc_info: | |||
296 | PMD_SECT_CACHEABLE | \ | 296 | PMD_SECT_CACHEABLE | \ |
297 | PMD_SECT_AP_WRITE | \ | 297 | PMD_SECT_AP_WRITE | \ |
298 | PMD_SECT_AP_READ | 298 | PMD_SECT_AP_READ |
299 | .long PMD_TYPE_SECT | \ | ||
300 | PMD_SECT_AP_WRITE | \ | ||
301 | PMD_SECT_AP_READ | ||
299 | b __sa1100_setup | 302 | b __sa1100_setup |
300 | .long cpu_arch_name | 303 | .long cpu_arch_name |
301 | .long cpu_elf_name | 304 | .long cpu_elf_name |
diff --git a/arch/arm/mm/proc-v6.S b/arch/arm/mm/proc-v6.S index ca13d4d05f65..6f72549f8843 100644 --- a/arch/arm/mm/proc-v6.S +++ b/arch/arm/mm/proc-v6.S | |||
@@ -212,11 +212,11 @@ __v6_setup: | |||
212 | orr r0, r0, #(0xf << 20) | 212 | orr r0, r0, #(0xf << 20) |
213 | mcr p15, 0, r0, c1, c0, 2 @ Enable full access to VFP | 213 | mcr p15, 0, r0, c1, c0, 2 @ Enable full access to VFP |
214 | #endif | 214 | #endif |
215 | adr r5, v6_crval | ||
216 | ldmia r5, {r5, r6} | ||
215 | mrc p15, 0, r0, c1, c0, 0 @ read control register | 217 | mrc p15, 0, r0, c1, c0, 0 @ read control register |
216 | ldr r5, v6_cr1_clear @ get mask for bits to clear | ||
217 | bic r0, r0, r5 @ clear bits them | 218 | bic r0, r0, r5 @ clear bits them |
218 | ldr r5, v6_cr1_set @ get mask for bits to set | 219 | orr r0, r0, r6 @ set them |
219 | orr r0, r0, r5 @ set them | ||
220 | mov pc, lr @ return to head.S:__ret | 220 | mov pc, lr @ return to head.S:__ret |
221 | 221 | ||
222 | /* | 222 | /* |
@@ -225,12 +225,9 @@ __v6_setup: | |||
225 | * rrrr rrrx xxx0 0101 xxxx xxxx x111 xxxx < forced | 225 | * rrrr rrrx xxx0 0101 xxxx xxxx x111 xxxx < forced |
226 | * 0 110 0011 1.00 .111 1101 < we want | 226 | * 0 110 0011 1.00 .111 1101 < we want |
227 | */ | 227 | */ |
228 | .type v6_cr1_clear, #object | 228 | .type v6_crval, #object |
229 | .type v6_cr1_set, #object | 229 | v6_crval: |
230 | v6_cr1_clear: | 230 | crval clear=0x01e0fb7f, mmuset=0x00c0387d, ucset=0x00c0187c |
231 | .word 0x01e0fb7f | ||
232 | v6_cr1_set: | ||
233 | .word 0x00c0387d | ||
234 | 231 | ||
235 | .type v6_processor_functions, #object | 232 | .type v6_processor_functions, #object |
236 | ENTRY(v6_processor_functions) | 233 | ENTRY(v6_processor_functions) |
@@ -269,6 +266,10 @@ __v6_proc_info: | |||
269 | PMD_SECT_CACHEABLE | \ | 266 | PMD_SECT_CACHEABLE | \ |
270 | PMD_SECT_AP_WRITE | \ | 267 | PMD_SECT_AP_WRITE | \ |
271 | PMD_SECT_AP_READ | 268 | PMD_SECT_AP_READ |
269 | .long PMD_TYPE_SECT | \ | ||
270 | PMD_SECT_XN | \ | ||
271 | PMD_SECT_AP_WRITE | \ | ||
272 | PMD_SECT_AP_READ | ||
272 | b __v6_setup | 273 | b __v6_setup |
273 | .long cpu_arch_name | 274 | .long cpu_arch_name |
274 | .long cpu_elf_name | 275 | .long cpu_elf_name |
diff --git a/arch/arm/mm/proc-xsc3.S b/arch/arm/mm/proc-xsc3.S index 8d32e21fe151..4ace2d8090c7 100644 --- a/arch/arm/mm/proc-xsc3.S +++ b/arch/arm/mm/proc-xsc3.S | |||
@@ -426,23 +426,26 @@ __xsc3_setup: | |||
426 | orr r0, r0, #(1 << 10) @ enable L2 for LLR cache | 426 | orr r0, r0, #(1 << 10) @ enable L2 for LLR cache |
427 | #endif | 427 | #endif |
428 | mcr p15, 0, r0, c1, c0, 1 @ set auxiliary control reg | 428 | mcr p15, 0, r0, c1, c0, 1 @ set auxiliary control reg |
429 | |||
430 | adr r5, xsc3_crval | ||
431 | ldmia r5, {r5, r6} | ||
429 | mrc p15, 0, r0, c1, c0, 0 @ get control register | 432 | mrc p15, 0, r0, c1, c0, 0 @ get control register |
430 | bic r0, r0, #0x0002 @ .... .... .... ..A. | 433 | bic r0, r0, r5 @ .... .... .... ..A. |
431 | orr r0, r0, #0x0005 @ .... .... .... .C.M | 434 | orr r0, r0, r6 @ .... .... .... .C.M |
432 | #if BTB_ENABLE | 435 | #if BTB_ENABLE |
433 | bic r0, r0, #0x0200 @ .... ..R. .... .... | 436 | orr r0, r0, #0x00000800 @ ..VI Z..S .... .... |
434 | orr r0, r0, #0x3900 @ ..VI Z..S .... .... | ||
435 | #else | ||
436 | bic r0, r0, #0x0a00 @ .... Z.R. .... .... | ||
437 | orr r0, r0, #0x3100 @ ..VI ...S .... .... | ||
438 | #endif | 437 | #endif |
439 | #if L2_CACHE_ENABLE | 438 | #if L2_CACHE_ENABLE |
440 | orr r0, r0, #0x4000000 @ L2 enable | 439 | orr r0, r0, #0x04000000 @ L2 enable |
441 | #endif | 440 | #endif |
442 | mov pc, lr | 441 | mov pc, lr |
443 | 442 | ||
444 | .size __xsc3_setup, . - __xsc3_setup | 443 | .size __xsc3_setup, . - __xsc3_setup |
445 | 444 | ||
445 | .type xsc3_crval, #object | ||
446 | xsc3_crval: | ||
447 | crval clear=0x04003b02, mmuset=0x00003105, ucset=0x00001100 | ||
448 | |||
446 | __INITDATA | 449 | __INITDATA |
447 | 450 | ||
448 | /* | 451 | /* |
@@ -487,7 +490,14 @@ cpu_xsc3_name: | |||
487 | __xsc3_proc_info: | 490 | __xsc3_proc_info: |
488 | .long 0x69056000 | 491 | .long 0x69056000 |
489 | .long 0xffffe000 | 492 | .long 0xffffe000 |
490 | .long 0x00000c0e | 493 | .long PMD_TYPE_SECT | \ |
494 | PMD_SECT_BUFFERABLE | \ | ||
495 | PMD_SECT_CACHEABLE | \ | ||
496 | PMD_SECT_AP_WRITE | \ | ||
497 | PMD_SECT_AP_READ | ||
498 | .long PMD_TYPE_SECT | \ | ||
499 | PMD_SECT_AP_WRITE | \ | ||
500 | PMD_SECT_AP_READ | ||
491 | b __xsc3_setup | 501 | b __xsc3_setup |
492 | .long cpu_arch_name | 502 | .long cpu_arch_name |
493 | .long cpu_elf_name | 503 | .long cpu_elf_name |
diff --git a/arch/arm/mm/proc-xscale.S b/arch/arm/mm/proc-xscale.S index 29bcc4dd6517..521538671f4c 100644 --- a/arch/arm/mm/proc-xscale.S +++ b/arch/arm/mm/proc-xscale.S | |||
@@ -138,17 +138,23 @@ ENTRY(cpu_xscale_proc_fin) | |||
138 | * to what would be the reset vector. | 138 | * to what would be the reset vector. |
139 | * | 139 | * |
140 | * loc: location to jump to for soft reset | 140 | * loc: location to jump to for soft reset |
141 | * | ||
142 | * Beware PXA270 erratum E7. | ||
141 | */ | 143 | */ |
142 | .align 5 | 144 | .align 5 |
143 | ENTRY(cpu_xscale_reset) | 145 | ENTRY(cpu_xscale_reset) |
144 | mov r1, #PSR_F_BIT|PSR_I_BIT|SVC_MODE | 146 | mov r1, #PSR_F_BIT|PSR_I_BIT|SVC_MODE |
145 | msr cpsr_c, r1 @ reset CPSR | 147 | msr cpsr_c, r1 @ reset CPSR |
148 | mcr p15, 0, r1, c10, c4, 1 @ unlock I-TLB | ||
149 | mcr p15, 0, r1, c8, c5, 0 @ invalidate I-TLB | ||
146 | mrc p15, 0, r1, c1, c0, 0 @ ctrl register | 150 | mrc p15, 0, r1, c1, c0, 0 @ ctrl register |
147 | bic r1, r1, #0x0086 @ ........B....CA. | 151 | bic r1, r1, #0x0086 @ ........B....CA. |
148 | bic r1, r1, #0x3900 @ ..VIZ..S........ | 152 | bic r1, r1, #0x3900 @ ..VIZ..S........ |
153 | sub pc, pc, #4 @ flush pipeline | ||
154 | @ *** cache line aligned *** | ||
149 | mcr p15, 0, r1, c1, c0, 0 @ ctrl register | 155 | mcr p15, 0, r1, c1, c0, 0 @ ctrl register |
150 | mcr p15, 0, ip, c7, c7, 0 @ invalidate I,D caches & BTB | ||
151 | bic r1, r1, #0x0001 @ ...............M | 156 | bic r1, r1, #0x0001 @ ...............M |
157 | mcr p15, 0, ip, c7, c7, 0 @ invalidate I,D caches & BTB | ||
152 | mcr p15, 0, r1, c1, c0, 0 @ ctrl register | 158 | mcr p15, 0, r1, c1, c0, 0 @ ctrl register |
153 | @ CAUTION: MMU turned off from this point. We count on the pipeline | 159 | @ CAUTION: MMU turned off from this point. We count on the pipeline |
154 | @ already containing those two last instructions to survive. | 160 | @ already containing those two last instructions to survive. |
@@ -475,11 +481,12 @@ __xscale_setup: | |||
475 | orr r0, r0, #1 << 6 @ cp6 for IOP3xx and Bulverde | 481 | orr r0, r0, #1 << 6 @ cp6 for IOP3xx and Bulverde |
476 | orr r0, r0, #1 << 13 @ Its undefined whether this | 482 | orr r0, r0, #1 << 13 @ Its undefined whether this |
477 | mcr p15, 0, r0, c15, c1, 0 @ affects USR or SVC modes | 483 | mcr p15, 0, r0, c15, c1, 0 @ affects USR or SVC modes |
484 | |||
485 | adr r5, xscale_crval | ||
486 | ldmia r5, {r5, r6} | ||
478 | mrc p15, 0, r0, c1, c0, 0 @ get control register | 487 | mrc p15, 0, r0, c1, c0, 0 @ get control register |
479 | ldr r5, xscale_cr1_clear | ||
480 | bic r0, r0, r5 | 488 | bic r0, r0, r5 |
481 | ldr r5, xscale_cr1_set | 489 | orr r0, r0, r6 |
482 | orr r0, r0, r5 | ||
483 | mov pc, lr | 490 | mov pc, lr |
484 | .size __xscale_setup, . - __xscale_setup | 491 | .size __xscale_setup, . - __xscale_setup |
485 | 492 | ||
@@ -489,12 +496,9 @@ __xscale_setup: | |||
489 | * ..11 1.01 .... .101 | 496 | * ..11 1.01 .... .101 |
490 | * | 497 | * |
491 | */ | 498 | */ |
492 | .type xscale_cr1_clear, #object | 499 | .type xscale_crval, #object |
493 | .type xscale_cr1_set, #object | 500 | xscale_crval: |
494 | xscale_cr1_clear: | 501 | crval clear=0x00003b07, mmuset=0x00003905, ucset=0x00001900 |
495 | .word 0x3b07 | ||
496 | xscale_cr1_set: | ||
497 | .word 0x3905 | ||
498 | 502 | ||
499 | __INITDATA | 503 | __INITDATA |
500 | 504 | ||
@@ -595,6 +599,9 @@ __80200_proc_info: | |||
595 | PMD_SECT_CACHEABLE | \ | 599 | PMD_SECT_CACHEABLE | \ |
596 | PMD_SECT_AP_WRITE | \ | 600 | PMD_SECT_AP_WRITE | \ |
597 | PMD_SECT_AP_READ | 601 | PMD_SECT_AP_READ |
602 | .long PMD_TYPE_SECT | \ | ||
603 | PMD_SECT_AP_WRITE | \ | ||
604 | PMD_SECT_AP_READ | ||
598 | b __xscale_setup | 605 | b __xscale_setup |
599 | .long cpu_arch_name | 606 | .long cpu_arch_name |
600 | .long cpu_elf_name | 607 | .long cpu_elf_name |
@@ -615,6 +622,9 @@ __8032x_proc_info: | |||
615 | PMD_SECT_CACHEABLE | \ | 622 | PMD_SECT_CACHEABLE | \ |
616 | PMD_SECT_AP_WRITE | \ | 623 | PMD_SECT_AP_WRITE | \ |
617 | PMD_SECT_AP_READ | 624 | PMD_SECT_AP_READ |
625 | .long PMD_TYPE_SECT | \ | ||
626 | PMD_SECT_AP_WRITE | \ | ||
627 | PMD_SECT_AP_READ | ||
618 | b __xscale_setup | 628 | b __xscale_setup |
619 | .long cpu_arch_name | 629 | .long cpu_arch_name |
620 | .long cpu_elf_name | 630 | .long cpu_elf_name |
@@ -635,6 +645,9 @@ __8033x_proc_info: | |||
635 | PMD_SECT_CACHEABLE | \ | 645 | PMD_SECT_CACHEABLE | \ |
636 | PMD_SECT_AP_WRITE | \ | 646 | PMD_SECT_AP_WRITE | \ |
637 | PMD_SECT_AP_READ | 647 | PMD_SECT_AP_READ |
648 | .long PMD_TYPE_SECT | \ | ||
649 | PMD_SECT_AP_WRITE | \ | ||
650 | PMD_SECT_AP_READ | ||
638 | b __xscale_setup | 651 | b __xscale_setup |
639 | .long cpu_arch_name | 652 | .long cpu_arch_name |
640 | .long cpu_elf_name | 653 | .long cpu_elf_name |
@@ -655,6 +668,9 @@ __pxa250_proc_info: | |||
655 | PMD_SECT_CACHEABLE | \ | 668 | PMD_SECT_CACHEABLE | \ |
656 | PMD_SECT_AP_WRITE | \ | 669 | PMD_SECT_AP_WRITE | \ |
657 | PMD_SECT_AP_READ | 670 | PMD_SECT_AP_READ |
671 | .long PMD_TYPE_SECT | \ | ||
672 | PMD_SECT_AP_WRITE | \ | ||
673 | PMD_SECT_AP_READ | ||
658 | b __xscale_setup | 674 | b __xscale_setup |
659 | .long cpu_arch_name | 675 | .long cpu_arch_name |
660 | .long cpu_elf_name | 676 | .long cpu_elf_name |
@@ -675,6 +691,9 @@ __pxa210_proc_info: | |||
675 | PMD_SECT_CACHEABLE | \ | 691 | PMD_SECT_CACHEABLE | \ |
676 | PMD_SECT_AP_WRITE | \ | 692 | PMD_SECT_AP_WRITE | \ |
677 | PMD_SECT_AP_READ | 693 | PMD_SECT_AP_READ |
694 | .long PMD_TYPE_SECT | \ | ||
695 | PMD_SECT_AP_WRITE | \ | ||
696 | PMD_SECT_AP_READ | ||
678 | b __xscale_setup | 697 | b __xscale_setup |
679 | .long cpu_arch_name | 698 | .long cpu_arch_name |
680 | .long cpu_elf_name | 699 | .long cpu_elf_name |
@@ -695,6 +714,9 @@ __ixp2400_proc_info: | |||
695 | PMD_SECT_CACHEABLE | \ | 714 | PMD_SECT_CACHEABLE | \ |
696 | PMD_SECT_AP_WRITE | \ | 715 | PMD_SECT_AP_WRITE | \ |
697 | PMD_SECT_AP_READ | 716 | PMD_SECT_AP_READ |
717 | .long PMD_TYPE_SECT | \ | ||
718 | PMD_SECT_AP_WRITE | \ | ||
719 | PMD_SECT_AP_READ | ||
698 | b __xscale_setup | 720 | b __xscale_setup |
699 | .long cpu_arch_name | 721 | .long cpu_arch_name |
700 | .long cpu_elf_name | 722 | .long cpu_elf_name |
@@ -715,6 +737,9 @@ __ixp2800_proc_info: | |||
715 | PMD_SECT_CACHEABLE | \ | 737 | PMD_SECT_CACHEABLE | \ |
716 | PMD_SECT_AP_WRITE | \ | 738 | PMD_SECT_AP_WRITE | \ |
717 | PMD_SECT_AP_READ | 739 | PMD_SECT_AP_READ |
740 | .long PMD_TYPE_SECT | \ | ||
741 | PMD_SECT_AP_WRITE | \ | ||
742 | PMD_SECT_AP_READ | ||
718 | b __xscale_setup | 743 | b __xscale_setup |
719 | .long cpu_arch_name | 744 | .long cpu_arch_name |
720 | .long cpu_elf_name | 745 | .long cpu_elf_name |
@@ -735,6 +760,9 @@ __ixp42x_proc_info: | |||
735 | PMD_SECT_CACHEABLE | \ | 760 | PMD_SECT_CACHEABLE | \ |
736 | PMD_SECT_AP_WRITE | \ | 761 | PMD_SECT_AP_WRITE | \ |
737 | PMD_SECT_AP_READ | 762 | PMD_SECT_AP_READ |
763 | .long PMD_TYPE_SECT | \ | ||
764 | PMD_SECT_AP_WRITE | \ | ||
765 | PMD_SECT_AP_READ | ||
738 | b __xscale_setup | 766 | b __xscale_setup |
739 | .long cpu_arch_name | 767 | .long cpu_arch_name |
740 | .long cpu_elf_name | 768 | .long cpu_elf_name |
@@ -750,7 +778,14 @@ __ixp42x_proc_info: | |||
750 | __ixp46x_proc_info: | 778 | __ixp46x_proc_info: |
751 | .long 0x69054200 | 779 | .long 0x69054200 |
752 | .long 0xffffff00 | 780 | .long 0xffffff00 |
753 | .long 0x00000c0e | 781 | .long PMD_TYPE_SECT | \ |
782 | PMD_SECT_BUFFERABLE | \ | ||
783 | PMD_SECT_CACHEABLE | \ | ||
784 | PMD_SECT_AP_WRITE | \ | ||
785 | PMD_SECT_AP_READ | ||
786 | .long PMD_TYPE_SECT | \ | ||
787 | PMD_SECT_AP_WRITE | \ | ||
788 | PMD_SECT_AP_READ | ||
754 | b __xscale_setup | 789 | b __xscale_setup |
755 | .long cpu_arch_name | 790 | .long cpu_arch_name |
756 | .long cpu_elf_name | 791 | .long cpu_elf_name |
@@ -771,6 +806,9 @@ __pxa255_proc_info: | |||
771 | PMD_SECT_CACHEABLE | \ | 806 | PMD_SECT_CACHEABLE | \ |
772 | PMD_SECT_AP_WRITE | \ | 807 | PMD_SECT_AP_WRITE | \ |
773 | PMD_SECT_AP_READ | 808 | PMD_SECT_AP_READ |
809 | .long PMD_TYPE_SECT | \ | ||
810 | PMD_SECT_AP_WRITE | \ | ||
811 | PMD_SECT_AP_READ | ||
774 | b __xscale_setup | 812 | b __xscale_setup |
775 | .long cpu_arch_name | 813 | .long cpu_arch_name |
776 | .long cpu_elf_name | 814 | .long cpu_elf_name |
@@ -791,6 +829,9 @@ __pxa270_proc_info: | |||
791 | PMD_SECT_CACHEABLE | \ | 829 | PMD_SECT_CACHEABLE | \ |
792 | PMD_SECT_AP_WRITE | \ | 830 | PMD_SECT_AP_WRITE | \ |
793 | PMD_SECT_AP_READ | 831 | PMD_SECT_AP_READ |
832 | .long PMD_TYPE_SECT | \ | ||
833 | PMD_SECT_AP_WRITE | \ | ||
834 | PMD_SECT_AP_READ | ||
794 | b __xscale_setup | 835 | b __xscale_setup |
795 | .long cpu_arch_name | 836 | .long cpu_arch_name |
796 | .long cpu_elf_name | 837 | .long cpu_elf_name |
diff --git a/arch/arm/plat-omap/Kconfig b/arch/arm/plat-omap/Kconfig index ec49495e651e..ec752e16d618 100644 --- a/arch/arm/plat-omap/Kconfig +++ b/arch/arm/plat-omap/Kconfig | |||
@@ -91,7 +91,7 @@ config OMAP_32K_TIMER_HZ | |||
91 | 91 | ||
92 | config OMAP_DM_TIMER | 92 | config OMAP_DM_TIMER |
93 | bool "Use dual-mode timer" | 93 | bool "Use dual-mode timer" |
94 | depends on ARCH_OMAP16XX | 94 | depends on ARCH_OMAP16XX || ARCH_OMAP24XX |
95 | help | 95 | help |
96 | Select this option if you want to use OMAP Dual-Mode timers. | 96 | Select this option if you want to use OMAP Dual-Mode timers. |
97 | 97 | ||
diff --git a/arch/arm/plat-omap/clock.c b/arch/arm/plat-omap/clock.c index c520e9dcdd8a..7f45c7c3e673 100644 --- a/arch/arm/plat-omap/clock.c +++ b/arch/arm/plat-omap/clock.c | |||
@@ -27,9 +27,9 @@ | |||
27 | 27 | ||
28 | #include <asm/arch/clock.h> | 28 | #include <asm/arch/clock.h> |
29 | 29 | ||
30 | LIST_HEAD(clocks); | 30 | static LIST_HEAD(clocks); |
31 | static DEFINE_MUTEX(clocks_mutex); | 31 | static DEFINE_MUTEX(clocks_mutex); |
32 | DEFINE_SPINLOCK(clockfw_lock); | 32 | static DEFINE_SPINLOCK(clockfw_lock); |
33 | 33 | ||
34 | static struct clk_functions *arch_clock; | 34 | static struct clk_functions *arch_clock; |
35 | 35 | ||
diff --git a/arch/arm/plat-omap/cpu-omap.c b/arch/arm/plat-omap/cpu-omap.c index 98edc9fdd6d1..a0c71dca2373 100644 --- a/arch/arm/plat-omap/cpu-omap.c +++ b/arch/arm/plat-omap/cpu-omap.c | |||
@@ -25,6 +25,14 @@ | |||
25 | #include <asm/io.h> | 25 | #include <asm/io.h> |
26 | #include <asm/system.h> | 26 | #include <asm/system.h> |
27 | 27 | ||
28 | #define VERY_HI_RATE 900000000 | ||
29 | |||
30 | #ifdef CONFIG_ARCH_OMAP1 | ||
31 | #define MPU_CLK "mpu" | ||
32 | #else | ||
33 | #define MPU_CLK "virt_prcm_set" | ||
34 | #endif | ||
35 | |||
28 | /* TODO: Add support for SDRAM timing changes */ | 36 | /* TODO: Add support for SDRAM timing changes */ |
29 | 37 | ||
30 | int omap_verify_speed(struct cpufreq_policy *policy) | 38 | int omap_verify_speed(struct cpufreq_policy *policy) |
@@ -36,7 +44,7 @@ int omap_verify_speed(struct cpufreq_policy *policy) | |||
36 | 44 | ||
37 | cpufreq_verify_within_limits(policy, policy->cpuinfo.min_freq, | 45 | cpufreq_verify_within_limits(policy, policy->cpuinfo.min_freq, |
38 | policy->cpuinfo.max_freq); | 46 | policy->cpuinfo.max_freq); |
39 | mpu_clk = clk_get(NULL, "mpu"); | 47 | mpu_clk = clk_get(NULL, MPU_CLK); |
40 | if (IS_ERR(mpu_clk)) | 48 | if (IS_ERR(mpu_clk)) |
41 | return PTR_ERR(mpu_clk); | 49 | return PTR_ERR(mpu_clk); |
42 | policy->min = clk_round_rate(mpu_clk, policy->min * 1000) / 1000; | 50 | policy->min = clk_round_rate(mpu_clk, policy->min * 1000) / 1000; |
@@ -56,7 +64,7 @@ unsigned int omap_getspeed(unsigned int cpu) | |||
56 | if (cpu) | 64 | if (cpu) |
57 | return 0; | 65 | return 0; |
58 | 66 | ||
59 | mpu_clk = clk_get(NULL, "mpu"); | 67 | mpu_clk = clk_get(NULL, MPU_CLK); |
60 | if (IS_ERR(mpu_clk)) | 68 | if (IS_ERR(mpu_clk)) |
61 | return 0; | 69 | return 0; |
62 | rate = clk_get_rate(mpu_clk) / 1000; | 70 | rate = clk_get_rate(mpu_clk) / 1000; |
@@ -73,7 +81,7 @@ static int omap_target(struct cpufreq_policy *policy, | |||
73 | struct cpufreq_freqs freqs; | 81 | struct cpufreq_freqs freqs; |
74 | int ret = 0; | 82 | int ret = 0; |
75 | 83 | ||
76 | mpu_clk = clk_get(NULL, "mpu"); | 84 | mpu_clk = clk_get(NULL, MPU_CLK); |
77 | if (IS_ERR(mpu_clk)) | 85 | if (IS_ERR(mpu_clk)) |
78 | return PTR_ERR(mpu_clk); | 86 | return PTR_ERR(mpu_clk); |
79 | 87 | ||
@@ -93,7 +101,7 @@ static int __init omap_cpu_init(struct cpufreq_policy *policy) | |||
93 | { | 101 | { |
94 | struct clk * mpu_clk; | 102 | struct clk * mpu_clk; |
95 | 103 | ||
96 | mpu_clk = clk_get(NULL, "mpu"); | 104 | mpu_clk = clk_get(NULL, MPU_CLK); |
97 | if (IS_ERR(mpu_clk)) | 105 | if (IS_ERR(mpu_clk)) |
98 | return PTR_ERR(mpu_clk); | 106 | return PTR_ERR(mpu_clk); |
99 | 107 | ||
@@ -102,7 +110,7 @@ static int __init omap_cpu_init(struct cpufreq_policy *policy) | |||
102 | policy->cur = policy->min = policy->max = omap_getspeed(0); | 110 | policy->cur = policy->min = policy->max = omap_getspeed(0); |
103 | policy->governor = CPUFREQ_DEFAULT_GOVERNOR; | 111 | policy->governor = CPUFREQ_DEFAULT_GOVERNOR; |
104 | policy->cpuinfo.min_freq = clk_round_rate(mpu_clk, 0) / 1000; | 112 | policy->cpuinfo.min_freq = clk_round_rate(mpu_clk, 0) / 1000; |
105 | policy->cpuinfo.max_freq = clk_round_rate(mpu_clk, 216000000) / 1000; | 113 | policy->cpuinfo.max_freq = clk_round_rate(mpu_clk, VERY_HI_RATE) / 1000; |
106 | policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL; | 114 | policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL; |
107 | clk_put(mpu_clk); | 115 | clk_put(mpu_clk); |
108 | 116 | ||
diff --git a/arch/arm/plat-omap/devices.c b/arch/arm/plat-omap/devices.c index ca486c9f36b5..1812f237d12f 100644 --- a/arch/arm/plat-omap/devices.c +++ b/arch/arm/plat-omap/devices.c | |||
@@ -104,7 +104,7 @@ static void omap_init_kp(void) | |||
104 | omap_cfg_reg(E20_1610_KBR3); | 104 | omap_cfg_reg(E20_1610_KBR3); |
105 | omap_cfg_reg(E19_1610_KBR4); | 105 | omap_cfg_reg(E19_1610_KBR4); |
106 | omap_cfg_reg(N19_1610_KBR5); | 106 | omap_cfg_reg(N19_1610_KBR5); |
107 | } else if (machine_is_omap_perseus2()) { | 107 | } else if (machine_is_omap_perseus2() || machine_is_omap_fsample()) { |
108 | omap_cfg_reg(E2_730_KBR0); | 108 | omap_cfg_reg(E2_730_KBR0); |
109 | omap_cfg_reg(J7_730_KBR1); | 109 | omap_cfg_reg(J7_730_KBR1); |
110 | omap_cfg_reg(E1_730_KBR2); | 110 | omap_cfg_reg(E1_730_KBR2); |
@@ -161,8 +161,8 @@ static u64 mmc1_dmamask = 0xffffffff; | |||
161 | 161 | ||
162 | static struct resource mmc1_resources[] = { | 162 | static struct resource mmc1_resources[] = { |
163 | { | 163 | { |
164 | .start = IO_ADDRESS(OMAP_MMC1_BASE), | 164 | .start = OMAP_MMC1_BASE, |
165 | .end = IO_ADDRESS(OMAP_MMC1_BASE) + 0x7f, | 165 | .end = OMAP_MMC1_BASE + 0x7f, |
166 | .flags = IORESOURCE_MEM, | 166 | .flags = IORESOURCE_MEM, |
167 | }, | 167 | }, |
168 | { | 168 | { |
@@ -190,8 +190,8 @@ static u64 mmc2_dmamask = 0xffffffff; | |||
190 | 190 | ||
191 | static struct resource mmc2_resources[] = { | 191 | static struct resource mmc2_resources[] = { |
192 | { | 192 | { |
193 | .start = IO_ADDRESS(OMAP_MMC2_BASE), | 193 | .start = OMAP_MMC2_BASE, |
194 | .end = IO_ADDRESS(OMAP_MMC2_BASE) + 0x7f, | 194 | .end = OMAP_MMC2_BASE + 0x7f, |
195 | .flags = IORESOURCE_MEM, | 195 | .flags = IORESOURCE_MEM, |
196 | }, | 196 | }, |
197 | { | 197 | { |
diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c index 2525633fcd09..c2c05ef86348 100644 --- a/arch/arm/plat-omap/dma.c +++ b/arch/arm/plat-omap/dma.c | |||
@@ -43,6 +43,7 @@ | |||
43 | 43 | ||
44 | #define OMAP_DMA_ACTIVE 0x01 | 44 | #define OMAP_DMA_ACTIVE 0x01 |
45 | #define OMAP_DMA_CCR_EN (1 << 7) | 45 | #define OMAP_DMA_CCR_EN (1 << 7) |
46 | #define OMAP2_DMA_CSR_CLEAR_MASK 0xffe | ||
46 | 47 | ||
47 | #define OMAP_FUNC_MUX_ARM_BASE (0xfffe1000 + 0xec) | 48 | #define OMAP_FUNC_MUX_ARM_BASE (0xfffe1000 + 0xec) |
48 | 49 | ||
@@ -166,18 +167,24 @@ void omap_set_dma_transfer_params(int lch, int data_type, int elem_count, | |||
166 | if (cpu_is_omap24xx() && dma_trigger) { | 167 | if (cpu_is_omap24xx() && dma_trigger) { |
167 | u32 val = OMAP_DMA_CCR_REG(lch); | 168 | u32 val = OMAP_DMA_CCR_REG(lch); |
168 | 169 | ||
170 | val &= ~(3 << 19); | ||
169 | if (dma_trigger > 63) | 171 | if (dma_trigger > 63) |
170 | val |= 1 << 20; | 172 | val |= 1 << 20; |
171 | if (dma_trigger > 31) | 173 | if (dma_trigger > 31) |
172 | val |= 1 << 19; | 174 | val |= 1 << 19; |
173 | 175 | ||
176 | val &= ~(0x1f); | ||
174 | val |= (dma_trigger & 0x1f); | 177 | val |= (dma_trigger & 0x1f); |
175 | 178 | ||
176 | if (sync_mode & OMAP_DMA_SYNC_FRAME) | 179 | if (sync_mode & OMAP_DMA_SYNC_FRAME) |
177 | val |= 1 << 5; | 180 | val |= 1 << 5; |
181 | else | ||
182 | val &= ~(1 << 5); | ||
178 | 183 | ||
179 | if (sync_mode & OMAP_DMA_SYNC_BLOCK) | 184 | if (sync_mode & OMAP_DMA_SYNC_BLOCK) |
180 | val |= 1 << 18; | 185 | val |= 1 << 18; |
186 | else | ||
187 | val &= ~(1 << 18); | ||
181 | 188 | ||
182 | if (src_or_dst_synch) | 189 | if (src_or_dst_synch) |
183 | val |= 1 << 24; /* source synch */ | 190 | val |= 1 << 24; /* source synch */ |
@@ -286,22 +293,39 @@ void omap_set_dma_src_data_pack(int lch, int enable) | |||
286 | 293 | ||
287 | void omap_set_dma_src_burst_mode(int lch, enum omap_dma_burst_mode burst_mode) | 294 | void omap_set_dma_src_burst_mode(int lch, enum omap_dma_burst_mode burst_mode) |
288 | { | 295 | { |
296 | unsigned int burst = 0; | ||
289 | OMAP_DMA_CSDP_REG(lch) &= ~(0x03 << 7); | 297 | OMAP_DMA_CSDP_REG(lch) &= ~(0x03 << 7); |
290 | 298 | ||
291 | switch (burst_mode) { | 299 | switch (burst_mode) { |
292 | case OMAP_DMA_DATA_BURST_DIS: | 300 | case OMAP_DMA_DATA_BURST_DIS: |
293 | break; | 301 | break; |
294 | case OMAP_DMA_DATA_BURST_4: | 302 | case OMAP_DMA_DATA_BURST_4: |
295 | OMAP_DMA_CSDP_REG(lch) |= (0x02 << 7); | 303 | if (cpu_is_omap24xx()) |
304 | burst = 0x1; | ||
305 | else | ||
306 | burst = 0x2; | ||
296 | break; | 307 | break; |
297 | case OMAP_DMA_DATA_BURST_8: | 308 | case OMAP_DMA_DATA_BURST_8: |
298 | /* not supported by current hardware | 309 | if (cpu_is_omap24xx()) { |
310 | burst = 0x2; | ||
311 | break; | ||
312 | } | ||
313 | /* not supported by current hardware on OMAP1 | ||
299 | * w |= (0x03 << 7); | 314 | * w |= (0x03 << 7); |
300 | * fall through | 315 | * fall through |
301 | */ | 316 | */ |
317 | case OMAP_DMA_DATA_BURST_16: | ||
318 | if (cpu_is_omap24xx()) { | ||
319 | burst = 0x3; | ||
320 | break; | ||
321 | } | ||
322 | /* OMAP1 don't support burst 16 | ||
323 | * fall through | ||
324 | */ | ||
302 | default: | 325 | default: |
303 | BUG(); | 326 | BUG(); |
304 | } | 327 | } |
328 | OMAP_DMA_CSDP_REG(lch) |= (burst << 7); | ||
305 | } | 329 | } |
306 | 330 | ||
307 | /* Note that dest_port is only for OMAP1 */ | 331 | /* Note that dest_port is only for OMAP1 */ |
@@ -348,30 +372,49 @@ void omap_set_dma_dest_data_pack(int lch, int enable) | |||
348 | 372 | ||
349 | void omap_set_dma_dest_burst_mode(int lch, enum omap_dma_burst_mode burst_mode) | 373 | void omap_set_dma_dest_burst_mode(int lch, enum omap_dma_burst_mode burst_mode) |
350 | { | 374 | { |
375 | unsigned int burst = 0; | ||
351 | OMAP_DMA_CSDP_REG(lch) &= ~(0x03 << 14); | 376 | OMAP_DMA_CSDP_REG(lch) &= ~(0x03 << 14); |
352 | 377 | ||
353 | switch (burst_mode) { | 378 | switch (burst_mode) { |
354 | case OMAP_DMA_DATA_BURST_DIS: | 379 | case OMAP_DMA_DATA_BURST_DIS: |
355 | break; | 380 | break; |
356 | case OMAP_DMA_DATA_BURST_4: | 381 | case OMAP_DMA_DATA_BURST_4: |
357 | OMAP_DMA_CSDP_REG(lch) |= (0x02 << 14); | 382 | if (cpu_is_omap24xx()) |
383 | burst = 0x1; | ||
384 | else | ||
385 | burst = 0x2; | ||
358 | break; | 386 | break; |
359 | case OMAP_DMA_DATA_BURST_8: | 387 | case OMAP_DMA_DATA_BURST_8: |
360 | OMAP_DMA_CSDP_REG(lch) |= (0x03 << 14); | 388 | if (cpu_is_omap24xx()) |
389 | burst = 0x2; | ||
390 | else | ||
391 | burst = 0x3; | ||
361 | break; | 392 | break; |
393 | case OMAP_DMA_DATA_BURST_16: | ||
394 | if (cpu_is_omap24xx()) { | ||
395 | burst = 0x3; | ||
396 | break; | ||
397 | } | ||
398 | /* OMAP1 don't support burst 16 | ||
399 | * fall through | ||
400 | */ | ||
362 | default: | 401 | default: |
363 | printk(KERN_ERR "Invalid DMA burst mode\n"); | 402 | printk(KERN_ERR "Invalid DMA burst mode\n"); |
364 | BUG(); | 403 | BUG(); |
365 | return; | 404 | return; |
366 | } | 405 | } |
406 | OMAP_DMA_CSDP_REG(lch) |= (burst << 14); | ||
367 | } | 407 | } |
368 | 408 | ||
369 | static inline void omap_enable_channel_irq(int lch) | 409 | static inline void omap_enable_channel_irq(int lch) |
370 | { | 410 | { |
371 | u32 status; | 411 | u32 status; |
372 | 412 | ||
373 | /* Read CSR to make sure it's cleared. */ | 413 | /* Clear CSR */ |
374 | status = OMAP_DMA_CSR_REG(lch); | 414 | if (cpu_class_is_omap1()) |
415 | status = OMAP_DMA_CSR_REG(lch); | ||
416 | else if (cpu_is_omap24xx()) | ||
417 | OMAP_DMA_CSR_REG(lch) = OMAP2_DMA_CSR_CLEAR_MASK; | ||
375 | 418 | ||
376 | /* Enable some nice interrupts. */ | 419 | /* Enable some nice interrupts. */ |
377 | OMAP_DMA_CICR_REG(lch) = dma_chan[lch].enabled_irqs; | 420 | OMAP_DMA_CICR_REG(lch) = dma_chan[lch].enabled_irqs; |
@@ -470,11 +513,13 @@ int omap_request_dma(int dev_id, const char *dev_name, | |||
470 | chan->dev_name = dev_name; | 513 | chan->dev_name = dev_name; |
471 | chan->callback = callback; | 514 | chan->callback = callback; |
472 | chan->data = data; | 515 | chan->data = data; |
473 | chan->enabled_irqs = OMAP_DMA_TOUT_IRQ | OMAP_DMA_DROP_IRQ | | 516 | chan->enabled_irqs = OMAP_DMA_DROP_IRQ | OMAP_DMA_BLOCK_IRQ; |
474 | OMAP_DMA_BLOCK_IRQ; | ||
475 | 517 | ||
476 | if (cpu_is_omap24xx()) | 518 | if (cpu_class_is_omap1()) |
477 | chan->enabled_irqs |= OMAP2_DMA_TRANS_ERR_IRQ; | 519 | chan->enabled_irqs |= OMAP1_DMA_TOUT_IRQ; |
520 | else if (cpu_is_omap24xx()) | ||
521 | chan->enabled_irqs |= OMAP2_DMA_MISALIGNED_ERR_IRQ | | ||
522 | OMAP2_DMA_TRANS_ERR_IRQ; | ||
478 | 523 | ||
479 | if (cpu_is_omap16xx()) { | 524 | if (cpu_is_omap16xx()) { |
480 | /* If the sync device is set, configure it dynamically. */ | 525 | /* If the sync device is set, configure it dynamically. */ |
@@ -494,7 +539,7 @@ int omap_request_dma(int dev_id, const char *dev_name, | |||
494 | 539 | ||
495 | omap_enable_channel_irq(free_ch); | 540 | omap_enable_channel_irq(free_ch); |
496 | /* Clear the CSR register and IRQ status register */ | 541 | /* Clear the CSR register and IRQ status register */ |
497 | OMAP_DMA_CSR_REG(free_ch) = 0x0; | 542 | OMAP_DMA_CSR_REG(free_ch) = OMAP2_DMA_CSR_CLEAR_MASK; |
498 | omap_writel(~0x0, OMAP_DMA4_IRQSTATUS_L0); | 543 | omap_writel(~0x0, OMAP_DMA4_IRQSTATUS_L0); |
499 | } | 544 | } |
500 | 545 | ||
@@ -534,7 +579,7 @@ void omap_free_dma(int lch) | |||
534 | omap_writel(val, OMAP_DMA4_IRQENABLE_L0); | 579 | omap_writel(val, OMAP_DMA4_IRQENABLE_L0); |
535 | 580 | ||
536 | /* Clear the CSR register and IRQ status register */ | 581 | /* Clear the CSR register and IRQ status register */ |
537 | OMAP_DMA_CSR_REG(lch) = 0x0; | 582 | OMAP_DMA_CSR_REG(lch) = OMAP2_DMA_CSR_CLEAR_MASK; |
538 | 583 | ||
539 | val = omap_readl(OMAP_DMA4_IRQSTATUS_L0); | 584 | val = omap_readl(OMAP_DMA4_IRQSTATUS_L0); |
540 | val |= 1 << lch; | 585 | val |= 1 << lch; |
@@ -798,7 +843,7 @@ static int omap1_dma_handle_ch(int ch) | |||
798 | "%d (CSR %04x)\n", ch, csr); | 843 | "%d (CSR %04x)\n", ch, csr); |
799 | return 0; | 844 | return 0; |
800 | } | 845 | } |
801 | if (unlikely(csr & OMAP_DMA_TOUT_IRQ)) | 846 | if (unlikely(csr & OMAP1_DMA_TOUT_IRQ)) |
802 | printk(KERN_WARNING "DMA timeout with device %d\n", | 847 | printk(KERN_WARNING "DMA timeout with device %d\n", |
803 | dma_chan[ch].dev_id); | 848 | dma_chan[ch].dev_id); |
804 | if (unlikely(csr & OMAP_DMA_DROP_IRQ)) | 849 | if (unlikely(csr & OMAP_DMA_DROP_IRQ)) |
@@ -846,20 +891,21 @@ static int omap2_dma_handle_ch(int ch) | |||
846 | return 0; | 891 | return 0; |
847 | if (unlikely(dma_chan[ch].dev_id == -1)) | 892 | if (unlikely(dma_chan[ch].dev_id == -1)) |
848 | return 0; | 893 | return 0; |
849 | /* REVISIT: According to 24xx TRM, there's no TOUT_IE */ | ||
850 | if (unlikely(status & OMAP_DMA_TOUT_IRQ)) | ||
851 | printk(KERN_INFO "DMA timeout with device %d\n", | ||
852 | dma_chan[ch].dev_id); | ||
853 | if (unlikely(status & OMAP_DMA_DROP_IRQ)) | 894 | if (unlikely(status & OMAP_DMA_DROP_IRQ)) |
854 | printk(KERN_INFO | 895 | printk(KERN_INFO |
855 | "DMA synchronization event drop occurred with device " | 896 | "DMA synchronization event drop occurred with device " |
856 | "%d\n", dma_chan[ch].dev_id); | 897 | "%d\n", dma_chan[ch].dev_id); |
857 | |||
858 | if (unlikely(status & OMAP2_DMA_TRANS_ERR_IRQ)) | 898 | if (unlikely(status & OMAP2_DMA_TRANS_ERR_IRQ)) |
859 | printk(KERN_INFO "DMA transaction error with device %d\n", | 899 | printk(KERN_INFO "DMA transaction error with device %d\n", |
860 | dma_chan[ch].dev_id); | 900 | dma_chan[ch].dev_id); |
901 | if (unlikely(status & OMAP2_DMA_SECURE_ERR_IRQ)) | ||
902 | printk(KERN_INFO "DMA secure error with device %d\n", | ||
903 | dma_chan[ch].dev_id); | ||
904 | if (unlikely(status & OMAP2_DMA_MISALIGNED_ERR_IRQ)) | ||
905 | printk(KERN_INFO "DMA misaligned error with device %d\n", | ||
906 | dma_chan[ch].dev_id); | ||
861 | 907 | ||
862 | OMAP_DMA_CSR_REG(ch) = 0x20; | 908 | OMAP_DMA_CSR_REG(ch) = OMAP2_DMA_CSR_CLEAR_MASK; |
863 | 909 | ||
864 | val = omap_readl(OMAP_DMA4_IRQSTATUS_L0); | 910 | val = omap_readl(OMAP_DMA4_IRQSTATUS_L0); |
865 | /* ch in this function is from 0-31 while in register it is 1-32 */ | 911 | /* ch in this function is from 0-31 while in register it is 1-32 */ |
diff --git a/arch/arm/plat-omap/dmtimer.c b/arch/arm/plat-omap/dmtimer.c index eba3cb52ad87..50524436de63 100644 --- a/arch/arm/plat-omap/dmtimer.c +++ b/arch/arm/plat-omap/dmtimer.c | |||
@@ -4,7 +4,8 @@ | |||
4 | * OMAP Dual-Mode Timers | 4 | * OMAP Dual-Mode Timers |
5 | * | 5 | * |
6 | * Copyright (C) 2005 Nokia Corporation | 6 | * Copyright (C) 2005 Nokia Corporation |
7 | * Author: Lauri Leukkunen <lauri.leukkunen@nokia.com> | 7 | * OMAP2 support by Juha Yrjola |
8 | * API improvements and OMAP2 clock framework support by Timo Teras | ||
8 | * | 9 | * |
9 | * This program is free software; you can redistribute it and/or modify it | 10 | * This program is free software; you can redistribute it and/or modify it |
10 | * under the terms of the GNU General Public License as published by the | 11 | * under the terms of the GNU General Public License as published by the |
@@ -26,15 +27,17 @@ | |||
26 | */ | 27 | */ |
27 | 28 | ||
28 | #include <linux/init.h> | 29 | #include <linux/init.h> |
30 | #include <linux/spinlock.h> | ||
31 | #include <linux/errno.h> | ||
32 | #include <linux/list.h> | ||
33 | #include <linux/clk.h> | ||
34 | #include <linux/delay.h> | ||
29 | #include <asm/hardware.h> | 35 | #include <asm/hardware.h> |
30 | #include <asm/arch/dmtimer.h> | 36 | #include <asm/arch/dmtimer.h> |
31 | #include <asm/io.h> | 37 | #include <asm/io.h> |
32 | #include <asm/arch/irqs.h> | 38 | #include <asm/arch/irqs.h> |
33 | #include <linux/spinlock.h> | ||
34 | #include <linux/list.h> | ||
35 | |||
36 | #define OMAP_TIMER_COUNT 8 | ||
37 | 39 | ||
40 | /* register offsets */ | ||
38 | #define OMAP_TIMER_ID_REG 0x00 | 41 | #define OMAP_TIMER_ID_REG 0x00 |
39 | #define OMAP_TIMER_OCP_CFG_REG 0x10 | 42 | #define OMAP_TIMER_OCP_CFG_REG 0x10 |
40 | #define OMAP_TIMER_SYS_STAT_REG 0x14 | 43 | #define OMAP_TIMER_SYS_STAT_REG 0x14 |
@@ -50,52 +53,196 @@ | |||
50 | #define OMAP_TIMER_CAPTURE_REG 0x3c | 53 | #define OMAP_TIMER_CAPTURE_REG 0x3c |
51 | #define OMAP_TIMER_IF_CTRL_REG 0x40 | 54 | #define OMAP_TIMER_IF_CTRL_REG 0x40 |
52 | 55 | ||
56 | /* timer control reg bits */ | ||
57 | #define OMAP_TIMER_CTRL_GPOCFG (1 << 14) | ||
58 | #define OMAP_TIMER_CTRL_CAPTMODE (1 << 13) | ||
59 | #define OMAP_TIMER_CTRL_PT (1 << 12) | ||
60 | #define OMAP_TIMER_CTRL_TCM_LOWTOHIGH (0x1 << 8) | ||
61 | #define OMAP_TIMER_CTRL_TCM_HIGHTOLOW (0x2 << 8) | ||
62 | #define OMAP_TIMER_CTRL_TCM_BOTHEDGES (0x3 << 8) | ||
63 | #define OMAP_TIMER_CTRL_SCPWM (1 << 7) | ||
64 | #define OMAP_TIMER_CTRL_CE (1 << 6) /* compare enable */ | ||
65 | #define OMAP_TIMER_CTRL_PRE (1 << 5) /* prescaler enable */ | ||
66 | #define OMAP_TIMER_CTRL_PTV_SHIFT 2 /* how much to shift the prescaler value */ | ||
67 | #define OMAP_TIMER_CTRL_AR (1 << 1) /* auto-reload enable */ | ||
68 | #define OMAP_TIMER_CTRL_ST (1 << 0) /* start timer */ | ||
69 | |||
70 | struct omap_dm_timer { | ||
71 | unsigned long phys_base; | ||
72 | int irq; | ||
73 | #ifdef CONFIG_ARCH_OMAP2 | ||
74 | struct clk *iclk, *fclk; | ||
75 | #endif | ||
76 | void __iomem *io_base; | ||
77 | unsigned reserved:1; | ||
78 | }; | ||
53 | 79 | ||
54 | static struct dmtimer_info_struct { | 80 | #ifdef CONFIG_ARCH_OMAP1 |
55 | struct list_head unused_timers; | ||
56 | struct list_head reserved_timers; | ||
57 | } dm_timer_info; | ||
58 | 81 | ||
59 | static struct omap_dm_timer dm_timers[] = { | 82 | static struct omap_dm_timer dm_timers[] = { |
60 | { .base=0xfffb1400, .irq=INT_1610_GPTIMER1 }, | 83 | { .phys_base = 0xfffb1400, .irq = INT_1610_GPTIMER1 }, |
61 | { .base=0xfffb1c00, .irq=INT_1610_GPTIMER2 }, | 84 | { .phys_base = 0xfffb1c00, .irq = INT_1610_GPTIMER2 }, |
62 | { .base=0xfffb2400, .irq=INT_1610_GPTIMER3 }, | 85 | { .phys_base = 0xfffb2400, .irq = INT_1610_GPTIMER3 }, |
63 | { .base=0xfffb2c00, .irq=INT_1610_GPTIMER4 }, | 86 | { .phys_base = 0xfffb2c00, .irq = INT_1610_GPTIMER4 }, |
64 | { .base=0xfffb3400, .irq=INT_1610_GPTIMER5 }, | 87 | { .phys_base = 0xfffb3400, .irq = INT_1610_GPTIMER5 }, |
65 | { .base=0xfffb3c00, .irq=INT_1610_GPTIMER6 }, | 88 | { .phys_base = 0xfffb3c00, .irq = INT_1610_GPTIMER6 }, |
66 | { .base=0xfffb4400, .irq=INT_1610_GPTIMER7 }, | 89 | { .phys_base = 0xfffb4400, .irq = INT_1610_GPTIMER7 }, |
67 | { .base=0xfffb4c00, .irq=INT_1610_GPTIMER8 }, | 90 | { .phys_base = 0xfffb4c00, .irq = INT_1610_GPTIMER8 }, |
68 | { .base=0x0 }, | ||
69 | }; | 91 | }; |
70 | 92 | ||
93 | #elif defined(CONFIG_ARCH_OMAP2) | ||
94 | |||
95 | static struct omap_dm_timer dm_timers[] = { | ||
96 | { .phys_base = 0x48028000, .irq = INT_24XX_GPTIMER1 }, | ||
97 | { .phys_base = 0x4802a000, .irq = INT_24XX_GPTIMER2 }, | ||
98 | { .phys_base = 0x48078000, .irq = INT_24XX_GPTIMER3 }, | ||
99 | { .phys_base = 0x4807a000, .irq = INT_24XX_GPTIMER4 }, | ||
100 | { .phys_base = 0x4807c000, .irq = INT_24XX_GPTIMER5 }, | ||
101 | { .phys_base = 0x4807e000, .irq = INT_24XX_GPTIMER6 }, | ||
102 | { .phys_base = 0x48080000, .irq = INT_24XX_GPTIMER7 }, | ||
103 | { .phys_base = 0x48082000, .irq = INT_24XX_GPTIMER8 }, | ||
104 | { .phys_base = 0x48084000, .irq = INT_24XX_GPTIMER9 }, | ||
105 | { .phys_base = 0x48086000, .irq = INT_24XX_GPTIMER10 }, | ||
106 | { .phys_base = 0x48088000, .irq = INT_24XX_GPTIMER11 }, | ||
107 | { .phys_base = 0x4808a000, .irq = INT_24XX_GPTIMER12 }, | ||
108 | }; | ||
109 | |||
110 | static const char *dm_source_names[] = { | ||
111 | "sys_ck", | ||
112 | "func_32k_ck", | ||
113 | "alt_ck" | ||
114 | }; | ||
71 | 115 | ||
116 | static struct clk *dm_source_clocks[3]; | ||
117 | |||
118 | #else | ||
119 | |||
120 | #error OMAP architecture not supported! | ||
121 | |||
122 | #endif | ||
123 | |||
124 | static const int dm_timer_count = ARRAY_SIZE(dm_timers); | ||
72 | static spinlock_t dm_timer_lock; | 125 | static spinlock_t dm_timer_lock; |
73 | 126 | ||
127 | static inline u32 omap_dm_timer_read_reg(struct omap_dm_timer *timer, int reg) | ||
128 | { | ||
129 | return readl(timer->io_base + reg); | ||
130 | } | ||
74 | 131 | ||
75 | inline void omap_dm_timer_write_reg(struct omap_dm_timer *timer, int reg, u32 value) | 132 | static void omap_dm_timer_write_reg(struct omap_dm_timer *timer, int reg, u32 value) |
76 | { | 133 | { |
77 | omap_writel(value, timer->base + reg); | 134 | writel(value, timer->io_base + reg); |
78 | while (omap_dm_timer_read_reg(timer, OMAP_TIMER_WRITE_PEND_REG)) | 135 | while (omap_dm_timer_read_reg(timer, OMAP_TIMER_WRITE_PEND_REG)) |
79 | ; | 136 | ; |
80 | } | 137 | } |
81 | 138 | ||
82 | u32 omap_dm_timer_read_reg(struct omap_dm_timer *timer, int reg) | 139 | static void omap_dm_timer_wait_for_reset(struct omap_dm_timer *timer) |
83 | { | 140 | { |
84 | return omap_readl(timer->base + reg); | 141 | int c; |
142 | |||
143 | c = 0; | ||
144 | while (!(omap_dm_timer_read_reg(timer, OMAP_TIMER_SYS_STAT_REG) & 1)) { | ||
145 | c++; | ||
146 | if (c > 100000) { | ||
147 | printk(KERN_ERR "Timer failed to reset\n"); | ||
148 | return; | ||
149 | } | ||
150 | } | ||
85 | } | 151 | } |
86 | 152 | ||
87 | int omap_dm_timers_active(void) | 153 | static void omap_dm_timer_reset(struct omap_dm_timer *timer) |
154 | { | ||
155 | u32 l; | ||
156 | |||
157 | if (timer != &dm_timers[0]) { | ||
158 | omap_dm_timer_write_reg(timer, OMAP_TIMER_IF_CTRL_REG, 0x06); | ||
159 | omap_dm_timer_wait_for_reset(timer); | ||
160 | } | ||
161 | omap_dm_timer_set_source(timer, OMAP_TIMER_SRC_SYS_CLK); | ||
162 | |||
163 | /* Set to smart-idle mode */ | ||
164 | l = omap_dm_timer_read_reg(timer, OMAP_TIMER_OCP_CFG_REG); | ||
165 | l |= 0x02 << 3; | ||
166 | omap_dm_timer_write_reg(timer, OMAP_TIMER_OCP_CFG_REG, l); | ||
167 | } | ||
168 | |||
169 | static void omap_dm_timer_prepare(struct omap_dm_timer *timer) | ||
170 | { | ||
171 | #ifdef CONFIG_ARCH_OMAP2 | ||
172 | clk_enable(timer->iclk); | ||
173 | clk_enable(timer->fclk); | ||
174 | #endif | ||
175 | omap_dm_timer_reset(timer); | ||
176 | } | ||
177 | |||
178 | struct omap_dm_timer *omap_dm_timer_request(void) | ||
179 | { | ||
180 | struct omap_dm_timer *timer = NULL; | ||
181 | unsigned long flags; | ||
182 | int i; | ||
183 | |||
184 | spin_lock_irqsave(&dm_timer_lock, flags); | ||
185 | for (i = 0; i < dm_timer_count; i++) { | ||
186 | if (dm_timers[i].reserved) | ||
187 | continue; | ||
188 | |||
189 | timer = &dm_timers[i]; | ||
190 | timer->reserved = 1; | ||
191 | break; | ||
192 | } | ||
193 | spin_unlock_irqrestore(&dm_timer_lock, flags); | ||
194 | |||
195 | if (timer != NULL) | ||
196 | omap_dm_timer_prepare(timer); | ||
197 | |||
198 | return timer; | ||
199 | } | ||
200 | |||
201 | struct omap_dm_timer *omap_dm_timer_request_specific(int id) | ||
88 | { | 202 | { |
89 | struct omap_dm_timer *timer; | 203 | struct omap_dm_timer *timer; |
204 | unsigned long flags; | ||
90 | 205 | ||
91 | for (timer = &dm_timers[0]; timer->base; ++timer) | 206 | spin_lock_irqsave(&dm_timer_lock, flags); |
92 | if (omap_dm_timer_read_reg(timer, OMAP_TIMER_CTRL_REG) & | 207 | if (id <= 0 || id > dm_timer_count || dm_timers[id-1].reserved) { |
93 | OMAP_TIMER_CTRL_ST) | 208 | spin_unlock_irqrestore(&dm_timer_lock, flags); |
94 | return 1; | 209 | printk("BUG: warning at %s:%d/%s(): unable to get timer %d\n", |
210 | __FILE__, __LINE__, __FUNCTION__, id); | ||
211 | dump_stack(); | ||
212 | return NULL; | ||
213 | } | ||
95 | 214 | ||
96 | return 0; | 215 | timer = &dm_timers[id-1]; |
216 | timer->reserved = 1; | ||
217 | spin_unlock_irqrestore(&dm_timer_lock, flags); | ||
218 | |||
219 | omap_dm_timer_prepare(timer); | ||
220 | |||
221 | return timer; | ||
97 | } | 222 | } |
98 | 223 | ||
224 | void omap_dm_timer_free(struct omap_dm_timer *timer) | ||
225 | { | ||
226 | omap_dm_timer_reset(timer); | ||
227 | #ifdef CONFIG_ARCH_OMAP2 | ||
228 | clk_disable(timer->iclk); | ||
229 | clk_disable(timer->fclk); | ||
230 | #endif | ||
231 | WARN_ON(!timer->reserved); | ||
232 | timer->reserved = 0; | ||
233 | } | ||
234 | |||
235 | int omap_dm_timer_get_irq(struct omap_dm_timer *timer) | ||
236 | { | ||
237 | return timer->irq; | ||
238 | } | ||
239 | |||
240 | #if defined(CONFIG_ARCH_OMAP1) | ||
241 | |||
242 | struct clk *omap_dm_timer_get_fclk(struct omap_dm_timer *timer) | ||
243 | { | ||
244 | BUG(); | ||
245 | } | ||
99 | 246 | ||
100 | /** | 247 | /** |
101 | * omap_dm_timer_modify_idlect_mask - Check if any running timers use ARMXOR | 248 | * omap_dm_timer_modify_idlect_mask - Check if any running timers use ARMXOR |
@@ -103,184 +250,229 @@ int omap_dm_timers_active(void) | |||
103 | */ | 250 | */ |
104 | __u32 omap_dm_timer_modify_idlect_mask(__u32 inputmask) | 251 | __u32 omap_dm_timer_modify_idlect_mask(__u32 inputmask) |
105 | { | 252 | { |
106 | int n; | 253 | int i; |
107 | 254 | ||
108 | /* If ARMXOR cannot be idled this function call is unnecessary */ | 255 | /* If ARMXOR cannot be idled this function call is unnecessary */ |
109 | if (!(inputmask & (1 << 1))) | 256 | if (!(inputmask & (1 << 1))) |
110 | return inputmask; | 257 | return inputmask; |
111 | 258 | ||
112 | /* If any active timer is using ARMXOR return modified mask */ | 259 | /* If any active timer is using ARMXOR return modified mask */ |
113 | for (n = 0; dm_timers[n].base; ++n) | 260 | for (i = 0; i < dm_timer_count; i++) { |
114 | if (omap_dm_timer_read_reg(&dm_timers[n], OMAP_TIMER_CTRL_REG)& | 261 | u32 l; |
115 | OMAP_TIMER_CTRL_ST) { | 262 | |
116 | if (((omap_readl(MOD_CONF_CTRL_1)>>(n*2)) & 0x03) == 0) | 263 | l = omap_dm_timer_read_reg(&dm_timers[i], OMAP_TIMER_CTRL_REG); |
264 | if (l & OMAP_TIMER_CTRL_ST) { | ||
265 | if (((omap_readl(MOD_CONF_CTRL_1) >> (i * 2)) & 0x03) == 0) | ||
117 | inputmask &= ~(1 << 1); | 266 | inputmask &= ~(1 << 1); |
118 | else | 267 | else |
119 | inputmask &= ~(1 << 2); | 268 | inputmask &= ~(1 << 2); |
120 | } | 269 | } |
270 | } | ||
121 | 271 | ||
122 | return inputmask; | 272 | return inputmask; |
123 | } | 273 | } |
124 | 274 | ||
275 | #elif defined(CONFIG_ARCH_OMAP2) | ||
125 | 276 | ||
126 | void omap_dm_timer_set_source(struct omap_dm_timer *timer, int source) | 277 | struct clk *omap_dm_timer_get_fclk(struct omap_dm_timer *timer) |
127 | { | 278 | { |
128 | int n = (timer - dm_timers) << 1; | 279 | return timer->fclk; |
129 | u32 l; | 280 | } |
130 | 281 | ||
131 | l = omap_readl(MOD_CONF_CTRL_1) & ~(0x03 << n); | 282 | __u32 omap_dm_timer_modify_idlect_mask(__u32 inputmask) |
132 | l |= source << n; | 283 | { |
133 | omap_writel(l, MOD_CONF_CTRL_1); | 284 | BUG(); |
134 | } | 285 | } |
135 | 286 | ||
287 | #endif | ||
136 | 288 | ||
137 | static void omap_dm_timer_reset(struct omap_dm_timer *timer) | 289 | void omap_dm_timer_trigger(struct omap_dm_timer *timer) |
138 | { | 290 | { |
139 | /* Reset and set posted mode */ | 291 | omap_dm_timer_write_reg(timer, OMAP_TIMER_TRIGGER_REG, 0); |
140 | omap_dm_timer_write_reg(timer, OMAP_TIMER_IF_CTRL_REG, 0x06); | ||
141 | omap_dm_timer_write_reg(timer, OMAP_TIMER_OCP_CFG_REG, 0x02); | ||
142 | |||
143 | omap_dm_timer_set_source(timer, OMAP_TIMER_SRC_ARMXOR); | ||
144 | } | 292 | } |
145 | 293 | ||
294 | void omap_dm_timer_start(struct omap_dm_timer *timer) | ||
295 | { | ||
296 | u32 l; | ||
146 | 297 | ||
298 | l = omap_dm_timer_read_reg(timer, OMAP_TIMER_CTRL_REG); | ||
299 | if (!(l & OMAP_TIMER_CTRL_ST)) { | ||
300 | l |= OMAP_TIMER_CTRL_ST; | ||
301 | omap_dm_timer_write_reg(timer, OMAP_TIMER_CTRL_REG, l); | ||
302 | } | ||
303 | } | ||
147 | 304 | ||
148 | struct omap_dm_timer * omap_dm_timer_request(void) | 305 | void omap_dm_timer_stop(struct omap_dm_timer *timer) |
149 | { | 306 | { |
150 | struct omap_dm_timer *timer = NULL; | 307 | u32 l; |
151 | unsigned long flags; | ||
152 | 308 | ||
153 | spin_lock_irqsave(&dm_timer_lock, flags); | 309 | l = omap_dm_timer_read_reg(timer, OMAP_TIMER_CTRL_REG); |
154 | if (!list_empty(&dm_timer_info.unused_timers)) { | 310 | if (l & OMAP_TIMER_CTRL_ST) { |
155 | timer = (struct omap_dm_timer *) | 311 | l &= ~0x1; |
156 | dm_timer_info.unused_timers.next; | 312 | omap_dm_timer_write_reg(timer, OMAP_TIMER_CTRL_REG, l); |
157 | list_move_tail((struct list_head *)timer, | ||
158 | &dm_timer_info.reserved_timers); | ||
159 | } | 313 | } |
160 | spin_unlock_irqrestore(&dm_timer_lock, flags); | ||
161 | |||
162 | return timer; | ||
163 | } | 314 | } |
164 | 315 | ||
316 | #ifdef CONFIG_ARCH_OMAP1 | ||
165 | 317 | ||
166 | void omap_dm_timer_free(struct omap_dm_timer *timer) | 318 | void omap_dm_timer_set_source(struct omap_dm_timer *timer, int source) |
167 | { | 319 | { |
168 | unsigned long flags; | 320 | int n = (timer - dm_timers) << 1; |
169 | 321 | u32 l; | |
170 | omap_dm_timer_reset(timer); | ||
171 | 322 | ||
172 | spin_lock_irqsave(&dm_timer_lock, flags); | 323 | l = omap_readl(MOD_CONF_CTRL_1) & ~(0x03 << n); |
173 | list_move_tail((struct list_head *)timer, &dm_timer_info.unused_timers); | 324 | l |= source << n; |
174 | spin_unlock_irqrestore(&dm_timer_lock, flags); | 325 | omap_writel(l, MOD_CONF_CTRL_1); |
175 | } | 326 | } |
176 | 327 | ||
177 | void omap_dm_timer_set_int_enable(struct omap_dm_timer *timer, | 328 | #else |
178 | unsigned int value) | ||
179 | { | ||
180 | omap_dm_timer_write_reg(timer, OMAP_TIMER_INT_EN_REG, value); | ||
181 | } | ||
182 | 329 | ||
183 | unsigned int omap_dm_timer_read_status(struct omap_dm_timer *timer) | 330 | void omap_dm_timer_set_source(struct omap_dm_timer *timer, int source) |
184 | { | 331 | { |
185 | return omap_dm_timer_read_reg(timer, OMAP_TIMER_STAT_REG); | 332 | if (source < 0 || source >= 3) |
186 | } | 333 | return; |
187 | 334 | ||
188 | void omap_dm_timer_write_status(struct omap_dm_timer *timer, unsigned int value) | 335 | clk_disable(timer->fclk); |
189 | { | 336 | clk_set_parent(timer->fclk, dm_source_clocks[source]); |
190 | omap_dm_timer_write_reg(timer, OMAP_TIMER_STAT_REG, value); | 337 | clk_enable(timer->fclk); |
338 | |||
339 | /* When the functional clock disappears, too quick writes seem to | ||
340 | * cause an abort. */ | ||
341 | __delay(15000); | ||
191 | } | 342 | } |
192 | 343 | ||
193 | void omap_dm_timer_enable_autoreload(struct omap_dm_timer *timer) | 344 | #endif |
345 | |||
346 | void omap_dm_timer_set_load(struct omap_dm_timer *timer, int autoreload, | ||
347 | unsigned int load) | ||
194 | { | 348 | { |
195 | u32 l; | 349 | u32 l; |
350 | |||
196 | l = omap_dm_timer_read_reg(timer, OMAP_TIMER_CTRL_REG); | 351 | l = omap_dm_timer_read_reg(timer, OMAP_TIMER_CTRL_REG); |
197 | l |= OMAP_TIMER_CTRL_AR; | 352 | if (autoreload) |
353 | l |= OMAP_TIMER_CTRL_AR; | ||
354 | else | ||
355 | l &= ~OMAP_TIMER_CTRL_AR; | ||
198 | omap_dm_timer_write_reg(timer, OMAP_TIMER_CTRL_REG, l); | 356 | omap_dm_timer_write_reg(timer, OMAP_TIMER_CTRL_REG, l); |
357 | omap_dm_timer_write_reg(timer, OMAP_TIMER_LOAD_REG, load); | ||
358 | omap_dm_timer_write_reg(timer, OMAP_TIMER_TRIGGER_REG, 0); | ||
199 | } | 359 | } |
200 | 360 | ||
201 | void omap_dm_timer_trigger(struct omap_dm_timer *timer) | 361 | void omap_dm_timer_set_match(struct omap_dm_timer *timer, int enable, |
202 | { | 362 | unsigned int match) |
203 | omap_dm_timer_write_reg(timer, OMAP_TIMER_TRIGGER_REG, 1); | ||
204 | } | ||
205 | |||
206 | void omap_dm_timer_set_trigger(struct omap_dm_timer *timer, unsigned int value) | ||
207 | { | 363 | { |
208 | u32 l; | 364 | u32 l; |
209 | 365 | ||
210 | l = omap_dm_timer_read_reg(timer, OMAP_TIMER_CTRL_REG); | 366 | l = omap_dm_timer_read_reg(timer, OMAP_TIMER_CTRL_REG); |
211 | l |= value & 0x3; | 367 | if (enable) |
368 | l |= OMAP_TIMER_CTRL_CE; | ||
369 | else | ||
370 | l &= ~OMAP_TIMER_CTRL_CE; | ||
212 | omap_dm_timer_write_reg(timer, OMAP_TIMER_CTRL_REG, l); | 371 | omap_dm_timer_write_reg(timer, OMAP_TIMER_CTRL_REG, l); |
372 | omap_dm_timer_write_reg(timer, OMAP_TIMER_MATCH_REG, match); | ||
213 | } | 373 | } |
214 | 374 | ||
215 | void omap_dm_timer_start(struct omap_dm_timer *timer) | 375 | |
376 | void omap_dm_timer_set_pwm(struct omap_dm_timer *timer, int def_on, | ||
377 | int toggle, int trigger) | ||
216 | { | 378 | { |
217 | u32 l; | 379 | u32 l; |
218 | 380 | ||
219 | l = omap_dm_timer_read_reg(timer, OMAP_TIMER_CTRL_REG); | 381 | l = omap_dm_timer_read_reg(timer, OMAP_TIMER_CTRL_REG); |
220 | l |= OMAP_TIMER_CTRL_ST; | 382 | l &= ~(OMAP_TIMER_CTRL_GPOCFG | OMAP_TIMER_CTRL_SCPWM | |
383 | OMAP_TIMER_CTRL_PT | (0x03 << 10)); | ||
384 | if (def_on) | ||
385 | l |= OMAP_TIMER_CTRL_SCPWM; | ||
386 | if (toggle) | ||
387 | l |= OMAP_TIMER_CTRL_PT; | ||
388 | l |= trigger << 10; | ||
221 | omap_dm_timer_write_reg(timer, OMAP_TIMER_CTRL_REG, l); | 389 | omap_dm_timer_write_reg(timer, OMAP_TIMER_CTRL_REG, l); |
222 | } | 390 | } |
223 | 391 | ||
224 | void omap_dm_timer_stop(struct omap_dm_timer *timer) | 392 | void omap_dm_timer_set_prescaler(struct omap_dm_timer *timer, int prescaler) |
225 | { | 393 | { |
226 | u32 l; | 394 | u32 l; |
227 | 395 | ||
228 | l = omap_dm_timer_read_reg(timer, OMAP_TIMER_CTRL_REG); | 396 | l = omap_dm_timer_read_reg(timer, OMAP_TIMER_CTRL_REG); |
229 | l &= ~0x1; | 397 | l &= ~(OMAP_TIMER_CTRL_PRE | (0x07 << 2)); |
398 | if (prescaler >= 0x00 && prescaler <= 0x07) { | ||
399 | l |= OMAP_TIMER_CTRL_PRE; | ||
400 | l |= prescaler << 2; | ||
401 | } | ||
230 | omap_dm_timer_write_reg(timer, OMAP_TIMER_CTRL_REG, l); | 402 | omap_dm_timer_write_reg(timer, OMAP_TIMER_CTRL_REG, l); |
231 | } | 403 | } |
232 | 404 | ||
233 | unsigned int omap_dm_timer_read_counter(struct omap_dm_timer *timer) | 405 | void omap_dm_timer_set_int_enable(struct omap_dm_timer *timer, |
406 | unsigned int value) | ||
234 | { | 407 | { |
235 | return omap_dm_timer_read_reg(timer, OMAP_TIMER_COUNTER_REG); | 408 | omap_dm_timer_write_reg(timer, OMAP_TIMER_INT_EN_REG, value); |
236 | } | 409 | } |
237 | 410 | ||
238 | void omap_dm_timer_reset_counter(struct omap_dm_timer *timer) | 411 | unsigned int omap_dm_timer_read_status(struct omap_dm_timer *timer) |
239 | { | 412 | { |
240 | omap_dm_timer_write_reg(timer, OMAP_TIMER_COUNTER_REG, 0); | 413 | return omap_dm_timer_read_reg(timer, OMAP_TIMER_STAT_REG); |
241 | } | 414 | } |
242 | 415 | ||
243 | void omap_dm_timer_set_load(struct omap_dm_timer *timer, unsigned int load) | 416 | void omap_dm_timer_write_status(struct omap_dm_timer *timer, unsigned int value) |
244 | { | 417 | { |
245 | omap_dm_timer_write_reg(timer, OMAP_TIMER_LOAD_REG, load); | 418 | omap_dm_timer_write_reg(timer, OMAP_TIMER_STAT_REG, value); |
246 | } | 419 | } |
247 | 420 | ||
248 | void omap_dm_timer_set_match(struct omap_dm_timer *timer, unsigned int match) | 421 | unsigned int omap_dm_timer_read_counter(struct omap_dm_timer *timer) |
249 | { | 422 | { |
250 | omap_dm_timer_write_reg(timer, OMAP_TIMER_MATCH_REG, match); | 423 | return omap_dm_timer_read_reg(timer, OMAP_TIMER_COUNTER_REG); |
251 | } | 424 | } |
252 | 425 | ||
253 | void omap_dm_timer_enable_compare(struct omap_dm_timer *timer) | 426 | void omap_dm_timer_write_counter(struct omap_dm_timer *timer, unsigned int value) |
254 | { | 427 | { |
255 | u32 l; | 428 | return omap_dm_timer_write_reg(timer, OMAP_TIMER_COUNTER_REG, value); |
256 | |||
257 | l = omap_dm_timer_read_reg(timer, OMAP_TIMER_CTRL_REG); | ||
258 | l |= OMAP_TIMER_CTRL_CE; | ||
259 | omap_dm_timer_write_reg(timer, OMAP_TIMER_CTRL_REG, l); | ||
260 | } | 429 | } |
261 | 430 | ||
431 | int omap_dm_timers_active(void) | ||
432 | { | ||
433 | int i; | ||
434 | |||
435 | for (i = 0; i < dm_timer_count; i++) { | ||
436 | struct omap_dm_timer *timer; | ||
437 | |||
438 | timer = &dm_timers[i]; | ||
439 | if (omap_dm_timer_read_reg(timer, OMAP_TIMER_CTRL_REG) & | ||
440 | OMAP_TIMER_CTRL_ST) | ||
441 | return 1; | ||
442 | } | ||
443 | return 0; | ||
444 | } | ||
262 | 445 | ||
263 | static inline void __dm_timer_init(void) | 446 | int omap_dm_timer_init(void) |
264 | { | 447 | { |
265 | struct omap_dm_timer *timer; | 448 | struct omap_dm_timer *timer; |
449 | int i; | ||
450 | |||
451 | if (!(cpu_is_omap16xx() || cpu_is_omap24xx())) | ||
452 | return -ENODEV; | ||
266 | 453 | ||
267 | spin_lock_init(&dm_timer_lock); | 454 | spin_lock_init(&dm_timer_lock); |
268 | INIT_LIST_HEAD(&dm_timer_info.unused_timers); | 455 | #ifdef CONFIG_ARCH_OMAP2 |
269 | INIT_LIST_HEAD(&dm_timer_info.reserved_timers); | 456 | for (i = 0; i < ARRAY_SIZE(dm_source_names); i++) { |
270 | 457 | dm_source_clocks[i] = clk_get(NULL, dm_source_names[i]); | |
271 | timer = &dm_timers[0]; | 458 | BUG_ON(dm_source_clocks[i] == NULL); |
272 | while (timer->base) { | 459 | } |
273 | list_add_tail((struct list_head *)timer, &dm_timer_info.unused_timers); | 460 | #endif |
274 | omap_dm_timer_reset(timer); | 461 | |
275 | timer++; | 462 | for (i = 0; i < dm_timer_count; i++) { |
463 | #ifdef CONFIG_ARCH_OMAP2 | ||
464 | char clk_name[16]; | ||
465 | #endif | ||
466 | |||
467 | timer = &dm_timers[i]; | ||
468 | timer->io_base = (void __iomem *) io_p2v(timer->phys_base); | ||
469 | #ifdef CONFIG_ARCH_OMAP2 | ||
470 | sprintf(clk_name, "gpt%d_ick", i + 1); | ||
471 | timer->iclk = clk_get(NULL, clk_name); | ||
472 | sprintf(clk_name, "gpt%d_fck", i + 1); | ||
473 | timer->fclk = clk_get(NULL, clk_name); | ||
474 | #endif | ||
276 | } | 475 | } |
277 | } | ||
278 | 476 | ||
279 | static int __init omap_dm_timer_init(void) | ||
280 | { | ||
281 | if (cpu_is_omap16xx()) | ||
282 | __dm_timer_init(); | ||
283 | return 0; | 477 | return 0; |
284 | } | 478 | } |
285 | |||
286 | arch_initcall(omap_dm_timer_init); | ||
diff --git a/arch/arm/plat-omap/gpio.c b/arch/arm/plat-omap/gpio.c index 312ace515d17..cb0c21d384c0 100644 --- a/arch/arm/plat-omap/gpio.c +++ b/arch/arm/plat-omap/gpio.c | |||
@@ -536,6 +536,49 @@ static inline void _clear_gpio_irqstatus(struct gpio_bank *bank, int gpio) | |||
536 | _clear_gpio_irqbank(bank, 1 << get_gpio_index(gpio)); | 536 | _clear_gpio_irqbank(bank, 1 << get_gpio_index(gpio)); |
537 | } | 537 | } |
538 | 538 | ||
539 | static u32 _get_gpio_irqbank_mask(struct gpio_bank *bank) | ||
540 | { | ||
541 | void __iomem *reg = bank->base; | ||
542 | int inv = 0; | ||
543 | u32 l; | ||
544 | u32 mask; | ||
545 | |||
546 | switch (bank->method) { | ||
547 | case METHOD_MPUIO: | ||
548 | reg += OMAP_MPUIO_GPIO_MASKIT; | ||
549 | mask = 0xffff; | ||
550 | inv = 1; | ||
551 | break; | ||
552 | case METHOD_GPIO_1510: | ||
553 | reg += OMAP1510_GPIO_INT_MASK; | ||
554 | mask = 0xffff; | ||
555 | inv = 1; | ||
556 | break; | ||
557 | case METHOD_GPIO_1610: | ||
558 | reg += OMAP1610_GPIO_IRQENABLE1; | ||
559 | mask = 0xffff; | ||
560 | break; | ||
561 | case METHOD_GPIO_730: | ||
562 | reg += OMAP730_GPIO_INT_MASK; | ||
563 | mask = 0xffffffff; | ||
564 | inv = 1; | ||
565 | break; | ||
566 | case METHOD_GPIO_24XX: | ||
567 | reg += OMAP24XX_GPIO_IRQENABLE1; | ||
568 | mask = 0xffffffff; | ||
569 | break; | ||
570 | default: | ||
571 | BUG(); | ||
572 | return 0; | ||
573 | } | ||
574 | |||
575 | l = __raw_readl(reg); | ||
576 | if (inv) | ||
577 | l = ~l; | ||
578 | l &= mask; | ||
579 | return l; | ||
580 | } | ||
581 | |||
539 | static void _enable_gpio_irqbank(struct gpio_bank *bank, int gpio_mask, int enable) | 582 | static void _enable_gpio_irqbank(struct gpio_bank *bank, int gpio_mask, int enable) |
540 | { | 583 | { |
541 | void __iomem *reg = bank->base; | 584 | void __iomem *reg = bank->base; |
@@ -735,6 +778,8 @@ static void gpio_irq_handler(unsigned int irq, struct irqdesc *desc, | |||
735 | u32 isr; | 778 | u32 isr; |
736 | unsigned int gpio_irq; | 779 | unsigned int gpio_irq; |
737 | struct gpio_bank *bank; | 780 | struct gpio_bank *bank; |
781 | u32 retrigger = 0; | ||
782 | int unmasked = 0; | ||
738 | 783 | ||
739 | desc->chip->ack(irq); | 784 | desc->chip->ack(irq); |
740 | 785 | ||
@@ -759,18 +804,22 @@ static void gpio_irq_handler(unsigned int irq, struct irqdesc *desc, | |||
759 | #endif | 804 | #endif |
760 | while(1) { | 805 | while(1) { |
761 | u32 isr_saved, level_mask = 0; | 806 | u32 isr_saved, level_mask = 0; |
807 | u32 enabled; | ||
762 | 808 | ||
763 | isr_saved = isr = __raw_readl(isr_reg); | 809 | enabled = _get_gpio_irqbank_mask(bank); |
810 | isr_saved = isr = __raw_readl(isr_reg) & enabled; | ||
764 | 811 | ||
765 | if (cpu_is_omap15xx() && (bank->method == METHOD_MPUIO)) | 812 | if (cpu_is_omap15xx() && (bank->method == METHOD_MPUIO)) |
766 | isr &= 0x0000ffff; | 813 | isr &= 0x0000ffff; |
767 | 814 | ||
768 | if (cpu_is_omap24xx()) | 815 | if (cpu_is_omap24xx()) { |
769 | level_mask = | 816 | level_mask = |
770 | __raw_readl(bank->base + | 817 | __raw_readl(bank->base + |
771 | OMAP24XX_GPIO_LEVELDETECT0) | | 818 | OMAP24XX_GPIO_LEVELDETECT0) | |
772 | __raw_readl(bank->base + | 819 | __raw_readl(bank->base + |
773 | OMAP24XX_GPIO_LEVELDETECT1); | 820 | OMAP24XX_GPIO_LEVELDETECT1); |
821 | level_mask &= enabled; | ||
822 | } | ||
774 | 823 | ||
775 | /* clear edge sensitive interrupts before handler(s) are | 824 | /* clear edge sensitive interrupts before handler(s) are |
776 | called so that we don't miss any interrupt occurred while | 825 | called so that we don't miss any interrupt occurred while |
@@ -781,19 +830,54 @@ static void gpio_irq_handler(unsigned int irq, struct irqdesc *desc, | |||
781 | 830 | ||
782 | /* if there is only edge sensitive GPIO pin interrupts | 831 | /* if there is only edge sensitive GPIO pin interrupts |
783 | configured, we could unmask GPIO bank interrupt immediately */ | 832 | configured, we could unmask GPIO bank interrupt immediately */ |
784 | if (!level_mask) | 833 | if (!level_mask && !unmasked) { |
834 | unmasked = 1; | ||
785 | desc->chip->unmask(irq); | 835 | desc->chip->unmask(irq); |
836 | } | ||
786 | 837 | ||
838 | isr |= retrigger; | ||
839 | retrigger = 0; | ||
787 | if (!isr) | 840 | if (!isr) |
788 | break; | 841 | break; |
789 | 842 | ||
790 | gpio_irq = bank->virtual_irq_start; | 843 | gpio_irq = bank->virtual_irq_start; |
791 | for (; isr != 0; isr >>= 1, gpio_irq++) { | 844 | for (; isr != 0; isr >>= 1, gpio_irq++) { |
792 | struct irqdesc *d; | 845 | struct irqdesc *d; |
846 | int irq_mask; | ||
793 | if (!(isr & 1)) | 847 | if (!(isr & 1)) |
794 | continue; | 848 | continue; |
795 | d = irq_desc + gpio_irq; | 849 | d = irq_desc + gpio_irq; |
850 | /* Don't run the handler if it's already running | ||
851 | * or was disabled lazely. | ||
852 | */ | ||
853 | if (unlikely((d->disable_depth || d->running))) { | ||
854 | irq_mask = 1 << | ||
855 | (gpio_irq - bank->virtual_irq_start); | ||
856 | /* The unmasking will be done by | ||
857 | * enable_irq in case it is disabled or | ||
858 | * after returning from the handler if | ||
859 | * it's already running. | ||
860 | */ | ||
861 | _enable_gpio_irqbank(bank, irq_mask, 0); | ||
862 | if (!d->disable_depth) { | ||
863 | /* Level triggered interrupts | ||
864 | * won't ever be reentered | ||
865 | */ | ||
866 | BUG_ON(level_mask & irq_mask); | ||
867 | d->pending = 1; | ||
868 | } | ||
869 | continue; | ||
870 | } | ||
871 | d->running = 1; | ||
796 | desc_handle_irq(gpio_irq, d, regs); | 872 | desc_handle_irq(gpio_irq, d, regs); |
873 | d->running = 0; | ||
874 | if (unlikely(d->pending && !d->disable_depth)) { | ||
875 | irq_mask = 1 << | ||
876 | (gpio_irq - bank->virtual_irq_start); | ||
877 | d->pending = 0; | ||
878 | _enable_gpio_irqbank(bank, irq_mask, 1); | ||
879 | retrigger |= irq_mask; | ||
880 | } | ||
797 | } | 881 | } |
798 | 882 | ||
799 | if (cpu_is_omap24xx()) { | 883 | if (cpu_is_omap24xx()) { |
@@ -803,13 +887,14 @@ static void gpio_irq_handler(unsigned int irq, struct irqdesc *desc, | |||
803 | _enable_gpio_irqbank(bank, isr_saved & level_mask, 1); | 887 | _enable_gpio_irqbank(bank, isr_saved & level_mask, 1); |
804 | } | 888 | } |
805 | 889 | ||
806 | /* if bank has any level sensitive GPIO pin interrupt | ||
807 | configured, we must unmask the bank interrupt only after | ||
808 | handler(s) are executed in order to avoid spurious bank | ||
809 | interrupt */ | ||
810 | if (level_mask) | ||
811 | desc->chip->unmask(irq); | ||
812 | } | 890 | } |
891 | /* if bank has any level sensitive GPIO pin interrupt | ||
892 | configured, we must unmask the bank interrupt only after | ||
893 | handler(s) are executed in order to avoid spurious bank | ||
894 | interrupt */ | ||
895 | if (!unmasked) | ||
896 | desc->chip->unmask(irq); | ||
897 | |||
813 | } | 898 | } |
814 | 899 | ||
815 | static void gpio_ack_irq(unsigned int irq) | 900 | static void gpio_ack_irq(unsigned int irq) |
diff --git a/arch/arm/plat-omap/sram.c b/arch/arm/plat-omap/sram.c index 72ce52ce815b..e75718301b0f 100644 --- a/arch/arm/plat-omap/sram.c +++ b/arch/arm/plat-omap/sram.c | |||
@@ -157,14 +157,12 @@ static struct map_desc omap_sram_io_desc[] __initdata = { | |||
157 | { /* .length gets filled in at runtime */ | 157 | { /* .length gets filled in at runtime */ |
158 | .virtual = OMAP1_SRAM_VA, | 158 | .virtual = OMAP1_SRAM_VA, |
159 | .pfn = __phys_to_pfn(OMAP1_SRAM_PA), | 159 | .pfn = __phys_to_pfn(OMAP1_SRAM_PA), |
160 | .type = MT_DEVICE | 160 | .type = MT_MEMORY |
161 | } | 161 | } |
162 | }; | 162 | }; |
163 | 163 | ||
164 | /* | 164 | /* |
165 | * In order to use last 2kB of SRAM on 1611b, we must round the size | 165 | * Note that we cannot use ioremap for SRAM, as clock init needs SRAM early. |
166 | * up to multiple of PAGE_SIZE. We cannot use ioremap for SRAM, as | ||
167 | * clock init needs SRAM early. | ||
168 | */ | 166 | */ |
169 | void __init omap_map_sram(void) | 167 | void __init omap_map_sram(void) |
170 | { | 168 | { |
@@ -184,8 +182,7 @@ void __init omap_map_sram(void) | |||
184 | omap_sram_io_desc[0].pfn = __phys_to_pfn(base); | 182 | omap_sram_io_desc[0].pfn = __phys_to_pfn(base); |
185 | } | 183 | } |
186 | 184 | ||
187 | omap_sram_io_desc[0].length = (omap_sram_size + PAGE_SIZE-1)/PAGE_SIZE; | 185 | omap_sram_io_desc[0].length = 1024 * 1024; /* Use section desc */ |
188 | omap_sram_io_desc[0].length *= PAGE_SIZE; | ||
189 | iotable_init(omap_sram_io_desc, ARRAY_SIZE(omap_sram_io_desc)); | 186 | iotable_init(omap_sram_io_desc, ARRAY_SIZE(omap_sram_io_desc)); |
190 | 187 | ||
191 | printk(KERN_INFO "SRAM: Mapped pa 0x%08lx to va 0x%08lx size: 0x%lx\n", | 188 | printk(KERN_INFO "SRAM: Mapped pa 0x%08lx to va 0x%08lx size: 0x%lx\n", |
diff --git a/arch/arm/plat-omap/timer32k.c b/arch/arm/plat-omap/timer32k.c index 053c18132ef4..ddf4360dea72 100644 --- a/arch/arm/plat-omap/timer32k.c +++ b/arch/arm/plat-omap/timer32k.c | |||
@@ -7,6 +7,7 @@ | |||
7 | * Partial timer rewrite and additional dynamic tick timer support by | 7 | * Partial timer rewrite and additional dynamic tick timer support by |
8 | * Tony Lindgen <tony@atomide.com> and | 8 | * Tony Lindgen <tony@atomide.com> and |
9 | * Tuukka Tikkanen <tuukka.tikkanen@elektrobit.com> | 9 | * Tuukka Tikkanen <tuukka.tikkanen@elektrobit.com> |
10 | * OMAP Dual-mode timer framework support by Timo Teras | ||
10 | * | 11 | * |
11 | * MPU timer code based on the older MPU timer code for OMAP | 12 | * MPU timer code based on the older MPU timer code for OMAP |
12 | * Copyright (C) 2000 RidgeRun, Inc. | 13 | * Copyright (C) 2000 RidgeRun, Inc. |
@@ -49,6 +50,7 @@ | |||
49 | #include <asm/irq.h> | 50 | #include <asm/irq.h> |
50 | #include <asm/mach/irq.h> | 51 | #include <asm/mach/irq.h> |
51 | #include <asm/mach/time.h> | 52 | #include <asm/mach/time.h> |
53 | #include <asm/arch/dmtimer.h> | ||
52 | 54 | ||
53 | struct sys_timer omap_timer; | 55 | struct sys_timer omap_timer; |
54 | 56 | ||
@@ -78,18 +80,6 @@ struct sys_timer omap_timer; | |||
78 | #define OMAP1_32K_TIMER_TVR 0x00 | 80 | #define OMAP1_32K_TIMER_TVR 0x00 |
79 | #define OMAP1_32K_TIMER_TCR 0x04 | 81 | #define OMAP1_32K_TIMER_TCR 0x04 |
80 | 82 | ||
81 | /* 24xx specific defines */ | ||
82 | #define OMAP2_GP_TIMER_BASE 0x48028000 | ||
83 | #define CM_CLKSEL_WKUP 0x48008440 | ||
84 | #define GP_TIMER_TIDR 0x00 | ||
85 | #define GP_TIMER_TISR 0x18 | ||
86 | #define GP_TIMER_TIER 0x1c | ||
87 | #define GP_TIMER_TCLR 0x24 | ||
88 | #define GP_TIMER_TCRR 0x28 | ||
89 | #define GP_TIMER_TLDR 0x2c | ||
90 | #define GP_TIMER_TTGR 0x30 | ||
91 | #define GP_TIMER_TSICR 0x40 | ||
92 | |||
93 | #define OMAP_32K_TICKS_PER_HZ (32768 / HZ) | 83 | #define OMAP_32K_TICKS_PER_HZ (32768 / HZ) |
94 | 84 | ||
95 | /* | 85 | /* |
@@ -101,54 +91,62 @@ struct sys_timer omap_timer; | |||
101 | #define JIFFIES_TO_HW_TICKS(nr_jiffies, clock_rate) \ | 91 | #define JIFFIES_TO_HW_TICKS(nr_jiffies, clock_rate) \ |
102 | (((nr_jiffies) * (clock_rate)) / HZ) | 92 | (((nr_jiffies) * (clock_rate)) / HZ) |
103 | 93 | ||
94 | #if defined(CONFIG_ARCH_OMAP1) | ||
95 | |||
104 | static inline void omap_32k_timer_write(int val, int reg) | 96 | static inline void omap_32k_timer_write(int val, int reg) |
105 | { | 97 | { |
106 | if (cpu_class_is_omap1()) | 98 | omap_writew(val, OMAP1_32K_TIMER_BASE + reg); |
107 | omap_writew(val, OMAP1_32K_TIMER_BASE + reg); | ||
108 | |||
109 | if (cpu_is_omap24xx()) | ||
110 | omap_writel(val, OMAP2_GP_TIMER_BASE + reg); | ||
111 | } | 99 | } |
112 | 100 | ||
113 | static inline unsigned long omap_32k_timer_read(int reg) | 101 | static inline unsigned long omap_32k_timer_read(int reg) |
114 | { | 102 | { |
115 | if (cpu_class_is_omap1()) | 103 | return omap_readl(OMAP1_32K_TIMER_BASE + reg) & 0xffffff; |
116 | return omap_readl(OMAP1_32K_TIMER_BASE + reg) & 0xffffff; | 104 | } |
117 | 105 | ||
118 | if (cpu_is_omap24xx()) | 106 | static inline void omap_32k_timer_start(unsigned long load_val) |
119 | return omap_readl(OMAP2_GP_TIMER_BASE + reg); | 107 | { |
108 | omap_32k_timer_write(load_val, OMAP1_32K_TIMER_TVR); | ||
109 | omap_32k_timer_write(0x0f, OMAP1_32K_TIMER_CR); | ||
120 | } | 110 | } |
121 | 111 | ||
122 | /* | 112 | static inline void omap_32k_timer_stop(void) |
123 | * The 32KHz synchronized timer is an additional timer on 16xx. | ||
124 | * It is always running. | ||
125 | */ | ||
126 | static inline unsigned long omap_32k_sync_timer_read(void) | ||
127 | { | 113 | { |
128 | return omap_readl(TIMER_32K_SYNCHRONIZED); | 114 | omap_32k_timer_write(0x0, OMAP1_32K_TIMER_CR); |
129 | } | 115 | } |
130 | 116 | ||
117 | #define omap_32k_timer_ack_irq() | ||
118 | |||
119 | #elif defined(CONFIG_ARCH_OMAP2) | ||
120 | |||
121 | static struct omap_dm_timer *gptimer; | ||
122 | |||
131 | static inline void omap_32k_timer_start(unsigned long load_val) | 123 | static inline void omap_32k_timer_start(unsigned long load_val) |
132 | { | 124 | { |
133 | if (cpu_class_is_omap1()) { | 125 | omap_dm_timer_set_load(gptimer, 1, 0xffffffff - load_val); |
134 | omap_32k_timer_write(load_val, OMAP1_32K_TIMER_TVR); | 126 | omap_dm_timer_set_int_enable(gptimer, OMAP_TIMER_INT_OVERFLOW); |
135 | omap_32k_timer_write(0x0f, OMAP1_32K_TIMER_CR); | 127 | omap_dm_timer_start(gptimer); |
136 | } | ||
137 | |||
138 | if (cpu_is_omap24xx()) { | ||
139 | omap_32k_timer_write(0xffffffff - load_val, GP_TIMER_TCRR); | ||
140 | omap_32k_timer_write((1 << 1), GP_TIMER_TIER); | ||
141 | omap_32k_timer_write((1 << 1) | 1, GP_TIMER_TCLR); | ||
142 | } | ||
143 | } | 128 | } |
144 | 129 | ||
145 | static inline void omap_32k_timer_stop(void) | 130 | static inline void omap_32k_timer_stop(void) |
146 | { | 131 | { |
147 | if (cpu_class_is_omap1()) | 132 | omap_dm_timer_stop(gptimer); |
148 | omap_32k_timer_write(0x0, OMAP1_32K_TIMER_CR); | 133 | } |
149 | 134 | ||
150 | if (cpu_is_omap24xx()) | 135 | static inline void omap_32k_timer_ack_irq(void) |
151 | omap_32k_timer_write(0x0, GP_TIMER_TCLR); | 136 | { |
137 | u32 status = omap_dm_timer_read_status(gptimer); | ||
138 | omap_dm_timer_write_status(gptimer, status); | ||
139 | } | ||
140 | |||
141 | #endif | ||
142 | |||
143 | /* | ||
144 | * The 32KHz synchronized timer is an additional timer on 16xx. | ||
145 | * It is always running. | ||
146 | */ | ||
147 | static inline unsigned long omap_32k_sync_timer_read(void) | ||
148 | { | ||
149 | return omap_readl(TIMER_32K_SYNCHRONIZED); | ||
152 | } | 150 | } |
153 | 151 | ||
154 | /* | 152 | /* |
@@ -202,11 +200,7 @@ static irqreturn_t omap_32k_timer_interrupt(int irq, void *dev_id, | |||
202 | 200 | ||
203 | write_seqlock_irqsave(&xtime_lock, flags); | 201 | write_seqlock_irqsave(&xtime_lock, flags); |
204 | 202 | ||
205 | if (cpu_is_omap24xx()) { | 203 | omap_32k_timer_ack_irq(); |
206 | u32 status = omap_32k_timer_read(GP_TIMER_TISR); | ||
207 | omap_32k_timer_write(status, GP_TIMER_TISR); | ||
208 | } | ||
209 | |||
210 | now = omap_32k_sync_timer_read(); | 204 | now = omap_32k_sync_timer_read(); |
211 | 205 | ||
212 | while ((signed long)(now - omap_32k_last_tick) | 206 | while ((signed long)(now - omap_32k_last_tick) |
@@ -268,9 +262,6 @@ static struct irqaction omap_32k_timer_irq = { | |||
268 | .handler = omap_32k_timer_interrupt, | 262 | .handler = omap_32k_timer_interrupt, |
269 | }; | 263 | }; |
270 | 264 | ||
271 | static struct clk * gpt1_ick; | ||
272 | static struct clk * gpt1_fck; | ||
273 | |||
274 | static __init void omap_init_32k_timer(void) | 265 | static __init void omap_init_32k_timer(void) |
275 | { | 266 | { |
276 | #ifdef CONFIG_NO_IDLE_HZ | 267 | #ifdef CONFIG_NO_IDLE_HZ |
@@ -279,32 +270,22 @@ static __init void omap_init_32k_timer(void) | |||
279 | 270 | ||
280 | if (cpu_class_is_omap1()) | 271 | if (cpu_class_is_omap1()) |
281 | setup_irq(INT_OS_TIMER, &omap_32k_timer_irq); | 272 | setup_irq(INT_OS_TIMER, &omap_32k_timer_irq); |
282 | if (cpu_is_omap24xx()) | ||
283 | setup_irq(37, &omap_32k_timer_irq); | ||
284 | omap_timer.offset = omap_32k_timer_gettimeoffset; | 273 | omap_timer.offset = omap_32k_timer_gettimeoffset; |
285 | omap_32k_last_tick = omap_32k_sync_timer_read(); | 274 | omap_32k_last_tick = omap_32k_sync_timer_read(); |
286 | 275 | ||
276 | #ifdef CONFIG_ARCH_OMAP2 | ||
287 | /* REVISIT: Check 24xx TIOCP_CFG settings after idle works */ | 277 | /* REVISIT: Check 24xx TIOCP_CFG settings after idle works */ |
288 | if (cpu_is_omap24xx()) { | 278 | if (cpu_is_omap24xx()) { |
289 | omap_32k_timer_write(0, GP_TIMER_TCLR); | 279 | gptimer = omap_dm_timer_request_specific(1); |
290 | omap_writel(0, CM_CLKSEL_WKUP); /* 32KHz clock source */ | 280 | BUG_ON(gptimer == NULL); |
291 | 281 | ||
292 | gpt1_ick = clk_get(NULL, "gpt1_ick"); | 282 | omap_dm_timer_set_source(gptimer, OMAP_TIMER_SRC_32_KHZ); |
293 | if (IS_ERR(gpt1_ick)) | 283 | setup_irq(omap_dm_timer_get_irq(gptimer), &omap_32k_timer_irq); |
294 | printk(KERN_ERR "Could not get gpt1_ick\n"); | 284 | omap_dm_timer_set_int_enable(gptimer, |
295 | else | 285 | OMAP_TIMER_INT_CAPTURE | OMAP_TIMER_INT_OVERFLOW | |
296 | clk_enable(gpt1_ick); | 286 | OMAP_TIMER_INT_MATCH); |
297 | |||
298 | gpt1_fck = clk_get(NULL, "gpt1_fck"); | ||
299 | if (IS_ERR(gpt1_fck)) | ||
300 | printk(KERN_ERR "Could not get gpt1_fck\n"); | ||
301 | else | ||
302 | clk_enable(gpt1_fck); | ||
303 | |||
304 | mdelay(100); /* Wait for clocks to stabilize */ | ||
305 | |||
306 | omap_32k_timer_write(0x7, GP_TIMER_TISR); | ||
307 | } | 287 | } |
288 | #endif | ||
308 | 289 | ||
309 | omap_32k_timer_start(OMAP_32K_TIMER_TICK_PERIOD); | 290 | omap_32k_timer_start(OMAP_32K_TIMER_TICK_PERIOD); |
310 | } | 291 | } |
@@ -316,6 +297,9 @@ static __init void omap_init_32k_timer(void) | |||
316 | */ | 297 | */ |
317 | static void __init omap_timer_init(void) | 298 | static void __init omap_timer_init(void) |
318 | { | 299 | { |
300 | #ifdef CONFIG_OMAP_DM_TIMER | ||
301 | omap_dm_timer_init(); | ||
302 | #endif | ||
319 | omap_init_32k_timer(); | 303 | omap_init_32k_timer(); |
320 | } | 304 | } |
321 | 305 | ||
diff --git a/arch/arm26/kernel/irq.c b/arch/arm26/kernel/irq.c index e08ba2955ec7..d87d68b77d66 100644 --- a/arch/arm26/kernel/irq.c +++ b/arch/arm26/kernel/irq.c | |||
@@ -190,7 +190,7 @@ __do_irq(unsigned int irq, struct irqaction *action, struct pt_regs *regs) | |||
190 | int ret; | 190 | int ret; |
191 | 191 | ||
192 | spin_unlock(&irq_controller_lock); | 192 | spin_unlock(&irq_controller_lock); |
193 | if (!(action->flags & SA_INTERRUPT)) | 193 | if (!(action->flags & IRQF_DISABLED)) |
194 | local_irq_enable(); | 194 | local_irq_enable(); |
195 | 195 | ||
196 | status = 0; | 196 | status = 0; |
@@ -201,7 +201,7 @@ __do_irq(unsigned int irq, struct irqaction *action, struct pt_regs *regs) | |||
201 | action = action->next; | 201 | action = action->next; |
202 | } while (action); | 202 | } while (action); |
203 | 203 | ||
204 | if (status & SA_SAMPLE_RANDOM) | 204 | if (status & IRQF_SAMPLE_RANDOM) |
205 | add_interrupt_randomness(irq); | 205 | add_interrupt_randomness(irq); |
206 | 206 | ||
207 | spin_lock_irq(&irq_controller_lock); | 207 | spin_lock_irq(&irq_controller_lock); |
@@ -451,7 +451,7 @@ int setup_irq(unsigned int irq, struct irqaction *new) | |||
451 | * so we have to be careful not to interfere with a | 451 | * so we have to be careful not to interfere with a |
452 | * running system. | 452 | * running system. |
453 | */ | 453 | */ |
454 | if (new->flags & SA_SAMPLE_RANDOM) { | 454 | if (new->flags & IRQF_SAMPLE_RANDOM) { |
455 | /* | 455 | /* |
456 | * This function might sleep, we want to call it first, | 456 | * This function might sleep, we want to call it first, |
457 | * outside of the atomic block. | 457 | * outside of the atomic block. |
@@ -471,7 +471,7 @@ int setup_irq(unsigned int irq, struct irqaction *new) | |||
471 | p = &desc->action; | 471 | p = &desc->action; |
472 | if ((old = *p) != NULL) { | 472 | if ((old = *p) != NULL) { |
473 | /* Can't share interrupts unless both agree to */ | 473 | /* Can't share interrupts unless both agree to */ |
474 | if (!(old->flags & new->flags & SA_SHIRQ)) { | 474 | if (!(old->flags & new->flags & IRQF_SHARED)) { |
475 | spin_unlock_irqrestore(&irq_controller_lock, flags); | 475 | spin_unlock_irqrestore(&irq_controller_lock, flags); |
476 | return -EBUSY; | 476 | return -EBUSY; |
477 | } | 477 | } |
@@ -526,11 +526,11 @@ int setup_irq(unsigned int irq, struct irqaction *new) | |||
526 | * | 526 | * |
527 | * Flags: | 527 | * Flags: |
528 | * | 528 | * |
529 | * SA_SHIRQ Interrupt is shared | 529 | * IRQF_SHARED Interrupt is shared |
530 | * | 530 | * |
531 | * SA_INTERRUPT Disable local interrupts while processing | 531 | * IRQF_DISABLED Disable local interrupts while processing |
532 | * | 532 | * |
533 | * SA_SAMPLE_RANDOM The interrupt can be used for entropy | 533 | * IRQF_SAMPLE_RANDOM The interrupt can be used for entropy |
534 | * | 534 | * |
535 | */ | 535 | */ |
536 | 536 | ||
@@ -542,7 +542,7 @@ int request_irq(unsigned int irq, irqreturn_t (*handler)(int, void *, struct pt_ | |||
542 | struct irqaction *action; | 542 | struct irqaction *action; |
543 | 543 | ||
544 | if (irq >= NR_IRQS || !irq_desc[irq].valid || !handler || | 544 | if (irq >= NR_IRQS || !irq_desc[irq].valid || !handler || |
545 | (irq_flags & SA_SHIRQ && !dev_id)) | 545 | (irq_flags & IRQF_SHARED && !dev_id)) |
546 | return -EINVAL; | 546 | return -EINVAL; |
547 | 547 | ||
548 | action = (struct irqaction *)kmalloc(sizeof(struct irqaction), GFP_KERNEL); | 548 | action = (struct irqaction *)kmalloc(sizeof(struct irqaction), GFP_KERNEL); |
diff --git a/arch/arm26/kernel/time.c b/arch/arm26/kernel/time.c index 718de9bed950..db63d75d0715 100644 --- a/arch/arm26/kernel/time.c +++ b/arch/arm26/kernel/time.c | |||
@@ -205,7 +205,7 @@ static irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) | |||
205 | 205 | ||
206 | static struct irqaction timer_irq = { | 206 | static struct irqaction timer_irq = { |
207 | .name = "timer", | 207 | .name = "timer", |
208 | .flags = SA_INTERRUPT, | 208 | .flags = IRQF_DISABLED, |
209 | .handler = timer_interrupt, | 209 | .handler = timer_interrupt, |
210 | }; | 210 | }; |
211 | 211 | ||
diff --git a/arch/cris/arch-v10/drivers/gpio.c b/arch/cris/arch-v10/drivers/gpio.c index 25df4ada951a..48fd801792d1 100644 --- a/arch/cris/arch-v10/drivers/gpio.c +++ b/arch/cris/arch-v10/drivers/gpio.c | |||
@@ -937,11 +937,11 @@ gpio_init(void) | |||
937 | * in some tests. | 937 | * in some tests. |
938 | */ | 938 | */ |
939 | if (request_irq(TIMER0_IRQ_NBR, gpio_poll_timer_interrupt, | 939 | if (request_irq(TIMER0_IRQ_NBR, gpio_poll_timer_interrupt, |
940 | SA_SHIRQ | SA_INTERRUPT,"gpio poll", NULL)) { | 940 | IRQF_SHARED | IRQF_DISABLED,"gpio poll", NULL)) { |
941 | printk(KERN_CRIT "err: timer0 irq for gpio\n"); | 941 | printk(KERN_CRIT "err: timer0 irq for gpio\n"); |
942 | } | 942 | } |
943 | if (request_irq(PA_IRQ_NBR, gpio_pa_interrupt, | 943 | if (request_irq(PA_IRQ_NBR, gpio_pa_interrupt, |
944 | SA_SHIRQ | SA_INTERRUPT,"gpio PA", NULL)) { | 944 | IRQF_SHARED | IRQF_DISABLED,"gpio PA", NULL)) { |
945 | printk(KERN_CRIT "err: PA irq for gpio\n"); | 945 | printk(KERN_CRIT "err: PA irq for gpio\n"); |
946 | } | 946 | } |
947 | 947 | ||
diff --git a/arch/cris/arch-v10/kernel/time.c b/arch/cris/arch-v10/kernel/time.c index fe65cb89f54c..9c22b76e129a 100644 --- a/arch/cris/arch-v10/kernel/time.c +++ b/arch/cris/arch-v10/kernel/time.c | |||
@@ -251,11 +251,11 @@ timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) | |||
251 | return IRQ_HANDLED; | 251 | return IRQ_HANDLED; |
252 | } | 252 | } |
253 | 253 | ||
254 | /* timer is SA_SHIRQ so drivers can add stuff to the timer irq chain | 254 | /* timer is IRQF_SHARED so drivers can add stuff to the timer irq chain |
255 | * it needs to be SA_INTERRUPT to make the jiffies update work properly | 255 | * it needs to be IRQF_DISABLED to make the jiffies update work properly |
256 | */ | 256 | */ |
257 | 257 | ||
258 | static struct irqaction irq2 = { timer_interrupt, SA_SHIRQ | SA_INTERRUPT, | 258 | static struct irqaction irq2 = { timer_interrupt, IRQF_SHARED | IRQF_DISABLED, |
259 | CPU_MASK_NONE, "timer", NULL, NULL}; | 259 | CPU_MASK_NONE, "timer", NULL, NULL}; |
260 | 260 | ||
261 | void __init | 261 | void __init |
diff --git a/arch/cris/arch-v32/drivers/gpio.c b/arch/cris/arch-v32/drivers/gpio.c index 113bdff4fd3c..00e9167de530 100644 --- a/arch/cris/arch-v32/drivers/gpio.c +++ b/arch/cris/arch-v32/drivers/gpio.c | |||
@@ -744,11 +744,11 @@ gpio_init(void) | |||
744 | * in some tests. | 744 | * in some tests. |
745 | */ | 745 | */ |
746 | if (request_irq(TIMER_INTR_VECT, gpio_poll_timer_interrupt, | 746 | if (request_irq(TIMER_INTR_VECT, gpio_poll_timer_interrupt, |
747 | SA_SHIRQ | SA_INTERRUPT,"gpio poll", &alarmlist)) { | 747 | IRQF_SHARED | IRQF_DISABLED,"gpio poll", &alarmlist)) { |
748 | printk("err: timer0 irq for gpio\n"); | 748 | printk("err: timer0 irq for gpio\n"); |
749 | } | 749 | } |
750 | if (request_irq(GEN_IO_INTR_VECT, gpio_pa_interrupt, | 750 | if (request_irq(GEN_IO_INTR_VECT, gpio_pa_interrupt, |
751 | SA_SHIRQ | SA_INTERRUPT,"gpio PA", &alarmlist)) { | 751 | IRQF_SHARED | IRQF_DISABLED,"gpio PA", &alarmlist)) { |
752 | printk("err: PA irq for gpio\n"); | 752 | printk("err: PA irq for gpio\n"); |
753 | } | 753 | } |
754 | /* enable the gio and timer irq in global config */ | 754 | /* enable the gio and timer irq in global config */ |
diff --git a/arch/cris/arch-v32/kernel/arbiter.c b/arch/cris/arch-v32/kernel/arbiter.c index 82d44c9afc1e..420a5312ed03 100644 --- a/arch/cris/arch-v32/kernel/arbiter.c +++ b/arch/cris/arch-v32/kernel/arbiter.c | |||
@@ -119,7 +119,7 @@ static void crisv32_arbiter_init(void) | |||
119 | crisv32_arbiter_config(EXT_REGION); | 119 | crisv32_arbiter_config(EXT_REGION); |
120 | crisv32_arbiter_config(INT_REGION); | 120 | crisv32_arbiter_config(INT_REGION); |
121 | 121 | ||
122 | if (request_irq(MEMARB_INTR_VECT, crisv32_arbiter_irq, SA_INTERRUPT, | 122 | if (request_irq(MEMARB_INTR_VECT, crisv32_arbiter_irq, IRQF_DISABLED, |
123 | "arbiter", NULL)) | 123 | "arbiter", NULL)) |
124 | printk(KERN_ERR "Couldn't allocate arbiter IRQ\n"); | 124 | printk(KERN_ERR "Couldn't allocate arbiter IRQ\n"); |
125 | 125 | ||
diff --git a/arch/cris/arch-v32/kernel/fasttimer.c b/arch/cris/arch-v32/kernel/fasttimer.c index caaa86bd5e87..5daeb6f7f3b7 100644 --- a/arch/cris/arch-v32/kernel/fasttimer.c +++ b/arch/cris/arch-v32/kernel/fasttimer.c | |||
@@ -981,7 +981,7 @@ void fast_timer_init(void) | |||
981 | proc_register_dynamic(&proc_root, &fasttimer_proc_entry); | 981 | proc_register_dynamic(&proc_root, &fasttimer_proc_entry); |
982 | #endif | 982 | #endif |
983 | #endif /* PROC_FS */ | 983 | #endif /* PROC_FS */ |
984 | if(request_irq(TIMER_INTR_VECT, timer_trig_interrupt, SA_INTERRUPT, | 984 | if(request_irq(TIMER_INTR_VECT, timer_trig_interrupt, IRQF_DISABLED, |
985 | "fast timer int", NULL)) | 985 | "fast timer int", NULL)) |
986 | { | 986 | { |
987 | printk("err: timer1 irq\n"); | 987 | printk("err: timer1 irq\n"); |
diff --git a/arch/cris/arch-v32/kernel/irq.c b/arch/cris/arch-v32/kernel/irq.c index e2d2b3fdb5b1..cc361bf578ae 100644 --- a/arch/cris/arch-v32/kernel/irq.c +++ b/arch/cris/arch-v32/kernel/irq.c | |||
@@ -268,7 +268,7 @@ void | |||
268 | crisv32_do_IRQ(int irq, int block, struct pt_regs* regs) | 268 | crisv32_do_IRQ(int irq, int block, struct pt_regs* regs) |
269 | { | 269 | { |
270 | /* Interrupts that may not be moved to another CPU and | 270 | /* Interrupts that may not be moved to another CPU and |
271 | * are SA_INTERRUPT may skip blocking. This is currently | 271 | * are IRQF_DISABLED may skip blocking. This is currently |
272 | * only valid for the timer IRQ and the IPI and is used | 272 | * only valid for the timer IRQ and the IPI and is used |
273 | * for the timer interrupt to avoid watchdog starvation. | 273 | * for the timer interrupt to avoid watchdog starvation. |
274 | */ | 274 | */ |
diff --git a/arch/cris/arch-v32/kernel/smp.c b/arch/cris/arch-v32/kernel/smp.c index da40d19a151e..464ecaec3bc0 100644 --- a/arch/cris/arch-v32/kernel/smp.c +++ b/arch/cris/arch-v32/kernel/smp.c | |||
@@ -62,7 +62,7 @@ static unsigned long irq_regs[NR_CPUS] = | |||
62 | 62 | ||
63 | static irqreturn_t crisv32_ipi_interrupt(int irq, void *dev_id, struct pt_regs *regs); | 63 | static irqreturn_t crisv32_ipi_interrupt(int irq, void *dev_id, struct pt_regs *regs); |
64 | static int send_ipi(int vector, int wait, cpumask_t cpu_mask); | 64 | static int send_ipi(int vector, int wait, cpumask_t cpu_mask); |
65 | static struct irqaction irq_ipi = { crisv32_ipi_interrupt, SA_INTERRUPT, | 65 | static struct irqaction irq_ipi = { crisv32_ipi_interrupt, IRQF_DISABLED, |
66 | CPU_MASK_NONE, "ipi", NULL, NULL}; | 66 | CPU_MASK_NONE, "ipi", NULL, NULL}; |
67 | 67 | ||
68 | extern void cris_mmu_init(void); | 68 | extern void cris_mmu_init(void); |
diff --git a/arch/cris/arch-v32/kernel/time.c b/arch/cris/arch-v32/kernel/time.c index 4bac1d6c37fb..50f3f93293d6 100644 --- a/arch/cris/arch-v32/kernel/time.c +++ b/arch/cris/arch-v32/kernel/time.c | |||
@@ -241,12 +241,16 @@ timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) | |||
241 | return IRQ_HANDLED; | 241 | return IRQ_HANDLED; |
242 | } | 242 | } |
243 | 243 | ||
244 | /* timer is SA_SHIRQ so drivers can add stuff to the timer irq chain | 244 | /* timer is IRQF_SHARED so drivers can add stuff to the timer irq chain |
245 | * it needs to be SA_INTERRUPT to make the jiffies update work properly | 245 | * it needs to be IRQF_DISABLED to make the jiffies update work properly |
246 | */ | 246 | */ |
247 | 247 | ||
248 | static struct irqaction irq_timer = { timer_interrupt, SA_SHIRQ | SA_INTERRUPT, | 248 | static struct irqaction irq_timer = { |
249 | CPU_MASK_NONE, "timer", NULL, NULL}; | 249 | .mask = timer_interrupt, |
250 | .flags = IRQF_SHARED | IRQF_DISABLED, | ||
251 | .mask = CPU_MASK_NONE, | ||
252 | .name = "timer" | ||
253 | }; | ||
250 | 254 | ||
251 | void __init | 255 | void __init |
252 | cris_timer_init(void) | 256 | cris_timer_init(void) |
diff --git a/arch/cris/kernel/irq.c b/arch/cris/kernel/irq.c index 1f9099627a72..903ea62c6e21 100644 --- a/arch/cris/kernel/irq.c +++ b/arch/cris/kernel/irq.c | |||
@@ -85,7 +85,7 @@ skip: | |||
85 | /* called by the assembler IRQ entry functions defined in irq.h | 85 | /* called by the assembler IRQ entry functions defined in irq.h |
86 | * to dispatch the interrupts to registred handlers | 86 | * to dispatch the interrupts to registred handlers |
87 | * interrupts are disabled upon entry - depending on if the | 87 | * interrupts are disabled upon entry - depending on if the |
88 | * interrupt was registred with SA_INTERRUPT or not, interrupts | 88 | * interrupt was registred with IRQF_DISABLED or not, interrupts |
89 | * are re-enabled or not. | 89 | * are re-enabled or not. |
90 | */ | 90 | */ |
91 | 91 | ||
diff --git a/arch/frv/kernel/irq-routing.c b/arch/frv/kernel/irq-routing.c index b90b70a761d1..53886adf47de 100644 --- a/arch/frv/kernel/irq-routing.c +++ b/arch/frv/kernel/irq-routing.c | |||
@@ -81,7 +81,7 @@ void distribute_irqs(struct irq_group *group, unsigned long irqmask) | |||
81 | if (action) { | 81 | if (action) { |
82 | int status = 0; | 82 | int status = 0; |
83 | 83 | ||
84 | // if (!(action->flags & SA_INTERRUPT)) | 84 | // if (!(action->flags & IRQF_DISABLED)) |
85 | // local_irq_enable(); | 85 | // local_irq_enable(); |
86 | 86 | ||
87 | do { | 87 | do { |
@@ -90,7 +90,7 @@ void distribute_irqs(struct irq_group *group, unsigned long irqmask) | |||
90 | action = action->next; | 90 | action = action->next; |
91 | } while (action); | 91 | } while (action); |
92 | 92 | ||
93 | if (status & SA_SAMPLE_RANDOM) | 93 | if (status & IRQF_SAMPLE_RANDOM) |
94 | add_interrupt_randomness(irq); | 94 | add_interrupt_randomness(irq); |
95 | local_irq_disable(); | 95 | local_irq_disable(); |
96 | } | 96 | } |
diff --git a/arch/frv/kernel/irq.c b/arch/frv/kernel/irq.c index 5920f52bf9c8..08967010be04 100644 --- a/arch/frv/kernel/irq.c +++ b/arch/frv/kernel/irq.c | |||
@@ -341,11 +341,11 @@ asmlinkage void do_NMI(void) | |||
341 | * | 341 | * |
342 | * Flags: | 342 | * Flags: |
343 | * | 343 | * |
344 | * SA_SHIRQ Interrupt is shared | 344 | * IRQF_SHARED Interrupt is shared |
345 | * | 345 | * |
346 | * SA_INTERRUPT Disable local interrupts while processing | 346 | * IRQF_DISABLED Disable local interrupts while processing |
347 | * | 347 | * |
348 | * SA_SAMPLE_RANDOM The interrupt can be used for entropy | 348 | * IRQF_SAMPLE_RANDOM The interrupt can be used for entropy |
349 | * | 349 | * |
350 | */ | 350 | */ |
351 | 351 | ||
@@ -365,7 +365,7 @@ int request_irq(unsigned int irq, | |||
365 | * to figure out which interrupt is which (messes up the | 365 | * to figure out which interrupt is which (messes up the |
366 | * interrupt freeing logic etc). | 366 | * interrupt freeing logic etc). |
367 | */ | 367 | */ |
368 | if (irqflags & SA_SHIRQ) { | 368 | if (irqflags & IRQF_SHARED) { |
369 | if (!dev_id) | 369 | if (!dev_id) |
370 | printk("Bad boy: %s (at 0x%x) called us without a dev_id!\n", | 370 | printk("Bad boy: %s (at 0x%x) called us without a dev_id!\n", |
371 | devname, (&irq)[-1]); | 371 | devname, (&irq)[-1]); |
@@ -576,7 +576,7 @@ int setup_irq(unsigned int irq, struct irqaction *new) | |||
576 | * so we have to be careful not to interfere with a | 576 | * so we have to be careful not to interfere with a |
577 | * running system. | 577 | * running system. |
578 | */ | 578 | */ |
579 | if (new->flags & SA_SAMPLE_RANDOM) { | 579 | if (new->flags & IRQF_SAMPLE_RANDOM) { |
580 | /* | 580 | /* |
581 | * This function might sleep, we want to call it first, | 581 | * This function might sleep, we want to call it first, |
582 | * outside of the atomic block. | 582 | * outside of the atomic block. |
@@ -592,7 +592,7 @@ int setup_irq(unsigned int irq, struct irqaction *new) | |||
592 | spin_lock_irqsave(&level->lock, flags); | 592 | spin_lock_irqsave(&level->lock, flags); |
593 | 593 | ||
594 | /* can't share interrupts unless all parties agree to */ | 594 | /* can't share interrupts unless all parties agree to */ |
595 | if (level->usage != 0 && !(level->flags & new->flags & SA_SHIRQ)) { | 595 | if (level->usage != 0 && !(level->flags & new->flags & IRQF_SHARED)) { |
596 | spin_unlock_irqrestore(&level->lock,flags); | 596 | spin_unlock_irqrestore(&level->lock,flags); |
597 | return -EBUSY; | 597 | return -EBUSY; |
598 | } | 598 | } |
diff --git a/arch/frv/kernel/time.c b/arch/frv/kernel/time.c index 24cf85f89e40..d5b64e193d92 100644 --- a/arch/frv/kernel/time.c +++ b/arch/frv/kernel/time.c | |||
@@ -47,7 +47,7 @@ unsigned long __delay_loops_MHz; | |||
47 | static irqreturn_t timer_interrupt(int irq, void *dummy, struct pt_regs *regs); | 47 | static irqreturn_t timer_interrupt(int irq, void *dummy, struct pt_regs *regs); |
48 | 48 | ||
49 | static struct irqaction timer_irq = { | 49 | static struct irqaction timer_irq = { |
50 | timer_interrupt, SA_INTERRUPT, CPU_MASK_NONE, "timer", NULL, NULL | 50 | timer_interrupt, IRQF_DISABLED, CPU_MASK_NONE, "timer", NULL, NULL |
51 | }; | 51 | }; |
52 | 52 | ||
53 | static inline int set_rtc_mmss(unsigned long nowtime) | 53 | static inline int set_rtc_mmss(unsigned long nowtime) |
diff --git a/arch/h8300/kernel/ints.c b/arch/h8300/kernel/ints.c index edb3c4170013..1488b6ace18c 100644 --- a/arch/h8300/kernel/ints.c +++ b/arch/h8300/kernel/ints.c | |||
@@ -158,7 +158,7 @@ int request_irq(unsigned int irq, | |||
158 | irq_handle->devname = devname; | 158 | irq_handle->devname = devname; |
159 | irq_list[irq] = irq_handle; | 159 | irq_list[irq] = irq_handle; |
160 | 160 | ||
161 | if (irq_handle->flags & SA_SAMPLE_RANDOM) | 161 | if (irq_handle->flags & IRQF_SAMPLE_RANDOM) |
162 | rand_initialize_irq(irq); | 162 | rand_initialize_irq(irq); |
163 | 163 | ||
164 | enable_irq(irq); | 164 | enable_irq(irq); |
@@ -222,7 +222,7 @@ asmlinkage void process_int(int irq, struct pt_regs *fp) | |||
222 | if (irq_list[irq]) { | 222 | if (irq_list[irq]) { |
223 | irq_list[irq]->handler(irq, irq_list[irq]->dev_id, fp); | 223 | irq_list[irq]->handler(irq, irq_list[irq]->dev_id, fp); |
224 | irq_list[irq]->count++; | 224 | irq_list[irq]->count++; |
225 | if (irq_list[irq]->flags & SA_SAMPLE_RANDOM) | 225 | if (irq_list[irq]->flags & IRQF_SAMPLE_RANDOM) |
226 | add_interrupt_randomness(irq); | 226 | add_interrupt_randomness(irq); |
227 | } | 227 | } |
228 | } else { | 228 | } else { |
diff --git a/arch/h8300/platform/h8s/ints.c b/arch/h8300/platform/h8s/ints.c index f6ed663bdde0..270440de4610 100644 --- a/arch/h8300/platform/h8s/ints.c +++ b/arch/h8300/platform/h8s/ints.c | |||
@@ -192,7 +192,7 @@ int request_irq(unsigned int irq, | |||
192 | irq_handle->dev_id = dev_id; | 192 | irq_handle->dev_id = dev_id; |
193 | irq_handle->devname = devname; | 193 | irq_handle->devname = devname; |
194 | irq_list[irq] = irq_handle; | 194 | irq_list[irq] = irq_handle; |
195 | if (irq_handle->flags & SA_SAMPLE_RANDOM) | 195 | if (irq_handle->flags & IRQF_SAMPLE_RANDOM) |
196 | rand_initialize_irq(irq); | 196 | rand_initialize_irq(irq); |
197 | 197 | ||
198 | /* enable interrupt */ | 198 | /* enable interrupt */ |
@@ -270,7 +270,7 @@ asmlinkage void process_int(unsigned long vec, struct pt_regs *fp) | |||
270 | if (irq_list[vec]) { | 270 | if (irq_list[vec]) { |
271 | irq_list[vec]->handler(vec, irq_list[vec]->dev_id, fp); | 271 | irq_list[vec]->handler(vec, irq_list[vec]->dev_id, fp); |
272 | irq_list[vec]->count++; | 272 | irq_list[vec]->count++; |
273 | if (irq_list[vec]->flags & SA_SAMPLE_RANDOM) | 273 | if (irq_list[vec]->flags & IRQF_SAMPLE_RANDOM) |
274 | add_interrupt_randomness(vec); | 274 | add_interrupt_randomness(vec); |
275 | } | 275 | } |
276 | } else { | 276 | } else { |
diff --git a/arch/i386/kernel/Makefile b/arch/i386/kernel/Makefile index 5e70c2fb273a..cbc1184e9473 100644 --- a/arch/i386/kernel/Makefile +++ b/arch/i386/kernel/Makefile | |||
@@ -38,6 +38,7 @@ obj-$(CONFIG_VM86) += vm86.o | |||
38 | obj-$(CONFIG_EARLY_PRINTK) += early_printk.o | 38 | obj-$(CONFIG_EARLY_PRINTK) += early_printk.o |
39 | obj-$(CONFIG_HPET_TIMER) += hpet.o | 39 | obj-$(CONFIG_HPET_TIMER) += hpet.o |
40 | obj-$(CONFIG_K8_NB) += k8.o | 40 | obj-$(CONFIG_K8_NB) += k8.o |
41 | obj-$(CONFIG_AUDIT) += audit.o | ||
41 | 42 | ||
42 | EXTRA_AFLAGS := -traditional | 43 | EXTRA_AFLAGS := -traditional |
43 | 44 | ||
diff --git a/arch/i386/kernel/alternative.c b/arch/i386/kernel/alternative.c index 50eb0e03777e..7b421b3a053e 100644 --- a/arch/i386/kernel/alternative.c +++ b/arch/i386/kernel/alternative.c | |||
@@ -168,6 +168,8 @@ void apply_alternatives(struct alt_instr *start, struct alt_instr *end) | |||
168 | } | 168 | } |
169 | } | 169 | } |
170 | 170 | ||
171 | #ifdef CONFIG_SMP | ||
172 | |||
171 | static void alternatives_smp_save(struct alt_instr *start, struct alt_instr *end) | 173 | static void alternatives_smp_save(struct alt_instr *start, struct alt_instr *end) |
172 | { | 174 | { |
173 | struct alt_instr *a; | 175 | struct alt_instr *a; |
@@ -328,6 +330,8 @@ void alternatives_smp_switch(int smp) | |||
328 | spin_unlock_irqrestore(&smp_alt, flags); | 330 | spin_unlock_irqrestore(&smp_alt, flags); |
329 | } | 331 | } |
330 | 332 | ||
333 | #endif | ||
334 | |||
331 | void __init alternative_instructions(void) | 335 | void __init alternative_instructions(void) |
332 | { | 336 | { |
333 | if (no_replacement) { | 337 | if (no_replacement) { |
@@ -349,6 +353,7 @@ void __init alternative_instructions(void) | |||
349 | smp_alt_once = 1; | 353 | smp_alt_once = 1; |
350 | #endif | 354 | #endif |
351 | 355 | ||
356 | #ifdef CONFIG_SMP | ||
352 | if (smp_alt_once) { | 357 | if (smp_alt_once) { |
353 | if (1 == num_possible_cpus()) { | 358 | if (1 == num_possible_cpus()) { |
354 | printk(KERN_INFO "SMP alternatives: switching to UP code\n"); | 359 | printk(KERN_INFO "SMP alternatives: switching to UP code\n"); |
@@ -370,4 +375,5 @@ void __init alternative_instructions(void) | |||
370 | _text, _etext); | 375 | _text, _etext); |
371 | alternatives_smp_switch(0); | 376 | alternatives_smp_switch(0); |
372 | } | 377 | } |
378 | #endif | ||
373 | } | 379 | } |
diff --git a/arch/i386/kernel/audit.c b/arch/i386/kernel/audit.c new file mode 100644 index 000000000000..5a53c6f371ff --- /dev/null +++ b/arch/i386/kernel/audit.c | |||
@@ -0,0 +1,23 @@ | |||
1 | #include <linux/init.h> | ||
2 | #include <linux/types.h> | ||
3 | #include <linux/audit.h> | ||
4 | #include <asm/unistd.h> | ||
5 | |||
6 | static unsigned dir_class[] = { | ||
7 | #include <asm-generic/audit_dir_write.h> | ||
8 | ~0U | ||
9 | }; | ||
10 | |||
11 | static unsigned chattr_class[] = { | ||
12 | #include <asm-generic/audit_change_attr.h> | ||
13 | ~0U | ||
14 | }; | ||
15 | |||
16 | static int __init audit_classes_init(void) | ||
17 | { | ||
18 | audit_register_class(AUDIT_CLASS_DIR_WRITE, dir_class); | ||
19 | audit_register_class(AUDIT_CLASS_CHATTR, chattr_class); | ||
20 | return 0; | ||
21 | } | ||
22 | |||
23 | __initcall(audit_classes_init); | ||
diff --git a/arch/i386/mach-default/setup.c b/arch/i386/mach-default/setup.c index 77c8c83815c1..c511705c386c 100644 --- a/arch/i386/mach-default/setup.c +++ b/arch/i386/mach-default/setup.c | |||
@@ -79,7 +79,7 @@ void __init trap_init_hook(void) | |||
79 | { | 79 | { |
80 | } | 80 | } |
81 | 81 | ||
82 | static struct irqaction irq0 = { timer_interrupt, SA_INTERRUPT, CPU_MASK_NONE, "timer", NULL, NULL}; | 82 | static struct irqaction irq0 = { timer_interrupt, IRQF_DISABLED, CPU_MASK_NONE, "timer", NULL, NULL}; |
83 | 83 | ||
84 | /** | 84 | /** |
85 | * time_init_hook - do any specific initialisations for the system timer. | 85 | * time_init_hook - do any specific initialisations for the system timer. |
diff --git a/arch/i386/mach-visws/setup.c b/arch/i386/mach-visws/setup.c index 1f84cdb24779..885c7cbfd478 100644 --- a/arch/i386/mach-visws/setup.c +++ b/arch/i386/mach-visws/setup.c | |||
@@ -115,7 +115,7 @@ void __init pre_setup_arch_hook() | |||
115 | 115 | ||
116 | static struct irqaction irq0 = { | 116 | static struct irqaction irq0 = { |
117 | .handler = timer_interrupt, | 117 | .handler = timer_interrupt, |
118 | .flags = SA_INTERRUPT, | 118 | .flags = IRQF_DISABLED, |
119 | .name = "timer", | 119 | .name = "timer", |
120 | }; | 120 | }; |
121 | 121 | ||
diff --git a/arch/i386/mach-voyager/setup.c b/arch/i386/mach-voyager/setup.c index 9da9ef09068d..cfa16c151c8f 100644 --- a/arch/i386/mach-voyager/setup.c +++ b/arch/i386/mach-voyager/setup.c | |||
@@ -40,7 +40,7 @@ void __init trap_init_hook(void) | |||
40 | { | 40 | { |
41 | } | 41 | } |
42 | 42 | ||
43 | static struct irqaction irq0 = { timer_interrupt, SA_INTERRUPT, CPU_MASK_NONE, "timer", NULL, NULL}; | 43 | static struct irqaction irq0 = { timer_interrupt, IRQF_DISABLED, CPU_MASK_NONE, "timer", NULL, NULL}; |
44 | 44 | ||
45 | void __init time_init_hook(void) | 45 | void __init time_init_hook(void) |
46 | { | 46 | { |
diff --git a/arch/i386/mm/init.c b/arch/i386/mm/init.c index dc5d8979cd64..89e8486aac34 100644 --- a/arch/i386/mm/init.c +++ b/arch/i386/mm/init.c | |||
@@ -725,16 +725,15 @@ static int noinline do_test_wp_bit(void) | |||
725 | 725 | ||
726 | #ifdef CONFIG_DEBUG_RODATA | 726 | #ifdef CONFIG_DEBUG_RODATA |
727 | 727 | ||
728 | extern char __start_rodata, __end_rodata; | ||
729 | void mark_rodata_ro(void) | 728 | void mark_rodata_ro(void) |
730 | { | 729 | { |
731 | unsigned long addr = (unsigned long)&__start_rodata; | 730 | unsigned long addr = (unsigned long)__start_rodata; |
732 | 731 | ||
733 | for (; addr < (unsigned long)&__end_rodata; addr += PAGE_SIZE) | 732 | for (; addr < (unsigned long)__end_rodata; addr += PAGE_SIZE) |
734 | change_page_attr(virt_to_page(addr), 1, PAGE_KERNEL_RO); | 733 | change_page_attr(virt_to_page(addr), 1, PAGE_KERNEL_RO); |
735 | 734 | ||
736 | printk ("Write protecting the kernel read-only data: %luk\n", | 735 | printk("Write protecting the kernel read-only data: %uk\n", |
737 | (unsigned long)(&__end_rodata - &__start_rodata) >> 10); | 736 | (__end_rodata - __start_rodata) >> 10); |
738 | 737 | ||
739 | /* | 738 | /* |
740 | * change_page_attr() requires a global_flush_tlb() call after it. | 739 | * change_page_attr() requires a global_flush_tlb() call after it. |
diff --git a/arch/i386/pci/irq.c b/arch/i386/pci/irq.c index bdb4896c56e6..4a8995c9c762 100644 --- a/arch/i386/pci/irq.c +++ b/arch/i386/pci/irq.c | |||
@@ -864,7 +864,7 @@ static int pcibios_lookup_irq(struct pci_dev *dev, int assign) | |||
864 | for (i = 0; i < 16; i++) { | 864 | for (i = 0; i < 16; i++) { |
865 | if (!(mask & (1 << i))) | 865 | if (!(mask & (1 << i))) |
866 | continue; | 866 | continue; |
867 | if (pirq_penalty[i] < pirq_penalty[newirq] && can_request_irq(i, SA_SHIRQ)) | 867 | if (pirq_penalty[i] < pirq_penalty[newirq] && can_request_irq(i, IRQF_SHARED)) |
868 | newirq = i; | 868 | newirq = i; |
869 | } | 869 | } |
870 | } | 870 | } |
diff --git a/arch/ia64/hp/sim/simserial.c b/arch/ia64/hp/sim/simserial.c index 33a3bbc8f67f..0daacc20ed36 100644 --- a/arch/ia64/hp/sim/simserial.c +++ b/arch/ia64/hp/sim/simserial.c | |||
@@ -46,7 +46,7 @@ | |||
46 | 46 | ||
47 | #define NR_PORTS 1 /* only one port for now */ | 47 | #define NR_PORTS 1 /* only one port for now */ |
48 | 48 | ||
49 | #define IRQ_T(info) ((info->flags & ASYNC_SHARE_IRQ) ? SA_SHIRQ : SA_INTERRUPT) | 49 | #define IRQ_T(info) ((info->flags & ASYNC_SHARE_IRQ) ? IRQF_SHARED : IRQF_DISABLED) |
50 | 50 | ||
51 | #define SSC_GETCHAR 21 | 51 | #define SSC_GETCHAR 21 |
52 | 52 | ||
diff --git a/arch/ia64/ia32/Makefile b/arch/ia64/ia32/Makefile index 61cb60affd95..baad8c7699c0 100644 --- a/arch/ia64/ia32/Makefile +++ b/arch/ia64/ia32/Makefile | |||
@@ -4,6 +4,7 @@ | |||
4 | 4 | ||
5 | obj-y := ia32_entry.o sys_ia32.o ia32_signal.o \ | 5 | obj-y := ia32_entry.o sys_ia32.o ia32_signal.o \ |
6 | ia32_support.o ia32_traps.o binfmt_elf32.o ia32_ldt.o | 6 | ia32_support.o ia32_traps.o binfmt_elf32.o ia32_ldt.o |
7 | obj-$(CONFIG_AUDIT) += audit.o | ||
7 | 8 | ||
8 | # Don't let GCC uses f16-f31 so that save_ia32_fpstate_live() and | 9 | # Don't let GCC uses f16-f31 so that save_ia32_fpstate_live() and |
9 | # restore_ia32_fpstate_live() can be sure the live register contain user-level state. | 10 | # restore_ia32_fpstate_live() can be sure the live register contain user-level state. |
diff --git a/arch/ia64/ia32/audit.c b/arch/ia64/ia32/audit.c new file mode 100644 index 000000000000..ab94f2e58cdd --- /dev/null +++ b/arch/ia64/ia32/audit.c | |||
@@ -0,0 +1,11 @@ | |||
1 | #include <asm-i386/unistd.h> | ||
2 | |||
3 | unsigned ia32_dir_class[] = { | ||
4 | #include <asm-generic/audit_dir_write.h> | ||
5 | ~0U | ||
6 | }; | ||
7 | |||
8 | unsigned ia32_chattr_class[] = { | ||
9 | #include <asm-generic/audit_change_attr.h> | ||
10 | ~0U | ||
11 | }; | ||
diff --git a/arch/ia64/kernel/Makefile b/arch/ia64/kernel/Makefile index 09a0dbc17fb6..0e4553f320bf 100644 --- a/arch/ia64/kernel/Makefile +++ b/arch/ia64/kernel/Makefile | |||
@@ -29,6 +29,7 @@ obj-$(CONFIG_CPU_FREQ) += cpufreq/ | |||
29 | obj-$(CONFIG_IA64_MCA_RECOVERY) += mca_recovery.o | 29 | obj-$(CONFIG_IA64_MCA_RECOVERY) += mca_recovery.o |
30 | obj-$(CONFIG_KPROBES) += kprobes.o jprobes.o | 30 | obj-$(CONFIG_KPROBES) += kprobes.o jprobes.o |
31 | obj-$(CONFIG_IA64_UNCACHED_ALLOCATOR) += uncached.o | 31 | obj-$(CONFIG_IA64_UNCACHED_ALLOCATOR) += uncached.o |
32 | obj-$(CONFIG_AUDIT) += audit.o | ||
32 | mca_recovery-y += mca_drv.o mca_drv_asm.o | 33 | mca_recovery-y += mca_drv.o mca_drv_asm.o |
33 | 34 | ||
34 | # The gate DSO image is built using a special linker script. | 35 | # The gate DSO image is built using a special linker script. |
diff --git a/arch/ia64/kernel/audit.c b/arch/ia64/kernel/audit.c new file mode 100644 index 000000000000..f2512931ccaf --- /dev/null +++ b/arch/ia64/kernel/audit.c | |||
@@ -0,0 +1,29 @@ | |||
1 | #include <linux/init.h> | ||
2 | #include <linux/types.h> | ||
3 | #include <linux/audit.h> | ||
4 | #include <asm/unistd.h> | ||
5 | |||
6 | static unsigned dir_class[] = { | ||
7 | #include <asm-generic/audit_dir_write.h> | ||
8 | ~0U | ||
9 | }; | ||
10 | |||
11 | static unsigned chattr_class[] = { | ||
12 | #include <asm-generic/audit_change_attr.h> | ||
13 | ~0U | ||
14 | }; | ||
15 | |||
16 | static int __init audit_classes_init(void) | ||
17 | { | ||
18 | #ifdef CONFIG_IA32_SUPPORT | ||
19 | extern __u32 ia32_dir_class[]; | ||
20 | extern __u32 ia32_chattr_class[]; | ||
21 | audit_register_class(AUDIT_CLASS_DIR_WRITE_32, ia32_dir_class); | ||
22 | audit_register_class(AUDIT_CLASS_CHATTR_32, ia32_chattr_class); | ||
23 | #endif | ||
24 | audit_register_class(AUDIT_CLASS_DIR_WRITE, dir_class); | ||
25 | audit_register_class(AUDIT_CLASS_CHATTR, chattr_class); | ||
26 | return 0; | ||
27 | } | ||
28 | |||
29 | __initcall(audit_classes_init); | ||
diff --git a/arch/ia64/kernel/irq_ia64.c b/arch/ia64/kernel/irq_ia64.c index 3e6fcb056bcb..a041367f043b 100644 --- a/arch/ia64/kernel/irq_ia64.c +++ b/arch/ia64/kernel/irq_ia64.c | |||
@@ -235,7 +235,7 @@ extern irqreturn_t handle_IPI (int irq, void *dev_id, struct pt_regs *regs); | |||
235 | 235 | ||
236 | static struct irqaction ipi_irqaction = { | 236 | static struct irqaction ipi_irqaction = { |
237 | .handler = handle_IPI, | 237 | .handler = handle_IPI, |
238 | .flags = SA_INTERRUPT, | 238 | .flags = IRQF_DISABLED, |
239 | .name = "IPI" | 239 | .name = "IPI" |
240 | }; | 240 | }; |
241 | #endif | 241 | #endif |
diff --git a/arch/ia64/kernel/mca.c b/arch/ia64/kernel/mca.c index 584df1772845..eb8e8dc5ac8e 100644 --- a/arch/ia64/kernel/mca.c +++ b/arch/ia64/kernel/mca.c | |||
@@ -1457,38 +1457,38 @@ __setup("disable_cpe_poll", ia64_mca_disable_cpe_polling); | |||
1457 | 1457 | ||
1458 | static struct irqaction cmci_irqaction = { | 1458 | static struct irqaction cmci_irqaction = { |
1459 | .handler = ia64_mca_cmc_int_handler, | 1459 | .handler = ia64_mca_cmc_int_handler, |
1460 | .flags = SA_INTERRUPT, | 1460 | .flags = IRQF_DISABLED, |
1461 | .name = "cmc_hndlr" | 1461 | .name = "cmc_hndlr" |
1462 | }; | 1462 | }; |
1463 | 1463 | ||
1464 | static struct irqaction cmcp_irqaction = { | 1464 | static struct irqaction cmcp_irqaction = { |
1465 | .handler = ia64_mca_cmc_int_caller, | 1465 | .handler = ia64_mca_cmc_int_caller, |
1466 | .flags = SA_INTERRUPT, | 1466 | .flags = IRQF_DISABLED, |
1467 | .name = "cmc_poll" | 1467 | .name = "cmc_poll" |
1468 | }; | 1468 | }; |
1469 | 1469 | ||
1470 | static struct irqaction mca_rdzv_irqaction = { | 1470 | static struct irqaction mca_rdzv_irqaction = { |
1471 | .handler = ia64_mca_rendez_int_handler, | 1471 | .handler = ia64_mca_rendez_int_handler, |
1472 | .flags = SA_INTERRUPT, | 1472 | .flags = IRQF_DISABLED, |
1473 | .name = "mca_rdzv" | 1473 | .name = "mca_rdzv" |
1474 | }; | 1474 | }; |
1475 | 1475 | ||
1476 | static struct irqaction mca_wkup_irqaction = { | 1476 | static struct irqaction mca_wkup_irqaction = { |
1477 | .handler = ia64_mca_wakeup_int_handler, | 1477 | .handler = ia64_mca_wakeup_int_handler, |
1478 | .flags = SA_INTERRUPT, | 1478 | .flags = IRQF_DISABLED, |
1479 | .name = "mca_wkup" | 1479 | .name = "mca_wkup" |
1480 | }; | 1480 | }; |
1481 | 1481 | ||
1482 | #ifdef CONFIG_ACPI | 1482 | #ifdef CONFIG_ACPI |
1483 | static struct irqaction mca_cpe_irqaction = { | 1483 | static struct irqaction mca_cpe_irqaction = { |
1484 | .handler = ia64_mca_cpe_int_handler, | 1484 | .handler = ia64_mca_cpe_int_handler, |
1485 | .flags = SA_INTERRUPT, | 1485 | .flags = IRQF_DISABLED, |
1486 | .name = "cpe_hndlr" | 1486 | .name = "cpe_hndlr" |
1487 | }; | 1487 | }; |
1488 | 1488 | ||
1489 | static struct irqaction mca_cpep_irqaction = { | 1489 | static struct irqaction mca_cpep_irqaction = { |
1490 | .handler = ia64_mca_cpe_int_caller, | 1490 | .handler = ia64_mca_cpe_int_caller, |
1491 | .flags = SA_INTERRUPT, | 1491 | .flags = IRQF_DISABLED, |
1492 | .name = "cpe_poll" | 1492 | .name = "cpe_poll" |
1493 | }; | 1493 | }; |
1494 | #endif /* CONFIG_ACPI */ | 1494 | #endif /* CONFIG_ACPI */ |
diff --git a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c index 92b815d13418..c7ccd6ee1ddf 100644 --- a/arch/ia64/kernel/perfmon.c +++ b/arch/ia64/kernel/perfmon.c | |||
@@ -6439,7 +6439,7 @@ pfm_flush_pmds(struct task_struct *task, pfm_context_t *ctx) | |||
6439 | 6439 | ||
6440 | static struct irqaction perfmon_irqaction = { | 6440 | static struct irqaction perfmon_irqaction = { |
6441 | .handler = pfm_interrupt_handler, | 6441 | .handler = pfm_interrupt_handler, |
6442 | .flags = SA_INTERRUPT, | 6442 | .flags = IRQF_DISABLED, |
6443 | .name = "perfmon" | 6443 | .name = "perfmon" |
6444 | }; | 6444 | }; |
6445 | 6445 | ||
diff --git a/arch/ia64/kernel/time.c b/arch/ia64/kernel/time.c index 71ccddabc715..6928ef0d64d8 100644 --- a/arch/ia64/kernel/time.c +++ b/arch/ia64/kernel/time.c | |||
@@ -231,7 +231,7 @@ ia64_init_itm (void) | |||
231 | 231 | ||
232 | static struct irqaction timer_irqaction = { | 232 | static struct irqaction timer_irqaction = { |
233 | .handler = timer_interrupt, | 233 | .handler = timer_interrupt, |
234 | .flags = SA_INTERRUPT, | 234 | .flags = IRQF_DISABLED, |
235 | .name = "timer" | 235 | .name = "timer" |
236 | }; | 236 | }; |
237 | 237 | ||
diff --git a/arch/ia64/sn/kernel/huberror.c b/arch/ia64/sn/kernel/huberror.c index 56ab6bae00ee..96fb81e6321f 100644 --- a/arch/ia64/sn/kernel/huberror.c +++ b/arch/ia64/sn/kernel/huberror.c | |||
@@ -178,7 +178,7 @@ void hubiio_crb_error_handler(struct hubdev_info *hubdev_info) | |||
178 | */ | 178 | */ |
179 | void hub_error_init(struct hubdev_info *hubdev_info) | 179 | void hub_error_init(struct hubdev_info *hubdev_info) |
180 | { | 180 | { |
181 | if (request_irq(SGI_II_ERROR, (void *)hub_eint_handler, SA_SHIRQ, | 181 | if (request_irq(SGI_II_ERROR, (void *)hub_eint_handler, IRQF_SHARED, |
182 | "SN_hub_error", (void *)hubdev_info)) | 182 | "SN_hub_error", (void *)hubdev_info)) |
183 | printk("hub_error_init: Failed to request_irq for 0x%p\n", | 183 | printk("hub_error_init: Failed to request_irq for 0x%p\n", |
184 | hubdev_info); | 184 | hubdev_info); |
@@ -196,7 +196,7 @@ void hub_error_init(struct hubdev_info *hubdev_info) | |||
196 | void ice_error_init(struct hubdev_info *hubdev_info) | 196 | void ice_error_init(struct hubdev_info *hubdev_info) |
197 | { | 197 | { |
198 | if (request_irq | 198 | if (request_irq |
199 | (SGI_TIO_ERROR, (void *)hub_eint_handler, SA_SHIRQ, "SN_TIO_error", | 199 | (SGI_TIO_ERROR, (void *)hub_eint_handler, IRQF_SHARED, "SN_TIO_error", |
200 | (void *)hubdev_info)) | 200 | (void *)hubdev_info)) |
201 | printk("ice_error_init: request_irq() error hubdev_info 0x%p\n", | 201 | printk("ice_error_init: request_irq() error hubdev_info 0x%p\n", |
202 | hubdev_info); | 202 | hubdev_info); |
diff --git a/arch/ia64/sn/kernel/xpc_channel.c b/arch/ia64/sn/kernel/xpc_channel.c index 8255a9be4632..c2f69f7942af 100644 --- a/arch/ia64/sn/kernel/xpc_channel.c +++ b/arch/ia64/sn/kernel/xpc_channel.c | |||
@@ -202,7 +202,7 @@ xpc_setup_infrastructure(struct xpc_partition *part) | |||
202 | init_waitqueue_head(&part->channel_mgr_wq); | 202 | init_waitqueue_head(&part->channel_mgr_wq); |
203 | 203 | ||
204 | sprintf(part->IPI_owner, "xpc%02d", partid); | 204 | sprintf(part->IPI_owner, "xpc%02d", partid); |
205 | ret = request_irq(SGI_XPC_NOTIFY, xpc_notify_IRQ_handler, SA_SHIRQ, | 205 | ret = request_irq(SGI_XPC_NOTIFY, xpc_notify_IRQ_handler, IRQF_SHARED, |
206 | part->IPI_owner, (void *) (u64) partid); | 206 | part->IPI_owner, (void *) (u64) partid); |
207 | if (ret != 0) { | 207 | if (ret != 0) { |
208 | dev_err(xpc_chan, "can't register NOTIFY IRQ handler, " | 208 | dev_err(xpc_chan, "can't register NOTIFY IRQ handler, " |
diff --git a/arch/ia64/sn/pci/pcibr/pcibr_provider.c b/arch/ia64/sn/pci/pcibr/pcibr_provider.c index ab1211ef0176..838c93c9a16a 100644 --- a/arch/ia64/sn/pci/pcibr/pcibr_provider.c +++ b/arch/ia64/sn/pci/pcibr/pcibr_provider.c | |||
@@ -139,7 +139,7 @@ pcibr_bus_fixup(struct pcibus_bussoft *prom_bussoft, struct pci_controller *cont | |||
139 | * register the bridge's error interrupt handler | 139 | * register the bridge's error interrupt handler |
140 | */ | 140 | */ |
141 | if (request_irq(SGI_PCIASIC_ERROR, (void *)pcibr_error_intr_handler, | 141 | if (request_irq(SGI_PCIASIC_ERROR, (void *)pcibr_error_intr_handler, |
142 | SA_SHIRQ, "PCIBR error", (void *)(soft))) { | 142 | IRQF_SHARED, "PCIBR error", (void *)(soft))) { |
143 | printk(KERN_WARNING | 143 | printk(KERN_WARNING |
144 | "pcibr cannot allocate interrupt for error handler\n"); | 144 | "pcibr cannot allocate interrupt for error handler\n"); |
145 | } | 145 | } |
diff --git a/arch/ia64/sn/pci/tioca_provider.c b/arch/ia64/sn/pci/tioca_provider.c index e4aa839d0189..c36b0f5affb3 100644 --- a/arch/ia64/sn/pci/tioca_provider.c +++ b/arch/ia64/sn/pci/tioca_provider.c | |||
@@ -646,7 +646,7 @@ tioca_bus_fixup(struct pcibus_bussoft *prom_bussoft, struct pci_controller *cont | |||
646 | 646 | ||
647 | if (request_irq(SGI_TIOCA_ERROR, | 647 | if (request_irq(SGI_TIOCA_ERROR, |
648 | tioca_error_intr_handler, | 648 | tioca_error_intr_handler, |
649 | SA_SHIRQ, "TIOCA error", (void *)tioca_common)) | 649 | IRQF_SHARED, "TIOCA error", (void *)tioca_common)) |
650 | printk(KERN_WARNING | 650 | printk(KERN_WARNING |
651 | "%s: Unable to get irq %d. " | 651 | "%s: Unable to get irq %d. " |
652 | "Error interrupts won't be routed for TIOCA bus %d\n", | 652 | "Error interrupts won't be routed for TIOCA bus %d\n", |
diff --git a/arch/ia64/sn/pci/tioce_provider.c b/arch/ia64/sn/pci/tioce_provider.c index 2d7948567ebc..17cd34284886 100644 --- a/arch/ia64/sn/pci/tioce_provider.c +++ b/arch/ia64/sn/pci/tioce_provider.c | |||
@@ -1027,7 +1027,7 @@ tioce_bus_fixup(struct pcibus_bussoft *prom_bussoft, struct pci_controller *cont | |||
1027 | 1027 | ||
1028 | if (request_irq(SGI_PCIASIC_ERROR, | 1028 | if (request_irq(SGI_PCIASIC_ERROR, |
1029 | tioce_error_intr_handler, | 1029 | tioce_error_intr_handler, |
1030 | SA_SHIRQ, "TIOCE error", (void *)tioce_common)) | 1030 | IRQF_SHARED, "TIOCE error", (void *)tioce_common)) |
1031 | printk(KERN_WARNING | 1031 | printk(KERN_WARNING |
1032 | "%s: Unable to get irq %d. " | 1032 | "%s: Unable to get irq %d. " |
1033 | "Error interrupts won't be routed for " | 1033 | "Error interrupts won't be routed for " |
diff --git a/arch/m32r/kernel/time.c b/arch/m32r/kernel/time.c index efff6f5151df..ded0be07a476 100644 --- a/arch/m32r/kernel/time.c +++ b/arch/m32r/kernel/time.c | |||
@@ -237,7 +237,7 @@ irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) | |||
237 | return IRQ_HANDLED; | 237 | return IRQ_HANDLED; |
238 | } | 238 | } |
239 | 239 | ||
240 | struct irqaction irq0 = { timer_interrupt, SA_INTERRUPT, CPU_MASK_NONE, | 240 | struct irqaction irq0 = { timer_interrupt, IRQF_DISABLED, CPU_MASK_NONE, |
241 | "MFT2", NULL, NULL }; | 241 | "MFT2", NULL, NULL }; |
242 | 242 | ||
243 | void __init time_init(void) | 243 | void __init time_init(void) |
diff --git a/arch/m68k/amiga/amiints.c b/arch/m68k/amiga/amiints.c index f9403f4640a1..96c79d840cff 100644 --- a/arch/m68k/amiga/amiints.c +++ b/arch/m68k/amiga/amiints.c | |||
@@ -22,7 +22,7 @@ | |||
22 | * | 22 | * |
23 | * 07/08/99: rewamp of the interrupt handling - we now have two types of | 23 | * 07/08/99: rewamp of the interrupt handling - we now have two types of |
24 | * interrupts, normal and fast handlers, fast handlers being | 24 | * interrupts, normal and fast handlers, fast handlers being |
25 | * marked with SA_INTERRUPT and runs with all other interrupts | 25 | * marked with IRQF_DISABLED and runs with all other interrupts |
26 | * disabled. Normal interrupts disable their own source but | 26 | * disabled. Normal interrupts disable their own source but |
27 | * run with all other interrupt sources enabled. | 27 | * run with all other interrupt sources enabled. |
28 | * PORTS and EXTER interrupts are always shared even if the | 28 | * PORTS and EXTER interrupts are always shared even if the |
diff --git a/arch/m68k/amiga/cia.c b/arch/m68k/amiga/cia.c index 0956e45399e5..dbad30054721 100644 --- a/arch/m68k/amiga/cia.c +++ b/arch/m68k/amiga/cia.c | |||
@@ -176,5 +176,5 @@ 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, SA_SHIRQ, base->name, base); | 179 | request_irq(base->handler_irq, cia_handler, IRQF_SHARED, base->name, base); |
180 | } | 180 | } |
diff --git a/arch/m68k/kernel/ints.c b/arch/m68k/kernel/ints.c index e969f0477640..b33e37fb7b0e 100644 --- a/arch/m68k/kernel/ints.c +++ b/arch/m68k/kernel/ints.c | |||
@@ -192,7 +192,7 @@ int setup_irq(unsigned int irq, struct irq_node *node) | |||
192 | prev = irq_list + irq; | 192 | prev = irq_list + irq; |
193 | if (*prev) { | 193 | if (*prev) { |
194 | /* Can't share interrupts unless both agree to */ | 194 | /* Can't share interrupts unless both agree to */ |
195 | if (!((*prev)->flags & node->flags & SA_SHIRQ)) { | 195 | if (!((*prev)->flags & node->flags & IRQF_SHARED)) { |
196 | spin_unlock_irqrestore(&contr->lock, flags); | 196 | spin_unlock_irqrestore(&contr->lock, flags); |
197 | return -EBUSY; | 197 | return -EBUSY; |
198 | } | 198 | } |
diff --git a/arch/m68knommu/platform/5307/pit.c b/arch/m68knommu/platform/5307/pit.c index 994c893df1a4..9dc5688f71b5 100644 --- a/arch/m68knommu/platform/5307/pit.c +++ b/arch/m68knommu/platform/5307/pit.c | |||
@@ -48,7 +48,7 @@ void coldfire_pit_init(irqreturn_t (*handler)(int, void *, struct pt_regs *)) | |||
48 | volatile unsigned char *icrp; | 48 | volatile unsigned char *icrp; |
49 | volatile unsigned long *imrp; | 49 | volatile unsigned long *imrp; |
50 | 50 | ||
51 | request_irq(MCFINT_VECBASE + MCFINT_PIT1, handler, SA_INTERRUPT, | 51 | request_irq(MCFINT_VECBASE + MCFINT_PIT1, handler, IRQF_DISABLED, |
52 | "ColdFire Timer", NULL); | 52 | "ColdFire Timer", NULL); |
53 | 53 | ||
54 | icrp = (volatile unsigned char *) (MCF_IPSBAR + MCFICM_INTC0 + | 54 | icrp = (volatile unsigned char *) (MCF_IPSBAR + MCFICM_INTC0 + |
diff --git a/arch/m68knommu/platform/5307/timers.c b/arch/m68knommu/platform/5307/timers.c index c3a9755c2d1f..24781f009337 100644 --- a/arch/m68knommu/platform/5307/timers.c +++ b/arch/m68knommu/platform/5307/timers.c | |||
@@ -61,7 +61,7 @@ void coldfire_timer_init(irqreturn_t (*handler)(int, void *, struct pt_regs *)) | |||
61 | __raw_writew(MCFTIMER_TMR_ENORI | MCFTIMER_TMR_CLK16 | | 61 | __raw_writew(MCFTIMER_TMR_ENORI | MCFTIMER_TMR_CLK16 | |
62 | MCFTIMER_TMR_RESTART | MCFTIMER_TMR_ENABLE, TA(MCFTIMER_TMR)); | 62 | MCFTIMER_TMR_RESTART | MCFTIMER_TMR_ENABLE, TA(MCFTIMER_TMR)); |
63 | 63 | ||
64 | request_irq(mcf_timervector, handler, SA_INTERRUPT, "timer", NULL); | 64 | request_irq(mcf_timervector, handler, IRQF_DISABLED, "timer", NULL); |
65 | mcf_settimericr(1, mcf_timerlevel); | 65 | mcf_settimericr(1, mcf_timerlevel); |
66 | 66 | ||
67 | #ifdef CONFIG_HIGHPROFILE | 67 | #ifdef CONFIG_HIGHPROFILE |
@@ -125,7 +125,7 @@ void coldfire_profile_init(void) | |||
125 | MCFTIMER_TMR_RESTART | MCFTIMER_TMR_ENABLE, PA(MCFTIMER_TMR)); | 125 | MCFTIMER_TMR_RESTART | MCFTIMER_TMR_ENABLE, PA(MCFTIMER_TMR)); |
126 | 126 | ||
127 | request_irq(mcf_profilevector, coldfire_profile_tick, | 127 | request_irq(mcf_profilevector, coldfire_profile_tick, |
128 | (SA_INTERRUPT | IRQ_FLG_FAST), "profile timer", NULL); | 128 | (IRQF_DISABLED | IRQ_FLG_FAST), "profile timer", NULL); |
129 | mcf_settimericr(2, 7); | 129 | mcf_settimericr(2, 7); |
130 | } | 130 | } |
131 | 131 | ||
diff --git a/arch/mips/au1000/common/dbdma.c b/arch/mips/au1000/common/dbdma.c index 69cabb7463ff..98244d51c154 100644 --- a/arch/mips/au1000/common/dbdma.c +++ b/arch/mips/au1000/common/dbdma.c | |||
@@ -892,7 +892,7 @@ static void au1xxx_dbdma_init(void) | |||
892 | #error Unknown Au1x00 SOC | 892 | #error Unknown Au1x00 SOC |
893 | #endif | 893 | #endif |
894 | 894 | ||
895 | if (request_irq(irq_nr, dbdma_interrupt, SA_INTERRUPT, | 895 | if (request_irq(irq_nr, dbdma_interrupt, IRQF_DISABLED, |
896 | "Au1xxx dbdma", (void *)dbdma_gptr)) | 896 | "Au1xxx dbdma", (void *)dbdma_gptr)) |
897 | printk("Can't get 1550 dbdma irq"); | 897 | printk("Can't get 1550 dbdma irq"); |
898 | } | 898 | } |
diff --git a/arch/mips/au1000/common/irq.c b/arch/mips/au1000/common/irq.c index c0d56c130a59..29d6f8178bad 100644 --- a/arch/mips/au1000/common/irq.c +++ b/arch/mips/au1000/common/irq.c | |||
@@ -309,7 +309,7 @@ void startup_match20_interrupt(irqreturn_t (*handler)(int, void *, struct pt_reg | |||
309 | * can avoid it. --cgray | 309 | * can avoid it. --cgray |
310 | */ | 310 | */ |
311 | action.dev_id = handler; | 311 | action.dev_id = handler; |
312 | action.flags = SA_INTERRUPT; | 312 | action.flags = IRQF_DISABLED; |
313 | cpus_clear(action.mask); | 313 | cpus_clear(action.mask); |
314 | action.name = "Au1xxx TOY"; | 314 | action.name = "Au1xxx TOY"; |
315 | action.handler = handler; | 315 | action.handler = handler; |
diff --git a/arch/mips/au1000/common/usbdev.c b/arch/mips/au1000/common/usbdev.c index 2cab7629702c..63bcb3a95dc7 100644 --- a/arch/mips/au1000/common/usbdev.c +++ b/arch/mips/au1000/common/usbdev.c | |||
@@ -1465,14 +1465,14 @@ usbdev_init(struct usb_device_descriptor* dev_desc, | |||
1465 | */ | 1465 | */ |
1466 | 1466 | ||
1467 | /* request the USB device transfer complete interrupt */ | 1467 | /* request the USB device transfer complete interrupt */ |
1468 | if (request_irq(AU1000_USB_DEV_REQ_INT, req_sus_intr, SA_INTERRUPT, | 1468 | if (request_irq(AU1000_USB_DEV_REQ_INT, req_sus_intr, IRQF_DISABLED, |
1469 | "USBdev req", &usbdev)) { | 1469 | "USBdev req", &usbdev)) { |
1470 | err("Can't get device request intr"); | 1470 | err("Can't get device request intr"); |
1471 | ret = -ENXIO; | 1471 | ret = -ENXIO; |
1472 | goto out; | 1472 | goto out; |
1473 | } | 1473 | } |
1474 | /* request the USB device suspend interrupt */ | 1474 | /* request the USB device suspend interrupt */ |
1475 | if (request_irq(AU1000_USB_DEV_SUS_INT, req_sus_intr, SA_INTERRUPT, | 1475 | if (request_irq(AU1000_USB_DEV_SUS_INT, req_sus_intr, IRQF_DISABLED, |
1476 | "USBdev sus", &usbdev)) { | 1476 | "USBdev sus", &usbdev)) { |
1477 | err("Can't get device suspend intr"); | 1477 | err("Can't get device suspend intr"); |
1478 | ret = -ENXIO; | 1478 | ret = -ENXIO; |
@@ -1483,7 +1483,7 @@ usbdev_init(struct usb_device_descriptor* dev_desc, | |||
1483 | if ((ep0->indma = request_au1000_dma(ep_dma_id[0].id, | 1483 | if ((ep0->indma = request_au1000_dma(ep_dma_id[0].id, |
1484 | ep_dma_id[0].str, | 1484 | ep_dma_id[0].str, |
1485 | dma_done_ep0_intr, | 1485 | dma_done_ep0_intr, |
1486 | SA_INTERRUPT, | 1486 | IRQF_DISABLED, |
1487 | &usbdev)) < 0) { | 1487 | &usbdev)) < 0) { |
1488 | err("Can't get %s DMA", ep_dma_id[0].str); | 1488 | err("Can't get %s DMA", ep_dma_id[0].str); |
1489 | ret = -ENXIO; | 1489 | ret = -ENXIO; |
@@ -1516,7 +1516,7 @@ usbdev_init(struct usb_device_descriptor* dev_desc, | |||
1516 | request_au1000_dma(ep_dma_id[ep->address].id, | 1516 | request_au1000_dma(ep_dma_id[ep->address].id, |
1517 | ep_dma_id[ep->address].str, | 1517 | ep_dma_id[ep->address].str, |
1518 | dma_done_ep_intr, | 1518 | dma_done_ep_intr, |
1519 | SA_INTERRUPT, | 1519 | IRQF_DISABLED, |
1520 | &usbdev); | 1520 | &usbdev); |
1521 | if (ep->indma < 0) { | 1521 | if (ep->indma < 0) { |
1522 | err("Can't get %s DMA", | 1522 | err("Can't get %s DMA", |
diff --git a/arch/mips/basler/excite/excite_iodev.c b/arch/mips/basler/excite/excite_iodev.c index 91121e523043..b288151b532e 100644 --- a/arch/mips/basler/excite/excite_iodev.c +++ b/arch/mips/basler/excite/excite_iodev.c | |||
@@ -113,7 +113,7 @@ static int __exit iodev_remove(struct device *dev) | |||
113 | 113 | ||
114 | static int iodev_open(struct inode *i, struct file *f) | 114 | static int iodev_open(struct inode *i, struct file *f) |
115 | { | 115 | { |
116 | return request_irq(iodev_irq, iodev_irqhdl, SA_INTERRUPT, | 116 | return request_irq(iodev_irq, iodev_irqhdl, IRQF_DISABLED, |
117 | iodev_name, &miscdev); | 117 | iodev_name, &miscdev); |
118 | } | 118 | } |
119 | 119 | ||
diff --git a/arch/mips/dec/setup.c b/arch/mips/dec/setup.c index 9c707b9ceb65..2684f121784b 100644 --- a/arch/mips/dec/setup.c +++ b/arch/mips/dec/setup.c | |||
@@ -105,7 +105,7 @@ static struct irqaction fpuirq = { | |||
105 | }; | 105 | }; |
106 | 106 | ||
107 | static struct irqaction busirq = { | 107 | static struct irqaction busirq = { |
108 | .flags = SA_INTERRUPT, | 108 | .flags = IRQF_DISABLED, |
109 | .name = "bus error", | 109 | .name = "bus error", |
110 | }; | 110 | }; |
111 | 111 | ||
@@ -124,7 +124,7 @@ static void __init dec_be_init(void) | |||
124 | case MACH_DS23100: /* DS2100/DS3100 Pmin/Pmax */ | 124 | case MACH_DS23100: /* DS2100/DS3100 Pmin/Pmax */ |
125 | board_be_handler = dec_kn01_be_handler; | 125 | board_be_handler = dec_kn01_be_handler; |
126 | busirq.handler = dec_kn01_be_interrupt; | 126 | busirq.handler = dec_kn01_be_interrupt; |
127 | busirq.flags |= SA_SHIRQ; | 127 | busirq.flags |= IRQF_SHARED; |
128 | dec_kn01_be_init(); | 128 | dec_kn01_be_init(); |
129 | break; | 129 | break; |
130 | case MACH_DS5000_1XX: /* DS5000/1xx 3min */ | 130 | case MACH_DS5000_1XX: /* DS5000/1xx 3min */ |
diff --git a/arch/mips/gt64120/common/time.c b/arch/mips/gt64120/common/time.c index c64a7723cafb..d837b26fbe51 100644 --- a/arch/mips/gt64120/common/time.c +++ b/arch/mips/gt64120/common/time.c | |||
@@ -77,7 +77,7 @@ void gt64120_time_init(void) | |||
77 | * the values to the correct interrupt line. | 77 | * the values to the correct interrupt line. |
78 | */ | 78 | */ |
79 | timer.handler = gt64120_irq; | 79 | timer.handler = gt64120_irq; |
80 | timer.flags = SA_SHIRQ | SA_INTERRUPT; | 80 | timer.flags = IRQF_SHARED | IRQF_DISABLED; |
81 | timer.name = "timer"; | 81 | timer.name = "timer"; |
82 | timer.dev_id = NULL; | 82 | timer.dev_id = NULL; |
83 | timer.next = NULL; | 83 | timer.next = NULL; |
diff --git a/arch/mips/kernel/rtlx.c b/arch/mips/kernel/rtlx.c index caf777f83289..cdab1b2cd134 100644 --- a/arch/mips/kernel/rtlx.c +++ b/arch/mips/kernel/rtlx.c | |||
@@ -487,7 +487,7 @@ static struct file_operations rtlx_fops = { | |||
487 | 487 | ||
488 | static struct irqaction rtlx_irq = { | 488 | static struct irqaction rtlx_irq = { |
489 | .handler = rtlx_interrupt, | 489 | .handler = rtlx_interrupt, |
490 | .flags = SA_INTERRUPT, | 490 | .flags = IRQF_DISABLED, |
491 | .name = "RTLX", | 491 | .name = "RTLX", |
492 | }; | 492 | }; |
493 | 493 | ||
diff --git a/arch/mips/kernel/smp-mt.c b/arch/mips/kernel/smp-mt.c index 57770902b9ae..93429a4d3012 100644 --- a/arch/mips/kernel/smp-mt.c +++ b/arch/mips/kernel/smp-mt.c | |||
@@ -130,13 +130,13 @@ irqreturn_t ipi_call_interrupt(int irq, void *dev_id, struct pt_regs *regs) | |||
130 | 130 | ||
131 | static struct irqaction irq_resched = { | 131 | static struct irqaction irq_resched = { |
132 | .handler = ipi_resched_interrupt, | 132 | .handler = ipi_resched_interrupt, |
133 | .flags = SA_INTERRUPT, | 133 | .flags = IRQF_DISABLED, |
134 | .name = "IPI_resched" | 134 | .name = "IPI_resched" |
135 | }; | 135 | }; |
136 | 136 | ||
137 | static struct irqaction irq_call = { | 137 | static struct irqaction irq_call = { |
138 | .handler = ipi_call_interrupt, | 138 | .handler = ipi_call_interrupt, |
139 | .flags = SA_INTERRUPT, | 139 | .flags = IRQF_DISABLED, |
140 | .name = "IPI_call" | 140 | .name = "IPI_call" |
141 | }; | 141 | }; |
142 | 142 | ||
diff --git a/arch/mips/kernel/smtc.c b/arch/mips/kernel/smtc.c index 70cf09afdf56..a48d9e553083 100644 --- a/arch/mips/kernel/smtc.c +++ b/arch/mips/kernel/smtc.c | |||
@@ -1002,7 +1002,7 @@ void setup_cross_vpe_interrupts(void) | |||
1002 | set_vi_handler(MIPS_CPU_IPI_IRQ, ipi_irq_dispatch); | 1002 | set_vi_handler(MIPS_CPU_IPI_IRQ, ipi_irq_dispatch); |
1003 | 1003 | ||
1004 | irq_ipi.handler = ipi_interrupt; | 1004 | irq_ipi.handler = ipi_interrupt; |
1005 | irq_ipi.flags = SA_INTERRUPT; | 1005 | irq_ipi.flags = IRQF_DISABLED; |
1006 | irq_ipi.name = "SMTC_IPI"; | 1006 | irq_ipi.name = "SMTC_IPI"; |
1007 | 1007 | ||
1008 | setup_irq_smtc(cpu_ipi_irq, &irq_ipi, (0x100 << MIPS_CPU_IPI_IRQ)); | 1008 | setup_irq_smtc(cpu_ipi_irq, &irq_ipi, (0x100 << MIPS_CPU_IPI_IRQ)); |
diff --git a/arch/mips/kernel/time.c b/arch/mips/kernel/time.c index c2b1fcf6024f..2393c11d5a20 100644 --- a/arch/mips/kernel/time.c +++ b/arch/mips/kernel/time.c | |||
@@ -579,7 +579,7 @@ unsigned int mips_hpt_frequency; | |||
579 | 579 | ||
580 | static struct irqaction timer_irqaction = { | 580 | static struct irqaction timer_irqaction = { |
581 | .handler = timer_interrupt, | 581 | .handler = timer_interrupt, |
582 | .flags = SA_INTERRUPT, | 582 | .flags = IRQF_DISABLED, |
583 | .name = "timer", | 583 | .name = "timer", |
584 | }; | 584 | }; |
585 | 585 | ||
diff --git a/arch/mips/momentum/jaguar_atx/irq.c b/arch/mips/momentum/jaguar_atx/irq.c index ec4032b38f19..f9067469a656 100644 --- a/arch/mips/momentum/jaguar_atx/irq.c +++ b/arch/mips/momentum/jaguar_atx/irq.c | |||
@@ -71,7 +71,7 @@ asmlinkage void plat_irq_dispatch(struct pt_regs *regs) | |||
71 | } | 71 | } |
72 | 72 | ||
73 | static struct irqaction cascade_mv64340 = { | 73 | static struct irqaction cascade_mv64340 = { |
74 | no_action, SA_INTERRUPT, CPU_MASK_NONE, "MV64340-Cascade", NULL, NULL | 74 | no_action, IRQF_DISABLED, CPU_MASK_NONE, "MV64340-Cascade", NULL, NULL |
75 | }; | 75 | }; |
76 | 76 | ||
77 | void __init arch_init_irq(void) | 77 | void __init arch_init_irq(void) |
diff --git a/arch/mips/momentum/ocelot_3/irq.c b/arch/mips/momentum/ocelot_3/irq.c index 87c63c340ae3..793782a9c195 100644 --- a/arch/mips/momentum/ocelot_3/irq.c +++ b/arch/mips/momentum/ocelot_3/irq.c | |||
@@ -54,7 +54,7 @@ | |||
54 | #include <asm/system.h> | 54 | #include <asm/system.h> |
55 | 55 | ||
56 | static struct irqaction cascade_mv64340 = { | 56 | static struct irqaction cascade_mv64340 = { |
57 | no_action, SA_INTERRUPT, CPU_MASK_NONE, "MV64340-Cascade", NULL, NULL | 57 | no_action, IRQF_DISABLED, CPU_MASK_NONE, "MV64340-Cascade", NULL, NULL |
58 | }; | 58 | }; |
59 | 59 | ||
60 | void __init arch_init_irq(void) | 60 | void __init arch_init_irq(void) |
diff --git a/arch/mips/momentum/ocelot_c/irq.c b/arch/mips/momentum/ocelot_c/irq.c index 86f61ce59e53..9d44ae1e156b 100644 --- a/arch/mips/momentum/ocelot_c/irq.c +++ b/arch/mips/momentum/ocelot_c/irq.c | |||
@@ -52,11 +52,11 @@ extern void uart_irq_init(void); | |||
52 | extern void cpci_irq_init(void); | 52 | extern void cpci_irq_init(void); |
53 | 53 | ||
54 | static struct irqaction cascade_fpga = { | 54 | static struct irqaction cascade_fpga = { |
55 | no_action, SA_INTERRUPT, CPU_MASK_NONE, "cascade via FPGA", NULL, NULL | 55 | no_action, IRQF_DISABLED, CPU_MASK_NONE, "cascade via FPGA", NULL, NULL |
56 | }; | 56 | }; |
57 | 57 | ||
58 | static struct irqaction cascade_mv64340 = { | 58 | static struct irqaction cascade_mv64340 = { |
59 | no_action, SA_INTERRUPT, CPU_MASK_NONE, "cascade via MV64340", NULL, NULL | 59 | no_action, IRQF_DISABLED, CPU_MASK_NONE, "cascade via MV64340", NULL, NULL |
60 | }; | 60 | }; |
61 | 61 | ||
62 | extern void ll_uart_irq(struct pt_regs *regs); | 62 | extern void ll_uart_irq(struct pt_regs *regs); |
diff --git a/arch/mips/momentum/ocelot_g/gt-irq.c b/arch/mips/momentum/ocelot_g/gt-irq.c index 047457f3b97a..9fb2493fff02 100644 --- a/arch/mips/momentum/ocelot_g/gt-irq.c +++ b/arch/mips/momentum/ocelot_g/gt-irq.c | |||
@@ -173,7 +173,7 @@ void gt64240_time_init(void) | |||
173 | * the values to the correct interrupt line. | 173 | * the values to the correct interrupt line. |
174 | */ | 174 | */ |
175 | timer.handler = >64240_p0int_irq; | 175 | timer.handler = >64240_p0int_irq; |
176 | timer.flags = SA_SHIRQ | SA_INTERRUPT; | 176 | timer.flags = IRQF_SHARED | IRQF_DISABLED; |
177 | timer.name = "timer"; | 177 | timer.name = "timer"; |
178 | timer.dev_id = NULL; | 178 | timer.dev_id = NULL; |
179 | timer.next = NULL; | 179 | timer.next = NULL; |
diff --git a/arch/mips/philips/pnx8550/common/int.c b/arch/mips/philips/pnx8550/common/int.c index 388a4df73040..8aca317d4624 100644 --- a/arch/mips/philips/pnx8550/common/int.c +++ b/arch/mips/philips/pnx8550/common/int.c | |||
@@ -219,13 +219,13 @@ static struct hw_interrupt_type level_irq_type = { | |||
219 | 219 | ||
220 | static struct irqaction gic_action = { | 220 | static struct irqaction gic_action = { |
221 | .handler = no_action, | 221 | .handler = no_action, |
222 | .flags = SA_INTERRUPT, | 222 | .flags = IRQF_DISABLED, |
223 | .name = "GIC", | 223 | .name = "GIC", |
224 | }; | 224 | }; |
225 | 225 | ||
226 | static struct irqaction timer_action = { | 226 | static struct irqaction timer_action = { |
227 | .handler = no_action, | 227 | .handler = no_action, |
228 | .flags = SA_INTERRUPT, | 228 | .flags = IRQF_DISABLED, |
229 | .name = "Timer", | 229 | .name = "Timer", |
230 | }; | 230 | }; |
231 | 231 | ||
diff --git a/arch/mips/sgi-ip22/ip22-int.c b/arch/mips/sgi-ip22/ip22-int.c index aee567dc372a..2d8762818d95 100644 --- a/arch/mips/sgi-ip22/ip22-int.c +++ b/arch/mips/sgi-ip22/ip22-int.c | |||
@@ -272,32 +272,32 @@ static void indy_buserror_irq(struct pt_regs *regs) | |||
272 | 272 | ||
273 | static struct irqaction local0_cascade = { | 273 | static struct irqaction local0_cascade = { |
274 | .handler = no_action, | 274 | .handler = no_action, |
275 | .flags = SA_INTERRUPT, | 275 | .flags = IRQF_DISABLED, |
276 | .name = "local0 cascade", | 276 | .name = "local0 cascade", |
277 | }; | 277 | }; |
278 | 278 | ||
279 | static struct irqaction local1_cascade = { | 279 | static struct irqaction local1_cascade = { |
280 | .handler = no_action, | 280 | .handler = no_action, |
281 | .flags = SA_INTERRUPT, | 281 | .flags = IRQF_DISABLED, |
282 | .name = "local1 cascade", | 282 | .name = "local1 cascade", |
283 | }; | 283 | }; |
284 | 284 | ||
285 | static struct irqaction buserr = { | 285 | static struct irqaction buserr = { |
286 | .handler = no_action, | 286 | .handler = no_action, |
287 | .flags = SA_INTERRUPT, | 287 | .flags = IRQF_DISABLED, |
288 | .name = "Bus Error", | 288 | .name = "Bus Error", |
289 | }; | 289 | }; |
290 | 290 | ||
291 | static struct irqaction map0_cascade = { | 291 | static struct irqaction map0_cascade = { |
292 | .handler = no_action, | 292 | .handler = no_action, |
293 | .flags = SA_INTERRUPT, | 293 | .flags = IRQF_DISABLED, |
294 | .name = "mapable0 cascade", | 294 | .name = "mapable0 cascade", |
295 | }; | 295 | }; |
296 | 296 | ||
297 | #ifdef USE_LIO3_IRQ | 297 | #ifdef USE_LIO3_IRQ |
298 | static struct irqaction map1_cascade = { | 298 | static struct irqaction map1_cascade = { |
299 | .handler = no_action, | 299 | .handler = no_action, |
300 | .flags = SA_INTERRUPT, | 300 | .flags = IRQF_DISABLED, |
301 | .name = "mapable1 cascade", | 301 | .name = "mapable1 cascade", |
302 | }; | 302 | }; |
303 | #define SGI_INTERRUPTS SGINT_END | 303 | #define SGI_INTERRUPTS SGINT_END |
diff --git a/arch/mips/sgi-ip27/ip27-irq.c b/arch/mips/sgi-ip27/ip27-irq.c index a94e4c785805..597ec73359b7 100644 --- a/arch/mips/sgi-ip27/ip27-irq.c +++ b/arch/mips/sgi-ip27/ip27-irq.c | |||
@@ -118,7 +118,7 @@ static int ms1bit(unsigned long x) | |||
118 | } | 118 | } |
119 | 119 | ||
120 | /* | 120 | /* |
121 | * This code is unnecessarily complex, because we do SA_INTERRUPT | 121 | * This code is unnecessarily complex, because we do IRQF_DISABLED |
122 | * intr enabling. Basically, once we grab the set of intrs we need | 122 | * intr enabling. Basically, once we grab the set of intrs we need |
123 | * to service, we must mask _all_ these interrupts; firstly, to make | 123 | * to service, we must mask _all_ these interrupts; firstly, to make |
124 | * sure the same intr does not intr again, causing recursion that | 124 | * sure the same intr does not intr again, causing recursion that |
diff --git a/arch/mips/sgi-ip27/ip27-timer.c b/arch/mips/sgi-ip27/ip27-timer.c index 1fb860c7ac6d..3ca614a851e5 100644 --- a/arch/mips/sgi-ip27/ip27-timer.c +++ b/arch/mips/sgi-ip27/ip27-timer.c | |||
@@ -217,7 +217,7 @@ static struct hw_interrupt_type rt_irq_type = { | |||
217 | 217 | ||
218 | static struct irqaction rt_irqaction = { | 218 | static struct irqaction rt_irqaction = { |
219 | .handler = ip27_rt_timer_interrupt, | 219 | .handler = ip27_rt_timer_interrupt, |
220 | .flags = SA_INTERRUPT, | 220 | .flags = IRQF_DISABLED, |
221 | .mask = CPU_MASK_NONE, | 221 | .mask = CPU_MASK_NONE, |
222 | .name = "timer" | 222 | .name = "timer" |
223 | }; | 223 | }; |
diff --git a/arch/mips/sgi-ip32/ip32-irq.c b/arch/mips/sgi-ip32/ip32-irq.c index 00b94aaf6371..3b7e74b6222e 100644 --- a/arch/mips/sgi-ip32/ip32-irq.c +++ b/arch/mips/sgi-ip32/ip32-irq.c | |||
@@ -125,9 +125,9 @@ extern irqreturn_t crime_memerr_intr (int irq, void *dev_id, | |||
125 | extern irqreturn_t crime_cpuerr_intr (int irq, void *dev_id, | 125 | extern irqreturn_t crime_cpuerr_intr (int irq, void *dev_id, |
126 | struct pt_regs *regs); | 126 | struct pt_regs *regs); |
127 | 127 | ||
128 | struct irqaction memerr_irq = { crime_memerr_intr, SA_INTERRUPT, | 128 | struct irqaction memerr_irq = { crime_memerr_intr, IRQF_DISABLED, |
129 | CPU_MASK_NONE, "CRIME memory error", NULL, NULL }; | 129 | CPU_MASK_NONE, "CRIME memory error", NULL, NULL }; |
130 | struct irqaction cpuerr_irq = { crime_cpuerr_intr, SA_INTERRUPT, | 130 | struct irqaction cpuerr_irq = { crime_cpuerr_intr, IRQF_DISABLED, |
131 | CPU_MASK_NONE, "CRIME CPU error", NULL, NULL }; | 131 | CPU_MASK_NONE, "CRIME CPU error", NULL, NULL }; |
132 | 132 | ||
133 | /* | 133 | /* |
@@ -316,9 +316,9 @@ static struct hw_interrupt_type ip32_macepci_interrupt = { | |||
316 | MACEISA_KEYB_POLL_INT | \ | 316 | MACEISA_KEYB_POLL_INT | \ |
317 | MACEISA_MOUSE_INT | \ | 317 | MACEISA_MOUSE_INT | \ |
318 | MACEISA_MOUSE_POLL_INT | \ | 318 | MACEISA_MOUSE_POLL_INT | \ |
319 | MACEISA_TIMER0_INT | \ | 319 | MACEIIRQF_TIMER0_INT | \ |
320 | MACEISA_TIMER1_INT | \ | 320 | MACEIIRQF_TIMER1_INT | \ |
321 | MACEISA_TIMER2_INT) | 321 | MACEIIRQF_TIMER2_INT) |
322 | #define MACEISA_SUPERIO_INT (MACEISA_PARALLEL_INT | \ | 322 | #define MACEISA_SUPERIO_INT (MACEISA_PARALLEL_INT | \ |
323 | MACEISA_PAR_CTXA_INT | \ | 323 | MACEISA_PAR_CTXA_INT | \ |
324 | MACEISA_PAR_CTXB_INT | \ | 324 | MACEISA_PAR_CTXB_INT | \ |
@@ -349,7 +349,7 @@ static void enable_maceisa_irq (unsigned int irq) | |||
349 | case MACEISA_AUDIO_SW_IRQ ... MACEISA_AUDIO3_MERR_IRQ: | 349 | case MACEISA_AUDIO_SW_IRQ ... MACEISA_AUDIO3_MERR_IRQ: |
350 | crime_int = MACE_AUDIO_INT; | 350 | crime_int = MACE_AUDIO_INT; |
351 | break; | 351 | break; |
352 | case MACEISA_RTC_IRQ ... MACEISA_TIMER2_IRQ: | 352 | case MACEISA_RTC_IRQ ... MACEIIRQF_TIMER2_IRQ: |
353 | crime_int = MACE_MISC_INT; | 353 | crime_int = MACE_MISC_INT; |
354 | break; | 354 | break; |
355 | case MACEISA_PARALLEL_IRQ ... MACEISA_SERIAL2_RDMAOR_IRQ: | 355 | case MACEISA_PARALLEL_IRQ ... MACEISA_SERIAL2_RDMAOR_IRQ: |
diff --git a/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_irq.c b/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_irq.c index ee943cb1328c..ec0a0de3083d 100644 --- a/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_irq.c +++ b/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_irq.c | |||
@@ -337,7 +337,7 @@ int toshiba_rbtx4927_irq_nested(int sw_irq) | |||
337 | } | 337 | } |
338 | 338 | ||
339 | //#define TOSHIBA_RBTX4927_PIC_ACTION(s) { no_action, 0, CPU_MASK_NONE, s, NULL, NULL } | 339 | //#define TOSHIBA_RBTX4927_PIC_ACTION(s) { no_action, 0, CPU_MASK_NONE, s, NULL, NULL } |
340 | #define TOSHIBA_RBTX4927_PIC_ACTION(s) { no_action, SA_SHIRQ, CPU_MASK_NONE, s, NULL, NULL } | 340 | #define TOSHIBA_RBTX4927_PIC_ACTION(s) { no_action, IRQF_SHARED, CPU_MASK_NONE, s, NULL, NULL } |
341 | static struct irqaction toshiba_rbtx4927_irq_ioc_action = | 341 | static struct irqaction toshiba_rbtx4927_irq_ioc_action = |
342 | TOSHIBA_RBTX4927_PIC_ACTION(TOSHIBA_RBTX4927_IOC_NAME); | 342 | TOSHIBA_RBTX4927_PIC_ACTION(TOSHIBA_RBTX4927_IOC_NAME); |
343 | #ifdef CONFIG_TOSHIBA_FPCIB0 | 343 | #ifdef CONFIG_TOSHIBA_FPCIB0 |
diff --git a/arch/parisc/kernel/irq.c b/arch/parisc/kernel/irq.c index 52761d96f991..5b8803cc3d69 100644 --- a/arch/parisc/kernel/irq.c +++ b/arch/parisc/kernel/irq.c | |||
@@ -366,14 +366,14 @@ void do_cpu_irq_mask(struct pt_regs *regs) | |||
366 | static struct irqaction timer_action = { | 366 | static struct irqaction timer_action = { |
367 | .handler = timer_interrupt, | 367 | .handler = timer_interrupt, |
368 | .name = "timer", | 368 | .name = "timer", |
369 | .flags = SA_INTERRUPT, | 369 | .flags = IRQF_DISABLED, |
370 | }; | 370 | }; |
371 | 371 | ||
372 | #ifdef CONFIG_SMP | 372 | #ifdef CONFIG_SMP |
373 | static struct irqaction ipi_action = { | 373 | static struct irqaction ipi_action = { |
374 | .handler = ipi_interrupt, | 374 | .handler = ipi_interrupt, |
375 | .name = "IPI", | 375 | .name = "IPI", |
376 | .flags = SA_INTERRUPT, | 376 | .flags = IRQF_DISABLED, |
377 | }; | 377 | }; |
378 | #endif | 378 | #endif |
379 | 379 | ||
diff --git a/arch/parisc/mm/init.c b/arch/parisc/mm/init.c index b64602a99d89..f2b96f1e0da7 100644 --- a/arch/parisc/mm/init.c +++ b/arch/parisc/mm/init.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <asm/tlb.h> | 27 | #include <asm/tlb.h> |
28 | #include <asm/pdc_chassis.h> | 28 | #include <asm/pdc_chassis.h> |
29 | #include <asm/mmzone.h> | 29 | #include <asm/mmzone.h> |
30 | #include <asm/sections.h> | ||
30 | 31 | ||
31 | DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); | 32 | DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); |
32 | 33 | ||
@@ -417,11 +418,10 @@ void free_initmem(void) | |||
417 | #ifdef CONFIG_DEBUG_RODATA | 418 | #ifdef CONFIG_DEBUG_RODATA |
418 | void mark_rodata_ro(void) | 419 | void mark_rodata_ro(void) |
419 | { | 420 | { |
420 | extern char __start_rodata, __end_rodata; | ||
421 | /* rodata memory was already mapped with KERNEL_RO access rights by | 421 | /* rodata memory was already mapped with KERNEL_RO access rights by |
422 | pagetable_init() and map_pages(). No need to do additional stuff here */ | 422 | pagetable_init() and map_pages(). No need to do additional stuff here */ |
423 | printk (KERN_INFO "Write protecting the kernel read-only data: %luk\n", | 423 | printk (KERN_INFO "Write protecting the kernel read-only data: %luk\n", |
424 | (unsigned long)(&__end_rodata - &__start_rodata) >> 10); | 424 | (unsigned long)(__end_rodata - __start_rodata) >> 10); |
425 | } | 425 | } |
426 | #endif | 426 | #endif |
427 | 427 | ||
diff --git a/arch/powerpc/platforms/cell/interrupt.c b/arch/powerpc/platforms/cell/interrupt.c index 880c8083d16f..22da1335445a 100644 --- a/arch/powerpc/platforms/cell/interrupt.c +++ b/arch/powerpc/platforms/cell/interrupt.c | |||
@@ -304,11 +304,11 @@ static void iic_request_ipi(int ipi, const char *name) | |||
304 | int irq; | 304 | int irq; |
305 | 305 | ||
306 | irq = iic_ipi_to_irq(ipi); | 306 | irq = iic_ipi_to_irq(ipi); |
307 | /* IPIs are marked SA_INTERRUPT as they must run with irqs | 307 | /* IPIs are marked IRQF_DISABLED as they must run with irqs |
308 | * disabled */ | 308 | * disabled */ |
309 | get_irq_desc(irq)->chip = &iic_pic; | 309 | get_irq_desc(irq)->chip = &iic_pic; |
310 | get_irq_desc(irq)->status |= IRQ_PER_CPU; | 310 | get_irq_desc(irq)->status |= IRQ_PER_CPU; |
311 | request_irq(irq, iic_ipi_action, SA_INTERRUPT, name, NULL); | 311 | request_irq(irq, iic_ipi_action, IRQF_DISABLED, name, NULL); |
312 | } | 312 | } |
313 | 313 | ||
314 | void iic_request_IPIs(void) | 314 | void iic_request_IPIs(void) |
diff --git a/arch/powerpc/platforms/cell/spu_base.c b/arch/powerpc/platforms/cell/spu_base.c index b306723abb87..656c1ef5f4ad 100644 --- a/arch/powerpc/platforms/cell/spu_base.c +++ b/arch/powerpc/platforms/cell/spu_base.c | |||
@@ -274,19 +274,19 @@ spu_request_irqs(struct spu *spu) | |||
274 | 274 | ||
275 | snprintf(spu->irq_c0, sizeof (spu->irq_c0), "spe%02d.0", spu->number); | 275 | snprintf(spu->irq_c0, sizeof (spu->irq_c0), "spe%02d.0", spu->number); |
276 | ret = request_irq(irq_base + spu->isrc, | 276 | ret = request_irq(irq_base + spu->isrc, |
277 | spu_irq_class_0, SA_INTERRUPT, spu->irq_c0, spu); | 277 | spu_irq_class_0, IRQF_DISABLED, spu->irq_c0, spu); |
278 | if (ret) | 278 | if (ret) |
279 | goto out; | 279 | goto out; |
280 | 280 | ||
281 | snprintf(spu->irq_c1, sizeof (spu->irq_c1), "spe%02d.1", spu->number); | 281 | snprintf(spu->irq_c1, sizeof (spu->irq_c1), "spe%02d.1", spu->number); |
282 | ret = request_irq(irq_base + IIC_CLASS_STRIDE + spu->isrc, | 282 | ret = request_irq(irq_base + IIC_CLASS_STRIDE + spu->isrc, |
283 | spu_irq_class_1, SA_INTERRUPT, spu->irq_c1, spu); | 283 | spu_irq_class_1, IRQF_DISABLED, spu->irq_c1, spu); |
284 | if (ret) | 284 | if (ret) |
285 | goto out1; | 285 | goto out1; |
286 | 286 | ||
287 | snprintf(spu->irq_c2, sizeof (spu->irq_c2), "spe%02d.2", spu->number); | 287 | snprintf(spu->irq_c2, sizeof (spu->irq_c2), "spe%02d.2", spu->number); |
288 | ret = request_irq(irq_base + 2*IIC_CLASS_STRIDE + spu->isrc, | 288 | ret = request_irq(irq_base + 2*IIC_CLASS_STRIDE + spu->isrc, |
289 | spu_irq_class_2, SA_INTERRUPT, spu->irq_c2, spu); | 289 | spu_irq_class_2, IRQF_DISABLED, spu->irq_c2, spu); |
290 | if (ret) | 290 | if (ret) |
291 | goto out2; | 291 | goto out2; |
292 | goto out; | 292 | goto out; |
diff --git a/arch/powerpc/platforms/powermac/pic.c b/arch/powerpc/platforms/powermac/pic.c index 532bce57c0dc..c9b09a9e6050 100644 --- a/arch/powerpc/platforms/powermac/pic.c +++ b/arch/powerpc/platforms/powermac/pic.c | |||
@@ -381,7 +381,7 @@ static struct irqaction xmon_action = { | |||
381 | 381 | ||
382 | static struct irqaction gatwick_cascade_action = { | 382 | static struct irqaction gatwick_cascade_action = { |
383 | .handler = gatwick_action, | 383 | .handler = gatwick_action, |
384 | .flags = SA_INTERRUPT, | 384 | .flags = IRQF_DISABLED, |
385 | .mask = CPU_MASK_NONE, | 385 | .mask = CPU_MASK_NONE, |
386 | .name = "cascade", | 386 | .name = "cascade", |
387 | }; | 387 | }; |
diff --git a/arch/powerpc/platforms/powermac/smp.c b/arch/powerpc/platforms/powermac/smp.c index 63affcb24219..827b7121ffb8 100644 --- a/arch/powerpc/platforms/powermac/smp.c +++ b/arch/powerpc/platforms/powermac/smp.c | |||
@@ -377,7 +377,7 @@ static void __init psurge_dual_sync_tb(int cpu_nr) | |||
377 | 377 | ||
378 | static struct irqaction psurge_irqaction = { | 378 | static struct irqaction psurge_irqaction = { |
379 | .handler = psurge_primary_intr, | 379 | .handler = psurge_primary_intr, |
380 | .flags = SA_INTERRUPT, | 380 | .flags = IRQF_DISABLED, |
381 | .mask = CPU_MASK_NONE, | 381 | .mask = CPU_MASK_NONE, |
382 | .name = "primary IPI", | 382 | .name = "primary IPI", |
383 | }; | 383 | }; |
diff --git a/arch/powerpc/platforms/pseries/xics.c b/arch/powerpc/platforms/pseries/xics.c index 4d935d0817f2..2ffebe31cb2d 100644 --- a/arch/powerpc/platforms/pseries/xics.c +++ b/arch/powerpc/platforms/pseries/xics.c | |||
@@ -59,7 +59,7 @@ static struct radix_tree_root irq_map = RADIX_TREE_INIT(GFP_ATOMIC); | |||
59 | 59 | ||
60 | /* | 60 | /* |
61 | * Mark IPIs as higher priority so we can take them inside interrupts that | 61 | * Mark IPIs as higher priority so we can take them inside interrupts that |
62 | * arent marked SA_INTERRUPT | 62 | * arent marked IRQF_DISABLED |
63 | */ | 63 | */ |
64 | #define IPI_PRIORITY 4 | 64 | #define IPI_PRIORITY 4 |
65 | 65 | ||
@@ -586,9 +586,12 @@ void xics_request_IPIs(void) | |||
586 | { | 586 | { |
587 | virt_irq_to_real_map[XICS_IPI] = XICS_IPI; | 587 | virt_irq_to_real_map[XICS_IPI] = XICS_IPI; |
588 | 588 | ||
589 | /* IPIs are marked SA_INTERRUPT as they must run with irqs disabled */ | 589 | /* |
590 | request_irq(irq_offset_up(XICS_IPI), xics_ipi_action, SA_INTERRUPT, | 590 | * IPIs are marked IRQF_DISABLED as they must run with irqs |
591 | "IPI", NULL); | 591 | * disabled |
592 | */ | ||
593 | request_irq(irq_offset_up(XICS_IPI), xics_ipi_action, | ||
594 | IRQF_DISABLED, "IPI", NULL); | ||
592 | get_irq_desc(irq_offset_up(XICS_IPI))->status |= IRQ_PER_CPU; | 595 | get_irq_desc(irq_offset_up(XICS_IPI))->status |= IRQ_PER_CPU; |
593 | } | 596 | } |
594 | #endif | 597 | #endif |
diff --git a/arch/powerpc/sysdev/i8259.c b/arch/powerpc/sysdev/i8259.c index 2bff30f6d635..1a3ef1ab9d6e 100644 --- a/arch/powerpc/sysdev/i8259.c +++ b/arch/powerpc/sysdev/i8259.c | |||
@@ -167,7 +167,7 @@ static struct resource pic_edgectrl_iores = { | |||
167 | 167 | ||
168 | static struct irqaction i8259_irqaction = { | 168 | static struct irqaction i8259_irqaction = { |
169 | .handler = no_action, | 169 | .handler = no_action, |
170 | .flags = SA_INTERRUPT, | 170 | .flags = IRQF_DISABLED, |
171 | .mask = CPU_MASK_NONE, | 171 | .mask = CPU_MASK_NONE, |
172 | .name = "82c59 secondary cascade", | 172 | .name = "82c59 secondary cascade", |
173 | }; | 173 | }; |
diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c index 63ff89575cbb..7e469358895f 100644 --- a/arch/powerpc/sysdev/mpic.c +++ b/arch/powerpc/sysdev/mpic.c | |||
@@ -540,7 +540,7 @@ static void mpic_end_ipi(unsigned int irq) | |||
540 | * IPIs are marked IRQ_PER_CPU. This has the side effect of | 540 | * IPIs are marked IRQ_PER_CPU. This has the side effect of |
541 | * preventing the IRQ_PENDING/IRQ_INPROGRESS logic from | 541 | * preventing the IRQ_PENDING/IRQ_INPROGRESS logic from |
542 | * applying to them. We EOI them late to avoid re-entering. | 542 | * applying to them. We EOI them late to avoid re-entering. |
543 | * We mark IPI's with SA_INTERRUPT as they must run with | 543 | * We mark IPI's with IRQF_DISABLED as they must run with |
544 | * irqs disabled. | 544 | * irqs disabled. |
545 | */ | 545 | */ |
546 | mpic_eoi(mpic); | 546 | mpic_eoi(mpic); |
@@ -1027,14 +1027,17 @@ void mpic_request_ipis(void) | |||
1027 | 1027 | ||
1028 | printk("requesting IPIs ... \n"); | 1028 | printk("requesting IPIs ... \n"); |
1029 | 1029 | ||
1030 | /* IPIs are marked SA_INTERRUPT as they must run with irqs disabled */ | 1030 | /* |
1031 | request_irq(mpic->ipi_offset+0, mpic_ipi_action, SA_INTERRUPT, | 1031 | * IPIs are marked IRQF_DISABLED as they must run with irqs |
1032 | * disabled | ||
1033 | */ | ||
1034 | request_irq(mpic->ipi_offset+0, mpic_ipi_action, IRQF_DISABLED, | ||
1032 | "IPI0 (call function)", mpic); | 1035 | "IPI0 (call function)", mpic); |
1033 | request_irq(mpic->ipi_offset+1, mpic_ipi_action, SA_INTERRUPT, | 1036 | request_irq(mpic->ipi_offset+1, mpic_ipi_action, IRQF_DISABLED, |
1034 | "IPI1 (reschedule)", mpic); | 1037 | "IPI1 (reschedule)", mpic); |
1035 | request_irq(mpic->ipi_offset+2, mpic_ipi_action, SA_INTERRUPT, | 1038 | request_irq(mpic->ipi_offset+2, mpic_ipi_action, IRQF_DISABLED, |
1036 | "IPI2 (unused)", mpic); | 1039 | "IPI2 (unused)", mpic); |
1037 | request_irq(mpic->ipi_offset+3, mpic_ipi_action, SA_INTERRUPT, | 1040 | request_irq(mpic->ipi_offset+3, mpic_ipi_action, IRQF_DISABLED, |
1038 | "IPI3 (debugger break)", mpic); | 1041 | "IPI3 (debugger break)", mpic); |
1039 | 1042 | ||
1040 | printk("IPIs requested... \n"); | 1043 | printk("IPIs requested... \n"); |
diff --git a/arch/ppc/8260_io/fcc_enet.c b/arch/ppc/8260_io/fcc_enet.c index cd5f3faa4b20..e347fe88316d 100644 --- a/arch/ppc/8260_io/fcc_enet.c +++ b/arch/ppc/8260_io/fcc_enet.c | |||
@@ -2116,7 +2116,7 @@ init_fcc_startup(fcc_info_t *fip, struct net_device *dev) | |||
2116 | 2116 | ||
2117 | #ifdef PHY_INTERRUPT | 2117 | #ifdef PHY_INTERRUPT |
2118 | #ifdef CONFIG_ADS8272 | 2118 | #ifdef CONFIG_ADS8272 |
2119 | if (request_irq(PHY_INTERRUPT, mii_link_interrupt, SA_SHIRQ, | 2119 | if (request_irq(PHY_INTERRUPT, mii_link_interrupt, IRQF_SHARED, |
2120 | "mii", dev) < 0) | 2120 | "mii", dev) < 0) |
2121 | printk(KERN_CRIT "Can't get MII IRQ %d\n", PHY_INTERRUPT); | 2121 | printk(KERN_CRIT "Can't get MII IRQ %d\n", PHY_INTERRUPT); |
2122 | #else | 2122 | #else |
diff --git a/arch/ppc/platforms/85xx/mpc8560_ads.c b/arch/ppc/platforms/85xx/mpc8560_ads.c index 026ace320729..d90cd24d018e 100644 --- a/arch/ppc/platforms/85xx/mpc8560_ads.c +++ b/arch/ppc/platforms/85xx/mpc8560_ads.c | |||
@@ -131,7 +131,7 @@ static irqreturn_t cpm2_cascade(int irq, void *dev_id, struct pt_regs *regs) | |||
131 | 131 | ||
132 | static struct irqaction cpm2_irqaction = { | 132 | static struct irqaction cpm2_irqaction = { |
133 | .handler = cpm2_cascade, | 133 | .handler = cpm2_cascade, |
134 | .flags = SA_INTERRUPT, | 134 | .flags = IRQF_DISABLED, |
135 | .mask = CPU_MASK_NONE, | 135 | .mask = CPU_MASK_NONE, |
136 | .name = "cpm2_cascade", | 136 | .name = "cpm2_cascade", |
137 | }; | 137 | }; |
diff --git a/arch/ppc/platforms/85xx/mpc85xx_cds_common.c b/arch/ppc/platforms/85xx/mpc85xx_cds_common.c index 139cf0d00855..75204588a3e7 100644 --- a/arch/ppc/platforms/85xx/mpc85xx_cds_common.c +++ b/arch/ppc/platforms/85xx/mpc85xx_cds_common.c | |||
@@ -136,7 +136,7 @@ static irqreturn_t cpm2_cascade(int irq, void *dev_id, struct pt_regs *regs) | |||
136 | 136 | ||
137 | static struct irqaction cpm2_irqaction = { | 137 | static struct irqaction cpm2_irqaction = { |
138 | .handler = cpm2_cascade, | 138 | .handler = cpm2_cascade, |
139 | .flags = SA_INTERRUPT, | 139 | .flags = IRQF_DISABLED, |
140 | .mask = CPU_MASK_NONE, | 140 | .mask = CPU_MASK_NONE, |
141 | .name = "cpm2_cascade", | 141 | .name = "cpm2_cascade", |
142 | }; | 142 | }; |
diff --git a/arch/ppc/platforms/85xx/stx_gp3.c b/arch/ppc/platforms/85xx/stx_gp3.c index 224612412cbe..495aa79bb3a1 100644 --- a/arch/ppc/platforms/85xx/stx_gp3.c +++ b/arch/ppc/platforms/85xx/stx_gp3.c | |||
@@ -166,7 +166,7 @@ static irqreturn_t cpm2_cascade(int irq, void *dev_id, struct pt_regs *regs) | |||
166 | 166 | ||
167 | static struct irqaction cpm2_irqaction = { | 167 | static struct irqaction cpm2_irqaction = { |
168 | .handler = cpm2_cascade, | 168 | .handler = cpm2_cascade, |
169 | .flags = SA_INTERRUPT, | 169 | .flags = IRQF_DISABLED, |
170 | .mask = CPU_MASK_NONE, | 170 | .mask = CPU_MASK_NONE, |
171 | .name = "cpm2_cascade", | 171 | .name = "cpm2_cascade", |
172 | }; | 172 | }; |
diff --git a/arch/ppc/platforms/85xx/tqm85xx.c b/arch/ppc/platforms/85xx/tqm85xx.c index 1c90f113cc8f..189ed4175f9f 100644 --- a/arch/ppc/platforms/85xx/tqm85xx.c +++ b/arch/ppc/platforms/85xx/tqm85xx.c | |||
@@ -190,7 +190,7 @@ static irqreturn_t cpm2_cascade(int irq, void *dev_id, struct pt_regs *regs) | |||
190 | 190 | ||
191 | static struct irqaction cpm2_irqaction = { | 191 | static struct irqaction cpm2_irqaction = { |
192 | .handler = cpm2_cascade, | 192 | .handler = cpm2_cascade, |
193 | .flags = SA_INTERRUPT, | 193 | .flags = IRQF_DISABLED, |
194 | .mask = CPU_MASK_NONE, | 194 | .mask = CPU_MASK_NONE, |
195 | .name = "cpm2_cascade", | 195 | .name = "cpm2_cascade", |
196 | }; | 196 | }; |
diff --git a/arch/ppc/platforms/hdpu.c b/arch/ppc/platforms/hdpu.c index 71af4b488621..e0f112a1fd0b 100644 --- a/arch/ppc/platforms/hdpu.c +++ b/arch/ppc/platforms/hdpu.c | |||
@@ -837,7 +837,7 @@ static void smp_hdpu_setup_cpu(int cpu_nr) | |||
837 | mv64x60_write(&bh, MV64360_CPU0_DOORBELL_CLR, 0xff); | 837 | mv64x60_write(&bh, MV64360_CPU0_DOORBELL_CLR, 0xff); |
838 | mv64x60_write(&bh, MV64360_CPU0_DOORBELL_MASK, 0xff); | 838 | mv64x60_write(&bh, MV64360_CPU0_DOORBELL_MASK, 0xff); |
839 | request_irq(60, hdpu_smp_cpu0_int_handler, | 839 | request_irq(60, hdpu_smp_cpu0_int_handler, |
840 | SA_INTERRUPT, hdpu_smp0, 0); | 840 | IRQF_DISABLED, hdpu_smp0, 0); |
841 | } | 841 | } |
842 | 842 | ||
843 | if (cpu_nr == 1) { | 843 | if (cpu_nr == 1) { |
@@ -857,7 +857,7 @@ static void smp_hdpu_setup_cpu(int cpu_nr) | |||
857 | mv64x60_write(&bh, MV64360_CPU1_DOORBELL_CLR, 0x0); | 857 | mv64x60_write(&bh, MV64360_CPU1_DOORBELL_CLR, 0x0); |
858 | mv64x60_write(&bh, MV64360_CPU1_DOORBELL_MASK, 0xff); | 858 | mv64x60_write(&bh, MV64360_CPU1_DOORBELL_MASK, 0xff); |
859 | request_irq(28, hdpu_smp_cpu1_int_handler, | 859 | request_irq(28, hdpu_smp_cpu1_int_handler, |
860 | SA_INTERRUPT, hdpu_smp1, 0); | 860 | IRQF_DISABLED, hdpu_smp1, 0); |
861 | } | 861 | } |
862 | 862 | ||
863 | } | 863 | } |
diff --git a/arch/ppc/platforms/radstone_ppc7d.c b/arch/ppc/platforms/radstone_ppc7d.c index 97d6c21091e0..3bb530af0297 100644 --- a/arch/ppc/platforms/radstone_ppc7d.c +++ b/arch/ppc/platforms/radstone_ppc7d.c | |||
@@ -1310,7 +1310,7 @@ static void ppc7d_init2(void) | |||
1310 | 1310 | ||
1311 | /* Hook up i8259 interrupt which is connected to GPP28 */ | 1311 | /* Hook up i8259 interrupt which is connected to GPP28 */ |
1312 | request_irq(mv64360_irq_base + MV64x60_IRQ_GPP28, ppc7d_i8259_intr, | 1312 | request_irq(mv64360_irq_base + MV64x60_IRQ_GPP28, ppc7d_i8259_intr, |
1313 | SA_INTERRUPT, "I8259 (GPP28) interrupt", (void *)0); | 1313 | IRQF_DISABLED, "I8259 (GPP28) interrupt", (void *)0); |
1314 | 1314 | ||
1315 | /* Configure MPP16 as watchdog NMI, MPP17 as watchdog WDE */ | 1315 | /* Configure MPP16 as watchdog NMI, MPP17 as watchdog WDE */ |
1316 | spin_lock_irqsave(&mv64x60_lock, flags); | 1316 | spin_lock_irqsave(&mv64x60_lock, flags); |
diff --git a/arch/ppc/platforms/sbc82xx.c b/arch/ppc/platforms/sbc82xx.c index 8cff1e303349..60b769c7f3fc 100644 --- a/arch/ppc/platforms/sbc82xx.c +++ b/arch/ppc/platforms/sbc82xx.c | |||
@@ -145,7 +145,7 @@ static irqreturn_t sbc82xx_i8259_demux(int irq, void *dev_id, struct pt_regs *re | |||
145 | 145 | ||
146 | static struct irqaction sbc82xx_i8259_irqaction = { | 146 | static struct irqaction sbc82xx_i8259_irqaction = { |
147 | .handler = sbc82xx_i8259_demux, | 147 | .handler = sbc82xx_i8259_demux, |
148 | .flags = SA_INTERRUPT, | 148 | .flags = IRQF_DISABLED, |
149 | .mask = CPU_MASK_NONE, | 149 | .mask = CPU_MASK_NONE, |
150 | .name = "i8259 demux", | 150 | .name = "i8259 demux", |
151 | }; | 151 | }; |
diff --git a/arch/ppc/syslib/gt64260_pic.c b/arch/ppc/syslib/gt64260_pic.c index 91096b38ae70..7fd550a7d586 100644 --- a/arch/ppc/syslib/gt64260_pic.c +++ b/arch/ppc/syslib/gt64260_pic.c | |||
@@ -297,7 +297,7 @@ gt64260_register_hdlrs(void) | |||
297 | 297 | ||
298 | /* Register CPU interface error interrupt handler */ | 298 | /* Register CPU interface error interrupt handler */ |
299 | if ((rc = request_irq(MV64x60_IRQ_CPU_ERR, | 299 | if ((rc = request_irq(MV64x60_IRQ_CPU_ERR, |
300 | gt64260_cpu_error_int_handler, SA_INTERRUPT, CPU_INTR_STR, 0))) | 300 | gt64260_cpu_error_int_handler, IRQF_DISABLED, CPU_INTR_STR, 0))) |
301 | printk(KERN_WARNING "Can't register cpu error handler: %d", rc); | 301 | printk(KERN_WARNING "Can't register cpu error handler: %d", rc); |
302 | 302 | ||
303 | mv64x60_write(&bh, MV64x60_CPU_ERR_MASK, 0); | 303 | mv64x60_write(&bh, MV64x60_CPU_ERR_MASK, 0); |
@@ -305,7 +305,7 @@ gt64260_register_hdlrs(void) | |||
305 | 305 | ||
306 | /* Register PCI 0 error interrupt handler */ | 306 | /* Register PCI 0 error interrupt handler */ |
307 | if ((rc = request_irq(MV64360_IRQ_PCI0, gt64260_pci_error_int_handler, | 307 | if ((rc = request_irq(MV64360_IRQ_PCI0, gt64260_pci_error_int_handler, |
308 | SA_INTERRUPT, PCI0_INTR_STR, (void *)0))) | 308 | IRQF_DISABLED, PCI0_INTR_STR, (void *)0))) |
309 | printk(KERN_WARNING "Can't register pci 0 error handler: %d", | 309 | printk(KERN_WARNING "Can't register pci 0 error handler: %d", |
310 | rc); | 310 | rc); |
311 | 311 | ||
@@ -314,7 +314,7 @@ gt64260_register_hdlrs(void) | |||
314 | 314 | ||
315 | /* Register PCI 1 error interrupt handler */ | 315 | /* Register PCI 1 error interrupt handler */ |
316 | if ((rc = request_irq(MV64360_IRQ_PCI1, gt64260_pci_error_int_handler, | 316 | if ((rc = request_irq(MV64360_IRQ_PCI1, gt64260_pci_error_int_handler, |
317 | SA_INTERRUPT, PCI1_INTR_STR, (void *)1))) | 317 | IRQF_DISABLED, PCI1_INTR_STR, (void *)1))) |
318 | printk(KERN_WARNING "Can't register pci 1 error handler: %d", | 318 | printk(KERN_WARNING "Can't register pci 1 error handler: %d", |
319 | rc); | 319 | rc); |
320 | 320 | ||
diff --git a/arch/ppc/syslib/ibm440gx_common.c b/arch/ppc/syslib/ibm440gx_common.c index 0440d8f4ce16..4b77e6c8c87f 100644 --- a/arch/ppc/syslib/ibm440gx_common.c +++ b/arch/ppc/syslib/ibm440gx_common.c | |||
@@ -149,7 +149,7 @@ void __init ibm440gx_l2c_enable(void){ | |||
149 | unsigned long flags; | 149 | unsigned long flags; |
150 | 150 | ||
151 | /* Install error handler */ | 151 | /* Install error handler */ |
152 | if (request_irq(87, l2c_error_handler, SA_INTERRUPT, "L2C", 0) < 0){ | 152 | if (request_irq(87, l2c_error_handler, IRQF_DISABLED, "L2C", 0) < 0){ |
153 | printk(KERN_ERR "Cannot install L2C error handler, cache is not enabled\n"); | 153 | printk(KERN_ERR "Cannot install L2C error handler, cache is not enabled\n"); |
154 | return; | 154 | return; |
155 | } | 155 | } |
diff --git a/arch/ppc/syslib/m82xx_pci.c b/arch/ppc/syslib/m82xx_pci.c index 63fa5b313396..d3fa264e179e 100644 --- a/arch/ppc/syslib/m82xx_pci.c +++ b/arch/ppc/syslib/m82xx_pci.c | |||
@@ -139,7 +139,7 @@ pq2pci_irq_demux(int irq, void *dev_id, struct pt_regs *regs) | |||
139 | 139 | ||
140 | static struct irqaction pq2pci_irqaction = { | 140 | static struct irqaction pq2pci_irqaction = { |
141 | .handler = pq2pci_irq_demux, | 141 | .handler = pq2pci_irq_demux, |
142 | .flags = SA_INTERRUPT, | 142 | .flags = IRQF_DISABLED, |
143 | .mask = CPU_MASK_NONE, | 143 | .mask = CPU_MASK_NONE, |
144 | .name = "PQ2 PCI cascade", | 144 | .name = "PQ2 PCI cascade", |
145 | }; | 145 | }; |
diff --git a/arch/ppc/syslib/mv64360_pic.c b/arch/ppc/syslib/mv64360_pic.c index a4244d468381..3f6d162f87cf 100644 --- a/arch/ppc/syslib/mv64360_pic.c +++ b/arch/ppc/syslib/mv64360_pic.c | |||
@@ -380,7 +380,7 @@ mv64360_register_hdlrs(void) | |||
380 | /* Clear old errors and register CPU interface error intr handler */ | 380 | /* Clear old errors and register CPU interface error intr handler */ |
381 | mv64x60_write(&bh, MV64x60_CPU_ERR_CAUSE, 0); | 381 | mv64x60_write(&bh, MV64x60_CPU_ERR_CAUSE, 0); |
382 | if ((rc = request_irq(MV64x60_IRQ_CPU_ERR + mv64360_irq_base, | 382 | if ((rc = request_irq(MV64x60_IRQ_CPU_ERR + mv64360_irq_base, |
383 | mv64360_cpu_error_int_handler, SA_INTERRUPT, CPU_INTR_STR, 0))) | 383 | mv64360_cpu_error_int_handler, IRQF_DISABLED, CPU_INTR_STR, 0))) |
384 | printk(KERN_WARNING "Can't register cpu error handler: %d", rc); | 384 | printk(KERN_WARNING "Can't register cpu error handler: %d", rc); |
385 | 385 | ||
386 | mv64x60_write(&bh, MV64x60_CPU_ERR_MASK, 0); | 386 | mv64x60_write(&bh, MV64x60_CPU_ERR_MASK, 0); |
@@ -389,14 +389,14 @@ mv64360_register_hdlrs(void) | |||
389 | /* Clear old errors and register internal SRAM error intr handler */ | 389 | /* Clear old errors and register internal SRAM error intr handler */ |
390 | mv64x60_write(&bh, MV64360_SRAM_ERR_CAUSE, 0); | 390 | mv64x60_write(&bh, MV64360_SRAM_ERR_CAUSE, 0); |
391 | if ((rc = request_irq(MV64360_IRQ_SRAM_PAR_ERR + mv64360_irq_base, | 391 | if ((rc = request_irq(MV64360_IRQ_SRAM_PAR_ERR + mv64360_irq_base, |
392 | mv64360_sram_error_int_handler,SA_INTERRUPT,SRAM_INTR_STR, 0))) | 392 | mv64360_sram_error_int_handler,IRQF_DISABLED,SRAM_INTR_STR, 0))) |
393 | printk(KERN_WARNING "Can't register SRAM error handler: %d",rc); | 393 | printk(KERN_WARNING "Can't register SRAM error handler: %d",rc); |
394 | 394 | ||
395 | /* Clear old errors and register PCI 0 error intr handler */ | 395 | /* Clear old errors and register PCI 0 error intr handler */ |
396 | mv64x60_write(&bh, MV64x60_PCI0_ERR_CAUSE, 0); | 396 | mv64x60_write(&bh, MV64x60_PCI0_ERR_CAUSE, 0); |
397 | if ((rc = request_irq(MV64360_IRQ_PCI0 + mv64360_irq_base, | 397 | if ((rc = request_irq(MV64360_IRQ_PCI0 + mv64360_irq_base, |
398 | mv64360_pci_error_int_handler, | 398 | mv64360_pci_error_int_handler, |
399 | SA_INTERRUPT, PCI0_INTR_STR, (void *)0))) | 399 | IRQF_DISABLED, PCI0_INTR_STR, (void *)0))) |
400 | printk(KERN_WARNING "Can't register pci 0 error handler: %d", | 400 | printk(KERN_WARNING "Can't register pci 0 error handler: %d", |
401 | rc); | 401 | rc); |
402 | 402 | ||
@@ -411,7 +411,7 @@ mv64360_register_hdlrs(void) | |||
411 | mv64x60_write(&bh, MV64x60_PCI1_ERR_CAUSE, 0); | 411 | mv64x60_write(&bh, MV64x60_PCI1_ERR_CAUSE, 0); |
412 | if ((rc = request_irq(MV64360_IRQ_PCI1 + mv64360_irq_base, | 412 | if ((rc = request_irq(MV64360_IRQ_PCI1 + mv64360_irq_base, |
413 | mv64360_pci_error_int_handler, | 413 | mv64360_pci_error_int_handler, |
414 | SA_INTERRUPT, PCI1_INTR_STR, (void *)1))) | 414 | IRQF_DISABLED, PCI1_INTR_STR, (void *)1))) |
415 | printk(KERN_WARNING "Can't register pci 1 error handler: %d", | 415 | printk(KERN_WARNING "Can't register pci 1 error handler: %d", |
416 | rc); | 416 | rc); |
417 | 417 | ||
diff --git a/arch/ppc/syslib/open_pic.c b/arch/ppc/syslib/open_pic.c index 08973663fa24..aa0b95788705 100644 --- a/arch/ppc/syslib/open_pic.c +++ b/arch/ppc/syslib/open_pic.c | |||
@@ -575,18 +575,21 @@ void openpic_request_IPIs(void) | |||
575 | if (OpenPIC == NULL) | 575 | if (OpenPIC == NULL) |
576 | return; | 576 | return; |
577 | 577 | ||
578 | /* IPIs are marked SA_INTERRUPT as they must run with irqs disabled */ | 578 | /* |
579 | * IPIs are marked IRQF_DISABLED as they must run with irqs | ||
580 | * disabled | ||
581 | */ | ||
579 | request_irq(OPENPIC_VEC_IPI+open_pic_irq_offset, | 582 | request_irq(OPENPIC_VEC_IPI+open_pic_irq_offset, |
580 | openpic_ipi_action, SA_INTERRUPT, | 583 | openpic_ipi_action, IRQF_DISABLED, |
581 | "IPI0 (call function)", NULL); | 584 | "IPI0 (call function)", NULL); |
582 | request_irq(OPENPIC_VEC_IPI+open_pic_irq_offset+1, | 585 | request_irq(OPENPIC_VEC_IPI+open_pic_irq_offset+1, |
583 | openpic_ipi_action, SA_INTERRUPT, | 586 | openpic_ipi_action, IRQF_DISABLED, |
584 | "IPI1 (reschedule)", NULL); | 587 | "IPI1 (reschedule)", NULL); |
585 | request_irq(OPENPIC_VEC_IPI+open_pic_irq_offset+2, | 588 | request_irq(OPENPIC_VEC_IPI+open_pic_irq_offset+2, |
586 | openpic_ipi_action, SA_INTERRUPT, | 589 | openpic_ipi_action, IRQF_DISABLED, |
587 | "IPI2 (invalidate tlb)", NULL); | 590 | "IPI2 (invalidate tlb)", NULL); |
588 | request_irq(OPENPIC_VEC_IPI+open_pic_irq_offset+3, | 591 | request_irq(OPENPIC_VEC_IPI+open_pic_irq_offset+3, |
589 | openpic_ipi_action, SA_INTERRUPT, | 592 | openpic_ipi_action, IRQF_DISABLED, |
590 | "IPI3 (xmon break)", NULL); | 593 | "IPI3 (xmon break)", NULL); |
591 | 594 | ||
592 | for ( i = 0; i < OPENPIC_NUM_IPI ; i++ ) | 595 | for ( i = 0; i < OPENPIC_NUM_IPI ; i++ ) |
@@ -691,7 +694,7 @@ openpic_init_nmi_irq(u_int irq) | |||
691 | 694 | ||
692 | static struct irqaction openpic_cascade_irqaction = { | 695 | static struct irqaction openpic_cascade_irqaction = { |
693 | .handler = no_action, | 696 | .handler = no_action, |
694 | .flags = SA_INTERRUPT, | 697 | .flags = IRQF_DISABLED, |
695 | .mask = CPU_MASK_NONE, | 698 | .mask = CPU_MASK_NONE, |
696 | }; | 699 | }; |
697 | 700 | ||
diff --git a/arch/s390/kernel/entry.S b/arch/s390/kernel/entry.S index 1a434a7004ee..d8948c342caf 100644 --- a/arch/s390/kernel/entry.S +++ b/arch/s390/kernel/entry.S | |||
@@ -228,8 +228,9 @@ sysc_do_svc: | |||
228 | sysc_nr_ok: | 228 | sysc_nr_ok: |
229 | mvc SP_ARGS(4,%r15),SP_R7(%r15) | 229 | mvc SP_ARGS(4,%r15),SP_R7(%r15) |
230 | sysc_do_restart: | 230 | sysc_do_restart: |
231 | l %r8,BASED(.Lsysc_table) | ||
231 | tm __TI_flags+3(%r9),(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT) | 232 | tm __TI_flags+3(%r9),(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT) |
232 | l %r8,sys_call_table-system_call(%r7,%r13) # get system call addr. | 233 | l %r8,0(%r7,%r8) # get system call addr. |
233 | bnz BASED(sysc_tracesys) | 234 | bnz BASED(sysc_tracesys) |
234 | basr %r14,%r8 # call sys_xxxx | 235 | basr %r14,%r8 # call sys_xxxx |
235 | st %r2,SP_R2(%r15) # store return value (change R2 on stack) | 236 | st %r2,SP_R2(%r15) # store return value (change R2 on stack) |
@@ -330,9 +331,10 @@ sysc_tracesys: | |||
330 | basr %r14,%r1 | 331 | basr %r14,%r1 |
331 | clc SP_R2(4,%r15),BASED(.Lnr_syscalls) | 332 | clc SP_R2(4,%r15),BASED(.Lnr_syscalls) |
332 | bnl BASED(sysc_tracenogo) | 333 | bnl BASED(sysc_tracenogo) |
334 | l %r8,BASED(.Lsysc_table) | ||
333 | l %r7,SP_R2(%r15) # strace might have changed the | 335 | l %r7,SP_R2(%r15) # strace might have changed the |
334 | sll %r7,2 # system call | 336 | sll %r7,2 # system call |
335 | l %r8,sys_call_table-system_call(%r7,%r13) | 337 | l %r8,0(%r7,%r8) |
336 | sysc_tracego: | 338 | sysc_tracego: |
337 | lm %r3,%r6,SP_R3(%r15) | 339 | lm %r3,%r6,SP_R3(%r15) |
338 | l %r2,SP_ORIG_R2(%r15) | 340 | l %r2,SP_ORIG_R2(%r15) |
@@ -1009,6 +1011,7 @@ cleanup_io_leave_insn: | |||
1009 | .Ltrace: .long syscall_trace | 1011 | .Ltrace: .long syscall_trace |
1010 | .Lvfork: .long sys_vfork | 1012 | .Lvfork: .long sys_vfork |
1011 | .Lschedtail: .long schedule_tail | 1013 | .Lschedtail: .long schedule_tail |
1014 | .Lsysc_table: .long sys_call_table | ||
1012 | 1015 | ||
1013 | .Lcritical_start: | 1016 | .Lcritical_start: |
1014 | .long __critical_start + 0x80000000 | 1017 | .long __critical_start + 0x80000000 |
@@ -1017,8 +1020,8 @@ cleanup_io_leave_insn: | |||
1017 | .Lcleanup_critical: | 1020 | .Lcleanup_critical: |
1018 | .long cleanup_critical | 1021 | .long cleanup_critical |
1019 | 1022 | ||
1023 | .section .rodata, "a" | ||
1020 | #define SYSCALL(esa,esame,emu) .long esa | 1024 | #define SYSCALL(esa,esame,emu) .long esa |
1021 | sys_call_table: | 1025 | sys_call_table: |
1022 | #include "syscalls.S" | 1026 | #include "syscalls.S" |
1023 | #undef SYSCALL | 1027 | #undef SYSCALL |
1024 | |||
diff --git a/arch/s390/kernel/entry64.S b/arch/s390/kernel/entry64.S index edad60771673..1ca499fa54b4 100644 --- a/arch/s390/kernel/entry64.S +++ b/arch/s390/kernel/entry64.S | |||
@@ -991,6 +991,7 @@ cleanup_io_leave_insn: | |||
991 | .Lcritical_end: | 991 | .Lcritical_end: |
992 | .quad __critical_end | 992 | .quad __critical_end |
993 | 993 | ||
994 | .section .rodata, "a" | ||
994 | #define SYSCALL(esa,esame,emu) .long esame | 995 | #define SYSCALL(esa,esame,emu) .long esame |
995 | sys_call_table: | 996 | sys_call_table: |
996 | #include "syscalls.S" | 997 | #include "syscalls.S" |
diff --git a/arch/s390/mm/init.c b/arch/s390/mm/init.c index 81dce185f836..eb6ebfef134a 100644 --- a/arch/s390/mm/init.c +++ b/arch/s390/mm/init.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/init.h> | 23 | #include <linux/init.h> |
24 | #include <linux/pagemap.h> | 24 | #include <linux/pagemap.h> |
25 | #include <linux/bootmem.h> | 25 | #include <linux/bootmem.h> |
26 | #include <linux/pfn.h> | ||
26 | 27 | ||
27 | #include <asm/processor.h> | 28 | #include <asm/processor.h> |
28 | #include <asm/system.h> | 29 | #include <asm/system.h> |
@@ -33,6 +34,7 @@ | |||
33 | #include <asm/lowcore.h> | 34 | #include <asm/lowcore.h> |
34 | #include <asm/tlb.h> | 35 | #include <asm/tlb.h> |
35 | #include <asm/tlbflush.h> | 36 | #include <asm/tlbflush.h> |
37 | #include <asm/sections.h> | ||
36 | 38 | ||
37 | DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); | 39 | DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); |
38 | 40 | ||
@@ -89,17 +91,6 @@ void show_mem(void) | |||
89 | printk("%d pages swap cached\n",cached); | 91 | printk("%d pages swap cached\n",cached); |
90 | } | 92 | } |
91 | 93 | ||
92 | /* References to section boundaries */ | ||
93 | |||
94 | extern unsigned long _text; | ||
95 | extern unsigned long _etext; | ||
96 | extern unsigned long _edata; | ||
97 | extern unsigned long __bss_start; | ||
98 | extern unsigned long _end; | ||
99 | |||
100 | extern unsigned long __init_begin; | ||
101 | extern unsigned long __init_end; | ||
102 | |||
103 | extern unsigned long __initdata zholes_size[]; | 94 | extern unsigned long __initdata zholes_size[]; |
104 | /* | 95 | /* |
105 | * paging_init() sets up the page tables | 96 | * paging_init() sets up the page tables |
@@ -116,6 +107,10 @@ void __init paging_init(void) | |||
116 | unsigned long pfn = 0; | 107 | unsigned long pfn = 0; |
117 | unsigned long pgdir_k = (__pa(swapper_pg_dir) & PAGE_MASK) | _KERNSEG_TABLE; | 108 | unsigned long pgdir_k = (__pa(swapper_pg_dir) & PAGE_MASK) | _KERNSEG_TABLE; |
118 | static const int ssm_mask = 0x04000000L; | 109 | static const int ssm_mask = 0x04000000L; |
110 | unsigned long ro_start_pfn, ro_end_pfn; | ||
111 | |||
112 | ro_start_pfn = PFN_DOWN((unsigned long)&__start_rodata); | ||
113 | ro_end_pfn = PFN_UP((unsigned long)&__end_rodata); | ||
119 | 114 | ||
120 | /* unmap whole virtual address space */ | 115 | /* unmap whole virtual address space */ |
121 | 116 | ||
@@ -143,7 +138,10 @@ void __init paging_init(void) | |||
143 | pg_dir++; | 138 | pg_dir++; |
144 | 139 | ||
145 | for (tmp = 0 ; tmp < PTRS_PER_PTE ; tmp++,pg_table++) { | 140 | for (tmp = 0 ; tmp < PTRS_PER_PTE ; tmp++,pg_table++) { |
146 | pte = pfn_pte(pfn, PAGE_KERNEL); | 141 | if (pfn >= ro_start_pfn && pfn < ro_end_pfn) |
142 | pte = pfn_pte(pfn, __pgprot(_PAGE_RO)); | ||
143 | else | ||
144 | pte = pfn_pte(pfn, PAGE_KERNEL); | ||
147 | if (pfn >= max_low_pfn) | 145 | if (pfn >= max_low_pfn) |
148 | pte_clear(&init_mm, 0, &pte); | 146 | pte_clear(&init_mm, 0, &pte); |
149 | set_pte(pg_table, pte); | 147 | set_pte(pg_table, pte); |
@@ -175,6 +173,7 @@ void __init paging_init(void) | |||
175 | } | 173 | } |
176 | 174 | ||
177 | #else /* CONFIG_64BIT */ | 175 | #else /* CONFIG_64BIT */ |
176 | |||
178 | void __init paging_init(void) | 177 | void __init paging_init(void) |
179 | { | 178 | { |
180 | pgd_t * pg_dir; | 179 | pgd_t * pg_dir; |
@@ -186,13 +185,15 @@ void __init paging_init(void) | |||
186 | unsigned long pgdir_k = (__pa(swapper_pg_dir) & PAGE_MASK) | | 185 | unsigned long pgdir_k = (__pa(swapper_pg_dir) & PAGE_MASK) | |
187 | _KERN_REGION_TABLE; | 186 | _KERN_REGION_TABLE; |
188 | static const int ssm_mask = 0x04000000L; | 187 | static const int ssm_mask = 0x04000000L; |
189 | |||
190 | unsigned long zones_size[MAX_NR_ZONES]; | 188 | unsigned long zones_size[MAX_NR_ZONES]; |
191 | unsigned long dma_pfn, high_pfn; | 189 | unsigned long dma_pfn, high_pfn; |
190 | unsigned long ro_start_pfn, ro_end_pfn; | ||
192 | 191 | ||
193 | memset(zones_size, 0, sizeof(zones_size)); | 192 | memset(zones_size, 0, sizeof(zones_size)); |
194 | dma_pfn = MAX_DMA_ADDRESS >> PAGE_SHIFT; | 193 | dma_pfn = MAX_DMA_ADDRESS >> PAGE_SHIFT; |
195 | high_pfn = max_low_pfn; | 194 | high_pfn = max_low_pfn; |
195 | ro_start_pfn = PFN_DOWN((unsigned long)&__start_rodata); | ||
196 | ro_end_pfn = PFN_UP((unsigned long)&__end_rodata); | ||
196 | 197 | ||
197 | if (dma_pfn > high_pfn) | 198 | if (dma_pfn > high_pfn) |
198 | zones_size[ZONE_DMA] = high_pfn; | 199 | zones_size[ZONE_DMA] = high_pfn; |
@@ -231,7 +232,10 @@ void __init paging_init(void) | |||
231 | pmd_populate_kernel(&init_mm, pm_dir, pt_dir); | 232 | pmd_populate_kernel(&init_mm, pm_dir, pt_dir); |
232 | 233 | ||
233 | for (k = 0 ; k < PTRS_PER_PTE ; k++,pt_dir++) { | 234 | for (k = 0 ; k < PTRS_PER_PTE ; k++,pt_dir++) { |
234 | pte = pfn_pte(pfn, PAGE_KERNEL); | 235 | if (pfn >= ro_start_pfn && pfn < ro_end_pfn) |
236 | pte = pfn_pte(pfn, __pgprot(_PAGE_RO)); | ||
237 | else | ||
238 | pte = pfn_pte(pfn, PAGE_KERNEL); | ||
235 | if (pfn >= max_low_pfn) { | 239 | if (pfn >= max_low_pfn) { |
236 | pte_clear(&init_mm, 0, &pte); | 240 | pte_clear(&init_mm, 0, &pte); |
237 | continue; | 241 | continue; |
@@ -282,6 +286,9 @@ void __init mem_init(void) | |||
282 | reservedpages << (PAGE_SHIFT-10), | 286 | reservedpages << (PAGE_SHIFT-10), |
283 | datasize >>10, | 287 | datasize >>10, |
284 | initsize >> 10); | 288 | initsize >> 10); |
289 | printk("Write protected kernel read-only data: %#lx - %#lx\n", | ||
290 | (unsigned long)&__start_rodata, | ||
291 | PFN_ALIGN((unsigned long)&__end_rodata) - 1); | ||
285 | } | 292 | } |
286 | 293 | ||
287 | void free_initmem(void) | 294 | void free_initmem(void) |
diff --git a/arch/sh/boards/snapgear/setup.c b/arch/sh/boards/snapgear/setup.c index 046b896d04f9..f1f7c70c9402 100644 --- a/arch/sh/boards/snapgear/setup.c +++ b/arch/sh/boards/snapgear/setup.c | |||
@@ -50,7 +50,7 @@ static int __init eraseconfig_init(void) | |||
50 | { | 50 | { |
51 | printk("SnapGear: EraseConfig init\n"); | 51 | printk("SnapGear: EraseConfig init\n"); |
52 | /* Setup "EraseConfig" switch on external IRQ 0 */ | 52 | /* Setup "EraseConfig" switch on external IRQ 0 */ |
53 | if (request_irq(IRL0_IRQ, eraseconfig_interrupt, SA_INTERRUPT, | 53 | if (request_irq(IRL0_IRQ, eraseconfig_interrupt, IRQF_DISABLED, |
54 | "Erase Config", NULL)) | 54 | "Erase Config", NULL)) |
55 | printk("SnapGear: failed to register IRQ%d for Reset witch\n", | 55 | printk("SnapGear: failed to register IRQ%d for Reset witch\n", |
56 | IRL0_IRQ); | 56 | IRL0_IRQ); |
diff --git a/arch/sh/cchips/hd6446x/hd64461/setup.c b/arch/sh/cchips/hd6446x/hd64461/setup.c index 9b361a91a1a6..ad126016720f 100644 --- a/arch/sh/cchips/hd6446x/hd64461/setup.c +++ b/arch/sh/cchips/hd6446x/hd64461/setup.c | |||
@@ -133,7 +133,7 @@ int hd64461_irq_demux(int irq) | |||
133 | return __irq_demux(irq); | 133 | return __irq_demux(irq); |
134 | } | 134 | } |
135 | 135 | ||
136 | static struct irqaction irq0 = { hd64461_interrupt, SA_INTERRUPT, CPU_MASK_NONE, "HD64461", NULL, NULL }; | 136 | static struct irqaction irq0 = { hd64461_interrupt, IRQF_DISABLED, CPU_MASK_NONE, "HD64461", NULL, NULL }; |
137 | 137 | ||
138 | int __init setup_hd64461(void) | 138 | int __init setup_hd64461(void) |
139 | { | 139 | { |
diff --git a/arch/sh/cchips/hd6446x/hd64465/gpio.c b/arch/sh/cchips/hd6446x/hd64465/gpio.c index 9785fdef868e..72320d02d69a 100644 --- a/arch/sh/cchips/hd6446x/hd64465/gpio.c +++ b/arch/sh/cchips/hd6446x/hd64465/gpio.c | |||
@@ -170,7 +170,7 @@ static int __init hd64465_gpio_init(void) | |||
170 | if (!request_region(HD64465_REG_GPACR, 0x1000, MODNAME)) | 170 | if (!request_region(HD64465_REG_GPACR, 0x1000, MODNAME)) |
171 | return -EBUSY; | 171 | return -EBUSY; |
172 | if (request_irq(HD64465_IRQ_GPIO, hd64465_gpio_interrupt, | 172 | if (request_irq(HD64465_IRQ_GPIO, hd64465_gpio_interrupt, |
173 | SA_INTERRUPT, MODNAME, 0)) | 173 | IRQF_DISABLED, MODNAME, 0)) |
174 | goto out_irqfailed; | 174 | goto out_irqfailed; |
175 | 175 | ||
176 | printk("HD64465 GPIO layer on irq %d\n", HD64465_IRQ_GPIO); | 176 | printk("HD64465 GPIO layer on irq %d\n", HD64465_IRQ_GPIO); |
diff --git a/arch/sh/cchips/hd6446x/hd64465/setup.c b/arch/sh/cchips/hd6446x/hd64465/setup.c index b2b0aa48a3a7..d2b2851bc44b 100644 --- a/arch/sh/cchips/hd6446x/hd64465/setup.c +++ b/arch/sh/cchips/hd6446x/hd64465/setup.c | |||
@@ -153,7 +153,7 @@ int hd64465_irq_demux(int irq) | |||
153 | return irq; | 153 | return irq; |
154 | } | 154 | } |
155 | 155 | ||
156 | static struct irqaction irq0 = { hd64465_interrupt, SA_INTERRUPT, CPU_MASK_NONE, "HD64465", NULL, NULL}; | 156 | static struct irqaction irq0 = { hd64465_interrupt, IRQF_DISABLED, CPU_MASK_NONE, "HD64465", NULL, NULL}; |
157 | 157 | ||
158 | 158 | ||
159 | static int __init setup_hd64465(void) | 159 | static int __init setup_hd64465(void) |
diff --git a/arch/sh/cchips/voyagergx/irq.c b/arch/sh/cchips/voyagergx/irq.c index 6a74464dab2d..0dc1fb8f9687 100644 --- a/arch/sh/cchips/voyagergx/irq.c +++ b/arch/sh/cchips/voyagergx/irq.c | |||
@@ -165,7 +165,7 @@ int voyagergx_irq_demux(int irq) | |||
165 | static struct irqaction irq0 = { | 165 | static struct irqaction irq0 = { |
166 | .name = "voyagergx", | 166 | .name = "voyagergx", |
167 | .handler = voyagergx_interrupt, | 167 | .handler = voyagergx_interrupt, |
168 | .flags = SA_INTERRUPT, | 168 | .flags = IRQF_DISABLED, |
169 | .mask = CPU_MASK_NONE, | 169 | .mask = CPU_MASK_NONE, |
170 | }; | 170 | }; |
171 | 171 | ||
diff --git a/arch/sh/drivers/dma/dma-g2.c b/arch/sh/drivers/dma/dma-g2.c index 5afab6f56ec3..0f866f8789f0 100644 --- a/arch/sh/drivers/dma/dma-g2.c +++ b/arch/sh/drivers/dma/dma-g2.c | |||
@@ -56,7 +56,7 @@ static irqreturn_t g2_dma_interrupt(int irq, void *dev_id, struct pt_regs *regs) | |||
56 | static struct irqaction g2_dma_irq = { | 56 | static struct irqaction g2_dma_irq = { |
57 | .name = "g2 DMA handler", | 57 | .name = "g2 DMA handler", |
58 | .handler = g2_dma_interrupt, | 58 | .handler = g2_dma_interrupt, |
59 | .flags = SA_INTERRUPT, | 59 | .flags = IRQF_DISABLED, |
60 | }; | 60 | }; |
61 | 61 | ||
62 | static int g2_enable_dma(struct dma_channel *chan) | 62 | static int g2_enable_dma(struct dma_channel *chan) |
diff --git a/arch/sh/drivers/dma/dma-pvr2.c b/arch/sh/drivers/dma/dma-pvr2.c index df604975ccc8..30a580aa7cbd 100644 --- a/arch/sh/drivers/dma/dma-pvr2.c +++ b/arch/sh/drivers/dma/dma-pvr2.c | |||
@@ -70,7 +70,7 @@ static int pvr2_xfer_dma(struct dma_channel *chan) | |||
70 | static struct irqaction pvr2_dma_irq = { | 70 | static struct irqaction pvr2_dma_irq = { |
71 | .name = "pvr2 DMA handler", | 71 | .name = "pvr2 DMA handler", |
72 | .handler = pvr2_dma_interrupt, | 72 | .handler = pvr2_dma_interrupt, |
73 | .flags = SA_INTERRUPT, | 73 | .flags = IRQF_DISABLED, |
74 | }; | 74 | }; |
75 | 75 | ||
76 | static struct dma_ops pvr2_dma_ops = { | 76 | static struct dma_ops pvr2_dma_ops = { |
diff --git a/arch/sh/drivers/dma/dma-sh.c b/arch/sh/drivers/dma/dma-sh.c index fecd8f8d0466..e028a2d2a4ea 100644 --- a/arch/sh/drivers/dma/dma-sh.c +++ b/arch/sh/drivers/dma/dma-sh.c | |||
@@ -90,7 +90,7 @@ static int sh_dmac_request_dma(struct dma_channel *chan) | |||
90 | chan->chan); | 90 | chan->chan); |
91 | 91 | ||
92 | return request_irq(get_dmte_irq(chan->chan), dma_tei, | 92 | return request_irq(get_dmte_irq(chan->chan), dma_tei, |
93 | SA_INTERRUPT, name, chan); | 93 | IRQF_DISABLED, name, chan); |
94 | } | 94 | } |
95 | 95 | ||
96 | static void sh_dmac_free_dma(struct dma_channel *chan) | 96 | static void sh_dmac_free_dma(struct dma_channel *chan) |
@@ -258,7 +258,7 @@ static int __init sh_dmac_init(void) | |||
258 | 258 | ||
259 | #ifdef CONFIG_CPU_SH4 | 259 | #ifdef CONFIG_CPU_SH4 |
260 | make_ipr_irq(DMAE_IRQ, DMA_IPR_ADDR, DMA_IPR_POS, DMA_PRIORITY); | 260 | make_ipr_irq(DMAE_IRQ, DMA_IPR_ADDR, DMA_IPR_POS, DMA_PRIORITY); |
261 | i = request_irq(DMAE_IRQ, dma_err, SA_INTERRUPT, "DMAC Address Error", 0); | 261 | i = request_irq(DMAE_IRQ, dma_err, IRQF_DISABLED, "DMAC Address Error", 0); |
262 | if (i < 0) | 262 | if (i < 0) |
263 | return i; | 263 | return i; |
264 | #endif | 264 | #endif |
diff --git a/arch/sh/drivers/pci/pci-st40.c b/arch/sh/drivers/pci/pci-st40.c index 21f3017e5c28..7c81b8b65bb5 100644 --- a/arch/sh/drivers/pci/pci-st40.c +++ b/arch/sh/drivers/pci/pci-st40.c | |||
@@ -447,7 +447,7 @@ static int __init pcibios_init(void) | |||
447 | PHYSADDR(memory_end) - PHYSADDR(memory_start)); | 447 | PHYSADDR(memory_end) - PHYSADDR(memory_start)); |
448 | 448 | ||
449 | if (request_irq(ST40PCI_ERR_IRQ, st40_pci_irq, | 449 | if (request_irq(ST40PCI_ERR_IRQ, st40_pci_irq, |
450 | SA_INTERRUPT, "st40pci", NULL)) { | 450 | IRQF_DISABLED, "st40pci", NULL)) { |
451 | printk(KERN_ERR "st40pci: Cannot hook interrupt\n"); | 451 | printk(KERN_ERR "st40pci: Cannot hook interrupt\n"); |
452 | return -EIO; | 452 | return -EIO; |
453 | } | 453 | } |
diff --git a/arch/sh/kernel/timers/timer-tmu.c b/arch/sh/kernel/timers/timer-tmu.c index 96a64cb13106..d4212add53b2 100644 --- a/arch/sh/kernel/timers/timer-tmu.c +++ b/arch/sh/kernel/timers/timer-tmu.c | |||
@@ -107,7 +107,7 @@ static irqreturn_t tmu_timer_interrupt(int irq, void *dev_id, | |||
107 | static struct irqaction tmu_irq = { | 107 | static struct irqaction tmu_irq = { |
108 | .name = "timer", | 108 | .name = "timer", |
109 | .handler = tmu_timer_interrupt, | 109 | .handler = tmu_timer_interrupt, |
110 | .flags = SA_INTERRUPT, | 110 | .flags = IRQF_DISABLED, |
111 | .mask = CPU_MASK_NONE, | 111 | .mask = CPU_MASK_NONE, |
112 | }; | 112 | }; |
113 | 113 | ||
diff --git a/arch/sh64/kernel/dma.c b/arch/sh64/kernel/dma.c index 09cd9f4670b5..32c6f0549bf1 100644 --- a/arch/sh64/kernel/dma.c +++ b/arch/sh64/kernel/dma.c | |||
@@ -115,7 +115,7 @@ static irqreturn_t dma_mte(int irq, void *dev_id, struct pt_regs *regs) | |||
115 | 115 | ||
116 | static struct irqaction irq_dmte = { | 116 | static struct irqaction irq_dmte = { |
117 | .handler = dma_mte, | 117 | .handler = dma_mte, |
118 | .flags = SA_INTERRUPT, | 118 | .flags = IRQF_DISABLED, |
119 | .name = "DMA MTE", | 119 | .name = "DMA MTE", |
120 | }; | 120 | }; |
121 | 121 | ||
@@ -152,7 +152,7 @@ static irqreturn_t dma_err(int irq, void *dev_id, struct pt_regs *regs) | |||
152 | 152 | ||
153 | static struct irqaction irq_derr = { | 153 | static struct irqaction irq_derr = { |
154 | .handler = dma_err, | 154 | .handler = dma_err, |
155 | .flags = SA_INTERRUPT, | 155 | .flags = IRQF_DISABLED, |
156 | .name = "DMA Error", | 156 | .name = "DMA Error", |
157 | }; | 157 | }; |
158 | 158 | ||
diff --git a/arch/sh64/kernel/pci_sh5.c b/arch/sh64/kernel/pci_sh5.c index 3c04951ff736..9dae689b6a9b 100644 --- a/arch/sh64/kernel/pci_sh5.c +++ b/arch/sh64/kernel/pci_sh5.c | |||
@@ -473,13 +473,13 @@ static void __init pcibios_size_bridges(void) | |||
473 | static int __init pcibios_init(void) | 473 | static int __init pcibios_init(void) |
474 | { | 474 | { |
475 | if (request_irq(IRQ_ERR, pcish5_err_irq, | 475 | if (request_irq(IRQ_ERR, pcish5_err_irq, |
476 | SA_INTERRUPT, "PCI Error",NULL) < 0) { | 476 | IRQF_DISABLED, "PCI Error",NULL) < 0) { |
477 | printk(KERN_ERR "PCISH5: Cannot hook PCI_PERR interrupt\n"); | 477 | printk(KERN_ERR "PCISH5: Cannot hook PCI_PERR interrupt\n"); |
478 | return -EINVAL; | 478 | return -EINVAL; |
479 | } | 479 | } |
480 | 480 | ||
481 | if (request_irq(IRQ_SERR, pcish5_serr_irq, | 481 | if (request_irq(IRQ_SERR, pcish5_serr_irq, |
482 | SA_INTERRUPT, "PCI SERR interrupt", NULL) < 0) { | 482 | IRQF_DISABLED, "PCI SERR interrupt", NULL) < 0) { |
483 | printk(KERN_ERR "PCISH5: Cannot hook PCI_SERR interrupt\n"); | 483 | printk(KERN_ERR "PCISH5: Cannot hook PCI_SERR interrupt\n"); |
484 | return -EINVAL; | 484 | return -EINVAL; |
485 | } | 485 | } |
diff --git a/arch/sh64/kernel/time.c b/arch/sh64/kernel/time.c index ba9eb992f4a5..b8162e59030e 100644 --- a/arch/sh64/kernel/time.c +++ b/arch/sh64/kernel/time.c | |||
@@ -484,8 +484,8 @@ static irqreturn_t sh64_rtc_interrupt(int irq, void *dev_id, | |||
484 | return IRQ_HANDLED; | 484 | return IRQ_HANDLED; |
485 | } | 485 | } |
486 | 486 | ||
487 | static struct irqaction irq0 = { timer_interrupt, SA_INTERRUPT, CPU_MASK_NONE, "timer", NULL, NULL}; | 487 | static struct irqaction irq0 = { timer_interrupt, IRQF_DISABLED, CPU_MASK_NONE, "timer", NULL, NULL}; |
488 | static struct irqaction irq1 = { sh64_rtc_interrupt, SA_INTERRUPT, CPU_MASK_NONE, "rtc", NULL, NULL}; | 488 | static struct irqaction irq1 = { sh64_rtc_interrupt, IRQF_DISABLED, CPU_MASK_NONE, "rtc", NULL, NULL}; |
489 | 489 | ||
490 | void __init time_init(void) | 490 | void __init time_init(void) |
491 | { | 491 | { |
diff --git a/arch/sh64/mach-cayman/irq.c b/arch/sh64/mach-cayman/irq.c index cac94219dd5f..228ce61c3515 100644 --- a/arch/sh64/mach-cayman/irq.c +++ b/arch/sh64/mach-cayman/irq.c | |||
@@ -44,13 +44,13 @@ static irqreturn_t cayman_interrupt_pci2(int irq, void *dev_id, struct pt_regs * | |||
44 | static struct irqaction cayman_action_smsc = { | 44 | static struct irqaction cayman_action_smsc = { |
45 | .name = "Cayman SMSC Mux", | 45 | .name = "Cayman SMSC Mux", |
46 | .handler = cayman_interrupt_smsc, | 46 | .handler = cayman_interrupt_smsc, |
47 | .flags = SA_INTERRUPT, | 47 | .flags = IRQF_DISABLED, |
48 | }; | 48 | }; |
49 | 49 | ||
50 | static struct irqaction cayman_action_pci2 = { | 50 | static struct irqaction cayman_action_pci2 = { |
51 | .name = "Cayman PCI2 Mux", | 51 | .name = "Cayman PCI2 Mux", |
52 | .handler = cayman_interrupt_pci2, | 52 | .handler = cayman_interrupt_pci2, |
53 | .flags = SA_INTERRUPT, | 53 | .flags = IRQF_DISABLED, |
54 | }; | 54 | }; |
55 | 55 | ||
56 | static void enable_cayman_irq(unsigned int irq) | 56 | static void enable_cayman_irq(unsigned int irq) |
diff --git a/arch/sparc/kernel/irq.c b/arch/sparc/kernel/irq.c index b81af076ef48..cde73327ca96 100644 --- a/arch/sparc/kernel/irq.c +++ b/arch/sparc/kernel/irq.c | |||
@@ -191,11 +191,11 @@ int show_interrupts(struct seq_file *p, void *v) | |||
191 | } | 191 | } |
192 | #endif | 192 | #endif |
193 | seq_printf(p, " %c %s", | 193 | seq_printf(p, " %c %s", |
194 | (action->flags & SA_INTERRUPT) ? '+' : ' ', | 194 | (action->flags & IRQF_DISABLED) ? '+' : ' ', |
195 | action->name); | 195 | action->name); |
196 | for (action=action->next; action; action = action->next) { | 196 | for (action=action->next; action; action = action->next) { |
197 | seq_printf(p, ",%s %s", | 197 | seq_printf(p, ",%s %s", |
198 | (action->flags & SA_INTERRUPT) ? " +" : "", | 198 | (action->flags & IRQF_DISABLED) ? " +" : "", |
199 | action->name); | 199 | action->name); |
200 | } | 200 | } |
201 | seq_putc(p, '\n'); | 201 | seq_putc(p, '\n'); |
@@ -243,7 +243,7 @@ void free_irq(unsigned int irq, void *dev_id) | |||
243 | printk("Trying to free free shared IRQ%d\n",irq); | 243 | printk("Trying to free free shared IRQ%d\n",irq); |
244 | goto out_unlock; | 244 | goto out_unlock; |
245 | } | 245 | } |
246 | } else if (action->flags & SA_SHIRQ) { | 246 | } else if (action->flags & IRQF_SHARED) { |
247 | printk("Trying to free shared IRQ%d with NULL device ID\n", irq); | 247 | printk("Trying to free shared IRQ%d with NULL device ID\n", irq); |
248 | goto out_unlock; | 248 | goto out_unlock; |
249 | } | 249 | } |
@@ -395,9 +395,9 @@ int request_fast_irq(unsigned int irq, | |||
395 | 395 | ||
396 | action = sparc_irq[cpu_irq].action; | 396 | action = sparc_irq[cpu_irq].action; |
397 | if(action) { | 397 | if(action) { |
398 | if(action->flags & SA_SHIRQ) | 398 | if(action->flags & IRQF_SHARED) |
399 | panic("Trying to register fast irq when already shared.\n"); | 399 | panic("Trying to register fast irq when already shared.\n"); |
400 | if(irqflags & SA_SHIRQ) | 400 | if(irqflags & IRQF_SHARED) |
401 | panic("Trying to register fast irq as shared.\n"); | 401 | panic("Trying to register fast irq as shared.\n"); |
402 | 402 | ||
403 | /* Anyway, someone already owns it so cannot be made fast. */ | 403 | /* Anyway, someone already owns it so cannot be made fast. */ |
@@ -497,11 +497,11 @@ int request_irq(unsigned int irq, | |||
497 | actionp = &sparc_irq[cpu_irq].action; | 497 | actionp = &sparc_irq[cpu_irq].action; |
498 | action = *actionp; | 498 | action = *actionp; |
499 | if (action) { | 499 | if (action) { |
500 | if (!(action->flags & SA_SHIRQ) || !(irqflags & SA_SHIRQ)) { | 500 | if (!(action->flags & IRQF_SHARED) || !(irqflags & IRQF_SHARED)) { |
501 | ret = -EBUSY; | 501 | ret = -EBUSY; |
502 | goto out_unlock; | 502 | goto out_unlock; |
503 | } | 503 | } |
504 | if ((action->flags & SA_INTERRUPT) != (irqflags & SA_INTERRUPT)) { | 504 | if ((action->flags & IRQF_DISABLED) != (irqflags & IRQF_DISABLED)) { |
505 | printk("Attempt to mix fast and slow interrupts on IRQ%d denied\n", irq); | 505 | printk("Attempt to mix fast and slow interrupts on IRQ%d denied\n", irq); |
506 | ret = -EBUSY; | 506 | ret = -EBUSY; |
507 | goto out_unlock; | 507 | goto out_unlock; |
diff --git a/arch/sparc/kernel/pcic.c b/arch/sparc/kernel/pcic.c index 22422ff10602..bfd31aac2df3 100644 --- a/arch/sparc/kernel/pcic.c +++ b/arch/sparc/kernel/pcic.c | |||
@@ -745,7 +745,7 @@ void __init pci_time_init(void) | |||
745 | writel (PCI_COUNTER_IRQ_SET(timer_irq, 0), | 745 | writel (PCI_COUNTER_IRQ_SET(timer_irq, 0), |
746 | pcic->pcic_regs+PCI_COUNTER_IRQ); | 746 | pcic->pcic_regs+PCI_COUNTER_IRQ); |
747 | irq = request_irq(timer_irq, pcic_timer_handler, | 747 | irq = request_irq(timer_irq, pcic_timer_handler, |
748 | (SA_INTERRUPT | SA_STATIC_ALLOC), "timer", NULL); | 748 | (IRQF_DISABLED | SA_STATIC_ALLOC), "timer", NULL); |
749 | if (irq) { | 749 | if (irq) { |
750 | prom_printf("time_init: unable to attach IRQ%d\n", timer_irq); | 750 | prom_printf("time_init: unable to attach IRQ%d\n", timer_irq); |
751 | prom_halt(); | 751 | prom_halt(); |
diff --git a/arch/sparc/kernel/sun4c_irq.c b/arch/sparc/kernel/sun4c_irq.c index 50e988b9c8c3..4be2c86ea540 100644 --- a/arch/sparc/kernel/sun4c_irq.c +++ b/arch/sparc/kernel/sun4c_irq.c | |||
@@ -179,7 +179,7 @@ static void __init sun4c_init_timers(irqreturn_t (*counter_fn)(int, void *, stru | |||
179 | 179 | ||
180 | irq = request_irq(TIMER_IRQ, | 180 | irq = request_irq(TIMER_IRQ, |
181 | counter_fn, | 181 | counter_fn, |
182 | (SA_INTERRUPT | SA_STATIC_ALLOC), | 182 | (IRQF_DISABLED | SA_STATIC_ALLOC), |
183 | "timer", NULL); | 183 | "timer", NULL); |
184 | if (irq) { | 184 | if (irq) { |
185 | prom_printf("time_init: unable to attach IRQ%d\n",TIMER_IRQ); | 185 | prom_printf("time_init: unable to attach IRQ%d\n",TIMER_IRQ); |
diff --git a/arch/sparc/kernel/sun4d_irq.c b/arch/sparc/kernel/sun4d_irq.c index cbf8ee81cf5b..74eed9775ac0 100644 --- a/arch/sparc/kernel/sun4d_irq.c +++ b/arch/sparc/kernel/sun4d_irq.c | |||
@@ -107,13 +107,13 @@ found_it: seq_printf(p, "%3d: ", i); | |||
107 | kstat_cpu(cpu_logical_map(x)).irqs[i]); | 107 | kstat_cpu(cpu_logical_map(x)).irqs[i]); |
108 | #endif | 108 | #endif |
109 | seq_printf(p, "%c %s", | 109 | seq_printf(p, "%c %s", |
110 | (action->flags & SA_INTERRUPT) ? '+' : ' ', | 110 | (action->flags & IRQF_DISABLED) ? '+' : ' ', |
111 | action->name); | 111 | action->name); |
112 | action = action->next; | 112 | action = action->next; |
113 | for (;;) { | 113 | for (;;) { |
114 | for (; action; action = action->next) { | 114 | for (; action; action = action->next) { |
115 | seq_printf(p, ",%s %s", | 115 | seq_printf(p, ",%s %s", |
116 | (action->flags & SA_INTERRUPT) ? " +" : "", | 116 | (action->flags & IRQF_DISABLED) ? " +" : "", |
117 | action->name); | 117 | action->name); |
118 | } | 118 | } |
119 | if (!sbusl) break; | 119 | if (!sbusl) break; |
@@ -160,7 +160,7 @@ void sun4d_free_irq(unsigned int irq, void *dev_id) | |||
160 | printk("Trying to free free shared IRQ%d\n",irq); | 160 | printk("Trying to free free shared IRQ%d\n",irq); |
161 | goto out_unlock; | 161 | goto out_unlock; |
162 | } | 162 | } |
163 | } else if (action->flags & SA_SHIRQ) { | 163 | } else if (action->flags & IRQF_SHARED) { |
164 | printk("Trying to free shared IRQ%d with NULL device ID\n", irq); | 164 | printk("Trying to free shared IRQ%d with NULL device ID\n", irq); |
165 | goto out_unlock; | 165 | goto out_unlock; |
166 | } | 166 | } |
@@ -298,13 +298,13 @@ int sun4d_request_irq(unsigned int irq, | |||
298 | action = *actionp; | 298 | action = *actionp; |
299 | 299 | ||
300 | if (action) { | 300 | if (action) { |
301 | if ((action->flags & SA_SHIRQ) && (irqflags & SA_SHIRQ)) { | 301 | if ((action->flags & IRQF_SHARED) && (irqflags & IRQF_SHARED)) { |
302 | for (tmp = action; tmp->next; tmp = tmp->next); | 302 | for (tmp = action; tmp->next; tmp = tmp->next); |
303 | } else { | 303 | } else { |
304 | ret = -EBUSY; | 304 | ret = -EBUSY; |
305 | goto out_unlock; | 305 | goto out_unlock; |
306 | } | 306 | } |
307 | if ((action->flags & SA_INTERRUPT) ^ (irqflags & SA_INTERRUPT)) { | 307 | if ((action->flags & IRQF_DISABLED) ^ (irqflags & IRQF_DISABLED)) { |
308 | printk("Attempt to mix fast and slow interrupts on IRQ%d denied\n", irq); | 308 | printk("Attempt to mix fast and slow interrupts on IRQ%d denied\n", irq); |
309 | ret = -EBUSY; | 309 | ret = -EBUSY; |
310 | goto out_unlock; | 310 | goto out_unlock; |
@@ -490,7 +490,7 @@ static void __init sun4d_init_timers(irqreturn_t (*counter_fn)(int, void *, stru | |||
490 | 490 | ||
491 | irq = request_irq(TIMER_IRQ, | 491 | irq = request_irq(TIMER_IRQ, |
492 | counter_fn, | 492 | counter_fn, |
493 | (SA_INTERRUPT | SA_STATIC_ALLOC), | 493 | (IRQF_DISABLED | SA_STATIC_ALLOC), |
494 | "timer", NULL); | 494 | "timer", NULL); |
495 | if (irq) { | 495 | if (irq) { |
496 | prom_printf("time_init: unable to attach IRQ%d\n",TIMER_IRQ); | 496 | prom_printf("time_init: unable to attach IRQ%d\n",TIMER_IRQ); |
diff --git a/arch/sparc/kernel/sun4m_irq.c b/arch/sparc/kernel/sun4m_irq.c index 38ac672b1149..7cefa301efea 100644 --- a/arch/sparc/kernel/sun4m_irq.c +++ b/arch/sparc/kernel/sun4m_irq.c | |||
@@ -278,7 +278,7 @@ static void __init sun4m_init_timers(irqreturn_t (*counter_fn)(int, void *, stru | |||
278 | 278 | ||
279 | irq = request_irq(TIMER_IRQ, | 279 | irq = request_irq(TIMER_IRQ, |
280 | counter_fn, | 280 | counter_fn, |
281 | (SA_INTERRUPT | SA_STATIC_ALLOC), | 281 | (IRQF_DISABLED | SA_STATIC_ALLOC), |
282 | "timer", NULL); | 282 | "timer", NULL); |
283 | if (irq) { | 283 | if (irq) { |
284 | prom_printf("time_init: unable to attach IRQ%d\n",TIMER_IRQ); | 284 | prom_printf("time_init: unable to attach IRQ%d\n",TIMER_IRQ); |
diff --git a/arch/sparc/kernel/tick14.c b/arch/sparc/kernel/tick14.c index 591547af4c65..d3b4daac705f 100644 --- a/arch/sparc/kernel/tick14.c +++ b/arch/sparc/kernel/tick14.c | |||
@@ -74,7 +74,7 @@ void claim_ticker14(irqreturn_t (*handler)(int, void *, struct pt_regs *), | |||
74 | 74 | ||
75 | if (!request_irq(irq_nr, | 75 | if (!request_irq(irq_nr, |
76 | handler, | 76 | handler, |
77 | (SA_INTERRUPT | SA_STATIC_ALLOC), | 77 | (IRQF_DISABLED | SA_STATIC_ALLOC), |
78 | "counter14", | 78 | "counter14", |
79 | NULL)) { | 79 | NULL)) { |
80 | install_linux_ticker(); | 80 | install_linux_ticker(); |
diff --git a/arch/sparc64/kernel/ebus.c b/arch/sparc64/kernel/ebus.c index a1023bb1a217..8a9b470e1b65 100644 --- a/arch/sparc64/kernel/ebus.c +++ b/arch/sparc64/kernel/ebus.c | |||
@@ -140,7 +140,7 @@ int ebus_dma_irq_enable(struct ebus_dma_info *p, int on) | |||
140 | 140 | ||
141 | if (on) { | 141 | if (on) { |
142 | if (p->flags & EBUS_DMA_FLAG_USE_EBDMA_HANDLER) { | 142 | if (p->flags & EBUS_DMA_FLAG_USE_EBDMA_HANDLER) { |
143 | if (request_irq(p->irq, ebus_dma_irq, SA_SHIRQ, p->name, p)) | 143 | if (request_irq(p->irq, ebus_dma_irq, IRQF_SHARED, p->name, p)) |
144 | return -EBUSY; | 144 | return -EBUSY; |
145 | } | 145 | } |
146 | 146 | ||
diff --git a/arch/sparc64/kernel/pci_psycho.c b/arch/sparc64/kernel/pci_psycho.c index bf7b32b36705..197a7ffd57ee 100644 --- a/arch/sparc64/kernel/pci_psycho.c +++ b/arch/sparc64/kernel/pci_psycho.c | |||
@@ -863,11 +863,11 @@ static void psycho_register_error_handlers(struct pci_controller_info *p) | |||
863 | if (op->num_irqs < 6) | 863 | if (op->num_irqs < 6) |
864 | return; | 864 | return; |
865 | 865 | ||
866 | request_irq(op->irqs[1], psycho_ue_intr, SA_SHIRQ, "PSYCHO UE", p); | 866 | request_irq(op->irqs[1], psycho_ue_intr, IRQF_SHARED, "PSYCHO UE", p); |
867 | request_irq(op->irqs[2], psycho_ce_intr, SA_SHIRQ, "PSYCHO CE", p); | 867 | request_irq(op->irqs[2], psycho_ce_intr, IRQF_SHARED, "PSYCHO CE", p); |
868 | request_irq(op->irqs[5], psycho_pcierr_intr, SA_SHIRQ, | 868 | request_irq(op->irqs[5], psycho_pcierr_intr, IRQF_SHARED, |
869 | "PSYCHO PCIERR-A", &p->pbm_A); | 869 | "PSYCHO PCIERR-A", &p->pbm_A); |
870 | request_irq(op->irqs[0], psycho_pcierr_intr, SA_SHIRQ, | 870 | request_irq(op->irqs[0], psycho_pcierr_intr, IRQF_SHARED, |
871 | "PSYCHO PCIERR-B", &p->pbm_B); | 871 | "PSYCHO PCIERR-B", &p->pbm_B); |
872 | 872 | ||
873 | /* Enable UE and CE interrupts for controller. */ | 873 | /* Enable UE and CE interrupts for controller. */ |
diff --git a/arch/sparc64/kernel/pci_sabre.c b/arch/sparc64/kernel/pci_sabre.c index 5e087b0fb4c9..45891850b90d 100644 --- a/arch/sparc64/kernel/pci_sabre.c +++ b/arch/sparc64/kernel/pci_sabre.c | |||
@@ -854,14 +854,14 @@ static void sabre_register_error_handlers(struct pci_controller_info *p) | |||
854 | SABRE_UEAFSR_SDRD | SABRE_UEAFSR_SDWR | | 854 | SABRE_UEAFSR_SDRD | SABRE_UEAFSR_SDWR | |
855 | SABRE_UEAFSR_SDTE | SABRE_UEAFSR_PDTE)); | 855 | SABRE_UEAFSR_SDTE | SABRE_UEAFSR_PDTE)); |
856 | 856 | ||
857 | request_irq(op->irqs[1], sabre_ue_intr, SA_SHIRQ, "SABRE UE", p); | 857 | request_irq(op->irqs[1], sabre_ue_intr, IRQF_SHARED, "SABRE UE", p); |
858 | 858 | ||
859 | sabre_write(base + SABRE_CE_AFSR, | 859 | sabre_write(base + SABRE_CE_AFSR, |
860 | (SABRE_CEAFSR_PDRD | SABRE_CEAFSR_PDWR | | 860 | (SABRE_CEAFSR_PDRD | SABRE_CEAFSR_PDWR | |
861 | SABRE_CEAFSR_SDRD | SABRE_CEAFSR_SDWR)); | 861 | SABRE_CEAFSR_SDRD | SABRE_CEAFSR_SDWR)); |
862 | 862 | ||
863 | request_irq(op->irqs[2], sabre_ce_intr, SA_SHIRQ, "SABRE CE", p); | 863 | request_irq(op->irqs[2], sabre_ce_intr, IRQF_SHARED, "SABRE CE", p); |
864 | request_irq(op->irqs[0], sabre_pcierr_intr, SA_SHIRQ, | 864 | request_irq(op->irqs[0], sabre_pcierr_intr, IRQF_SHARED, |
865 | "SABRE PCIERR", p); | 865 | "SABRE PCIERR", p); |
866 | 866 | ||
867 | tmp = sabre_read(base + SABRE_PCICTRL); | 867 | tmp = sabre_read(base + SABRE_PCICTRL); |
diff --git a/arch/sparc64/kernel/pci_schizo.c b/arch/sparc64/kernel/pci_schizo.c index 5c6e2a9b91f8..75ade83ecc65 100644 --- a/arch/sparc64/kernel/pci_schizo.c +++ b/arch/sparc64/kernel/pci_schizo.c | |||
@@ -998,32 +998,32 @@ static void tomatillo_register_error_handlers(struct pci_controller_info *p) | |||
998 | pbm = pbm_for_ino(p, SCHIZO_UE_INO); | 998 | pbm = pbm_for_ino(p, SCHIZO_UE_INO); |
999 | op = of_find_device_by_node(pbm->prom_node); | 999 | op = of_find_device_by_node(pbm->prom_node); |
1000 | if (op) | 1000 | if (op) |
1001 | request_irq(op->irqs[1], schizo_ue_intr, SA_SHIRQ, | 1001 | request_irq(op->irqs[1], schizo_ue_intr, IRQF_SHARED, |
1002 | "TOMATILLO_UE", p); | 1002 | "TOMATILLO_UE", p); |
1003 | 1003 | ||
1004 | pbm = pbm_for_ino(p, SCHIZO_CE_INO); | 1004 | pbm = pbm_for_ino(p, SCHIZO_CE_INO); |
1005 | op = of_find_device_by_node(pbm->prom_node); | 1005 | op = of_find_device_by_node(pbm->prom_node); |
1006 | if (op) | 1006 | if (op) |
1007 | request_irq(op->irqs[2], schizo_ce_intr, SA_SHIRQ, | 1007 | request_irq(op->irqs[2], schizo_ce_intr, IRQF_SHARED, |
1008 | "TOMATILLO CE", p); | 1008 | "TOMATILLO CE", p); |
1009 | 1009 | ||
1010 | pbm = pbm_for_ino(p, SCHIZO_PCIERR_A_INO); | 1010 | pbm = pbm_for_ino(p, SCHIZO_PCIERR_A_INO); |
1011 | op = of_find_device_by_node(pbm->prom_node); | 1011 | op = of_find_device_by_node(pbm->prom_node); |
1012 | if (op) | 1012 | if (op) |
1013 | request_irq(op->irqs[0], schizo_pcierr_intr, SA_SHIRQ, | 1013 | request_irq(op->irqs[0], schizo_pcierr_intr, IRQF_SHARED, |
1014 | "TOMATILLO PCIERR-A", pbm); | 1014 | "TOMATILLO PCIERR-A", pbm); |
1015 | 1015 | ||
1016 | 1016 | ||
1017 | pbm = pbm_for_ino(p, SCHIZO_PCIERR_B_INO); | 1017 | pbm = pbm_for_ino(p, SCHIZO_PCIERR_B_INO); |
1018 | op = of_find_device_by_node(pbm->prom_node); | 1018 | op = of_find_device_by_node(pbm->prom_node); |
1019 | if (op) | 1019 | if (op) |
1020 | request_irq(op->irqs[0], schizo_pcierr_intr, SA_SHIRQ, | 1020 | request_irq(op->irqs[0], schizo_pcierr_intr, IRQF_SHARED, |
1021 | "TOMATILLO PCIERR-B", pbm); | 1021 | "TOMATILLO PCIERR-B", pbm); |
1022 | 1022 | ||
1023 | pbm = pbm_for_ino(p, SCHIZO_SERR_INO); | 1023 | pbm = pbm_for_ino(p, SCHIZO_SERR_INO); |
1024 | op = of_find_device_by_node(pbm->prom_node); | 1024 | op = of_find_device_by_node(pbm->prom_node); |
1025 | if (op) | 1025 | if (op) |
1026 | request_irq(op->irqs[3], schizo_safarierr_intr, SA_SHIRQ, | 1026 | request_irq(op->irqs[3], schizo_safarierr_intr, IRQF_SHARED, |
1027 | "TOMATILLO SERR", p); | 1027 | "TOMATILLO SERR", p); |
1028 | 1028 | ||
1029 | /* Enable UE and CE interrupts for controller. */ | 1029 | /* Enable UE and CE interrupts for controller. */ |
@@ -1106,32 +1106,32 @@ static void schizo_register_error_handlers(struct pci_controller_info *p) | |||
1106 | pbm = pbm_for_ino(p, SCHIZO_UE_INO); | 1106 | pbm = pbm_for_ino(p, SCHIZO_UE_INO); |
1107 | op = of_find_device_by_node(pbm->prom_node); | 1107 | op = of_find_device_by_node(pbm->prom_node); |
1108 | if (op) | 1108 | if (op) |
1109 | request_irq(op->irqs[1], schizo_ue_intr, SA_SHIRQ, | 1109 | request_irq(op->irqs[1], schizo_ue_intr, IRQF_SHARED, |
1110 | "SCHIZO_UE", p); | 1110 | "SCHIZO_UE", p); |
1111 | 1111 | ||
1112 | pbm = pbm_for_ino(p, SCHIZO_CE_INO); | 1112 | pbm = pbm_for_ino(p, SCHIZO_CE_INO); |
1113 | op = of_find_device_by_node(pbm->prom_node); | 1113 | op = of_find_device_by_node(pbm->prom_node); |
1114 | if (op) | 1114 | if (op) |
1115 | request_irq(op->irqs[2], schizo_ce_intr, SA_SHIRQ, | 1115 | request_irq(op->irqs[2], schizo_ce_intr, IRQF_SHARED, |
1116 | "SCHIZO CE", p); | 1116 | "SCHIZO CE", p); |
1117 | 1117 | ||
1118 | pbm = pbm_for_ino(p, SCHIZO_PCIERR_A_INO); | 1118 | pbm = pbm_for_ino(p, SCHIZO_PCIERR_A_INO); |
1119 | op = of_find_device_by_node(pbm->prom_node); | 1119 | op = of_find_device_by_node(pbm->prom_node); |
1120 | if (op) | 1120 | if (op) |
1121 | request_irq(op->irqs[0], schizo_pcierr_intr, SA_SHIRQ, | 1121 | request_irq(op->irqs[0], schizo_pcierr_intr, IRQF_SHARED, |
1122 | "SCHIZO PCIERR-A", pbm); | 1122 | "SCHIZO PCIERR-A", pbm); |
1123 | 1123 | ||
1124 | 1124 | ||
1125 | pbm = pbm_for_ino(p, SCHIZO_PCIERR_B_INO); | 1125 | pbm = pbm_for_ino(p, SCHIZO_PCIERR_B_INO); |
1126 | op = of_find_device_by_node(pbm->prom_node); | 1126 | op = of_find_device_by_node(pbm->prom_node); |
1127 | if (op) | 1127 | if (op) |
1128 | request_irq(op->irqs[0], schizo_pcierr_intr, SA_SHIRQ, | 1128 | request_irq(op->irqs[0], schizo_pcierr_intr, IRQF_SHARED, |
1129 | "SCHIZO PCIERR-B", pbm); | 1129 | "SCHIZO PCIERR-B", pbm); |
1130 | 1130 | ||
1131 | pbm = pbm_for_ino(p, SCHIZO_SERR_INO); | 1131 | pbm = pbm_for_ino(p, SCHIZO_SERR_INO); |
1132 | op = of_find_device_by_node(pbm->prom_node); | 1132 | op = of_find_device_by_node(pbm->prom_node); |
1133 | if (op) | 1133 | if (op) |
1134 | request_irq(op->irqs[3], schizo_safarierr_intr, SA_SHIRQ, | 1134 | request_irq(op->irqs[3], schizo_safarierr_intr, IRQF_SHARED, |
1135 | "SCHIZO SERR", p); | 1135 | "SCHIZO SERR", p); |
1136 | 1136 | ||
1137 | /* Enable UE and CE interrupts for controller. */ | 1137 | /* Enable UE and CE interrupts for controller. */ |
diff --git a/arch/sparc64/kernel/sbus.c b/arch/sparc64/kernel/sbus.c index ef68aa4fec65..c49a57795743 100644 --- a/arch/sparc64/kernel/sbus.c +++ b/arch/sparc64/kernel/sbus.c | |||
@@ -1065,7 +1065,7 @@ static void __init sysio_register_error_handlers(struct sbus_bus *sbus) | |||
1065 | 1065 | ||
1066 | irq = sbus_build_irq(sbus, SYSIO_UE_INO); | 1066 | irq = sbus_build_irq(sbus, SYSIO_UE_INO); |
1067 | if (request_irq(irq, sysio_ue_handler, | 1067 | if (request_irq(irq, sysio_ue_handler, |
1068 | SA_SHIRQ, "SYSIO UE", sbus) < 0) { | 1068 | IRQF_SHARED, "SYSIO UE", sbus) < 0) { |
1069 | prom_printf("SYSIO[%x]: Cannot register UE interrupt.\n", | 1069 | prom_printf("SYSIO[%x]: Cannot register UE interrupt.\n", |
1070 | sbus->portid); | 1070 | sbus->portid); |
1071 | prom_halt(); | 1071 | prom_halt(); |
@@ -1073,7 +1073,7 @@ static void __init sysio_register_error_handlers(struct sbus_bus *sbus) | |||
1073 | 1073 | ||
1074 | irq = sbus_build_irq(sbus, SYSIO_CE_INO); | 1074 | irq = sbus_build_irq(sbus, SYSIO_CE_INO); |
1075 | if (request_irq(irq, sysio_ce_handler, | 1075 | if (request_irq(irq, sysio_ce_handler, |
1076 | SA_SHIRQ, "SYSIO CE", sbus) < 0) { | 1076 | IRQF_SHARED, "SYSIO CE", sbus) < 0) { |
1077 | prom_printf("SYSIO[%x]: Cannot register CE interrupt.\n", | 1077 | prom_printf("SYSIO[%x]: Cannot register CE interrupt.\n", |
1078 | sbus->portid); | 1078 | sbus->portid); |
1079 | prom_halt(); | 1079 | prom_halt(); |
@@ -1081,7 +1081,7 @@ static void __init sysio_register_error_handlers(struct sbus_bus *sbus) | |||
1081 | 1081 | ||
1082 | irq = sbus_build_irq(sbus, SYSIO_SBUSERR_INO); | 1082 | irq = sbus_build_irq(sbus, SYSIO_SBUSERR_INO); |
1083 | if (request_irq(irq, sysio_sbus_error_handler, | 1083 | if (request_irq(irq, sysio_sbus_error_handler, |
1084 | SA_SHIRQ, "SYSIO SBUS Error", sbus) < 0) { | 1084 | IRQF_SHARED, "SYSIO SBUS Error", sbus) < 0) { |
1085 | prom_printf("SYSIO[%x]: Cannot register SBUS Error interrupt.\n", | 1085 | prom_printf("SYSIO[%x]: Cannot register SBUS Error interrupt.\n", |
1086 | sbus->portid); | 1086 | sbus->portid); |
1087 | prom_halt(); | 1087 | prom_halt(); |
diff --git a/arch/um/drivers/line.c b/arch/um/drivers/line.c index 5ca57ca33713..ebebaabb78ad 100644 --- a/arch/um/drivers/line.c +++ b/arch/um/drivers/line.c | |||
@@ -373,7 +373,7 @@ static irqreturn_t line_write_interrupt(int irq, void *data, | |||
373 | int err; | 373 | int err; |
374 | 374 | ||
375 | /* Interrupts are enabled here because we registered the interrupt with | 375 | /* Interrupts are enabled here because we registered the interrupt with |
376 | * SA_INTERRUPT (see line_setup_irq).*/ | 376 | * IRQF_DISABLED (see line_setup_irq).*/ |
377 | 377 | ||
378 | spin_lock_irq(&line->lock); | 378 | spin_lock_irq(&line->lock); |
379 | err = flush_buffer(line); | 379 | err = flush_buffer(line); |
@@ -406,7 +406,7 @@ static irqreturn_t line_write_interrupt(int irq, void *data, | |||
406 | int line_setup_irq(int fd, int input, int output, struct line *line, void *data) | 406 | int line_setup_irq(int fd, int input, int output, struct line *line, void *data) |
407 | { | 407 | { |
408 | struct line_driver *driver = line->driver; | 408 | struct line_driver *driver = line->driver; |
409 | int err = 0, flags = SA_INTERRUPT | SA_SHIRQ | SA_SAMPLE_RANDOM; | 409 | int err = 0, flags = IRQF_DISABLED | IRQF_SHARED | IRQF_SAMPLE_RANDOM; |
410 | 410 | ||
411 | if (input) | 411 | if (input) |
412 | err = um_request_irq(driver->read_irq, fd, IRQ_READ, | 412 | err = um_request_irq(driver->read_irq, fd, IRQ_READ, |
@@ -767,7 +767,7 @@ void register_winch_irq(int fd, int tty_fd, int pid, struct tty_struct *tty) | |||
767 | spin_unlock(&winch_handler_lock); | 767 | spin_unlock(&winch_handler_lock); |
768 | 768 | ||
769 | if(um_request_irq(WINCH_IRQ, fd, IRQ_READ, winch_interrupt, | 769 | if(um_request_irq(WINCH_IRQ, fd, IRQ_READ, winch_interrupt, |
770 | SA_INTERRUPT | SA_SHIRQ | SA_SAMPLE_RANDOM, | 770 | IRQF_DISABLED | IRQF_SHARED | IRQF_SAMPLE_RANDOM, |
771 | "winch", winch) < 0) | 771 | "winch", winch) < 0) |
772 | printk("register_winch_irq - failed to register IRQ\n"); | 772 | printk("register_winch_irq - failed to register IRQ\n"); |
773 | } | 773 | } |
diff --git a/arch/um/drivers/mconsole_kern.c b/arch/um/drivers/mconsole_kern.c index 79149314ed04..b414522f7686 100644 --- a/arch/um/drivers/mconsole_kern.c +++ b/arch/um/drivers/mconsole_kern.c | |||
@@ -777,7 +777,7 @@ static int mconsole_init(void) | |||
777 | register_reboot_notifier(&reboot_notifier); | 777 | register_reboot_notifier(&reboot_notifier); |
778 | 778 | ||
779 | err = um_request_irq(MCONSOLE_IRQ, sock, IRQ_READ, mconsole_interrupt, | 779 | err = um_request_irq(MCONSOLE_IRQ, sock, IRQ_READ, mconsole_interrupt, |
780 | SA_INTERRUPT | SA_SHIRQ | SA_SAMPLE_RANDOM, | 780 | IRQF_DISABLED | IRQF_SHARED | IRQF_SAMPLE_RANDOM, |
781 | "mconsole", (void *)sock); | 781 | "mconsole", (void *)sock); |
782 | if (err){ | 782 | if (err){ |
783 | printk("Failed to get IRQ for management console\n"); | 783 | printk("Failed to get IRQ for management console\n"); |
diff --git a/arch/um/drivers/net_kern.c b/arch/um/drivers/net_kern.c index 8c7279bb353b..501f95675d89 100644 --- a/arch/um/drivers/net_kern.c +++ b/arch/um/drivers/net_kern.c | |||
@@ -128,7 +128,7 @@ static int uml_net_open(struct net_device *dev) | |||
128 | } | 128 | } |
129 | 129 | ||
130 | err = um_request_irq(dev->irq, lp->fd, IRQ_READ, uml_net_interrupt, | 130 | err = um_request_irq(dev->irq, lp->fd, IRQ_READ, uml_net_interrupt, |
131 | SA_INTERRUPT | SA_SHIRQ, dev->name, dev); | 131 | IRQF_DISABLED | IRQF_SHARED, dev->name, dev); |
132 | if(err != 0){ | 132 | if(err != 0){ |
133 | printk(KERN_ERR "uml_net_open: failed to get irq(%d)\n", err); | 133 | printk(KERN_ERR "uml_net_open: failed to get irq(%d)\n", err); |
134 | err = -ENETUNREACH; | 134 | err = -ENETUNREACH; |
diff --git a/arch/um/drivers/port_kern.c b/arch/um/drivers/port_kern.c index 189839e4f1d4..73755f37a8a8 100644 --- a/arch/um/drivers/port_kern.c +++ b/arch/um/drivers/port_kern.c | |||
@@ -105,7 +105,7 @@ static int port_accept(struct port_list *port) | |||
105 | .port = port }); | 105 | .port = port }); |
106 | 106 | ||
107 | if(um_request_irq(TELNETD_IRQ, socket[0], IRQ_READ, pipe_interrupt, | 107 | if(um_request_irq(TELNETD_IRQ, socket[0], IRQ_READ, pipe_interrupt, |
108 | SA_INTERRUPT | SA_SHIRQ | SA_SAMPLE_RANDOM, | 108 | IRQF_DISABLED | IRQF_SHARED | IRQF_SAMPLE_RANDOM, |
109 | "telnetd", conn)){ | 109 | "telnetd", conn)){ |
110 | printk(KERN_ERR "port_accept : failed to get IRQ for " | 110 | printk(KERN_ERR "port_accept : failed to get IRQ for " |
111 | "telnetd\n"); | 111 | "telnetd\n"); |
@@ -186,7 +186,7 @@ void *port_data(int port_num) | |||
186 | goto out_free; | 186 | goto out_free; |
187 | } | 187 | } |
188 | if(um_request_irq(ACCEPT_IRQ, fd, IRQ_READ, port_interrupt, | 188 | if(um_request_irq(ACCEPT_IRQ, fd, IRQ_READ, port_interrupt, |
189 | SA_INTERRUPT | SA_SHIRQ | SA_SAMPLE_RANDOM, "port", | 189 | IRQF_DISABLED | IRQF_SHARED | IRQF_SAMPLE_RANDOM, "port", |
190 | port)){ | 190 | port)){ |
191 | printk(KERN_ERR "Failed to get IRQ for port %d\n", port_num); | 191 | printk(KERN_ERR "Failed to get IRQ for port %d\n", port_num); |
192 | goto out_close; | 192 | goto out_close; |
diff --git a/arch/um/drivers/ubd_kern.c b/arch/um/drivers/ubd_kern.c index 0345e2551247..602d7286b9e0 100644 --- a/arch/um/drivers/ubd_kern.c +++ b/arch/um/drivers/ubd_kern.c | |||
@@ -874,7 +874,7 @@ int ubd_driver_init(void){ | |||
874 | return(0); | 874 | return(0); |
875 | } | 875 | } |
876 | err = um_request_irq(UBD_IRQ, thread_fd, IRQ_READ, ubd_intr, | 876 | err = um_request_irq(UBD_IRQ, thread_fd, IRQ_READ, ubd_intr, |
877 | SA_INTERRUPT, "ubd", ubd_dev); | 877 | IRQF_DISABLED, "ubd", ubd_dev); |
878 | if(err != 0) | 878 | if(err != 0) |
879 | printk(KERN_ERR "um_request_irq failed - errno = %d\n", -err); | 879 | printk(KERN_ERR "um_request_irq failed - errno = %d\n", -err); |
880 | return 0; | 880 | return 0; |
diff --git a/arch/um/drivers/xterm_kern.c b/arch/um/drivers/xterm_kern.c index d269a80f4b0c..6036ec85895a 100644 --- a/arch/um/drivers/xterm_kern.c +++ b/arch/um/drivers/xterm_kern.c | |||
@@ -54,7 +54,7 @@ int xterm_fd(int socket, int *pid_out) | |||
54 | init_completion(&data->ready); | 54 | init_completion(&data->ready); |
55 | 55 | ||
56 | err = um_request_irq(XTERM_IRQ, socket, IRQ_READ, xterm_interrupt, | 56 | err = um_request_irq(XTERM_IRQ, socket, IRQ_READ, xterm_interrupt, |
57 | SA_INTERRUPT | SA_SHIRQ | SA_SAMPLE_RANDOM, | 57 | IRQF_DISABLED | IRQF_SHARED | IRQF_SAMPLE_RANDOM, |
58 | "xterm", data); | 58 | "xterm", data); |
59 | if (err){ | 59 | if (err){ |
60 | printk(KERN_ERR "xterm_fd : failed to get IRQ for xterm, " | 60 | printk(KERN_ERR "xterm_fd : failed to get IRQ for xterm, " |
diff --git a/arch/um/kernel/irq.c b/arch/um/kernel/irq.c index fae43a3054a0..bfd0bdc8cd40 100644 --- a/arch/um/kernel/irq.c +++ b/arch/um/kernel/irq.c | |||
@@ -474,7 +474,7 @@ int init_aio_irq(int irq, char *name, irqreturn_t (*handler)(int, void *, | |||
474 | } | 474 | } |
475 | 475 | ||
476 | err = um_request_irq(irq, fds[0], IRQ_READ, handler, | 476 | err = um_request_irq(irq, fds[0], IRQ_READ, handler, |
477 | SA_INTERRUPT | SA_SAMPLE_RANDOM, name, | 477 | IRQF_DISABLED | IRQF_SAMPLE_RANDOM, name, |
478 | (void *) (long) fds[0]); | 478 | (void *) (long) fds[0]); |
479 | if (err) { | 479 | if (err) { |
480 | printk("init_aio_irq - : um_request_irq failed, err = %d\n", | 480 | printk("init_aio_irq - : um_request_irq failed, err = %d\n", |
diff --git a/arch/um/kernel/sigio_kern.c b/arch/um/kernel/sigio_kern.c index 1c1300fb1e95..51b677083948 100644 --- a/arch/um/kernel/sigio_kern.c +++ b/arch/um/kernel/sigio_kern.c | |||
@@ -31,7 +31,7 @@ int write_sigio_irq(int fd) | |||
31 | int err; | 31 | int err; |
32 | 32 | ||
33 | err = um_request_irq(SIGIO_WRITE_IRQ, fd, IRQ_READ, sigio_interrupt, | 33 | err = um_request_irq(SIGIO_WRITE_IRQ, fd, IRQ_READ, sigio_interrupt, |
34 | SA_INTERRUPT | SA_SAMPLE_RANDOM, "write sigio", | 34 | IRQF_DISABLED | IRQF_SAMPLE_RANDOM, "write sigio", |
35 | NULL); | 35 | NULL); |
36 | if(err){ | 36 | if(err){ |
37 | printk("write_sigio_irq : um_request_irq failed, err = %d\n", | 37 | printk("write_sigio_irq : um_request_irq failed, err = %d\n", |
diff --git a/arch/um/kernel/skas/uaccess.c b/arch/um/kernel/skas/uaccess.c index 5992c3257167..8912cec0fe43 100644 --- a/arch/um/kernel/skas/uaccess.c +++ b/arch/um/kernel/skas/uaccess.c | |||
@@ -8,6 +8,7 @@ | |||
8 | #include "linux/kernel.h" | 8 | #include "linux/kernel.h" |
9 | #include "linux/string.h" | 9 | #include "linux/string.h" |
10 | #include "linux/fs.h" | 10 | #include "linux/fs.h" |
11 | #include "linux/hardirq.h" | ||
11 | #include "linux/highmem.h" | 12 | #include "linux/highmem.h" |
12 | #include "asm/page.h" | 13 | #include "asm/page.h" |
13 | #include "asm/pgtable.h" | 14 | #include "asm/pgtable.h" |
@@ -38,7 +39,7 @@ static unsigned long maybe_map(unsigned long virt, int is_write) | |||
38 | return((unsigned long) phys); | 39 | return((unsigned long) phys); |
39 | } | 40 | } |
40 | 41 | ||
41 | static int do_op(unsigned long addr, int len, int is_write, | 42 | static int do_op_one_page(unsigned long addr, int len, int is_write, |
42 | int (*op)(unsigned long addr, int len, void *arg), void *arg) | 43 | int (*op)(unsigned long addr, int len, void *arg), void *arg) |
43 | { | 44 | { |
44 | struct page *page; | 45 | struct page *page; |
@@ -49,9 +50,11 @@ static int do_op(unsigned long addr, int len, int is_write, | |||
49 | return(-1); | 50 | return(-1); |
50 | 51 | ||
51 | page = phys_to_page(addr); | 52 | page = phys_to_page(addr); |
52 | addr = (unsigned long) kmap(page) + (addr & ~PAGE_MASK); | 53 | addr = (unsigned long) kmap_atomic(page, KM_UML_USERCOPY) + (addr & ~PAGE_MASK); |
54 | |||
53 | n = (*op)(addr, len, arg); | 55 | n = (*op)(addr, len, arg); |
54 | kunmap(page); | 56 | |
57 | kunmap_atomic(page, KM_UML_USERCOPY); | ||
55 | 58 | ||
56 | return(n); | 59 | return(n); |
57 | } | 60 | } |
@@ -77,7 +80,7 @@ static void do_buffer_op(void *jmpbuf, void *arg_ptr) | |||
77 | remain = len; | 80 | remain = len; |
78 | 81 | ||
79 | current->thread.fault_catcher = jmpbuf; | 82 | current->thread.fault_catcher = jmpbuf; |
80 | n = do_op(addr, size, is_write, op, arg); | 83 | n = do_op_one_page(addr, size, is_write, op, arg); |
81 | if(n != 0){ | 84 | if(n != 0){ |
82 | *res = (n < 0 ? remain : 0); | 85 | *res = (n < 0 ? remain : 0); |
83 | goto out; | 86 | goto out; |
@@ -91,7 +94,7 @@ static void do_buffer_op(void *jmpbuf, void *arg_ptr) | |||
91 | } | 94 | } |
92 | 95 | ||
93 | while(addr < ((addr + remain) & PAGE_MASK)){ | 96 | while(addr < ((addr + remain) & PAGE_MASK)){ |
94 | n = do_op(addr, PAGE_SIZE, is_write, op, arg); | 97 | n = do_op_one_page(addr, PAGE_SIZE, is_write, op, arg); |
95 | if(n != 0){ | 98 | if(n != 0){ |
96 | *res = (n < 0 ? remain : 0); | 99 | *res = (n < 0 ? remain : 0); |
97 | goto out; | 100 | goto out; |
@@ -105,7 +108,7 @@ static void do_buffer_op(void *jmpbuf, void *arg_ptr) | |||
105 | goto out; | 108 | goto out; |
106 | } | 109 | } |
107 | 110 | ||
108 | n = do_op(addr, remain, is_write, op, arg); | 111 | n = do_op_one_page(addr, remain, is_write, op, arg); |
109 | if(n != 0) | 112 | if(n != 0) |
110 | *res = (n < 0 ? remain : 0); | 113 | *res = (n < 0 ? remain : 0); |
111 | else *res = 0; | 114 | else *res = 0; |
diff --git a/arch/um/kernel/time_kern.c b/arch/um/kernel/time_kern.c index 820fa3615a3f..d7e044b5e5ee 100644 --- a/arch/um/kernel/time_kern.c +++ b/arch/um/kernel/time_kern.c | |||
@@ -195,7 +195,7 @@ int __init timer_init(void) | |||
195 | int err; | 195 | int err; |
196 | 196 | ||
197 | user_time_init(); | 197 | user_time_init(); |
198 | err = request_irq(TIMER_IRQ, um_timer, SA_INTERRUPT, "timer", NULL); | 198 | err = request_irq(TIMER_IRQ, um_timer, IRQF_DISABLED, "timer", NULL); |
199 | if(err != 0) | 199 | if(err != 0) |
200 | printk(KERN_ERR "timer_init : request_irq failed - " | 200 | printk(KERN_ERR "timer_init : request_irq failed - " |
201 | "errno = %d\n", -err); | 201 | "errno = %d\n", -err); |
diff --git a/arch/um/os-Linux/umid.c b/arch/um/os-Linux/umid.c index 362db059fe30..48092b95c8ab 100644 --- a/arch/um/os-Linux/umid.c +++ b/arch/um/os-Linux/umid.c | |||
@@ -67,32 +67,53 @@ err: | |||
67 | return err; | 67 | return err; |
68 | } | 68 | } |
69 | 69 | ||
70 | static int actually_do_remove(char *dir) | 70 | /* |
71 | * Unlinks the files contained in @dir and then removes @dir. | ||
72 | * Doesn't handle directory trees, so it's not like rm -rf, but almost such. We | ||
73 | * ignore ENOENT errors for anything (they happen, strangely enough - possibly due | ||
74 | * to races between multiple dying UML threads). | ||
75 | */ | ||
76 | static int remove_files_and_dir(char *dir) | ||
71 | { | 77 | { |
72 | DIR *directory; | 78 | DIR *directory; |
73 | struct dirent *ent; | 79 | struct dirent *ent; |
74 | int len; | 80 | int len; |
75 | char file[256]; | 81 | char file[256]; |
82 | int ret; | ||
76 | 83 | ||
77 | directory = opendir(dir); | 84 | directory = opendir(dir); |
78 | if(directory == NULL) | 85 | if (directory == NULL) { |
79 | return -errno; | 86 | if (errno != ENOENT) |
87 | return -errno; | ||
88 | else | ||
89 | return 0; | ||
90 | } | ||
80 | 91 | ||
81 | while((ent = readdir(directory)) != NULL){ | 92 | while ((ent = readdir(directory)) != NULL) { |
82 | if(!strcmp(ent->d_name, ".") || !strcmp(ent->d_name, "..")) | 93 | if (!strcmp(ent->d_name, ".") || !strcmp(ent->d_name, "..")) |
83 | continue; | 94 | continue; |
84 | len = strlen(dir) + sizeof("/") + strlen(ent->d_name) + 1; | 95 | len = strlen(dir) + sizeof("/") + strlen(ent->d_name) + 1; |
85 | if(len > sizeof(file)) | 96 | if (len > sizeof(file)) { |
86 | return -E2BIG; | 97 | ret = -E2BIG; |
98 | goto out; | ||
99 | } | ||
87 | 100 | ||
88 | sprintf(file, "%s/%s", dir, ent->d_name); | 101 | sprintf(file, "%s/%s", dir, ent->d_name); |
89 | if(unlink(file) < 0) | 102 | if (unlink(file) < 0 && errno != ENOENT) { |
90 | return -errno; | 103 | ret = -errno; |
104 | goto out; | ||
105 | } | ||
91 | } | 106 | } |
92 | if(rmdir(dir) < 0) | ||
93 | return -errno; | ||
94 | 107 | ||
95 | return 0; | 108 | if (rmdir(dir) < 0 && errno != ENOENT) { |
109 | ret = -errno; | ||
110 | goto out; | ||
111 | } | ||
112 | |||
113 | ret = 0; | ||
114 | out: | ||
115 | closedir(directory); | ||
116 | return ret; | ||
96 | } | 117 | } |
97 | 118 | ||
98 | /* This says that there isn't already a user of the specified directory even if | 119 | /* This says that there isn't already a user of the specified directory even if |
@@ -103,9 +124,10 @@ static int actually_do_remove(char *dir) | |||
103 | * something other than UML sticking stuff in the directory | 124 | * something other than UML sticking stuff in the directory |
104 | * this boot racing with a shutdown of the other UML | 125 | * this boot racing with a shutdown of the other UML |
105 | * In any of these cases, the directory isn't useful for anything else. | 126 | * In any of these cases, the directory isn't useful for anything else. |
127 | * | ||
128 | * Boolean return: 1 if in use, 0 otherwise. | ||
106 | */ | 129 | */ |
107 | 130 | static inline int is_umdir_used(char *dir) | |
108 | static int not_dead_yet(char *dir) | ||
109 | { | 131 | { |
110 | char file[strlen(uml_dir) + UMID_LEN + sizeof("/pid\0")]; | 132 | char file[strlen(uml_dir) + UMID_LEN + sizeof("/pid\0")]; |
111 | char pid[sizeof("nnnnn\0")], *end; | 133 | char pid[sizeof("nnnnn\0")], *end; |
@@ -113,7 +135,7 @@ static int not_dead_yet(char *dir) | |||
113 | 135 | ||
114 | n = snprintf(file, sizeof(file), "%s/pid", dir); | 136 | n = snprintf(file, sizeof(file), "%s/pid", dir); |
115 | if(n >= sizeof(file)){ | 137 | if(n >= sizeof(file)){ |
116 | printk("not_dead_yet - pid filename too long\n"); | 138 | printk("is_umdir_used - pid filename too long\n"); |
117 | err = -E2BIG; | 139 | err = -E2BIG; |
118 | goto out; | 140 | goto out; |
119 | } | 141 | } |
@@ -123,7 +145,7 @@ static int not_dead_yet(char *dir) | |||
123 | if(fd < 0) { | 145 | if(fd < 0) { |
124 | fd = -errno; | 146 | fd = -errno; |
125 | if(fd != -ENOENT){ | 147 | if(fd != -ENOENT){ |
126 | printk("not_dead_yet : couldn't open pid file '%s', " | 148 | printk("is_umdir_used : couldn't open pid file '%s', " |
127 | "err = %d\n", file, -fd); | 149 | "err = %d\n", file, -fd); |
128 | } | 150 | } |
129 | goto out; | 151 | goto out; |
@@ -132,18 +154,18 @@ static int not_dead_yet(char *dir) | |||
132 | err = 0; | 154 | err = 0; |
133 | n = read(fd, pid, sizeof(pid)); | 155 | n = read(fd, pid, sizeof(pid)); |
134 | if(n < 0){ | 156 | if(n < 0){ |
135 | printk("not_dead_yet : couldn't read pid file '%s', " | 157 | printk("is_umdir_used : couldn't read pid file '%s', " |
136 | "err = %d\n", file, errno); | 158 | "err = %d\n", file, errno); |
137 | goto out_close; | 159 | goto out_close; |
138 | } else if(n == 0){ | 160 | } else if(n == 0){ |
139 | printk("not_dead_yet : couldn't read pid file '%s', " | 161 | printk("is_umdir_used : couldn't read pid file '%s', " |
140 | "0-byte read\n", file); | 162 | "0-byte read\n", file); |
141 | goto out_close; | 163 | goto out_close; |
142 | } | 164 | } |
143 | 165 | ||
144 | p = strtoul(pid, &end, 0); | 166 | p = strtoul(pid, &end, 0); |
145 | if(end == pid){ | 167 | if(end == pid){ |
146 | printk("not_dead_yet : couldn't parse pid file '%s', " | 168 | printk("is_umdir_used : couldn't parse pid file '%s', " |
147 | "errno = %d\n", file, errno); | 169 | "errno = %d\n", file, errno); |
148 | goto out_close; | 170 | goto out_close; |
149 | } | 171 | } |
@@ -153,19 +175,32 @@ static int not_dead_yet(char *dir) | |||
153 | return 1; | 175 | return 1; |
154 | } | 176 | } |
155 | 177 | ||
156 | err = actually_do_remove(dir); | ||
157 | if(err) | ||
158 | printk("not_dead_yet - actually_do_remove failed with " | ||
159 | "err = %d\n", err); | ||
160 | |||
161 | return err; | ||
162 | |||
163 | out_close: | 178 | out_close: |
164 | close(fd); | 179 | close(fd); |
165 | out: | 180 | out: |
166 | return 0; | 181 | return 0; |
167 | } | 182 | } |
168 | 183 | ||
184 | /* | ||
185 | * Try to remove the directory @dir unless it's in use. | ||
186 | * Precondition: @dir exists. | ||
187 | * Returns 0 for success, < 0 for failure in removal or if the directory is in | ||
188 | * use. | ||
189 | */ | ||
190 | static int umdir_take_if_dead(char *dir) | ||
191 | { | ||
192 | int ret; | ||
193 | if (is_umdir_used(dir)) | ||
194 | return -EEXIST; | ||
195 | |||
196 | ret = remove_files_and_dir(dir); | ||
197 | if (ret) { | ||
198 | printk("is_umdir_used - remove_files_and_dir failed with " | ||
199 | "err = %d\n", ret); | ||
200 | } | ||
201 | return ret; | ||
202 | } | ||
203 | |||
169 | static void __init create_pid_file(void) | 204 | static void __init create_pid_file(void) |
170 | { | 205 | { |
171 | char file[strlen(uml_dir) + UMID_LEN + sizeof("/pid\0")]; | 206 | char file[strlen(uml_dir) + UMID_LEN + sizeof("/pid\0")]; |
@@ -244,11 +279,7 @@ int __init make_umid(void) | |||
244 | if(err != -EEXIST) | 279 | if(err != -EEXIST) |
245 | goto err; | 280 | goto err; |
246 | 281 | ||
247 | /* 1 -> this umid is already in use | 282 | if (umdir_take_if_dead(tmp) < 0) |
248 | * < 0 -> we couldn't remove the umid directory | ||
249 | * In either case, we can't use this umid, so return -EEXIST. | ||
250 | */ | ||
251 | if(not_dead_yet(tmp) != 0) | ||
252 | goto err; | 283 | goto err; |
253 | 284 | ||
254 | err = mkdir(tmp, 0777); | 285 | err = mkdir(tmp, 0777); |
@@ -344,9 +375,9 @@ static void remove_umid_dir(void) | |||
344 | char dir[strlen(uml_dir) + UMID_LEN + 1], err; | 375 | char dir[strlen(uml_dir) + UMID_LEN + 1], err; |
345 | 376 | ||
346 | sprintf(dir, "%s%s", uml_dir, umid); | 377 | sprintf(dir, "%s%s", uml_dir, umid); |
347 | err = actually_do_remove(dir); | 378 | err = remove_files_and_dir(dir); |
348 | if(err) | 379 | if(err) |
349 | printf("remove_umid_dir - actually_do_remove failed with " | 380 | printf("remove_umid_dir - remove_files_and_dir failed with " |
350 | "err = %d\n", err); | 381 | "err = %d\n", err); |
351 | } | 382 | } |
352 | 383 | ||
diff --git a/arch/um/scripts/Makefile.rules b/arch/um/scripts/Makefile.rules index 1347dc6d5218..813077fb1e5b 100644 --- a/arch/um/scripts/Makefile.rules +++ b/arch/um/scripts/Makefile.rules | |||
@@ -8,7 +8,7 @@ USER_OBJS += $(filter %_user.o,$(obj-y) $(obj-m) $(USER_SINGLE_OBJS)) | |||
8 | USER_OBJS := $(foreach file,$(USER_OBJS),$(obj)/$(file)) | 8 | USER_OBJS := $(foreach file,$(USER_OBJS),$(obj)/$(file)) |
9 | 9 | ||
10 | $(USER_OBJS:.o=.%): \ | 10 | $(USER_OBJS:.o=.%): \ |
11 | c_flags = -Wp,-MD,$(depfile) $(USER_CFLAGS) $(CFLAGS_$(*F).o) | 11 | c_flags = -Wp,-MD,$(depfile) $(USER_CFLAGS) $(CFLAGS_$(basetarget).o) |
12 | $(USER_OBJS) : CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ \ | 12 | $(USER_OBJS) : CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ \ |
13 | -Dunix -D__unix__ -D__$(SUBARCH)__ | 13 | -Dunix -D__unix__ -D__$(SUBARCH)__ |
14 | 14 | ||
@@ -17,7 +17,7 @@ $(USER_OBJS) : CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ \ | |||
17 | UNPROFILE_OBJS := $(foreach file,$(UNPROFILE_OBJS),$(obj)/$(file)) | 17 | UNPROFILE_OBJS := $(foreach file,$(UNPROFILE_OBJS),$(obj)/$(file)) |
18 | 18 | ||
19 | $(UNPROFILE_OBJS:.o=.%): \ | 19 | $(UNPROFILE_OBJS:.o=.%): \ |
20 | c_flags = -Wp,-MD,$(depfile) $(call unprofile,$(USER_CFLAGS)) $(CFLAGS_$(*F).o) | 20 | c_flags = -Wp,-MD,$(depfile) $(call unprofile,$(USER_CFLAGS)) $(CFLAGS_$(basetarget).o) |
21 | $(UNPROFILE_OBJS) : CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ \ | 21 | $(UNPROFILE_OBJS) : CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ \ |
22 | -Dunix -D__unix__ -D__$(SUBARCH)__ | 22 | -Dunix -D__unix__ -D__$(SUBARCH)__ |
23 | 23 | ||
diff --git a/arch/v850/kernel/gbus_int.c b/arch/v850/kernel/gbus_int.c index 92918b8d89ef..25d636e79e6a 100644 --- a/arch/v850/kernel/gbus_int.c +++ b/arch/v850/kernel/gbus_int.c | |||
@@ -154,7 +154,7 @@ static unsigned gbus_int_startup_irq (unsigned irq) | |||
154 | /* First enable the CPU interrupt. */ | 154 | /* First enable the CPU interrupt. */ |
155 | int rval = | 155 | int rval = |
156 | request_irq (IRQ_GINT(gint), gbus_int_handle_irq, | 156 | request_irq (IRQ_GINT(gint), gbus_int_handle_irq, |
157 | SA_INTERRUPT, | 157 | IRQF_DISABLED, |
158 | "gbus_int_handler", | 158 | "gbus_int_handler", |
159 | &gint_num_active_irqs[gint]); | 159 | &gint_num_active_irqs[gint]); |
160 | if (rval != 0) | 160 | if (rval != 0) |
diff --git a/arch/v850/kernel/rte_me2_cb.c b/arch/v850/kernel/rte_me2_cb.c index df7027d85437..3be355a029e2 100644 --- a/arch/v850/kernel/rte_me2_cb.c +++ b/arch/v850/kernel/rte_me2_cb.c | |||
@@ -263,7 +263,7 @@ static unsigned cb_pic_startup_irq (unsigned irq) | |||
263 | 263 | ||
264 | if (cb_pic_active_irqs == 0) { | 264 | if (cb_pic_active_irqs == 0) { |
265 | rval = request_irq (IRQ_CB_PIC, cb_pic_handle_irq, | 265 | rval = request_irq (IRQ_CB_PIC, cb_pic_handle_irq, |
266 | SA_INTERRUPT, "cb_pic_handler", 0); | 266 | IRQF_DISABLED, "cb_pic_handler", 0); |
267 | if (rval != 0) | 267 | if (rval != 0) |
268 | return rval; | 268 | return rval; |
269 | } | 269 | } |
diff --git a/arch/v850/kernel/time.c b/arch/v850/kernel/time.c index c1e85c2aef65..a0b46695f186 100644 --- a/arch/v850/kernel/time.c +++ b/arch/v850/kernel/time.c | |||
@@ -177,7 +177,7 @@ EXPORT_SYMBOL(do_settimeofday); | |||
177 | static int timer_dev_id; | 177 | static int timer_dev_id; |
178 | static struct irqaction timer_irqaction = { | 178 | static struct irqaction timer_irqaction = { |
179 | timer_interrupt, | 179 | timer_interrupt, |
180 | SA_INTERRUPT, | 180 | IRQF_DISABLED, |
181 | CPU_MASK_NONE, | 181 | CPU_MASK_NONE, |
182 | "timer", | 182 | "timer", |
183 | &timer_dev_id, | 183 | &timer_dev_id, |
diff --git a/arch/x86_64/ia32/Makefile b/arch/x86_64/ia32/Makefile index e9263b4975e0..62bc5f56da9e 100644 --- a/arch/x86_64/ia32/Makefile +++ b/arch/x86_64/ia32/Makefile | |||
@@ -11,6 +11,9 @@ obj-$(CONFIG_IA32_EMULATION) += $(sysv-y) | |||
11 | 11 | ||
12 | obj-$(CONFIG_IA32_AOUT) += ia32_aout.o | 12 | obj-$(CONFIG_IA32_AOUT) += ia32_aout.o |
13 | 13 | ||
14 | audit-class-$(CONFIG_AUDIT) := audit.o | ||
15 | obj-$(CONFIG_IA32_EMULATION) += $(audit-class-y) | ||
16 | |||
14 | $(obj)/syscall32_syscall.o: \ | 17 | $(obj)/syscall32_syscall.o: \ |
15 | $(foreach F,sysenter syscall,$(obj)/vsyscall-$F.so) | 18 | $(foreach F,sysenter syscall,$(obj)/vsyscall-$F.so) |
16 | 19 | ||
diff --git a/arch/x86_64/ia32/audit.c b/arch/x86_64/ia32/audit.c new file mode 100644 index 000000000000..ab94f2e58cdd --- /dev/null +++ b/arch/x86_64/ia32/audit.c | |||
@@ -0,0 +1,11 @@ | |||
1 | #include <asm-i386/unistd.h> | ||
2 | |||
3 | unsigned ia32_dir_class[] = { | ||
4 | #include <asm-generic/audit_dir_write.h> | ||
5 | ~0U | ||
6 | }; | ||
7 | |||
8 | unsigned ia32_chattr_class[] = { | ||
9 | #include <asm-generic/audit_change_attr.h> | ||
10 | ~0U | ||
11 | }; | ||
diff --git a/arch/x86_64/kernel/Makefile b/arch/x86_64/kernel/Makefile index aeb9c560be88..819e84ec5b64 100644 --- a/arch/x86_64/kernel/Makefile +++ b/arch/x86_64/kernel/Makefile | |||
@@ -35,6 +35,7 @@ obj-$(CONFIG_KPROBES) += kprobes.o | |||
35 | obj-$(CONFIG_X86_PM_TIMER) += pmtimer.o | 35 | obj-$(CONFIG_X86_PM_TIMER) += pmtimer.o |
36 | obj-$(CONFIG_X86_VSMP) += vsmp.o | 36 | obj-$(CONFIG_X86_VSMP) += vsmp.o |
37 | obj-$(CONFIG_K8_NB) += k8.o | 37 | obj-$(CONFIG_K8_NB) += k8.o |
38 | obj-$(CONFIG_AUDIT) += audit.o | ||
38 | 39 | ||
39 | obj-$(CONFIG_MODULES) += module.o | 40 | obj-$(CONFIG_MODULES) += module.o |
40 | 41 | ||
diff --git a/arch/x86_64/kernel/audit.c b/arch/x86_64/kernel/audit.c new file mode 100644 index 000000000000..a067aa468a85 --- /dev/null +++ b/arch/x86_64/kernel/audit.c | |||
@@ -0,0 +1,29 @@ | |||
1 | #include <linux/init.h> | ||
2 | #include <linux/types.h> | ||
3 | #include <linux/audit.h> | ||
4 | #include <asm/unistd.h> | ||
5 | |||
6 | static unsigned dir_class[] = { | ||
7 | #include <asm-generic/audit_dir_write.h> | ||
8 | ~0U | ||
9 | }; | ||
10 | |||
11 | static unsigned chattr_class[] = { | ||
12 | #include <asm-generic/audit_change_attr.h> | ||
13 | ~0U | ||
14 | }; | ||
15 | |||
16 | static int __init audit_classes_init(void) | ||
17 | { | ||
18 | #ifdef CONFIG_IA32_EMULATION | ||
19 | extern __u32 ia32_dir_class[]; | ||
20 | extern __u32 ia32_chattr_class[]; | ||
21 | audit_register_class(AUDIT_CLASS_DIR_WRITE_32, ia32_dir_class); | ||
22 | audit_register_class(AUDIT_CLASS_CHATTR_32, ia32_chattr_class); | ||
23 | #endif | ||
24 | audit_register_class(AUDIT_CLASS_DIR_WRITE, dir_class); | ||
25 | audit_register_class(AUDIT_CLASS_CHATTR, chattr_class); | ||
26 | return 0; | ||
27 | } | ||
28 | |||
29 | __initcall(audit_classes_init); | ||
diff --git a/arch/x86_64/kernel/time.c b/arch/x86_64/kernel/time.c index ebbee6f59ff5..b9ff75992c16 100644 --- a/arch/x86_64/kernel/time.c +++ b/arch/x86_64/kernel/time.c | |||
@@ -889,7 +889,7 @@ int __init time_setup(char *str) | |||
889 | } | 889 | } |
890 | 890 | ||
891 | static struct irqaction irq0 = { | 891 | static struct irqaction irq0 = { |
892 | timer_interrupt, SA_INTERRUPT, CPU_MASK_NONE, "timer", NULL, NULL | 892 | timer_interrupt, IRQF_DISABLED, CPU_MASK_NONE, "timer", NULL, NULL |
893 | }; | 893 | }; |
894 | 894 | ||
895 | void __init time_init(void) | 895 | void __init time_init(void) |
diff --git a/arch/x86_64/mm/init.c b/arch/x86_64/mm/init.c index 72f140f81b70..d14fb2dfbfc4 100644 --- a/arch/x86_64/mm/init.c +++ b/arch/x86_64/mm/init.c | |||
@@ -678,16 +678,15 @@ void free_initmem(void) | |||
678 | 678 | ||
679 | #ifdef CONFIG_DEBUG_RODATA | 679 | #ifdef CONFIG_DEBUG_RODATA |
680 | 680 | ||
681 | extern char __start_rodata, __end_rodata; | ||
682 | void mark_rodata_ro(void) | 681 | void mark_rodata_ro(void) |
683 | { | 682 | { |
684 | unsigned long addr = (unsigned long)&__start_rodata; | 683 | unsigned long addr = (unsigned long)__start_rodata; |
685 | 684 | ||
686 | for (; addr < (unsigned long)&__end_rodata; addr += PAGE_SIZE) | 685 | for (; addr < (unsigned long)__end_rodata; addr += PAGE_SIZE) |
687 | change_page_attr_addr(addr, 1, PAGE_KERNEL_RO); | 686 | change_page_attr_addr(addr, 1, PAGE_KERNEL_RO); |
688 | 687 | ||
689 | printk ("Write protecting the kernel read-only data: %luk\n", | 688 | printk ("Write protecting the kernel read-only data: %luk\n", |
690 | (&__end_rodata - &__start_rodata) >> 10); | 689 | (__end_rodata - __start_rodata) >> 10); |
691 | 690 | ||
692 | /* | 691 | /* |
693 | * change_page_attr_addr() requires a global_flush_tlb() call after it. | 692 | * change_page_attr_addr() requires a global_flush_tlb() call after it. |
diff --git a/arch/xtensa/kernel/time.c b/arch/xtensa/kernel/time.c index 4a2c365ba684..412ab32de391 100644 --- a/arch/xtensa/kernel/time.c +++ b/arch/xtensa/kernel/time.c | |||
@@ -52,7 +52,7 @@ unsigned long long sched_clock(void) | |||
52 | static irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs *regs); | 52 | static irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs *regs); |
53 | static struct irqaction timer_irqaction = { | 53 | static struct irqaction timer_irqaction = { |
54 | .handler = timer_interrupt, | 54 | .handler = timer_interrupt, |
55 | .flags = SA_INTERRUPT, | 55 | .flags = IRQF_DISABLED, |
56 | .name = "timer", | 56 | .name = "timer", |
57 | }; | 57 | }; |
58 | 58 | ||
diff --git a/drivers/acorn/block/mfmhd.c b/drivers/acorn/block/mfmhd.c index d9c9a35961b3..3dd6b7bb5d35 100644 --- a/drivers/acorn/block/mfmhd.c +++ b/drivers/acorn/block/mfmhd.c | |||
@@ -1278,7 +1278,7 @@ static int mfm_do_init(unsigned char irqmask) | |||
1278 | 1278 | ||
1279 | printk("mfm: detected %d hard drive%s\n", mfm_drives, | 1279 | printk("mfm: detected %d hard drive%s\n", mfm_drives, |
1280 | mfm_drives == 1 ? "" : "s"); | 1280 | mfm_drives == 1 ? "" : "s"); |
1281 | ret = request_irq(mfm_irq, mfm_interrupt_handler, SA_INTERRUPT, "MFM harddisk", NULL); | 1281 | ret = request_irq(mfm_irq, mfm_interrupt_handler, IRQF_DISABLED, "MFM harddisk", NULL); |
1282 | if (ret) { | 1282 | if (ret) { |
1283 | printk("mfm: unable to get IRQ%d\n", mfm_irq); | 1283 | printk("mfm: unable to get IRQ%d\n", mfm_irq); |
1284 | goto out4; | 1284 | goto out4; |
diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c index dec044c04273..ea5a0496a4fd 100644 --- a/drivers/acpi/bus.c +++ b/drivers/acpi/bus.c | |||
@@ -192,7 +192,7 @@ int acpi_bus_set_power(acpi_handle handle, int state) | |||
192 | /* Make sure this is a valid target state */ | 192 | /* Make sure this is a valid target state */ |
193 | 193 | ||
194 | if (!device->flags.power_manageable) { | 194 | if (!device->flags.power_manageable) { |
195 | printk(KERN_DEBUG "Device `[%s]is not power manageable", | 195 | printk(KERN_DEBUG "Device `[%s]' is not power manageable", |
196 | device->kobj.name); | 196 | device->kobj.name); |
197 | return -ENODEV; | 197 | return -ENODEV; |
198 | } | 198 | } |
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c index 5dd2ed11a387..5a468e2779ae 100644 --- a/drivers/acpi/osl.c +++ b/drivers/acpi/osl.c | |||
@@ -280,7 +280,7 @@ acpi_os_install_interrupt_handler(u32 gsi, acpi_osd_handler handler, | |||
280 | 280 | ||
281 | acpi_irq_handler = handler; | 281 | acpi_irq_handler = handler; |
282 | acpi_irq_context = context; | 282 | acpi_irq_context = context; |
283 | if (request_irq(irq, acpi_irq, SA_SHIRQ, "acpi", acpi_irq)) { | 283 | if (request_irq(irq, acpi_irq, IRQF_SHARED, "acpi", acpi_irq)) { |
284 | printk(KERN_ERR PREFIX "SCI (IRQ%d) allocation failed\n", irq); | 284 | printk(KERN_ERR PREFIX "SCI (IRQ%d) allocation failed\n", irq); |
285 | return AE_NOT_ACQUIRED; | 285 | return AE_NOT_ACQUIRED; |
286 | } | 286 | } |
diff --git a/drivers/atm/ambassador.c b/drivers/atm/ambassador.c index 4048681f36d5..d3b426313a41 100644 --- a/drivers/atm/ambassador.c +++ b/drivers/atm/ambassador.c | |||
@@ -2286,7 +2286,7 @@ static int __devinit amb_probe(struct pci_dev *pci_dev, const struct pci_device_ | |||
2286 | setup_pci_dev(pci_dev); | 2286 | setup_pci_dev(pci_dev); |
2287 | 2287 | ||
2288 | // grab (but share) IRQ and install handler | 2288 | // grab (but share) IRQ and install handler |
2289 | err = request_irq(irq, interrupt_handler, SA_SHIRQ, DEV_LABEL, dev); | 2289 | err = request_irq(irq, interrupt_handler, IRQF_SHARED, DEV_LABEL, dev); |
2290 | if (err < 0) { | 2290 | if (err < 0) { |
2291 | PRINTK (KERN_ERR, "request IRQ failed!"); | 2291 | PRINTK (KERN_ERR, "request IRQ failed!"); |
2292 | goto out_reset; | 2292 | goto out_reset; |
diff --git a/drivers/atm/eni.c b/drivers/atm/eni.c index 976ced1f019e..df359a6c14f6 100644 --- a/drivers/atm/eni.c +++ b/drivers/atm/eni.c | |||
@@ -1797,7 +1797,7 @@ static int __devinit eni_start(struct atm_dev *dev) | |||
1797 | 1797 | ||
1798 | DPRINTK(">eni_start\n"); | 1798 | DPRINTK(">eni_start\n"); |
1799 | eni_dev = ENI_DEV(dev); | 1799 | eni_dev = ENI_DEV(dev); |
1800 | if (request_irq(eni_dev->irq,&eni_int,SA_SHIRQ,DEV_LABEL,dev)) { | 1800 | if (request_irq(eni_dev->irq,&eni_int,IRQF_SHARED,DEV_LABEL,dev)) { |
1801 | printk(KERN_ERR DEV_LABEL "(itf %d): IRQ%d is already in use\n", | 1801 | printk(KERN_ERR DEV_LABEL "(itf %d): IRQ%d is already in use\n", |
1802 | dev->number,eni_dev->irq); | 1802 | dev->number,eni_dev->irq); |
1803 | error = -EAGAIN; | 1803 | error = -EAGAIN; |
diff --git a/drivers/atm/firestream.c b/drivers/atm/firestream.c index d40605c1af73..38fc054bd671 100644 --- a/drivers/atm/firestream.c +++ b/drivers/atm/firestream.c | |||
@@ -1829,7 +1829,7 @@ static int __devinit fs_init (struct fs_dev *dev) | |||
1829 | init_q (dev, &dev->rx_rq[i], RXB_RQ(i), RXRQ_NENTRIES, 1); | 1829 | init_q (dev, &dev->rx_rq[i], RXB_RQ(i), RXRQ_NENTRIES, 1); |
1830 | 1830 | ||
1831 | dev->irq = pci_dev->irq; | 1831 | dev->irq = pci_dev->irq; |
1832 | if (request_irq (dev->irq, fs_irq, SA_SHIRQ, "firestream", dev)) { | 1832 | if (request_irq (dev->irq, fs_irq, IRQF_SHARED, "firestream", dev)) { |
1833 | printk (KERN_WARNING "couldn't get irq %d for firestream.\n", pci_dev->irq); | 1833 | printk (KERN_WARNING "couldn't get irq %d for firestream.\n", pci_dev->irq); |
1834 | /* XXX undo all previous stuff... */ | 1834 | /* XXX undo all previous stuff... */ |
1835 | return 1; | 1835 | return 1; |
diff --git a/drivers/atm/fore200e.c b/drivers/atm/fore200e.c index 9be9a4055199..98622130de5b 100644 --- a/drivers/atm/fore200e.c +++ b/drivers/atm/fore200e.c | |||
@@ -2123,7 +2123,7 @@ fore200e_change_qos(struct atm_vcc* vcc,struct atm_qos* qos, int flags) | |||
2123 | static int __devinit | 2123 | static int __devinit |
2124 | fore200e_irq_request(struct fore200e* fore200e) | 2124 | fore200e_irq_request(struct fore200e* fore200e) |
2125 | { | 2125 | { |
2126 | if (request_irq(fore200e->irq, fore200e_interrupt, SA_SHIRQ, fore200e->name, fore200e->atm_dev) < 0) { | 2126 | if (request_irq(fore200e->irq, fore200e_interrupt, IRQF_SHARED, fore200e->name, fore200e->atm_dev) < 0) { |
2127 | 2127 | ||
2128 | printk(FORE200E "unable to reserve IRQ %s for device %s\n", | 2128 | printk(FORE200E "unable to reserve IRQ %s for device %s\n", |
2129 | fore200e_irq_itoa(fore200e->irq), fore200e->name); | 2129 | fore200e_irq_itoa(fore200e->irq), fore200e->name); |
diff --git a/drivers/atm/he.c b/drivers/atm/he.c index a5cbd3d6e50f..d369130f4235 100644 --- a/drivers/atm/he.c +++ b/drivers/atm/he.c | |||
@@ -1007,7 +1007,7 @@ he_init_irq(struct he_dev *he_dev) | |||
1007 | he_writel(he_dev, 0x0, GRP_54_MAP); | 1007 | he_writel(he_dev, 0x0, GRP_54_MAP); |
1008 | he_writel(he_dev, 0x0, GRP_76_MAP); | 1008 | he_writel(he_dev, 0x0, GRP_76_MAP); |
1009 | 1009 | ||
1010 | if (request_irq(he_dev->pci_dev->irq, he_irq_handler, SA_INTERRUPT|SA_SHIRQ, DEV_LABEL, he_dev)) { | 1010 | if (request_irq(he_dev->pci_dev->irq, he_irq_handler, IRQF_DISABLED|IRQF_SHARED, DEV_LABEL, he_dev)) { |
1011 | hprintk("irq %d already in use\n", he_dev->pci_dev->irq); | 1011 | hprintk("irq %d already in use\n", he_dev->pci_dev->irq); |
1012 | return -EINVAL; | 1012 | return -EINVAL; |
1013 | } | 1013 | } |
diff --git a/drivers/atm/horizon.c b/drivers/atm/horizon.c index 821c81e8cd38..d1113e845f95 100644 --- a/drivers/atm/horizon.c +++ b/drivers/atm/horizon.c | |||
@@ -2735,7 +2735,7 @@ static int __devinit hrz_probe(struct pci_dev *pci_dev, const struct pci_device_ | |||
2735 | irq = pci_dev->irq; | 2735 | irq = pci_dev->irq; |
2736 | if (request_irq(irq, | 2736 | if (request_irq(irq, |
2737 | interrupt_handler, | 2737 | interrupt_handler, |
2738 | SA_SHIRQ, /* irqflags guess */ | 2738 | IRQF_SHARED, /* irqflags guess */ |
2739 | DEV_LABEL, /* name guess */ | 2739 | DEV_LABEL, /* name guess */ |
2740 | dev)) { | 2740 | dev)) { |
2741 | PRINTD(DBG_WARN, "request IRQ failed!"); | 2741 | PRINTD(DBG_WARN, "request IRQ failed!"); |
diff --git a/drivers/atm/idt77252.c b/drivers/atm/idt77252.c index 8fdb30116f99..5d1c6c95262c 100644 --- a/drivers/atm/idt77252.c +++ b/drivers/atm/idt77252.c | |||
@@ -3386,7 +3386,7 @@ init_card(struct atm_dev *dev) | |||
3386 | writel(SAR_STAT_TMROF, SAR_REG_STAT); | 3386 | writel(SAR_STAT_TMROF, SAR_REG_STAT); |
3387 | } | 3387 | } |
3388 | IPRINTK("%s: Request IRQ ... ", card->name); | 3388 | IPRINTK("%s: Request IRQ ... ", card->name); |
3389 | if (request_irq(pcidev->irq, idt77252_interrupt, SA_INTERRUPT|SA_SHIRQ, | 3389 | if (request_irq(pcidev->irq, idt77252_interrupt, IRQF_DISABLED|IRQF_SHARED, |
3390 | card->name, card) != 0) { | 3390 | card->name, card) != 0) { |
3391 | printk("%s: can't allocate IRQ.\n", card->name); | 3391 | printk("%s: can't allocate IRQ.\n", card->name); |
3392 | deinit_card(card); | 3392 | deinit_card(card); |
diff --git a/drivers/atm/iphase.c b/drivers/atm/iphase.c index 333a7bc609d2..f20b0b2c06c6 100644 --- a/drivers/atm/iphase.c +++ b/drivers/atm/iphase.c | |||
@@ -2488,7 +2488,7 @@ static int __devinit ia_start(struct atm_dev *dev) | |||
2488 | u32 ctrl_reg; | 2488 | u32 ctrl_reg; |
2489 | IF_EVENT(printk(">ia_start\n");) | 2489 | IF_EVENT(printk(">ia_start\n");) |
2490 | iadev = INPH_IA_DEV(dev); | 2490 | iadev = INPH_IA_DEV(dev); |
2491 | if (request_irq(iadev->irq, &ia_int, SA_SHIRQ, DEV_LABEL, dev)) { | 2491 | if (request_irq(iadev->irq, &ia_int, IRQF_SHARED, DEV_LABEL, dev)) { |
2492 | printk(KERN_ERR DEV_LABEL "(itf %d): IRQ%d is already in use\n", | 2492 | printk(KERN_ERR DEV_LABEL "(itf %d): IRQ%d is already in use\n", |
2493 | dev->number, iadev->irq); | 2493 | dev->number, iadev->irq); |
2494 | error = -EAGAIN; | 2494 | error = -EAGAIN; |
diff --git a/drivers/atm/lanai.c b/drivers/atm/lanai.c index cac09e353be8..fe60a59b7fc0 100644 --- a/drivers/atm/lanai.c +++ b/drivers/atm/lanai.c | |||
@@ -2240,7 +2240,7 @@ static int __devinit lanai_dev_open(struct atm_dev *atmdev) | |||
2240 | conf2_write(lanai); | 2240 | conf2_write(lanai); |
2241 | reg_write(lanai, TX_FIFO_DEPTH, TxDepth_Reg); | 2241 | reg_write(lanai, TX_FIFO_DEPTH, TxDepth_Reg); |
2242 | reg_write(lanai, 0, CBR_ICG_Reg); /* CBR defaults to no limit */ | 2242 | reg_write(lanai, 0, CBR_ICG_Reg); /* CBR defaults to no limit */ |
2243 | if ((result = request_irq(lanai->pci->irq, lanai_int, SA_SHIRQ, | 2243 | if ((result = request_irq(lanai->pci->irq, lanai_int, IRQF_SHARED, |
2244 | DEV_LABEL, lanai)) != 0) { | 2244 | DEV_LABEL, lanai)) != 0) { |
2245 | printk(KERN_ERR DEV_LABEL ": can't allocate interrupt\n"); | 2245 | printk(KERN_ERR DEV_LABEL ": can't allocate interrupt\n"); |
2246 | goto error_vcctable; | 2246 | goto error_vcctable; |
diff --git a/drivers/atm/nicstar.c b/drivers/atm/nicstar.c index b78612d3fa46..b8036899e56f 100644 --- a/drivers/atm/nicstar.c +++ b/drivers/atm/nicstar.c | |||
@@ -625,7 +625,7 @@ static int __devinit ns_init_card(int i, struct pci_dev *pcidev) | |||
625 | if (mac[i] == NULL) | 625 | if (mac[i] == NULL) |
626 | nicstar_init_eprom(card->membase); | 626 | nicstar_init_eprom(card->membase); |
627 | 627 | ||
628 | if (request_irq(pcidev->irq, &ns_irq_handler, SA_INTERRUPT | SA_SHIRQ, "nicstar", card) != 0) | 628 | if (request_irq(pcidev->irq, &ns_irq_handler, IRQF_DISABLED | IRQF_SHARED, "nicstar", card) != 0) |
629 | { | 629 | { |
630 | printk("nicstar%d: can't allocate IRQ %d.\n", i, pcidev->irq); | 630 | printk("nicstar%d: can't allocate IRQ %d.\n", i, pcidev->irq); |
631 | error = 9; | 631 | error = 9; |
diff --git a/drivers/atm/zatm.c b/drivers/atm/zatm.c index 1699c934bad0..2c65e82f0d6b 100644 --- a/drivers/atm/zatm.c +++ b/drivers/atm/zatm.c | |||
@@ -1270,7 +1270,7 @@ static int __init zatm_start(struct atm_dev *dev) | |||
1270 | zatm_dev->rx_map = zatm_dev->tx_map = NULL; | 1270 | zatm_dev->rx_map = zatm_dev->tx_map = NULL; |
1271 | for (i = 0; i < NR_MBX; i++) | 1271 | for (i = 0; i < NR_MBX; i++) |
1272 | zatm_dev->mbx_start[i] = 0; | 1272 | zatm_dev->mbx_start[i] = 0; |
1273 | error = request_irq(zatm_dev->irq, zatm_int, SA_SHIRQ, DEV_LABEL, dev); | 1273 | error = request_irq(zatm_dev->irq, zatm_int, IRQF_SHARED, DEV_LABEL, dev); |
1274 | if (error < 0) { | 1274 | if (error < 0) { |
1275 | printk(KERN_ERR DEV_LABEL "(itf %d): IRQ%d is already in use\n", | 1275 | printk(KERN_ERR DEV_LABEL "(itf %d): IRQ%d is already in use\n", |
1276 | dev->number,zatm_dev->irq); | 1276 | dev->number,zatm_dev->irq); |
diff --git a/drivers/block/DAC960.c b/drivers/block/DAC960.c index 50ca1aa4ee3b..4cd23c3eab41 100644 --- a/drivers/block/DAC960.c +++ b/drivers/block/DAC960.c | |||
@@ -3014,7 +3014,7 @@ DAC960_DetectController(struct pci_dev *PCI_Device, | |||
3014 | Acquire shared access to the IRQ Channel. | 3014 | Acquire shared access to the IRQ Channel. |
3015 | */ | 3015 | */ |
3016 | IRQ_Channel = PCI_Device->irq; | 3016 | IRQ_Channel = PCI_Device->irq; |
3017 | if (request_irq(IRQ_Channel, InterruptHandler, SA_SHIRQ, | 3017 | if (request_irq(IRQ_Channel, InterruptHandler, IRQF_SHARED, |
3018 | Controller->FullModelName, Controller) < 0) | 3018 | Controller->FullModelName, Controller) < 0) |
3019 | { | 3019 | { |
3020 | DAC960_Error("Unable to acquire IRQ Channel %d for Controller at\n", | 3020 | DAC960_Error("Unable to acquire IRQ Channel %d for Controller at\n", |
diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c index 05fb08312c01..1c4df22dfd2a 100644 --- a/drivers/block/cciss.c +++ b/drivers/block/cciss.c | |||
@@ -3159,7 +3159,7 @@ static int __devinit cciss_init_one(struct pci_dev *pdev, | |||
3159 | /* make sure the board interrupts are off */ | 3159 | /* make sure the board interrupts are off */ |
3160 | hba[i]->access.set_intr_mask(hba[i], CCISS_INTR_OFF); | 3160 | hba[i]->access.set_intr_mask(hba[i], CCISS_INTR_OFF); |
3161 | if (request_irq(hba[i]->intr[SIMPLE_MODE_INT], do_cciss_intr, | 3161 | if (request_irq(hba[i]->intr[SIMPLE_MODE_INT], do_cciss_intr, |
3162 | SA_INTERRUPT | SA_SHIRQ, hba[i]->devname, hba[i])) { | 3162 | IRQF_DISABLED | IRQF_SHARED, hba[i]->devname, hba[i])) { |
3163 | printk(KERN_ERR "cciss: Unable to get irq %d for %s\n", | 3163 | printk(KERN_ERR "cciss: Unable to get irq %d for %s\n", |
3164 | hba[i]->intr[SIMPLE_MODE_INT], hba[i]->devname); | 3164 | hba[i]->intr[SIMPLE_MODE_INT], hba[i]->devname); |
3165 | goto clean2; | 3165 | goto clean2; |
diff --git a/drivers/block/cpqarray.c b/drivers/block/cpqarray.c index bfd245df0a8c..757f42dd8e86 100644 --- a/drivers/block/cpqarray.c +++ b/drivers/block/cpqarray.c | |||
@@ -408,7 +408,7 @@ static int __init cpqarray_register_ctlr( int i, struct pci_dev *pdev) | |||
408 | } | 408 | } |
409 | hba[i]->access.set_intr_mask(hba[i], 0); | 409 | hba[i]->access.set_intr_mask(hba[i], 0); |
410 | if (request_irq(hba[i]->intr, do_ida_intr, | 410 | if (request_irq(hba[i]->intr, do_ida_intr, |
411 | SA_INTERRUPT|SA_SHIRQ, hba[i]->devname, hba[i])) | 411 | IRQF_DISABLED|IRQF_SHARED, hba[i]->devname, hba[i])) |
412 | { | 412 | { |
413 | printk(KERN_ERR "cpqarray: Unable to get irq %d for %s\n", | 413 | printk(KERN_ERR "cpqarray: Unable to get irq %d for %s\n", |
414 | hba[i]->intr, hba[i]->devname); | 414 | hba[i]->intr, hba[i]->devname); |
diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c index 39662f0c9cce..0a1b1ea36ddc 100644 --- a/drivers/block/nbd.c +++ b/drivers/block/nbd.c | |||
@@ -50,9 +50,9 @@ | |||
50 | #define DBG_RX 0x0200 | 50 | #define DBG_RX 0x0200 |
51 | #define DBG_TX 0x0400 | 51 | #define DBG_TX 0x0400 |
52 | static unsigned int debugflags; | 52 | static unsigned int debugflags; |
53 | static unsigned int nbds_max = 16; | ||
54 | #endif /* NDEBUG */ | 53 | #endif /* NDEBUG */ |
55 | 54 | ||
55 | static unsigned int nbds_max = 16; | ||
56 | static struct nbd_device nbd_dev[MAX_NBD]; | 56 | static struct nbd_device nbd_dev[MAX_NBD]; |
57 | 57 | ||
58 | /* | 58 | /* |
diff --git a/drivers/block/ps2esdi.c b/drivers/block/ps2esdi.c index aef5a0ccabc9..5537974fb242 100644 --- a/drivers/block/ps2esdi.c +++ b/drivers/block/ps2esdi.c | |||
@@ -340,9 +340,9 @@ static int __init ps2esdi_geninit(void) | |||
340 | /* try to grab IRQ, and try to grab a slow IRQ if it fails, so we can | 340 | /* try to grab IRQ, and try to grab a slow IRQ if it fails, so we can |
341 | share with the SCSI driver */ | 341 | share with the SCSI driver */ |
342 | if (request_irq(PS2ESDI_IRQ, ps2esdi_interrupt_handler, | 342 | if (request_irq(PS2ESDI_IRQ, ps2esdi_interrupt_handler, |
343 | SA_INTERRUPT | SA_SHIRQ, "PS/2 ESDI", &ps2esdi_gendisk) | 343 | IRQF_DISABLED | IRQF_SHARED, "PS/2 ESDI", &ps2esdi_gendisk) |
344 | && request_irq(PS2ESDI_IRQ, ps2esdi_interrupt_handler, | 344 | && request_irq(PS2ESDI_IRQ, ps2esdi_interrupt_handler, |
345 | SA_SHIRQ, "PS/2 ESDI", &ps2esdi_gendisk) | 345 | IRQF_SHARED, "PS/2 ESDI", &ps2esdi_gendisk) |
346 | ) { | 346 | ) { |
347 | printk("%s: Unable to get IRQ %d\n", DEVICE_NAME, PS2ESDI_IRQ); | 347 | printk("%s: Unable to get IRQ %d\n", DEVICE_NAME, PS2ESDI_IRQ); |
348 | error = -EBUSY; | 348 | error = -EBUSY; |
diff --git a/drivers/block/sx8.c b/drivers/block/sx8.c index 10a4aa5fb54d..c6beee18a07c 100644 --- a/drivers/block/sx8.c +++ b/drivers/block/sx8.c | |||
@@ -1676,7 +1676,7 @@ static int carm_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) | |||
1676 | 1676 | ||
1677 | pci_set_master(pdev); | 1677 | pci_set_master(pdev); |
1678 | 1678 | ||
1679 | rc = request_irq(pdev->irq, carm_interrupt, SA_SHIRQ, DRV_NAME, host); | 1679 | rc = request_irq(pdev->irq, carm_interrupt, IRQF_SHARED, DRV_NAME, host); |
1680 | if (rc) { | 1680 | if (rc) { |
1681 | printk(KERN_ERR DRV_NAME "(%s): irq alloc failure\n", | 1681 | printk(KERN_ERR DRV_NAME "(%s): irq alloc failure\n", |
1682 | pci_name(pdev)); | 1682 | pci_name(pdev)); |
diff --git a/drivers/block/umem.c b/drivers/block/umem.c index f675f97f2a78..5d8925bd9045 100644 --- a/drivers/block/umem.c +++ b/drivers/block/umem.c | |||
@@ -1040,7 +1040,7 @@ static int __devinit mm_pci_probe(struct pci_dev *dev, const struct pci_device_i | |||
1040 | card->win_size = data; | 1040 | card->win_size = data; |
1041 | 1041 | ||
1042 | 1042 | ||
1043 | if (request_irq(dev->irq, mm_interrupt, SA_SHIRQ, "pci-umem", card)) { | 1043 | if (request_irq(dev->irq, mm_interrupt, IRQF_SHARED, "pci-umem", card)) { |
1044 | printk(KERN_ERR "MM%d: Unable to allocate IRQ\n", card->card_number); | 1044 | printk(KERN_ERR "MM%d: Unable to allocate IRQ\n", card->card_number); |
1045 | ret = -ENODEV; | 1045 | ret = -ENODEV; |
1046 | 1046 | ||
diff --git a/drivers/cdrom/cdu31a.c b/drivers/cdrom/cdu31a.c index 5f0f2027f29e..37bdb0163f0d 100644 --- a/drivers/cdrom/cdu31a.c +++ b/drivers/cdrom/cdu31a.c | |||
@@ -3141,7 +3141,7 @@ int __init cdu31a_init(void) | |||
3141 | 3141 | ||
3142 | if (cdu31a_irq > 0) { | 3142 | if (cdu31a_irq > 0) { |
3143 | if (request_irq | 3143 | if (request_irq |
3144 | (cdu31a_irq, cdu31a_interrupt, SA_INTERRUPT, | 3144 | (cdu31a_irq, cdu31a_interrupt, IRQF_DISABLED, |
3145 | "cdu31a", NULL)) { | 3145 | "cdu31a", NULL)) { |
3146 | printk(KERN_WARNING PFX "Unable to grab IRQ%d for " | 3146 | printk(KERN_WARNING PFX "Unable to grab IRQ%d for " |
3147 | "the CDU31A driver\n", cdu31a_irq); | 3147 | "the CDU31A driver\n", cdu31a_irq); |
diff --git a/drivers/cdrom/mcdx.c b/drivers/cdrom/mcdx.c index 788c7a0b2fe3..dcd1ab684f3e 100644 --- a/drivers/cdrom/mcdx.c +++ b/drivers/cdrom/mcdx.c | |||
@@ -1193,7 +1193,7 @@ static int __init mcdx_init_drive(int drive) | |||
1193 | } | 1193 | } |
1194 | 1194 | ||
1195 | xtrace(INIT, "init() subscribe irq and i/o\n"); | 1195 | xtrace(INIT, "init() subscribe irq and i/o\n"); |
1196 | if (request_irq(stuffp->irq, mcdx_intr, SA_INTERRUPT, "mcdx", stuffp)) { | 1196 | if (request_irq(stuffp->irq, mcdx_intr, IRQF_DISABLED, "mcdx", stuffp)) { |
1197 | release_region(stuffp->wreg_data, MCDX_IO_SIZE); | 1197 | release_region(stuffp->wreg_data, MCDX_IO_SIZE); |
1198 | xwarn("%s=0x%03x,%d: Init failed. Can't get irq (%d).\n", | 1198 | xwarn("%s=0x%03x,%d: Init failed. Can't get irq (%d).\n", |
1199 | MCDX, stuffp->wreg_data, stuffp->irq, stuffp->irq); | 1199 | MCDX, stuffp->wreg_data, stuffp->irq, stuffp->irq); |
diff --git a/drivers/cdrom/sonycd535.c b/drivers/cdrom/sonycd535.c index 8f7cc452af8d..30ab56258a92 100644 --- a/drivers/cdrom/sonycd535.c +++ b/drivers/cdrom/sonycd535.c | |||
@@ -1527,7 +1527,7 @@ static int __init sony535_init(void) | |||
1527 | } | 1527 | } |
1528 | if (sony535_irq_used > 0) { | 1528 | if (sony535_irq_used > 0) { |
1529 | if (request_irq(sony535_irq_used, cdu535_interrupt, | 1529 | if (request_irq(sony535_irq_used, cdu535_interrupt, |
1530 | SA_INTERRUPT, CDU535_HANDLE, NULL)) { | 1530 | IRQF_DISABLED, CDU535_HANDLE, NULL)) { |
1531 | printk("Unable to grab IRQ%d for the " CDU535_MESSAGE_NAME | 1531 | printk("Unable to grab IRQ%d for the " CDU535_MESSAGE_NAME |
1532 | " driver; polling instead.\n", sony535_irq_used); | 1532 | " driver; polling instead.\n", sony535_irq_used); |
1533 | sony535_irq_used = 0; | 1533 | sony535_irq_used = 0; |
diff --git a/drivers/char/amiserial.c b/drivers/char/amiserial.c index 3e7dc7cbd740..9d6713a93ed7 100644 --- a/drivers/char/amiserial.c +++ b/drivers/char/amiserial.c | |||
@@ -2051,7 +2051,7 @@ static int __init rs_init(void) | |||
2051 | 2051 | ||
2052 | /* set ISRs, and then disable the rx interrupts */ | 2052 | /* set ISRs, and then disable the rx interrupts */ |
2053 | request_irq(IRQ_AMIGA_TBE, ser_tx_int, 0, "serial TX", state); | 2053 | request_irq(IRQ_AMIGA_TBE, ser_tx_int, 0, "serial TX", state); |
2054 | request_irq(IRQ_AMIGA_RBF, ser_rx_int, SA_INTERRUPT, "serial RX", state); | 2054 | request_irq(IRQ_AMIGA_RBF, ser_rx_int, IRQF_DISABLED, "serial RX", state); |
2055 | 2055 | ||
2056 | /* turn off Rx and Tx interrupts */ | 2056 | /* turn off Rx and Tx interrupts */ |
2057 | custom.intena = IF_RBF | IF_TBE; | 2057 | custom.intena = IF_RBF | IF_TBE; |
diff --git a/drivers/char/applicom.c b/drivers/char/applicom.c index 72fb60765c45..bcc4668835b5 100644 --- a/drivers/char/applicom.c +++ b/drivers/char/applicom.c | |||
@@ -229,7 +229,7 @@ static int __init applicom_init(void) | |||
229 | continue; | 229 | continue; |
230 | } | 230 | } |
231 | 231 | ||
232 | if (request_irq(dev->irq, &ac_interrupt, SA_SHIRQ, "Applicom PCI", &dummy)) { | 232 | if (request_irq(dev->irq, &ac_interrupt, IRQF_SHARED, "Applicom PCI", &dummy)) { |
233 | printk(KERN_INFO "Could not allocate IRQ %d for PCI Applicom device.\n", dev->irq); | 233 | printk(KERN_INFO "Could not allocate IRQ %d for PCI Applicom device.\n", dev->irq); |
234 | iounmap(RamIO); | 234 | iounmap(RamIO); |
235 | pci_disable_device(dev); | 235 | pci_disable_device(dev); |
@@ -276,7 +276,7 @@ static int __init applicom_init(void) | |||
276 | printk(KERN_NOTICE "Applicom ISA card found at mem 0x%lx, irq %d\n", mem + (LEN_RAM_IO*i), irq); | 276 | printk(KERN_NOTICE "Applicom ISA card found at mem 0x%lx, irq %d\n", mem + (LEN_RAM_IO*i), irq); |
277 | 277 | ||
278 | if (!numisa) { | 278 | if (!numisa) { |
279 | if (request_irq(irq, &ac_interrupt, SA_SHIRQ, "Applicom ISA", &dummy)) { | 279 | if (request_irq(irq, &ac_interrupt, IRQF_SHARED, "Applicom ISA", &dummy)) { |
280 | printk(KERN_WARNING "Could not allocate IRQ %d for ISA Applicom device.\n", irq); | 280 | printk(KERN_WARNING "Could not allocate IRQ %d for ISA Applicom device.\n", irq); |
281 | iounmap(RamIO); | 281 | iounmap(RamIO); |
282 | apbs[boardno - 1].RamIO = NULL; | 282 | apbs[boardno - 1].RamIO = NULL; |
diff --git a/drivers/char/cyclades.c b/drivers/char/cyclades.c index 1f61a6744a26..c1c67281750d 100644 --- a/drivers/char/cyclades.c +++ b/drivers/char/cyclades.c | |||
@@ -4612,7 +4612,7 @@ cy_detect_isa(void) | |||
4612 | 4612 | ||
4613 | /* allocate IRQ */ | 4613 | /* allocate IRQ */ |
4614 | if(request_irq(cy_isa_irq, cyy_interrupt, | 4614 | if(request_irq(cy_isa_irq, cyy_interrupt, |
4615 | SA_INTERRUPT, "Cyclom-Y", &cy_card[j])) | 4615 | IRQF_DISABLED, "Cyclom-Y", &cy_card[j])) |
4616 | { | 4616 | { |
4617 | printk("Cyclom-Y/ISA found at 0x%lx ", | 4617 | printk("Cyclom-Y/ISA found at 0x%lx ", |
4618 | (unsigned long) cy_isa_address); | 4618 | (unsigned long) cy_isa_address); |
@@ -4785,7 +4785,7 @@ cy_detect_pci(void) | |||
4785 | 4785 | ||
4786 | /* allocate IRQ */ | 4786 | /* allocate IRQ */ |
4787 | if(request_irq(cy_pci_irq, cyy_interrupt, | 4787 | if(request_irq(cy_pci_irq, cyy_interrupt, |
4788 | SA_SHIRQ, "Cyclom-Y", &cy_card[j])) | 4788 | IRQF_SHARED, "Cyclom-Y", &cy_card[j])) |
4789 | { | 4789 | { |
4790 | printk("Cyclom-Y/PCI found at 0x%lx ", | 4790 | printk("Cyclom-Y/PCI found at 0x%lx ", |
4791 | (ulong) cy_pci_phys2); | 4791 | (ulong) cy_pci_phys2); |
@@ -4965,7 +4965,7 @@ cy_detect_pci(void) | |||
4965 | /* allocate IRQ only if board has an IRQ */ | 4965 | /* allocate IRQ only if board has an IRQ */ |
4966 | if( (cy_pci_irq != 0) && (cy_pci_irq != 255) ) { | 4966 | if( (cy_pci_irq != 0) && (cy_pci_irq != 255) ) { |
4967 | if(request_irq(cy_pci_irq, cyz_interrupt, | 4967 | if(request_irq(cy_pci_irq, cyz_interrupt, |
4968 | SA_SHIRQ, "Cyclades-Z", &cy_card[j])) | 4968 | IRQF_SHARED, "Cyclades-Z", &cy_card[j])) |
4969 | { | 4969 | { |
4970 | printk("Cyclom-8Zo/PCI found at 0x%lx ", | 4970 | printk("Cyclom-8Zo/PCI found at 0x%lx ", |
4971 | (ulong) cy_pci_phys2); | 4971 | (ulong) cy_pci_phys2); |
@@ -5059,7 +5059,7 @@ cy_detect_pci(void) | |||
5059 | /* allocate IRQ only if board has an IRQ */ | 5059 | /* allocate IRQ only if board has an IRQ */ |
5060 | if( (cy_pci_irq != 0) && (cy_pci_irq != 255) ) { | 5060 | if( (cy_pci_irq != 0) && (cy_pci_irq != 255) ) { |
5061 | if(request_irq(cy_pci_irq, cyz_interrupt, | 5061 | if(request_irq(cy_pci_irq, cyz_interrupt, |
5062 | SA_SHIRQ, "Cyclades-Z", &cy_card[j])) | 5062 | IRQF_SHARED, "Cyclades-Z", &cy_card[j])) |
5063 | { | 5063 | { |
5064 | printk("Cyclom-Ze/PCI found at 0x%lx ", | 5064 | printk("Cyclom-Ze/PCI found at 0x%lx ", |
5065 | (ulong) cy_pci_phys2); | 5065 | (ulong) cy_pci_phys2); |
diff --git a/drivers/char/drm/drm_irq.c b/drivers/char/drm/drm_irq.c index 611a1173091d..ebdb7182c4fd 100644 --- a/drivers/char/drm/drm_irq.c +++ b/drivers/char/drm/drm_irq.c | |||
@@ -130,7 +130,7 @@ static int drm_irq_install(drm_device_t * dev) | |||
130 | 130 | ||
131 | /* Install handler */ | 131 | /* Install handler */ |
132 | if (drm_core_check_feature(dev, DRIVER_IRQ_SHARED)) | 132 | if (drm_core_check_feature(dev, DRIVER_IRQ_SHARED)) |
133 | sh_flags = SA_SHIRQ; | 133 | sh_flags = IRQF_SHARED; |
134 | 134 | ||
135 | ret = request_irq(dev->irq, dev->driver->irq_handler, | 135 | ret = request_irq(dev->irq, dev->driver->irq_handler, |
136 | sh_flags, dev->devname, dev); | 136 | sh_flags, dev->devname, dev); |
diff --git a/drivers/char/esp.c b/drivers/char/esp.c index 9827d170ca17..afcd83d9984b 100644 --- a/drivers/char/esp.c +++ b/drivers/char/esp.c | |||
@@ -883,7 +883,7 @@ static int startup(struct esp_struct * info) | |||
883 | * Allocate the IRQ | 883 | * Allocate the IRQ |
884 | */ | 884 | */ |
885 | 885 | ||
886 | retval = request_irq(info->irq, rs_interrupt_single, SA_SHIRQ, | 886 | retval = request_irq(info->irq, rs_interrupt_single, IRQF_SHARED, |
887 | "esp serial", info); | 887 | "esp serial", info); |
888 | 888 | ||
889 | if (retval) { | 889 | if (retval) { |
diff --git a/drivers/char/ftape/lowlevel/fdc-io.c b/drivers/char/ftape/lowlevel/fdc-io.c index 093fdf98b19a..65c9d2ec60bd 100644 --- a/drivers/char/ftape/lowlevel/fdc-io.c +++ b/drivers/char/ftape/lowlevel/fdc-io.c | |||
@@ -1268,7 +1268,7 @@ static int fdc_grab_irq_and_dma(void) | |||
1268 | /* Get fast interrupt handler. | 1268 | /* Get fast interrupt handler. |
1269 | */ | 1269 | */ |
1270 | if (request_irq(fdc.irq, ftape_interrupt, | 1270 | if (request_irq(fdc.irq, ftape_interrupt, |
1271 | SA_INTERRUPT, "ft", ftape_id)) { | 1271 | IRQF_DISABLED, "ft", ftape_id)) { |
1272 | TRACE_ABORT(-EIO, ft_t_bug, | 1272 | TRACE_ABORT(-EIO, ft_t_bug, |
1273 | "Unable to grab IRQ%d for ftape driver", | 1273 | "Unable to grab IRQ%d for ftape driver", |
1274 | fdc.irq); | 1274 | fdc.irq); |
diff --git a/drivers/char/hpet.c b/drivers/char/hpet.c index 8b6c76f8ef0e..e5643f3aa73f 100644 --- a/drivers/char/hpet.c +++ b/drivers/char/hpet.c | |||
@@ -395,7 +395,7 @@ static int hpet_ioctl_ieon(struct hpet_dev *devp) | |||
395 | 395 | ||
396 | sprintf(devp->hd_name, "hpet%d", (int)(devp - hpetp->hp_dev)); | 396 | sprintf(devp->hd_name, "hpet%d", (int)(devp - hpetp->hp_dev)); |
397 | irq_flags = devp->hd_flags & HPET_SHARED_IRQ | 397 | irq_flags = devp->hd_flags & HPET_SHARED_IRQ |
398 | ? SA_SHIRQ : SA_INTERRUPT; | 398 | ? IRQF_SHARED : IRQF_DISABLED; |
399 | if (request_irq(irq, hpet_interrupt, irq_flags, | 399 | if (request_irq(irq, hpet_interrupt, irq_flags, |
400 | devp->hd_name, (void *)devp)) { | 400 | devp->hd_name, (void *)devp)) { |
401 | printk(KERN_ERR "hpet: IRQ %d is not free\n", irq); | 401 | printk(KERN_ERR "hpet: IRQ %d is not free\n", irq); |
diff --git a/drivers/char/hvc_console.c b/drivers/char/hvc_console.c index 859e5005c785..ca2f538e549e 100644 --- a/drivers/char/hvc_console.c +++ b/drivers/char/hvc_console.c | |||
@@ -346,7 +346,7 @@ static int hvc_open(struct tty_struct *tty, struct file * filp) | |||
346 | spin_unlock_irqrestore(&hp->lock, flags); | 346 | spin_unlock_irqrestore(&hp->lock, flags); |
347 | /* check error, fallback to non-irq */ | 347 | /* check error, fallback to non-irq */ |
348 | if (irq != NO_IRQ) | 348 | if (irq != NO_IRQ) |
349 | rc = request_irq(irq, hvc_handle_interrupt, SA_INTERRUPT, "hvc_console", hp); | 349 | rc = request_irq(irq, hvc_handle_interrupt, IRQF_DISABLED, "hvc_console", hp); |
350 | 350 | ||
351 | /* | 351 | /* |
352 | * If the request_irq() fails and we return an error. The tty layer | 352 | * If the request_irq() fails and we return an error. The tty layer |
diff --git a/drivers/char/hvcs.c b/drivers/char/hvcs.c index 130dedc37568..4589ff302b07 100644 --- a/drivers/char/hvcs.c +++ b/drivers/char/hvcs.c | |||
@@ -899,7 +899,7 @@ static int hvcs_enable_device(struct hvcs_struct *hvcsd, uint32_t unit_address, | |||
899 | * the conn was registered and now. | 899 | * the conn was registered and now. |
900 | */ | 900 | */ |
901 | if (!(rc = request_irq(irq, &hvcs_handle_interrupt, | 901 | if (!(rc = request_irq(irq, &hvcs_handle_interrupt, |
902 | SA_INTERRUPT, "ibmhvcs", hvcsd))) { | 902 | IRQF_DISABLED, "ibmhvcs", hvcsd))) { |
903 | /* | 903 | /* |
904 | * It is possible the vty-server was removed after the irq was | 904 | * It is possible the vty-server was removed after the irq was |
905 | * requested but before we have time to enable interrupts. | 905 | * requested but before we have time to enable interrupts. |
diff --git a/drivers/char/hvsi.c b/drivers/char/hvsi.c index 7b04eb153205..8dc205b275e3 100644 --- a/drivers/char/hvsi.c +++ b/drivers/char/hvsi.c | |||
@@ -1168,7 +1168,7 @@ static int __init hvsi_init(void) | |||
1168 | struct hvsi_struct *hp = &hvsi_ports[i]; | 1168 | struct hvsi_struct *hp = &hvsi_ports[i]; |
1169 | int ret = 1; | 1169 | int ret = 1; |
1170 | 1170 | ||
1171 | ret = request_irq(hp->virq, hvsi_interrupt, SA_INTERRUPT, "hvsi", hp); | 1171 | ret = request_irq(hp->virq, hvsi_interrupt, IRQF_DISABLED, "hvsi", hp); |
1172 | if (ret) | 1172 | if (ret) |
1173 | printk(KERN_ERR "HVSI: couldn't reserve irq 0x%x (error %i)\n", | 1173 | printk(KERN_ERR "HVSI: couldn't reserve irq 0x%x (error %i)\n", |
1174 | hp->virq, ret); | 1174 | hp->virq, ret); |
diff --git a/drivers/char/ip2/ip2main.c b/drivers/char/ip2/ip2main.c index f9aa53c76f99..a4200a2b0811 100644 --- a/drivers/char/ip2/ip2main.c +++ b/drivers/char/ip2/ip2main.c | |||
@@ -491,8 +491,8 @@ static struct tty_operations ip2_ops = { | |||
491 | /* initialisation of the devices and driver structures, and registers itself */ | 491 | /* initialisation of the devices and driver structures, and registers itself */ |
492 | /* with the relevant kernel modules. */ | 492 | /* with the relevant kernel modules. */ |
493 | /******************************************************************************/ | 493 | /******************************************************************************/ |
494 | /* SA_INTERRUPT- if set blocks all interrupts else only this line */ | 494 | /* IRQF_DISABLED - if set blocks all interrupts else only this line */ |
495 | /* SA_SHIRQ - for shared irq PCI or maybe EISA only */ | 495 | /* IRQF_SHARED - for shared irq PCI or maybe EISA only */ |
496 | /* SA_RANDOM - can be source for cert. random number generators */ | 496 | /* SA_RANDOM - can be source for cert. random number generators */ |
497 | #define IP2_SA_FLAGS 0 | 497 | #define IP2_SA_FLAGS 0 |
498 | 498 | ||
@@ -753,7 +753,7 @@ retry: | |||
753 | if (have_requested_irq(ip2config.irq[i])) | 753 | if (have_requested_irq(ip2config.irq[i])) |
754 | continue; | 754 | continue; |
755 | rc = request_irq( ip2config.irq[i], ip2_interrupt, | 755 | rc = request_irq( ip2config.irq[i], ip2_interrupt, |
756 | IP2_SA_FLAGS | (ip2config.type[i] == PCI ? SA_SHIRQ : 0), | 756 | IP2_SA_FLAGS | (ip2config.type[i] == PCI ? IRQF_SHARED : 0), |
757 | pcName, (void *)&pcName); | 757 | pcName, (void *)&pcName); |
758 | if (rc) { | 758 | if (rc) { |
759 | printk(KERN_ERR "IP2: an request_irq failed: error %d\n",rc); | 759 | printk(KERN_ERR "IP2: an request_irq failed: error %d\n",rc); |
diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c index c7f3e5c80666..f57eba0bf253 100644 --- a/drivers/char/ipmi/ipmi_si_intf.c +++ b/drivers/char/ipmi/ipmi_si_intf.c | |||
@@ -1041,7 +1041,7 @@ static int std_irq_setup(struct smi_info *info) | |||
1041 | if (info->si_type == SI_BT) { | 1041 | if (info->si_type == SI_BT) { |
1042 | rv = request_irq(info->irq, | 1042 | rv = request_irq(info->irq, |
1043 | si_bt_irq_handler, | 1043 | si_bt_irq_handler, |
1044 | SA_INTERRUPT, | 1044 | IRQF_DISABLED, |
1045 | DEVICE_NAME, | 1045 | DEVICE_NAME, |
1046 | info); | 1046 | info); |
1047 | if (!rv) | 1047 | if (!rv) |
@@ -1051,7 +1051,7 @@ static int std_irq_setup(struct smi_info *info) | |||
1051 | } else | 1051 | } else |
1052 | rv = request_irq(info->irq, | 1052 | rv = request_irq(info->irq, |
1053 | si_irq_handler, | 1053 | si_irq_handler, |
1054 | SA_INTERRUPT, | 1054 | IRQF_DISABLED, |
1055 | DEVICE_NAME, | 1055 | DEVICE_NAME, |
1056 | info); | 1056 | info); |
1057 | if (rv) { | 1057 | if (rv) { |
diff --git a/drivers/char/isicom.c b/drivers/char/isicom.c index c105b9540ad8..913be23e0a24 100644 --- a/drivers/char/isicom.c +++ b/drivers/char/isicom.c | |||
@@ -1614,14 +1614,14 @@ static int __devinit isicom_register_isr(struct pci_dev *pdev, | |||
1614 | const unsigned int index) | 1614 | const unsigned int index) |
1615 | { | 1615 | { |
1616 | struct isi_board *board = pci_get_drvdata(pdev); | 1616 | struct isi_board *board = pci_get_drvdata(pdev); |
1617 | unsigned long irqflags = SA_INTERRUPT; | 1617 | unsigned long irqflags = IRQF_DISABLED; |
1618 | int retval = -EINVAL; | 1618 | int retval = -EINVAL; |
1619 | 1619 | ||
1620 | if (!board->base) | 1620 | if (!board->base) |
1621 | goto end; | 1621 | goto end; |
1622 | 1622 | ||
1623 | if (board->isa == NO) | 1623 | if (board->isa == NO) |
1624 | irqflags |= SA_SHIRQ; | 1624 | irqflags |= IRQF_SHARED; |
1625 | 1625 | ||
1626 | retval = request_irq(board->irq, isicom_interrupt, irqflags, | 1626 | retval = request_irq(board->irq, isicom_interrupt, irqflags, |
1627 | ISICOM_NAME, board); | 1627 | ISICOM_NAME, board); |
diff --git a/drivers/char/ite_gpio.c b/drivers/char/ite_gpio.c index d1ed6ac950d1..747ba45e50e5 100644 --- a/drivers/char/ite_gpio.c +++ b/drivers/char/ite_gpio.c | |||
@@ -397,7 +397,7 @@ int __init ite_gpio_init(void) | |||
397 | init_waitqueue_head(&ite_gpio_wait[i]); | 397 | init_waitqueue_head(&ite_gpio_wait[i]); |
398 | } | 398 | } |
399 | 399 | ||
400 | if (request_irq(ite_gpio_irq, ite_gpio_irq_handler, SA_SHIRQ, "gpio", 0) < 0) { | 400 | if (request_irq(ite_gpio_irq, ite_gpio_irq_handler, IRQF_SHARED, "gpio", 0) < 0) { |
401 | misc_deregister(&ite_gpio_miscdev); | 401 | misc_deregister(&ite_gpio_miscdev); |
402 | release_region(ite_gpio_base, 0x1c); | 402 | release_region(ite_gpio_base, 0x1c); |
403 | return 0; | 403 | return 0; |
diff --git a/drivers/char/mbcs.c b/drivers/char/mbcs.c index bb07c2766b27..0385650f6077 100644 --- a/drivers/char/mbcs.c +++ b/drivers/char/mbcs.c | |||
@@ -592,7 +592,7 @@ static int mbcs_intr_alloc(struct cx_dev *dev) | |||
592 | getdma->intrHostDest = sn_irq->irq_xtalkaddr; | 592 | getdma->intrHostDest = sn_irq->irq_xtalkaddr; |
593 | getdma->intrVector = sn_irq->irq_irq; | 593 | getdma->intrVector = sn_irq->irq_irq; |
594 | if (request_irq(sn_irq->irq_irq, | 594 | if (request_irq(sn_irq->irq_irq, |
595 | (void *)mbcs_completion_intr_handler, SA_SHIRQ, | 595 | (void *)mbcs_completion_intr_handler, IRQF_SHARED, |
596 | "MBCS get intr", (void *)soft)) { | 596 | "MBCS get intr", (void *)soft)) { |
597 | tiocx_irq_free(soft->get_sn_irq); | 597 | tiocx_irq_free(soft->get_sn_irq); |
598 | return -EAGAIN; | 598 | return -EAGAIN; |
@@ -608,7 +608,7 @@ static int mbcs_intr_alloc(struct cx_dev *dev) | |||
608 | putdma->intrHostDest = sn_irq->irq_xtalkaddr; | 608 | putdma->intrHostDest = sn_irq->irq_xtalkaddr; |
609 | putdma->intrVector = sn_irq->irq_irq; | 609 | putdma->intrVector = sn_irq->irq_irq; |
610 | if (request_irq(sn_irq->irq_irq, | 610 | if (request_irq(sn_irq->irq_irq, |
611 | (void *)mbcs_completion_intr_handler, SA_SHIRQ, | 611 | (void *)mbcs_completion_intr_handler, IRQF_SHARED, |
612 | "MBCS put intr", (void *)soft)) { | 612 | "MBCS put intr", (void *)soft)) { |
613 | tiocx_irq_free(soft->put_sn_irq); | 613 | tiocx_irq_free(soft->put_sn_irq); |
614 | free_irq(soft->get_sn_irq->irq_irq, soft); | 614 | free_irq(soft->get_sn_irq->irq_irq, soft); |
@@ -628,7 +628,7 @@ static int mbcs_intr_alloc(struct cx_dev *dev) | |||
628 | algo->intrHostDest = sn_irq->irq_xtalkaddr; | 628 | algo->intrHostDest = sn_irq->irq_xtalkaddr; |
629 | algo->intrVector = sn_irq->irq_irq; | 629 | algo->intrVector = sn_irq->irq_irq; |
630 | if (request_irq(sn_irq->irq_irq, | 630 | if (request_irq(sn_irq->irq_irq, |
631 | (void *)mbcs_completion_intr_handler, SA_SHIRQ, | 631 | (void *)mbcs_completion_intr_handler, IRQF_SHARED, |
632 | "MBCS algo intr", (void *)soft)) { | 632 | "MBCS algo intr", (void *)soft)) { |
633 | tiocx_irq_free(soft->algo_sn_irq); | 633 | tiocx_irq_free(soft->algo_sn_irq); |
634 | free_irq(soft->put_sn_irq->irq_irq, soft); | 634 | free_irq(soft->put_sn_irq->irq_irq, soft); |
diff --git a/drivers/char/mmtimer.c b/drivers/char/mmtimer.c index 95e8122b8068..70b774ff5aa4 100644 --- a/drivers/char/mmtimer.c +++ b/drivers/char/mmtimer.c | |||
@@ -687,7 +687,7 @@ static int __init mmtimer_init(void) | |||
687 | mmtimer_femtoperiod = ((unsigned long)1E15 + sn_rtc_cycles_per_second / | 687 | mmtimer_femtoperiod = ((unsigned long)1E15 + sn_rtc_cycles_per_second / |
688 | 2) / sn_rtc_cycles_per_second; | 688 | 2) / sn_rtc_cycles_per_second; |
689 | 689 | ||
690 | if (request_irq(SGI_MMTIMER_VECTOR, mmtimer_interrupt, SA_PERCPU_IRQ, MMTIMER_NAME, NULL)) { | 690 | if (request_irq(SGI_MMTIMER_VECTOR, mmtimer_interrupt, IRQF_PERCPU, MMTIMER_NAME, NULL)) { |
691 | printk(KERN_WARNING "%s: unable to allocate interrupt.", | 691 | printk(KERN_WARNING "%s: unable to allocate interrupt.", |
692 | MMTIMER_NAME); | 692 | MMTIMER_NAME); |
693 | return -1; | 693 | return -1; |
diff --git a/drivers/char/mxser.c b/drivers/char/mxser.c index eb1559fcb81a..556abd3e0d07 100644 --- a/drivers/char/mxser.c +++ b/drivers/char/mxser.c | |||
@@ -94,7 +94,7 @@ | |||
94 | #define RELEVANT_IFLAG(iflag) (iflag & (IGNBRK|BRKINT|IGNPAR|PARMRK|INPCK|\ | 94 | #define RELEVANT_IFLAG(iflag) (iflag & (IGNBRK|BRKINT|IGNPAR|PARMRK|INPCK|\ |
95 | IXON|IXOFF)) | 95 | IXON|IXOFF)) |
96 | 96 | ||
97 | #define IRQ_T(info) ((info->flags & ASYNC_SHARE_IRQ) ? SA_SHIRQ : SA_INTERRUPT) | 97 | #define IRQ_T(info) ((info->flags & ASYNC_SHARE_IRQ) ? IRQF_SHARED : IRQF_DISABLED) |
98 | 98 | ||
99 | #define C168_ASIC_ID 1 | 99 | #define C168_ASIC_ID 1 |
100 | #define C104_ASIC_ID 2 | 100 | #define C104_ASIC_ID 2 |
diff --git a/drivers/char/nwbutton.c b/drivers/char/nwbutton.c index 94845dd12ca9..f240a104d250 100644 --- a/drivers/char/nwbutton.c +++ b/drivers/char/nwbutton.c | |||
@@ -223,7 +223,7 @@ static int __init nwbutton_init(void) | |||
223 | return -EBUSY; | 223 | return -EBUSY; |
224 | } | 224 | } |
225 | 225 | ||
226 | if (request_irq (IRQ_NETWINDER_BUTTON, button_handler, SA_INTERRUPT, | 226 | if (request_irq (IRQ_NETWINDER_BUTTON, button_handler, IRQF_DISABLED, |
227 | "nwbutton", NULL)) { | 227 | "nwbutton", NULL)) { |
228 | printk (KERN_WARNING "nwbutton: IRQ %d is not free.\n", | 228 | printk (KERN_WARNING "nwbutton: IRQ %d is not free.\n", |
229 | IRQ_NETWINDER_BUTTON); | 229 | IRQ_NETWINDER_BUTTON); |
diff --git a/drivers/char/qtronix.c b/drivers/char/qtronix.c index 1087530e5854..9d134e98d2a0 100644 --- a/drivers/char/qtronix.c +++ b/drivers/char/qtronix.c | |||
@@ -144,7 +144,7 @@ void __init init_qtronix_990P_kbd(void) | |||
144 | cir_port_init(cir); | 144 | cir_port_init(cir); |
145 | 145 | ||
146 | retval = request_irq(IT8172_CIR0_IRQ, kbd_int_handler, | 146 | retval = request_irq(IT8172_CIR0_IRQ, kbd_int_handler, |
147 | (unsigned long )(SA_INTERRUPT|SA_SHIRQ), | 147 | (unsigned long )(IRQF_DISABLED|IRQF_SHARED), |
148 | (const char *)"Qtronix IR Keyboard", (void *)cir); | 148 | (const char *)"Qtronix IR Keyboard", (void *)cir); |
149 | 149 | ||
150 | if (retval) { | 150 | if (retval) { |
diff --git a/drivers/char/rio/rio_linux.c b/drivers/char/rio/rio_linux.c index 5332d1d4b0e4..3afc6a47ebbc 100644 --- a/drivers/char/rio/rio_linux.c +++ b/drivers/char/rio/rio_linux.c | |||
@@ -1119,7 +1119,7 @@ static int __init rio_init(void) | |||
1119 | for (i = 0; i < p->RIONumHosts; i++) { | 1119 | for (i = 0; i < p->RIONumHosts; i++) { |
1120 | hp = &p->RIOHosts[i]; | 1120 | hp = &p->RIOHosts[i]; |
1121 | if (hp->Ivec) { | 1121 | if (hp->Ivec) { |
1122 | int mode = SA_SHIRQ; | 1122 | int mode = IRQF_SHARED; |
1123 | if (hp->Ivec & 0x8000) { | 1123 | if (hp->Ivec & 0x8000) { |
1124 | mode = 0; | 1124 | mode = 0; |
1125 | hp->Ivec &= 0x7fff; | 1125 | hp->Ivec &= 0x7fff; |
diff --git a/drivers/char/riscom8.c b/drivers/char/riscom8.c index c84c3c3f10c3..f1c94f771af5 100644 --- a/drivers/char/riscom8.c +++ b/drivers/char/riscom8.c | |||
@@ -625,7 +625,7 @@ static inline int rc_setup_board(struct riscom_board * bp) | |||
625 | if (bp->flags & RC_BOARD_ACTIVE) | 625 | if (bp->flags & RC_BOARD_ACTIVE) |
626 | return 0; | 626 | return 0; |
627 | 627 | ||
628 | error = request_irq(bp->irq, rc_interrupt, SA_INTERRUPT, | 628 | error = request_irq(bp->irq, rc_interrupt, IRQF_DISABLED, |
629 | "RISCom/8", NULL); | 629 | "RISCom/8", NULL); |
630 | if (error) | 630 | if (error) |
631 | return error; | 631 | return error; |
diff --git a/drivers/char/rtc.c b/drivers/char/rtc.c index 37dc2edd8d75..aefac4ac0bf5 100644 --- a/drivers/char/rtc.c +++ b/drivers/char/rtc.c | |||
@@ -220,7 +220,7 @@ static inline unsigned char rtc_is_updating(void) | |||
220 | 220 | ||
221 | #ifdef RTC_IRQ | 221 | #ifdef RTC_IRQ |
222 | /* | 222 | /* |
223 | * A very tiny interrupt handler. It runs with SA_INTERRUPT set, | 223 | * A very tiny interrupt handler. It runs with IRQF_DISABLED set, |
224 | * but there is possibility of conflicting with the set_rtc_mmss() | 224 | * but there is possibility of conflicting with the set_rtc_mmss() |
225 | * call (the rtc irq and the timer irq can easily run at the same | 225 | * call (the rtc irq and the timer irq can easily run at the same |
226 | * time in two different CPUs). So we need to serialize | 226 | * time in two different CPUs). So we need to serialize |
@@ -958,7 +958,7 @@ found: | |||
958 | * XXX Interrupt pin #7 in Espresso is shared between RTC and | 958 | * XXX Interrupt pin #7 in Espresso is shared between RTC and |
959 | * PCI Slot 2 INTA# (and some INTx# in Slot 1). | 959 | * PCI Slot 2 INTA# (and some INTx# in Slot 1). |
960 | */ | 960 | */ |
961 | if (request_irq(rtc_irq, rtc_interrupt, SA_SHIRQ, "rtc", (void *)&rtc_port)) { | 961 | if (request_irq(rtc_irq, rtc_interrupt, IRQF_SHARED, "rtc", (void *)&rtc_port)) { |
962 | printk(KERN_ERR "rtc: cannot register IRQ %d\n", rtc_irq); | 962 | printk(KERN_ERR "rtc: cannot register IRQ %d\n", rtc_irq); |
963 | return -EIO; | 963 | return -EIO; |
964 | } | 964 | } |
@@ -976,7 +976,7 @@ no_irq: | |||
976 | rtc_int_handler_ptr = rtc_interrupt; | 976 | rtc_int_handler_ptr = rtc_interrupt; |
977 | } | 977 | } |
978 | 978 | ||
979 | if(request_irq(RTC_IRQ, rtc_int_handler_ptr, SA_INTERRUPT, "rtc", NULL)) { | 979 | if(request_irq(RTC_IRQ, rtc_int_handler_ptr, IRQF_DISABLED, "rtc", NULL)) { |
980 | /* Yeah right, seeing as irq 8 doesn't even hit the bus. */ | 980 | /* Yeah right, seeing as irq 8 doesn't even hit the bus. */ |
981 | printk(KERN_ERR "rtc: IRQ %d is not free.\n", RTC_IRQ); | 981 | printk(KERN_ERR "rtc: IRQ %d is not free.\n", RTC_IRQ); |
982 | release_region(RTC_PORT(0), RTC_IO_EXTENT); | 982 | release_region(RTC_PORT(0), RTC_IO_EXTENT); |
diff --git a/drivers/char/s3c2410-rtc.c b/drivers/char/s3c2410-rtc.c index b0038b19b505..5458ef1634e5 100644 --- a/drivers/char/s3c2410-rtc.c +++ b/drivers/char/s3c2410-rtc.c | |||
@@ -341,13 +341,13 @@ static int s3c2410_rtc_open(void) | |||
341 | int ret; | 341 | int ret; |
342 | 342 | ||
343 | ret = request_irq(s3c2410_rtc_alarmno, s3c2410_rtc_alarmirq, | 343 | ret = request_irq(s3c2410_rtc_alarmno, s3c2410_rtc_alarmirq, |
344 | SA_INTERRUPT, "s3c2410-rtc alarm", NULL); | 344 | IRQF_DISABLED, "s3c2410-rtc alarm", NULL); |
345 | 345 | ||
346 | if (ret) | 346 | if (ret) |
347 | printk(KERN_ERR "IRQ%d already in use\n", s3c2410_rtc_alarmno); | 347 | printk(KERN_ERR "IRQ%d already in use\n", s3c2410_rtc_alarmno); |
348 | 348 | ||
349 | ret = request_irq(s3c2410_rtc_tickno, s3c2410_rtc_tickirq, | 349 | ret = request_irq(s3c2410_rtc_tickno, s3c2410_rtc_tickirq, |
350 | SA_INTERRUPT, "s3c2410-rtc tick", NULL); | 350 | IRQF_DISABLED, "s3c2410-rtc tick", NULL); |
351 | 351 | ||
352 | if (ret) { | 352 | if (ret) { |
353 | printk(KERN_ERR "IRQ%d already in use\n", s3c2410_rtc_tickno); | 353 | printk(KERN_ERR "IRQ%d already in use\n", s3c2410_rtc_tickno); |
diff --git a/drivers/char/snsc.c b/drivers/char/snsc.c index 56c8243cdb73..203240b6c08f 100644 --- a/drivers/char/snsc.c +++ b/drivers/char/snsc.c | |||
@@ -105,7 +105,7 @@ scdrv_open(struct inode *inode, struct file *file) | |||
105 | 105 | ||
106 | /* hook this subchannel up to the system controller interrupt */ | 106 | /* hook this subchannel up to the system controller interrupt */ |
107 | rv = request_irq(SGI_UART_VECTOR, scdrv_interrupt, | 107 | rv = request_irq(SGI_UART_VECTOR, scdrv_interrupt, |
108 | SA_SHIRQ | SA_INTERRUPT, | 108 | IRQF_SHARED | IRQF_DISABLED, |
109 | SYSCTL_BASENAME, sd); | 109 | SYSCTL_BASENAME, sd); |
110 | if (rv) { | 110 | if (rv) { |
111 | ia64_sn_irtr_close(sd->sd_nasid, sd->sd_subch); | 111 | ia64_sn_irtr_close(sd->sd_nasid, sd->sd_subch); |
diff --git a/drivers/char/snsc_event.c b/drivers/char/snsc_event.c index e234d50e142a..8b2210b633df 100644 --- a/drivers/char/snsc_event.c +++ b/drivers/char/snsc_event.c | |||
@@ -310,7 +310,7 @@ scdrv_event_init(struct sysctl_data_s *scd) | |||
310 | 310 | ||
311 | /* hook event subchannel up to the system controller interrupt */ | 311 | /* hook event subchannel up to the system controller interrupt */ |
312 | rv = request_irq(SGI_UART_VECTOR, scdrv_event_interrupt, | 312 | rv = request_irq(SGI_UART_VECTOR, scdrv_event_interrupt, |
313 | SA_SHIRQ | SA_INTERRUPT, | 313 | IRQF_SHARED | IRQF_DISABLED, |
314 | "system controller events", event_sd); | 314 | "system controller events", event_sd); |
315 | if (rv) { | 315 | if (rv) { |
316 | printk(KERN_WARNING "%s: irq request failed (%d)\n", | 316 | printk(KERN_WARNING "%s: irq request failed (%d)\n", |
diff --git a/drivers/char/sonypi.c b/drivers/char/sonypi.c index e19d4856e9fc..45508a039508 100644 --- a/drivers/char/sonypi.c +++ b/drivers/char/sonypi.c | |||
@@ -1282,7 +1282,7 @@ static int __devinit sonypi_setup_irq(struct sonypi_device *dev, | |||
1282 | while (irq_list->irq) { | 1282 | while (irq_list->irq) { |
1283 | 1283 | ||
1284 | if (!request_irq(irq_list->irq, sonypi_irq, | 1284 | if (!request_irq(irq_list->irq, sonypi_irq, |
1285 | SA_SHIRQ, "sonypi", sonypi_irq)) { | 1285 | IRQF_SHARED, "sonypi", sonypi_irq)) { |
1286 | dev->irq = irq_list->irq; | 1286 | dev->irq = irq_list->irq; |
1287 | dev->bits = irq_list->bits; | 1287 | dev->bits = irq_list->bits; |
1288 | return 0; | 1288 | return 0; |
diff --git a/drivers/char/specialix.c b/drivers/char/specialix.c index d4243fb80815..cb2859249d49 100644 --- a/drivers/char/specialix.c +++ b/drivers/char/specialix.c | |||
@@ -1015,9 +1015,9 @@ static inline int sx_setup_board(struct specialix_board * bp) | |||
1015 | return 0; | 1015 | return 0; |
1016 | 1016 | ||
1017 | if (bp->flags & SX_BOARD_IS_PCI) | 1017 | if (bp->flags & SX_BOARD_IS_PCI) |
1018 | error = request_irq(bp->irq, sx_interrupt, SA_INTERRUPT | SA_SHIRQ, "specialix IO8+", bp); | 1018 | error = request_irq(bp->irq, sx_interrupt, IRQF_DISABLED | IRQF_SHARED, "specialix IO8+", bp); |
1019 | else | 1019 | else |
1020 | error = request_irq(bp->irq, sx_interrupt, SA_INTERRUPT, "specialix IO8+", bp); | 1020 | error = request_irq(bp->irq, sx_interrupt, IRQF_DISABLED, "specialix IO8+", bp); |
1021 | 1021 | ||
1022 | if (error) | 1022 | if (error) |
1023 | return error; | 1023 | return error; |
diff --git a/drivers/char/stallion.c b/drivers/char/stallion.c index f15df0e423e0..ed7b8eaf0367 100644 --- a/drivers/char/stallion.c +++ b/drivers/char/stallion.c | |||
@@ -2302,7 +2302,7 @@ static inline int stl_initeio(stlbrd_t *brdp) | |||
2302 | brdp->nrpanels = 1; | 2302 | brdp->nrpanels = 1; |
2303 | brdp->state |= BRD_FOUND; | 2303 | brdp->state |= BRD_FOUND; |
2304 | brdp->hwid = status; | 2304 | brdp->hwid = status; |
2305 | if (request_irq(brdp->irq, stl_intr, SA_SHIRQ, name, brdp) != 0) { | 2305 | if (request_irq(brdp->irq, stl_intr, IRQF_SHARED, name, brdp) != 0) { |
2306 | printk("STALLION: failed to register interrupt " | 2306 | printk("STALLION: failed to register interrupt " |
2307 | "routine for %s irq=%d\n", name, brdp->irq); | 2307 | "routine for %s irq=%d\n", name, brdp->irq); |
2308 | rc = -ENODEV; | 2308 | rc = -ENODEV; |
@@ -2512,7 +2512,7 @@ static inline int stl_initech(stlbrd_t *brdp) | |||
2512 | outb((brdp->ioctrlval | ECH_BRDDISABLE), brdp->ioctrl); | 2512 | outb((brdp->ioctrlval | ECH_BRDDISABLE), brdp->ioctrl); |
2513 | 2513 | ||
2514 | brdp->state |= BRD_FOUND; | 2514 | brdp->state |= BRD_FOUND; |
2515 | if (request_irq(brdp->irq, stl_intr, SA_SHIRQ, name, brdp) != 0) { | 2515 | if (request_irq(brdp->irq, stl_intr, IRQF_SHARED, name, brdp) != 0) { |
2516 | printk("STALLION: failed to register interrupt " | 2516 | printk("STALLION: failed to register interrupt " |
2517 | "routine for %s irq=%d\n", name, brdp->irq); | 2517 | "routine for %s irq=%d\n", name, brdp->irq); |
2518 | i = -ENODEV; | 2518 | i = -ENODEV; |
diff --git a/drivers/char/sx.c b/drivers/char/sx.c index 76b9107f7f81..45c193aa11db 100644 --- a/drivers/char/sx.c +++ b/drivers/char/sx.c | |||
@@ -1993,7 +1993,7 @@ static int sx_init_board (struct sx_board *board) | |||
1993 | if(board->irq > 0) { | 1993 | if(board->irq > 0) { |
1994 | /* fixed irq, probably PCI */ | 1994 | /* fixed irq, probably PCI */ |
1995 | if(sx_irqmask & (1 << board->irq)) { /* may we use this irq? */ | 1995 | if(sx_irqmask & (1 << board->irq)) { /* may we use this irq? */ |
1996 | if(request_irq(board->irq, sx_interrupt, SA_SHIRQ | SA_INTERRUPT, "sx", board)) { | 1996 | if(request_irq(board->irq, sx_interrupt, IRQF_SHARED | IRQF_DISABLED, "sx", board)) { |
1997 | printk(KERN_ERR "sx: Cannot allocate irq %d.\n", board->irq); | 1997 | printk(KERN_ERR "sx: Cannot allocate irq %d.\n", board->irq); |
1998 | board->irq = 0; | 1998 | board->irq = 0; |
1999 | } | 1999 | } |
@@ -2005,7 +2005,7 @@ static int sx_init_board (struct sx_board *board) | |||
2005 | int irqmask = sx_irqmask & (IS_SX_BOARD(board) ? SX_ISA_IRQ_MASK : SI2_ISA_IRQ_MASK); | 2005 | int irqmask = sx_irqmask & (IS_SX_BOARD(board) ? SX_ISA_IRQ_MASK : SI2_ISA_IRQ_MASK); |
2006 | for(irqnr = 15; irqnr > 0; irqnr--) | 2006 | for(irqnr = 15; irqnr > 0; irqnr--) |
2007 | if(irqmask & (1 << irqnr)) | 2007 | if(irqmask & (1 << irqnr)) |
2008 | if(! request_irq(irqnr, sx_interrupt, SA_SHIRQ | SA_INTERRUPT, "sx", board)) | 2008 | if(! request_irq(irqnr, sx_interrupt, IRQF_SHARED | IRQF_DISABLED, "sx", board)) |
2009 | break; | 2009 | break; |
2010 | if(! irqnr) | 2010 | if(! irqnr) |
2011 | printk(KERN_ERR "sx: Cannot allocate IRQ.\n"); | 2011 | printk(KERN_ERR "sx: Cannot allocate IRQ.\n"); |
diff --git a/drivers/char/synclink.c b/drivers/char/synclink.c index fee2aca3f6a5..df782dd1098c 100644 --- a/drivers/char/synclink.c +++ b/drivers/char/synclink.c | |||
@@ -8150,7 +8150,7 @@ static int __devinit synclink_init_one (struct pci_dev *dev, | |||
8150 | 8150 | ||
8151 | info->bus_type = MGSL_BUS_TYPE_PCI; | 8151 | info->bus_type = MGSL_BUS_TYPE_PCI; |
8152 | info->io_addr_size = 8; | 8152 | info->io_addr_size = 8; |
8153 | info->irq_flags = SA_SHIRQ; | 8153 | info->irq_flags = IRQF_SHARED; |
8154 | 8154 | ||
8155 | if (dev->device == 0x0210) { | 8155 | if (dev->device == 0x0210) { |
8156 | /* Version 1 PCI9030 based universal PCI adapter */ | 8156 | /* Version 1 PCI9030 based universal PCI adapter */ |
diff --git a/drivers/char/synclink_gt.c b/drivers/char/synclink_gt.c index 03edccc8a823..e829594195c1 100644 --- a/drivers/char/synclink_gt.c +++ b/drivers/char/synclink_gt.c | |||
@@ -3343,7 +3343,7 @@ static struct slgt_info *alloc_dev(int adapter_num, int port_num, struct pci_dev | |||
3343 | info->phys_reg_addr = pci_resource_start(pdev,0); | 3343 | info->phys_reg_addr = pci_resource_start(pdev,0); |
3344 | 3344 | ||
3345 | info->bus_type = MGSL_BUS_TYPE_PCI; | 3345 | info->bus_type = MGSL_BUS_TYPE_PCI; |
3346 | info->irq_flags = SA_SHIRQ; | 3346 | info->irq_flags = IRQF_SHARED; |
3347 | 3347 | ||
3348 | info->init_error = -1; /* assume error, set to 0 on successful init */ | 3348 | info->init_error = -1; /* assume error, set to 0 on successful init */ |
3349 | } | 3349 | } |
diff --git a/drivers/char/synclinkmp.c b/drivers/char/synclinkmp.c index ba54df3cf60a..1e443a233f51 100644 --- a/drivers/char/synclinkmp.c +++ b/drivers/char/synclinkmp.c | |||
@@ -3835,7 +3835,7 @@ static SLMP_INFO *alloc_dev(int adapter_num, int port_num, struct pci_dev *pdev) | |||
3835 | info->phys_statctrl_base &= ~(PAGE_SIZE-1); | 3835 | info->phys_statctrl_base &= ~(PAGE_SIZE-1); |
3836 | 3836 | ||
3837 | info->bus_type = MGSL_BUS_TYPE_PCI; | 3837 | info->bus_type = MGSL_BUS_TYPE_PCI; |
3838 | info->irq_flags = SA_SHIRQ; | 3838 | info->irq_flags = IRQF_SHARED; |
3839 | 3839 | ||
3840 | init_timer(&info->tx_timer); | 3840 | init_timer(&info->tx_timer); |
3841 | info->tx_timer.data = (unsigned long)info; | 3841 | info->tx_timer.data = (unsigned long)info; |
diff --git a/drivers/char/tlclk.c b/drivers/char/tlclk.c index dfc4437afefb..952b829e2cb4 100644 --- a/drivers/char/tlclk.c +++ b/drivers/char/tlclk.c | |||
@@ -208,7 +208,7 @@ static int tlclk_open(struct inode *inode, struct file *filp) | |||
208 | /* This device is wired through the FPGA IO space of the ATCA blade | 208 | /* This device is wired through the FPGA IO space of the ATCA blade |
209 | * we can't share this IRQ */ | 209 | * we can't share this IRQ */ |
210 | result = request_irq(telclk_interrupt, &tlclk_interrupt, | 210 | result = request_irq(telclk_interrupt, &tlclk_interrupt, |
211 | SA_INTERRUPT, "telco_clock", tlclk_interrupt); | 211 | IRQF_DISABLED, "telco_clock", tlclk_interrupt); |
212 | if (result == -EBUSY) { | 212 | if (result == -EBUSY) { |
213 | printk(KERN_ERR "tlclk: Interrupt can't be reserved.\n"); | 213 | printk(KERN_ERR "tlclk: Interrupt can't be reserved.\n"); |
214 | return -EBUSY; | 214 | return -EBUSY; |
diff --git a/drivers/char/tpm/tpm_tis.c b/drivers/char/tpm/tpm_tis.c index 8ea70625f7ea..abb0f2aeae66 100644 --- a/drivers/char/tpm/tpm_tis.c +++ b/drivers/char/tpm/tpm_tis.c | |||
@@ -522,7 +522,7 @@ static int __devinit tpm_tis_pnp_init(struct pnp_dev *pnp_dev, | |||
522 | iowrite8(i, chip->vendor.iobase + | 522 | iowrite8(i, chip->vendor.iobase + |
523 | TPM_INT_VECTOR(chip->vendor.locality)); | 523 | TPM_INT_VECTOR(chip->vendor.locality)); |
524 | if (request_irq | 524 | if (request_irq |
525 | (i, tis_int_probe, SA_SHIRQ, | 525 | (i, tis_int_probe, IRQF_SHARED, |
526 | chip->vendor.miscdev.name, chip) != 0) { | 526 | chip->vendor.miscdev.name, chip) != 0) { |
527 | dev_info(chip->dev, | 527 | dev_info(chip->dev, |
528 | "Unable to request irq: %d for probe\n", | 528 | "Unable to request irq: %d for probe\n", |
@@ -557,7 +557,7 @@ static int __devinit tpm_tis_pnp_init(struct pnp_dev *pnp_dev, | |||
557 | chip->vendor.iobase + | 557 | chip->vendor.iobase + |
558 | TPM_INT_VECTOR(chip->vendor.locality)); | 558 | TPM_INT_VECTOR(chip->vendor.locality)); |
559 | if (request_irq | 559 | if (request_irq |
560 | (chip->vendor.irq, tis_int_handler, SA_SHIRQ, | 560 | (chip->vendor.irq, tis_int_handler, IRQF_SHARED, |
561 | chip->vendor.miscdev.name, chip) != 0) { | 561 | chip->vendor.miscdev.name, chip) != 0) { |
562 | dev_info(chip->dev, | 562 | dev_info(chip->dev, |
563 | "Unable to request irq: %d for use\n", | 563 | "Unable to request irq: %d for use\n", |
diff --git a/drivers/char/vme_scc.c b/drivers/char/vme_scc.c index b17a6e2bbca8..bfe5ea948f6a 100644 --- a/drivers/char/vme_scc.c +++ b/drivers/char/vme_scc.c | |||
@@ -203,13 +203,13 @@ static int mvme147_scc_init(void) | |||
203 | port->datap = port->ctrlp + 1; | 203 | port->datap = port->ctrlp + 1; |
204 | port->port_a = &scc_ports[0]; | 204 | port->port_a = &scc_ports[0]; |
205 | port->port_b = &scc_ports[1]; | 205 | port->port_b = &scc_ports[1]; |
206 | request_irq(MVME147_IRQ_SCCA_TX, scc_tx_int, SA_INTERRUPT, | 206 | request_irq(MVME147_IRQ_SCCA_TX, scc_tx_int, IRQF_DISABLED, |
207 | "SCC-A TX", port); | 207 | "SCC-A TX", port); |
208 | request_irq(MVME147_IRQ_SCCA_STAT, scc_stat_int, SA_INTERRUPT, | 208 | request_irq(MVME147_IRQ_SCCA_STAT, scc_stat_int, IRQF_DISABLED, |
209 | "SCC-A status", port); | 209 | "SCC-A status", port); |
210 | request_irq(MVME147_IRQ_SCCA_RX, scc_rx_int, SA_INTERRUPT, | 210 | request_irq(MVME147_IRQ_SCCA_RX, scc_rx_int, IRQF_DISABLED, |
211 | "SCC-A RX", port); | 211 | "SCC-A RX", port); |
212 | request_irq(MVME147_IRQ_SCCA_SPCOND, scc_spcond_int, SA_INTERRUPT, | 212 | request_irq(MVME147_IRQ_SCCA_SPCOND, scc_spcond_int, IRQF_DISABLED, |
213 | "SCC-A special cond", port); | 213 | "SCC-A special cond", port); |
214 | { | 214 | { |
215 | SCC_ACCESS_INIT(port); | 215 | SCC_ACCESS_INIT(port); |
@@ -230,13 +230,13 @@ static int mvme147_scc_init(void) | |||
230 | port->datap = port->ctrlp + 1; | 230 | port->datap = port->ctrlp + 1; |
231 | port->port_a = &scc_ports[0]; | 231 | port->port_a = &scc_ports[0]; |
232 | port->port_b = &scc_ports[1]; | 232 | port->port_b = &scc_ports[1]; |
233 | request_irq(MVME147_IRQ_SCCB_TX, scc_tx_int, SA_INTERRUPT, | 233 | request_irq(MVME147_IRQ_SCCB_TX, scc_tx_int, IRQF_DISABLED, |
234 | "SCC-B TX", port); | 234 | "SCC-B TX", port); |
235 | request_irq(MVME147_IRQ_SCCB_STAT, scc_stat_int, SA_INTERRUPT, | 235 | request_irq(MVME147_IRQ_SCCB_STAT, scc_stat_int, IRQF_DISABLED, |
236 | "SCC-B status", port); | 236 | "SCC-B status", port); |
237 | request_irq(MVME147_IRQ_SCCB_RX, scc_rx_int, SA_INTERRUPT, | 237 | request_irq(MVME147_IRQ_SCCB_RX, scc_rx_int, IRQF_DISABLED, |
238 | "SCC-B RX", port); | 238 | "SCC-B RX", port); |
239 | request_irq(MVME147_IRQ_SCCB_SPCOND, scc_spcond_int, SA_INTERRUPT, | 239 | request_irq(MVME147_IRQ_SCCB_SPCOND, scc_spcond_int, IRQF_DISABLED, |
240 | "SCC-B special cond", port); | 240 | "SCC-B special cond", port); |
241 | { | 241 | { |
242 | SCC_ACCESS_INIT(port); | 242 | SCC_ACCESS_INIT(port); |
@@ -273,13 +273,13 @@ static int mvme162_scc_init(void) | |||
273 | port->datap = port->ctrlp + 2; | 273 | port->datap = port->ctrlp + 2; |
274 | port->port_a = &scc_ports[0]; | 274 | port->port_a = &scc_ports[0]; |
275 | port->port_b = &scc_ports[1]; | 275 | port->port_b = &scc_ports[1]; |
276 | request_irq(MVME162_IRQ_SCCA_TX, scc_tx_int, SA_INTERRUPT, | 276 | request_irq(MVME162_IRQ_SCCA_TX, scc_tx_int, IRQF_DISABLED, |
277 | "SCC-A TX", port); | 277 | "SCC-A TX", port); |
278 | request_irq(MVME162_IRQ_SCCA_STAT, scc_stat_int, SA_INTERRUPT, | 278 | request_irq(MVME162_IRQ_SCCA_STAT, scc_stat_int, IRQF_DISABLED, |
279 | "SCC-A status", port); | 279 | "SCC-A status", port); |
280 | request_irq(MVME162_IRQ_SCCA_RX, scc_rx_int, SA_INTERRUPT, | 280 | request_irq(MVME162_IRQ_SCCA_RX, scc_rx_int, IRQF_DISABLED, |
281 | "SCC-A RX", port); | 281 | "SCC-A RX", port); |
282 | request_irq(MVME162_IRQ_SCCA_SPCOND, scc_spcond_int, SA_INTERRUPT, | 282 | request_irq(MVME162_IRQ_SCCA_SPCOND, scc_spcond_int, IRQF_DISABLED, |
283 | "SCC-A special cond", port); | 283 | "SCC-A special cond", port); |
284 | { | 284 | { |
285 | SCC_ACCESS_INIT(port); | 285 | SCC_ACCESS_INIT(port); |
@@ -300,13 +300,13 @@ static int mvme162_scc_init(void) | |||
300 | port->datap = port->ctrlp + 2; | 300 | port->datap = port->ctrlp + 2; |
301 | port->port_a = &scc_ports[0]; | 301 | port->port_a = &scc_ports[0]; |
302 | port->port_b = &scc_ports[1]; | 302 | port->port_b = &scc_ports[1]; |
303 | request_irq(MVME162_IRQ_SCCB_TX, scc_tx_int, SA_INTERRUPT, | 303 | request_irq(MVME162_IRQ_SCCB_TX, scc_tx_int, IRQF_DISABLED, |
304 | "SCC-B TX", port); | 304 | "SCC-B TX", port); |
305 | request_irq(MVME162_IRQ_SCCB_STAT, scc_stat_int, SA_INTERRUPT, | 305 | request_irq(MVME162_IRQ_SCCB_STAT, scc_stat_int, IRQF_DISABLED, |
306 | "SCC-B status", port); | 306 | "SCC-B status", port); |
307 | request_irq(MVME162_IRQ_SCCB_RX, scc_rx_int, SA_INTERRUPT, | 307 | request_irq(MVME162_IRQ_SCCB_RX, scc_rx_int, IRQF_DISABLED, |
308 | "SCC-B RX", port); | 308 | "SCC-B RX", port); |
309 | request_irq(MVME162_IRQ_SCCB_SPCOND, scc_spcond_int, SA_INTERRUPT, | 309 | request_irq(MVME162_IRQ_SCCB_SPCOND, scc_spcond_int, IRQF_DISABLED, |
310 | "SCC-B special cond", port); | 310 | "SCC-B special cond", port); |
311 | 311 | ||
312 | { | 312 | { |
@@ -341,13 +341,13 @@ static int bvme6000_scc_init(void) | |||
341 | port->datap = port->ctrlp + 4; | 341 | port->datap = port->ctrlp + 4; |
342 | port->port_a = &scc_ports[0]; | 342 | port->port_a = &scc_ports[0]; |
343 | port->port_b = &scc_ports[1]; | 343 | port->port_b = &scc_ports[1]; |
344 | request_irq(BVME_IRQ_SCCA_TX, scc_tx_int, SA_INTERRUPT, | 344 | request_irq(BVME_IRQ_SCCA_TX, scc_tx_int, IRQF_DISABLED, |
345 | "SCC-A TX", port); | 345 | "SCC-A TX", port); |
346 | request_irq(BVME_IRQ_SCCA_STAT, scc_stat_int, SA_INTERRUPT, | 346 | request_irq(BVME_IRQ_SCCA_STAT, scc_stat_int, IRQF_DISABLED, |
347 | "SCC-A status", port); | 347 | "SCC-A status", port); |
348 | request_irq(BVME_IRQ_SCCA_RX, scc_rx_int, SA_INTERRUPT, | 348 | request_irq(BVME_IRQ_SCCA_RX, scc_rx_int, IRQF_DISABLED, |
349 | "SCC-A RX", port); | 349 | "SCC-A RX", port); |
350 | request_irq(BVME_IRQ_SCCA_SPCOND, scc_spcond_int, SA_INTERRUPT, | 350 | request_irq(BVME_IRQ_SCCA_SPCOND, scc_spcond_int, IRQF_DISABLED, |
351 | "SCC-A special cond", port); | 351 | "SCC-A special cond", port); |
352 | { | 352 | { |
353 | SCC_ACCESS_INIT(port); | 353 | SCC_ACCESS_INIT(port); |
@@ -368,13 +368,13 @@ static int bvme6000_scc_init(void) | |||
368 | port->datap = port->ctrlp + 4; | 368 | port->datap = port->ctrlp + 4; |
369 | port->port_a = &scc_ports[0]; | 369 | port->port_a = &scc_ports[0]; |
370 | port->port_b = &scc_ports[1]; | 370 | port->port_b = &scc_ports[1]; |
371 | request_irq(BVME_IRQ_SCCB_TX, scc_tx_int, SA_INTERRUPT, | 371 | request_irq(BVME_IRQ_SCCB_TX, scc_tx_int, IRQF_DISABLED, |
372 | "SCC-B TX", port); | 372 | "SCC-B TX", port); |
373 | request_irq(BVME_IRQ_SCCB_STAT, scc_stat_int, SA_INTERRUPT, | 373 | request_irq(BVME_IRQ_SCCB_STAT, scc_stat_int, IRQF_DISABLED, |
374 | "SCC-B status", port); | 374 | "SCC-B status", port); |
375 | request_irq(BVME_IRQ_SCCB_RX, scc_rx_int, SA_INTERRUPT, | 375 | request_irq(BVME_IRQ_SCCB_RX, scc_rx_int, IRQF_DISABLED, |
376 | "SCC-B RX", port); | 376 | "SCC-B RX", port); |
377 | request_irq(BVME_IRQ_SCCB_SPCOND, scc_spcond_int, SA_INTERRUPT, | 377 | request_irq(BVME_IRQ_SCCB_SPCOND, scc_spcond_int, IRQF_DISABLED, |
378 | "SCC-B special cond", port); | 378 | "SCC-B special cond", port); |
379 | 379 | ||
380 | { | 380 | { |
diff --git a/drivers/char/watchdog/eurotechwdt.c b/drivers/char/watchdog/eurotechwdt.c index e89cda010b49..ea670de4fab7 100644 --- a/drivers/char/watchdog/eurotechwdt.c +++ b/drivers/char/watchdog/eurotechwdt.c | |||
@@ -420,7 +420,7 @@ static int __init eurwdt_init(void) | |||
420 | goto out; | 420 | goto out; |
421 | } | 421 | } |
422 | 422 | ||
423 | ret = request_irq(irq, eurwdt_interrupt, SA_INTERRUPT, "eurwdt", NULL); | 423 | ret = request_irq(irq, eurwdt_interrupt, IRQF_DISABLED, "eurwdt", NULL); |
424 | if(ret) { | 424 | if(ret) { |
425 | printk(KERN_ERR "eurwdt: IRQ %d is not free.\n", irq); | 425 | printk(KERN_ERR "eurwdt: IRQ %d is not free.\n", irq); |
426 | goto outmisc; | 426 | goto outmisc; |
diff --git a/drivers/char/watchdog/mpcore_wdt.c b/drivers/char/watchdog/mpcore_wdt.c index 9c11d920add5..c2d492c852fc 100644 --- a/drivers/char/watchdog/mpcore_wdt.c +++ b/drivers/char/watchdog/mpcore_wdt.c | |||
@@ -355,7 +355,7 @@ static int __devinit mpcore_wdt_probe(struct platform_device *dev) | |||
355 | goto err_misc; | 355 | goto err_misc; |
356 | } | 356 | } |
357 | 357 | ||
358 | ret = request_irq(wdt->irq, mpcore_wdt_fire, SA_INTERRUPT, "mpcore_wdt", wdt); | 358 | ret = request_irq(wdt->irq, mpcore_wdt_fire, IRQF_DISABLED, "mpcore_wdt", wdt); |
359 | if (ret) { | 359 | if (ret) { |
360 | dev_printk(KERN_ERR, _dev, "cannot register IRQ%d for watchdog\n", wdt->irq); | 360 | dev_printk(KERN_ERR, _dev, "cannot register IRQ%d for watchdog\n", wdt->irq); |
361 | goto err_irq; | 361 | goto err_irq; |
diff --git a/drivers/char/watchdog/wdt.c b/drivers/char/watchdog/wdt.c index 2586e9e858e2..a1d972c8f44c 100644 --- a/drivers/char/watchdog/wdt.c +++ b/drivers/char/watchdog/wdt.c | |||
@@ -580,7 +580,7 @@ static int __init wdt_init(void) | |||
580 | goto out; | 580 | goto out; |
581 | } | 581 | } |
582 | 582 | ||
583 | ret = request_irq(irq, wdt_interrupt, SA_INTERRUPT, "wdt501p", NULL); | 583 | ret = request_irq(irq, wdt_interrupt, IRQF_DISABLED, "wdt501p", NULL); |
584 | if(ret) { | 584 | if(ret) { |
585 | printk(KERN_ERR "wdt: IRQ %d is not free.\n", irq); | 585 | printk(KERN_ERR "wdt: IRQ %d is not free.\n", irq); |
586 | goto outreg; | 586 | goto outreg; |
diff --git a/drivers/char/watchdog/wdt_pci.c b/drivers/char/watchdog/wdt_pci.c index c79cc9543d96..7529ecdbabae 100644 --- a/drivers/char/watchdog/wdt_pci.c +++ b/drivers/char/watchdog/wdt_pci.c | |||
@@ -617,7 +617,7 @@ static int __devinit wdtpci_init_one (struct pci_dev *dev, | |||
617 | goto out_pci; | 617 | goto out_pci; |
618 | } | 618 | } |
619 | 619 | ||
620 | if (request_irq (irq, wdtpci_interrupt, SA_INTERRUPT | SA_SHIRQ, | 620 | if (request_irq (irq, wdtpci_interrupt, IRQF_DISABLED | IRQF_SHARED, |
621 | "wdt_pci", &wdtpci_miscdev)) { | 621 | "wdt_pci", &wdtpci_miscdev)) { |
622 | printk (KERN_ERR PFX "IRQ %d is not free\n", irq); | 622 | printk (KERN_ERR PFX "IRQ %d is not free\n", irq); |
623 | goto out_reg; | 623 | goto out_reg; |
diff --git a/drivers/dma/ioatdma.c b/drivers/dma/ioatdma.c index 2801d14a5e42..ecad8f65d2d4 100644 --- a/drivers/dma/ioatdma.c +++ b/drivers/dma/ioatdma.c | |||
@@ -739,7 +739,7 @@ static int __devinit ioat_probe(struct pci_dev *pdev, | |||
739 | device->msi = 0; | 739 | device->msi = 0; |
740 | } | 740 | } |
741 | #endif | 741 | #endif |
742 | err = request_irq(pdev->irq, &ioat_do_interrupt, SA_SHIRQ, "ioat", | 742 | err = request_irq(pdev->irq, &ioat_do_interrupt, IRQF_SHARED, "ioat", |
743 | device); | 743 | device); |
744 | if (err) | 744 | if (err) |
745 | goto err_irq; | 745 | goto err_irq; |
diff --git a/drivers/edac/amd76x_edac.c b/drivers/edac/amd76x_edac.c index d75864e35fef..f79f6b587bfa 100644 --- a/drivers/edac/amd76x_edac.c +++ b/drivers/edac/amd76x_edac.c | |||
@@ -19,8 +19,8 @@ | |||
19 | #include <linux/slab.h> | 19 | #include <linux/slab.h> |
20 | #include "edac_mc.h" | 20 | #include "edac_mc.h" |
21 | 21 | ||
22 | #define AMD76X_REVISION " Ver: 2.0.0 " __DATE__ | 22 | #define AMD76X_REVISION " Ver: 2.0.1 " __DATE__ |
23 | 23 | #define EDAC_MOD_STR "amd76x_edac" | |
24 | 24 | ||
25 | #define amd76x_printk(level, fmt, arg...) \ | 25 | #define amd76x_printk(level, fmt, arg...) \ |
26 | edac_printk(level, "amd76x", fmt, ##arg) | 26 | edac_printk(level, "amd76x", fmt, ##arg) |
diff --git a/drivers/edac/e752x_edac.c b/drivers/edac/e752x_edac.c index 815c3eb783de..c82bc0ed7f14 100644 --- a/drivers/edac/e752x_edac.c +++ b/drivers/edac/e752x_edac.c | |||
@@ -24,7 +24,8 @@ | |||
24 | #include <linux/slab.h> | 24 | #include <linux/slab.h> |
25 | #include "edac_mc.h" | 25 | #include "edac_mc.h" |
26 | 26 | ||
27 | #define E752X_REVISION " Ver: 2.0.0 " __DATE__ | 27 | #define E752X_REVISION " Ver: 2.0.1 " __DATE__ |
28 | #define EDAC_MOD_STR "e752x_edac" | ||
28 | 29 | ||
29 | static int force_function_unhide; | 30 | static int force_function_unhide; |
30 | 31 | ||
diff --git a/drivers/edac/e7xxx_edac.c b/drivers/edac/e7xxx_edac.c index 5a5ecd5a0409..310d91b41c96 100644 --- a/drivers/edac/e7xxx_edac.c +++ b/drivers/edac/e7xxx_edac.c | |||
@@ -29,7 +29,8 @@ | |||
29 | #include <linux/slab.h> | 29 | #include <linux/slab.h> |
30 | #include "edac_mc.h" | 30 | #include "edac_mc.h" |
31 | 31 | ||
32 | #define E7XXX_REVISION " Ver: 2.0.0 " __DATE__ | 32 | #define E7XXX_REVISION " Ver: 2.0.1 " __DATE__ |
33 | #define EDAC_MOD_STR "e7xxx_edac" | ||
33 | 34 | ||
34 | #define e7xxx_printk(level, fmt, arg...) \ | 35 | #define e7xxx_printk(level, fmt, arg...) \ |
35 | edac_printk(level, "e7xxx", fmt, ##arg) | 36 | edac_printk(level, "e7xxx", fmt, ##arg) |
diff --git a/drivers/edac/edac_mc.h b/drivers/edac/edac_mc.h index 1be4947e28af..bf6ab8a8d5ed 100644 --- a/drivers/edac/edac_mc.h +++ b/drivers/edac/edac_mc.h | |||
@@ -78,10 +78,6 @@ extern int edac_debug_level; | |||
78 | 78 | ||
79 | #endif /* !CONFIG_EDAC_DEBUG */ | 79 | #endif /* !CONFIG_EDAC_DEBUG */ |
80 | 80 | ||
81 | #define edac_xstr(s) edac_str(s) | ||
82 | #define edac_str(s) #s | ||
83 | #define EDAC_MOD_STR edac_xstr(KBUILD_BASENAME) | ||
84 | |||
85 | #define BIT(x) (1 << (x)) | 81 | #define BIT(x) (1 << (x)) |
86 | 82 | ||
87 | #define PCI_VEND_DEV(vend, dev) PCI_VENDOR_ID_ ## vend, \ | 83 | #define PCI_VEND_DEV(vend, dev) PCI_VENDOR_ID_ ## vend, \ |
diff --git a/drivers/edac/i82860_edac.c b/drivers/edac/i82860_edac.c index e30a4a2eaf38..e4bb298e613f 100644 --- a/drivers/edac/i82860_edac.c +++ b/drivers/edac/i82860_edac.c | |||
@@ -16,7 +16,8 @@ | |||
16 | #include <linux/slab.h> | 16 | #include <linux/slab.h> |
17 | #include "edac_mc.h" | 17 | #include "edac_mc.h" |
18 | 18 | ||
19 | #define I82860_REVISION " Ver: 2.0.0 " __DATE__ | 19 | #define I82860_REVISION " Ver: 2.0.1 " __DATE__ |
20 | #define EDAC_MOD_STR "i82860_edac" | ||
20 | 21 | ||
21 | #define i82860_printk(level, fmt, arg...) \ | 22 | #define i82860_printk(level, fmt, arg...) \ |
22 | edac_printk(level, "i82860", fmt, ##arg) | 23 | edac_printk(level, "i82860", fmt, ##arg) |
diff --git a/drivers/edac/i82875p_edac.c b/drivers/edac/i82875p_edac.c index 9423ee5e7edd..161fe09a6d38 100644 --- a/drivers/edac/i82875p_edac.c +++ b/drivers/edac/i82875p_edac.c | |||
@@ -20,7 +20,8 @@ | |||
20 | #include <linux/slab.h> | 20 | #include <linux/slab.h> |
21 | #include "edac_mc.h" | 21 | #include "edac_mc.h" |
22 | 22 | ||
23 | #define I82875P_REVISION " Ver: 2.0.0 " __DATE__ | 23 | #define I82875P_REVISION " Ver: 2.0.1 " __DATE__ |
24 | #define EDAC_MOD_STR "i82875p_edac" | ||
24 | 25 | ||
25 | #define i82875p_printk(level, fmt, arg...) \ | 26 | #define i82875p_printk(level, fmt, arg...) \ |
26 | edac_printk(level, "i82875p", fmt, ##arg) | 27 | edac_printk(level, "i82875p", fmt, ##arg) |
diff --git a/drivers/edac/r82600_edac.c b/drivers/edac/r82600_edac.c index a0e248d11ed9..a49cf0a39398 100644 --- a/drivers/edac/r82600_edac.c +++ b/drivers/edac/r82600_edac.c | |||
@@ -22,7 +22,8 @@ | |||
22 | #include <linux/slab.h> | 22 | #include <linux/slab.h> |
23 | #include "edac_mc.h" | 23 | #include "edac_mc.h" |
24 | 24 | ||
25 | #define R82600_REVISION " Ver: 2.0.0 " __DATE__ | 25 | #define R82600_REVISION " Ver: 2.0.1 " __DATE__ |
26 | #define EDAC_MOD_STR "r82600_edac" | ||
26 | 27 | ||
27 | #define r82600_printk(level, fmt, arg...) \ | 28 | #define r82600_printk(level, fmt, arg...) \ |
28 | edac_printk(level, "r82600", fmt, ##arg) | 29 | edac_printk(level, "r82600", fmt, ##arg) |
diff --git a/drivers/fc4/soc.c b/drivers/fc4/soc.c index cf8768b8d1f1..3b07e0ca81cd 100644 --- a/drivers/fc4/soc.c +++ b/drivers/fc4/soc.c | |||
@@ -637,7 +637,7 @@ static inline void soc_init(struct sbus_dev *sdev, int no) | |||
637 | 637 | ||
638 | irq = sdev->irqs[0]; | 638 | irq = sdev->irqs[0]; |
639 | 639 | ||
640 | if (request_irq (irq, soc_intr, SA_SHIRQ, "SOC", (void *)s)) { | 640 | if (request_irq (irq, soc_intr, IRQF_SHARED, "SOC", (void *)s)) { |
641 | soc_printk ("Cannot order irq %d to go\n", irq); | 641 | soc_printk ("Cannot order irq %d to go\n", irq); |
642 | socs = s->next; | 642 | socs = s->next; |
643 | return; | 643 | return; |
diff --git a/drivers/fc4/socal.c b/drivers/fc4/socal.c index f52d1e5bd5a5..2b75edc5859d 100644 --- a/drivers/fc4/socal.c +++ b/drivers/fc4/socal.c | |||
@@ -761,7 +761,7 @@ static inline void socal_init(struct sbus_dev *sdev, int no) | |||
761 | 761 | ||
762 | irq = sdev->irqs[0]; | 762 | irq = sdev->irqs[0]; |
763 | 763 | ||
764 | if (request_irq (irq, socal_intr, SA_SHIRQ, "SOCAL", (void *)s)) { | 764 | if (request_irq (irq, socal_intr, IRQF_SHARED, "SOCAL", (void *)s)) { |
765 | socal_printk ("Cannot order irq %d to go\n", irq); | 765 | socal_printk ("Cannot order irq %d to go\n", irq); |
766 | socals = s->next; | 766 | socals = s->next; |
767 | return; | 767 | return; |
diff --git a/drivers/i2c/busses/i2c-mpc.c b/drivers/i2c/busses/i2c-mpc.c index de93601de178..377ab40944b8 100644 --- a/drivers/i2c/busses/i2c-mpc.c +++ b/drivers/i2c/busses/i2c-mpc.c | |||
@@ -318,7 +318,7 @@ static int fsl_i2c_probe(struct platform_device *pdev) | |||
318 | 318 | ||
319 | if (i2c->irq != 0) | 319 | if (i2c->irq != 0) |
320 | if ((result = request_irq(i2c->irq, mpc_i2c_isr, | 320 | if ((result = request_irq(i2c->irq, mpc_i2c_isr, |
321 | SA_SHIRQ, "i2c-mpc", i2c)) < 0) { | 321 | IRQF_SHARED, "i2c-mpc", i2c)) < 0) { |
322 | printk(KERN_ERR | 322 | printk(KERN_ERR |
323 | "i2c-mpc - failed to attach interrupt\n"); | 323 | "i2c-mpc - failed to attach interrupt\n"); |
324 | goto fail_irq; | 324 | goto fail_irq; |
diff --git a/drivers/i2c/busses/i2c-pxa.c b/drivers/i2c/busses/i2c-pxa.c index 5155010b455e..ee114b48face 100644 --- a/drivers/i2c/busses/i2c-pxa.c +++ b/drivers/i2c/busses/i2c-pxa.c | |||
@@ -968,7 +968,7 @@ static int i2c_pxa_probe(struct platform_device *dev) | |||
968 | #endif | 968 | #endif |
969 | 969 | ||
970 | pxa_set_cken(CKEN14_I2C, 1); | 970 | pxa_set_cken(CKEN14_I2C, 1); |
971 | ret = request_irq(IRQ_I2C, i2c_pxa_handler, SA_INTERRUPT, | 971 | ret = request_irq(IRQ_I2C, i2c_pxa_handler, IRQF_DISABLED, |
972 | "pxa2xx-i2c", i2c); | 972 | "pxa2xx-i2c", i2c); |
973 | if (ret) | 973 | if (ret) |
974 | goto out; | 974 | goto out; |
diff --git a/drivers/i2c/busses/i2c-s3c2410.c b/drivers/i2c/busses/i2c-s3c2410.c index 512b8791c328..5d2950e91fc5 100644 --- a/drivers/i2c/busses/i2c-s3c2410.c +++ b/drivers/i2c/busses/i2c-s3c2410.c | |||
@@ -828,7 +828,7 @@ static int s3c24xx_i2c_probe(struct platform_device *pdev) | |||
828 | goto out; | 828 | goto out; |
829 | } | 829 | } |
830 | 830 | ||
831 | ret = request_irq(res->start, s3c24xx_i2c_irq, SA_INTERRUPT, | 831 | ret = request_irq(res->start, s3c24xx_i2c_irq, IRQF_DISABLED, |
832 | pdev->name, i2c); | 832 | pdev->name, i2c); |
833 | 833 | ||
834 | if (ret != 0) { | 834 | if (ret != 0) { |
diff --git a/drivers/i2c/chips/isp1301_omap.c b/drivers/i2c/chips/isp1301_omap.c index b638ac6e59f4..f92505b94c61 100644 --- a/drivers/i2c/chips/isp1301_omap.c +++ b/drivers/i2c/chips/isp1301_omap.c | |||
@@ -908,7 +908,7 @@ static int otg_bind(struct isp1301 *isp) | |||
908 | 908 | ||
909 | if (otg_dev) | 909 | if (otg_dev) |
910 | status = request_irq(otg_dev->resource[1].start, omap_otg_irq, | 910 | status = request_irq(otg_dev->resource[1].start, omap_otg_irq, |
911 | SA_INTERRUPT, DRIVER_NAME, isp); | 911 | IRQF_DISABLED, DRIVER_NAME, isp); |
912 | else | 912 | else |
913 | status = -ENODEV; | 913 | status = -ENODEV; |
914 | 914 | ||
@@ -1578,7 +1578,7 @@ fail1: | |||
1578 | } | 1578 | } |
1579 | 1579 | ||
1580 | status = request_irq(isp->irq, isp1301_irq, | 1580 | status = request_irq(isp->irq, isp1301_irq, |
1581 | SA_SAMPLE_RANDOM, DRIVER_NAME, isp); | 1581 | IRQF_SAMPLE_RANDOM, DRIVER_NAME, isp); |
1582 | if (status < 0) { | 1582 | if (status < 0) { |
1583 | dev_dbg(&i2c->dev, "can't get IRQ %d, err %d\n", | 1583 | dev_dbg(&i2c->dev, "can't get IRQ %d, err %d\n", |
1584 | isp->irq, status); | 1584 | isp->irq, status); |
diff --git a/drivers/i2c/chips/tps65010.c b/drivers/i2c/chips/tps65010.c index e27ee12245d3..e7e27049fbfa 100644 --- a/drivers/i2c/chips/tps65010.c +++ b/drivers/i2c/chips/tps65010.c | |||
@@ -521,14 +521,14 @@ tps65010_probe(struct i2c_adapter *bus, int address, int kind) | |||
521 | } | 521 | } |
522 | 522 | ||
523 | #ifdef CONFIG_ARM | 523 | #ifdef CONFIG_ARM |
524 | irqflags = SA_SAMPLE_RANDOM | SA_TRIGGER_LOW; | 524 | irqflags = IRQF_SAMPLE_RANDOM | IRQF_TRIGGER_LOW; |
525 | if (machine_is_omap_h2()) { | 525 | if (machine_is_omap_h2()) { |
526 | tps->model = TPS65010; | 526 | tps->model = TPS65010; |
527 | omap_cfg_reg(W4_GPIO58); | 527 | omap_cfg_reg(W4_GPIO58); |
528 | tps->irq = OMAP_GPIO_IRQ(58); | 528 | tps->irq = OMAP_GPIO_IRQ(58); |
529 | omap_request_gpio(58); | 529 | omap_request_gpio(58); |
530 | omap_set_gpio_direction(58, 1); | 530 | omap_set_gpio_direction(58, 1); |
531 | irqflags |= SA_TRIGGER_FALLING; | 531 | irqflags |= IRQF_TRIGGER_FALLING; |
532 | } | 532 | } |
533 | if (machine_is_omap_osk()) { | 533 | if (machine_is_omap_osk()) { |
534 | tps->model = TPS65010; | 534 | tps->model = TPS65010; |
@@ -536,7 +536,7 @@ tps65010_probe(struct i2c_adapter *bus, int address, int kind) | |||
536 | tps->irq = OMAP_GPIO_IRQ(OMAP_MPUIO(1)); | 536 | tps->irq = OMAP_GPIO_IRQ(OMAP_MPUIO(1)); |
537 | omap_request_gpio(OMAP_MPUIO(1)); | 537 | omap_request_gpio(OMAP_MPUIO(1)); |
538 | omap_set_gpio_direction(OMAP_MPUIO(1), 1); | 538 | omap_set_gpio_direction(OMAP_MPUIO(1), 1); |
539 | irqflags |= SA_TRIGGER_FALLING; | 539 | irqflags |= IRQF_TRIGGER_FALLING; |
540 | } | 540 | } |
541 | if (machine_is_omap_h3()) { | 541 | if (machine_is_omap_h3()) { |
542 | tps->model = TPS65013; | 542 | tps->model = TPS65013; |
@@ -544,7 +544,7 @@ tps65010_probe(struct i2c_adapter *bus, int address, int kind) | |||
544 | // FIXME set up this board's IRQ ... | 544 | // FIXME set up this board's IRQ ... |
545 | } | 545 | } |
546 | #else | 546 | #else |
547 | irqflags = SA_SAMPLE_RANDOM; | 547 | irqflags = IRQF_SAMPLE_RANDOM; |
548 | #endif | 548 | #endif |
549 | 549 | ||
550 | if (tps->irq > 0) { | 550 | if (tps->irq > 0) { |
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c index c5f71ac28d14..9cadf0106c6c 100644 --- a/drivers/ide/ide-probe.c +++ b/drivers/ide/ide-probe.c | |||
@@ -1004,7 +1004,7 @@ static int ide_init_queue(ide_drive_t *drive) | |||
1004 | * and irq serialization situations. This is somewhat complex because | 1004 | * and irq serialization situations. This is somewhat complex because |
1005 | * it handles static as well as dynamic (PCMCIA) IDE interfaces. | 1005 | * it handles static as well as dynamic (PCMCIA) IDE interfaces. |
1006 | * | 1006 | * |
1007 | * The SA_INTERRUPT in sa_flags means ide_intr() is always entered with | 1007 | * The IRQF_DISABLED in sa_flags means ide_intr() is always entered with |
1008 | * interrupts completely disabled. This can be bad for interrupt latency, | 1008 | * interrupts completely disabled. This can be bad for interrupt latency, |
1009 | * but anything else has led to problems on some machines. We re-enable | 1009 | * but anything else has led to problems on some machines. We re-enable |
1010 | * interrupts as much as we can safely do in most places. | 1010 | * interrupts as much as we can safely do in most places. |
@@ -1090,15 +1090,15 @@ static int init_irq (ide_hwif_t *hwif) | |||
1090 | * Allocate the irq, if not already obtained for another hwif | 1090 | * Allocate the irq, if not already obtained for another hwif |
1091 | */ | 1091 | */ |
1092 | if (!match || match->irq != hwif->irq) { | 1092 | if (!match || match->irq != hwif->irq) { |
1093 | int sa = SA_INTERRUPT; | 1093 | int sa = IRQF_DISABLED; |
1094 | #if defined(__mc68000__) || defined(CONFIG_APUS) | 1094 | #if defined(__mc68000__) || defined(CONFIG_APUS) |
1095 | sa = SA_SHIRQ; | 1095 | sa = IRQF_SHARED; |
1096 | #endif /* __mc68000__ || CONFIG_APUS */ | 1096 | #endif /* __mc68000__ || CONFIG_APUS */ |
1097 | 1097 | ||
1098 | if (IDE_CHIPSET_IS_PCI(hwif->chipset)) { | 1098 | if (IDE_CHIPSET_IS_PCI(hwif->chipset)) { |
1099 | sa = SA_SHIRQ; | 1099 | sa = IRQF_SHARED; |
1100 | #ifndef CONFIG_IDEPCI_SHARE_IRQ | 1100 | #ifndef CONFIG_IDEPCI_SHARE_IRQ |
1101 | sa |= SA_INTERRUPT; | 1101 | sa |= IRQF_DISABLED; |
1102 | #endif /* CONFIG_IDEPCI_SHARE_IRQ */ | 1102 | #endif /* CONFIG_IDEPCI_SHARE_IRQ */ |
1103 | } | 1103 | } |
1104 | 1104 | ||
diff --git a/drivers/ide/legacy/hd.c b/drivers/ide/legacy/hd.c index 6439dec66881..aebecd8f51cc 100644 --- a/drivers/ide/legacy/hd.c +++ b/drivers/ide/legacy/hd.c | |||
@@ -691,7 +691,7 @@ static struct block_device_operations hd_fops = { | |||
691 | }; | 691 | }; |
692 | 692 | ||
693 | /* | 693 | /* |
694 | * This is the hard disk IRQ description. The SA_INTERRUPT in sa_flags | 694 | * This is the hard disk IRQ description. The IRQF_DISABLED in sa_flags |
695 | * means we run the IRQ-handler with interrupts disabled: this is bad for | 695 | * means we run the IRQ-handler with interrupts disabled: this is bad for |
696 | * interrupt latency, but anything else has led to problems on some | 696 | * interrupt latency, but anything else has led to problems on some |
697 | * machines. | 697 | * machines. |
@@ -806,7 +806,7 @@ static int __init hd_init(void) | |||
806 | p->cyl, p->head, p->sect); | 806 | p->cyl, p->head, p->sect); |
807 | } | 807 | } |
808 | 808 | ||
809 | if (request_irq(HD_IRQ, hd_interrupt, SA_INTERRUPT, "hd", NULL)) { | 809 | if (request_irq(HD_IRQ, hd_interrupt, IRQF_DISABLED, "hd", NULL)) { |
810 | printk("hd: unable to get IRQ%d for the hard disk driver\n", | 810 | printk("hd: unable to get IRQ%d for the hard disk driver\n", |
811 | HD_IRQ); | 811 | HD_IRQ); |
812 | goto out1; | 812 | goto out1; |
diff --git a/drivers/ide/pci/it821x.c b/drivers/ide/pci/it821x.c index 7fb3635683dc..3cb04424d351 100644 --- a/drivers/ide/pci/it821x.c +++ b/drivers/ide/pci/it821x.c | |||
@@ -650,6 +650,8 @@ static void __devinit init_hwif_it821x(ide_hwif_t *hwif) | |||
650 | } | 650 | } |
651 | ide_set_hwifdata(hwif, idev); | 651 | ide_set_hwifdata(hwif, idev); |
652 | 652 | ||
653 | hwif->atapi_dma = 1; | ||
654 | |||
653 | pci_read_config_byte(hwif->pci_dev, 0x50, &conf); | 655 | pci_read_config_byte(hwif->pci_dev, 0x50, &conf); |
654 | if(conf & 1) { | 656 | if(conf & 1) { |
655 | idev->smart = 1; | 657 | idev->smart = 1; |
diff --git a/drivers/ieee1394/ohci1394.c b/drivers/ieee1394/ohci1394.c index 8de81ecd3ba6..d4bad6704bbe 100644 --- a/drivers/ieee1394/ohci1394.c +++ b/drivers/ieee1394/ohci1394.c | |||
@@ -3392,12 +3392,12 @@ static int __devinit ohci1394_pci_probe(struct pci_dev *dev, | |||
3392 | spin_lock_init(&ohci->event_lock); | 3392 | spin_lock_init(&ohci->event_lock); |
3393 | 3393 | ||
3394 | /* | 3394 | /* |
3395 | * interrupts are disabled, all right, but... due to SA_SHIRQ we | 3395 | * interrupts are disabled, all right, but... due to IRQF_SHARED we |
3396 | * might get called anyway. We'll see no event, of course, but | 3396 | * might get called anyway. We'll see no event, of course, but |
3397 | * we need to get to that "no event", so enough should be initialized | 3397 | * we need to get to that "no event", so enough should be initialized |
3398 | * by that point. | 3398 | * by that point. |
3399 | */ | 3399 | */ |
3400 | if (request_irq(dev->irq, ohci_irq_handler, SA_SHIRQ, | 3400 | if (request_irq(dev->irq, ohci_irq_handler, IRQF_SHARED, |
3401 | OHCI1394_DRIVER_NAME, ohci)) | 3401 | OHCI1394_DRIVER_NAME, ohci)) |
3402 | FAIL(-ENOMEM, "Failed to allocate shared interrupt %d", dev->irq); | 3402 | FAIL(-ENOMEM, "Failed to allocate shared interrupt %d", dev->irq); |
3403 | 3403 | ||
diff --git a/drivers/ieee1394/pcilynx.c b/drivers/ieee1394/pcilynx.c index 5b48f6ac5c7f..e6f41238f5e8 100644 --- a/drivers/ieee1394/pcilynx.c +++ b/drivers/ieee1394/pcilynx.c | |||
@@ -1253,7 +1253,7 @@ static int __devinit add_card(struct pci_dev *dev, | |||
1253 | 1253 | ||
1254 | sprintf (irq_buf, "%d", dev->irq); | 1254 | sprintf (irq_buf, "%d", dev->irq); |
1255 | 1255 | ||
1256 | if (!request_irq(dev->irq, lynx_irq_handler, SA_SHIRQ, | 1256 | if (!request_irq(dev->irq, lynx_irq_handler, IRQF_SHARED, |
1257 | PCILYNX_DRIVER_NAME, lynx)) { | 1257 | PCILYNX_DRIVER_NAME, lynx)) { |
1258 | PRINT(KERN_INFO, lynx->id, "allocated interrupt %s", irq_buf); | 1258 | PRINT(KERN_INFO, lynx->id, "allocated interrupt %s", irq_buf); |
1259 | lynx->state = have_intr; | 1259 | lynx->state = have_intr; |
diff --git a/drivers/infiniband/hw/ipath/Kconfig b/drivers/infiniband/hw/ipath/Kconfig index 9ea67c409b6d..1db9489f1e82 100644 --- a/drivers/infiniband/hw/ipath/Kconfig +++ b/drivers/infiniband/hw/ipath/Kconfig | |||
@@ -1,16 +1,16 @@ | |||
1 | config IPATH_CORE | 1 | config IPATH_CORE |
2 | tristate "PathScale InfiniPath Driver" | 2 | tristate "QLogic InfiniPath Driver" |
3 | depends on 64BIT && PCI_MSI && NET | 3 | depends on 64BIT && PCI_MSI && NET |
4 | ---help--- | 4 | ---help--- |
5 | This is a low-level driver for PathScale InfiniPath host channel | 5 | This is a low-level driver for QLogic InfiniPath host channel |
6 | adapters (HCAs) based on the HT-400 and PE-800 chips. | 6 | adapters (HCAs) based on the HT-400 and PE-800 chips. |
7 | 7 | ||
8 | config INFINIBAND_IPATH | 8 | config INFINIBAND_IPATH |
9 | tristate "PathScale InfiniPath Verbs Driver" | 9 | tristate "QLogic InfiniPath Verbs Driver" |
10 | depends on IPATH_CORE && INFINIBAND | 10 | depends on IPATH_CORE && INFINIBAND |
11 | ---help--- | 11 | ---help--- |
12 | This is a driver that provides InfiniBand verbs support for | 12 | This is a driver that provides InfiniBand verbs support for |
13 | PathScale InfiniPath host channel adapters (HCAs). This | 13 | QLogic InfiniPath host channel adapters (HCAs). This |
14 | allows these devices to be used with both kernel upper level | 14 | allows these devices to be used with both kernel upper level |
15 | protocols such as IP-over-InfiniBand as well as with userspace | 15 | protocols such as IP-over-InfiniBand as well as with userspace |
16 | applications (in conjunction with InfiniBand userspace access). | 16 | applications (in conjunction with InfiniBand userspace access). |
diff --git a/drivers/infiniband/hw/ipath/Makefile b/drivers/infiniband/hw/ipath/Makefile index b4d084abfd22..b0bf72864130 100644 --- a/drivers/infiniband/hw/ipath/Makefile +++ b/drivers/infiniband/hw/ipath/Makefile | |||
@@ -1,4 +1,4 @@ | |||
1 | EXTRA_CFLAGS += -DIPATH_IDSTR='"PathScale kernel.org driver"' \ | 1 | EXTRA_CFLAGS += -DIPATH_IDSTR='"QLogic kernel.org driver"' \ |
2 | -DIPATH_KERN_TYPE=0 | 2 | -DIPATH_KERN_TYPE=0 |
3 | 3 | ||
4 | obj-$(CONFIG_IPATH_CORE) += ipath_core.o | 4 | obj-$(CONFIG_IPATH_CORE) += ipath_core.o |
diff --git a/drivers/infiniband/hw/ipath/ipath_common.h b/drivers/infiniband/hw/ipath/ipath_common.h index 48a55247b832..062bd392e7e5 100644 --- a/drivers/infiniband/hw/ipath/ipath_common.h +++ b/drivers/infiniband/hw/ipath/ipath_common.h | |||
@@ -1,4 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2006 QLogic, Inc. All rights reserved. | ||
2 | * Copyright (c) 2003, 2004, 2005, 2006 PathScale, Inc. All rights reserved. | 3 | * Copyright (c) 2003, 2004, 2005, 2006 PathScale, Inc. All rights reserved. |
3 | * | 4 | * |
4 | * This software is available to you under a choice of one of two | 5 | * This software is available to you under a choice of one of two |
@@ -38,7 +39,8 @@ | |||
38 | * to communicate between kernel and user code. | 39 | * to communicate between kernel and user code. |
39 | */ | 40 | */ |
40 | 41 | ||
41 | /* This is the IEEE-assigned OUI for PathScale, Inc. */ | 42 | |
43 | /* This is the IEEE-assigned OUI for QLogic Inc. InfiniPath */ | ||
42 | #define IPATH_SRC_OUI_1 0x00 | 44 | #define IPATH_SRC_OUI_1 0x00 |
43 | #define IPATH_SRC_OUI_2 0x11 | 45 | #define IPATH_SRC_OUI_2 0x11 |
44 | #define IPATH_SRC_OUI_3 0x75 | 46 | #define IPATH_SRC_OUI_3 0x75 |
@@ -96,8 +98,8 @@ struct infinipath_stats { | |||
96 | __u64 sps_hwerrs; | 98 | __u64 sps_hwerrs; |
97 | /* number of times IB link changed state unexpectedly */ | 99 | /* number of times IB link changed state unexpectedly */ |
98 | __u64 sps_iblink; | 100 | __u64 sps_iblink; |
99 | /* no longer used; left for compatibility */ | 101 | /* kernel receive interrupts that didn't read intstat */ |
100 | __u64 sps_unused3; | 102 | __u64 sps_fastrcvint; |
101 | /* number of kernel (port0) packets received */ | 103 | /* number of kernel (port0) packets received */ |
102 | __u64 sps_port0pkts; | 104 | __u64 sps_port0pkts; |
103 | /* number of "ethernet" packets sent by driver */ | 105 | /* number of "ethernet" packets sent by driver */ |
@@ -121,8 +123,7 @@ struct infinipath_stats { | |||
121 | __u64 sps_ports; | 123 | __u64 sps_ports; |
122 | /* list of pkeys (other than default) accepted (0 means not set) */ | 124 | /* list of pkeys (other than default) accepted (0 means not set) */ |
123 | __u16 sps_pkeys[4]; | 125 | __u16 sps_pkeys[4]; |
124 | /* lids for up to 4 infinipaths, indexed by infinipath # */ | 126 | __u16 sps_unused16[4]; /* available; maintaining compatible layout */ |
125 | __u16 sps_lid[4]; | ||
126 | /* number of user ports per chip (not IB ports) */ | 127 | /* number of user ports per chip (not IB ports) */ |
127 | __u32 sps_nports; | 128 | __u32 sps_nports; |
128 | /* not our interrupt, or already handled */ | 129 | /* not our interrupt, or already handled */ |
@@ -140,10 +141,8 @@ struct infinipath_stats { | |||
140 | * packets if ipath not configured, sma/mad, etc.) | 141 | * packets if ipath not configured, sma/mad, etc.) |
141 | */ | 142 | */ |
142 | __u64 sps_krdrops; | 143 | __u64 sps_krdrops; |
143 | /* mlids for up to 4 infinipaths, indexed by infinipath # */ | ||
144 | __u16 sps_mlid[4]; | ||
145 | /* pad for future growth */ | 144 | /* pad for future growth */ |
146 | __u64 __sps_pad[45]; | 145 | __u64 __sps_pad[46]; |
147 | }; | 146 | }; |
148 | 147 | ||
149 | /* | 148 | /* |
@@ -310,6 +309,9 @@ struct ipath_base_info { | |||
310 | __u32 spi_rcv_egrchunksize; | 309 | __u32 spi_rcv_egrchunksize; |
311 | /* total size of mmap to cover full rcvegrbuffers */ | 310 | /* total size of mmap to cover full rcvegrbuffers */ |
312 | __u32 spi_rcv_egrbuftotlen; | 311 | __u32 spi_rcv_egrbuftotlen; |
312 | __u32 spi_filler_for_align; | ||
313 | /* address of readonly memory copy of the rcvhdrq tail register. */ | ||
314 | __u64 spi_rcvhdr_tailaddr; | ||
313 | } __attribute__ ((aligned(8))); | 315 | } __attribute__ ((aligned(8))); |
314 | 316 | ||
315 | 317 | ||
@@ -342,9 +344,9 @@ struct ipath_base_info { | |||
342 | /* | 344 | /* |
343 | * Similarly, this is the kernel version going back to the user. It's | 345 | * Similarly, this is the kernel version going back to the user. It's |
344 | * slightly different, in that we want to tell if the driver was built as | 346 | * slightly different, in that we want to tell if the driver was built as |
345 | * part of a PathScale release, or from the driver from OpenIB, kernel.org, | 347 | * part of a QLogic release, or from the driver from openfabrics.org, |
346 | * or a standard distribution, for support reasons. The high bit is 0 for | 348 | * kernel.org, or a standard distribution, for support reasons. |
347 | * non-PathScale, and 1 for PathScale-built/supplied. | 349 | * The high bit is 0 for non-QLogic and 1 for QLogic-built/supplied. |
348 | * | 350 | * |
349 | * It's returned by the driver to the user code during initialization in the | 351 | * It's returned by the driver to the user code during initialization in the |
350 | * spi_sw_version field of ipath_base_info, so the user code can in turn | 352 | * spi_sw_version field of ipath_base_info, so the user code can in turn |
@@ -379,13 +381,7 @@ struct ipath_user_info { | |||
379 | */ | 381 | */ |
380 | __u32 spu_rcvhdrsize; | 382 | __u32 spu_rcvhdrsize; |
381 | 383 | ||
382 | /* | 384 | __u64 spu_unused; /* kept for compatible layout */ |
383 | * cache line aligned (64 byte) user address to | ||
384 | * which the rcvhdrtail register will be written by infinipath | ||
385 | * whenever it changes, so that no chip registers are read in | ||
386 | * the performance path. | ||
387 | */ | ||
388 | __u64 spu_rcvhdraddr; | ||
389 | 385 | ||
390 | /* | 386 | /* |
391 | * address of struct base_info to write to | 387 | * address of struct base_info to write to |
@@ -481,7 +477,7 @@ struct ipath_sma_pkt | |||
481 | * Data layout in I2C flash (for GUID, etc.) | 477 | * Data layout in I2C flash (for GUID, etc.) |
482 | * All fields are little-endian binary unless otherwise stated | 478 | * All fields are little-endian binary unless otherwise stated |
483 | */ | 479 | */ |
484 | #define IPATH_FLASH_VERSION 1 | 480 | #define IPATH_FLASH_VERSION 2 |
485 | struct ipath_flash { | 481 | struct ipath_flash { |
486 | /* flash layout version (IPATH_FLASH_VERSION) */ | 482 | /* flash layout version (IPATH_FLASH_VERSION) */ |
487 | __u8 if_fversion; | 483 | __u8 if_fversion; |
@@ -489,14 +485,14 @@ struct ipath_flash { | |||
489 | __u8 if_csum; | 485 | __u8 if_csum; |
490 | /* | 486 | /* |
491 | * valid length (in use, protected by if_csum), including | 487 | * valid length (in use, protected by if_csum), including |
492 | * if_fversion and if_sum themselves) | 488 | * if_fversion and if_csum themselves) |
493 | */ | 489 | */ |
494 | __u8 if_length; | 490 | __u8 if_length; |
495 | /* the GUID, in network order */ | 491 | /* the GUID, in network order */ |
496 | __u8 if_guid[8]; | 492 | __u8 if_guid[8]; |
497 | /* number of GUIDs to use, starting from if_guid */ | 493 | /* number of GUIDs to use, starting from if_guid */ |
498 | __u8 if_numguid; | 494 | __u8 if_numguid; |
499 | /* the board serial number, in ASCII */ | 495 | /* the (last 10 characters of) board serial number, in ASCII */ |
500 | char if_serial[12]; | 496 | char if_serial[12]; |
501 | /* board mfg date (YYYYMMDD ASCII) */ | 497 | /* board mfg date (YYYYMMDD ASCII) */ |
502 | char if_mfgdate[8]; | 498 | char if_mfgdate[8]; |
@@ -508,8 +504,10 @@ struct ipath_flash { | |||
508 | __u8 if_powerhour[2]; | 504 | __u8 if_powerhour[2]; |
509 | /* ASCII free-form comment field */ | 505 | /* ASCII free-form comment field */ |
510 | char if_comment[32]; | 506 | char if_comment[32]; |
511 | /* 78 bytes used, min flash size is 128 bytes */ | 507 | /* Backwards compatible prefix for longer QLogic Serial Numbers */ |
512 | __u8 if_future[50]; | 508 | char if_sprefix[4]; |
509 | /* 82 bytes used, min flash size is 128 bytes */ | ||
510 | __u8 if_future[46]; | ||
513 | }; | 511 | }; |
514 | 512 | ||
515 | /* | 513 | /* |
@@ -603,14 +601,118 @@ struct infinipath_counters { | |||
603 | #define INFINIPATH_KPF_INTR 0x1 | 601 | #define INFINIPATH_KPF_INTR 0x1 |
604 | 602 | ||
605 | /* SendPIO per-buffer control */ | 603 | /* SendPIO per-buffer control */ |
606 | #define INFINIPATH_SP_LENGTHP1_MASK 0x3FF | 604 | #define INFINIPATH_SP_TEST 0x40 |
607 | #define INFINIPATH_SP_LENGTHP1_SHIFT 0 | 605 | #define INFINIPATH_SP_TESTEBP 0x20 |
608 | #define INFINIPATH_SP_INTR 0x80000000 | ||
609 | #define INFINIPATH_SP_TEST 0x40000000 | ||
610 | #define INFINIPATH_SP_TESTEBP 0x20000000 | ||
611 | 606 | ||
612 | /* SendPIOAvail bits */ | 607 | /* SendPIOAvail bits */ |
613 | #define INFINIPATH_SENDPIOAVAIL_BUSY_SHIFT 1 | 608 | #define INFINIPATH_SENDPIOAVAIL_BUSY_SHIFT 1 |
614 | #define INFINIPATH_SENDPIOAVAIL_CHECK_SHIFT 0 | 609 | #define INFINIPATH_SENDPIOAVAIL_CHECK_SHIFT 0 |
615 | 610 | ||
611 | /* infinipath header format */ | ||
612 | struct ipath_header { | ||
613 | /* | ||
614 | * Version - 4 bits, Port - 4 bits, TID - 10 bits and Offset - | ||
615 | * 14 bits before ECO change ~28 Dec 03. After that, Vers 4, | ||
616 | * Port 3, TID 11, offset 14. | ||
617 | */ | ||
618 | __le32 ver_port_tid_offset; | ||
619 | __le16 chksum; | ||
620 | __le16 pkt_flags; | ||
621 | }; | ||
622 | |||
623 | /* infinipath user message header format. | ||
624 | * This structure contains the first 4 fields common to all protocols | ||
625 | * that employ infinipath. | ||
626 | */ | ||
627 | struct ipath_message_header { | ||
628 | __be16 lrh[4]; | ||
629 | __be32 bth[3]; | ||
630 | /* fields below this point are in host byte order */ | ||
631 | struct ipath_header iph; | ||
632 | __u8 sub_opcode; | ||
633 | }; | ||
634 | |||
635 | /* infinipath ethernet header format */ | ||
636 | struct ether_header { | ||
637 | __be16 lrh[4]; | ||
638 | __be32 bth[3]; | ||
639 | struct ipath_header iph; | ||
640 | __u8 sub_opcode; | ||
641 | __u8 cmd; | ||
642 | __be16 lid; | ||
643 | __u16 mac[3]; | ||
644 | __u8 frag_num; | ||
645 | __u8 seq_num; | ||
646 | __le32 len; | ||
647 | /* MUST be of word size due to PIO write requirements */ | ||
648 | __le32 csum; | ||
649 | __le16 csum_offset; | ||
650 | __le16 flags; | ||
651 | __u16 first_2_bytes; | ||
652 | __u8 unused[2]; /* currently unused */ | ||
653 | }; | ||
654 | |||
655 | |||
656 | /* IB - LRH header consts */ | ||
657 | #define IPATH_LRH_GRH 0x0003 /* 1. word of IB LRH - next header: GRH */ | ||
658 | #define IPATH_LRH_BTH 0x0002 /* 1. word of IB LRH - next header: BTH */ | ||
659 | |||
660 | /* misc. */ | ||
661 | #define SIZE_OF_CRC 1 | ||
662 | |||
663 | #define IPATH_DEFAULT_P_KEY 0xFFFF | ||
664 | #define IPATH_PERMISSIVE_LID 0xFFFF | ||
665 | #define IPATH_AETH_CREDIT_SHIFT 24 | ||
666 | #define IPATH_AETH_CREDIT_MASK 0x1F | ||
667 | #define IPATH_AETH_CREDIT_INVAL 0x1F | ||
668 | #define IPATH_PSN_MASK 0xFFFFFF | ||
669 | #define IPATH_MSN_MASK 0xFFFFFF | ||
670 | #define IPATH_QPN_MASK 0xFFFFFF | ||
671 | #define IPATH_MULTICAST_LID_BASE 0xC000 | ||
672 | #define IPATH_MULTICAST_QPN 0xFFFFFF | ||
673 | |||
674 | /* Receive Header Queue: receive type (from infinipath) */ | ||
675 | #define RCVHQ_RCV_TYPE_EXPECTED 0 | ||
676 | #define RCVHQ_RCV_TYPE_EAGER 1 | ||
677 | #define RCVHQ_RCV_TYPE_NON_KD 2 | ||
678 | #define RCVHQ_RCV_TYPE_ERROR 3 | ||
679 | |||
680 | |||
681 | /* sub OpCodes - ith4x */ | ||
682 | #define IPATH_ITH4X_OPCODE_ENCAP 0x81 | ||
683 | #define IPATH_ITH4X_OPCODE_LID_ARP 0x82 | ||
684 | |||
685 | #define IPATH_HEADER_QUEUE_WORDS 9 | ||
686 | |||
687 | /* functions for extracting fields from rcvhdrq entries for the driver. | ||
688 | */ | ||
689 | static inline __u32 ipath_hdrget_err_flags(const __le32 * rbuf) | ||
690 | { | ||
691 | return __le32_to_cpu(rbuf[1]); | ||
692 | } | ||
693 | |||
694 | static inline __u32 ipath_hdrget_rcv_type(const __le32 * rbuf) | ||
695 | { | ||
696 | return (__le32_to_cpu(rbuf[0]) >> INFINIPATH_RHF_RCVTYPE_SHIFT) | ||
697 | & INFINIPATH_RHF_RCVTYPE_MASK; | ||
698 | } | ||
699 | |||
700 | static inline __u32 ipath_hdrget_length_in_bytes(const __le32 * rbuf) | ||
701 | { | ||
702 | return ((__le32_to_cpu(rbuf[0]) >> INFINIPATH_RHF_LENGTH_SHIFT) | ||
703 | & INFINIPATH_RHF_LENGTH_MASK) << 2; | ||
704 | } | ||
705 | |||
706 | static inline __u32 ipath_hdrget_index(const __le32 * rbuf) | ||
707 | { | ||
708 | return (__le32_to_cpu(rbuf[0]) >> INFINIPATH_RHF_EGRINDEX_SHIFT) | ||
709 | & INFINIPATH_RHF_EGRINDEX_MASK; | ||
710 | } | ||
711 | |||
712 | static inline __u32 ipath_hdrget_ipath_ver(__le32 hdrword) | ||
713 | { | ||
714 | return (__le32_to_cpu(hdrword) >> INFINIPATH_I_VERS_SHIFT) | ||
715 | & INFINIPATH_I_VERS_MASK; | ||
716 | } | ||
717 | |||
616 | #endif /* _IPATH_COMMON_H */ | 718 | #endif /* _IPATH_COMMON_H */ |
diff --git a/drivers/infiniband/hw/ipath/ipath_cq.c b/drivers/infiniband/hw/ipath/ipath_cq.c index 7ece1135ddfe..3efee341c9bc 100644 --- a/drivers/infiniband/hw/ipath/ipath_cq.c +++ b/drivers/infiniband/hw/ipath/ipath_cq.c | |||
@@ -1,4 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2006 QLogic, Inc. All rights reserved. | ||
2 | * Copyright (c) 2005, 2006 PathScale, Inc. All rights reserved. | 3 | * Copyright (c) 2005, 2006 PathScale, Inc. All rights reserved. |
3 | * | 4 | * |
4 | * This software is available to you under a choice of one of two | 5 | * This software is available to you under a choice of one of two |
@@ -157,10 +158,21 @@ struct ib_cq *ipath_create_cq(struct ib_device *ibdev, int entries, | |||
157 | struct ib_ucontext *context, | 158 | struct ib_ucontext *context, |
158 | struct ib_udata *udata) | 159 | struct ib_udata *udata) |
159 | { | 160 | { |
161 | struct ipath_ibdev *dev = to_idev(ibdev); | ||
160 | struct ipath_cq *cq; | 162 | struct ipath_cq *cq; |
161 | struct ib_wc *wc; | 163 | struct ib_wc *wc; |
162 | struct ib_cq *ret; | 164 | struct ib_cq *ret; |
163 | 165 | ||
166 | if (entries > ib_ipath_max_cqes) { | ||
167 | ret = ERR_PTR(-EINVAL); | ||
168 | goto bail; | ||
169 | } | ||
170 | |||
171 | if (dev->n_cqs_allocated == ib_ipath_max_cqs) { | ||
172 | ret = ERR_PTR(-ENOMEM); | ||
173 | goto bail; | ||
174 | } | ||
175 | |||
164 | /* | 176 | /* |
165 | * Need to use vmalloc() if we want to support large #s of | 177 | * Need to use vmalloc() if we want to support large #s of |
166 | * entries. | 178 | * entries. |
@@ -196,6 +208,8 @@ struct ib_cq *ipath_create_cq(struct ib_device *ibdev, int entries, | |||
196 | 208 | ||
197 | ret = &cq->ibcq; | 209 | ret = &cq->ibcq; |
198 | 210 | ||
211 | dev->n_cqs_allocated++; | ||
212 | |||
199 | bail: | 213 | bail: |
200 | return ret; | 214 | return ret; |
201 | } | 215 | } |
@@ -210,9 +224,11 @@ bail: | |||
210 | */ | 224 | */ |
211 | int ipath_destroy_cq(struct ib_cq *ibcq) | 225 | int ipath_destroy_cq(struct ib_cq *ibcq) |
212 | { | 226 | { |
227 | struct ipath_ibdev *dev = to_idev(ibcq->device); | ||
213 | struct ipath_cq *cq = to_icq(ibcq); | 228 | struct ipath_cq *cq = to_icq(ibcq); |
214 | 229 | ||
215 | tasklet_kill(&cq->comptask); | 230 | tasklet_kill(&cq->comptask); |
231 | dev->n_cqs_allocated--; | ||
216 | vfree(cq->queue); | 232 | vfree(cq->queue); |
217 | kfree(cq); | 233 | kfree(cq); |
218 | 234 | ||
diff --git a/drivers/infiniband/hw/ipath/ipath_debug.h b/drivers/infiniband/hw/ipath/ipath_debug.h index 46762387f5f8..f415beda0d32 100644 --- a/drivers/infiniband/hw/ipath/ipath_debug.h +++ b/drivers/infiniband/hw/ipath/ipath_debug.h | |||
@@ -1,4 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2006 QLogic, Inc. All rights reserved. | ||
2 | * Copyright (c) 2003, 2004, 2005, 2006 PathScale, Inc. All rights reserved. | 3 | * Copyright (c) 2003, 2004, 2005, 2006 PathScale, Inc. All rights reserved. |
3 | * | 4 | * |
4 | * This software is available to you under a choice of one of two | 5 | * This software is available to you under a choice of one of two |
diff --git a/drivers/infiniband/hw/ipath/ipath_diag.c b/drivers/infiniband/hw/ipath/ipath_diag.c index 28ddceb260e8..147dd89e21c9 100644 --- a/drivers/infiniband/hw/ipath/ipath_diag.c +++ b/drivers/infiniband/hw/ipath/ipath_diag.c | |||
@@ -1,4 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2006 QLogic, Inc. All rights reserved. | ||
2 | * Copyright (c) 2003, 2004, 2005, 2006 PathScale, Inc. All rights reserved. | 3 | * Copyright (c) 2003, 2004, 2005, 2006 PathScale, Inc. All rights reserved. |
3 | * | 4 | * |
4 | * This software is available to you under a choice of one of two | 5 | * This software is available to you under a choice of one of two |
@@ -43,10 +44,9 @@ | |||
43 | #include <linux/pci.h> | 44 | #include <linux/pci.h> |
44 | #include <asm/uaccess.h> | 45 | #include <asm/uaccess.h> |
45 | 46 | ||
46 | #include "ipath_common.h" | ||
47 | #include "ipath_kernel.h" | 47 | #include "ipath_kernel.h" |
48 | #include "ips_common.h" | ||
49 | #include "ipath_layer.h" | 48 | #include "ipath_layer.h" |
49 | #include "ipath_common.h" | ||
50 | 50 | ||
51 | int ipath_diag_inuse; | 51 | int ipath_diag_inuse; |
52 | static int diag_set_link; | 52 | static int diag_set_link; |
@@ -66,18 +66,20 @@ static struct file_operations diag_file_ops = { | |||
66 | .release = ipath_diag_release | 66 | .release = ipath_diag_release |
67 | }; | 67 | }; |
68 | 68 | ||
69 | static struct cdev *diag_cdev; | 69 | int ipath_diag_add(struct ipath_devdata *dd) |
70 | static struct class_device *diag_class_dev; | ||
71 | |||
72 | int ipath_diag_init(void) | ||
73 | { | 70 | { |
74 | return ipath_cdev_init(IPATH_DIAG_MINOR, "ipath_diag", | 71 | char name[16]; |
75 | &diag_file_ops, &diag_cdev, &diag_class_dev); | 72 | |
73 | snprintf(name, sizeof(name), "ipath_diag%d", dd->ipath_unit); | ||
74 | |||
75 | return ipath_cdev_init(IPATH_DIAG_MINOR_BASE + dd->ipath_unit, name, | ||
76 | &diag_file_ops, &dd->diag_cdev, | ||
77 | &dd->diag_class_dev); | ||
76 | } | 78 | } |
77 | 79 | ||
78 | void ipath_diag_cleanup(void) | 80 | void ipath_diag_remove(struct ipath_devdata *dd) |
79 | { | 81 | { |
80 | ipath_cdev_cleanup(&diag_cdev, &diag_class_dev); | 82 | ipath_cdev_cleanup(&dd->diag_cdev, &dd->diag_class_dev); |
81 | } | 83 | } |
82 | 84 | ||
83 | /** | 85 | /** |
@@ -101,8 +103,7 @@ static int ipath_read_umem64(struct ipath_devdata *dd, void __user *uaddr, | |||
101 | int ret; | 103 | int ret; |
102 | 104 | ||
103 | /* not very efficient, but it works for now */ | 105 | /* not very efficient, but it works for now */ |
104 | if (reg_addr < dd->ipath_kregbase || | 106 | if (reg_addr < dd->ipath_kregbase || reg_end > dd->ipath_kregend) { |
105 | reg_end > dd->ipath_kregend) { | ||
106 | ret = -EINVAL; | 107 | ret = -EINVAL; |
107 | goto bail; | 108 | goto bail; |
108 | } | 109 | } |
@@ -113,7 +114,7 @@ static int ipath_read_umem64(struct ipath_devdata *dd, void __user *uaddr, | |||
113 | goto bail; | 114 | goto bail; |
114 | } | 115 | } |
115 | reg_addr++; | 116 | reg_addr++; |
116 | uaddr++; | 117 | uaddr += sizeof(u64); |
117 | } | 118 | } |
118 | ret = 0; | 119 | ret = 0; |
119 | bail: | 120 | bail: |
@@ -139,8 +140,7 @@ static int ipath_write_umem64(struct ipath_devdata *dd, void __iomem *caddr, | |||
139 | int ret; | 140 | int ret; |
140 | 141 | ||
141 | /* not very efficient, but it works for now */ | 142 | /* not very efficient, but it works for now */ |
142 | if (reg_addr < dd->ipath_kregbase || | 143 | if (reg_addr < dd->ipath_kregbase || reg_end > dd->ipath_kregend) { |
143 | reg_end > dd->ipath_kregend) { | ||
144 | ret = -EINVAL; | 144 | ret = -EINVAL; |
145 | goto bail; | 145 | goto bail; |
146 | } | 146 | } |
@@ -153,7 +153,7 @@ static int ipath_write_umem64(struct ipath_devdata *dd, void __iomem *caddr, | |||
153 | writeq(data, reg_addr); | 153 | writeq(data, reg_addr); |
154 | 154 | ||
155 | reg_addr++; | 155 | reg_addr++; |
156 | uaddr++; | 156 | uaddr += sizeof(u64); |
157 | } | 157 | } |
158 | ret = 0; | 158 | ret = 0; |
159 | bail: | 159 | bail: |
@@ -191,7 +191,8 @@ static int ipath_read_umem32(struct ipath_devdata *dd, void __user *uaddr, | |||
191 | } | 191 | } |
192 | 192 | ||
193 | reg_addr++; | 193 | reg_addr++; |
194 | uaddr++; | 194 | uaddr += sizeof(u32); |
195 | |||
195 | } | 196 | } |
196 | ret = 0; | 197 | ret = 0; |
197 | bail: | 198 | bail: |
@@ -230,7 +231,7 @@ static int ipath_write_umem32(struct ipath_devdata *dd, void __iomem *caddr, | |||
230 | writel(data, reg_addr); | 231 | writel(data, reg_addr); |
231 | 232 | ||
232 | reg_addr++; | 233 | reg_addr++; |
233 | uaddr++; | 234 | uaddr += sizeof(u32); |
234 | } | 235 | } |
235 | ret = 0; | 236 | ret = 0; |
236 | bail: | 237 | bail: |
@@ -239,59 +240,45 @@ bail: | |||
239 | 240 | ||
240 | static int ipath_diag_open(struct inode *in, struct file *fp) | 241 | static int ipath_diag_open(struct inode *in, struct file *fp) |
241 | { | 242 | { |
243 | int unit = iminor(in) - IPATH_DIAG_MINOR_BASE; | ||
242 | struct ipath_devdata *dd; | 244 | struct ipath_devdata *dd; |
243 | int unit = 0; /* XXX this is bogus */ | ||
244 | unsigned long flags; | ||
245 | int ret; | 245 | int ret; |
246 | 246 | ||
247 | dd = ipath_lookup(unit); | ||
248 | |||
249 | mutex_lock(&ipath_mutex); | 247 | mutex_lock(&ipath_mutex); |
250 | spin_lock_irqsave(&ipath_devs_lock, flags); | ||
251 | 248 | ||
252 | if (ipath_diag_inuse) { | 249 | if (ipath_diag_inuse) { |
253 | ret = -EBUSY; | 250 | ret = -EBUSY; |
254 | goto bail; | 251 | goto bail; |
255 | } | 252 | } |
256 | 253 | ||
257 | list_for_each_entry(dd, &ipath_dev_list, ipath_list) { | 254 | dd = ipath_lookup(unit); |
258 | /* | 255 | |
259 | * we need at least one infinipath device to be present | 256 | if (dd == NULL || !(dd->ipath_flags & IPATH_PRESENT) || |
260 | * (don't use INITTED, because we want to be able to open | 257 | !dd->ipath_kregbase) { |
261 | * even if device is in freeze mode, which cleared INITTED). | 258 | ret = -ENODEV; |
262 | * There is a small amount of risk to this, which is why we | ||
263 | * also verify kregbase is set. | ||
264 | */ | ||
265 | |||
266 | if (!(dd->ipath_flags & IPATH_PRESENT) || | ||
267 | !dd->ipath_kregbase) | ||
268 | continue; | ||
269 | |||
270 | ipath_diag_inuse = 1; | ||
271 | diag_set_link = 0; | ||
272 | ret = 0; | ||
273 | goto bail; | 259 | goto bail; |
274 | } | 260 | } |
275 | 261 | ||
276 | ret = -ENODEV; | 262 | fp->private_data = dd; |
277 | 263 | ipath_diag_inuse = 1; | |
278 | bail: | 264 | diag_set_link = 0; |
279 | spin_unlock_irqrestore(&ipath_devs_lock, flags); | 265 | ret = 0; |
280 | 266 | ||
281 | /* Only expose a way to reset the device if we | 267 | /* Only expose a way to reset the device if we |
282 | make it into diag mode. */ | 268 | make it into diag mode. */ |
283 | if (ret == 0) | 269 | ipath_expose_reset(&dd->pcidev->dev); |
284 | ipath_expose_reset(&dd->pcidev->dev); | ||
285 | 270 | ||
271 | bail: | ||
286 | mutex_unlock(&ipath_mutex); | 272 | mutex_unlock(&ipath_mutex); |
287 | 273 | ||
288 | return ret; | 274 | return ret; |
289 | } | 275 | } |
290 | 276 | ||
291 | static int ipath_diag_release(struct inode *i, struct file *f) | 277 | static int ipath_diag_release(struct inode *in, struct file *fp) |
292 | { | 278 | { |
293 | mutex_lock(&ipath_mutex); | 279 | mutex_lock(&ipath_mutex); |
294 | ipath_diag_inuse = 0; | 280 | ipath_diag_inuse = 0; |
281 | fp->private_data = NULL; | ||
295 | mutex_unlock(&ipath_mutex); | 282 | mutex_unlock(&ipath_mutex); |
296 | return 0; | 283 | return 0; |
297 | } | 284 | } |
@@ -299,17 +286,10 @@ static int ipath_diag_release(struct inode *i, struct file *f) | |||
299 | static ssize_t ipath_diag_read(struct file *fp, char __user *data, | 286 | static ssize_t ipath_diag_read(struct file *fp, char __user *data, |
300 | size_t count, loff_t *off) | 287 | size_t count, loff_t *off) |
301 | { | 288 | { |
302 | int unit = 0; /* XXX provide for reads on other units some day */ | 289 | struct ipath_devdata *dd = fp->private_data; |
303 | struct ipath_devdata *dd; | ||
304 | void __iomem *kreg_base; | 290 | void __iomem *kreg_base; |
305 | ssize_t ret; | 291 | ssize_t ret; |
306 | 292 | ||
307 | dd = ipath_lookup(unit); | ||
308 | if (!dd) { | ||
309 | ret = -ENODEV; | ||
310 | goto bail; | ||
311 | } | ||
312 | |||
313 | kreg_base = dd->ipath_kregbase; | 293 | kreg_base = dd->ipath_kregbase; |
314 | 294 | ||
315 | if (count == 0) | 295 | if (count == 0) |
@@ -328,23 +308,16 @@ static ssize_t ipath_diag_read(struct file *fp, char __user *data, | |||
328 | ret = count; | 308 | ret = count; |
329 | } | 309 | } |
330 | 310 | ||
331 | bail: | ||
332 | return ret; | 311 | return ret; |
333 | } | 312 | } |
334 | 313 | ||
335 | static ssize_t ipath_diag_write(struct file *fp, const char __user *data, | 314 | static ssize_t ipath_diag_write(struct file *fp, const char __user *data, |
336 | size_t count, loff_t *off) | 315 | size_t count, loff_t *off) |
337 | { | 316 | { |
338 | int unit = 0; /* XXX this is bogus */ | 317 | struct ipath_devdata *dd = fp->private_data; |
339 | struct ipath_devdata *dd; | ||
340 | void __iomem *kreg_base; | 318 | void __iomem *kreg_base; |
341 | ssize_t ret; | 319 | ssize_t ret; |
342 | 320 | ||
343 | dd = ipath_lookup(unit); | ||
344 | if (!dd) { | ||
345 | ret = -ENODEV; | ||
346 | goto bail; | ||
347 | } | ||
348 | kreg_base = dd->ipath_kregbase; | 321 | kreg_base = dd->ipath_kregbase; |
349 | 322 | ||
350 | if (count == 0) | 323 | if (count == 0) |
@@ -363,6 +336,5 @@ static ssize_t ipath_diag_write(struct file *fp, const char __user *data, | |||
363 | ret = count; | 336 | ret = count; |
364 | } | 337 | } |
365 | 338 | ||
366 | bail: | ||
367 | return ret; | 339 | return ret; |
368 | } | 340 | } |
diff --git a/drivers/infiniband/hw/ipath/ipath_driver.c b/drivers/infiniband/hw/ipath/ipath_driver.c index e4b897fa569a..823131d58b34 100644 --- a/drivers/infiniband/hw/ipath/ipath_driver.c +++ b/drivers/infiniband/hw/ipath/ipath_driver.c | |||
@@ -1,4 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2006 QLogic, Inc. All rights reserved. | ||
2 | * Copyright (c) 2003, 2004, 2005, 2006 PathScale, Inc. All rights reserved. | 3 | * Copyright (c) 2003, 2004, 2005, 2006 PathScale, Inc. All rights reserved. |
3 | * | 4 | * |
4 | * This software is available to you under a choice of one of two | 5 | * This software is available to you under a choice of one of two |
@@ -38,8 +39,8 @@ | |||
38 | #include <linux/vmalloc.h> | 39 | #include <linux/vmalloc.h> |
39 | 40 | ||
40 | #include "ipath_kernel.h" | 41 | #include "ipath_kernel.h" |
41 | #include "ips_common.h" | ||
42 | #include "ipath_layer.h" | 42 | #include "ipath_layer.h" |
43 | #include "ipath_common.h" | ||
43 | 44 | ||
44 | static void ipath_update_pio_bufs(struct ipath_devdata *); | 45 | static void ipath_update_pio_bufs(struct ipath_devdata *); |
45 | 46 | ||
@@ -52,7 +53,7 @@ const char *ipath_get_unit_name(int unit) | |||
52 | 53 | ||
53 | EXPORT_SYMBOL_GPL(ipath_get_unit_name); | 54 | EXPORT_SYMBOL_GPL(ipath_get_unit_name); |
54 | 55 | ||
55 | #define DRIVER_LOAD_MSG "PathScale " IPATH_DRV_NAME " loaded: " | 56 | #define DRIVER_LOAD_MSG "QLogic " IPATH_DRV_NAME " loaded: " |
56 | #define PFX IPATH_DRV_NAME ": " | 57 | #define PFX IPATH_DRV_NAME ": " |
57 | 58 | ||
58 | /* | 59 | /* |
@@ -74,8 +75,8 @@ MODULE_PARM_DESC(debug, "mask for debug prints"); | |||
74 | EXPORT_SYMBOL_GPL(ipath_debug); | 75 | EXPORT_SYMBOL_GPL(ipath_debug); |
75 | 76 | ||
76 | MODULE_LICENSE("GPL"); | 77 | MODULE_LICENSE("GPL"); |
77 | MODULE_AUTHOR("PathScale <support@pathscale.com>"); | 78 | MODULE_AUTHOR("QLogic <support@pathscale.com>"); |
78 | MODULE_DESCRIPTION("Pathscale InfiniPath driver"); | 79 | MODULE_DESCRIPTION("QLogic InfiniPath driver"); |
79 | 80 | ||
80 | const char *ipath_ibcstatus_str[] = { | 81 | const char *ipath_ibcstatus_str[] = { |
81 | "Disabled", | 82 | "Disabled", |
@@ -130,14 +131,6 @@ static struct pci_driver ipath_driver = { | |||
130 | .id_table = ipath_pci_tbl, | 131 | .id_table = ipath_pci_tbl, |
131 | }; | 132 | }; |
132 | 133 | ||
133 | /* | ||
134 | * This is where port 0's rcvhdrtail register is written back; we also | ||
135 | * want nothing else sharing the cache line, so make it a cache line | ||
136 | * in size. Used for all units. | ||
137 | */ | ||
138 | volatile __le64 *ipath_port0_rcvhdrtail; | ||
139 | dma_addr_t ipath_port0_rcvhdrtail_dma; | ||
140 | static int port0_rcvhdrtail_refs; | ||
141 | 134 | ||
142 | static inline void read_bars(struct ipath_devdata *dd, struct pci_dev *dev, | 135 | static inline void read_bars(struct ipath_devdata *dd, struct pci_dev *dev, |
143 | u32 *bar0, u32 *bar1) | 136 | u32 *bar0, u32 *bar1) |
@@ -170,14 +163,13 @@ static void ipath_free_devdata(struct pci_dev *pdev, | |||
170 | list_del(&dd->ipath_list); | 163 | list_del(&dd->ipath_list); |
171 | spin_unlock_irqrestore(&ipath_devs_lock, flags); | 164 | spin_unlock_irqrestore(&ipath_devs_lock, flags); |
172 | } | 165 | } |
173 | dma_free_coherent(&pdev->dev, sizeof(*dd), dd, dd->ipath_dma_addr); | 166 | vfree(dd); |
174 | } | 167 | } |
175 | 168 | ||
176 | static struct ipath_devdata *ipath_alloc_devdata(struct pci_dev *pdev) | 169 | static struct ipath_devdata *ipath_alloc_devdata(struct pci_dev *pdev) |
177 | { | 170 | { |
178 | unsigned long flags; | 171 | unsigned long flags; |
179 | struct ipath_devdata *dd; | 172 | struct ipath_devdata *dd; |
180 | dma_addr_t dma_addr; | ||
181 | int ret; | 173 | int ret; |
182 | 174 | ||
183 | if (!idr_pre_get(&unit_table, GFP_KERNEL)) { | 175 | if (!idr_pre_get(&unit_table, GFP_KERNEL)) { |
@@ -185,15 +177,12 @@ static struct ipath_devdata *ipath_alloc_devdata(struct pci_dev *pdev) | |||
185 | goto bail; | 177 | goto bail; |
186 | } | 178 | } |
187 | 179 | ||
188 | dd = dma_alloc_coherent(&pdev->dev, sizeof(*dd), &dma_addr, | 180 | dd = vmalloc(sizeof(*dd)); |
189 | GFP_KERNEL); | ||
190 | |||
191 | if (!dd) { | 181 | if (!dd) { |
192 | dd = ERR_PTR(-ENOMEM); | 182 | dd = ERR_PTR(-ENOMEM); |
193 | goto bail; | 183 | goto bail; |
194 | } | 184 | } |
195 | 185 | memset(dd, 0, sizeof(*dd)); | |
196 | dd->ipath_dma_addr = dma_addr; | ||
197 | dd->ipath_unit = -1; | 186 | dd->ipath_unit = -1; |
198 | 187 | ||
199 | spin_lock_irqsave(&ipath_devs_lock, flags); | 188 | spin_lock_irqsave(&ipath_devs_lock, flags); |
@@ -271,47 +260,6 @@ int ipath_count_units(int *npresentp, int *nupp, u32 *maxportsp) | |||
271 | return nunits; | 260 | return nunits; |
272 | } | 261 | } |
273 | 262 | ||
274 | static int init_port0_rcvhdrtail(struct pci_dev *pdev) | ||
275 | { | ||
276 | int ret; | ||
277 | |||
278 | mutex_lock(&ipath_mutex); | ||
279 | |||
280 | if (!ipath_port0_rcvhdrtail) { | ||
281 | ipath_port0_rcvhdrtail = | ||
282 | dma_alloc_coherent(&pdev->dev, | ||
283 | IPATH_PORT0_RCVHDRTAIL_SIZE, | ||
284 | &ipath_port0_rcvhdrtail_dma, | ||
285 | GFP_KERNEL); | ||
286 | |||
287 | if (!ipath_port0_rcvhdrtail) { | ||
288 | ret = -ENOMEM; | ||
289 | goto bail; | ||
290 | } | ||
291 | } | ||
292 | port0_rcvhdrtail_refs++; | ||
293 | ret = 0; | ||
294 | |||
295 | bail: | ||
296 | mutex_unlock(&ipath_mutex); | ||
297 | |||
298 | return ret; | ||
299 | } | ||
300 | |||
301 | static void cleanup_port0_rcvhdrtail(struct pci_dev *pdev) | ||
302 | { | ||
303 | mutex_lock(&ipath_mutex); | ||
304 | |||
305 | if (!--port0_rcvhdrtail_refs) { | ||
306 | dma_free_coherent(&pdev->dev, IPATH_PORT0_RCVHDRTAIL_SIZE, | ||
307 | (void *) ipath_port0_rcvhdrtail, | ||
308 | ipath_port0_rcvhdrtail_dma); | ||
309 | ipath_port0_rcvhdrtail = NULL; | ||
310 | } | ||
311 | |||
312 | mutex_unlock(&ipath_mutex); | ||
313 | } | ||
314 | |||
315 | /* | 263 | /* |
316 | * These next two routines are placeholders in case we don't have per-arch | 264 | * These next two routines are placeholders in case we don't have per-arch |
317 | * code for controlling write combining. If explicit control of write | 265 | * code for controlling write combining. If explicit control of write |
@@ -336,20 +284,12 @@ static int __devinit ipath_init_one(struct pci_dev *pdev, | |||
336 | u32 bar0 = 0, bar1 = 0; | 284 | u32 bar0 = 0, bar1 = 0; |
337 | u8 rev; | 285 | u8 rev; |
338 | 286 | ||
339 | ret = init_port0_rcvhdrtail(pdev); | ||
340 | if (ret < 0) { | ||
341 | printk(KERN_ERR IPATH_DRV_NAME | ||
342 | ": Could not allocate port0_rcvhdrtail: error %d\n", | ||
343 | -ret); | ||
344 | goto bail; | ||
345 | } | ||
346 | |||
347 | dd = ipath_alloc_devdata(pdev); | 287 | dd = ipath_alloc_devdata(pdev); |
348 | if (IS_ERR(dd)) { | 288 | if (IS_ERR(dd)) { |
349 | ret = PTR_ERR(dd); | 289 | ret = PTR_ERR(dd); |
350 | printk(KERN_ERR IPATH_DRV_NAME | 290 | printk(KERN_ERR IPATH_DRV_NAME |
351 | ": Could not allocate devdata: error %d\n", -ret); | 291 | ": Could not allocate devdata: error %d\n", -ret); |
352 | goto bail_rcvhdrtail; | 292 | goto bail; |
353 | } | 293 | } |
354 | 294 | ||
355 | ipath_cdbg(VERBOSE, "initializing unit #%u\n", dd->ipath_unit); | 295 | ipath_cdbg(VERBOSE, "initializing unit #%u\n", dd->ipath_unit); |
@@ -424,12 +364,29 @@ static int __devinit ipath_init_one(struct pci_dev *pdev, | |||
424 | */ | 364 | */ |
425 | ret = pci_set_dma_mask(pdev, DMA_32BIT_MASK); | 365 | ret = pci_set_dma_mask(pdev, DMA_32BIT_MASK); |
426 | if (ret) { | 366 | if (ret) { |
427 | dev_info(&pdev->dev, "pci_set_dma_mask unit %u " | 367 | dev_info(&pdev->dev, |
428 | "fails: %d\n", dd->ipath_unit, ret); | 368 | "Unable to set DMA mask for unit %u: %d\n", |
369 | dd->ipath_unit, ret); | ||
429 | goto bail_regions; | 370 | goto bail_regions; |
430 | } | 371 | } |
431 | else | 372 | else { |
432 | ipath_dbg("No 64bit DMA mask, used 32 bit mask\n"); | 373 | ipath_dbg("No 64bit DMA mask, used 32 bit mask\n"); |
374 | ret = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK); | ||
375 | if (ret) | ||
376 | dev_info(&pdev->dev, | ||
377 | "Unable to set DMA consistent mask " | ||
378 | "for unit %u: %d\n", | ||
379 | dd->ipath_unit, ret); | ||
380 | |||
381 | } | ||
382 | } | ||
383 | else { | ||
384 | ret = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK); | ||
385 | if (ret) | ||
386 | dev_info(&pdev->dev, | ||
387 | "Unable to set DMA consistent mask " | ||
388 | "for unit %u: %d\n", | ||
389 | dd->ipath_unit, ret); | ||
433 | } | 390 | } |
434 | 391 | ||
435 | pci_set_master(pdev); | 392 | pci_set_master(pdev); |
@@ -452,7 +409,7 @@ static int __devinit ipath_init_one(struct pci_dev *pdev, | |||
452 | ipath_init_pe800_funcs(dd); | 409 | ipath_init_pe800_funcs(dd); |
453 | break; | 410 | break; |
454 | default: | 411 | default: |
455 | ipath_dev_err(dd, "Found unknown PathScale deviceid 0x%x, " | 412 | ipath_dev_err(dd, "Found unknown QLogic deviceid 0x%x, " |
456 | "failing\n", ent->device); | 413 | "failing\n", ent->device); |
457 | return -ENODEV; | 414 | return -ENODEV; |
458 | } | 415 | } |
@@ -495,23 +452,23 @@ static int __devinit ipath_init_one(struct pci_dev *pdev, | |||
495 | ((void __iomem *)dd->ipath_kregbase + len); | 452 | ((void __iomem *)dd->ipath_kregbase + len); |
496 | dd->ipath_physaddr = addr; /* used for io_remap, etc. */ | 453 | dd->ipath_physaddr = addr; /* used for io_remap, etc. */ |
497 | /* for user mmap */ | 454 | /* for user mmap */ |
498 | dd->ipath_kregvirt = (u64 __iomem *) phys_to_virt(addr); | 455 | ipath_cdbg(VERBOSE, "mapped io addr %llx to kregbase %p\n", |
499 | ipath_cdbg(VERBOSE, "mapped io addr %llx to kregbase %p " | 456 | addr, dd->ipath_kregbase); |
500 | "kregvirt %p\n", addr, dd->ipath_kregbase, | ||
501 | dd->ipath_kregvirt); | ||
502 | 457 | ||
503 | /* | 458 | /* |
504 | * clear ipath_flags here instead of in ipath_init_chip as it is set | 459 | * clear ipath_flags here instead of in ipath_init_chip as it is set |
505 | * by ipath_setup_htconfig. | 460 | * by ipath_setup_htconfig. |
506 | */ | 461 | */ |
507 | dd->ipath_flags = 0; | 462 | dd->ipath_flags = 0; |
463 | dd->ipath_lli_counter = 0; | ||
464 | dd->ipath_lli_errors = 0; | ||
508 | 465 | ||
509 | if (dd->ipath_f_bus(dd, pdev)) | 466 | if (dd->ipath_f_bus(dd, pdev)) |
510 | ipath_dev_err(dd, "Failed to setup config space; " | 467 | ipath_dev_err(dd, "Failed to setup config space; " |
511 | "continuing anyway\n"); | 468 | "continuing anyway\n"); |
512 | 469 | ||
513 | /* | 470 | /* |
514 | * set up our interrupt handler; SA_SHIRQ probably not needed, | 471 | * set up our interrupt handler; IRQF_SHARED probably not needed, |
515 | * since MSI interrupts shouldn't be shared but won't hurt for now. | 472 | * since MSI interrupts shouldn't be shared but won't hurt for now. |
516 | * check 0 irq after we return from chip-specific bus setup, since | 473 | * check 0 irq after we return from chip-specific bus setup, since |
517 | * that can affect this due to setup | 474 | * that can affect this due to setup |
@@ -520,7 +477,7 @@ static int __devinit ipath_init_one(struct pci_dev *pdev, | |||
520 | ipath_dev_err(dd, "irq is 0, BIOS error? Interrupts won't " | 477 | ipath_dev_err(dd, "irq is 0, BIOS error? Interrupts won't " |
521 | "work\n"); | 478 | "work\n"); |
522 | else { | 479 | else { |
523 | ret = request_irq(pdev->irq, ipath_intr, SA_SHIRQ, | 480 | ret = request_irq(pdev->irq, ipath_intr, IRQF_SHARED, |
524 | IPATH_DRV_NAME, dd); | 481 | IPATH_DRV_NAME, dd); |
525 | if (ret) { | 482 | if (ret) { |
526 | ipath_dev_err(dd, "Couldn't setup irq handler, " | 483 | ipath_dev_err(dd, "Couldn't setup irq handler, " |
@@ -545,6 +502,7 @@ static int __devinit ipath_init_one(struct pci_dev *pdev, | |||
545 | ipath_device_create_group(&pdev->dev, dd); | 502 | ipath_device_create_group(&pdev->dev, dd); |
546 | ipathfs_add_device(dd); | 503 | ipathfs_add_device(dd); |
547 | ipath_user_add(dd); | 504 | ipath_user_add(dd); |
505 | ipath_diag_add(dd); | ||
548 | ipath_layer_add(dd); | 506 | ipath_layer_add(dd); |
549 | 507 | ||
550 | goto bail; | 508 | goto bail; |
@@ -561,9 +519,6 @@ bail_disable: | |||
561 | bail_devdata: | 519 | bail_devdata: |
562 | ipath_free_devdata(pdev, dd); | 520 | ipath_free_devdata(pdev, dd); |
563 | 521 | ||
564 | bail_rcvhdrtail: | ||
565 | cleanup_port0_rcvhdrtail(pdev); | ||
566 | |||
567 | bail: | 522 | bail: |
568 | return ret; | 523 | return ret; |
569 | } | 524 | } |
@@ -577,8 +532,9 @@ static void __devexit ipath_remove_one(struct pci_dev *pdev) | |||
577 | return; | 532 | return; |
578 | 533 | ||
579 | dd = pci_get_drvdata(pdev); | 534 | dd = pci_get_drvdata(pdev); |
580 | ipath_layer_del(dd); | 535 | ipath_layer_remove(dd); |
581 | ipath_user_del(dd); | 536 | ipath_diag_remove(dd); |
537 | ipath_user_remove(dd); | ||
582 | ipathfs_remove_device(dd); | 538 | ipathfs_remove_device(dd); |
583 | ipath_device_remove_group(&pdev->dev, dd); | 539 | ipath_device_remove_group(&pdev->dev, dd); |
584 | ipath_cdbg(VERBOSE, "Releasing pci memory regions, dd %p, " | 540 | ipath_cdbg(VERBOSE, "Releasing pci memory regions, dd %p, " |
@@ -594,7 +550,6 @@ static void __devexit ipath_remove_one(struct pci_dev *pdev) | |||
594 | pci_disable_device(pdev); | 550 | pci_disable_device(pdev); |
595 | 551 | ||
596 | ipath_free_devdata(pdev, dd); | 552 | ipath_free_devdata(pdev, dd); |
597 | cleanup_port0_rcvhdrtail(pdev); | ||
598 | } | 553 | } |
599 | 554 | ||
600 | /* general driver use */ | 555 | /* general driver use */ |
@@ -868,7 +823,8 @@ static void ipath_rcv_layer(struct ipath_devdata *dd, u32 etail, | |||
868 | u8 pad, *bthbytes; | 823 | u8 pad, *bthbytes; |
869 | struct sk_buff *skb, *nskb; | 824 | struct sk_buff *skb, *nskb; |
870 | 825 | ||
871 | if (dd->ipath_port0_skbs && hdr->sub_opcode == OPCODE_ENCAP) { | 826 | if (dd->ipath_port0_skbs && |
827 | hdr->sub_opcode == IPATH_ITH4X_OPCODE_ENCAP) { | ||
872 | /* | 828 | /* |
873 | * Allocate a new sk_buff to replace the one we give | 829 | * Allocate a new sk_buff to replace the one we give |
874 | * to the network stack. | 830 | * to the network stack. |
@@ -899,7 +855,7 @@ static void ipath_rcv_layer(struct ipath_devdata *dd, u32 etail, | |||
899 | /* another ether packet received */ | 855 | /* another ether packet received */ |
900 | ipath_stats.sps_ether_rpkts++; | 856 | ipath_stats.sps_ether_rpkts++; |
901 | } | 857 | } |
902 | else if (hdr->sub_opcode == OPCODE_LID_ARP) | 858 | else if (hdr->sub_opcode == IPATH_ITH4X_OPCODE_LID_ARP) |
903 | __ipath_layer_rcv_lid(dd, hdr); | 859 | __ipath_layer_rcv_lid(dd, hdr); |
904 | } | 860 | } |
905 | 861 | ||
@@ -916,8 +872,8 @@ void ipath_kreceive(struct ipath_devdata *dd) | |||
916 | const u32 rsize = dd->ipath_rcvhdrentsize; /* words */ | 872 | const u32 rsize = dd->ipath_rcvhdrentsize; /* words */ |
917 | const u32 maxcnt = dd->ipath_rcvhdrcnt * rsize; /* words */ | 873 | const u32 maxcnt = dd->ipath_rcvhdrcnt * rsize; /* words */ |
918 | u32 etail = -1, l, hdrqtail; | 874 | u32 etail = -1, l, hdrqtail; |
919 | struct ips_message_header *hdr; | 875 | struct ipath_message_header *hdr; |
920 | u32 eflags, i, etype, tlen, pkttot = 0; | 876 | u32 eflags, i, etype, tlen, pkttot = 0, updegr=0, reloop=0; |
921 | static u64 totcalls; /* stats, may eventually remove */ | 877 | static u64 totcalls; /* stats, may eventually remove */ |
922 | char emsg[128]; | 878 | char emsg[128]; |
923 | 879 | ||
@@ -931,24 +887,18 @@ void ipath_kreceive(struct ipath_devdata *dd) | |||
931 | if (test_and_set_bit(0, &dd->ipath_rcv_pending)) | 887 | if (test_and_set_bit(0, &dd->ipath_rcv_pending)) |
932 | goto bail; | 888 | goto bail; |
933 | 889 | ||
934 | if (dd->ipath_port0head == | 890 | l = dd->ipath_port0head; |
935 | (u32)le64_to_cpu(*dd->ipath_hdrqtailptr)) | 891 | hdrqtail = (u32) le64_to_cpu(*dd->ipath_hdrqtailptr); |
892 | if (l == hdrqtail) | ||
936 | goto done; | 893 | goto done; |
937 | 894 | ||
938 | gotmore: | 895 | reloop: |
939 | /* | 896 | for (i = 0; l != hdrqtail; i++) { |
940 | * read only once at start. If in flood situation, this helps | ||
941 | * performance slightly. If more arrive while we are processing, | ||
942 | * we'll come back here and do them | ||
943 | */ | ||
944 | hdrqtail = (u32)le64_to_cpu(*dd->ipath_hdrqtailptr); | ||
945 | |||
946 | for (i = 0, l = dd->ipath_port0head; l != hdrqtail; i++) { | ||
947 | u32 qp; | 897 | u32 qp; |
948 | u8 *bthbytes; | 898 | u8 *bthbytes; |
949 | 899 | ||
950 | rc = (u64 *) (dd->ipath_pd[0]->port_rcvhdrq + (l << 2)); | 900 | rc = (u64 *) (dd->ipath_pd[0]->port_rcvhdrq + (l << 2)); |
951 | hdr = (struct ips_message_header *)&rc[1]; | 901 | hdr = (struct ipath_message_header *)&rc[1]; |
952 | /* | 902 | /* |
953 | * could make a network order version of IPATH_KD_QP, and | 903 | * could make a network order version of IPATH_KD_QP, and |
954 | * do the obvious shift before masking to speed this up. | 904 | * do the obvious shift before masking to speed this up. |
@@ -956,10 +906,10 @@ gotmore: | |||
956 | qp = ntohl(hdr->bth[1]) & 0xffffff; | 906 | qp = ntohl(hdr->bth[1]) & 0xffffff; |
957 | bthbytes = (u8 *) hdr->bth; | 907 | bthbytes = (u8 *) hdr->bth; |
958 | 908 | ||
959 | eflags = ips_get_hdr_err_flags((__le32 *) rc); | 909 | eflags = ipath_hdrget_err_flags((__le32 *) rc); |
960 | etype = ips_get_rcv_type((__le32 *) rc); | 910 | etype = ipath_hdrget_rcv_type((__le32 *) rc); |
961 | /* total length */ | 911 | /* total length */ |
962 | tlen = ips_get_length_in_bytes((__le32 *) rc); | 912 | tlen = ipath_hdrget_length_in_bytes((__le32 *) rc); |
963 | ebuf = NULL; | 913 | ebuf = NULL; |
964 | if (etype != RCVHQ_RCV_TYPE_EXPECTED) { | 914 | if (etype != RCVHQ_RCV_TYPE_EXPECTED) { |
965 | /* | 915 | /* |
@@ -969,7 +919,7 @@ gotmore: | |||
969 | * set ebuf (so we try to copy data) unless the | 919 | * set ebuf (so we try to copy data) unless the |
970 | * length requires it. | 920 | * length requires it. |
971 | */ | 921 | */ |
972 | etail = ips_get_index((__le32 *) rc); | 922 | etail = ipath_hdrget_index((__le32 *) rc); |
973 | if (tlen > sizeof(*hdr) || | 923 | if (tlen > sizeof(*hdr) || |
974 | etype == RCVHQ_RCV_TYPE_NON_KD) | 924 | etype == RCVHQ_RCV_TYPE_NON_KD) |
975 | ebuf = ipath_get_egrbuf(dd, etail, 0); | 925 | ebuf = ipath_get_egrbuf(dd, etail, 0); |
@@ -981,7 +931,7 @@ gotmore: | |||
981 | */ | 931 | */ |
982 | 932 | ||
983 | if (etype != RCVHQ_RCV_TYPE_NON_KD && etype != | 933 | if (etype != RCVHQ_RCV_TYPE_NON_KD && etype != |
984 | RCVHQ_RCV_TYPE_ERROR && ips_get_ipath_ver( | 934 | RCVHQ_RCV_TYPE_ERROR && ipath_hdrget_ipath_ver( |
985 | hdr->iph.ver_port_tid_offset) != | 935 | hdr->iph.ver_port_tid_offset) != |
986 | IPS_PROTO_VERSION) { | 936 | IPS_PROTO_VERSION) { |
987 | ipath_cdbg(PKT, "Bad InfiniPath protocol version " | 937 | ipath_cdbg(PKT, "Bad InfiniPath protocol version " |
@@ -994,7 +944,19 @@ gotmore: | |||
994 | ipath_cdbg(PKT, "RHFerrs %x hdrqtail=%x typ=%u " | 944 | ipath_cdbg(PKT, "RHFerrs %x hdrqtail=%x typ=%u " |
995 | "tlen=%x opcode=%x egridx=%x: %s\n", | 945 | "tlen=%x opcode=%x egridx=%x: %s\n", |
996 | eflags, l, etype, tlen, bthbytes[0], | 946 | eflags, l, etype, tlen, bthbytes[0], |
997 | ips_get_index((__le32 *) rc), emsg); | 947 | ipath_hdrget_index((__le32 *) rc), emsg); |
948 | /* Count local link integrity errors. */ | ||
949 | if (eflags & (INFINIPATH_RHF_H_ICRCERR | | ||
950 | INFINIPATH_RHF_H_VCRCERR)) { | ||
951 | u8 n = (dd->ipath_ibcctrl >> | ||
952 | INFINIPATH_IBCC_PHYERRTHRESHOLD_SHIFT) & | ||
953 | INFINIPATH_IBCC_PHYERRTHRESHOLD_MASK; | ||
954 | |||
955 | if (++dd->ipath_lli_counter > n) { | ||
956 | dd->ipath_lli_counter = 0; | ||
957 | dd->ipath_lli_errors++; | ||
958 | } | ||
959 | } | ||
998 | } else if (etype == RCVHQ_RCV_TYPE_NON_KD) { | 960 | } else if (etype == RCVHQ_RCV_TYPE_NON_KD) { |
999 | int ret = __ipath_verbs_rcv(dd, rc + 1, | 961 | int ret = __ipath_verbs_rcv(dd, rc + 1, |
1000 | ebuf, tlen); | 962 | ebuf, tlen); |
@@ -1002,6 +964,9 @@ gotmore: | |||
1002 | ipath_cdbg(VERBOSE, | 964 | ipath_cdbg(VERBOSE, |
1003 | "received IB packet, " | 965 | "received IB packet, " |
1004 | "not SMA (QP=%x)\n", qp); | 966 | "not SMA (QP=%x)\n", qp); |
967 | if (dd->ipath_lli_counter) | ||
968 | dd->ipath_lli_counter--; | ||
969 | |||
1005 | } else if (etype == RCVHQ_RCV_TYPE_EAGER) { | 970 | } else if (etype == RCVHQ_RCV_TYPE_EAGER) { |
1006 | if (qp == IPATH_KD_QP && | 971 | if (qp == IPATH_KD_QP && |
1007 | bthbytes[0] == ipath_layer_rcv_opcode && | 972 | bthbytes[0] == ipath_layer_rcv_opcode && |
@@ -1054,25 +1019,49 @@ gotmore: | |||
1054 | l += rsize; | 1019 | l += rsize; |
1055 | if (l >= maxcnt) | 1020 | if (l >= maxcnt) |
1056 | l = 0; | 1021 | l = 0; |
1022 | if (etype != RCVHQ_RCV_TYPE_EXPECTED) | ||
1023 | updegr = 1; | ||
1057 | /* | 1024 | /* |
1058 | * update for each packet, to help prevent overflows if we | 1025 | * update head regs on last packet, and every 16 packets. |
1059 | * have lots of packets. | 1026 | * Reduce bus traffic, while still trying to prevent |
1027 | * rcvhdrq overflows, for when the queue is nearly full | ||
1060 | */ | 1028 | */ |
1061 | (void)ipath_write_ureg(dd, ur_rcvhdrhead, | 1029 | if (l == hdrqtail || (i && !(i&0xf))) { |
1062 | dd->ipath_rhdrhead_intr_off | l, 0); | 1030 | u64 lval; |
1063 | if (etype != RCVHQ_RCV_TYPE_EXPECTED) | 1031 | if (l == hdrqtail) /* PE-800 interrupt only on last */ |
1064 | (void)ipath_write_ureg(dd, ur_rcvegrindexhead, | 1032 | lval = dd->ipath_rhdrhead_intr_off | l; |
1065 | etail, 0); | 1033 | else |
1034 | lval = l; | ||
1035 | (void)ipath_write_ureg(dd, ur_rcvhdrhead, lval, 0); | ||
1036 | if (updegr) { | ||
1037 | (void)ipath_write_ureg(dd, ur_rcvegrindexhead, | ||
1038 | etail, 0); | ||
1039 | updegr = 0; | ||
1040 | } | ||
1041 | } | ||
1042 | } | ||
1043 | |||
1044 | if (!dd->ipath_rhdrhead_intr_off && !reloop) { | ||
1045 | /* HT-400 workaround; we can have a race clearing chip | ||
1046 | * interrupt with another interrupt about to be delivered, | ||
1047 | * and can clear it before it is delivered on the GPIO | ||
1048 | * workaround. By doing the extra check here for the | ||
1049 | * in-memory tail register updating while we were doing | ||
1050 | * earlier packets, we "almost" guarantee we have covered | ||
1051 | * that case. | ||
1052 | */ | ||
1053 | u32 hqtail = (u32)le64_to_cpu(*dd->ipath_hdrqtailptr); | ||
1054 | if (hqtail != hdrqtail) { | ||
1055 | hdrqtail = hqtail; | ||
1056 | reloop = 1; /* loop 1 extra time at most */ | ||
1057 | goto reloop; | ||
1058 | } | ||
1066 | } | 1059 | } |
1067 | 1060 | ||
1068 | pkttot += i; | 1061 | pkttot += i; |
1069 | 1062 | ||
1070 | dd->ipath_port0head = l; | 1063 | dd->ipath_port0head = l; |
1071 | 1064 | ||
1072 | if (hdrqtail != (u32)le64_to_cpu(*dd->ipath_hdrqtailptr)) | ||
1073 | /* more arrived while we handled first batch */ | ||
1074 | goto gotmore; | ||
1075 | |||
1076 | if (pkttot > ipath_stats.sps_maxpkts_call) | 1065 | if (pkttot > ipath_stats.sps_maxpkts_call) |
1077 | ipath_stats.sps_maxpkts_call = pkttot; | 1066 | ipath_stats.sps_maxpkts_call = pkttot; |
1078 | ipath_stats.sps_port0pkts += pkttot; | 1067 | ipath_stats.sps_port0pkts += pkttot; |
@@ -1369,26 +1358,20 @@ bail: | |||
1369 | * @dd: the infinipath device | 1358 | * @dd: the infinipath device |
1370 | * @pd: the port data | 1359 | * @pd: the port data |
1371 | * | 1360 | * |
1372 | * this *must* be physically contiguous memory, and for now, | 1361 | * this must be contiguous memory (from an i/o perspective), and must be |
1373 | * that limits it to what kmalloc can do. | 1362 | * DMA'able (which means for some systems, it will go through an IOMMU, |
1363 | * or be forced into a low address range). | ||
1374 | */ | 1364 | */ |
1375 | int ipath_create_rcvhdrq(struct ipath_devdata *dd, | 1365 | int ipath_create_rcvhdrq(struct ipath_devdata *dd, |
1376 | struct ipath_portdata *pd) | 1366 | struct ipath_portdata *pd) |
1377 | { | 1367 | { |
1378 | int ret = 0, amt; | 1368 | int ret = 0; |
1379 | 1369 | ||
1380 | amt = ALIGN(dd->ipath_rcvhdrcnt * dd->ipath_rcvhdrentsize * | ||
1381 | sizeof(u32), PAGE_SIZE); | ||
1382 | if (!pd->port_rcvhdrq) { | 1370 | if (!pd->port_rcvhdrq) { |
1383 | /* | 1371 | dma_addr_t phys_hdrqtail; |
1384 | * not using REPEAT isn't viable; at 128KB, we can easily | ||
1385 | * fail this. The problem with REPEAT is we can block here | ||
1386 | * "forever". There isn't an inbetween, unfortunately. We | ||
1387 | * could reduce the risk by never freeing the rcvhdrq except | ||
1388 | * at unload, but even then, the first time a port is used, | ||
1389 | * we could delay for some time... | ||
1390 | */ | ||
1391 | gfp_t gfp_flags = GFP_USER | __GFP_COMP; | 1372 | gfp_t gfp_flags = GFP_USER | __GFP_COMP; |
1373 | int amt = ALIGN(dd->ipath_rcvhdrcnt * dd->ipath_rcvhdrentsize * | ||
1374 | sizeof(u32), PAGE_SIZE); | ||
1392 | 1375 | ||
1393 | pd->port_rcvhdrq = dma_alloc_coherent( | 1376 | pd->port_rcvhdrq = dma_alloc_coherent( |
1394 | &dd->pcidev->dev, amt, &pd->port_rcvhdrq_phys, | 1377 | &dd->pcidev->dev, amt, &pd->port_rcvhdrq_phys, |
@@ -1401,6 +1384,16 @@ int ipath_create_rcvhdrq(struct ipath_devdata *dd, | |||
1401 | ret = -ENOMEM; | 1384 | ret = -ENOMEM; |
1402 | goto bail; | 1385 | goto bail; |
1403 | } | 1386 | } |
1387 | pd->port_rcvhdrtail_kvaddr = dma_alloc_coherent( | ||
1388 | &dd->pcidev->dev, PAGE_SIZE, &phys_hdrqtail, GFP_KERNEL); | ||
1389 | if (!pd->port_rcvhdrtail_kvaddr) { | ||
1390 | ipath_dev_err(dd, "attempt to allocate 1 page " | ||
1391 | "for port %u rcvhdrqtailaddr failed\n", | ||
1392 | pd->port_port); | ||
1393 | ret = -ENOMEM; | ||
1394 | goto bail; | ||
1395 | } | ||
1396 | pd->port_rcvhdrqtailaddr_phys = phys_hdrqtail; | ||
1404 | 1397 | ||
1405 | pd->port_rcvhdrq_size = amt; | 1398 | pd->port_rcvhdrq_size = amt; |
1406 | 1399 | ||
@@ -1410,20 +1403,28 @@ int ipath_create_rcvhdrq(struct ipath_devdata *dd, | |||
1410 | (unsigned long) pd->port_rcvhdrq_phys, | 1403 | (unsigned long) pd->port_rcvhdrq_phys, |
1411 | (unsigned long) pd->port_rcvhdrq_size, | 1404 | (unsigned long) pd->port_rcvhdrq_size, |
1412 | pd->port_port); | 1405 | pd->port_port); |
1413 | } else { | 1406 | |
1414 | /* | 1407 | ipath_cdbg(VERBOSE, "port %d hdrtailaddr, %llx physical\n", |
1415 | * clear for security, sanity, and/or debugging, each | 1408 | pd->port_port, |
1416 | * time we reuse | 1409 | (unsigned long long) phys_hdrqtail); |
1417 | */ | ||
1418 | memset(pd->port_rcvhdrq, 0, amt); | ||
1419 | } | 1410 | } |
1411 | else | ||
1412 | ipath_cdbg(VERBOSE, "reuse port %d rcvhdrq @%p %llx phys; " | ||
1413 | "hdrtailaddr@%p %llx physical\n", | ||
1414 | pd->port_port, pd->port_rcvhdrq, | ||
1415 | pd->port_rcvhdrq_phys, pd->port_rcvhdrtail_kvaddr, | ||
1416 | (unsigned long long)pd->port_rcvhdrqtailaddr_phys); | ||
1417 | |||
1418 | /* clear for security and sanity on each use */ | ||
1419 | memset(pd->port_rcvhdrq, 0, pd->port_rcvhdrq_size); | ||
1420 | memset((void *)pd->port_rcvhdrtail_kvaddr, 0, PAGE_SIZE); | ||
1420 | 1421 | ||
1421 | /* | 1422 | /* |
1422 | * tell chip each time we init it, even if we are re-using previous | 1423 | * tell chip each time we init it, even if we are re-using previous |
1423 | * memory (we zero it at process close) | 1424 | * memory (we zero the register at process close) |
1424 | */ | 1425 | */ |
1425 | ipath_cdbg(VERBOSE, "writing port %d rcvhdraddr as %lx\n", | 1426 | ipath_write_kreg_port(dd, dd->ipath_kregs->kr_rcvhdrtailaddr, |
1426 | pd->port_port, (unsigned long) pd->port_rcvhdrq_phys); | 1427 | pd->port_port, pd->port_rcvhdrqtailaddr_phys); |
1427 | ipath_write_kreg_port(dd, dd->ipath_kregs->kr_rcvhdraddr, | 1428 | ipath_write_kreg_port(dd, dd->ipath_kregs->kr_rcvhdraddr, |
1428 | pd->port_port, pd->port_rcvhdrq_phys); | 1429 | pd->port_port, pd->port_rcvhdrq_phys); |
1429 | 1430 | ||
@@ -1511,15 +1512,27 @@ void ipath_set_ib_lstate(struct ipath_devdata *dd, int which) | |||
1511 | [INFINIPATH_IBCC_LINKCMD_ARMED] = "ARMED", | 1512 | [INFINIPATH_IBCC_LINKCMD_ARMED] = "ARMED", |
1512 | [INFINIPATH_IBCC_LINKCMD_ACTIVE] = "ACTIVE" | 1513 | [INFINIPATH_IBCC_LINKCMD_ACTIVE] = "ACTIVE" |
1513 | }; | 1514 | }; |
1515 | int linkcmd = (which >> INFINIPATH_IBCC_LINKCMD_SHIFT) & | ||
1516 | INFINIPATH_IBCC_LINKCMD_MASK; | ||
1517 | |||
1514 | ipath_cdbg(SMA, "Trying to move unit %u to %s, current ltstate " | 1518 | ipath_cdbg(SMA, "Trying to move unit %u to %s, current ltstate " |
1515 | "is %s\n", dd->ipath_unit, | 1519 | "is %s\n", dd->ipath_unit, |
1516 | what[(which >> INFINIPATH_IBCC_LINKCMD_SHIFT) & | 1520 | what[linkcmd], |
1517 | INFINIPATH_IBCC_LINKCMD_MASK], | ||
1518 | ipath_ibcstatus_str[ | 1521 | ipath_ibcstatus_str[ |
1519 | (ipath_read_kreg64 | 1522 | (ipath_read_kreg64 |
1520 | (dd, dd->ipath_kregs->kr_ibcstatus) >> | 1523 | (dd, dd->ipath_kregs->kr_ibcstatus) >> |
1521 | INFINIPATH_IBCS_LINKTRAININGSTATE_SHIFT) & | 1524 | INFINIPATH_IBCS_LINKTRAININGSTATE_SHIFT) & |
1522 | INFINIPATH_IBCS_LINKTRAININGSTATE_MASK]); | 1525 | INFINIPATH_IBCS_LINKTRAININGSTATE_MASK]); |
1526 | /* flush all queued sends when going to DOWN or INIT, to be sure that | ||
1527 | * they don't block SMA and other MAD packets */ | ||
1528 | if (!linkcmd || linkcmd == INFINIPATH_IBCC_LINKCMD_INIT) { | ||
1529 | ipath_write_kreg(dd, dd->ipath_kregs->kr_sendctrl, | ||
1530 | INFINIPATH_S_ABORT); | ||
1531 | ipath_disarm_piobufs(dd, dd->ipath_lastport_piobuf, | ||
1532 | (unsigned)(dd->ipath_piobcnt2k + | ||
1533 | dd->ipath_piobcnt4k) - | ||
1534 | dd->ipath_lastport_piobuf); | ||
1535 | } | ||
1523 | 1536 | ||
1524 | ipath_write_kreg(dd, dd->ipath_kregs->kr_ibcctrl, | 1537 | ipath_write_kreg(dd, dd->ipath_kregs->kr_ibcctrl, |
1525 | dd->ipath_ibcctrl | which); | 1538 | dd->ipath_ibcctrl | which); |
@@ -1638,7 +1651,7 @@ void ipath_shutdown_device(struct ipath_devdata *dd) | |||
1638 | /* disable IBC */ | 1651 | /* disable IBC */ |
1639 | dd->ipath_control &= ~INFINIPATH_C_LINKENABLE; | 1652 | dd->ipath_control &= ~INFINIPATH_C_LINKENABLE; |
1640 | ipath_write_kreg(dd, dd->ipath_kregs->kr_control, | 1653 | ipath_write_kreg(dd, dd->ipath_kregs->kr_control, |
1641 | dd->ipath_control); | 1654 | dd->ipath_control | INFINIPATH_C_FREEZEMODE); |
1642 | 1655 | ||
1643 | /* | 1656 | /* |
1644 | * clear SerdesEnable and turn the leds off; do this here because | 1657 | * clear SerdesEnable and turn the leds off; do this here because |
@@ -1667,60 +1680,54 @@ void ipath_shutdown_device(struct ipath_devdata *dd) | |||
1667 | /** | 1680 | /** |
1668 | * ipath_free_pddata - free a port's allocated data | 1681 | * ipath_free_pddata - free a port's allocated data |
1669 | * @dd: the infinipath device | 1682 | * @dd: the infinipath device |
1670 | * @port: the port | 1683 | * @pd: the portdata structure |
1671 | * @freehdrq: free the port data structure if true | ||
1672 | * | 1684 | * |
1673 | * when closing, free up any allocated data for a port, if the | 1685 | * free up any allocated data for a port |
1674 | * reference count goes to zero | 1686 | * This should not touch anything that would affect a simultaneous |
1675 | * Note: this also optionally frees the portdata itself! | 1687 | * re-allocation of port data, because it is called after ipath_mutex |
1676 | * Any changes here have to be matched up with the reinit case | 1688 | * is released (and can be called from reinit as well). |
1677 | * of ipath_init_chip(), which calls this routine on reinit after reset. | 1689 | * It should never change any chip state, or global driver state. |
1690 | * (The only exception to global state is freeing the port0 port0_skbs.) | ||
1678 | */ | 1691 | */ |
1679 | void ipath_free_pddata(struct ipath_devdata *dd, u32 port, int freehdrq) | 1692 | void ipath_free_pddata(struct ipath_devdata *dd, struct ipath_portdata *pd) |
1680 | { | 1693 | { |
1681 | struct ipath_portdata *pd = dd->ipath_pd[port]; | ||
1682 | |||
1683 | if (!pd) | 1694 | if (!pd) |
1684 | return; | 1695 | return; |
1685 | if (freehdrq) | 1696 | |
1686 | /* | 1697 | if (pd->port_rcvhdrq) { |
1687 | * only clear and free portdata if we are going to also | ||
1688 | * release the hdrq, otherwise we leak the hdrq on each | ||
1689 | * open/close cycle | ||
1690 | */ | ||
1691 | dd->ipath_pd[port] = NULL; | ||
1692 | if (freehdrq && pd->port_rcvhdrq) { | ||
1693 | ipath_cdbg(VERBOSE, "free closed port %d rcvhdrq @ %p " | 1698 | ipath_cdbg(VERBOSE, "free closed port %d rcvhdrq @ %p " |
1694 | "(size=%lu)\n", pd->port_port, pd->port_rcvhdrq, | 1699 | "(size=%lu)\n", pd->port_port, pd->port_rcvhdrq, |
1695 | (unsigned long) pd->port_rcvhdrq_size); | 1700 | (unsigned long) pd->port_rcvhdrq_size); |
1696 | dma_free_coherent(&dd->pcidev->dev, pd->port_rcvhdrq_size, | 1701 | dma_free_coherent(&dd->pcidev->dev, pd->port_rcvhdrq_size, |
1697 | pd->port_rcvhdrq, pd->port_rcvhdrq_phys); | 1702 | pd->port_rcvhdrq, pd->port_rcvhdrq_phys); |
1698 | pd->port_rcvhdrq = NULL; | 1703 | pd->port_rcvhdrq = NULL; |
1704 | if (pd->port_rcvhdrtail_kvaddr) { | ||
1705 | dma_free_coherent(&dd->pcidev->dev, PAGE_SIZE, | ||
1706 | (void *)pd->port_rcvhdrtail_kvaddr, | ||
1707 | pd->port_rcvhdrqtailaddr_phys); | ||
1708 | pd->port_rcvhdrtail_kvaddr = NULL; | ||
1709 | } | ||
1699 | } | 1710 | } |
1700 | if (port && pd->port_rcvegrbuf) { | 1711 | if (pd->port_port && pd->port_rcvegrbuf) { |
1701 | /* always free this */ | 1712 | unsigned e; |
1702 | if (pd->port_rcvegrbuf) { | 1713 | |
1703 | unsigned e; | 1714 | for (e = 0; e < pd->port_rcvegrbuf_chunks; e++) { |
1704 | 1715 | void *base = pd->port_rcvegrbuf[e]; | |
1705 | for (e = 0; e < pd->port_rcvegrbuf_chunks; e++) { | 1716 | size_t size = pd->port_rcvegrbuf_size; |
1706 | void *base = pd->port_rcvegrbuf[e]; | 1717 | |
1707 | size_t size = pd->port_rcvegrbuf_size; | 1718 | ipath_cdbg(VERBOSE, "egrbuf free(%p, %lu), " |
1708 | 1719 | "chunk %u/%u\n", base, | |
1709 | ipath_cdbg(VERBOSE, "egrbuf free(%p, %lu), " | 1720 | (unsigned long) size, |
1710 | "chunk %u/%u\n", base, | 1721 | e, pd->port_rcvegrbuf_chunks); |
1711 | (unsigned long) size, | 1722 | dma_free_coherent(&dd->pcidev->dev, size, |
1712 | e, pd->port_rcvegrbuf_chunks); | 1723 | base, pd->port_rcvegrbuf_phys[e]); |
1713 | dma_free_coherent( | ||
1714 | &dd->pcidev->dev, size, base, | ||
1715 | pd->port_rcvegrbuf_phys[e]); | ||
1716 | } | ||
1717 | vfree(pd->port_rcvegrbuf); | ||
1718 | pd->port_rcvegrbuf = NULL; | ||
1719 | vfree(pd->port_rcvegrbuf_phys); | ||
1720 | pd->port_rcvegrbuf_phys = NULL; | ||
1721 | } | 1724 | } |
1725 | vfree(pd->port_rcvegrbuf); | ||
1726 | pd->port_rcvegrbuf = NULL; | ||
1727 | vfree(pd->port_rcvegrbuf_phys); | ||
1728 | pd->port_rcvegrbuf_phys = NULL; | ||
1722 | pd->port_rcvegrbuf_chunks = 0; | 1729 | pd->port_rcvegrbuf_chunks = 0; |
1723 | } else if (port == 0 && dd->ipath_port0_skbs) { | 1730 | } else if (pd->port_port == 0 && dd->ipath_port0_skbs) { |
1724 | unsigned e; | 1731 | unsigned e; |
1725 | struct sk_buff **skbs = dd->ipath_port0_skbs; | 1732 | struct sk_buff **skbs = dd->ipath_port0_skbs; |
1726 | 1733 | ||
@@ -1732,10 +1739,8 @@ void ipath_free_pddata(struct ipath_devdata *dd, u32 port, int freehdrq) | |||
1732 | dev_kfree_skb(skbs[e]); | 1739 | dev_kfree_skb(skbs[e]); |
1733 | vfree(skbs); | 1740 | vfree(skbs); |
1734 | } | 1741 | } |
1735 | if (freehdrq) { | 1742 | kfree(pd->port_tid_pg_list); |
1736 | kfree(pd->port_tid_pg_list); | 1743 | kfree(pd); |
1737 | kfree(pd); | ||
1738 | } | ||
1739 | } | 1744 | } |
1740 | 1745 | ||
1741 | static int __init infinipath_init(void) | 1746 | static int __init infinipath_init(void) |
@@ -1806,7 +1811,6 @@ static void cleanup_device(struct ipath_devdata *dd) | |||
1806 | * re-init | 1811 | * re-init |
1807 | */ | 1812 | */ |
1808 | dd->ipath_kregbase = NULL; | 1813 | dd->ipath_kregbase = NULL; |
1809 | dd->ipath_kregvirt = NULL; | ||
1810 | dd->ipath_uregbase = 0; | 1814 | dd->ipath_uregbase = 0; |
1811 | dd->ipath_sregbase = 0; | 1815 | dd->ipath_sregbase = 0; |
1812 | dd->ipath_cregbase = 0; | 1816 | dd->ipath_cregbase = 0; |
@@ -1821,6 +1825,12 @@ static void cleanup_device(struct ipath_devdata *dd) | |||
1821 | dd->ipath_pioavailregs_phys); | 1825 | dd->ipath_pioavailregs_phys); |
1822 | dd->ipath_pioavailregs_dma = NULL; | 1826 | dd->ipath_pioavailregs_dma = NULL; |
1823 | } | 1827 | } |
1828 | if (dd->ipath_dummy_hdrq) { | ||
1829 | dma_free_coherent(&dd->pcidev->dev, | ||
1830 | dd->ipath_pd[0]->port_rcvhdrq_size, | ||
1831 | dd->ipath_dummy_hdrq, dd->ipath_dummy_hdrq_phys); | ||
1832 | dd->ipath_dummy_hdrq = NULL; | ||
1833 | } | ||
1824 | 1834 | ||
1825 | if (dd->ipath_pageshadow) { | 1835 | if (dd->ipath_pageshadow) { |
1826 | struct page **tmpp = dd->ipath_pageshadow; | 1836 | struct page **tmpp = dd->ipath_pageshadow; |
@@ -1861,10 +1871,14 @@ static void cleanup_device(struct ipath_devdata *dd) | |||
1861 | 1871 | ||
1862 | /* | 1872 | /* |
1863 | * free any resources still in use (usually just kernel ports) | 1873 | * free any resources still in use (usually just kernel ports) |
1864 | * at unload | 1874 | * at unload; we do for portcnt, not cfgports, because cfgports |
1875 | * could have changed while we were loaded. | ||
1865 | */ | 1876 | */ |
1866 | for (port = 0; port < dd->ipath_cfgports; port++) | 1877 | for (port = 0; port < dd->ipath_portcnt; port++) { |
1867 | ipath_free_pddata(dd, port, 1); | 1878 | struct ipath_portdata *pd = dd->ipath_pd[port]; |
1879 | dd->ipath_pd[port] = NULL; | ||
1880 | ipath_free_pddata(dd, pd); | ||
1881 | } | ||
1868 | kfree(dd->ipath_pd); | 1882 | kfree(dd->ipath_pd); |
1869 | /* | 1883 | /* |
1870 | * debuggability, in case some cleanup path tries to use it | 1884 | * debuggability, in case some cleanup path tries to use it |
diff --git a/drivers/infiniband/hw/ipath/ipath_eeprom.c b/drivers/infiniband/hw/ipath/ipath_eeprom.c index a2f1ceafcca9..3313356ab93a 100644 --- a/drivers/infiniband/hw/ipath/ipath_eeprom.c +++ b/drivers/infiniband/hw/ipath/ipath_eeprom.c | |||
@@ -1,4 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2006 QLogic, Inc. All rights reserved. | ||
2 | * Copyright (c) 2003, 2004, 2005, 2006 PathScale, Inc. All rights reserved. | 3 | * Copyright (c) 2003, 2004, 2005, 2006 PathScale, Inc. All rights reserved. |
3 | * | 4 | * |
4 | * This software is available to you under a choice of one of two | 5 | * This software is available to you under a choice of one of two |
@@ -600,8 +601,31 @@ void ipath_get_eeprom_info(struct ipath_devdata *dd) | |||
600 | guid = *(__be64 *) ifp->if_guid; | 601 | guid = *(__be64 *) ifp->if_guid; |
601 | dd->ipath_guid = guid; | 602 | dd->ipath_guid = guid; |
602 | dd->ipath_nguid = ifp->if_numguid; | 603 | dd->ipath_nguid = ifp->if_numguid; |
603 | memcpy(dd->ipath_serial, ifp->if_serial, | 604 | /* |
604 | sizeof(ifp->if_serial)); | 605 | * Things are slightly complicated by the desire to transparently |
606 | * support both the Pathscale 10-digit serial number and the QLogic | ||
607 | * 13-character version. | ||
608 | */ | ||
609 | if ((ifp->if_fversion > 1) && ifp->if_sprefix[0] | ||
610 | && ((u8 *)ifp->if_sprefix)[0] != 0xFF) { | ||
611 | /* This board has a Serial-prefix, which is stored | ||
612 | * elsewhere for backward-compatibility. | ||
613 | */ | ||
614 | char *snp = dd->ipath_serial; | ||
615 | int len; | ||
616 | memcpy(snp, ifp->if_sprefix, sizeof ifp->if_sprefix); | ||
617 | snp[sizeof ifp->if_sprefix] = '\0'; | ||
618 | len = strlen(snp); | ||
619 | snp += len; | ||
620 | len = (sizeof dd->ipath_serial) - len; | ||
621 | if (len > sizeof ifp->if_serial) { | ||
622 | len = sizeof ifp->if_serial; | ||
623 | } | ||
624 | memcpy(snp, ifp->if_serial, len); | ||
625 | } else | ||
626 | memcpy(dd->ipath_serial, ifp->if_serial, | ||
627 | sizeof ifp->if_serial); | ||
628 | |||
605 | ipath_cdbg(VERBOSE, "Initted GUID to %llx from eeprom\n", | 629 | ipath_cdbg(VERBOSE, "Initted GUID to %llx from eeprom\n", |
606 | (unsigned long long) be64_to_cpu(dd->ipath_guid)); | 630 | (unsigned long long) be64_to_cpu(dd->ipath_guid)); |
607 | 631 | ||
diff --git a/drivers/infiniband/hw/ipath/ipath_file_ops.c b/drivers/infiniband/hw/ipath/ipath_file_ops.c index ada267e41f6c..bbaa70e57db1 100644 --- a/drivers/infiniband/hw/ipath/ipath_file_ops.c +++ b/drivers/infiniband/hw/ipath/ipath_file_ops.c | |||
@@ -1,4 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2006 QLogic, Inc. All rights reserved. | ||
2 | * Copyright (c) 2003, 2004, 2005, 2006 PathScale, Inc. All rights reserved. | 3 | * Copyright (c) 2003, 2004, 2005, 2006 PathScale, Inc. All rights reserved. |
3 | * | 4 | * |
4 | * This software is available to you under a choice of one of two | 5 | * This software is available to you under a choice of one of two |
@@ -38,8 +39,8 @@ | |||
38 | #include <asm/pgtable.h> | 39 | #include <asm/pgtable.h> |
39 | 40 | ||
40 | #include "ipath_kernel.h" | 41 | #include "ipath_kernel.h" |
41 | #include "ips_common.h" | ||
42 | #include "ipath_layer.h" | 42 | #include "ipath_layer.h" |
43 | #include "ipath_common.h" | ||
43 | 44 | ||
44 | static int ipath_open(struct inode *, struct file *); | 45 | static int ipath_open(struct inode *, struct file *); |
45 | static int ipath_close(struct inode *, struct file *); | 46 | static int ipath_close(struct inode *, struct file *); |
@@ -122,6 +123,7 @@ static int ipath_get_base_info(struct ipath_portdata *pd, | |||
122 | * on to yet another method of dealing with this | 123 | * on to yet another method of dealing with this |
123 | */ | 124 | */ |
124 | kinfo->spi_rcvhdr_base = (u64) pd->port_rcvhdrq_phys; | 125 | kinfo->spi_rcvhdr_base = (u64) pd->port_rcvhdrq_phys; |
126 | kinfo->spi_rcvhdr_tailaddr = (u64)pd->port_rcvhdrqtailaddr_phys; | ||
125 | kinfo->spi_rcv_egrbufs = (u64) pd->port_rcvegr_phys; | 127 | kinfo->spi_rcv_egrbufs = (u64) pd->port_rcvegr_phys; |
126 | kinfo->spi_pioavailaddr = (u64) dd->ipath_pioavailregs_phys; | 128 | kinfo->spi_pioavailaddr = (u64) dd->ipath_pioavailregs_phys; |
127 | kinfo->spi_status = (u64) kinfo->spi_pioavailaddr + | 129 | kinfo->spi_status = (u64) kinfo->spi_pioavailaddr + |
@@ -456,7 +458,7 @@ static int ipath_set_part_key(struct ipath_portdata *pd, u16 key) | |||
456 | u16 lkey = key & 0x7FFF; | 458 | u16 lkey = key & 0x7FFF; |
457 | int ret; | 459 | int ret; |
458 | 460 | ||
459 | if (lkey == (IPS_DEFAULT_P_KEY & 0x7FFF)) { | 461 | if (lkey == (IPATH_DEFAULT_P_KEY & 0x7FFF)) { |
460 | /* nothing to do; this key always valid */ | 462 | /* nothing to do; this key always valid */ |
461 | ret = 0; | 463 | ret = 0; |
462 | goto bail; | 464 | goto bail; |
@@ -704,6 +706,15 @@ static int ipath_create_user_egr(struct ipath_portdata *pd) | |||
704 | unsigned e, egrcnt, alloced, egrperchunk, chunk, egrsize, egroff; | 706 | unsigned e, egrcnt, alloced, egrperchunk, chunk, egrsize, egroff; |
705 | size_t size; | 707 | size_t size; |
706 | int ret; | 708 | int ret; |
709 | gfp_t gfp_flags; | ||
710 | |||
711 | /* | ||
712 | * GFP_USER, but without GFP_FS, so buffer cache can be | ||
713 | * coalesced (we hope); otherwise, even at order 4, | ||
714 | * heavy filesystem activity makes these fail, and we can | ||
715 | * use compound pages. | ||
716 | */ | ||
717 | gfp_flags = __GFP_WAIT | __GFP_IO | __GFP_COMP; | ||
707 | 718 | ||
708 | egrcnt = dd->ipath_rcvegrcnt; | 719 | egrcnt = dd->ipath_rcvegrcnt; |
709 | /* TID number offset for this port */ | 720 | /* TID number offset for this port */ |
@@ -720,10 +731,8 @@ static int ipath_create_user_egr(struct ipath_portdata *pd) | |||
720 | * memory pressure (creating large files and then copying them over | 731 | * memory pressure (creating large files and then copying them over |
721 | * NFS while doing lots of MPI jobs), we hit some allocation | 732 | * NFS while doing lots of MPI jobs), we hit some allocation |
722 | * failures, even though we can sleep... (2.6.10) Still get | 733 | * failures, even though we can sleep... (2.6.10) Still get |
723 | * failures at 64K. 32K is the lowest we can go without waiting | 734 | * failures at 64K. 32K is the lowest we can go without wasting |
724 | * more memory again. It seems likely that the coalescing in | 735 | * additional memory. |
725 | * free_pages, etc. still has issues (as it has had previously | ||
726 | * during 2.6.x development). | ||
727 | */ | 736 | */ |
728 | size = 0x8000; | 737 | size = 0x8000; |
729 | alloced = ALIGN(egrsize * egrcnt, size); | 738 | alloced = ALIGN(egrsize * egrcnt, size); |
@@ -744,12 +753,6 @@ static int ipath_create_user_egr(struct ipath_portdata *pd) | |||
744 | goto bail_rcvegrbuf; | 753 | goto bail_rcvegrbuf; |
745 | } | 754 | } |
746 | for (e = 0; e < pd->port_rcvegrbuf_chunks; e++) { | 755 | for (e = 0; e < pd->port_rcvegrbuf_chunks; e++) { |
747 | /* | ||
748 | * GFP_USER, but without GFP_FS, so buffer cache can be | ||
749 | * coalesced (we hope); otherwise, even at order 4, | ||
750 | * heavy filesystem activity makes these fail | ||
751 | */ | ||
752 | gfp_t gfp_flags = __GFP_WAIT | __GFP_IO | __GFP_COMP; | ||
753 | 756 | ||
754 | pd->port_rcvegrbuf[e] = dma_alloc_coherent( | 757 | pd->port_rcvegrbuf[e] = dma_alloc_coherent( |
755 | &dd->pcidev->dev, size, &pd->port_rcvegrbuf_phys[e], | 758 | &dd->pcidev->dev, size, &pd->port_rcvegrbuf_phys[e], |
@@ -783,11 +786,12 @@ static int ipath_create_user_egr(struct ipath_portdata *pd) | |||
783 | 786 | ||
784 | bail_rcvegrbuf_phys: | 787 | bail_rcvegrbuf_phys: |
785 | for (e = 0; e < pd->port_rcvegrbuf_chunks && | 788 | for (e = 0; e < pd->port_rcvegrbuf_chunks && |
786 | pd->port_rcvegrbuf[e]; e++) | 789 | pd->port_rcvegrbuf[e]; e++) { |
787 | dma_free_coherent(&dd->pcidev->dev, size, | 790 | dma_free_coherent(&dd->pcidev->dev, size, |
788 | pd->port_rcvegrbuf[e], | 791 | pd->port_rcvegrbuf[e], |
789 | pd->port_rcvegrbuf_phys[e]); | 792 | pd->port_rcvegrbuf_phys[e]); |
790 | 793 | ||
794 | } | ||
791 | vfree(pd->port_rcvegrbuf_phys); | 795 | vfree(pd->port_rcvegrbuf_phys); |
792 | pd->port_rcvegrbuf_phys = NULL; | 796 | pd->port_rcvegrbuf_phys = NULL; |
793 | bail_rcvegrbuf: | 797 | bail_rcvegrbuf: |
@@ -802,10 +806,7 @@ static int ipath_do_user_init(struct ipath_portdata *pd, | |||
802 | { | 806 | { |
803 | int ret = 0; | 807 | int ret = 0; |
804 | struct ipath_devdata *dd = pd->port_dd; | 808 | struct ipath_devdata *dd = pd->port_dd; |
805 | u64 physaddr, uaddr, off, atmp; | ||
806 | struct page *pagep; | ||
807 | u32 head32; | 809 | u32 head32; |
808 | u64 head; | ||
809 | 810 | ||
810 | /* for now, if major version is different, bail */ | 811 | /* for now, if major version is different, bail */ |
811 | if ((uinfo->spu_userversion >> 16) != IPATH_USER_SWMAJOR) { | 812 | if ((uinfo->spu_userversion >> 16) != IPATH_USER_SWMAJOR) { |
@@ -830,54 +831,6 @@ static int ipath_do_user_init(struct ipath_portdata *pd, | |||
830 | 831 | ||
831 | /* for now we do nothing with rcvhdrcnt: uinfo->spu_rcvhdrcnt */ | 832 | /* for now we do nothing with rcvhdrcnt: uinfo->spu_rcvhdrcnt */ |
832 | 833 | ||
833 | /* set up for the rcvhdr Q tail register writeback to user memory */ | ||
834 | if (!uinfo->spu_rcvhdraddr || | ||
835 | !access_ok(VERIFY_WRITE, (u64 __user *) (unsigned long) | ||
836 | uinfo->spu_rcvhdraddr, sizeof(u64))) { | ||
837 | ipath_dbg("Port %d rcvhdrtail addr %llx not valid\n", | ||
838 | pd->port_port, | ||
839 | (unsigned long long) uinfo->spu_rcvhdraddr); | ||
840 | ret = -EINVAL; | ||
841 | goto done; | ||
842 | } | ||
843 | |||
844 | off = offset_in_page(uinfo->spu_rcvhdraddr); | ||
845 | uaddr = PAGE_MASK & (unsigned long) uinfo->spu_rcvhdraddr; | ||
846 | ret = ipath_get_user_pages_nocopy(uaddr, &pagep); | ||
847 | if (ret) { | ||
848 | dev_info(&dd->pcidev->dev, "Failed to lookup and lock " | ||
849 | "address %llx for rcvhdrtail: errno %d\n", | ||
850 | (unsigned long long) uinfo->spu_rcvhdraddr, -ret); | ||
851 | goto done; | ||
852 | } | ||
853 | ipath_stats.sps_pagelocks++; | ||
854 | pd->port_rcvhdrtail_uaddr = uaddr; | ||
855 | pd->port_rcvhdrtail_pagep = pagep; | ||
856 | pd->port_rcvhdrtail_kvaddr = | ||
857 | page_address(pagep); | ||
858 | pd->port_rcvhdrtail_kvaddr += off; | ||
859 | physaddr = page_to_phys(pagep) + off; | ||
860 | ipath_cdbg(VERBOSE, "port %d user addr %llx hdrtailaddr, %llx " | ||
861 | "physical (off=%llx)\n", | ||
862 | pd->port_port, | ||
863 | (unsigned long long) uinfo->spu_rcvhdraddr, | ||
864 | (unsigned long long) physaddr, (unsigned long long) off); | ||
865 | ipath_write_kreg_port(dd, dd->ipath_kregs->kr_rcvhdrtailaddr, | ||
866 | pd->port_port, physaddr); | ||
867 | atmp = ipath_read_kreg64_port(dd, | ||
868 | dd->ipath_kregs->kr_rcvhdrtailaddr, | ||
869 | pd->port_port); | ||
870 | if (physaddr != atmp) { | ||
871 | ipath_dev_err(dd, | ||
872 | "Catastrophic software error, " | ||
873 | "RcvHdrTailAddr%u written as %llx, " | ||
874 | "read back as %llx\n", pd->port_port, | ||
875 | (unsigned long long) physaddr, | ||
876 | (unsigned long long) atmp); | ||
877 | ret = -EINVAL; | ||
878 | goto done; | ||
879 | } | ||
880 | |||
881 | /* for right now, kernel piobufs are at end, so port 1 is at 0 */ | 834 | /* for right now, kernel piobufs are at end, so port 1 is at 0 */ |
882 | pd->port_piobufs = dd->ipath_piobufbase + | 835 | pd->port_piobufs = dd->ipath_piobufbase + |
883 | dd->ipath_pbufsport * (pd->port_port - | 836 | dd->ipath_pbufsport * (pd->port_port - |
@@ -896,26 +849,18 @@ static int ipath_do_user_init(struct ipath_portdata *pd, | |||
896 | ret = ipath_create_user_egr(pd); | 849 | ret = ipath_create_user_egr(pd); |
897 | if (ret) | 850 | if (ret) |
898 | goto done; | 851 | goto done; |
899 | /* enable receives now */ | ||
900 | /* atomically set enable bit for this port */ | ||
901 | set_bit(INFINIPATH_R_PORTENABLE_SHIFT + pd->port_port, | ||
902 | &dd->ipath_rcvctrl); | ||
903 | 852 | ||
904 | /* | 853 | /* |
905 | * set the head registers for this port to the current values | 854 | * set the eager head register for this port to the current values |
906 | * of the tail pointers, since we don't know if they were | 855 | * of the tail pointers, since we don't know if they were |
907 | * updated on last use of the port. | 856 | * updated on last use of the port. |
908 | */ | 857 | */ |
909 | head32 = ipath_read_ureg32(dd, ur_rcvhdrtail, pd->port_port); | ||
910 | head = (u64) head32; | ||
911 | ipath_write_ureg(dd, ur_rcvhdrhead, head, pd->port_port); | ||
912 | head32 = ipath_read_ureg32(dd, ur_rcvegrindextail, pd->port_port); | 858 | head32 = ipath_read_ureg32(dd, ur_rcvegrindextail, pd->port_port); |
913 | ipath_write_ureg(dd, ur_rcvegrindexhead, head32, pd->port_port); | 859 | ipath_write_ureg(dd, ur_rcvegrindexhead, head32, pd->port_port); |
914 | dd->ipath_lastegrheads[pd->port_port] = -1; | 860 | dd->ipath_lastegrheads[pd->port_port] = -1; |
915 | dd->ipath_lastrcvhdrqtails[pd->port_port] = -1; | 861 | dd->ipath_lastrcvhdrqtails[pd->port_port] = -1; |
916 | ipath_cdbg(VERBOSE, "Wrote port%d head %llx, egrhead %x from " | 862 | ipath_cdbg(VERBOSE, "Wrote port%d egrhead %x from tail regs\n", |
917 | "tail regs\n", pd->port_port, | 863 | pd->port_port, head32); |
918 | (unsigned long long) head, head32); | ||
919 | pd->port_tidcursor = 0; /* start at beginning after open */ | 864 | pd->port_tidcursor = 0; /* start at beginning after open */ |
920 | /* | 865 | /* |
921 | * now enable the port; the tail registers will be written to memory | 866 | * now enable the port; the tail registers will be written to memory |
@@ -924,24 +869,76 @@ static int ipath_do_user_init(struct ipath_portdata *pd, | |||
924 | * transition from 0 to 1, so clear it first, then set it as part of | 869 | * transition from 0 to 1, so clear it first, then set it as part of |
925 | * enabling the port. This will (very briefly) affect any other | 870 | * enabling the port. This will (very briefly) affect any other |
926 | * open ports, but it shouldn't be long enough to be an issue. | 871 | * open ports, but it shouldn't be long enough to be an issue. |
872 | * We explictly set the in-memory copy to 0 beforehand, so we don't | ||
873 | * have to wait to be sure the DMA update has happened. | ||
927 | */ | 874 | */ |
875 | *pd->port_rcvhdrtail_kvaddr = 0ULL; | ||
876 | set_bit(INFINIPATH_R_PORTENABLE_SHIFT + pd->port_port, | ||
877 | &dd->ipath_rcvctrl); | ||
928 | ipath_write_kreg(dd, dd->ipath_kregs->kr_rcvctrl, | 878 | ipath_write_kreg(dd, dd->ipath_kregs->kr_rcvctrl, |
929 | dd->ipath_rcvctrl & ~INFINIPATH_R_TAILUPD); | 879 | dd->ipath_rcvctrl & ~INFINIPATH_R_TAILUPD); |
930 | ipath_write_kreg(dd, dd->ipath_kregs->kr_rcvctrl, | 880 | ipath_write_kreg(dd, dd->ipath_kregs->kr_rcvctrl, |
931 | dd->ipath_rcvctrl); | 881 | dd->ipath_rcvctrl); |
932 | |||
933 | done: | 882 | done: |
934 | return ret; | 883 | return ret; |
935 | } | 884 | } |
936 | 885 | ||
886 | |||
887 | /* common code for the mappings on dma_alloc_coherent mem */ | ||
888 | static int ipath_mmap_mem(struct vm_area_struct *vma, | ||
889 | struct ipath_portdata *pd, unsigned len, | ||
890 | int write_ok, dma_addr_t addr, char *what) | ||
891 | { | ||
892 | struct ipath_devdata *dd = pd->port_dd; | ||
893 | unsigned pfn = (unsigned long)addr >> PAGE_SHIFT; | ||
894 | int ret; | ||
895 | |||
896 | if ((vma->vm_end - vma->vm_start) > len) { | ||
897 | dev_info(&dd->pcidev->dev, | ||
898 | "FAIL on %s: len %lx > %x\n", what, | ||
899 | vma->vm_end - vma->vm_start, len); | ||
900 | ret = -EFAULT; | ||
901 | goto bail; | ||
902 | } | ||
903 | |||
904 | if (!write_ok) { | ||
905 | if (vma->vm_flags & VM_WRITE) { | ||
906 | dev_info(&dd->pcidev->dev, | ||
907 | "%s must be mapped readonly\n", what); | ||
908 | ret = -EPERM; | ||
909 | goto bail; | ||
910 | } | ||
911 | |||
912 | /* don't allow them to later change with mprotect */ | ||
913 | vma->vm_flags &= ~VM_MAYWRITE; | ||
914 | } | ||
915 | |||
916 | ret = remap_pfn_range(vma, vma->vm_start, pfn, | ||
917 | len, vma->vm_page_prot); | ||
918 | if (ret) | ||
919 | dev_info(&dd->pcidev->dev, | ||
920 | "%s port%u mmap of %lx, %x bytes r%c failed: %d\n", | ||
921 | what, pd->port_port, (unsigned long)addr, len, | ||
922 | write_ok?'w':'o', ret); | ||
923 | else | ||
924 | ipath_cdbg(VERBOSE, "%s port%u mmaped %lx, %x bytes r%c\n", | ||
925 | what, pd->port_port, (unsigned long)addr, len, | ||
926 | write_ok?'w':'o'); | ||
927 | bail: | ||
928 | return ret; | ||
929 | } | ||
930 | |||
937 | static int mmap_ureg(struct vm_area_struct *vma, struct ipath_devdata *dd, | 931 | static int mmap_ureg(struct vm_area_struct *vma, struct ipath_devdata *dd, |
938 | u64 ureg) | 932 | u64 ureg) |
939 | { | 933 | { |
940 | unsigned long phys; | 934 | unsigned long phys; |
941 | int ret; | 935 | int ret; |
942 | 936 | ||
943 | /* it's the real hardware, so io_remap works */ | 937 | /* |
944 | 938 | * This is real hardware, so use io_remap. This is the mechanism | |
939 | * for the user process to update the head registers for their port | ||
940 | * in the chip. | ||
941 | */ | ||
945 | if ((vma->vm_end - vma->vm_start) > PAGE_SIZE) { | 942 | if ((vma->vm_end - vma->vm_start) > PAGE_SIZE) { |
946 | dev_info(&dd->pcidev->dev, "FAIL mmap userreg: reqlen " | 943 | dev_info(&dd->pcidev->dev, "FAIL mmap userreg: reqlen " |
947 | "%lx > PAGE\n", vma->vm_end - vma->vm_start); | 944 | "%lx > PAGE\n", vma->vm_end - vma->vm_start); |
@@ -967,10 +964,11 @@ static int mmap_piobufs(struct vm_area_struct *vma, | |||
967 | int ret; | 964 | int ret; |
968 | 965 | ||
969 | /* | 966 | /* |
970 | * When we map the PIO buffers, we want to map them as writeonly, no | 967 | * When we map the PIO buffers in the chip, we want to map them as |
971 | * read possible. | 968 | * writeonly, no read possible. This prevents access to previous |
969 | * process data, and catches users who might try to read the i/o | ||
970 | * space due to a bug. | ||
972 | */ | 971 | */ |
973 | |||
974 | if ((vma->vm_end - vma->vm_start) > | 972 | if ((vma->vm_end - vma->vm_start) > |
975 | (dd->ipath_pbufsport * dd->ipath_palign)) { | 973 | (dd->ipath_pbufsport * dd->ipath_palign)) { |
976 | dev_info(&dd->pcidev->dev, "FAIL mmap piobufs: " | 974 | dev_info(&dd->pcidev->dev, "FAIL mmap piobufs: " |
@@ -981,11 +979,10 @@ static int mmap_piobufs(struct vm_area_struct *vma, | |||
981 | } | 979 | } |
982 | 980 | ||
983 | phys = dd->ipath_physaddr + pd->port_piobufs; | 981 | phys = dd->ipath_physaddr + pd->port_piobufs; |
982 | |||
984 | /* | 983 | /* |
985 | * Do *NOT* mark this as non-cached (PWT bit), or we don't get the | 984 | * Don't mark this as non-cached, or we don't get the |
986 | * write combining behavior we want on the PIO buffers! | 985 | * write combining behavior we want on the PIO buffers! |
987 | * vma->vm_page_prot = | ||
988 | * pgprot_noncached(vma->vm_page_prot); | ||
989 | */ | 986 | */ |
990 | 987 | ||
991 | if (vma->vm_flags & VM_READ) { | 988 | if (vma->vm_flags & VM_READ) { |
@@ -997,8 +994,7 @@ static int mmap_piobufs(struct vm_area_struct *vma, | |||
997 | } | 994 | } |
998 | 995 | ||
999 | /* don't allow them to later change to readable with mprotect */ | 996 | /* don't allow them to later change to readable with mprotect */ |
1000 | 997 | vma->vm_flags &= ~VM_MAYREAD; | |
1001 | vma->vm_flags &= ~VM_MAYWRITE; | ||
1002 | vma->vm_flags |= VM_DONTCOPY | VM_DONTEXPAND; | 998 | vma->vm_flags |= VM_DONTCOPY | VM_DONTEXPAND; |
1003 | 999 | ||
1004 | ret = io_remap_pfn_range(vma, vma->vm_start, phys >> PAGE_SHIFT, | 1000 | ret = io_remap_pfn_range(vma, vma->vm_start, phys >> PAGE_SHIFT, |
@@ -1017,11 +1013,6 @@ static int mmap_rcvegrbufs(struct vm_area_struct *vma, | |||
1017 | dma_addr_t *phys; | 1013 | dma_addr_t *phys; |
1018 | int ret; | 1014 | int ret; |
1019 | 1015 | ||
1020 | if (!pd->port_rcvegrbuf) { | ||
1021 | ret = -EFAULT; | ||
1022 | goto bail; | ||
1023 | } | ||
1024 | |||
1025 | size = pd->port_rcvegrbuf_size; | 1016 | size = pd->port_rcvegrbuf_size; |
1026 | total_size = pd->port_rcvegrbuf_chunks * size; | 1017 | total_size = pd->port_rcvegrbuf_chunks * size; |
1027 | if ((vma->vm_end - vma->vm_start) > total_size) { | 1018 | if ((vma->vm_end - vma->vm_start) > total_size) { |
@@ -1039,13 +1030,12 @@ static int mmap_rcvegrbufs(struct vm_area_struct *vma, | |||
1039 | ret = -EPERM; | 1030 | ret = -EPERM; |
1040 | goto bail; | 1031 | goto bail; |
1041 | } | 1032 | } |
1033 | /* don't allow them to later change to writeable with mprotect */ | ||
1034 | vma->vm_flags &= ~VM_MAYWRITE; | ||
1042 | 1035 | ||
1043 | start = vma->vm_start; | 1036 | start = vma->vm_start; |
1044 | phys = pd->port_rcvegrbuf_phys; | 1037 | phys = pd->port_rcvegrbuf_phys; |
1045 | 1038 | ||
1046 | /* don't allow them to later change to writeable with mprotect */ | ||
1047 | vma->vm_flags &= ~VM_MAYWRITE; | ||
1048 | |||
1049 | for (i = 0; i < pd->port_rcvegrbuf_chunks; i++, start += size) { | 1039 | for (i = 0; i < pd->port_rcvegrbuf_chunks; i++, start += size) { |
1050 | ret = remap_pfn_range(vma, start, phys[i] >> PAGE_SHIFT, | 1040 | ret = remap_pfn_range(vma, start, phys[i] >> PAGE_SHIFT, |
1051 | size, vma->vm_page_prot); | 1041 | size, vma->vm_page_prot); |
@@ -1058,78 +1048,6 @@ bail: | |||
1058 | return ret; | 1048 | return ret; |
1059 | } | 1049 | } |
1060 | 1050 | ||
1061 | static int mmap_rcvhdrq(struct vm_area_struct *vma, | ||
1062 | struct ipath_portdata *pd) | ||
1063 | { | ||
1064 | struct ipath_devdata *dd = pd->port_dd; | ||
1065 | size_t total_size; | ||
1066 | int ret; | ||
1067 | |||
1068 | /* | ||
1069 | * kmalloc'ed memory, physically contiguous; this is from | ||
1070 | * spi_rcvhdr_base; we allow user to map read-write so they can | ||
1071 | * write hdrq entries to allow protocol code to directly poll | ||
1072 | * whether a hdrq entry has been written. | ||
1073 | */ | ||
1074 | total_size = ALIGN(dd->ipath_rcvhdrcnt * dd->ipath_rcvhdrentsize * | ||
1075 | sizeof(u32), PAGE_SIZE); | ||
1076 | if ((vma->vm_end - vma->vm_start) > total_size) { | ||
1077 | dev_info(&dd->pcidev->dev, | ||
1078 | "FAIL on rcvhdrq: reqlen %lx > actual %lx\n", | ||
1079 | vma->vm_end - vma->vm_start, | ||
1080 | (unsigned long) total_size); | ||
1081 | ret = -EFAULT; | ||
1082 | goto bail; | ||
1083 | } | ||
1084 | |||
1085 | ret = remap_pfn_range(vma, vma->vm_start, | ||
1086 | pd->port_rcvhdrq_phys >> PAGE_SHIFT, | ||
1087 | vma->vm_end - vma->vm_start, | ||
1088 | vma->vm_page_prot); | ||
1089 | bail: | ||
1090 | return ret; | ||
1091 | } | ||
1092 | |||
1093 | static int mmap_pioavailregs(struct vm_area_struct *vma, | ||
1094 | struct ipath_portdata *pd) | ||
1095 | { | ||
1096 | struct ipath_devdata *dd = pd->port_dd; | ||
1097 | int ret; | ||
1098 | |||
1099 | /* | ||
1100 | * when we map the PIO bufferavail registers, we want to map them as | ||
1101 | * readonly, no write possible. | ||
1102 | * | ||
1103 | * kmalloc'ed memory, physically contiguous, one page only, readonly | ||
1104 | */ | ||
1105 | |||
1106 | if ((vma->vm_end - vma->vm_start) > PAGE_SIZE) { | ||
1107 | dev_info(&dd->pcidev->dev, "FAIL on pioavailregs_dma: " | ||
1108 | "reqlen %lx > actual %lx\n", | ||
1109 | vma->vm_end - vma->vm_start, | ||
1110 | (unsigned long) PAGE_SIZE); | ||
1111 | ret = -EFAULT; | ||
1112 | goto bail; | ||
1113 | } | ||
1114 | |||
1115 | if (vma->vm_flags & VM_WRITE) { | ||
1116 | dev_info(&dd->pcidev->dev, | ||
1117 | "Can't map pioavailregs as writable (flags=%lx)\n", | ||
1118 | vma->vm_flags); | ||
1119 | ret = -EPERM; | ||
1120 | goto bail; | ||
1121 | } | ||
1122 | |||
1123 | /* don't allow them to later change with mprotect */ | ||
1124 | vma->vm_flags &= ~VM_MAYWRITE; | ||
1125 | |||
1126 | ret = remap_pfn_range(vma, vma->vm_start, | ||
1127 | dd->ipath_pioavailregs_phys >> PAGE_SHIFT, | ||
1128 | PAGE_SIZE, vma->vm_page_prot); | ||
1129 | bail: | ||
1130 | return ret; | ||
1131 | } | ||
1132 | |||
1133 | /** | 1051 | /** |
1134 | * ipath_mmap - mmap various structures into user space | 1052 | * ipath_mmap - mmap various structures into user space |
1135 | * @fp: the file pointer | 1053 | * @fp: the file pointer |
@@ -1149,6 +1067,7 @@ static int ipath_mmap(struct file *fp, struct vm_area_struct *vma) | |||
1149 | 1067 | ||
1150 | pd = port_fp(fp); | 1068 | pd = port_fp(fp); |
1151 | dd = pd->port_dd; | 1069 | dd = pd->port_dd; |
1070 | |||
1152 | /* | 1071 | /* |
1153 | * This is the ipath_do_user_init() code, mapping the shared buffers | 1072 | * This is the ipath_do_user_init() code, mapping the shared buffers |
1154 | * into the user process. The address referred to by vm_pgoff is the | 1073 | * into the user process. The address referred to by vm_pgoff is the |
@@ -1158,28 +1077,59 @@ static int ipath_mmap(struct file *fp, struct vm_area_struct *vma) | |||
1158 | pgaddr = vma->vm_pgoff << PAGE_SHIFT; | 1077 | pgaddr = vma->vm_pgoff << PAGE_SHIFT; |
1159 | 1078 | ||
1160 | /* | 1079 | /* |
1161 | * note that ureg does *NOT* have the kregvirt as part of it, to be | 1080 | * Must fit in 40 bits for our hardware; some checked elsewhere, |
1162 | * sure that for 32 bit programs, we don't end up trying to map a > | 1081 | * but we'll be paranoid. Check for 0 is mostly in case one of the |
1163 | * 44 address. Has to match ipath_get_base_info() code that sets | 1082 | * allocations failed, but user called mmap anyway. We want to catch |
1164 | * __spi_uregbase | 1083 | * that before it can match. |
1165 | */ | 1084 | */ |
1085 | if (!pgaddr || pgaddr >= (1ULL<<40)) { | ||
1086 | ipath_dev_err(dd, "Bad phys addr %llx, start %lx, end %lx\n", | ||
1087 | (unsigned long long)pgaddr, vma->vm_start, vma->vm_end); | ||
1088 | return -EINVAL; | ||
1089 | } | ||
1166 | 1090 | ||
1091 | /* just the offset of the port user registers, not physical addr */ | ||
1167 | ureg = dd->ipath_uregbase + dd->ipath_palign * pd->port_port; | 1092 | ureg = dd->ipath_uregbase + dd->ipath_palign * pd->port_port; |
1168 | 1093 | ||
1169 | ipath_cdbg(MM, "ushare: pgaddr %llx vm_start=%lx, vmlen %lx\n", | 1094 | ipath_cdbg(MM, "ushare: pgaddr %llx vm_start=%lx, vmlen %lx\n", |
1170 | (unsigned long long) pgaddr, vma->vm_start, | 1095 | (unsigned long long) pgaddr, vma->vm_start, |
1171 | vma->vm_end - vma->vm_start); | 1096 | vma->vm_end - vma->vm_start); |
1172 | 1097 | ||
1173 | if (pgaddr == ureg) | 1098 | if (vma->vm_start & (PAGE_SIZE-1)) { |
1099 | ipath_dev_err(dd, | ||
1100 | "vm_start not aligned: %lx, end=%lx phys %lx\n", | ||
1101 | vma->vm_start, vma->vm_end, (unsigned long)pgaddr); | ||
1102 | ret = -EINVAL; | ||
1103 | } | ||
1104 | else if (pgaddr == ureg) | ||
1174 | ret = mmap_ureg(vma, dd, ureg); | 1105 | ret = mmap_ureg(vma, dd, ureg); |
1175 | else if (pgaddr == pd->port_piobufs) | 1106 | else if (pgaddr == pd->port_piobufs) |
1176 | ret = mmap_piobufs(vma, dd, pd); | 1107 | ret = mmap_piobufs(vma, dd, pd); |
1177 | else if (pgaddr == (u64) pd->port_rcvegr_phys) | 1108 | else if (pgaddr == (u64) pd->port_rcvegr_phys) |
1178 | ret = mmap_rcvegrbufs(vma, pd); | 1109 | ret = mmap_rcvegrbufs(vma, pd); |
1179 | else if (pgaddr == (u64) pd->port_rcvhdrq_phys) | 1110 | else if (pgaddr == (u64) pd->port_rcvhdrq_phys) { |
1180 | ret = mmap_rcvhdrq(vma, pd); | 1111 | /* |
1112 | * The rcvhdrq itself; readonly except on HT-400 (so have | ||
1113 | * to allow writable mapping), multiple pages, contiguous | ||
1114 | * from an i/o perspective. | ||
1115 | */ | ||
1116 | unsigned total_size = | ||
1117 | ALIGN(dd->ipath_rcvhdrcnt * dd->ipath_rcvhdrentsize | ||
1118 | * sizeof(u32), PAGE_SIZE); | ||
1119 | ret = ipath_mmap_mem(vma, pd, total_size, 1, | ||
1120 | pd->port_rcvhdrq_phys, | ||
1121 | "rcvhdrq"); | ||
1122 | } | ||
1123 | else if (pgaddr == (u64)pd->port_rcvhdrqtailaddr_phys) | ||
1124 | /* in-memory copy of rcvhdrq tail register */ | ||
1125 | ret = ipath_mmap_mem(vma, pd, PAGE_SIZE, 0, | ||
1126 | pd->port_rcvhdrqtailaddr_phys, | ||
1127 | "rcvhdrq tail"); | ||
1181 | else if (pgaddr == dd->ipath_pioavailregs_phys) | 1128 | else if (pgaddr == dd->ipath_pioavailregs_phys) |
1182 | ret = mmap_pioavailregs(vma, pd); | 1129 | /* in-memory copy of pioavail registers */ |
1130 | ret = ipath_mmap_mem(vma, pd, PAGE_SIZE, 0, | ||
1131 | dd->ipath_pioavailregs_phys, | ||
1132 | "pioavail registers"); | ||
1183 | else | 1133 | else |
1184 | ret = -EINVAL; | 1134 | ret = -EINVAL; |
1185 | 1135 | ||
@@ -1442,16 +1392,16 @@ done: | |||
1442 | 1392 | ||
1443 | static int ipath_open(struct inode *in, struct file *fp) | 1393 | static int ipath_open(struct inode *in, struct file *fp) |
1444 | { | 1394 | { |
1445 | int ret, minor; | 1395 | int ret, user_minor; |
1446 | 1396 | ||
1447 | mutex_lock(&ipath_mutex); | 1397 | mutex_lock(&ipath_mutex); |
1448 | 1398 | ||
1449 | minor = iminor(in); | 1399 | user_minor = iminor(in) - IPATH_USER_MINOR_BASE; |
1450 | ipath_cdbg(VERBOSE, "open on dev %lx (minor %d)\n", | 1400 | ipath_cdbg(VERBOSE, "open on dev %lx (minor %d)\n", |
1451 | (long)in->i_rdev, minor); | 1401 | (long)in->i_rdev, user_minor); |
1452 | 1402 | ||
1453 | if (minor) | 1403 | if (user_minor) |
1454 | ret = find_free_port(minor - 1, fp); | 1404 | ret = find_free_port(user_minor - 1, fp); |
1455 | else | 1405 | else |
1456 | ret = find_best_unit(fp); | 1406 | ret = find_best_unit(fp); |
1457 | 1407 | ||
@@ -1536,53 +1486,54 @@ static int ipath_close(struct inode *in, struct file *fp) | |||
1536 | } | 1486 | } |
1537 | 1487 | ||
1538 | if (dd->ipath_kregbase) { | 1488 | if (dd->ipath_kregbase) { |
1539 | if (pd->port_rcvhdrtail_uaddr) { | 1489 | int i; |
1540 | pd->port_rcvhdrtail_uaddr = 0; | 1490 | /* atomically clear receive enable port. */ |
1541 | pd->port_rcvhdrtail_kvaddr = NULL; | 1491 | clear_bit(INFINIPATH_R_PORTENABLE_SHIFT + port, |
1542 | ipath_release_user_pages_on_close( | 1492 | &dd->ipath_rcvctrl); |
1543 | &pd->port_rcvhdrtail_pagep, 1); | 1493 | ipath_write_kreg( dd, dd->ipath_kregs->kr_rcvctrl, |
1544 | pd->port_rcvhdrtail_pagep = NULL; | 1494 | dd->ipath_rcvctrl); |
1545 | ipath_stats.sps_pageunlocks++; | 1495 | /* and read back from chip to be sure that nothing |
1546 | } | 1496 | * else is in flight when we do the rest */ |
1547 | ipath_write_kreg_port( | 1497 | (void)ipath_read_kreg64(dd, dd->ipath_kregs->kr_scratch); |
1548 | dd, dd->ipath_kregs->kr_rcvhdrtailaddr, | ||
1549 | port, 0ULL); | ||
1550 | ipath_write_kreg_port( | ||
1551 | dd, dd->ipath_kregs->kr_rcvhdraddr, | ||
1552 | pd->port_port, 0); | ||
1553 | 1498 | ||
1554 | /* clean up the pkeys for this port user */ | 1499 | /* clean up the pkeys for this port user */ |
1555 | ipath_clean_part_key(pd, dd); | 1500 | ipath_clean_part_key(pd, dd); |
1556 | 1501 | ||
1557 | if (port < dd->ipath_cfgports) { | ||
1558 | int i = dd->ipath_pbufsport * (port - 1); | ||
1559 | ipath_disarm_piobufs(dd, i, dd->ipath_pbufsport); | ||
1560 | 1502 | ||
1561 | /* atomically clear receive enable port. */ | 1503 | /* |
1562 | clear_bit(INFINIPATH_R_PORTENABLE_SHIFT + port, | 1504 | * be paranoid, and never write 0's to these, just use an |
1563 | &dd->ipath_rcvctrl); | 1505 | * unused part of the port 0 tail page. Of course, |
1564 | ipath_write_kreg( | 1506 | * rcvhdraddr points to a large chunk of memory, so this |
1565 | dd, | 1507 | * could still trash things, but at least it won't trash |
1566 | dd->ipath_kregs->kr_rcvctrl, | 1508 | * page 0, and by disabling the port, it should stop "soon", |
1567 | dd->ipath_rcvctrl); | 1509 | * even if a packet or two is in already in flight after we |
1568 | 1510 | * disabled the port. | |
1569 | if (dd->ipath_pageshadow) | 1511 | */ |
1570 | unlock_expected_tids(pd); | 1512 | ipath_write_kreg_port(dd, |
1571 | ipath_stats.sps_ports--; | 1513 | dd->ipath_kregs->kr_rcvhdrtailaddr, port, |
1572 | ipath_cdbg(PROC, "%s[%u] closed port %u:%u\n", | 1514 | dd->ipath_dummy_hdrq_phys); |
1573 | pd->port_comm, pd->port_pid, | 1515 | ipath_write_kreg_port(dd, dd->ipath_kregs->kr_rcvhdraddr, |
1574 | dd->ipath_unit, port); | 1516 | pd->port_port, dd->ipath_dummy_hdrq_phys); |
1575 | } | 1517 | |
1518 | i = dd->ipath_pbufsport * (port - 1); | ||
1519 | ipath_disarm_piobufs(dd, i, dd->ipath_pbufsport); | ||
1520 | |||
1521 | if (dd->ipath_pageshadow) | ||
1522 | unlock_expected_tids(pd); | ||
1523 | ipath_stats.sps_ports--; | ||
1524 | ipath_cdbg(PROC, "%s[%u] closed port %u:%u\n", | ||
1525 | pd->port_comm, pd->port_pid, | ||
1526 | dd->ipath_unit, port); | ||
1527 | |||
1528 | dd->ipath_f_clear_tids(dd, pd->port_port); | ||
1576 | } | 1529 | } |
1577 | 1530 | ||
1578 | pd->port_cnt = 0; | 1531 | pd->port_cnt = 0; |
1579 | pd->port_pid = 0; | 1532 | pd->port_pid = 0; |
1580 | 1533 | ||
1581 | dd->ipath_f_clear_tids(dd, pd->port_port); | 1534 | dd->ipath_pd[pd->port_port] = NULL; /* before releasing mutex */ |
1582 | |||
1583 | ipath_free_pddata(dd, pd->port_port, 0); | ||
1584 | |||
1585 | mutex_unlock(&ipath_mutex); | 1535 | mutex_unlock(&ipath_mutex); |
1536 | ipath_free_pddata(dd, pd); /* after releasing the mutex */ | ||
1586 | 1537 | ||
1587 | return ret; | 1538 | return ret; |
1588 | } | 1539 | } |
@@ -1859,19 +1810,12 @@ int ipath_user_add(struct ipath_devdata *dd) | |||
1859 | "error %d\n", -ret); | 1810 | "error %d\n", -ret); |
1860 | goto bail; | 1811 | goto bail; |
1861 | } | 1812 | } |
1862 | ret = ipath_diag_init(); | ||
1863 | if (ret < 0) { | ||
1864 | ipath_dev_err(dd, "Unable to set up diag support: " | ||
1865 | "error %d\n", -ret); | ||
1866 | goto bail_sma; | ||
1867 | } | ||
1868 | |||
1869 | ret = init_cdev(0, "ipath", &ipath_file_ops, &wildcard_cdev, | 1813 | ret = init_cdev(0, "ipath", &ipath_file_ops, &wildcard_cdev, |
1870 | &wildcard_class_dev); | 1814 | &wildcard_class_dev); |
1871 | if (ret < 0) { | 1815 | if (ret < 0) { |
1872 | ipath_dev_err(dd, "Could not create wildcard " | 1816 | ipath_dev_err(dd, "Could not create wildcard " |
1873 | "minor: error %d\n", -ret); | 1817 | "minor: error %d\n", -ret); |
1874 | goto bail_diag; | 1818 | goto bail_sma; |
1875 | } | 1819 | } |
1876 | 1820 | ||
1877 | atomic_set(&user_setup, 1); | 1821 | atomic_set(&user_setup, 1); |
@@ -1880,31 +1824,28 @@ int ipath_user_add(struct ipath_devdata *dd) | |||
1880 | snprintf(name, sizeof(name), "ipath%d", dd->ipath_unit); | 1824 | snprintf(name, sizeof(name), "ipath%d", dd->ipath_unit); |
1881 | 1825 | ||
1882 | ret = init_cdev(dd->ipath_unit + 1, name, &ipath_file_ops, | 1826 | ret = init_cdev(dd->ipath_unit + 1, name, &ipath_file_ops, |
1883 | &dd->cdev, &dd->class_dev); | 1827 | &dd->user_cdev, &dd->user_class_dev); |
1884 | if (ret < 0) | 1828 | if (ret < 0) |
1885 | ipath_dev_err(dd, "Could not create user minor %d, %s\n", | 1829 | ipath_dev_err(dd, "Could not create user minor %d, %s\n", |
1886 | dd->ipath_unit + 1, name); | 1830 | dd->ipath_unit + 1, name); |
1887 | 1831 | ||
1888 | goto bail; | 1832 | goto bail; |
1889 | 1833 | ||
1890 | bail_diag: | ||
1891 | ipath_diag_cleanup(); | ||
1892 | bail_sma: | 1834 | bail_sma: |
1893 | user_cleanup(); | 1835 | user_cleanup(); |
1894 | bail: | 1836 | bail: |
1895 | return ret; | 1837 | return ret; |
1896 | } | 1838 | } |
1897 | 1839 | ||
1898 | void ipath_user_del(struct ipath_devdata *dd) | 1840 | void ipath_user_remove(struct ipath_devdata *dd) |
1899 | { | 1841 | { |
1900 | cleanup_cdev(&dd->cdev, &dd->class_dev); | 1842 | cleanup_cdev(&dd->user_cdev, &dd->user_class_dev); |
1901 | 1843 | ||
1902 | if (atomic_dec_return(&user_count) == 0) { | 1844 | if (atomic_dec_return(&user_count) == 0) { |
1903 | if (atomic_read(&user_setup) == 0) | 1845 | if (atomic_read(&user_setup) == 0) |
1904 | goto bail; | 1846 | goto bail; |
1905 | 1847 | ||
1906 | cleanup_cdev(&wildcard_cdev, &wildcard_class_dev); | 1848 | cleanup_cdev(&wildcard_cdev, &wildcard_class_dev); |
1907 | ipath_diag_cleanup(); | ||
1908 | user_cleanup(); | 1849 | user_cleanup(); |
1909 | 1850 | ||
1910 | atomic_set(&user_setup, 0); | 1851 | atomic_set(&user_setup, 0); |
@@ -1912,3 +1853,4 @@ void ipath_user_del(struct ipath_devdata *dd) | |||
1912 | bail: | 1853 | bail: |
1913 | return; | 1854 | return; |
1914 | } | 1855 | } |
1856 | |||
diff --git a/drivers/infiniband/hw/ipath/ipath_fs.c b/drivers/infiniband/hw/ipath/ipath_fs.c index 97f142c5be13..0936d8e8d704 100644 --- a/drivers/infiniband/hw/ipath/ipath_fs.c +++ b/drivers/infiniband/hw/ipath/ipath_fs.c | |||
@@ -1,4 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2006 QLogic, Inc. All rights reserved. | ||
2 | * Copyright (c) 2006 PathScale, Inc. All rights reserved. | 3 | * Copyright (c) 2006 PathScale, Inc. All rights reserved. |
3 | * | 4 | * |
4 | * This software is available to you under a choice of one of two | 5 | * This software is available to you under a choice of one of two |
diff --git a/drivers/infiniband/hw/ipath/ipath_ht400.c b/drivers/infiniband/hw/ipath/ipath_ht400.c index fac0a2b74de2..3db015da6e77 100644 --- a/drivers/infiniband/hw/ipath/ipath_ht400.c +++ b/drivers/infiniband/hw/ipath/ipath_ht400.c | |||
@@ -1,4 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2006 QLogic, Inc. All rights reserved. | ||
2 | * Copyright (c) 2003, 2004, 2005, 2006 PathScale, Inc. All rights reserved. | 3 | * Copyright (c) 2003, 2004, 2005, 2006 PathScale, Inc. All rights reserved. |
3 | * | 4 | * |
4 | * This software is available to you under a choice of one of two | 5 | * This software is available to you under a choice of one of two |
@@ -1572,7 +1573,6 @@ void ipath_init_ht400_funcs(struct ipath_devdata *dd) | |||
1572 | dd->ipath_f_reset = ipath_setup_ht_reset; | 1573 | dd->ipath_f_reset = ipath_setup_ht_reset; |
1573 | dd->ipath_f_get_boardname = ipath_ht_boardname; | 1574 | dd->ipath_f_get_boardname = ipath_ht_boardname; |
1574 | dd->ipath_f_init_hwerrors = ipath_ht_init_hwerrors; | 1575 | dd->ipath_f_init_hwerrors = ipath_ht_init_hwerrors; |
1575 | dd->ipath_f_init_hwerrors = ipath_ht_init_hwerrors; | ||
1576 | dd->ipath_f_early_init = ipath_ht_early_init; | 1576 | dd->ipath_f_early_init = ipath_ht_early_init; |
1577 | dd->ipath_f_handle_hwerrors = ipath_ht_handle_hwerrors; | 1577 | dd->ipath_f_handle_hwerrors = ipath_ht_handle_hwerrors; |
1578 | dd->ipath_f_quiet_serdes = ipath_ht_quiet_serdes; | 1578 | dd->ipath_f_quiet_serdes = ipath_ht_quiet_serdes; |
diff --git a/drivers/infiniband/hw/ipath/ipath_init_chip.c b/drivers/infiniband/hw/ipath/ipath_init_chip.c index dc83250d26a6..414cdd1d80a6 100644 --- a/drivers/infiniband/hw/ipath/ipath_init_chip.c +++ b/drivers/infiniband/hw/ipath/ipath_init_chip.c | |||
@@ -1,4 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2006 QLogic, Inc. All rights reserved. | ||
2 | * Copyright (c) 2003, 2004, 2005, 2006 PathScale, Inc. All rights reserved. | 3 | * Copyright (c) 2003, 2004, 2005, 2006 PathScale, Inc. All rights reserved. |
3 | * | 4 | * |
4 | * This software is available to you under a choice of one of two | 5 | * This software is available to you under a choice of one of two |
@@ -35,7 +36,7 @@ | |||
35 | #include <linux/vmalloc.h> | 36 | #include <linux/vmalloc.h> |
36 | 37 | ||
37 | #include "ipath_kernel.h" | 38 | #include "ipath_kernel.h" |
38 | #include "ips_common.h" | 39 | #include "ipath_common.h" |
39 | 40 | ||
40 | /* | 41 | /* |
41 | * min buffers we want to have per port, after driver | 42 | * min buffers we want to have per port, after driver |
@@ -114,6 +115,7 @@ static int create_port0_egr(struct ipath_devdata *dd) | |||
114 | "eager TID %u\n", e); | 115 | "eager TID %u\n", e); |
115 | while (e != 0) | 116 | while (e != 0) |
116 | dev_kfree_skb(skbs[--e]); | 117 | dev_kfree_skb(skbs[--e]); |
118 | vfree(skbs); | ||
117 | ret = -ENOMEM; | 119 | ret = -ENOMEM; |
118 | goto bail; | 120 | goto bail; |
119 | } | 121 | } |
@@ -275,7 +277,7 @@ static int init_chip_first(struct ipath_devdata *dd, | |||
275 | pd->port_port = 0; | 277 | pd->port_port = 0; |
276 | pd->port_cnt = 1; | 278 | pd->port_cnt = 1; |
277 | /* The port 0 pkey table is used by the layer interface. */ | 279 | /* The port 0 pkey table is used by the layer interface. */ |
278 | pd->port_pkeys[0] = IPS_DEFAULT_P_KEY; | 280 | pd->port_pkeys[0] = IPATH_DEFAULT_P_KEY; |
279 | dd->ipath_rcvtidcnt = | 281 | dd->ipath_rcvtidcnt = |
280 | ipath_read_kreg32(dd, dd->ipath_kregs->kr_rcvtidcnt); | 282 | ipath_read_kreg32(dd, dd->ipath_kregs->kr_rcvtidcnt); |
281 | dd->ipath_rcvtidbase = | 283 | dd->ipath_rcvtidbase = |
@@ -409,17 +411,8 @@ static int init_pioavailregs(struct ipath_devdata *dd) | |||
409 | /* and its length */ | 411 | /* and its length */ |
410 | dd->ipath_freezelen = L1_CACHE_BYTES - sizeof(dd->ipath_statusp[0]); | 412 | dd->ipath_freezelen = L1_CACHE_BYTES - sizeof(dd->ipath_statusp[0]); |
411 | 413 | ||
412 | if (dd->ipath_unit * 64 > (IPATH_PORT0_RCVHDRTAIL_SIZE - 64)) { | 414 | ret = 0; |
413 | ipath_dev_err(dd, "unit %u too large for port 0 " | ||
414 | "rcvhdrtail buffer size\n", dd->ipath_unit); | ||
415 | ret = -ENODEV; | ||
416 | } | ||
417 | else | ||
418 | ret = 0; | ||
419 | 415 | ||
420 | /* so we can get current tail in ipath_kreceive(), per chip */ | ||
421 | dd->ipath_hdrqtailptr = &ipath_port0_rcvhdrtail[ | ||
422 | dd->ipath_unit * (64 / sizeof(*ipath_port0_rcvhdrtail))]; | ||
423 | done: | 416 | done: |
424 | return ret; | 417 | return ret; |
425 | } | 418 | } |
@@ -652,8 +645,9 @@ int ipath_init_chip(struct ipath_devdata *dd, int reinit) | |||
652 | { | 645 | { |
653 | int ret = 0, i; | 646 | int ret = 0, i; |
654 | u32 val32, kpiobufs; | 647 | u32 val32, kpiobufs; |
655 | u64 val, atmp; | 648 | u64 val; |
656 | struct ipath_portdata *pd = NULL; /* keep gcc4 happy */ | 649 | struct ipath_portdata *pd = NULL; /* keep gcc4 happy */ |
650 | gfp_t gfp_flags = GFP_USER | __GFP_COMP; | ||
657 | 651 | ||
658 | ret = init_housekeeping(dd, &pd, reinit); | 652 | ret = init_housekeeping(dd, &pd, reinit); |
659 | if (ret) | 653 | if (ret) |
@@ -775,24 +769,6 @@ int ipath_init_chip(struct ipath_devdata *dd, int reinit) | |||
775 | goto done; | 769 | goto done; |
776 | } | 770 | } |
777 | 771 | ||
778 | val = ipath_port0_rcvhdrtail_dma + dd->ipath_unit * 64; | ||
779 | |||
780 | /* verify that the alignment requirement was met */ | ||
781 | ipath_write_kreg_port(dd, dd->ipath_kregs->kr_rcvhdrtailaddr, | ||
782 | 0, val); | ||
783 | atmp = ipath_read_kreg64_port( | ||
784 | dd, dd->ipath_kregs->kr_rcvhdrtailaddr, 0); | ||
785 | if (val != atmp) { | ||
786 | ipath_dev_err(dd, "Catastrophic software error, " | ||
787 | "RcvHdrTailAddr0 written as %llx, " | ||
788 | "read back as %llx from %x\n", | ||
789 | (unsigned long long) val, | ||
790 | (unsigned long long) atmp, | ||
791 | dd->ipath_kregs->kr_rcvhdrtailaddr); | ||
792 | ret = -EINVAL; | ||
793 | goto done; | ||
794 | } | ||
795 | |||
796 | ipath_write_kreg(dd, dd->ipath_kregs->kr_rcvbthqp, IPATH_KD_QP); | 772 | ipath_write_kreg(dd, dd->ipath_kregs->kr_rcvbthqp, IPATH_KD_QP); |
797 | 773 | ||
798 | /* | 774 | /* |
@@ -836,25 +812,45 @@ int ipath_init_chip(struct ipath_devdata *dd, int reinit) | |||
836 | /* clear any interrups up to this point (ints still not enabled) */ | 812 | /* clear any interrups up to this point (ints still not enabled) */ |
837 | ipath_write_kreg(dd, dd->ipath_kregs->kr_intclear, -1LL); | 813 | ipath_write_kreg(dd, dd->ipath_kregs->kr_intclear, -1LL); |
838 | 814 | ||
839 | ipath_stats.sps_lid[dd->ipath_unit] = dd->ipath_lid; | ||
840 | |||
841 | /* | 815 | /* |
842 | * Set up the port 0 (kernel) rcvhdr q and egr TIDs. If doing | 816 | * Set up the port 0 (kernel) rcvhdr q and egr TIDs. If doing |
843 | * re-init, the simplest way to handle this is to free | 817 | * re-init, the simplest way to handle this is to free |
844 | * existing, and re-allocate. | 818 | * existing, and re-allocate. |
845 | */ | 819 | */ |
846 | if (reinit) | 820 | if (reinit) { |
847 | ipath_free_pddata(dd, 0, 0); | 821 | struct ipath_portdata *pd = dd->ipath_pd[0]; |
822 | dd->ipath_pd[0] = NULL; | ||
823 | ipath_free_pddata(dd, pd); | ||
824 | } | ||
848 | dd->ipath_f_tidtemplate(dd); | 825 | dd->ipath_f_tidtemplate(dd); |
849 | ret = ipath_create_rcvhdrq(dd, pd); | 826 | ret = ipath_create_rcvhdrq(dd, pd); |
850 | if (!ret) | 827 | if (!ret) { |
828 | dd->ipath_hdrqtailptr = | ||
829 | (volatile __le64 *)pd->port_rcvhdrtail_kvaddr; | ||
851 | ret = create_port0_egr(dd); | 830 | ret = create_port0_egr(dd); |
831 | } | ||
852 | if (ret) | 832 | if (ret) |
853 | ipath_dev_err(dd, "failed to allocate port 0 (kernel) " | 833 | ipath_dev_err(dd, "failed to allocate port 0 (kernel) " |
854 | "rcvhdrq and/or egr bufs\n"); | 834 | "rcvhdrq and/or egr bufs\n"); |
855 | else | 835 | else |
856 | enable_chip(dd, pd, reinit); | 836 | enable_chip(dd, pd, reinit); |
857 | 837 | ||
838 | |||
839 | if (!ret && !reinit) { | ||
840 | /* used when we close a port, for DMA already in flight at close */ | ||
841 | dd->ipath_dummy_hdrq = dma_alloc_coherent( | ||
842 | &dd->pcidev->dev, pd->port_rcvhdrq_size, | ||
843 | &dd->ipath_dummy_hdrq_phys, | ||
844 | gfp_flags); | ||
845 | if (!dd->ipath_dummy_hdrq ) { | ||
846 | dev_info(&dd->pcidev->dev, | ||
847 | "Couldn't allocate 0x%lx bytes for dummy hdrq\n", | ||
848 | pd->port_rcvhdrq_size); | ||
849 | /* fallback to just 0'ing */ | ||
850 | dd->ipath_dummy_hdrq_phys = 0UL; | ||
851 | } | ||
852 | } | ||
853 | |||
858 | /* | 854 | /* |
859 | * cause retrigger of pending interrupts ignored during init, | 855 | * cause retrigger of pending interrupts ignored during init, |
860 | * even if we had errors | 856 | * even if we had errors |
diff --git a/drivers/infiniband/hw/ipath/ipath_intr.c b/drivers/infiniband/hw/ipath/ipath_intr.c index 5e31d0de849b..280e732660a1 100644 --- a/drivers/infiniband/hw/ipath/ipath_intr.c +++ b/drivers/infiniband/hw/ipath/ipath_intr.c | |||
@@ -1,4 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2006 QLogic, Inc. All rights reserved. | ||
2 | * Copyright (c) 2003, 2004, 2005, 2006 PathScale, Inc. All rights reserved. | 3 | * Copyright (c) 2003, 2004, 2005, 2006 PathScale, Inc. All rights reserved. |
3 | * | 4 | * |
4 | * This software is available to you under a choice of one of two | 5 | * This software is available to you under a choice of one of two |
@@ -33,9 +34,10 @@ | |||
33 | #include <linux/pci.h> | 34 | #include <linux/pci.h> |
34 | 35 | ||
35 | #include "ipath_kernel.h" | 36 | #include "ipath_kernel.h" |
36 | #include "ips_common.h" | ||
37 | #include "ipath_layer.h" | 37 | #include "ipath_layer.h" |
38 | #include "ipath_common.h" | ||
38 | 39 | ||
40 | /* These are all rcv-related errors which we want to count for stats */ | ||
39 | #define E_SUM_PKTERRS \ | 41 | #define E_SUM_PKTERRS \ |
40 | (INFINIPATH_E_RHDRLEN | INFINIPATH_E_RBADTID | \ | 42 | (INFINIPATH_E_RHDRLEN | INFINIPATH_E_RBADTID | \ |
41 | INFINIPATH_E_RBADVERSION | INFINIPATH_E_RHDR | \ | 43 | INFINIPATH_E_RBADVERSION | INFINIPATH_E_RHDR | \ |
@@ -44,6 +46,7 @@ | |||
44 | INFINIPATH_E_RFORMATERR | INFINIPATH_E_RUNSUPVL | \ | 46 | INFINIPATH_E_RFORMATERR | INFINIPATH_E_RUNSUPVL | \ |
45 | INFINIPATH_E_RUNEXPCHAR | INFINIPATH_E_REBP) | 47 | INFINIPATH_E_RUNEXPCHAR | INFINIPATH_E_REBP) |
46 | 48 | ||
49 | /* These are all send-related errors which we want to count for stats */ | ||
47 | #define E_SUM_ERRS \ | 50 | #define E_SUM_ERRS \ |
48 | (INFINIPATH_E_SPIOARMLAUNCH | INFINIPATH_E_SUNEXPERRPKTNUM | \ | 51 | (INFINIPATH_E_SPIOARMLAUNCH | INFINIPATH_E_SUNEXPERRPKTNUM | \ |
49 | INFINIPATH_E_SDROPPEDDATAPKT | INFINIPATH_E_SDROPPEDSMPPKT | \ | 52 | INFINIPATH_E_SDROPPEDDATAPKT | INFINIPATH_E_SDROPPEDSMPPKT | \ |
@@ -51,6 +54,18 @@ | |||
51 | INFINIPATH_E_SMINPKTLEN | INFINIPATH_E_SPKTLEN | \ | 54 | INFINIPATH_E_SMINPKTLEN | INFINIPATH_E_SPKTLEN | \ |
52 | INFINIPATH_E_INVALIDADDR) | 55 | INFINIPATH_E_INVALIDADDR) |
53 | 56 | ||
57 | /* | ||
58 | * these are errors that can occur when the link changes state while | ||
59 | * a packet is being sent or received. This doesn't cover things | ||
60 | * like EBP or VCRC that can be the result of a sending having the | ||
61 | * link change state, so we receive a "known bad" packet. | ||
62 | */ | ||
63 | #define E_SUM_LINK_PKTERRS \ | ||
64 | (INFINIPATH_E_SDROPPEDDATAPKT | INFINIPATH_E_SDROPPEDSMPPKT | \ | ||
65 | INFINIPATH_E_SMINPKTLEN | INFINIPATH_E_SPKTLEN | \ | ||
66 | INFINIPATH_E_RSHORTPKTLEN | INFINIPATH_E_RMINPKTLEN | \ | ||
67 | INFINIPATH_E_RUNEXPCHAR) | ||
68 | |||
54 | static u64 handle_e_sum_errs(struct ipath_devdata *dd, ipath_err_t errs) | 69 | static u64 handle_e_sum_errs(struct ipath_devdata *dd, ipath_err_t errs) |
55 | { | 70 | { |
56 | unsigned long sbuf[4]; | 71 | unsigned long sbuf[4]; |
@@ -100,9 +115,7 @@ static u64 handle_e_sum_errs(struct ipath_devdata *dd, ipath_err_t errs) | |||
100 | if (ipath_debug & __IPATH_PKTDBG) | 115 | if (ipath_debug & __IPATH_PKTDBG) |
101 | printk("\n"); | 116 | printk("\n"); |
102 | } | 117 | } |
103 | if ((errs & (INFINIPATH_E_SDROPPEDDATAPKT | | 118 | if ((errs & E_SUM_LINK_PKTERRS) && |
104 | INFINIPATH_E_SDROPPEDSMPPKT | | ||
105 | INFINIPATH_E_SMINPKTLEN)) && | ||
106 | !(dd->ipath_flags & IPATH_LINKACTIVE)) { | 119 | !(dd->ipath_flags & IPATH_LINKACTIVE)) { |
107 | /* | 120 | /* |
108 | * This can happen when SMA is trying to bring the link | 121 | * This can happen when SMA is trying to bring the link |
@@ -111,11 +124,9 @@ static u64 handle_e_sum_errs(struct ipath_devdata *dd, ipath_err_t errs) | |||
111 | * valid. We don't want to confuse people, so we just | 124 | * valid. We don't want to confuse people, so we just |
112 | * don't print them, except at debug | 125 | * don't print them, except at debug |
113 | */ | 126 | */ |
114 | ipath_dbg("Ignoring pktsend errors %llx, because not " | 127 | ipath_dbg("Ignoring packet errors %llx, because link not " |
115 | "yet active\n", (unsigned long long) errs); | 128 | "ACTIVE\n", (unsigned long long) errs); |
116 | ignore_this_time = INFINIPATH_E_SDROPPEDDATAPKT | | 129 | ignore_this_time = errs & E_SUM_LINK_PKTERRS; |
117 | INFINIPATH_E_SDROPPEDSMPPKT | | ||
118 | INFINIPATH_E_SMINPKTLEN; | ||
119 | } | 130 | } |
120 | 131 | ||
121 | return ignore_this_time; | 132 | return ignore_this_time; |
@@ -156,7 +167,29 @@ static void handle_e_ibstatuschanged(struct ipath_devdata *dd, | |||
156 | */ | 167 | */ |
157 | val = ipath_read_kreg64(dd, dd->ipath_kregs->kr_ibcstatus); | 168 | val = ipath_read_kreg64(dd, dd->ipath_kregs->kr_ibcstatus); |
158 | lstate = val & IPATH_IBSTATE_MASK; | 169 | lstate = val & IPATH_IBSTATE_MASK; |
159 | if (lstate == IPATH_IBSTATE_INIT || lstate == IPATH_IBSTATE_ARM || | 170 | |
171 | /* | ||
172 | * this is confusing enough when it happens that I want to always put it | ||
173 | * on the console and in the logs. If it was a requested state change, | ||
174 | * we'll have already cleared the flags, so we won't print this warning | ||
175 | */ | ||
176 | if ((lstate != IPATH_IBSTATE_ARM && lstate != IPATH_IBSTATE_ACTIVE) | ||
177 | && (dd->ipath_flags & (IPATH_LINKARMED | IPATH_LINKACTIVE))) { | ||
178 | dev_info(&dd->pcidev->dev, "Link state changed from %s to %s\n", | ||
179 | (dd->ipath_flags & IPATH_LINKARMED) ? "ARM" : "ACTIVE", | ||
180 | ib_linkstate(lstate)); | ||
181 | /* | ||
182 | * Flush all queued sends when link went to DOWN or INIT, | ||
183 | * to be sure that they don't block SMA and other MAD packets | ||
184 | */ | ||
185 | ipath_write_kreg(dd, dd->ipath_kregs->kr_sendctrl, | ||
186 | INFINIPATH_S_ABORT); | ||
187 | ipath_disarm_piobufs(dd, dd->ipath_lastport_piobuf, | ||
188 | (unsigned)(dd->ipath_piobcnt2k + | ||
189 | dd->ipath_piobcnt4k) - | ||
190 | dd->ipath_lastport_piobuf); | ||
191 | } | ||
192 | else if (lstate == IPATH_IBSTATE_INIT || lstate == IPATH_IBSTATE_ARM || | ||
160 | lstate == IPATH_IBSTATE_ACTIVE) { | 193 | lstate == IPATH_IBSTATE_ACTIVE) { |
161 | /* | 194 | /* |
162 | * only print at SMA if there is a change, debug if not | 195 | * only print at SMA if there is a change, debug if not |
@@ -229,6 +262,7 @@ static void handle_e_ibstatuschanged(struct ipath_devdata *dd, | |||
229 | | IPATH_LINKACTIVE | | 262 | | IPATH_LINKACTIVE | |
230 | IPATH_LINKARMED); | 263 | IPATH_LINKARMED); |
231 | *dd->ipath_statusp &= ~IPATH_STATUS_IB_READY; | 264 | *dd->ipath_statusp &= ~IPATH_STATUS_IB_READY; |
265 | dd->ipath_lli_counter = 0; | ||
232 | if (!noprint) { | 266 | if (!noprint) { |
233 | if (((dd->ipath_lastibcstat >> | 267 | if (((dd->ipath_lastibcstat >> |
234 | INFINIPATH_IBCS_LINKSTATE_SHIFT) & | 268 | INFINIPATH_IBCS_LINKSTATE_SHIFT) & |
@@ -350,7 +384,7 @@ static unsigned handle_frequent_errors(struct ipath_devdata *dd, | |||
350 | return supp_msgs; | 384 | return supp_msgs; |
351 | } | 385 | } |
352 | 386 | ||
353 | static void handle_errors(struct ipath_devdata *dd, ipath_err_t errs) | 387 | static int handle_errors(struct ipath_devdata *dd, ipath_err_t errs) |
354 | { | 388 | { |
355 | char msg[512]; | 389 | char msg[512]; |
356 | u64 ignore_this_time = 0; | 390 | u64 ignore_this_time = 0; |
@@ -379,6 +413,19 @@ static void handle_errors(struct ipath_devdata *dd, ipath_err_t errs) | |||
379 | 413 | ||
380 | if (errs & E_SUM_ERRS) | 414 | if (errs & E_SUM_ERRS) |
381 | ignore_this_time = handle_e_sum_errs(dd, errs); | 415 | ignore_this_time = handle_e_sum_errs(dd, errs); |
416 | else if ((errs & E_SUM_LINK_PKTERRS) && | ||
417 | !(dd->ipath_flags & IPATH_LINKACTIVE)) { | ||
418 | /* | ||
419 | * This can happen when SMA is trying to bring the link | ||
420 | * up, but the IB link changes state at the "wrong" time. | ||
421 | * The IB logic then complains that the packet isn't | ||
422 | * valid. We don't want to confuse people, so we just | ||
423 | * don't print them, except at debug | ||
424 | */ | ||
425 | ipath_dbg("Ignoring packet errors %llx, because link not " | ||
426 | "ACTIVE\n", (unsigned long long) errs); | ||
427 | ignore_this_time = errs & E_SUM_LINK_PKTERRS; | ||
428 | } | ||
382 | 429 | ||
383 | if (supp_msgs == 250000) { | 430 | if (supp_msgs == 250000) { |
384 | /* | 431 | /* |
@@ -434,7 +481,7 @@ static void handle_errors(struct ipath_devdata *dd, ipath_err_t errs) | |||
434 | INFINIPATH_E_IBSTATUSCHANGED); | 481 | INFINIPATH_E_IBSTATUSCHANGED); |
435 | } | 482 | } |
436 | if (!errs) | 483 | if (!errs) |
437 | return; | 484 | return 0; |
438 | 485 | ||
439 | if (!noprint) | 486 | if (!noprint) |
440 | /* | 487 | /* |
@@ -493,10 +540,10 @@ static void handle_errors(struct ipath_devdata *dd, ipath_err_t errs) | |||
493 | continue; | 540 | continue; |
494 | if (hd == (tl + 1) || | 541 | if (hd == (tl + 1) || |
495 | (!hd && tl == dd->ipath_hdrqlast)) { | 542 | (!hd && tl == dd->ipath_hdrqlast)) { |
496 | dd->ipath_lastrcvhdrqtails[i] = tl; | ||
497 | pd->port_hdrqfull++; | ||
498 | if (i == 0) | 543 | if (i == 0) |
499 | chkerrpkts = 1; | 544 | chkerrpkts = 1; |
545 | dd->ipath_lastrcvhdrqtails[i] = tl; | ||
546 | pd->port_hdrqfull++; | ||
500 | } | 547 | } |
501 | } | 548 | } |
502 | } | 549 | } |
@@ -558,9 +605,7 @@ static void handle_errors(struct ipath_devdata *dd, ipath_err_t errs) | |||
558 | wake_up_interruptible(&ipath_sma_state_wait); | 605 | wake_up_interruptible(&ipath_sma_state_wait); |
559 | } | 606 | } |
560 | 607 | ||
561 | if (chkerrpkts) | 608 | return chkerrpkts; |
562 | /* process possible error packets in hdrq */ | ||
563 | ipath_kreceive(dd); | ||
564 | } | 609 | } |
565 | 610 | ||
566 | /* this is separate to allow for better optimization of ipath_intr() */ | 611 | /* this is separate to allow for better optimization of ipath_intr() */ |
@@ -678,7 +723,12 @@ set: | |||
678 | dd->ipath_sendctrl); | 723 | dd->ipath_sendctrl); |
679 | } | 724 | } |
680 | 725 | ||
681 | static void handle_rcv(struct ipath_devdata *dd, u32 istat) | 726 | /* |
727 | * Handle receive interrupts for user ports; this means a user | ||
728 | * process was waiting for a packet to arrive, and didn't want | ||
729 | * to poll | ||
730 | */ | ||
731 | static void handle_urcv(struct ipath_devdata *dd, u32 istat) | ||
682 | { | 732 | { |
683 | u64 portr; | 733 | u64 portr; |
684 | int i; | 734 | int i; |
@@ -688,22 +738,17 @@ static void handle_rcv(struct ipath_devdata *dd, u32 istat) | |||
688 | infinipath_i_rcvavail_mask) | 738 | infinipath_i_rcvavail_mask) |
689 | | ((istat >> INFINIPATH_I_RCVURG_SHIFT) & | 739 | | ((istat >> INFINIPATH_I_RCVURG_SHIFT) & |
690 | infinipath_i_rcvurg_mask); | 740 | infinipath_i_rcvurg_mask); |
691 | for (i = 0; i < dd->ipath_cfgports; i++) { | 741 | for (i = 1; i < dd->ipath_cfgports; i++) { |
692 | struct ipath_portdata *pd = dd->ipath_pd[i]; | 742 | struct ipath_portdata *pd = dd->ipath_pd[i]; |
693 | if (portr & (1 << i) && pd && | 743 | if (portr & (1 << i) && pd && pd->port_cnt && |
694 | pd->port_cnt) { | 744 | test_bit(IPATH_PORT_WAITING_RCV, &pd->port_flag)) { |
695 | if (i == 0) | 745 | int rcbit; |
696 | ipath_kreceive(dd); | 746 | clear_bit(IPATH_PORT_WAITING_RCV, |
697 | else if (test_bit(IPATH_PORT_WAITING_RCV, | 747 | &pd->port_flag); |
698 | &pd->port_flag)) { | 748 | rcbit = i + INFINIPATH_R_INTRAVAIL_SHIFT; |
699 | int rcbit; | 749 | clear_bit(1UL << rcbit, &dd->ipath_rcvctrl); |
700 | clear_bit(IPATH_PORT_WAITING_RCV, | 750 | wake_up_interruptible(&pd->port_wait); |
701 | &pd->port_flag); | 751 | rcvdint = 1; |
702 | rcbit = i + INFINIPATH_R_INTRAVAIL_SHIFT; | ||
703 | clear_bit(1UL << rcbit, &dd->ipath_rcvctrl); | ||
704 | wake_up_interruptible(&pd->port_wait); | ||
705 | rcvdint = 1; | ||
706 | } | ||
707 | } | 752 | } |
708 | } | 753 | } |
709 | if (rcvdint) { | 754 | if (rcvdint) { |
@@ -719,16 +764,19 @@ static void handle_rcv(struct ipath_devdata *dd, u32 istat) | |||
719 | irqreturn_t ipath_intr(int irq, void *data, struct pt_regs *regs) | 764 | irqreturn_t ipath_intr(int irq, void *data, struct pt_regs *regs) |
720 | { | 765 | { |
721 | struct ipath_devdata *dd = data; | 766 | struct ipath_devdata *dd = data; |
722 | u32 istat; | 767 | u32 istat, chk0rcv = 0; |
723 | ipath_err_t estat = 0; | 768 | ipath_err_t estat = 0; |
724 | static unsigned unexpected = 0; | ||
725 | irqreturn_t ret; | 769 | irqreturn_t ret; |
770 | u32 oldhead, curtail; | ||
771 | static unsigned unexpected = 0; | ||
772 | static const u32 port0rbits = (1U<<INFINIPATH_I_RCVAVAIL_SHIFT) | | ||
773 | (1U<<INFINIPATH_I_RCVURG_SHIFT); | ||
774 | |||
775 | ipath_stats.sps_ints++; | ||
726 | 776 | ||
727 | if(!(dd->ipath_flags & IPATH_PRESENT)) { | 777 | if (!(dd->ipath_flags & IPATH_PRESENT)) { |
728 | /* this is mostly so we don't try to touch the chip while | ||
729 | * it is being reset */ | ||
730 | /* | 778 | /* |
731 | * This return value is perhaps odd, but we do not want the | 779 | * This return value is not great, but we do not want the |
732 | * interrupt core code to remove our interrupt handler | 780 | * interrupt core code to remove our interrupt handler |
733 | * because we don't appear to be handling an interrupt | 781 | * because we don't appear to be handling an interrupt |
734 | * during a chip reset. | 782 | * during a chip reset. |
@@ -736,7 +784,51 @@ irqreturn_t ipath_intr(int irq, void *data, struct pt_regs *regs) | |||
736 | return IRQ_HANDLED; | 784 | return IRQ_HANDLED; |
737 | } | 785 | } |
738 | 786 | ||
787 | /* | ||
788 | * this needs to be flags&initted, not statusp, so we keep | ||
789 | * taking interrupts even after link goes down, etc. | ||
790 | * Also, we *must* clear the interrupt at some point, or we won't | ||
791 | * take it again, which can be real bad for errors, etc... | ||
792 | */ | ||
793 | |||
794 | if (!(dd->ipath_flags & IPATH_INITTED)) { | ||
795 | ipath_bad_intr(dd, &unexpected); | ||
796 | ret = IRQ_NONE; | ||
797 | goto bail; | ||
798 | } | ||
799 | |||
800 | /* | ||
801 | * We try to avoid reading the interrupt status register, since | ||
802 | * that's a PIO read, and stalls the processor for up to about | ||
803 | * ~0.25 usec. The idea is that if we processed a port0 packet, | ||
804 | * we blindly clear the port 0 receive interrupt bits, and nothing | ||
805 | * else, then return. If other interrupts are pending, the chip | ||
806 | * will re-interrupt us as soon as we write the intclear register. | ||
807 | * We then won't process any more kernel packets (if not the 2nd | ||
808 | * time, then the 3rd or 4th) and we'll then handle the other | ||
809 | * interrupts. We clear the interrupts first so that we don't | ||
810 | * lose intr for later packets that arrive while we are processing. | ||
811 | */ | ||
812 | oldhead = dd->ipath_port0head; | ||
813 | curtail = (u32)le64_to_cpu(*dd->ipath_hdrqtailptr); | ||
814 | if (oldhead != curtail) { | ||
815 | if (dd->ipath_flags & IPATH_GPIO_INTR) { | ||
816 | ipath_write_kreg(dd, dd->ipath_kregs->kr_gpio_clear, | ||
817 | (u64) (1 << 2)); | ||
818 | istat = port0rbits | INFINIPATH_I_GPIO; | ||
819 | } | ||
820 | else | ||
821 | istat = port0rbits; | ||
822 | ipath_write_kreg(dd, dd->ipath_kregs->kr_intclear, istat); | ||
823 | ipath_kreceive(dd); | ||
824 | if (oldhead != dd->ipath_port0head) { | ||
825 | ipath_stats.sps_fastrcvint++; | ||
826 | goto done; | ||
827 | } | ||
828 | } | ||
829 | |||
739 | istat = ipath_read_kreg32(dd, dd->ipath_kregs->kr_intstatus); | 830 | istat = ipath_read_kreg32(dd, dd->ipath_kregs->kr_intstatus); |
831 | |||
740 | if (unlikely(!istat)) { | 832 | if (unlikely(!istat)) { |
741 | ipath_stats.sps_nullintr++; | 833 | ipath_stats.sps_nullintr++; |
742 | ret = IRQ_NONE; /* not our interrupt, or already handled */ | 834 | ret = IRQ_NONE; /* not our interrupt, or already handled */ |
@@ -749,31 +841,17 @@ irqreturn_t ipath_intr(int irq, void *data, struct pt_regs *regs) | |||
749 | goto bail; | 841 | goto bail; |
750 | } | 842 | } |
751 | 843 | ||
752 | ipath_stats.sps_ints++; | ||
753 | |||
754 | /* | ||
755 | * this needs to be flags&initted, not statusp, so we keep | ||
756 | * taking interrupts even after link goes down, etc. | ||
757 | * Also, we *must* clear the interrupt at some point, or we won't | ||
758 | * take it again, which can be real bad for errors, etc... | ||
759 | */ | ||
760 | |||
761 | if (!(dd->ipath_flags & IPATH_INITTED)) { | ||
762 | ipath_bad_intr(dd, &unexpected); | ||
763 | ret = IRQ_NONE; | ||
764 | goto bail; | ||
765 | } | ||
766 | if (unexpected) | 844 | if (unexpected) |
767 | unexpected = 0; | 845 | unexpected = 0; |
768 | 846 | ||
769 | ipath_cdbg(VERBOSE, "intr stat=0x%x\n", istat); | 847 | if (unlikely(istat & ~infinipath_i_bitsextant)) |
770 | |||
771 | if (istat & ~infinipath_i_bitsextant) | ||
772 | ipath_dev_err(dd, | 848 | ipath_dev_err(dd, |
773 | "interrupt with unknown interrupts %x set\n", | 849 | "interrupt with unknown interrupts %x set\n", |
774 | istat & (u32) ~ infinipath_i_bitsextant); | 850 | istat & (u32) ~ infinipath_i_bitsextant); |
851 | else | ||
852 | ipath_cdbg(VERBOSE, "intr stat=0x%x\n", istat); | ||
775 | 853 | ||
776 | if (istat & INFINIPATH_I_ERROR) { | 854 | if (unlikely(istat & INFINIPATH_I_ERROR)) { |
777 | ipath_stats.sps_errints++; | 855 | ipath_stats.sps_errints++; |
778 | estat = ipath_read_kreg64(dd, | 856 | estat = ipath_read_kreg64(dd, |
779 | dd->ipath_kregs->kr_errorstatus); | 857 | dd->ipath_kregs->kr_errorstatus); |
@@ -788,10 +866,18 @@ irqreturn_t ipath_intr(int irq, void *data, struct pt_regs *regs) | |||
788 | ipath_dev_err(dd, "Read of error status failed " | 866 | ipath_dev_err(dd, "Read of error status failed " |
789 | "(all bits set); ignoring\n"); | 867 | "(all bits set); ignoring\n"); |
790 | else | 868 | else |
791 | handle_errors(dd, estat); | 869 | if (handle_errors(dd, estat)) |
870 | /* force calling ipath_kreceive() */ | ||
871 | chk0rcv = 1; | ||
792 | } | 872 | } |
793 | 873 | ||
794 | if (istat & INFINIPATH_I_GPIO) { | 874 | if (istat & INFINIPATH_I_GPIO) { |
875 | /* | ||
876 | * Packets are available in the port 0 rcv queue. | ||
877 | * Eventually this needs to be generalized to check | ||
878 | * IPATH_GPIO_INTR, and the specific GPIO bit, if | ||
879 | * GPIO interrupts are used for anything else. | ||
880 | */ | ||
795 | if (unlikely(!(dd->ipath_flags & IPATH_GPIO_INTR))) { | 881 | if (unlikely(!(dd->ipath_flags & IPATH_GPIO_INTR))) { |
796 | u32 gpiostatus; | 882 | u32 gpiostatus; |
797 | gpiostatus = ipath_read_kreg32( | 883 | gpiostatus = ipath_read_kreg32( |
@@ -804,27 +890,39 @@ irqreturn_t ipath_intr(int irq, void *data, struct pt_regs *regs) | |||
804 | else { | 890 | else { |
805 | /* Clear GPIO status bit 2 */ | 891 | /* Clear GPIO status bit 2 */ |
806 | ipath_write_kreg(dd, dd->ipath_kregs->kr_gpio_clear, | 892 | ipath_write_kreg(dd, dd->ipath_kregs->kr_gpio_clear, |
807 | (u64) (1 << 2)); | 893 | (u64) (1 << 2)); |
808 | 894 | chk0rcv = 1; | |
809 | /* | ||
810 | * Packets are available in the port 0 rcv queue. | ||
811 | * Eventually this needs to be generalized to check | ||
812 | * IPATH_GPIO_INTR, and the specific GPIO bit, if | ||
813 | * GPIO interrupts are used for anything else. | ||
814 | */ | ||
815 | ipath_kreceive(dd); | ||
816 | } | 895 | } |
817 | } | 896 | } |
897 | chk0rcv |= istat & port0rbits; | ||
818 | 898 | ||
819 | /* | 899 | /* |
820 | * clear the ones we will deal with on this round | 900 | * Clear the interrupt bits we found set, unless they are receive |
821 | * We clear it early, mostly for receive interrupts, so we | 901 | * related, in which case we already cleared them above, and don't |
822 | * know the chip will have seen this by the time we process | 902 | * want to clear them again, because we might lose an interrupt. |
823 | * the queue, and will re-interrupt if necessary. The processor | 903 | * Clear it early, so we "know" know the chip will have seen this by |
824 | * itself won't take the interrupt again until we return. | 904 | * the time we process the queue, and will re-interrupt if necessary. |
905 | * The processor itself won't take the interrupt again until we return. | ||
825 | */ | 906 | */ |
826 | ipath_write_kreg(dd, dd->ipath_kregs->kr_intclear, istat); | 907 | ipath_write_kreg(dd, dd->ipath_kregs->kr_intclear, istat); |
827 | 908 | ||
909 | /* | ||
910 | * handle port0 receive before checking for pio buffers available, | ||
911 | * since receives can overflow; piobuf waiters can afford a few | ||
912 | * extra cycles, since they were waiting anyway, and user's waiting | ||
913 | * for receive are at the bottom. | ||
914 | */ | ||
915 | if (chk0rcv) { | ||
916 | ipath_kreceive(dd); | ||
917 | istat &= ~port0rbits; | ||
918 | } | ||
919 | |||
920 | if (istat & ((infinipath_i_rcvavail_mask << | ||
921 | INFINIPATH_I_RCVAVAIL_SHIFT) | ||
922 | | (infinipath_i_rcvurg_mask << | ||
923 | INFINIPATH_I_RCVURG_SHIFT))) | ||
924 | handle_urcv(dd, istat); | ||
925 | |||
828 | if (istat & INFINIPATH_I_SPIOBUFAVAIL) { | 926 | if (istat & INFINIPATH_I_SPIOBUFAVAIL) { |
829 | clear_bit(IPATH_S_PIOINTBUFAVAIL, &dd->ipath_sendctrl); | 927 | clear_bit(IPATH_S_PIOINTBUFAVAIL, &dd->ipath_sendctrl); |
830 | ipath_write_kreg(dd, dd->ipath_kregs->kr_sendctrl, | 928 | ipath_write_kreg(dd, dd->ipath_kregs->kr_sendctrl, |
@@ -836,17 +934,7 @@ irqreturn_t ipath_intr(int irq, void *data, struct pt_regs *regs) | |||
836 | handle_layer_pioavail(dd); | 934 | handle_layer_pioavail(dd); |
837 | } | 935 | } |
838 | 936 | ||
839 | /* | 937 | done: |
840 | * we check for both transition from empty to non-empty, and urgent | ||
841 | * packets (those with the interrupt bit set in the header) | ||
842 | */ | ||
843 | |||
844 | if (istat & ((infinipath_i_rcvavail_mask << | ||
845 | INFINIPATH_I_RCVAVAIL_SHIFT) | ||
846 | | (infinipath_i_rcvurg_mask << | ||
847 | INFINIPATH_I_RCVURG_SHIFT))) | ||
848 | handle_rcv(dd, istat); | ||
849 | |||
850 | ret = IRQ_HANDLED; | 938 | ret = IRQ_HANDLED; |
851 | 939 | ||
852 | bail: | 940 | bail: |
diff --git a/drivers/infiniband/hw/ipath/ipath_kernel.h b/drivers/infiniband/hw/ipath/ipath_kernel.h index 5d92d57b6f54..e9f374fb641e 100644 --- a/drivers/infiniband/hw/ipath/ipath_kernel.h +++ b/drivers/infiniband/hw/ipath/ipath_kernel.h | |||
@@ -1,6 +1,7 @@ | |||
1 | #ifndef _IPATH_KERNEL_H | 1 | #ifndef _IPATH_KERNEL_H |
2 | #define _IPATH_KERNEL_H | 2 | #define _IPATH_KERNEL_H |
3 | /* | 3 | /* |
4 | * Copyright (c) 2006 QLogic, Inc. All rights reserved. | ||
4 | * Copyright (c) 2003, 2004, 2005, 2006 PathScale, Inc. All rights reserved. | 5 | * Copyright (c) 2003, 2004, 2005, 2006 PathScale, Inc. All rights reserved. |
5 | * | 6 | * |
6 | * This software is available to you under a choice of one of two | 7 | * This software is available to you under a choice of one of two |
@@ -61,9 +62,7 @@ struct ipath_portdata { | |||
61 | /* rcvhdrq base, needs mmap before useful */ | 62 | /* rcvhdrq base, needs mmap before useful */ |
62 | void *port_rcvhdrq; | 63 | void *port_rcvhdrq; |
63 | /* kernel virtual address where hdrqtail is updated */ | 64 | /* kernel virtual address where hdrqtail is updated */ |
64 | u64 *port_rcvhdrtail_kvaddr; | 65 | volatile __le64 *port_rcvhdrtail_kvaddr; |
65 | /* page * used for uaddr */ | ||
66 | struct page *port_rcvhdrtail_pagep; | ||
67 | /* | 66 | /* |
68 | * temp buffer for expected send setup, allocated at open, instead | 67 | * temp buffer for expected send setup, allocated at open, instead |
69 | * of each setup call | 68 | * of each setup call |
@@ -78,11 +77,7 @@ struct ipath_portdata { | |||
78 | dma_addr_t port_rcvegr_phys; | 77 | dma_addr_t port_rcvegr_phys; |
79 | /* mmap of hdrq, must fit in 44 bits */ | 78 | /* mmap of hdrq, must fit in 44 bits */ |
80 | dma_addr_t port_rcvhdrq_phys; | 79 | dma_addr_t port_rcvhdrq_phys; |
81 | /* | 80 | dma_addr_t port_rcvhdrqtailaddr_phys; |
82 | * the actual user address that we ipath_mlock'ed, so we can | ||
83 | * ipath_munlock it at close | ||
84 | */ | ||
85 | unsigned long port_rcvhdrtail_uaddr; | ||
86 | /* | 81 | /* |
87 | * number of opens on this instance (0 or 1; ignoring forks, dup, | 82 | * number of opens on this instance (0 or 1; ignoring forks, dup, |
88 | * etc. for now) | 83 | * etc. for now) |
@@ -158,16 +153,10 @@ struct ipath_devdata { | |||
158 | /* base of memory alloced for ipath_kregbase, for free */ | 153 | /* base of memory alloced for ipath_kregbase, for free */ |
159 | u64 *ipath_kregalloc; | 154 | u64 *ipath_kregalloc; |
160 | /* | 155 | /* |
161 | * version of kregbase that doesn't have high bits set (for 32 bit | ||
162 | * programs, so mmap64 44 bit works) | ||
163 | */ | ||
164 | u64 __iomem *ipath_kregvirt; | ||
165 | /* | ||
166 | * virtual address where port0 rcvhdrqtail updated for this unit. | 156 | * virtual address where port0 rcvhdrqtail updated for this unit. |
167 | * only written to by the chip, not the driver. | 157 | * only written to by the chip, not the driver. |
168 | */ | 158 | */ |
169 | volatile __le64 *ipath_hdrqtailptr; | 159 | volatile __le64 *ipath_hdrqtailptr; |
170 | dma_addr_t ipath_dma_addr; | ||
171 | /* ipath_cfgports pointers */ | 160 | /* ipath_cfgports pointers */ |
172 | struct ipath_portdata **ipath_pd; | 161 | struct ipath_portdata **ipath_pd; |
173 | /* sk_buffs used by port 0 eager receive queue */ | 162 | /* sk_buffs used by port 0 eager receive queue */ |
@@ -354,13 +343,17 @@ struct ipath_devdata { | |||
354 | char *ipath_freezemsg; | 343 | char *ipath_freezemsg; |
355 | /* pci access data structure */ | 344 | /* pci access data structure */ |
356 | struct pci_dev *pcidev; | 345 | struct pci_dev *pcidev; |
357 | struct cdev *cdev; | 346 | struct cdev *user_cdev; |
358 | struct class_device *class_dev; | 347 | struct cdev *diag_cdev; |
348 | struct class_device *user_class_dev; | ||
349 | struct class_device *diag_class_dev; | ||
359 | /* timer used to prevent stats overflow, error throttling, etc. */ | 350 | /* timer used to prevent stats overflow, error throttling, etc. */ |
360 | struct timer_list ipath_stats_timer; | 351 | struct timer_list ipath_stats_timer; |
361 | /* check for stale messages in rcv queue */ | 352 | /* check for stale messages in rcv queue */ |
362 | /* only allow one intr at a time. */ | 353 | /* only allow one intr at a time. */ |
363 | unsigned long ipath_rcv_pending; | 354 | unsigned long ipath_rcv_pending; |
355 | void *ipath_dummy_hdrq; /* used after port close */ | ||
356 | dma_addr_t ipath_dummy_hdrq_phys; | ||
364 | 357 | ||
365 | /* | 358 | /* |
366 | * Shadow copies of registers; size indicates read access size. | 359 | * Shadow copies of registers; size indicates read access size. |
@@ -500,8 +493,11 @@ struct ipath_devdata { | |||
500 | u16 ipath_lid; | 493 | u16 ipath_lid; |
501 | /* list of pkeys programmed; 0 if not set */ | 494 | /* list of pkeys programmed; 0 if not set */ |
502 | u16 ipath_pkeys[4]; | 495 | u16 ipath_pkeys[4]; |
503 | /* ASCII serial number, from flash */ | 496 | /* |
504 | u8 ipath_serial[12]; | 497 | * ASCII serial number, from flash, large enough for original |
498 | * all digit strings, and longer QLogic serial number format | ||
499 | */ | ||
500 | u8 ipath_serial[16]; | ||
505 | /* human readable board version */ | 501 | /* human readable board version */ |
506 | u8 ipath_boardversion[80]; | 502 | u8 ipath_boardversion[80]; |
507 | /* chip major rev, from ipath_revision */ | 503 | /* chip major rev, from ipath_revision */ |
@@ -516,12 +512,12 @@ struct ipath_devdata { | |||
516 | u8 ipath_pci_cacheline; | 512 | u8 ipath_pci_cacheline; |
517 | /* LID mask control */ | 513 | /* LID mask control */ |
518 | u8 ipath_lmc; | 514 | u8 ipath_lmc; |
519 | }; | ||
520 | |||
521 | extern volatile __le64 *ipath_port0_rcvhdrtail; | ||
522 | extern dma_addr_t ipath_port0_rcvhdrtail_dma; | ||
523 | 515 | ||
524 | #define IPATH_PORT0_RCVHDRTAIL_SIZE PAGE_SIZE | 516 | /* local link integrity counter */ |
517 | u32 ipath_lli_counter; | ||
518 | /* local link integrity errors */ | ||
519 | u32 ipath_lli_errors; | ||
520 | }; | ||
525 | 521 | ||
526 | extern struct list_head ipath_dev_list; | 522 | extern struct list_head ipath_dev_list; |
527 | extern spinlock_t ipath_devs_lock; | 523 | extern spinlock_t ipath_devs_lock; |
@@ -537,7 +533,7 @@ extern int __ipath_verbs_piobufavail(struct ipath_devdata *); | |||
537 | extern int __ipath_verbs_rcv(struct ipath_devdata *, void *, void *, u32); | 533 | extern int __ipath_verbs_rcv(struct ipath_devdata *, void *, void *, u32); |
538 | 534 | ||
539 | void ipath_layer_add(struct ipath_devdata *); | 535 | void ipath_layer_add(struct ipath_devdata *); |
540 | void ipath_layer_del(struct ipath_devdata *); | 536 | void ipath_layer_remove(struct ipath_devdata *); |
541 | 537 | ||
542 | int ipath_init_chip(struct ipath_devdata *, int); | 538 | int ipath_init_chip(struct ipath_devdata *, int); |
543 | int ipath_enable_wc(struct ipath_devdata *dd); | 539 | int ipath_enable_wc(struct ipath_devdata *dd); |
@@ -551,14 +547,14 @@ int ipath_cdev_init(int minor, char *name, struct file_operations *fops, | |||
551 | void ipath_cdev_cleanup(struct cdev **cdevp, | 547 | void ipath_cdev_cleanup(struct cdev **cdevp, |
552 | struct class_device **class_devp); | 548 | struct class_device **class_devp); |
553 | 549 | ||
554 | int ipath_diag_init(void); | 550 | int ipath_diag_add(struct ipath_devdata *); |
555 | void ipath_diag_cleanup(void); | 551 | void ipath_diag_remove(struct ipath_devdata *); |
556 | void ipath_diag_bringup_link(struct ipath_devdata *); | 552 | void ipath_diag_bringup_link(struct ipath_devdata *); |
557 | 553 | ||
558 | extern wait_queue_head_t ipath_sma_state_wait; | 554 | extern wait_queue_head_t ipath_sma_state_wait; |
559 | 555 | ||
560 | int ipath_user_add(struct ipath_devdata *dd); | 556 | int ipath_user_add(struct ipath_devdata *dd); |
561 | void ipath_user_del(struct ipath_devdata *dd); | 557 | void ipath_user_remove(struct ipath_devdata *dd); |
562 | 558 | ||
563 | struct sk_buff *ipath_alloc_skb(struct ipath_devdata *dd, gfp_t); | 559 | struct sk_buff *ipath_alloc_skb(struct ipath_devdata *dd, gfp_t); |
564 | 560 | ||
@@ -582,7 +578,7 @@ void ipath_disarm_piobufs(struct ipath_devdata *, unsigned first, | |||
582 | unsigned cnt); | 578 | unsigned cnt); |
583 | 579 | ||
584 | int ipath_create_rcvhdrq(struct ipath_devdata *, struct ipath_portdata *); | 580 | int ipath_create_rcvhdrq(struct ipath_devdata *, struct ipath_portdata *); |
585 | void ipath_free_pddata(struct ipath_devdata *, u32, int); | 581 | void ipath_free_pddata(struct ipath_devdata *, struct ipath_portdata *); |
586 | 582 | ||
587 | int ipath_parse_ushort(const char *str, unsigned short *valp); | 583 | int ipath_parse_ushort(const char *str, unsigned short *valp); |
588 | 584 | ||
@@ -720,13 +716,8 @@ u64 ipath_read_kreg64_port(const struct ipath_devdata *, ipath_kreg, | |||
720 | * @port: port number | 716 | * @port: port number |
721 | * | 717 | * |
722 | * Return the contents of a register that is virtualized to be per port. | 718 | * Return the contents of a register that is virtualized to be per port. |
723 | * Prints a debug message and returns -1 on errors (not distinguishable from | 719 | * Returns -1 on errors (not distinguishable from valid contents at |
724 | * valid contents at runtime; we may add a separate error variable at some | 720 | * runtime; we may add a separate error variable at some point). |
725 | * point). | ||
726 | * | ||
727 | * This is normally not used by the kernel, but may be for debugging, and | ||
728 | * has a different implementation than user mode, which is why it's not in | ||
729 | * _common.h. | ||
730 | */ | 721 | */ |
731 | static inline u32 ipath_read_ureg32(const struct ipath_devdata *dd, | 722 | static inline u32 ipath_read_ureg32(const struct ipath_devdata *dd, |
732 | ipath_ureg regno, int port) | 723 | ipath_ureg regno, int port) |
@@ -842,9 +833,10 @@ extern struct mutex ipath_mutex; | |||
842 | 833 | ||
843 | #define IPATH_DRV_NAME "ipath_core" | 834 | #define IPATH_DRV_NAME "ipath_core" |
844 | #define IPATH_MAJOR 233 | 835 | #define IPATH_MAJOR 233 |
836 | #define IPATH_USER_MINOR_BASE 0 | ||
845 | #define IPATH_SMA_MINOR 128 | 837 | #define IPATH_SMA_MINOR 128 |
846 | #define IPATH_DIAG_MINOR 129 | 838 | #define IPATH_DIAG_MINOR_BASE 129 |
847 | #define IPATH_NMINORS 130 | 839 | #define IPATH_NMINORS 255 |
848 | 840 | ||
849 | #define ipath_dev_err(dd,fmt,...) \ | 841 | #define ipath_dev_err(dd,fmt,...) \ |
850 | do { \ | 842 | do { \ |
diff --git a/drivers/infiniband/hw/ipath/ipath_keys.c b/drivers/infiniband/hw/ipath/ipath_keys.c index 5ae8761f9dd2..46773c673a1a 100644 --- a/drivers/infiniband/hw/ipath/ipath_keys.c +++ b/drivers/infiniband/hw/ipath/ipath_keys.c | |||
@@ -1,4 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2006 QLogic, Inc. All rights reserved. | ||
2 | * Copyright (c) 2005, 2006 PathScale, Inc. All rights reserved. | 3 | * Copyright (c) 2005, 2006 PathScale, Inc. All rights reserved. |
3 | * | 4 | * |
4 | * This software is available to you under a choice of one of two | 5 | * This software is available to you under a choice of one of two |
@@ -120,6 +121,7 @@ int ipath_lkey_ok(struct ipath_lkey_table *rkt, struct ipath_sge *isge, | |||
120 | struct ib_sge *sge, int acc) | 121 | struct ib_sge *sge, int acc) |
121 | { | 122 | { |
122 | struct ipath_mregion *mr; | 123 | struct ipath_mregion *mr; |
124 | unsigned n, m; | ||
123 | size_t off; | 125 | size_t off; |
124 | int ret; | 126 | int ret; |
125 | 127 | ||
@@ -151,20 +153,22 @@ int ipath_lkey_ok(struct ipath_lkey_table *rkt, struct ipath_sge *isge, | |||
151 | } | 153 | } |
152 | 154 | ||
153 | off += mr->offset; | 155 | off += mr->offset; |
154 | isge->mr = mr; | 156 | m = 0; |
155 | isge->m = 0; | 157 | n = 0; |
156 | isge->n = 0; | 158 | while (off >= mr->map[m]->segs[n].length) { |
157 | while (off >= mr->map[isge->m]->segs[isge->n].length) { | 159 | off -= mr->map[m]->segs[n].length; |
158 | off -= mr->map[isge->m]->segs[isge->n].length; | 160 | n++; |
159 | isge->n++; | 161 | if (n >= IPATH_SEGSZ) { |
160 | if (isge->n >= IPATH_SEGSZ) { | 162 | m++; |
161 | isge->m++; | 163 | n = 0; |
162 | isge->n = 0; | ||
163 | } | 164 | } |
164 | } | 165 | } |
165 | isge->vaddr = mr->map[isge->m]->segs[isge->n].vaddr + off; | 166 | isge->mr = mr; |
166 | isge->length = mr->map[isge->m]->segs[isge->n].length - off; | 167 | isge->vaddr = mr->map[m]->segs[n].vaddr + off; |
168 | isge->length = mr->map[m]->segs[n].length - off; | ||
167 | isge->sge_length = sge->length; | 169 | isge->sge_length = sge->length; |
170 | isge->m = m; | ||
171 | isge->n = n; | ||
168 | 172 | ||
169 | ret = 1; | 173 | ret = 1; |
170 | 174 | ||
@@ -189,6 +193,7 @@ int ipath_rkey_ok(struct ipath_ibdev *dev, struct ipath_sge_state *ss, | |||
189 | struct ipath_lkey_table *rkt = &dev->lk_table; | 193 | struct ipath_lkey_table *rkt = &dev->lk_table; |
190 | struct ipath_sge *sge = &ss->sge; | 194 | struct ipath_sge *sge = &ss->sge; |
191 | struct ipath_mregion *mr; | 195 | struct ipath_mregion *mr; |
196 | unsigned n, m; | ||
192 | size_t off; | 197 | size_t off; |
193 | int ret; | 198 | int ret; |
194 | 199 | ||
@@ -206,20 +211,22 @@ int ipath_rkey_ok(struct ipath_ibdev *dev, struct ipath_sge_state *ss, | |||
206 | } | 211 | } |
207 | 212 | ||
208 | off += mr->offset; | 213 | off += mr->offset; |
209 | sge->mr = mr; | 214 | m = 0; |
210 | sge->m = 0; | 215 | n = 0; |
211 | sge->n = 0; | 216 | while (off >= mr->map[m]->segs[n].length) { |
212 | while (off >= mr->map[sge->m]->segs[sge->n].length) { | 217 | off -= mr->map[m]->segs[n].length; |
213 | off -= mr->map[sge->m]->segs[sge->n].length; | 218 | n++; |
214 | sge->n++; | 219 | if (n >= IPATH_SEGSZ) { |
215 | if (sge->n >= IPATH_SEGSZ) { | 220 | m++; |
216 | sge->m++; | 221 | n = 0; |
217 | sge->n = 0; | ||
218 | } | 222 | } |
219 | } | 223 | } |
220 | sge->vaddr = mr->map[sge->m]->segs[sge->n].vaddr + off; | 224 | sge->mr = mr; |
221 | sge->length = mr->map[sge->m]->segs[sge->n].length - off; | 225 | sge->vaddr = mr->map[m]->segs[n].vaddr + off; |
226 | sge->length = mr->map[m]->segs[n].length - off; | ||
222 | sge->sge_length = len; | 227 | sge->sge_length = len; |
228 | sge->m = m; | ||
229 | sge->n = n; | ||
223 | ss->sg_list = NULL; | 230 | ss->sg_list = NULL; |
224 | ss->num_sge = 1; | 231 | ss->num_sge = 1; |
225 | 232 | ||
diff --git a/drivers/infiniband/hw/ipath/ipath_layer.c b/drivers/infiniband/hw/ipath/ipath_layer.c index 9ec4ac77b87f..b28c6f81c731 100644 --- a/drivers/infiniband/hw/ipath/ipath_layer.c +++ b/drivers/infiniband/hw/ipath/ipath_layer.c | |||
@@ -1,4 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2006 QLogic, Inc. All rights reserved. | ||
2 | * Copyright (c) 2003, 2004, 2005, 2006 PathScale, Inc. All rights reserved. | 3 | * Copyright (c) 2003, 2004, 2005, 2006 PathScale, Inc. All rights reserved. |
3 | * | 4 | * |
4 | * This software is available to you under a choice of one of two | 5 | * This software is available to you under a choice of one of two |
@@ -40,8 +41,8 @@ | |||
40 | #include <asm/byteorder.h> | 41 | #include <asm/byteorder.h> |
41 | 42 | ||
42 | #include "ipath_kernel.h" | 43 | #include "ipath_kernel.h" |
43 | #include "ips_common.h" | ||
44 | #include "ipath_layer.h" | 44 | #include "ipath_layer.h" |
45 | #include "ipath_common.h" | ||
45 | 46 | ||
46 | /* Acquire before ipath_devs_lock. */ | 47 | /* Acquire before ipath_devs_lock. */ |
47 | static DEFINE_MUTEX(ipath_layer_mutex); | 48 | static DEFINE_MUTEX(ipath_layer_mutex); |
@@ -299,9 +300,8 @@ bail: | |||
299 | 300 | ||
300 | EXPORT_SYMBOL_GPL(ipath_layer_set_mtu); | 301 | EXPORT_SYMBOL_GPL(ipath_layer_set_mtu); |
301 | 302 | ||
302 | int ipath_set_sps_lid(struct ipath_devdata *dd, u32 arg, u8 lmc) | 303 | int ipath_set_lid(struct ipath_devdata *dd, u32 arg, u8 lmc) |
303 | { | 304 | { |
304 | ipath_stats.sps_lid[dd->ipath_unit] = arg; | ||
305 | dd->ipath_lid = arg; | 305 | dd->ipath_lid = arg; |
306 | dd->ipath_lmc = lmc; | 306 | dd->ipath_lmc = lmc; |
307 | 307 | ||
@@ -315,7 +315,7 @@ int ipath_set_sps_lid(struct ipath_devdata *dd, u32 arg, u8 lmc) | |||
315 | return 0; | 315 | return 0; |
316 | } | 316 | } |
317 | 317 | ||
318 | EXPORT_SYMBOL_GPL(ipath_set_sps_lid); | 318 | EXPORT_SYMBOL_GPL(ipath_set_lid); |
319 | 319 | ||
320 | int ipath_layer_set_guid(struct ipath_devdata *dd, __be64 guid) | 320 | int ipath_layer_set_guid(struct ipath_devdata *dd, __be64 guid) |
321 | { | 321 | { |
@@ -340,18 +340,26 @@ u32 ipath_layer_get_nguid(struct ipath_devdata *dd) | |||
340 | 340 | ||
341 | EXPORT_SYMBOL_GPL(ipath_layer_get_nguid); | 341 | EXPORT_SYMBOL_GPL(ipath_layer_get_nguid); |
342 | 342 | ||
343 | int ipath_layer_query_device(struct ipath_devdata *dd, u32 * vendor, | 343 | u32 ipath_layer_get_majrev(struct ipath_devdata *dd) |
344 | u32 * boardrev, u32 * majrev, u32 * minrev) | ||
345 | { | 344 | { |
346 | *vendor = dd->ipath_vendorid; | 345 | return dd->ipath_majrev; |
347 | *boardrev = dd->ipath_boardrev; | 346 | } |
348 | *majrev = dd->ipath_majrev; | ||
349 | *minrev = dd->ipath_minrev; | ||
350 | 347 | ||
351 | return 0; | 348 | EXPORT_SYMBOL_GPL(ipath_layer_get_majrev); |
349 | |||
350 | u32 ipath_layer_get_minrev(struct ipath_devdata *dd) | ||
351 | { | ||
352 | return dd->ipath_minrev; | ||
353 | } | ||
354 | |||
355 | EXPORT_SYMBOL_GPL(ipath_layer_get_minrev); | ||
356 | |||
357 | u32 ipath_layer_get_pcirev(struct ipath_devdata *dd) | ||
358 | { | ||
359 | return dd->ipath_pcirev; | ||
352 | } | 360 | } |
353 | 361 | ||
354 | EXPORT_SYMBOL_GPL(ipath_layer_query_device); | 362 | EXPORT_SYMBOL_GPL(ipath_layer_get_pcirev); |
355 | 363 | ||
356 | u32 ipath_layer_get_flags(struct ipath_devdata *dd) | 364 | u32 ipath_layer_get_flags(struct ipath_devdata *dd) |
357 | { | 365 | { |
@@ -374,6 +382,13 @@ u16 ipath_layer_get_deviceid(struct ipath_devdata *dd) | |||
374 | 382 | ||
375 | EXPORT_SYMBOL_GPL(ipath_layer_get_deviceid); | 383 | EXPORT_SYMBOL_GPL(ipath_layer_get_deviceid); |
376 | 384 | ||
385 | u32 ipath_layer_get_vendorid(struct ipath_devdata *dd) | ||
386 | { | ||
387 | return dd->ipath_vendorid; | ||
388 | } | ||
389 | |||
390 | EXPORT_SYMBOL_GPL(ipath_layer_get_vendorid); | ||
391 | |||
377 | u64 ipath_layer_get_lastibcstat(struct ipath_devdata *dd) | 392 | u64 ipath_layer_get_lastibcstat(struct ipath_devdata *dd) |
378 | { | 393 | { |
379 | return dd->ipath_lastibcstat; | 394 | return dd->ipath_lastibcstat; |
@@ -403,7 +418,7 @@ void ipath_layer_add(struct ipath_devdata *dd) | |||
403 | mutex_unlock(&ipath_layer_mutex); | 418 | mutex_unlock(&ipath_layer_mutex); |
404 | } | 419 | } |
405 | 420 | ||
406 | void ipath_layer_del(struct ipath_devdata *dd) | 421 | void ipath_layer_remove(struct ipath_devdata *dd) |
407 | { | 422 | { |
408 | mutex_lock(&ipath_layer_mutex); | 423 | mutex_lock(&ipath_layer_mutex); |
409 | 424 | ||
@@ -607,7 +622,7 @@ int ipath_layer_open(struct ipath_devdata *dd, u32 * pktmax) | |||
607 | goto bail; | 622 | goto bail; |
608 | } | 623 | } |
609 | 624 | ||
610 | ret = ipath_setrcvhdrsize(dd, NUM_OF_EXTRA_WORDS_IN_HEADER_QUEUE); | 625 | ret = ipath_setrcvhdrsize(dd, IPATH_HEADER_QUEUE_WORDS); |
611 | 626 | ||
612 | if (ret < 0) | 627 | if (ret < 0) |
613 | goto bail; | 628 | goto bail; |
@@ -616,9 +631,9 @@ int ipath_layer_open(struct ipath_devdata *dd, u32 * pktmax) | |||
616 | 631 | ||
617 | if (*dd->ipath_statusp & IPATH_STATUS_IB_READY) | 632 | if (*dd->ipath_statusp & IPATH_STATUS_IB_READY) |
618 | intval |= IPATH_LAYER_INT_IF_UP; | 633 | intval |= IPATH_LAYER_INT_IF_UP; |
619 | if (ipath_stats.sps_lid[dd->ipath_unit]) | 634 | if (dd->ipath_lid) |
620 | intval |= IPATH_LAYER_INT_LID; | 635 | intval |= IPATH_LAYER_INT_LID; |
621 | if (ipath_stats.sps_mlid[dd->ipath_unit]) | 636 | if (dd->ipath_mlid) |
622 | intval |= IPATH_LAYER_INT_BCAST; | 637 | intval |= IPATH_LAYER_INT_BCAST; |
623 | /* | 638 | /* |
624 | * do this on open, in case low level is already up and | 639 | * do this on open, in case low level is already up and |
@@ -884,7 +899,7 @@ static void copy_io(u32 __iomem *piobuf, struct ipath_sge_state *ss, | |||
884 | /** | 899 | /** |
885 | * ipath_verbs_send - send a packet from the verbs layer | 900 | * ipath_verbs_send - send a packet from the verbs layer |
886 | * @dd: the infinipath device | 901 | * @dd: the infinipath device |
887 | * @hdrwords: the number of works in the header | 902 | * @hdrwords: the number of words in the header |
888 | * @hdr: the packet header | 903 | * @hdr: the packet header |
889 | * @len: the length of the packet in bytes | 904 | * @len: the length of the packet in bytes |
890 | * @ss: the SGE to send | 905 | * @ss: the SGE to send |
@@ -1016,19 +1031,22 @@ int ipath_layer_get_counters(struct ipath_devdata *dd, | |||
1016 | ipath_snap_cntr(dd, dd->ipath_cregs->cr_ibsymbolerrcnt); | 1031 | ipath_snap_cntr(dd, dd->ipath_cregs->cr_ibsymbolerrcnt); |
1017 | cntrs->link_error_recovery_counter = | 1032 | cntrs->link_error_recovery_counter = |
1018 | ipath_snap_cntr(dd, dd->ipath_cregs->cr_iblinkerrrecovcnt); | 1033 | ipath_snap_cntr(dd, dd->ipath_cregs->cr_iblinkerrrecovcnt); |
1034 | /* | ||
1035 | * The link downed counter counts when the other side downs the | ||
1036 | * connection. We add in the number of times we downed the link | ||
1037 | * due to local link integrity errors to compensate. | ||
1038 | */ | ||
1019 | cntrs->link_downed_counter = | 1039 | cntrs->link_downed_counter = |
1020 | ipath_snap_cntr(dd, dd->ipath_cregs->cr_iblinkdowncnt); | 1040 | ipath_snap_cntr(dd, dd->ipath_cregs->cr_iblinkdowncnt); |
1021 | cntrs->port_rcv_errors = | 1041 | cntrs->port_rcv_errors = |
1022 | ipath_snap_cntr(dd, dd->ipath_cregs->cr_rxdroppktcnt) + | 1042 | ipath_snap_cntr(dd, dd->ipath_cregs->cr_rxdroppktcnt) + |
1023 | ipath_snap_cntr(dd, dd->ipath_cregs->cr_rcvovflcnt) + | 1043 | ipath_snap_cntr(dd, dd->ipath_cregs->cr_rcvovflcnt) + |
1024 | ipath_snap_cntr(dd, dd->ipath_cregs->cr_portovflcnt) + | 1044 | ipath_snap_cntr(dd, dd->ipath_cregs->cr_portovflcnt) + |
1025 | ipath_snap_cntr(dd, dd->ipath_cregs->cr_errrcvflowctrlcnt) + | ||
1026 | ipath_snap_cntr(dd, dd->ipath_cregs->cr_err_rlencnt) + | 1045 | ipath_snap_cntr(dd, dd->ipath_cregs->cr_err_rlencnt) + |
1027 | ipath_snap_cntr(dd, dd->ipath_cregs->cr_invalidrlencnt) + | 1046 | ipath_snap_cntr(dd, dd->ipath_cregs->cr_invalidrlencnt) + |
1028 | ipath_snap_cntr(dd, dd->ipath_cregs->cr_erricrccnt) + | 1047 | ipath_snap_cntr(dd, dd->ipath_cregs->cr_erricrccnt) + |
1029 | ipath_snap_cntr(dd, dd->ipath_cregs->cr_errvcrccnt) + | 1048 | ipath_snap_cntr(dd, dd->ipath_cregs->cr_errvcrccnt) + |
1030 | ipath_snap_cntr(dd, dd->ipath_cregs->cr_errlpcrccnt) + | 1049 | ipath_snap_cntr(dd, dd->ipath_cregs->cr_errlpcrccnt) + |
1031 | ipath_snap_cntr(dd, dd->ipath_cregs->cr_errlinkcnt) + | ||
1032 | ipath_snap_cntr(dd, dd->ipath_cregs->cr_badformatcnt); | 1050 | ipath_snap_cntr(dd, dd->ipath_cregs->cr_badformatcnt); |
1033 | cntrs->port_rcv_remphys_errors = | 1051 | cntrs->port_rcv_remphys_errors = |
1034 | ipath_snap_cntr(dd, dd->ipath_cregs->cr_rcvebpcnt); | 1052 | ipath_snap_cntr(dd, dd->ipath_cregs->cr_rcvebpcnt); |
@@ -1042,6 +1060,8 @@ int ipath_layer_get_counters(struct ipath_devdata *dd, | |||
1042 | ipath_snap_cntr(dd, dd->ipath_cregs->cr_pktsendcnt); | 1060 | ipath_snap_cntr(dd, dd->ipath_cregs->cr_pktsendcnt); |
1043 | cntrs->port_rcv_packets = | 1061 | cntrs->port_rcv_packets = |
1044 | ipath_snap_cntr(dd, dd->ipath_cregs->cr_pktrcvcnt); | 1062 | ipath_snap_cntr(dd, dd->ipath_cregs->cr_pktrcvcnt); |
1063 | cntrs->local_link_integrity_errors = dd->ipath_lli_errors; | ||
1064 | cntrs->excessive_buffer_overrun_errors = 0; /* XXX */ | ||
1045 | 1065 | ||
1046 | ret = 0; | 1066 | ret = 0; |
1047 | 1067 | ||
@@ -1086,10 +1106,10 @@ int ipath_layer_send_hdr(struct ipath_devdata *dd, struct ether_header *hdr) | |||
1086 | } | 1106 | } |
1087 | 1107 | ||
1088 | vlsllnh = *((__be16 *) hdr); | 1108 | vlsllnh = *((__be16 *) hdr); |
1089 | if (vlsllnh != htons(IPS_LRH_BTH)) { | 1109 | if (vlsllnh != htons(IPATH_LRH_BTH)) { |
1090 | ipath_dbg("Warning: lrh[0] wrong (%x, not %x); " | 1110 | ipath_dbg("Warning: lrh[0] wrong (%x, not %x); " |
1091 | "not sending\n", be16_to_cpu(vlsllnh), | 1111 | "not sending\n", be16_to_cpu(vlsllnh), |
1092 | IPS_LRH_BTH); | 1112 | IPATH_LRH_BTH); |
1093 | ret = -EINVAL; | 1113 | ret = -EINVAL; |
1094 | } | 1114 | } |
1095 | if (ret) | 1115 | if (ret) |
diff --git a/drivers/infiniband/hw/ipath/ipath_layer.h b/drivers/infiniband/hw/ipath/ipath_layer.h index 6fefd15bd2da..71485096fcac 100644 --- a/drivers/infiniband/hw/ipath/ipath_layer.h +++ b/drivers/infiniband/hw/ipath/ipath_layer.h | |||
@@ -1,4 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2006 QLogic, Inc. All rights reserved. | ||
2 | * Copyright (c) 2003, 2004, 2005, 2006 PathScale, Inc. All rights reserved. | 3 | * Copyright (c) 2003, 2004, 2005, 2006 PathScale, Inc. All rights reserved. |
3 | * | 4 | * |
4 | * This software is available to you under a choice of one of two | 5 | * This software is available to you under a choice of one of two |
@@ -54,6 +55,8 @@ struct ipath_layer_counters { | |||
54 | u64 port_rcv_data; | 55 | u64 port_rcv_data; |
55 | u64 port_xmit_packets; | 56 | u64 port_xmit_packets; |
56 | u64 port_rcv_packets; | 57 | u64 port_rcv_packets; |
58 | u32 local_link_integrity_errors; | ||
59 | u32 excessive_buffer_overrun_errors; | ||
57 | }; | 60 | }; |
58 | 61 | ||
59 | /* | 62 | /* |
@@ -126,7 +129,7 @@ u16 ipath_layer_get_bcast(struct ipath_devdata *dd); | |||
126 | u32 ipath_layer_get_cr_errpkey(struct ipath_devdata *dd); | 129 | u32 ipath_layer_get_cr_errpkey(struct ipath_devdata *dd); |
127 | int ipath_layer_set_linkstate(struct ipath_devdata *dd, u8 state); | 130 | int ipath_layer_set_linkstate(struct ipath_devdata *dd, u8 state); |
128 | int ipath_layer_set_mtu(struct ipath_devdata *, u16); | 131 | int ipath_layer_set_mtu(struct ipath_devdata *, u16); |
129 | int ipath_set_sps_lid(struct ipath_devdata *, u32, u8); | 132 | int ipath_set_lid(struct ipath_devdata *, u32, u8); |
130 | int ipath_layer_send_hdr(struct ipath_devdata *dd, | 133 | int ipath_layer_send_hdr(struct ipath_devdata *dd, |
131 | struct ether_header *hdr); | 134 | struct ether_header *hdr); |
132 | int ipath_verbs_send(struct ipath_devdata *dd, u32 hdrwords, | 135 | int ipath_verbs_send(struct ipath_devdata *dd, u32 hdrwords, |
@@ -143,11 +146,13 @@ int ipath_layer_want_buffer(struct ipath_devdata *dd); | |||
143 | int ipath_layer_set_guid(struct ipath_devdata *, __be64 guid); | 146 | int ipath_layer_set_guid(struct ipath_devdata *, __be64 guid); |
144 | __be64 ipath_layer_get_guid(struct ipath_devdata *); | 147 | __be64 ipath_layer_get_guid(struct ipath_devdata *); |
145 | u32 ipath_layer_get_nguid(struct ipath_devdata *); | 148 | u32 ipath_layer_get_nguid(struct ipath_devdata *); |
146 | int ipath_layer_query_device(struct ipath_devdata *, u32 * vendor, | 149 | u32 ipath_layer_get_majrev(struct ipath_devdata *); |
147 | u32 * boardrev, u32 * majrev, u32 * minrev); | 150 | u32 ipath_layer_get_minrev(struct ipath_devdata *); |
151 | u32 ipath_layer_get_pcirev(struct ipath_devdata *); | ||
148 | u32 ipath_layer_get_flags(struct ipath_devdata *dd); | 152 | u32 ipath_layer_get_flags(struct ipath_devdata *dd); |
149 | struct device *ipath_layer_get_device(struct ipath_devdata *dd); | 153 | struct device *ipath_layer_get_device(struct ipath_devdata *dd); |
150 | u16 ipath_layer_get_deviceid(struct ipath_devdata *dd); | 154 | u16 ipath_layer_get_deviceid(struct ipath_devdata *dd); |
155 | u32 ipath_layer_get_vendorid(struct ipath_devdata *); | ||
151 | u64 ipath_layer_get_lastibcstat(struct ipath_devdata *dd); | 156 | u64 ipath_layer_get_lastibcstat(struct ipath_devdata *dd); |
152 | u32 ipath_layer_get_ibmtu(struct ipath_devdata *dd); | 157 | u32 ipath_layer_get_ibmtu(struct ipath_devdata *dd); |
153 | int ipath_layer_enable_timer(struct ipath_devdata *dd); | 158 | int ipath_layer_enable_timer(struct ipath_devdata *dd); |
diff --git a/drivers/infiniband/hw/ipath/ipath_mad.c b/drivers/infiniband/hw/ipath/ipath_mad.c index 1a9d0a2c33c3..d3402341b7d0 100644 --- a/drivers/infiniband/hw/ipath/ipath_mad.c +++ b/drivers/infiniband/hw/ipath/ipath_mad.c | |||
@@ -1,4 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2006 QLogic, Inc. All rights reserved. | ||
2 | * Copyright (c) 2005, 2006 PathScale, Inc. All rights reserved. | 3 | * Copyright (c) 2005, 2006 PathScale, Inc. All rights reserved. |
3 | * | 4 | * |
4 | * This software is available to you under a choice of one of two | 5 | * This software is available to you under a choice of one of two |
@@ -34,7 +35,7 @@ | |||
34 | 35 | ||
35 | #include "ipath_kernel.h" | 36 | #include "ipath_kernel.h" |
36 | #include "ipath_verbs.h" | 37 | #include "ipath_verbs.h" |
37 | #include "ips_common.h" | 38 | #include "ipath_common.h" |
38 | 39 | ||
39 | #define IB_SMP_UNSUP_VERSION __constant_htons(0x0004) | 40 | #define IB_SMP_UNSUP_VERSION __constant_htons(0x0004) |
40 | #define IB_SMP_UNSUP_METHOD __constant_htons(0x0008) | 41 | #define IB_SMP_UNSUP_METHOD __constant_htons(0x0008) |
@@ -84,7 +85,7 @@ static int recv_subn_get_nodeinfo(struct ib_smp *smp, | |||
84 | { | 85 | { |
85 | struct nodeinfo *nip = (struct nodeinfo *)&smp->data; | 86 | struct nodeinfo *nip = (struct nodeinfo *)&smp->data; |
86 | struct ipath_devdata *dd = to_idev(ibdev)->dd; | 87 | struct ipath_devdata *dd = to_idev(ibdev)->dd; |
87 | u32 vendor, boardid, majrev, minrev; | 88 | u32 vendor, majrev, minrev; |
88 | 89 | ||
89 | if (smp->attr_mod) | 90 | if (smp->attr_mod) |
90 | smp->status |= IB_SMP_INVALID_FIELD; | 91 | smp->status |= IB_SMP_INVALID_FIELD; |
@@ -104,9 +105,11 @@ static int recv_subn_get_nodeinfo(struct ib_smp *smp, | |||
104 | nip->port_guid = nip->sys_guid; | 105 | nip->port_guid = nip->sys_guid; |
105 | nip->partition_cap = cpu_to_be16(ipath_layer_get_npkeys(dd)); | 106 | nip->partition_cap = cpu_to_be16(ipath_layer_get_npkeys(dd)); |
106 | nip->device_id = cpu_to_be16(ipath_layer_get_deviceid(dd)); | 107 | nip->device_id = cpu_to_be16(ipath_layer_get_deviceid(dd)); |
107 | ipath_layer_query_device(dd, &vendor, &boardid, &majrev, &minrev); | 108 | majrev = ipath_layer_get_majrev(dd); |
109 | minrev = ipath_layer_get_minrev(dd); | ||
108 | nip->revision = cpu_to_be32((majrev << 16) | minrev); | 110 | nip->revision = cpu_to_be32((majrev << 16) | minrev); |
109 | nip->local_port_num = port; | 111 | nip->local_port_num = port; |
112 | vendor = ipath_layer_get_vendorid(dd); | ||
110 | nip->vendor_id[0] = 0; | 113 | nip->vendor_id[0] = 0; |
111 | nip->vendor_id[1] = vendor >> 8; | 114 | nip->vendor_id[1] = vendor >> 8; |
112 | nip->vendor_id[2] = vendor; | 115 | nip->vendor_id[2] = vendor; |
@@ -215,7 +218,7 @@ static int recv_subn_get_portinfo(struct ib_smp *smp, | |||
215 | /* P_KeyViolations are counted by hardware. */ | 218 | /* P_KeyViolations are counted by hardware. */ |
216 | pip->pkey_violations = | 219 | pip->pkey_violations = |
217 | cpu_to_be16((ipath_layer_get_cr_errpkey(dev->dd) - | 220 | cpu_to_be16((ipath_layer_get_cr_errpkey(dev->dd) - |
218 | dev->n_pkey_violations) & 0xFFFF); | 221 | dev->z_pkey_violations) & 0xFFFF); |
219 | pip->qkey_violations = cpu_to_be16(dev->qkey_violations); | 222 | pip->qkey_violations = cpu_to_be16(dev->qkey_violations); |
220 | /* Only the hardware GUID is supported for now */ | 223 | /* Only the hardware GUID is supported for now */ |
221 | pip->guid_cap = 1; | 224 | pip->guid_cap = 1; |
@@ -303,9 +306,9 @@ static int recv_subn_set_portinfo(struct ib_smp *smp, | |||
303 | lid = be16_to_cpu(pip->lid); | 306 | lid = be16_to_cpu(pip->lid); |
304 | if (lid != ipath_layer_get_lid(dev->dd)) { | 307 | if (lid != ipath_layer_get_lid(dev->dd)) { |
305 | /* Must be a valid unicast LID address. */ | 308 | /* Must be a valid unicast LID address. */ |
306 | if (lid == 0 || lid >= IPS_MULTICAST_LID_BASE) | 309 | if (lid == 0 || lid >= IPATH_MULTICAST_LID_BASE) |
307 | goto err; | 310 | goto err; |
308 | ipath_set_sps_lid(dev->dd, lid, pip->mkeyprot_resv_lmc & 7); | 311 | ipath_set_lid(dev->dd, lid, pip->mkeyprot_resv_lmc & 7); |
309 | event.event = IB_EVENT_LID_CHANGE; | 312 | event.event = IB_EVENT_LID_CHANGE; |
310 | ib_dispatch_event(&event); | 313 | ib_dispatch_event(&event); |
311 | } | 314 | } |
@@ -313,7 +316,7 @@ static int recv_subn_set_portinfo(struct ib_smp *smp, | |||
313 | smlid = be16_to_cpu(pip->sm_lid); | 316 | smlid = be16_to_cpu(pip->sm_lid); |
314 | if (smlid != dev->sm_lid) { | 317 | if (smlid != dev->sm_lid) { |
315 | /* Must be a valid unicast LID address. */ | 318 | /* Must be a valid unicast LID address. */ |
316 | if (smlid == 0 || smlid >= IPS_MULTICAST_LID_BASE) | 319 | if (smlid == 0 || smlid >= IPATH_MULTICAST_LID_BASE) |
317 | goto err; | 320 | goto err; |
318 | dev->sm_lid = smlid; | 321 | dev->sm_lid = smlid; |
319 | event.event = IB_EVENT_SM_CHANGE; | 322 | event.event = IB_EVENT_SM_CHANGE; |
@@ -389,7 +392,7 @@ static int recv_subn_set_portinfo(struct ib_smp *smp, | |||
389 | * later. | 392 | * later. |
390 | */ | 393 | */ |
391 | if (pip->pkey_violations == 0) | 394 | if (pip->pkey_violations == 0) |
392 | dev->n_pkey_violations = | 395 | dev->z_pkey_violations = |
393 | ipath_layer_get_cr_errpkey(dev->dd); | 396 | ipath_layer_get_cr_errpkey(dev->dd); |
394 | 397 | ||
395 | if (pip->qkey_violations == 0) | 398 | if (pip->qkey_violations == 0) |
@@ -610,6 +613,9 @@ struct ib_pma_portcounters { | |||
610 | #define IB_PMA_SEL_PORT_RCV_ERRORS __constant_htons(0x0008) | 613 | #define IB_PMA_SEL_PORT_RCV_ERRORS __constant_htons(0x0008) |
611 | #define IB_PMA_SEL_PORT_RCV_REMPHYS_ERRORS __constant_htons(0x0010) | 614 | #define IB_PMA_SEL_PORT_RCV_REMPHYS_ERRORS __constant_htons(0x0010) |
612 | #define IB_PMA_SEL_PORT_XMIT_DISCARDS __constant_htons(0x0040) | 615 | #define IB_PMA_SEL_PORT_XMIT_DISCARDS __constant_htons(0x0040) |
616 | #define IB_PMA_SEL_LOCAL_LINK_INTEGRITY_ERRORS __constant_htons(0x0200) | ||
617 | #define IB_PMA_SEL_EXCESSIVE_BUFFER_OVERRUNS __constant_htons(0x0400) | ||
618 | #define IB_PMA_SEL_PORT_VL15_DROPPED __constant_htons(0x0800) | ||
613 | #define IB_PMA_SEL_PORT_XMIT_DATA __constant_htons(0x1000) | 619 | #define IB_PMA_SEL_PORT_XMIT_DATA __constant_htons(0x1000) |
614 | #define IB_PMA_SEL_PORT_RCV_DATA __constant_htons(0x2000) | 620 | #define IB_PMA_SEL_PORT_RCV_DATA __constant_htons(0x2000) |
615 | #define IB_PMA_SEL_PORT_XMIT_PACKETS __constant_htons(0x4000) | 621 | #define IB_PMA_SEL_PORT_XMIT_PACKETS __constant_htons(0x4000) |
@@ -844,18 +850,22 @@ static int recv_pma_get_portcounters(struct ib_perf *pmp, | |||
844 | ipath_layer_get_counters(dev->dd, &cntrs); | 850 | ipath_layer_get_counters(dev->dd, &cntrs); |
845 | 851 | ||
846 | /* Adjust counters for any resets done. */ | 852 | /* Adjust counters for any resets done. */ |
847 | cntrs.symbol_error_counter -= dev->n_symbol_error_counter; | 853 | cntrs.symbol_error_counter -= dev->z_symbol_error_counter; |
848 | cntrs.link_error_recovery_counter -= | 854 | cntrs.link_error_recovery_counter -= |
849 | dev->n_link_error_recovery_counter; | 855 | dev->z_link_error_recovery_counter; |
850 | cntrs.link_downed_counter -= dev->n_link_downed_counter; | 856 | cntrs.link_downed_counter -= dev->z_link_downed_counter; |
851 | cntrs.port_rcv_errors += dev->rcv_errors; | 857 | cntrs.port_rcv_errors += dev->rcv_errors; |
852 | cntrs.port_rcv_errors -= dev->n_port_rcv_errors; | 858 | cntrs.port_rcv_errors -= dev->z_port_rcv_errors; |
853 | cntrs.port_rcv_remphys_errors -= dev->n_port_rcv_remphys_errors; | 859 | cntrs.port_rcv_remphys_errors -= dev->z_port_rcv_remphys_errors; |
854 | cntrs.port_xmit_discards -= dev->n_port_xmit_discards; | 860 | cntrs.port_xmit_discards -= dev->z_port_xmit_discards; |
855 | cntrs.port_xmit_data -= dev->n_port_xmit_data; | 861 | cntrs.port_xmit_data -= dev->z_port_xmit_data; |
856 | cntrs.port_rcv_data -= dev->n_port_rcv_data; | 862 | cntrs.port_rcv_data -= dev->z_port_rcv_data; |
857 | cntrs.port_xmit_packets -= dev->n_port_xmit_packets; | 863 | cntrs.port_xmit_packets -= dev->z_port_xmit_packets; |
858 | cntrs.port_rcv_packets -= dev->n_port_rcv_packets; | 864 | cntrs.port_rcv_packets -= dev->z_port_rcv_packets; |
865 | cntrs.local_link_integrity_errors -= | ||
866 | dev->z_local_link_integrity_errors; | ||
867 | cntrs.excessive_buffer_overrun_errors -= | ||
868 | dev->z_excessive_buffer_overrun_errors; | ||
859 | 869 | ||
860 | memset(pmp->data, 0, sizeof(pmp->data)); | 870 | memset(pmp->data, 0, sizeof(pmp->data)); |
861 | 871 | ||
@@ -893,6 +903,16 @@ static int recv_pma_get_portcounters(struct ib_perf *pmp, | |||
893 | else | 903 | else |
894 | p->port_xmit_discards = | 904 | p->port_xmit_discards = |
895 | cpu_to_be16((u16)cntrs.port_xmit_discards); | 905 | cpu_to_be16((u16)cntrs.port_xmit_discards); |
906 | if (cntrs.local_link_integrity_errors > 0xFUL) | ||
907 | cntrs.local_link_integrity_errors = 0xFUL; | ||
908 | if (cntrs.excessive_buffer_overrun_errors > 0xFUL) | ||
909 | cntrs.excessive_buffer_overrun_errors = 0xFUL; | ||
910 | p->lli_ebor_errors = (cntrs.local_link_integrity_errors << 4) | | ||
911 | cntrs.excessive_buffer_overrun_errors; | ||
912 | if (dev->n_vl15_dropped > 0xFFFFUL) | ||
913 | p->vl15_dropped = __constant_cpu_to_be16(0xFFFF); | ||
914 | else | ||
915 | p->vl15_dropped = cpu_to_be16((u16)dev->n_vl15_dropped); | ||
896 | if (cntrs.port_xmit_data > 0xFFFFFFFFUL) | 916 | if (cntrs.port_xmit_data > 0xFFFFFFFFUL) |
897 | p->port_xmit_data = __constant_cpu_to_be32(0xFFFFFFFF); | 917 | p->port_xmit_data = __constant_cpu_to_be32(0xFFFFFFFF); |
898 | else | 918 | else |
@@ -928,10 +948,10 @@ static int recv_pma_get_portcounters_ext(struct ib_perf *pmp, | |||
928 | &rpkts, &xwait); | 948 | &rpkts, &xwait); |
929 | 949 | ||
930 | /* Adjust counters for any resets done. */ | 950 | /* Adjust counters for any resets done. */ |
931 | swords -= dev->n_port_xmit_data; | 951 | swords -= dev->z_port_xmit_data; |
932 | rwords -= dev->n_port_rcv_data; | 952 | rwords -= dev->z_port_rcv_data; |
933 | spkts -= dev->n_port_xmit_packets; | 953 | spkts -= dev->z_port_xmit_packets; |
934 | rpkts -= dev->n_port_rcv_packets; | 954 | rpkts -= dev->z_port_rcv_packets; |
935 | 955 | ||
936 | memset(pmp->data, 0, sizeof(pmp->data)); | 956 | memset(pmp->data, 0, sizeof(pmp->data)); |
937 | 957 | ||
@@ -967,37 +987,48 @@ static int recv_pma_set_portcounters(struct ib_perf *pmp, | |||
967 | ipath_layer_get_counters(dev->dd, &cntrs); | 987 | ipath_layer_get_counters(dev->dd, &cntrs); |
968 | 988 | ||
969 | if (p->counter_select & IB_PMA_SEL_SYMBOL_ERROR) | 989 | if (p->counter_select & IB_PMA_SEL_SYMBOL_ERROR) |
970 | dev->n_symbol_error_counter = cntrs.symbol_error_counter; | 990 | dev->z_symbol_error_counter = cntrs.symbol_error_counter; |
971 | 991 | ||
972 | if (p->counter_select & IB_PMA_SEL_LINK_ERROR_RECOVERY) | 992 | if (p->counter_select & IB_PMA_SEL_LINK_ERROR_RECOVERY) |
973 | dev->n_link_error_recovery_counter = | 993 | dev->z_link_error_recovery_counter = |
974 | cntrs.link_error_recovery_counter; | 994 | cntrs.link_error_recovery_counter; |
975 | 995 | ||
976 | if (p->counter_select & IB_PMA_SEL_LINK_DOWNED) | 996 | if (p->counter_select & IB_PMA_SEL_LINK_DOWNED) |
977 | dev->n_link_downed_counter = cntrs.link_downed_counter; | 997 | dev->z_link_downed_counter = cntrs.link_downed_counter; |
978 | 998 | ||
979 | if (p->counter_select & IB_PMA_SEL_PORT_RCV_ERRORS) | 999 | if (p->counter_select & IB_PMA_SEL_PORT_RCV_ERRORS) |
980 | dev->n_port_rcv_errors = | 1000 | dev->z_port_rcv_errors = |
981 | cntrs.port_rcv_errors + dev->rcv_errors; | 1001 | cntrs.port_rcv_errors + dev->rcv_errors; |
982 | 1002 | ||
983 | if (p->counter_select & IB_PMA_SEL_PORT_RCV_REMPHYS_ERRORS) | 1003 | if (p->counter_select & IB_PMA_SEL_PORT_RCV_REMPHYS_ERRORS) |
984 | dev->n_port_rcv_remphys_errors = | 1004 | dev->z_port_rcv_remphys_errors = |
985 | cntrs.port_rcv_remphys_errors; | 1005 | cntrs.port_rcv_remphys_errors; |
986 | 1006 | ||
987 | if (p->counter_select & IB_PMA_SEL_PORT_XMIT_DISCARDS) | 1007 | if (p->counter_select & IB_PMA_SEL_PORT_XMIT_DISCARDS) |
988 | dev->n_port_xmit_discards = cntrs.port_xmit_discards; | 1008 | dev->z_port_xmit_discards = cntrs.port_xmit_discards; |
1009 | |||
1010 | if (p->counter_select & IB_PMA_SEL_LOCAL_LINK_INTEGRITY_ERRORS) | ||
1011 | dev->z_local_link_integrity_errors = | ||
1012 | cntrs.local_link_integrity_errors; | ||
1013 | |||
1014 | if (p->counter_select & IB_PMA_SEL_EXCESSIVE_BUFFER_OVERRUNS) | ||
1015 | dev->z_excessive_buffer_overrun_errors = | ||
1016 | cntrs.excessive_buffer_overrun_errors; | ||
1017 | |||
1018 | if (p->counter_select & IB_PMA_SEL_PORT_VL15_DROPPED) | ||
1019 | dev->n_vl15_dropped = 0; | ||
989 | 1020 | ||
990 | if (p->counter_select & IB_PMA_SEL_PORT_XMIT_DATA) | 1021 | if (p->counter_select & IB_PMA_SEL_PORT_XMIT_DATA) |
991 | dev->n_port_xmit_data = cntrs.port_xmit_data; | 1022 | dev->z_port_xmit_data = cntrs.port_xmit_data; |
992 | 1023 | ||
993 | if (p->counter_select & IB_PMA_SEL_PORT_RCV_DATA) | 1024 | if (p->counter_select & IB_PMA_SEL_PORT_RCV_DATA) |
994 | dev->n_port_rcv_data = cntrs.port_rcv_data; | 1025 | dev->z_port_rcv_data = cntrs.port_rcv_data; |
995 | 1026 | ||
996 | if (p->counter_select & IB_PMA_SEL_PORT_XMIT_PACKETS) | 1027 | if (p->counter_select & IB_PMA_SEL_PORT_XMIT_PACKETS) |
997 | dev->n_port_xmit_packets = cntrs.port_xmit_packets; | 1028 | dev->z_port_xmit_packets = cntrs.port_xmit_packets; |
998 | 1029 | ||
999 | if (p->counter_select & IB_PMA_SEL_PORT_RCV_PACKETS) | 1030 | if (p->counter_select & IB_PMA_SEL_PORT_RCV_PACKETS) |
1000 | dev->n_port_rcv_packets = cntrs.port_rcv_packets; | 1031 | dev->z_port_rcv_packets = cntrs.port_rcv_packets; |
1001 | 1032 | ||
1002 | return recv_pma_get_portcounters(pmp, ibdev, port); | 1033 | return recv_pma_get_portcounters(pmp, ibdev, port); |
1003 | } | 1034 | } |
@@ -1014,16 +1045,16 @@ static int recv_pma_set_portcounters_ext(struct ib_perf *pmp, | |||
1014 | &rpkts, &xwait); | 1045 | &rpkts, &xwait); |
1015 | 1046 | ||
1016 | if (p->counter_select & IB_PMA_SELX_PORT_XMIT_DATA) | 1047 | if (p->counter_select & IB_PMA_SELX_PORT_XMIT_DATA) |
1017 | dev->n_port_xmit_data = swords; | 1048 | dev->z_port_xmit_data = swords; |
1018 | 1049 | ||
1019 | if (p->counter_select & IB_PMA_SELX_PORT_RCV_DATA) | 1050 | if (p->counter_select & IB_PMA_SELX_PORT_RCV_DATA) |
1020 | dev->n_port_rcv_data = rwords; | 1051 | dev->z_port_rcv_data = rwords; |
1021 | 1052 | ||
1022 | if (p->counter_select & IB_PMA_SELX_PORT_XMIT_PACKETS) | 1053 | if (p->counter_select & IB_PMA_SELX_PORT_XMIT_PACKETS) |
1023 | dev->n_port_xmit_packets = spkts; | 1054 | dev->z_port_xmit_packets = spkts; |
1024 | 1055 | ||
1025 | if (p->counter_select & IB_PMA_SELX_PORT_RCV_PACKETS) | 1056 | if (p->counter_select & IB_PMA_SELX_PORT_RCV_PACKETS) |
1026 | dev->n_port_rcv_packets = rpkts; | 1057 | dev->z_port_rcv_packets = rpkts; |
1027 | 1058 | ||
1028 | if (p->counter_select & IB_PMA_SELX_PORT_UNI_XMIT_PACKETS) | 1059 | if (p->counter_select & IB_PMA_SELX_PORT_UNI_XMIT_PACKETS) |
1029 | dev->n_unicast_xmit = 0; | 1060 | dev->n_unicast_xmit = 0; |
@@ -1272,32 +1303,8 @@ int ipath_process_mad(struct ib_device *ibdev, int mad_flags, u8 port_num, | |||
1272 | struct ib_wc *in_wc, struct ib_grh *in_grh, | 1303 | struct ib_wc *in_wc, struct ib_grh *in_grh, |
1273 | struct ib_mad *in_mad, struct ib_mad *out_mad) | 1304 | struct ib_mad *in_mad, struct ib_mad *out_mad) |
1274 | { | 1305 | { |
1275 | struct ipath_ibdev *dev = to_idev(ibdev); | ||
1276 | int ret; | 1306 | int ret; |
1277 | 1307 | ||
1278 | /* | ||
1279 | * Snapshot current HW counters to "clear" them. | ||
1280 | * This should be done when the driver is loaded except that for | ||
1281 | * some reason we get a zillion errors when brining up the link. | ||
1282 | */ | ||
1283 | if (dev->rcv_errors == 0) { | ||
1284 | struct ipath_layer_counters cntrs; | ||
1285 | |||
1286 | ipath_layer_get_counters(to_idev(ibdev)->dd, &cntrs); | ||
1287 | dev->rcv_errors++; | ||
1288 | dev->n_symbol_error_counter = cntrs.symbol_error_counter; | ||
1289 | dev->n_link_error_recovery_counter = | ||
1290 | cntrs.link_error_recovery_counter; | ||
1291 | dev->n_link_downed_counter = cntrs.link_downed_counter; | ||
1292 | dev->n_port_rcv_errors = cntrs.port_rcv_errors + 1; | ||
1293 | dev->n_port_rcv_remphys_errors = | ||
1294 | cntrs.port_rcv_remphys_errors; | ||
1295 | dev->n_port_xmit_discards = cntrs.port_xmit_discards; | ||
1296 | dev->n_port_xmit_data = cntrs.port_xmit_data; | ||
1297 | dev->n_port_rcv_data = cntrs.port_rcv_data; | ||
1298 | dev->n_port_xmit_packets = cntrs.port_xmit_packets; | ||
1299 | dev->n_port_rcv_packets = cntrs.port_rcv_packets; | ||
1300 | } | ||
1301 | switch (in_mad->mad_hdr.mgmt_class) { | 1308 | switch (in_mad->mad_hdr.mgmt_class) { |
1302 | case IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE: | 1309 | case IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE: |
1303 | case IB_MGMT_CLASS_SUBN_LID_ROUTED: | 1310 | case IB_MGMT_CLASS_SUBN_LID_ROUTED: |
diff --git a/drivers/infiniband/hw/ipath/ipath_mr.c b/drivers/infiniband/hw/ipath/ipath_mr.c index 69ffec66d45d..4ac31a5da330 100644 --- a/drivers/infiniband/hw/ipath/ipath_mr.c +++ b/drivers/infiniband/hw/ipath/ipath_mr.c | |||
@@ -1,4 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2006 QLogic, Inc. All rights reserved. | ||
2 | * Copyright (c) 2005, 2006 PathScale, Inc. All rights reserved. | 3 | * Copyright (c) 2005, 2006 PathScale, Inc. All rights reserved. |
3 | * | 4 | * |
4 | * This software is available to you under a choice of one of two | 5 | * This software is available to you under a choice of one of two |
@@ -169,6 +170,11 @@ struct ib_mr *ipath_reg_user_mr(struct ib_pd *pd, struct ib_umem *region, | |||
169 | int n, m, i; | 170 | int n, m, i; |
170 | struct ib_mr *ret; | 171 | struct ib_mr *ret; |
171 | 172 | ||
173 | if (region->length == 0) { | ||
174 | ret = ERR_PTR(-EINVAL); | ||
175 | goto bail; | ||
176 | } | ||
177 | |||
172 | n = 0; | 178 | n = 0; |
173 | list_for_each_entry(chunk, ®ion->chunk_list, list) | 179 | list_for_each_entry(chunk, ®ion->chunk_list, list) |
174 | n += chunk->nents; | 180 | n += chunk->nents; |
diff --git a/drivers/infiniband/hw/ipath/ipath_pe800.c b/drivers/infiniband/hw/ipath/ipath_pe800.c index 02e8c75b24f6..b83f66d8262c 100644 --- a/drivers/infiniband/hw/ipath/ipath_pe800.c +++ b/drivers/infiniband/hw/ipath/ipath_pe800.c | |||
@@ -1,4 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2006 QLogic, Inc. All rights reserved. | ||
2 | * Copyright (c) 2003, 2004, 2005, 2006 PathScale, Inc. All rights reserved. | 3 | * Copyright (c) 2003, 2004, 2005, 2006 PathScale, Inc. All rights reserved. |
3 | * | 4 | * |
4 | * This software is available to you under a choice of one of two | 5 | * This software is available to you under a choice of one of two |
@@ -44,7 +45,7 @@ | |||
44 | 45 | ||
45 | /* | 46 | /* |
46 | * This file contains all the chip-specific register information and | 47 | * This file contains all the chip-specific register information and |
47 | * access functions for the PathScale PE800, the PCI-Express chip. | 48 | * access functions for the QLogic InfiniPath PE800, the PCI-Express chip. |
48 | * | 49 | * |
49 | * This lists the InfiniPath PE800 registers, in the actual chip layout. | 50 | * This lists the InfiniPath PE800 registers, in the actual chip layout. |
50 | * This structure should never be directly accessed. | 51 | * This structure should never be directly accessed. |
@@ -532,7 +533,7 @@ static int ipath_pe_boardname(struct ipath_devdata *dd, char *name, | |||
532 | if (n) | 533 | if (n) |
533 | snprintf(name, namelen, "%s", n); | 534 | snprintf(name, namelen, "%s", n); |
534 | 535 | ||
535 | if (dd->ipath_majrev != 4 || dd->ipath_minrev != 1) { | 536 | if (dd->ipath_majrev != 4 || !dd->ipath_minrev || dd->ipath_minrev>2) { |
536 | ipath_dev_err(dd, "Unsupported PE-800 revision %u.%u!\n", | 537 | ipath_dev_err(dd, "Unsupported PE-800 revision %u.%u!\n", |
537 | dd->ipath_majrev, dd->ipath_minrev); | 538 | dd->ipath_majrev, dd->ipath_minrev); |
538 | ret = 1; | 539 | ret = 1; |
diff --git a/drivers/infiniband/hw/ipath/ipath_qp.c b/drivers/infiniband/hw/ipath/ipath_qp.c index 9f8855d970c8..83e557be591e 100644 --- a/drivers/infiniband/hw/ipath/ipath_qp.c +++ b/drivers/infiniband/hw/ipath/ipath_qp.c | |||
@@ -1,4 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2006 QLogic, Inc. All rights reserved. | ||
2 | * Copyright (c) 2005, 2006 PathScale, Inc. All rights reserved. | 3 | * Copyright (c) 2005, 2006 PathScale, Inc. All rights reserved. |
3 | * | 4 | * |
4 | * This software is available to you under a choice of one of two | 5 | * This software is available to you under a choice of one of two |
@@ -34,7 +35,7 @@ | |||
34 | #include <linux/vmalloc.h> | 35 | #include <linux/vmalloc.h> |
35 | 36 | ||
36 | #include "ipath_verbs.h" | 37 | #include "ipath_verbs.h" |
37 | #include "ips_common.h" | 38 | #include "ipath_common.h" |
38 | 39 | ||
39 | #define BITS_PER_PAGE (PAGE_SIZE*BITS_PER_BYTE) | 40 | #define BITS_PER_PAGE (PAGE_SIZE*BITS_PER_BYTE) |
40 | #define BITS_PER_PAGE_MASK (BITS_PER_PAGE-1) | 41 | #define BITS_PER_PAGE_MASK (BITS_PER_PAGE-1) |
@@ -332,10 +333,11 @@ static void ipath_reset_qp(struct ipath_qp *qp) | |||
332 | qp->remote_qpn = 0; | 333 | qp->remote_qpn = 0; |
333 | qp->qkey = 0; | 334 | qp->qkey = 0; |
334 | qp->qp_access_flags = 0; | 335 | qp->qp_access_flags = 0; |
336 | clear_bit(IPATH_S_BUSY, &qp->s_flags); | ||
335 | qp->s_hdrwords = 0; | 337 | qp->s_hdrwords = 0; |
336 | qp->s_psn = 0; | 338 | qp->s_psn = 0; |
337 | qp->r_psn = 0; | 339 | qp->r_psn = 0; |
338 | atomic_set(&qp->msn, 0); | 340 | qp->r_msn = 0; |
339 | if (qp->ibqp.qp_type == IB_QPT_RC) { | 341 | if (qp->ibqp.qp_type == IB_QPT_RC) { |
340 | qp->s_state = IB_OPCODE_RC_SEND_LAST; | 342 | qp->s_state = IB_OPCODE_RC_SEND_LAST; |
341 | qp->r_state = IB_OPCODE_RC_SEND_LAST; | 343 | qp->r_state = IB_OPCODE_RC_SEND_LAST; |
@@ -344,7 +346,8 @@ static void ipath_reset_qp(struct ipath_qp *qp) | |||
344 | qp->r_state = IB_OPCODE_UC_SEND_LAST; | 346 | qp->r_state = IB_OPCODE_UC_SEND_LAST; |
345 | } | 347 | } |
346 | qp->s_ack_state = IB_OPCODE_RC_ACKNOWLEDGE; | 348 | qp->s_ack_state = IB_OPCODE_RC_ACKNOWLEDGE; |
347 | qp->s_nak_state = 0; | 349 | qp->r_ack_state = IB_OPCODE_RC_ACKNOWLEDGE; |
350 | qp->r_nak_state = 0; | ||
348 | qp->s_rnr_timeout = 0; | 351 | qp->s_rnr_timeout = 0; |
349 | qp->s_head = 0; | 352 | qp->s_head = 0; |
350 | qp->s_tail = 0; | 353 | qp->s_tail = 0; |
@@ -362,10 +365,10 @@ static void ipath_reset_qp(struct ipath_qp *qp) | |||
362 | * @qp: the QP to put into an error state | 365 | * @qp: the QP to put into an error state |
363 | * | 366 | * |
364 | * Flushes both send and receive work queues. | 367 | * Flushes both send and receive work queues. |
365 | * QP r_rq.lock and s_lock should be held. | 368 | * QP s_lock should be held and interrupts disabled. |
366 | */ | 369 | */ |
367 | 370 | ||
368 | static void ipath_error_qp(struct ipath_qp *qp) | 371 | void ipath_error_qp(struct ipath_qp *qp) |
369 | { | 372 | { |
370 | struct ipath_ibdev *dev = to_idev(qp->ibqp.device); | 373 | struct ipath_ibdev *dev = to_idev(qp->ibqp.device); |
371 | struct ib_wc wc; | 374 | struct ib_wc wc; |
@@ -408,12 +411,14 @@ static void ipath_error_qp(struct ipath_qp *qp) | |||
408 | qp->s_ack_state = IB_OPCODE_RC_ACKNOWLEDGE; | 411 | qp->s_ack_state = IB_OPCODE_RC_ACKNOWLEDGE; |
409 | 412 | ||
410 | wc.opcode = IB_WC_RECV; | 413 | wc.opcode = IB_WC_RECV; |
414 | spin_lock(&qp->r_rq.lock); | ||
411 | while (qp->r_rq.tail != qp->r_rq.head) { | 415 | while (qp->r_rq.tail != qp->r_rq.head) { |
412 | wc.wr_id = get_rwqe_ptr(&qp->r_rq, qp->r_rq.tail)->wr_id; | 416 | wc.wr_id = get_rwqe_ptr(&qp->r_rq, qp->r_rq.tail)->wr_id; |
413 | if (++qp->r_rq.tail >= qp->r_rq.size) | 417 | if (++qp->r_rq.tail >= qp->r_rq.size) |
414 | qp->r_rq.tail = 0; | 418 | qp->r_rq.tail = 0; |
415 | ipath_cq_enter(to_icq(qp->ibqp.recv_cq), &wc, 1); | 419 | ipath_cq_enter(to_icq(qp->ibqp.recv_cq), &wc, 1); |
416 | } | 420 | } |
421 | spin_unlock(&qp->r_rq.lock); | ||
417 | } | 422 | } |
418 | 423 | ||
419 | /** | 424 | /** |
@@ -433,8 +438,7 @@ int ipath_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, | |||
433 | unsigned long flags; | 438 | unsigned long flags; |
434 | int ret; | 439 | int ret; |
435 | 440 | ||
436 | spin_lock_irqsave(&qp->r_rq.lock, flags); | 441 | spin_lock_irqsave(&qp->s_lock, flags); |
437 | spin_lock(&qp->s_lock); | ||
438 | 442 | ||
439 | cur_state = attr_mask & IB_QP_CUR_STATE ? | 443 | cur_state = attr_mask & IB_QP_CUR_STATE ? |
440 | attr->cur_qp_state : qp->state; | 444 | attr->cur_qp_state : qp->state; |
@@ -446,7 +450,7 @@ int ipath_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, | |||
446 | 450 | ||
447 | if (attr_mask & IB_QP_AV) | 451 | if (attr_mask & IB_QP_AV) |
448 | if (attr->ah_attr.dlid == 0 || | 452 | if (attr->ah_attr.dlid == 0 || |
449 | attr->ah_attr.dlid >= IPS_MULTICAST_LID_BASE) | 453 | attr->ah_attr.dlid >= IPATH_MULTICAST_LID_BASE) |
450 | goto inval; | 454 | goto inval; |
451 | 455 | ||
452 | if (attr_mask & IB_QP_PKEY_INDEX) | 456 | if (attr_mask & IB_QP_PKEY_INDEX) |
@@ -505,34 +509,19 @@ int ipath_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, | |||
505 | } | 509 | } |
506 | 510 | ||
507 | if (attr_mask & IB_QP_MIN_RNR_TIMER) | 511 | if (attr_mask & IB_QP_MIN_RNR_TIMER) |
508 | qp->s_min_rnr_timer = attr->min_rnr_timer; | 512 | qp->r_min_rnr_timer = attr->min_rnr_timer; |
509 | 513 | ||
510 | if (attr_mask & IB_QP_QKEY) | 514 | if (attr_mask & IB_QP_QKEY) |
511 | qp->qkey = attr->qkey; | 515 | qp->qkey = attr->qkey; |
512 | 516 | ||
513 | if (attr_mask & IB_QP_PKEY_INDEX) | ||
514 | qp->s_pkey_index = attr->pkey_index; | ||
515 | |||
516 | qp->state = new_state; | 517 | qp->state = new_state; |
517 | spin_unlock(&qp->s_lock); | 518 | spin_unlock_irqrestore(&qp->s_lock, flags); |
518 | spin_unlock_irqrestore(&qp->r_rq.lock, flags); | ||
519 | |||
520 | /* | ||
521 | * If QP1 changed to the RTS state, try to move to the link to INIT | ||
522 | * even if it was ACTIVE so the SM will reinitialize the SMA's | ||
523 | * state. | ||
524 | */ | ||
525 | if (qp->ibqp.qp_num == 1 && new_state == IB_QPS_RTS) { | ||
526 | struct ipath_ibdev *dev = to_idev(ibqp->device); | ||
527 | 519 | ||
528 | ipath_layer_set_linkstate(dev->dd, IPATH_IB_LINKDOWN); | ||
529 | } | ||
530 | ret = 0; | 520 | ret = 0; |
531 | goto bail; | 521 | goto bail; |
532 | 522 | ||
533 | inval: | 523 | inval: |
534 | spin_unlock(&qp->s_lock); | 524 | spin_unlock_irqrestore(&qp->s_lock, flags); |
535 | spin_unlock_irqrestore(&qp->r_rq.lock, flags); | ||
536 | ret = -EINVAL; | 525 | ret = -EINVAL; |
537 | 526 | ||
538 | bail: | 527 | bail: |
@@ -566,7 +555,7 @@ int ipath_query_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, | |||
566 | attr->sq_draining = 0; | 555 | attr->sq_draining = 0; |
567 | attr->max_rd_atomic = 1; | 556 | attr->max_rd_atomic = 1; |
568 | attr->max_dest_rd_atomic = 1; | 557 | attr->max_dest_rd_atomic = 1; |
569 | attr->min_rnr_timer = qp->s_min_rnr_timer; | 558 | attr->min_rnr_timer = qp->r_min_rnr_timer; |
570 | attr->port_num = 1; | 559 | attr->port_num = 1; |
571 | attr->timeout = 0; | 560 | attr->timeout = 0; |
572 | attr->retry_cnt = qp->s_retry_cnt; | 561 | attr->retry_cnt = qp->s_retry_cnt; |
@@ -593,21 +582,17 @@ int ipath_query_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, | |||
593 | * @qp: the queue pair to compute the AETH for | 582 | * @qp: the queue pair to compute the AETH for |
594 | * | 583 | * |
595 | * Returns the AETH. | 584 | * Returns the AETH. |
596 | * | ||
597 | * The QP s_lock should be held. | ||
598 | */ | 585 | */ |
599 | __be32 ipath_compute_aeth(struct ipath_qp *qp) | 586 | __be32 ipath_compute_aeth(struct ipath_qp *qp) |
600 | { | 587 | { |
601 | u32 aeth = atomic_read(&qp->msn) & IPS_MSN_MASK; | 588 | u32 aeth = qp->r_msn & IPATH_MSN_MASK; |
602 | 589 | ||
603 | if (qp->s_nak_state) { | 590 | if (qp->ibqp.srq) { |
604 | aeth |= qp->s_nak_state << IPS_AETH_CREDIT_SHIFT; | ||
605 | } else if (qp->ibqp.srq) { | ||
606 | /* | 591 | /* |
607 | * Shared receive queues don't generate credits. | 592 | * Shared receive queues don't generate credits. |
608 | * Set the credit field to the invalid value. | 593 | * Set the credit field to the invalid value. |
609 | */ | 594 | */ |
610 | aeth |= IPS_AETH_CREDIT_INVAL << IPS_AETH_CREDIT_SHIFT; | 595 | aeth |= IPATH_AETH_CREDIT_INVAL << IPATH_AETH_CREDIT_SHIFT; |
611 | } else { | 596 | } else { |
612 | u32 min, max, x; | 597 | u32 min, max, x; |
613 | u32 credits; | 598 | u32 credits; |
@@ -637,7 +622,7 @@ __be32 ipath_compute_aeth(struct ipath_qp *qp) | |||
637 | else | 622 | else |
638 | min = x; | 623 | min = x; |
639 | } | 624 | } |
640 | aeth |= x << IPS_AETH_CREDIT_SHIFT; | 625 | aeth |= x << IPATH_AETH_CREDIT_SHIFT; |
641 | } | 626 | } |
642 | return cpu_to_be32(aeth); | 627 | return cpu_to_be32(aeth); |
643 | } | 628 | } |
@@ -663,12 +648,22 @@ struct ib_qp *ipath_create_qp(struct ib_pd *ibpd, | |||
663 | size_t sz; | 648 | size_t sz; |
664 | struct ib_qp *ret; | 649 | struct ib_qp *ret; |
665 | 650 | ||
666 | if (init_attr->cap.max_send_sge > 255 || | 651 | if (init_attr->cap.max_send_sge > ib_ipath_max_sges || |
667 | init_attr->cap.max_recv_sge > 255) { | 652 | init_attr->cap.max_recv_sge > ib_ipath_max_sges || |
653 | init_attr->cap.max_send_wr > ib_ipath_max_qp_wrs || | ||
654 | init_attr->cap.max_recv_wr > ib_ipath_max_qp_wrs) { | ||
668 | ret = ERR_PTR(-ENOMEM); | 655 | ret = ERR_PTR(-ENOMEM); |
669 | goto bail; | 656 | goto bail; |
670 | } | 657 | } |
671 | 658 | ||
659 | if (init_attr->cap.max_send_sge + | ||
660 | init_attr->cap.max_recv_sge + | ||
661 | init_attr->cap.max_send_wr + | ||
662 | init_attr->cap.max_recv_wr == 0) { | ||
663 | ret = ERR_PTR(-EINVAL); | ||
664 | goto bail; | ||
665 | } | ||
666 | |||
672 | switch (init_attr->qp_type) { | 667 | switch (init_attr->qp_type) { |
673 | case IB_QPT_UC: | 668 | case IB_QPT_UC: |
674 | case IB_QPT_RC: | 669 | case IB_QPT_RC: |
@@ -686,18 +681,26 @@ struct ib_qp *ipath_create_qp(struct ib_pd *ibpd, | |||
686 | case IB_QPT_GSI: | 681 | case IB_QPT_GSI: |
687 | qp = kmalloc(sizeof(*qp), GFP_KERNEL); | 682 | qp = kmalloc(sizeof(*qp), GFP_KERNEL); |
688 | if (!qp) { | 683 | if (!qp) { |
684 | vfree(swq); | ||
689 | ret = ERR_PTR(-ENOMEM); | 685 | ret = ERR_PTR(-ENOMEM); |
690 | goto bail; | 686 | goto bail; |
691 | } | 687 | } |
692 | qp->r_rq.size = init_attr->cap.max_recv_wr + 1; | 688 | if (init_attr->srq) { |
693 | sz = sizeof(struct ipath_sge) * | 689 | qp->r_rq.size = 0; |
694 | init_attr->cap.max_recv_sge + | 690 | qp->r_rq.max_sge = 0; |
695 | sizeof(struct ipath_rwqe); | 691 | qp->r_rq.wq = NULL; |
696 | qp->r_rq.wq = vmalloc(qp->r_rq.size * sz); | 692 | } else { |
697 | if (!qp->r_rq.wq) { | 693 | qp->r_rq.size = init_attr->cap.max_recv_wr + 1; |
698 | kfree(qp); | 694 | qp->r_rq.max_sge = init_attr->cap.max_recv_sge; |
699 | ret = ERR_PTR(-ENOMEM); | 695 | sz = (sizeof(struct ipath_sge) * qp->r_rq.max_sge) + |
700 | goto bail; | 696 | sizeof(struct ipath_rwqe); |
697 | qp->r_rq.wq = vmalloc(qp->r_rq.size * sz); | ||
698 | if (!qp->r_rq.wq) { | ||
699 | kfree(qp); | ||
700 | vfree(swq); | ||
701 | ret = ERR_PTR(-ENOMEM); | ||
702 | goto bail; | ||
703 | } | ||
701 | } | 704 | } |
702 | 705 | ||
703 | /* | 706 | /* |
@@ -708,9 +711,7 @@ struct ib_qp *ipath_create_qp(struct ib_pd *ibpd, | |||
708 | spin_lock_init(&qp->r_rq.lock); | 711 | spin_lock_init(&qp->r_rq.lock); |
709 | atomic_set(&qp->refcount, 0); | 712 | atomic_set(&qp->refcount, 0); |
710 | init_waitqueue_head(&qp->wait); | 713 | init_waitqueue_head(&qp->wait); |
711 | tasklet_init(&qp->s_task, | 714 | tasklet_init(&qp->s_task, ipath_do_ruc_send, |
712 | init_attr->qp_type == IB_QPT_RC ? | ||
713 | ipath_do_rc_send : ipath_do_uc_send, | ||
714 | (unsigned long)qp); | 715 | (unsigned long)qp); |
715 | INIT_LIST_HEAD(&qp->piowait); | 716 | INIT_LIST_HEAD(&qp->piowait); |
716 | INIT_LIST_HEAD(&qp->timerwait); | 717 | INIT_LIST_HEAD(&qp->timerwait); |
@@ -718,7 +719,6 @@ struct ib_qp *ipath_create_qp(struct ib_pd *ibpd, | |||
718 | qp->s_wq = swq; | 719 | qp->s_wq = swq; |
719 | qp->s_size = init_attr->cap.max_send_wr + 1; | 720 | qp->s_size = init_attr->cap.max_send_wr + 1; |
720 | qp->s_max_sge = init_attr->cap.max_send_sge; | 721 | qp->s_max_sge = init_attr->cap.max_send_sge; |
721 | qp->r_rq.max_sge = init_attr->cap.max_recv_sge; | ||
722 | qp->s_flags = init_attr->sq_sig_type == IB_SIGNAL_REQ_WR ? | 722 | qp->s_flags = init_attr->sq_sig_type == IB_SIGNAL_REQ_WR ? |
723 | 1 << IPATH_S_SIGNAL_REQ_WR : 0; | 723 | 1 << IPATH_S_SIGNAL_REQ_WR : 0; |
724 | dev = to_idev(ibpd->device); | 724 | dev = to_idev(ibpd->device); |
@@ -888,18 +888,18 @@ void ipath_sqerror_qp(struct ipath_qp *qp, struct ib_wc *wc) | |||
888 | */ | 888 | */ |
889 | void ipath_get_credit(struct ipath_qp *qp, u32 aeth) | 889 | void ipath_get_credit(struct ipath_qp *qp, u32 aeth) |
890 | { | 890 | { |
891 | u32 credit = (aeth >> IPS_AETH_CREDIT_SHIFT) & IPS_AETH_CREDIT_MASK; | 891 | u32 credit = (aeth >> IPATH_AETH_CREDIT_SHIFT) & IPATH_AETH_CREDIT_MASK; |
892 | 892 | ||
893 | /* | 893 | /* |
894 | * If the credit is invalid, we can send | 894 | * If the credit is invalid, we can send |
895 | * as many packets as we like. Otherwise, we have to | 895 | * as many packets as we like. Otherwise, we have to |
896 | * honor the credit field. | 896 | * honor the credit field. |
897 | */ | 897 | */ |
898 | if (credit == IPS_AETH_CREDIT_INVAL) { | 898 | if (credit == IPATH_AETH_CREDIT_INVAL) |
899 | qp->s_lsn = (u32) -1; | 899 | qp->s_lsn = (u32) -1; |
900 | } else if (qp->s_lsn != (u32) -1) { | 900 | else if (qp->s_lsn != (u32) -1) { |
901 | /* Compute new LSN (i.e., MSN + credit) */ | 901 | /* Compute new LSN (i.e., MSN + credit) */ |
902 | credit = (aeth + credit_table[credit]) & IPS_MSN_MASK; | 902 | credit = (aeth + credit_table[credit]) & IPATH_MSN_MASK; |
903 | if (ipath_cmp24(credit, qp->s_lsn) > 0) | 903 | if (ipath_cmp24(credit, qp->s_lsn) > 0) |
904 | qp->s_lsn = credit; | 904 | qp->s_lsn = credit; |
905 | } | 905 | } |
diff --git a/drivers/infiniband/hw/ipath/ipath_rc.c b/drivers/infiniband/hw/ipath/ipath_rc.c index 493b1821a934..774d1615ce2f 100644 --- a/drivers/infiniband/hw/ipath/ipath_rc.c +++ b/drivers/infiniband/hw/ipath/ipath_rc.c | |||
@@ -1,4 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2006 QLogic, Inc. All rights reserved. | ||
2 | * Copyright (c) 2005, 2006 PathScale, Inc. All rights reserved. | 3 | * Copyright (c) 2005, 2006 PathScale, Inc. All rights reserved. |
3 | * | 4 | * |
4 | * This software is available to you under a choice of one of two | 5 | * This software is available to you under a choice of one of two |
@@ -31,7 +32,7 @@ | |||
31 | */ | 32 | */ |
32 | 33 | ||
33 | #include "ipath_verbs.h" | 34 | #include "ipath_verbs.h" |
34 | #include "ips_common.h" | 35 | #include "ipath_common.h" |
35 | 36 | ||
36 | /* cut down ridiculously long IB macro names */ | 37 | /* cut down ridiculously long IB macro names */ |
37 | #define OP(x) IB_OPCODE_RC_##x | 38 | #define OP(x) IB_OPCODE_RC_##x |
@@ -41,14 +42,14 @@ | |||
41 | * @qp: the QP who's SGE we're restarting | 42 | * @qp: the QP who's SGE we're restarting |
42 | * @wqe: the work queue to initialize the QP's SGE from | 43 | * @wqe: the work queue to initialize the QP's SGE from |
43 | * | 44 | * |
44 | * The QP s_lock should be held. | 45 | * The QP s_lock should be held and interrupts disabled. |
45 | */ | 46 | */ |
46 | static void ipath_init_restart(struct ipath_qp *qp, struct ipath_swqe *wqe) | 47 | static void ipath_init_restart(struct ipath_qp *qp, struct ipath_swqe *wqe) |
47 | { | 48 | { |
48 | struct ipath_ibdev *dev; | 49 | struct ipath_ibdev *dev; |
49 | u32 len; | 50 | u32 len; |
50 | 51 | ||
51 | len = ((qp->s_psn - wqe->psn) & IPS_PSN_MASK) * | 52 | len = ((qp->s_psn - wqe->psn) & IPATH_PSN_MASK) * |
52 | ib_mtu_enum_to_int(qp->path_mtu); | 53 | ib_mtu_enum_to_int(qp->path_mtu); |
53 | qp->s_sge.sge = wqe->sg_list[0]; | 54 | qp->s_sge.sge = wqe->sg_list[0]; |
54 | qp->s_sge.sg_list = wqe->sg_list + 1; | 55 | qp->s_sge.sg_list = wqe->sg_list + 1; |
@@ -72,11 +73,10 @@ static void ipath_init_restart(struct ipath_qp *qp, struct ipath_swqe *wqe) | |||
72 | * Return bth0 if constructed; otherwise, return 0. | 73 | * Return bth0 if constructed; otherwise, return 0. |
73 | * Note the QP s_lock must be held. | 74 | * Note the QP s_lock must be held. |
74 | */ | 75 | */ |
75 | static inline u32 ipath_make_rc_ack(struct ipath_qp *qp, | 76 | u32 ipath_make_rc_ack(struct ipath_qp *qp, |
76 | struct ipath_other_headers *ohdr, | 77 | struct ipath_other_headers *ohdr, |
77 | u32 pmtu) | 78 | u32 pmtu) |
78 | { | 79 | { |
79 | struct ipath_sge_state *ss; | ||
80 | u32 hwords; | 80 | u32 hwords; |
81 | u32 len; | 81 | u32 len; |
82 | u32 bth0; | 82 | u32 bth0; |
@@ -90,13 +90,12 @@ static inline u32 ipath_make_rc_ack(struct ipath_qp *qp, | |||
90 | */ | 90 | */ |
91 | switch (qp->s_ack_state) { | 91 | switch (qp->s_ack_state) { |
92 | case OP(RDMA_READ_REQUEST): | 92 | case OP(RDMA_READ_REQUEST): |
93 | ss = &qp->s_rdma_sge; | 93 | qp->s_cur_sge = &qp->s_rdma_sge; |
94 | len = qp->s_rdma_len; | 94 | len = qp->s_rdma_len; |
95 | if (len > pmtu) { | 95 | if (len > pmtu) { |
96 | len = pmtu; | 96 | len = pmtu; |
97 | qp->s_ack_state = OP(RDMA_READ_RESPONSE_FIRST); | 97 | qp->s_ack_state = OP(RDMA_READ_RESPONSE_FIRST); |
98 | } | 98 | } else |
99 | else | ||
100 | qp->s_ack_state = OP(RDMA_READ_RESPONSE_ONLY); | 99 | qp->s_ack_state = OP(RDMA_READ_RESPONSE_ONLY); |
101 | qp->s_rdma_len -= len; | 100 | qp->s_rdma_len -= len; |
102 | bth0 = qp->s_ack_state << 24; | 101 | bth0 = qp->s_ack_state << 24; |
@@ -108,7 +107,7 @@ static inline u32 ipath_make_rc_ack(struct ipath_qp *qp, | |||
108 | qp->s_ack_state = OP(RDMA_READ_RESPONSE_MIDDLE); | 107 | qp->s_ack_state = OP(RDMA_READ_RESPONSE_MIDDLE); |
109 | /* FALLTHROUGH */ | 108 | /* FALLTHROUGH */ |
110 | case OP(RDMA_READ_RESPONSE_MIDDLE): | 109 | case OP(RDMA_READ_RESPONSE_MIDDLE): |
111 | ss = &qp->s_rdma_sge; | 110 | qp->s_cur_sge = &qp->s_rdma_sge; |
112 | len = qp->s_rdma_len; | 111 | len = qp->s_rdma_len; |
113 | if (len > pmtu) | 112 | if (len > pmtu) |
114 | len = pmtu; | 113 | len = pmtu; |
@@ -127,41 +126,50 @@ static inline u32 ipath_make_rc_ack(struct ipath_qp *qp, | |||
127 | * We have to prevent new requests from changing | 126 | * We have to prevent new requests from changing |
128 | * the r_sge state while a ipath_verbs_send() | 127 | * the r_sge state while a ipath_verbs_send() |
129 | * is in progress. | 128 | * is in progress. |
130 | * Changing r_state allows the receiver | ||
131 | * to continue processing new packets. | ||
132 | * We do it here now instead of above so | ||
133 | * that we are sure the packet was sent before | ||
134 | * changing the state. | ||
135 | */ | 129 | */ |
136 | qp->r_state = OP(RDMA_READ_RESPONSE_LAST); | ||
137 | qp->s_ack_state = OP(ACKNOWLEDGE); | 130 | qp->s_ack_state = OP(ACKNOWLEDGE); |
138 | return 0; | 131 | bth0 = 0; |
132 | goto bail; | ||
139 | 133 | ||
140 | case OP(COMPARE_SWAP): | 134 | case OP(COMPARE_SWAP): |
141 | case OP(FETCH_ADD): | 135 | case OP(FETCH_ADD): |
142 | ss = NULL; | 136 | qp->s_cur_sge = NULL; |
143 | len = 0; | 137 | len = 0; |
144 | qp->r_state = OP(SEND_LAST); | 138 | /* |
145 | qp->s_ack_state = OP(ACKNOWLEDGE); | 139 | * Set the s_ack_state so the receive interrupt handler |
146 | bth0 = IB_OPCODE_ATOMIC_ACKNOWLEDGE << 24; | 140 | * won't try to send an ACK (out of order) until this one |
141 | * is actually sent. | ||
142 | */ | ||
143 | qp->s_ack_state = OP(RDMA_READ_RESPONSE_LAST); | ||
144 | bth0 = OP(ATOMIC_ACKNOWLEDGE) << 24; | ||
147 | ohdr->u.at.aeth = ipath_compute_aeth(qp); | 145 | ohdr->u.at.aeth = ipath_compute_aeth(qp); |
148 | ohdr->u.at.atomic_ack_eth = cpu_to_be64(qp->s_ack_atomic); | 146 | ohdr->u.at.atomic_ack_eth = cpu_to_be64(qp->r_atomic_data); |
149 | hwords += sizeof(ohdr->u.at) / 4; | 147 | hwords += sizeof(ohdr->u.at) / 4; |
150 | break; | 148 | break; |
151 | 149 | ||
152 | default: | 150 | default: |
153 | /* Send a regular ACK. */ | 151 | /* Send a regular ACK. */ |
154 | ss = NULL; | 152 | qp->s_cur_sge = NULL; |
155 | len = 0; | 153 | len = 0; |
156 | qp->s_ack_state = OP(ACKNOWLEDGE); | 154 | /* |
157 | bth0 = qp->s_ack_state << 24; | 155 | * Set the s_ack_state so the receive interrupt handler |
158 | ohdr->u.aeth = ipath_compute_aeth(qp); | 156 | * won't try to send an ACK (out of order) until this one |
157 | * is actually sent. | ||
158 | */ | ||
159 | qp->s_ack_state = OP(RDMA_READ_RESPONSE_LAST); | ||
160 | bth0 = OP(ACKNOWLEDGE) << 24; | ||
161 | if (qp->s_nak_state) | ||
162 | ohdr->u.aeth = cpu_to_be32((qp->r_msn & IPATH_MSN_MASK) | | ||
163 | (qp->s_nak_state << | ||
164 | IPATH_AETH_CREDIT_SHIFT)); | ||
165 | else | ||
166 | ohdr->u.aeth = ipath_compute_aeth(qp); | ||
159 | hwords++; | 167 | hwords++; |
160 | } | 168 | } |
161 | qp->s_hdrwords = hwords; | 169 | qp->s_hdrwords = hwords; |
162 | qp->s_cur_sge = ss; | ||
163 | qp->s_cur_size = len; | 170 | qp->s_cur_size = len; |
164 | 171 | ||
172 | bail: | ||
165 | return bth0; | 173 | return bth0; |
166 | } | 174 | } |
167 | 175 | ||
@@ -174,11 +182,11 @@ static inline u32 ipath_make_rc_ack(struct ipath_qp *qp, | |||
174 | * @bth2p: pointer to the BTH PSN word | 182 | * @bth2p: pointer to the BTH PSN word |
175 | * | 183 | * |
176 | * Return 1 if constructed; otherwise, return 0. | 184 | * Return 1 if constructed; otherwise, return 0. |
177 | * Note the QP s_lock must be held. | 185 | * Note the QP s_lock must be held and interrupts disabled. |
178 | */ | 186 | */ |
179 | static inline int ipath_make_rc_req(struct ipath_qp *qp, | 187 | int ipath_make_rc_req(struct ipath_qp *qp, |
180 | struct ipath_other_headers *ohdr, | 188 | struct ipath_other_headers *ohdr, |
181 | u32 pmtu, u32 *bth0p, u32 *bth2p) | 189 | u32 pmtu, u32 *bth0p, u32 *bth2p) |
182 | { | 190 | { |
183 | struct ipath_ibdev *dev = to_idev(qp->ibqp.device); | 191 | struct ipath_ibdev *dev = to_idev(qp->ibqp.device); |
184 | struct ipath_sge_state *ss; | 192 | struct ipath_sge_state *ss; |
@@ -257,7 +265,7 @@ static inline int ipath_make_rc_req(struct ipath_qp *qp, | |||
257 | break; | 265 | break; |
258 | 266 | ||
259 | case IB_WR_RDMA_WRITE: | 267 | case IB_WR_RDMA_WRITE: |
260 | if (newreq) | 268 | if (newreq && qp->s_lsn != (u32) -1) |
261 | qp->s_lsn++; | 269 | qp->s_lsn++; |
262 | /* FALLTHROUGH */ | 270 | /* FALLTHROUGH */ |
263 | case IB_WR_RDMA_WRITE_WITH_IMM: | 271 | case IB_WR_RDMA_WRITE_WITH_IMM: |
@@ -283,8 +291,7 @@ static inline int ipath_make_rc_req(struct ipath_qp *qp, | |||
283 | else { | 291 | else { |
284 | qp->s_state = | 292 | qp->s_state = |
285 | OP(RDMA_WRITE_ONLY_WITH_IMMEDIATE); | 293 | OP(RDMA_WRITE_ONLY_WITH_IMMEDIATE); |
286 | /* Immediate data comes | 294 | /* Immediate data comes after RETH */ |
287 | * after RETH */ | ||
288 | ohdr->u.rc.imm_data = wqe->wr.imm_data; | 295 | ohdr->u.rc.imm_data = wqe->wr.imm_data; |
289 | hwords += 1; | 296 | hwords += 1; |
290 | if (wqe->wr.send_flags & IB_SEND_SOLICITED) | 297 | if (wqe->wr.send_flags & IB_SEND_SOLICITED) |
@@ -304,7 +311,8 @@ static inline int ipath_make_rc_req(struct ipath_qp *qp, | |||
304 | qp->s_state = OP(RDMA_READ_REQUEST); | 311 | qp->s_state = OP(RDMA_READ_REQUEST); |
305 | hwords += sizeof(ohdr->u.rc.reth) / 4; | 312 | hwords += sizeof(ohdr->u.rc.reth) / 4; |
306 | if (newreq) { | 313 | if (newreq) { |
307 | qp->s_lsn++; | 314 | if (qp->s_lsn != (u32) -1) |
315 | qp->s_lsn++; | ||
308 | /* | 316 | /* |
309 | * Adjust s_next_psn to count the | 317 | * Adjust s_next_psn to count the |
310 | * expected number of responses. | 318 | * expected number of responses. |
@@ -335,7 +343,8 @@ static inline int ipath_make_rc_req(struct ipath_qp *qp, | |||
335 | wqe->wr.wr.atomic.compare_add); | 343 | wqe->wr.wr.atomic.compare_add); |
336 | hwords += sizeof(struct ib_atomic_eth) / 4; | 344 | hwords += sizeof(struct ib_atomic_eth) / 4; |
337 | if (newreq) { | 345 | if (newreq) { |
338 | qp->s_lsn++; | 346 | if (qp->s_lsn != (u32) -1) |
347 | qp->s_lsn++; | ||
339 | wqe->lpsn = wqe->psn; | 348 | wqe->lpsn = wqe->psn; |
340 | } | 349 | } |
341 | if (++qp->s_cur == qp->s_size) | 350 | if (++qp->s_cur == qp->s_size) |
@@ -352,9 +361,14 @@ static inline int ipath_make_rc_req(struct ipath_qp *qp, | |||
352 | if (qp->s_tail >= qp->s_size) | 361 | if (qp->s_tail >= qp->s_size) |
353 | qp->s_tail = 0; | 362 | qp->s_tail = 0; |
354 | } | 363 | } |
355 | bth2 |= qp->s_psn++ & IPS_PSN_MASK; | 364 | bth2 |= qp->s_psn++ & IPATH_PSN_MASK; |
356 | if ((int)(qp->s_psn - qp->s_next_psn) > 0) | 365 | if ((int)(qp->s_psn - qp->s_next_psn) > 0) |
357 | qp->s_next_psn = qp->s_psn; | 366 | qp->s_next_psn = qp->s_psn; |
367 | /* | ||
368 | * Put the QP on the pending list so lost ACKs will cause | ||
369 | * a retry. More than one request can be pending so the | ||
370 | * QP may already be on the dev->pending list. | ||
371 | */ | ||
358 | spin_lock(&dev->pending_lock); | 372 | spin_lock(&dev->pending_lock); |
359 | if (list_empty(&qp->timerwait)) | 373 | if (list_empty(&qp->timerwait)) |
360 | list_add_tail(&qp->timerwait, | 374 | list_add_tail(&qp->timerwait, |
@@ -364,8 +378,8 @@ static inline int ipath_make_rc_req(struct ipath_qp *qp, | |||
364 | 378 | ||
365 | case OP(RDMA_READ_RESPONSE_FIRST): | 379 | case OP(RDMA_READ_RESPONSE_FIRST): |
366 | /* | 380 | /* |
367 | * This case can only happen if a send is restarted. See | 381 | * This case can only happen if a send is restarted. |
368 | * ipath_restart_rc(). | 382 | * See ipath_restart_rc(). |
369 | */ | 383 | */ |
370 | ipath_init_restart(qp, wqe); | 384 | ipath_init_restart(qp, wqe); |
371 | /* FALLTHROUGH */ | 385 | /* FALLTHROUGH */ |
@@ -373,7 +387,7 @@ static inline int ipath_make_rc_req(struct ipath_qp *qp, | |||
373 | qp->s_state = OP(SEND_MIDDLE); | 387 | qp->s_state = OP(SEND_MIDDLE); |
374 | /* FALLTHROUGH */ | 388 | /* FALLTHROUGH */ |
375 | case OP(SEND_MIDDLE): | 389 | case OP(SEND_MIDDLE): |
376 | bth2 = qp->s_psn++ & IPS_PSN_MASK; | 390 | bth2 = qp->s_psn++ & IPATH_PSN_MASK; |
377 | if ((int)(qp->s_psn - qp->s_next_psn) > 0) | 391 | if ((int)(qp->s_psn - qp->s_next_psn) > 0) |
378 | qp->s_next_psn = qp->s_psn; | 392 | qp->s_next_psn = qp->s_psn; |
379 | ss = &qp->s_sge; | 393 | ss = &qp->s_sge; |
@@ -415,7 +429,7 @@ static inline int ipath_make_rc_req(struct ipath_qp *qp, | |||
415 | qp->s_state = OP(RDMA_WRITE_MIDDLE); | 429 | qp->s_state = OP(RDMA_WRITE_MIDDLE); |
416 | /* FALLTHROUGH */ | 430 | /* FALLTHROUGH */ |
417 | case OP(RDMA_WRITE_MIDDLE): | 431 | case OP(RDMA_WRITE_MIDDLE): |
418 | bth2 = qp->s_psn++ & IPS_PSN_MASK; | 432 | bth2 = qp->s_psn++ & IPATH_PSN_MASK; |
419 | if ((int)(qp->s_psn - qp->s_next_psn) > 0) | 433 | if ((int)(qp->s_psn - qp->s_next_psn) > 0) |
420 | qp->s_next_psn = qp->s_psn; | 434 | qp->s_next_psn = qp->s_psn; |
421 | ss = &qp->s_sge; | 435 | ss = &qp->s_sge; |
@@ -452,7 +466,7 @@ static inline int ipath_make_rc_req(struct ipath_qp *qp, | |||
452 | * See ipath_restart_rc(). | 466 | * See ipath_restart_rc(). |
453 | */ | 467 | */ |
454 | ipath_init_restart(qp, wqe); | 468 | ipath_init_restart(qp, wqe); |
455 | len = ((qp->s_psn - wqe->psn) & IPS_PSN_MASK) * pmtu; | 469 | len = ((qp->s_psn - wqe->psn) & IPATH_PSN_MASK) * pmtu; |
456 | ohdr->u.rc.reth.vaddr = | 470 | ohdr->u.rc.reth.vaddr = |
457 | cpu_to_be64(wqe->wr.wr.rdma.remote_addr + len); | 471 | cpu_to_be64(wqe->wr.wr.rdma.remote_addr + len); |
458 | ohdr->u.rc.reth.rkey = | 472 | ohdr->u.rc.reth.rkey = |
@@ -460,7 +474,7 @@ static inline int ipath_make_rc_req(struct ipath_qp *qp, | |||
460 | ohdr->u.rc.reth.length = cpu_to_be32(qp->s_len); | 474 | ohdr->u.rc.reth.length = cpu_to_be32(qp->s_len); |
461 | qp->s_state = OP(RDMA_READ_REQUEST); | 475 | qp->s_state = OP(RDMA_READ_REQUEST); |
462 | hwords += sizeof(ohdr->u.rc.reth) / 4; | 476 | hwords += sizeof(ohdr->u.rc.reth) / 4; |
463 | bth2 = qp->s_psn++ & IPS_PSN_MASK; | 477 | bth2 = qp->s_psn++ & IPATH_PSN_MASK; |
464 | if ((int)(qp->s_psn - qp->s_next_psn) > 0) | 478 | if ((int)(qp->s_psn - qp->s_next_psn) > 0) |
465 | qp->s_next_psn = qp->s_psn; | 479 | qp->s_next_psn = qp->s_psn; |
466 | ss = NULL; | 480 | ss = NULL; |
@@ -496,189 +510,169 @@ done: | |||
496 | return 0; | 510 | return 0; |
497 | } | 511 | } |
498 | 512 | ||
499 | static inline void ipath_make_rc_grh(struct ipath_qp *qp, | ||
500 | struct ib_global_route *grh, | ||
501 | u32 nwords) | ||
502 | { | ||
503 | struct ipath_ibdev *dev = to_idev(qp->ibqp.device); | ||
504 | |||
505 | /* GRH header size in 32-bit words. */ | ||
506 | qp->s_hdrwords += 10; | ||
507 | qp->s_hdr.u.l.grh.version_tclass_flow = | ||
508 | cpu_to_be32((6 << 28) | | ||
509 | (grh->traffic_class << 20) | | ||
510 | grh->flow_label); | ||
511 | qp->s_hdr.u.l.grh.paylen = | ||
512 | cpu_to_be16(((qp->s_hdrwords - 12) + nwords + | ||
513 | SIZE_OF_CRC) << 2); | ||
514 | /* next_hdr is defined by C8-7 in ch. 8.4.1 */ | ||
515 | qp->s_hdr.u.l.grh.next_hdr = 0x1B; | ||
516 | qp->s_hdr.u.l.grh.hop_limit = grh->hop_limit; | ||
517 | /* The SGID is 32-bit aligned. */ | ||
518 | qp->s_hdr.u.l.grh.sgid.global.subnet_prefix = dev->gid_prefix; | ||
519 | qp->s_hdr.u.l.grh.sgid.global.interface_id = | ||
520 | ipath_layer_get_guid(dev->dd); | ||
521 | qp->s_hdr.u.l.grh.dgid = grh->dgid; | ||
522 | } | ||
523 | |||
524 | /** | 513 | /** |
525 | * ipath_do_rc_send - perform a send on an RC QP | 514 | * send_rc_ack - Construct an ACK packet and send it |
526 | * @data: contains a pointer to the QP | 515 | * @qp: a pointer to the QP |
527 | * | 516 | * |
528 | * Process entries in the send work queue until credit or queue is | 517 | * This is called from ipath_rc_rcv() and only uses the receive |
529 | * exhausted. Only allow one CPU to send a packet per QP (tasklet). | 518 | * side QP state. |
530 | * Otherwise, after we drop the QP s_lock, two threads could send | 519 | * Note that RDMA reads are handled in the send side QP state and tasklet. |
531 | * packets out of order. | ||
532 | */ | 520 | */ |
533 | void ipath_do_rc_send(unsigned long data) | 521 | static void send_rc_ack(struct ipath_qp *qp) |
534 | { | 522 | { |
535 | struct ipath_qp *qp = (struct ipath_qp *)data; | ||
536 | struct ipath_ibdev *dev = to_idev(qp->ibqp.device); | 523 | struct ipath_ibdev *dev = to_idev(qp->ibqp.device); |
537 | unsigned long flags; | ||
538 | u16 lrh0; | 524 | u16 lrh0; |
539 | u32 nwords; | ||
540 | u32 extra_bytes; | ||
541 | u32 bth0; | 525 | u32 bth0; |
542 | u32 bth2; | 526 | u32 hwords; |
543 | u32 pmtu = ib_mtu_enum_to_int(qp->path_mtu); | 527 | struct ipath_ib_header hdr; |
544 | struct ipath_other_headers *ohdr; | 528 | struct ipath_other_headers *ohdr; |
545 | 529 | ||
546 | if (test_and_set_bit(IPATH_S_BUSY, &qp->s_flags)) | ||
547 | goto bail; | ||
548 | |||
549 | if (unlikely(qp->remote_ah_attr.dlid == | ||
550 | ipath_layer_get_lid(dev->dd))) { | ||
551 | struct ib_wc wc; | ||
552 | |||
553 | /* | ||
554 | * Pass in an uninitialized ib_wc to be consistent with | ||
555 | * other places where ipath_ruc_loopback() is called. | ||
556 | */ | ||
557 | ipath_ruc_loopback(qp, &wc); | ||
558 | goto clear; | ||
559 | } | ||
560 | |||
561 | ohdr = &qp->s_hdr.u.oth; | ||
562 | if (qp->remote_ah_attr.ah_flags & IB_AH_GRH) | ||
563 | ohdr = &qp->s_hdr.u.l.oth; | ||
564 | |||
565 | again: | ||
566 | /* Check for a constructed packet to be sent. */ | ||
567 | if (qp->s_hdrwords != 0) { | ||
568 | /* | ||
569 | * If no PIO bufs are available, return. An interrupt will | ||
570 | * call ipath_ib_piobufavail() when one is available. | ||
571 | */ | ||
572 | _VERBS_INFO("h %u %p\n", qp->s_hdrwords, &qp->s_hdr); | ||
573 | _VERBS_INFO("d %u %p %u %p %u %u %u %u\n", qp->s_cur_size, | ||
574 | qp->s_cur_sge->sg_list, | ||
575 | qp->s_cur_sge->num_sge, | ||
576 | qp->s_cur_sge->sge.vaddr, | ||
577 | qp->s_cur_sge->sge.sge_length, | ||
578 | qp->s_cur_sge->sge.length, | ||
579 | qp->s_cur_sge->sge.m, | ||
580 | qp->s_cur_sge->sge.n); | ||
581 | if (ipath_verbs_send(dev->dd, qp->s_hdrwords, | ||
582 | (u32 *) &qp->s_hdr, qp->s_cur_size, | ||
583 | qp->s_cur_sge)) { | ||
584 | ipath_no_bufs_available(qp, dev); | ||
585 | goto bail; | ||
586 | } | ||
587 | dev->n_unicast_xmit++; | ||
588 | /* Record that we sent the packet and s_hdr is empty. */ | ||
589 | qp->s_hdrwords = 0; | ||
590 | } | ||
591 | |||
592 | /* | ||
593 | * The lock is needed to synchronize between setting | ||
594 | * qp->s_ack_state, resend timer, and post_send(). | ||
595 | */ | ||
596 | spin_lock_irqsave(&qp->s_lock, flags); | ||
597 | |||
598 | /* Sending responses has higher priority over sending requests. */ | ||
599 | if (qp->s_ack_state != OP(ACKNOWLEDGE) && | ||
600 | (bth0 = ipath_make_rc_ack(qp, ohdr, pmtu)) != 0) | ||
601 | bth2 = qp->s_ack_psn++ & IPS_PSN_MASK; | ||
602 | else if (!ipath_make_rc_req(qp, ohdr, pmtu, &bth0, &bth2)) | ||
603 | goto done; | ||
604 | |||
605 | spin_unlock_irqrestore(&qp->s_lock, flags); | ||
606 | |||
607 | /* Construct the header. */ | 530 | /* Construct the header. */ |
608 | extra_bytes = (4 - qp->s_cur_size) & 3; | 531 | ohdr = &hdr.u.oth; |
609 | nwords = (qp->s_cur_size + extra_bytes) >> 2; | 532 | lrh0 = IPATH_LRH_BTH; |
610 | lrh0 = IPS_LRH_BTH; | 533 | /* header size in 32-bit words LRH+BTH+AETH = (8+12+4)/4. */ |
534 | hwords = 6; | ||
611 | if (unlikely(qp->remote_ah_attr.ah_flags & IB_AH_GRH)) { | 535 | if (unlikely(qp->remote_ah_attr.ah_flags & IB_AH_GRH)) { |
612 | ipath_make_rc_grh(qp, &qp->remote_ah_attr.grh, nwords); | 536 | hwords += ipath_make_grh(dev, &hdr.u.l.grh, |
613 | lrh0 = IPS_LRH_GRH; | 537 | &qp->remote_ah_attr.grh, |
538 | hwords, 0); | ||
539 | ohdr = &hdr.u.l.oth; | ||
540 | lrh0 = IPATH_LRH_GRH; | ||
614 | } | 541 | } |
542 | /* read pkey_index w/o lock (its atomic) */ | ||
543 | bth0 = ipath_layer_get_pkey(dev->dd, qp->s_pkey_index); | ||
544 | if (qp->r_nak_state) | ||
545 | ohdr->u.aeth = cpu_to_be32((qp->r_msn & IPATH_MSN_MASK) | | ||
546 | (qp->r_nak_state << | ||
547 | IPATH_AETH_CREDIT_SHIFT)); | ||
548 | else | ||
549 | ohdr->u.aeth = ipath_compute_aeth(qp); | ||
550 | if (qp->r_ack_state >= OP(COMPARE_SWAP)) { | ||
551 | bth0 |= OP(ATOMIC_ACKNOWLEDGE) << 24; | ||
552 | ohdr->u.at.atomic_ack_eth = cpu_to_be64(qp->r_atomic_data); | ||
553 | hwords += sizeof(ohdr->u.at.atomic_ack_eth) / 4; | ||
554 | } else | ||
555 | bth0 |= OP(ACKNOWLEDGE) << 24; | ||
615 | lrh0 |= qp->remote_ah_attr.sl << 4; | 556 | lrh0 |= qp->remote_ah_attr.sl << 4; |
616 | qp->s_hdr.lrh[0] = cpu_to_be16(lrh0); | 557 | hdr.lrh[0] = cpu_to_be16(lrh0); |
617 | qp->s_hdr.lrh[1] = cpu_to_be16(qp->remote_ah_attr.dlid); | 558 | hdr.lrh[1] = cpu_to_be16(qp->remote_ah_attr.dlid); |
618 | qp->s_hdr.lrh[2] = cpu_to_be16(qp->s_hdrwords + nwords + | 559 | hdr.lrh[2] = cpu_to_be16(hwords + SIZE_OF_CRC); |
619 | SIZE_OF_CRC); | 560 | hdr.lrh[3] = cpu_to_be16(ipath_layer_get_lid(dev->dd)); |
620 | qp->s_hdr.lrh[3] = cpu_to_be16(ipath_layer_get_lid(dev->dd)); | ||
621 | bth0 |= ipath_layer_get_pkey(dev->dd, qp->s_pkey_index); | ||
622 | bth0 |= extra_bytes << 20; | ||
623 | ohdr->bth[0] = cpu_to_be32(bth0); | 561 | ohdr->bth[0] = cpu_to_be32(bth0); |
624 | ohdr->bth[1] = cpu_to_be32(qp->remote_qpn); | 562 | ohdr->bth[1] = cpu_to_be32(qp->remote_qpn); |
625 | ohdr->bth[2] = cpu_to_be32(bth2); | 563 | ohdr->bth[2] = cpu_to_be32(qp->r_ack_psn & IPATH_PSN_MASK); |
626 | 564 | ||
627 | /* Check for more work to do. */ | 565 | /* |
628 | goto again; | 566 | * If we can send the ACK, clear the ACK state. |
567 | */ | ||
568 | if (ipath_verbs_send(dev->dd, hwords, (u32 *) &hdr, 0, NULL) == 0) { | ||
569 | qp->r_ack_state = OP(ACKNOWLEDGE); | ||
570 | dev->n_unicast_xmit++; | ||
571 | } else { | ||
572 | /* | ||
573 | * We are out of PIO buffers at the moment. | ||
574 | * Pass responsibility for sending the ACK to the | ||
575 | * send tasklet so that when a PIO buffer becomes | ||
576 | * available, the ACK is sent ahead of other outgoing | ||
577 | * packets. | ||
578 | */ | ||
579 | dev->n_rc_qacks++; | ||
580 | spin_lock_irq(&qp->s_lock); | ||
581 | /* Don't coalesce if a RDMA read or atomic is pending. */ | ||
582 | if (qp->s_ack_state == OP(ACKNOWLEDGE) || | ||
583 | qp->s_ack_state < OP(RDMA_READ_REQUEST)) { | ||
584 | qp->s_ack_state = qp->r_ack_state; | ||
585 | qp->s_nak_state = qp->r_nak_state; | ||
586 | qp->s_ack_psn = qp->r_ack_psn; | ||
587 | qp->r_ack_state = OP(ACKNOWLEDGE); | ||
588 | } | ||
589 | spin_unlock_irq(&qp->s_lock); | ||
629 | 590 | ||
630 | done: | 591 | /* Call ipath_do_rc_send() in another thread. */ |
631 | spin_unlock_irqrestore(&qp->s_lock, flags); | 592 | tasklet_hi_schedule(&qp->s_task); |
632 | clear: | 593 | } |
633 | clear_bit(IPATH_S_BUSY, &qp->s_flags); | ||
634 | bail: | ||
635 | return; | ||
636 | } | 594 | } |
637 | 595 | ||
638 | static void send_rc_ack(struct ipath_qp *qp) | 596 | /** |
597 | * reset_psn - reset the QP state to send starting from PSN | ||
598 | * @qp: the QP | ||
599 | * @psn: the packet sequence number to restart at | ||
600 | * | ||
601 | * This is called from ipath_rc_rcv() to process an incoming RC ACK | ||
602 | * for the given QP. | ||
603 | * Called at interrupt level with the QP s_lock held. | ||
604 | */ | ||
605 | static void reset_psn(struct ipath_qp *qp, u32 psn) | ||
639 | { | 606 | { |
640 | struct ipath_ibdev *dev = to_idev(qp->ibqp.device); | 607 | u32 n = qp->s_last; |
641 | u16 lrh0; | 608 | struct ipath_swqe *wqe = get_swqe_ptr(qp, n); |
642 | u32 bth0; | 609 | u32 opcode; |
643 | struct ipath_other_headers *ohdr; | ||
644 | 610 | ||
645 | /* Construct the header. */ | 611 | qp->s_cur = n; |
646 | ohdr = &qp->s_hdr.u.oth; | 612 | |
647 | lrh0 = IPS_LRH_BTH; | 613 | /* |
648 | /* header size in 32-bit words LRH+BTH+AETH = (8+12+4)/4. */ | 614 | * If we are starting the request from the beginning, |
649 | qp->s_hdrwords = 6; | 615 | * let the normal send code handle initialization. |
650 | if (unlikely(qp->remote_ah_attr.ah_flags & IB_AH_GRH)) { | 616 | */ |
651 | ipath_make_rc_grh(qp, &qp->remote_ah_attr.grh, 0); | 617 | if (ipath_cmp24(psn, wqe->psn) <= 0) { |
652 | ohdr = &qp->s_hdr.u.l.oth; | 618 | qp->s_state = OP(SEND_LAST); |
653 | lrh0 = IPS_LRH_GRH; | 619 | goto done; |
654 | } | 620 | } |
655 | bth0 = ipath_layer_get_pkey(dev->dd, qp->s_pkey_index); | 621 | |
656 | ohdr->u.aeth = ipath_compute_aeth(qp); | 622 | /* Find the work request opcode corresponding to the given PSN. */ |
657 | if (qp->s_ack_state >= OP(COMPARE_SWAP)) { | 623 | opcode = wqe->wr.opcode; |
658 | bth0 |= IB_OPCODE_ATOMIC_ACKNOWLEDGE << 24; | 624 | for (;;) { |
659 | ohdr->u.at.atomic_ack_eth = cpu_to_be64(qp->s_ack_atomic); | 625 | int diff; |
660 | qp->s_hdrwords += sizeof(ohdr->u.at.atomic_ack_eth) / 4; | 626 | |
627 | if (++n == qp->s_size) | ||
628 | n = 0; | ||
629 | if (n == qp->s_tail) | ||
630 | break; | ||
631 | wqe = get_swqe_ptr(qp, n); | ||
632 | diff = ipath_cmp24(psn, wqe->psn); | ||
633 | if (diff < 0) | ||
634 | break; | ||
635 | qp->s_cur = n; | ||
636 | /* | ||
637 | * If we are starting the request from the beginning, | ||
638 | * let the normal send code handle initialization. | ||
639 | */ | ||
640 | if (diff == 0) { | ||
641 | qp->s_state = OP(SEND_LAST); | ||
642 | goto done; | ||
643 | } | ||
644 | opcode = wqe->wr.opcode; | ||
661 | } | 645 | } |
662 | else | ||
663 | bth0 |= OP(ACKNOWLEDGE) << 24; | ||
664 | lrh0 |= qp->remote_ah_attr.sl << 4; | ||
665 | qp->s_hdr.lrh[0] = cpu_to_be16(lrh0); | ||
666 | qp->s_hdr.lrh[1] = cpu_to_be16(qp->remote_ah_attr.dlid); | ||
667 | qp->s_hdr.lrh[2] = cpu_to_be16(qp->s_hdrwords + SIZE_OF_CRC); | ||
668 | qp->s_hdr.lrh[3] = cpu_to_be16(ipath_layer_get_lid(dev->dd)); | ||
669 | ohdr->bth[0] = cpu_to_be32(bth0); | ||
670 | ohdr->bth[1] = cpu_to_be32(qp->remote_qpn); | ||
671 | ohdr->bth[2] = cpu_to_be32(qp->s_ack_psn & IPS_PSN_MASK); | ||
672 | 646 | ||
673 | /* | 647 | /* |
674 | * If we can send the ACK, clear the ACK state. | 648 | * Set the state to restart in the middle of a request. |
649 | * Don't change the s_sge, s_cur_sge, or s_cur_size. | ||
650 | * See ipath_do_rc_send(). | ||
675 | */ | 651 | */ |
676 | if (ipath_verbs_send(dev->dd, qp->s_hdrwords, (u32 *) &qp->s_hdr, | 652 | switch (opcode) { |
677 | 0, NULL) == 0) { | 653 | case IB_WR_SEND: |
678 | qp->s_ack_state = OP(ACKNOWLEDGE); | 654 | case IB_WR_SEND_WITH_IMM: |
679 | dev->n_rc_qacks++; | 655 | qp->s_state = OP(RDMA_READ_RESPONSE_FIRST); |
680 | dev->n_unicast_xmit++; | 656 | break; |
657 | |||
658 | case IB_WR_RDMA_WRITE: | ||
659 | case IB_WR_RDMA_WRITE_WITH_IMM: | ||
660 | qp->s_state = OP(RDMA_READ_RESPONSE_LAST); | ||
661 | break; | ||
662 | |||
663 | case IB_WR_RDMA_READ: | ||
664 | qp->s_state = OP(RDMA_READ_RESPONSE_MIDDLE); | ||
665 | break; | ||
666 | |||
667 | default: | ||
668 | /* | ||
669 | * This case shouldn't happen since its only | ||
670 | * one PSN per req. | ||
671 | */ | ||
672 | qp->s_state = OP(SEND_LAST); | ||
681 | } | 673 | } |
674 | done: | ||
675 | qp->s_psn = psn; | ||
682 | } | 676 | } |
683 | 677 | ||
684 | /** | 678 | /** |
@@ -687,13 +681,12 @@ static void send_rc_ack(struct ipath_qp *qp) | |||
687 | * @psn: packet sequence number for the request | 681 | * @psn: packet sequence number for the request |
688 | * @wc: the work completion request | 682 | * @wc: the work completion request |
689 | * | 683 | * |
690 | * The QP s_lock should be held. | 684 | * The QP s_lock should be held and interrupts disabled. |
691 | */ | 685 | */ |
692 | void ipath_restart_rc(struct ipath_qp *qp, u32 psn, struct ib_wc *wc) | 686 | void ipath_restart_rc(struct ipath_qp *qp, u32 psn, struct ib_wc *wc) |
693 | { | 687 | { |
694 | struct ipath_swqe *wqe = get_swqe_ptr(qp, qp->s_last); | 688 | struct ipath_swqe *wqe = get_swqe_ptr(qp, qp->s_last); |
695 | struct ipath_ibdev *dev; | 689 | struct ipath_ibdev *dev; |
696 | u32 n; | ||
697 | 690 | ||
698 | /* | 691 | /* |
699 | * If there are no requests pending, we are done. | 692 | * If there are no requests pending, we are done. |
@@ -735,62 +728,7 @@ void ipath_restart_rc(struct ipath_qp *qp, u32 psn, struct ib_wc *wc) | |||
735 | else | 728 | else |
736 | dev->n_rc_resends += (int)qp->s_psn - (int)psn; | 729 | dev->n_rc_resends += (int)qp->s_psn - (int)psn; |
737 | 730 | ||
738 | /* | 731 | reset_psn(qp, psn); |
739 | * If we are starting the request from the beginning, let the normal | ||
740 | * send code handle initialization. | ||
741 | */ | ||
742 | qp->s_cur = qp->s_last; | ||
743 | if (ipath_cmp24(psn, wqe->psn) <= 0) { | ||
744 | qp->s_state = OP(SEND_LAST); | ||
745 | qp->s_psn = wqe->psn; | ||
746 | } else { | ||
747 | n = qp->s_cur; | ||
748 | for (;;) { | ||
749 | if (++n == qp->s_size) | ||
750 | n = 0; | ||
751 | if (n == qp->s_tail) { | ||
752 | if (ipath_cmp24(psn, qp->s_next_psn) >= 0) { | ||
753 | qp->s_cur = n; | ||
754 | wqe = get_swqe_ptr(qp, n); | ||
755 | } | ||
756 | break; | ||
757 | } | ||
758 | wqe = get_swqe_ptr(qp, n); | ||
759 | if (ipath_cmp24(psn, wqe->psn) < 0) | ||
760 | break; | ||
761 | qp->s_cur = n; | ||
762 | } | ||
763 | qp->s_psn = psn; | ||
764 | |||
765 | /* | ||
766 | * Reset the state to restart in the middle of a request. | ||
767 | * Don't change the s_sge, s_cur_sge, or s_cur_size. | ||
768 | * See ipath_do_rc_send(). | ||
769 | */ | ||
770 | switch (wqe->wr.opcode) { | ||
771 | case IB_WR_SEND: | ||
772 | case IB_WR_SEND_WITH_IMM: | ||
773 | qp->s_state = OP(RDMA_READ_RESPONSE_FIRST); | ||
774 | break; | ||
775 | |||
776 | case IB_WR_RDMA_WRITE: | ||
777 | case IB_WR_RDMA_WRITE_WITH_IMM: | ||
778 | qp->s_state = OP(RDMA_READ_RESPONSE_LAST); | ||
779 | break; | ||
780 | |||
781 | case IB_WR_RDMA_READ: | ||
782 | qp->s_state = | ||
783 | OP(RDMA_READ_RESPONSE_MIDDLE); | ||
784 | break; | ||
785 | |||
786 | default: | ||
787 | /* | ||
788 | * This case shouldn't happen since its only | ||
789 | * one PSN per req. | ||
790 | */ | ||
791 | qp->s_state = OP(SEND_LAST); | ||
792 | } | ||
793 | } | ||
794 | 732 | ||
795 | done: | 733 | done: |
796 | tasklet_hi_schedule(&qp->s_task); | 734 | tasklet_hi_schedule(&qp->s_task); |
@@ -800,76 +738,14 @@ bail: | |||
800 | } | 738 | } |
801 | 739 | ||
802 | /** | 740 | /** |
803 | * reset_psn - reset the QP state to send starting from PSN | ||
804 | * @qp: the QP | ||
805 | * @psn: the packet sequence number to restart at | ||
806 | * | ||
807 | * This is called from ipath_rc_rcv() to process an incoming RC ACK | ||
808 | * for the given QP. | ||
809 | * Called at interrupt level with the QP s_lock held. | ||
810 | */ | ||
811 | static void reset_psn(struct ipath_qp *qp, u32 psn) | ||
812 | { | ||
813 | struct ipath_swqe *wqe; | ||
814 | u32 n; | ||
815 | |||
816 | n = qp->s_cur; | ||
817 | wqe = get_swqe_ptr(qp, n); | ||
818 | for (;;) { | ||
819 | if (++n == qp->s_size) | ||
820 | n = 0; | ||
821 | if (n == qp->s_tail) { | ||
822 | if (ipath_cmp24(psn, qp->s_next_psn) >= 0) { | ||
823 | qp->s_cur = n; | ||
824 | wqe = get_swqe_ptr(qp, n); | ||
825 | } | ||
826 | break; | ||
827 | } | ||
828 | wqe = get_swqe_ptr(qp, n); | ||
829 | if (ipath_cmp24(psn, wqe->psn) < 0) | ||
830 | break; | ||
831 | qp->s_cur = n; | ||
832 | } | ||
833 | qp->s_psn = psn; | ||
834 | |||
835 | /* | ||
836 | * Set the state to restart in the middle of a | ||
837 | * request. Don't change the s_sge, s_cur_sge, or | ||
838 | * s_cur_size. See ipath_do_rc_send(). | ||
839 | */ | ||
840 | switch (wqe->wr.opcode) { | ||
841 | case IB_WR_SEND: | ||
842 | case IB_WR_SEND_WITH_IMM: | ||
843 | qp->s_state = OP(RDMA_READ_RESPONSE_FIRST); | ||
844 | break; | ||
845 | |||
846 | case IB_WR_RDMA_WRITE: | ||
847 | case IB_WR_RDMA_WRITE_WITH_IMM: | ||
848 | qp->s_state = OP(RDMA_READ_RESPONSE_LAST); | ||
849 | break; | ||
850 | |||
851 | case IB_WR_RDMA_READ: | ||
852 | qp->s_state = OP(RDMA_READ_RESPONSE_MIDDLE); | ||
853 | break; | ||
854 | |||
855 | default: | ||
856 | /* | ||
857 | * This case shouldn't happen since its only | ||
858 | * one PSN per req. | ||
859 | */ | ||
860 | qp->s_state = OP(SEND_LAST); | ||
861 | } | ||
862 | } | ||
863 | |||
864 | /** | ||
865 | * do_rc_ack - process an incoming RC ACK | 741 | * do_rc_ack - process an incoming RC ACK |
866 | * @qp: the QP the ACK came in on | 742 | * @qp: the QP the ACK came in on |
867 | * @psn: the packet sequence number of the ACK | 743 | * @psn: the packet sequence number of the ACK |
868 | * @opcode: the opcode of the request that resulted in the ACK | 744 | * @opcode: the opcode of the request that resulted in the ACK |
869 | * | 745 | * |
870 | * This is called from ipath_rc_rcv() to process an incoming RC ACK | 746 | * This is called from ipath_rc_rcv_resp() to process an incoming RC ACK |
871 | * for the given QP. | 747 | * for the given QP. |
872 | * Called at interrupt level with the QP s_lock held. | 748 | * Called at interrupt level with the QP s_lock held and interrupts disabled. |
873 | * Returns 1 if OK, 0 if current operation should be aborted (NAK). | 749 | * Returns 1 if OK, 0 if current operation should be aborted (NAK). |
874 | */ | 750 | */ |
875 | static int do_rc_ack(struct ipath_qp *qp, u32 aeth, u32 psn, int opcode) | 751 | static int do_rc_ack(struct ipath_qp *qp, u32 aeth, u32 psn, int opcode) |
@@ -1006,26 +882,16 @@ static int do_rc_ack(struct ipath_qp *qp, u32 aeth, u32 psn, int opcode) | |||
1006 | if (qp->s_last == qp->s_tail) | 882 | if (qp->s_last == qp->s_tail) |
1007 | goto bail; | 883 | goto bail; |
1008 | 884 | ||
1009 | /* The last valid PSN seen is the previous request's. */ | 885 | /* The last valid PSN is the previous PSN. */ |
1010 | qp->s_last_psn = wqe->psn - 1; | 886 | qp->s_last_psn = psn - 1; |
1011 | 887 | ||
1012 | dev->n_rc_resends += (int)qp->s_psn - (int)psn; | 888 | dev->n_rc_resends += (int)qp->s_psn - (int)psn; |
1013 | 889 | ||
1014 | /* | 890 | reset_psn(qp, psn); |
1015 | * If we are starting the request from the beginning, let | ||
1016 | * the normal send code handle initialization. | ||
1017 | */ | ||
1018 | qp->s_cur = qp->s_last; | ||
1019 | wqe = get_swqe_ptr(qp, qp->s_cur); | ||
1020 | if (ipath_cmp24(psn, wqe->psn) <= 0) { | ||
1021 | qp->s_state = OP(SEND_LAST); | ||
1022 | qp->s_psn = wqe->psn; | ||
1023 | } else | ||
1024 | reset_psn(qp, psn); | ||
1025 | 891 | ||
1026 | qp->s_rnr_timeout = | 892 | qp->s_rnr_timeout = |
1027 | ib_ipath_rnr_table[(aeth >> IPS_AETH_CREDIT_SHIFT) & | 893 | ib_ipath_rnr_table[(aeth >> IPATH_AETH_CREDIT_SHIFT) & |
1028 | IPS_AETH_CREDIT_MASK]; | 894 | IPATH_AETH_CREDIT_MASK]; |
1029 | ipath_insert_rnr_queue(qp); | 895 | ipath_insert_rnr_queue(qp); |
1030 | goto bail; | 896 | goto bail; |
1031 | 897 | ||
@@ -1033,8 +899,8 @@ static int do_rc_ack(struct ipath_qp *qp, u32 aeth, u32 psn, int opcode) | |||
1033 | /* The last valid PSN seen is the previous request's. */ | 899 | /* The last valid PSN seen is the previous request's. */ |
1034 | if (qp->s_last != qp->s_tail) | 900 | if (qp->s_last != qp->s_tail) |
1035 | qp->s_last_psn = wqe->psn - 1; | 901 | qp->s_last_psn = wqe->psn - 1; |
1036 | switch ((aeth >> IPS_AETH_CREDIT_SHIFT) & | 902 | switch ((aeth >> IPATH_AETH_CREDIT_SHIFT) & |
1037 | IPS_AETH_CREDIT_MASK) { | 903 | IPATH_AETH_CREDIT_MASK) { |
1038 | case 0: /* PSN sequence error */ | 904 | case 0: /* PSN sequence error */ |
1039 | dev->n_seq_naks++; | 905 | dev->n_seq_naks++; |
1040 | /* | 906 | /* |
@@ -1182,32 +1048,33 @@ static inline void ipath_rc_rcv_resp(struct ipath_ibdev *dev, | |||
1182 | goto ack_done; | 1048 | goto ack_done; |
1183 | } | 1049 | } |
1184 | rdma_read: | 1050 | rdma_read: |
1185 | if (unlikely(qp->s_state != OP(RDMA_READ_REQUEST))) | 1051 | if (unlikely(qp->s_state != OP(RDMA_READ_REQUEST))) |
1186 | goto ack_done; | 1052 | goto ack_done; |
1187 | if (unlikely(tlen != (hdrsize + pmtu + 4))) | 1053 | if (unlikely(tlen != (hdrsize + pmtu + 4))) |
1188 | goto ack_done; | 1054 | goto ack_done; |
1189 | if (unlikely(pmtu >= qp->s_len)) | 1055 | if (unlikely(pmtu >= qp->s_len)) |
1190 | goto ack_done; | 1056 | goto ack_done; |
1191 | /* We got a response so update the timeout. */ | 1057 | /* We got a response so update the timeout. */ |
1192 | if (unlikely(qp->s_last == qp->s_tail || | 1058 | if (unlikely(qp->s_last == qp->s_tail || |
1193 | get_swqe_ptr(qp, qp->s_last)->wr.opcode != | 1059 | get_swqe_ptr(qp, qp->s_last)->wr.opcode != |
1194 | IB_WR_RDMA_READ)) | 1060 | IB_WR_RDMA_READ)) |
1195 | goto ack_done; | 1061 | goto ack_done; |
1196 | spin_lock(&dev->pending_lock); | 1062 | spin_lock(&dev->pending_lock); |
1197 | if (qp->s_rnr_timeout == 0 && !list_empty(&qp->timerwait)) | 1063 | if (qp->s_rnr_timeout == 0 && !list_empty(&qp->timerwait)) |
1198 | list_move_tail(&qp->timerwait, | 1064 | list_move_tail(&qp->timerwait, |
1199 | &dev->pending[dev->pending_index]); | 1065 | &dev->pending[dev->pending_index]); |
1200 | spin_unlock(&dev->pending_lock); | 1066 | spin_unlock(&dev->pending_lock); |
1201 | /* | 1067 | /* |
1202 | * Update the RDMA receive state but do the copy w/o holding the | 1068 | * Update the RDMA receive state but do the copy w/o |
1203 | * locks and blocking interrupts. XXX Yet another place that | 1069 | * holding the locks and blocking interrupts. |
1204 | * affects relaxed RDMA order since we don't want s_sge modified. | 1070 | * XXX Yet another place that affects relaxed RDMA order |
1205 | */ | 1071 | * since we don't want s_sge modified. |
1206 | qp->s_len -= pmtu; | 1072 | */ |
1207 | qp->s_last_psn = psn; | 1073 | qp->s_len -= pmtu; |
1208 | spin_unlock_irqrestore(&qp->s_lock, flags); | 1074 | qp->s_last_psn = psn; |
1209 | ipath_copy_sge(&qp->s_sge, data, pmtu); | 1075 | spin_unlock_irqrestore(&qp->s_lock, flags); |
1210 | goto bail; | 1076 | ipath_copy_sge(&qp->s_sge, data, pmtu); |
1077 | goto bail; | ||
1211 | 1078 | ||
1212 | case OP(RDMA_READ_RESPONSE_LAST): | 1079 | case OP(RDMA_READ_RESPONSE_LAST): |
1213 | /* ACKs READ req. */ | 1080 | /* ACKs READ req. */ |
@@ -1230,18 +1097,12 @@ static inline void ipath_rc_rcv_resp(struct ipath_ibdev *dev, | |||
1230 | * ICRC (4). | 1097 | * ICRC (4). |
1231 | */ | 1098 | */ |
1232 | if (unlikely(tlen <= (hdrsize + pad + 8))) { | 1099 | if (unlikely(tlen <= (hdrsize + pad + 8))) { |
1233 | /* | 1100 | /* XXX Need to generate an error CQ entry. */ |
1234 | * XXX Need to generate an error CQ | ||
1235 | * entry. | ||
1236 | */ | ||
1237 | goto ack_done; | 1101 | goto ack_done; |
1238 | } | 1102 | } |
1239 | tlen -= hdrsize + pad + 8; | 1103 | tlen -= hdrsize + pad + 8; |
1240 | if (unlikely(tlen != qp->s_len)) { | 1104 | if (unlikely(tlen != qp->s_len)) { |
1241 | /* | 1105 | /* XXX Need to generate an error CQ entry. */ |
1242 | * XXX Need to generate an error CQ | ||
1243 | * entry. | ||
1244 | */ | ||
1245 | goto ack_done; | 1106 | goto ack_done; |
1246 | } | 1107 | } |
1247 | if (!header_in_data) | 1108 | if (!header_in_data) |
@@ -1254,9 +1115,12 @@ static inline void ipath_rc_rcv_resp(struct ipath_ibdev *dev, | |||
1254 | if (do_rc_ack(qp, aeth, psn, OP(RDMA_READ_RESPONSE_LAST))) { | 1115 | if (do_rc_ack(qp, aeth, psn, OP(RDMA_READ_RESPONSE_LAST))) { |
1255 | /* | 1116 | /* |
1256 | * Change the state so we contimue | 1117 | * Change the state so we contimue |
1257 | * processing new requests. | 1118 | * processing new requests and wake up the |
1119 | * tasklet if there are posted sends. | ||
1258 | */ | 1120 | */ |
1259 | qp->s_state = OP(SEND_LAST); | 1121 | qp->s_state = OP(SEND_LAST); |
1122 | if (qp->s_tail != qp->s_head) | ||
1123 | tasklet_hi_schedule(&qp->s_task); | ||
1260 | } | 1124 | } |
1261 | goto ack_done; | 1125 | goto ack_done; |
1262 | } | 1126 | } |
@@ -1302,18 +1166,16 @@ static inline int ipath_rc_rcv_error(struct ipath_ibdev *dev, | |||
1302 | * Don't queue the NAK if a RDMA read, atomic, or | 1166 | * Don't queue the NAK if a RDMA read, atomic, or |
1303 | * NAK is pending though. | 1167 | * NAK is pending though. |
1304 | */ | 1168 | */ |
1305 | spin_lock(&qp->s_lock); | 1169 | if (qp->s_ack_state != OP(ACKNOWLEDGE) || |
1306 | if ((qp->s_ack_state >= OP(RDMA_READ_REQUEST) && | 1170 | qp->r_nak_state != 0) |
1307 | qp->s_ack_state != IB_OPCODE_ACKNOWLEDGE) || | ||
1308 | qp->s_nak_state != 0) { | ||
1309 | spin_unlock(&qp->s_lock); | ||
1310 | goto done; | 1171 | goto done; |
1172 | if (qp->r_ack_state < OP(COMPARE_SWAP)) { | ||
1173 | qp->r_ack_state = OP(SEND_ONLY); | ||
1174 | qp->r_nak_state = IB_NAK_PSN_ERROR; | ||
1175 | /* Use the expected PSN. */ | ||
1176 | qp->r_ack_psn = qp->r_psn; | ||
1311 | } | 1177 | } |
1312 | qp->s_ack_state = OP(SEND_ONLY); | 1178 | goto send_ack; |
1313 | qp->s_nak_state = IB_NAK_PSN_ERROR; | ||
1314 | /* Use the expected PSN. */ | ||
1315 | qp->s_ack_psn = qp->r_psn; | ||
1316 | goto resched; | ||
1317 | } | 1179 | } |
1318 | 1180 | ||
1319 | /* | 1181 | /* |
@@ -1327,27 +1189,7 @@ static inline int ipath_rc_rcv_error(struct ipath_ibdev *dev, | |||
1327 | * send the earliest so that RDMA reads can be restarted at | 1189 | * send the earliest so that RDMA reads can be restarted at |
1328 | * the requester's expected PSN. | 1190 | * the requester's expected PSN. |
1329 | */ | 1191 | */ |
1330 | spin_lock(&qp->s_lock); | 1192 | if (opcode == OP(RDMA_READ_REQUEST)) { |
1331 | if (qp->s_ack_state != IB_OPCODE_ACKNOWLEDGE && | ||
1332 | ipath_cmp24(psn, qp->s_ack_psn) >= 0) { | ||
1333 | if (qp->s_ack_state < IB_OPCODE_RDMA_READ_REQUEST) | ||
1334 | qp->s_ack_psn = psn; | ||
1335 | spin_unlock(&qp->s_lock); | ||
1336 | goto done; | ||
1337 | } | ||
1338 | switch (opcode) { | ||
1339 | case OP(RDMA_READ_REQUEST): | ||
1340 | /* | ||
1341 | * We have to be careful to not change s_rdma_sge | ||
1342 | * while ipath_do_rc_send() is using it and not | ||
1343 | * holding the s_lock. | ||
1344 | */ | ||
1345 | if (qp->s_ack_state != OP(ACKNOWLEDGE) && | ||
1346 | qp->s_ack_state >= IB_OPCODE_RDMA_READ_REQUEST) { | ||
1347 | spin_unlock(&qp->s_lock); | ||
1348 | dev->n_rdma_dup_busy++; | ||
1349 | goto done; | ||
1350 | } | ||
1351 | /* RETH comes after BTH */ | 1193 | /* RETH comes after BTH */ |
1352 | if (!header_in_data) | 1194 | if (!header_in_data) |
1353 | reth = &ohdr->u.rc.reth; | 1195 | reth = &ohdr->u.rc.reth; |
@@ -1355,6 +1197,22 @@ static inline int ipath_rc_rcv_error(struct ipath_ibdev *dev, | |||
1355 | reth = (struct ib_reth *)data; | 1197 | reth = (struct ib_reth *)data; |
1356 | data += sizeof(*reth); | 1198 | data += sizeof(*reth); |
1357 | } | 1199 | } |
1200 | /* | ||
1201 | * If we receive a duplicate RDMA request, it means the | ||
1202 | * requester saw a sequence error and needs to restart | ||
1203 | * from an earlier point. We can abort the current | ||
1204 | * RDMA read send in that case. | ||
1205 | */ | ||
1206 | spin_lock_irq(&qp->s_lock); | ||
1207 | if (qp->s_ack_state != OP(ACKNOWLEDGE) && | ||
1208 | (qp->s_hdrwords || ipath_cmp24(psn, qp->s_ack_psn) >= 0)) { | ||
1209 | /* | ||
1210 | * We are already sending earlier requested data. | ||
1211 | * Don't abort it to send later out of sequence data. | ||
1212 | */ | ||
1213 | spin_unlock_irq(&qp->s_lock); | ||
1214 | goto done; | ||
1215 | } | ||
1358 | qp->s_rdma_len = be32_to_cpu(reth->length); | 1216 | qp->s_rdma_len = be32_to_cpu(reth->length); |
1359 | if (qp->s_rdma_len != 0) { | 1217 | if (qp->s_rdma_len != 0) { |
1360 | u32 rkey = be32_to_cpu(reth->rkey); | 1218 | u32 rkey = be32_to_cpu(reth->rkey); |
@@ -1368,8 +1226,10 @@ static inline int ipath_rc_rcv_error(struct ipath_ibdev *dev, | |||
1368 | ok = ipath_rkey_ok(dev, &qp->s_rdma_sge, | 1226 | ok = ipath_rkey_ok(dev, &qp->s_rdma_sge, |
1369 | qp->s_rdma_len, vaddr, rkey, | 1227 | qp->s_rdma_len, vaddr, rkey, |
1370 | IB_ACCESS_REMOTE_READ); | 1228 | IB_ACCESS_REMOTE_READ); |
1371 | if (unlikely(!ok)) | 1229 | if (unlikely(!ok)) { |
1230 | spin_unlock_irq(&qp->s_lock); | ||
1372 | goto done; | 1231 | goto done; |
1232 | } | ||
1373 | } else { | 1233 | } else { |
1374 | qp->s_rdma_sge.sg_list = NULL; | 1234 | qp->s_rdma_sge.sg_list = NULL; |
1375 | qp->s_rdma_sge.num_sge = 0; | 1235 | qp->s_rdma_sge.num_sge = 0; |
@@ -1378,25 +1238,44 @@ static inline int ipath_rc_rcv_error(struct ipath_ibdev *dev, | |||
1378 | qp->s_rdma_sge.sge.length = 0; | 1238 | qp->s_rdma_sge.sge.length = 0; |
1379 | qp->s_rdma_sge.sge.sge_length = 0; | 1239 | qp->s_rdma_sge.sge.sge_length = 0; |
1380 | } | 1240 | } |
1381 | break; | 1241 | qp->s_ack_state = opcode; |
1242 | qp->s_ack_psn = psn; | ||
1243 | spin_unlock_irq(&qp->s_lock); | ||
1244 | tasklet_hi_schedule(&qp->s_task); | ||
1245 | goto send_ack; | ||
1246 | } | ||
1247 | |||
1248 | /* | ||
1249 | * A pending RDMA read will ACK anything before it so | ||
1250 | * ignore earlier duplicate requests. | ||
1251 | */ | ||
1252 | if (qp->s_ack_state != OP(ACKNOWLEDGE)) | ||
1253 | goto done; | ||
1382 | 1254 | ||
1255 | /* | ||
1256 | * If an ACK is pending, don't replace the pending ACK | ||
1257 | * with an earlier one since the later one will ACK the earlier. | ||
1258 | * Also, if we already have a pending atomic, send it. | ||
1259 | */ | ||
1260 | if (qp->r_ack_state != OP(ACKNOWLEDGE) && | ||
1261 | (ipath_cmp24(psn, qp->r_ack_psn) <= 0 || | ||
1262 | qp->r_ack_state >= OP(COMPARE_SWAP))) | ||
1263 | goto send_ack; | ||
1264 | switch (opcode) { | ||
1383 | case OP(COMPARE_SWAP): | 1265 | case OP(COMPARE_SWAP): |
1384 | case OP(FETCH_ADD): | 1266 | case OP(FETCH_ADD): |
1385 | /* | 1267 | /* |
1386 | * Check for the PSN of the last atomic operations | 1268 | * Check for the PSN of the last atomic operation |
1387 | * performed and resend the result if found. | 1269 | * performed and resend the result if found. |
1388 | */ | 1270 | */ |
1389 | if ((psn & IPS_PSN_MASK) != qp->r_atomic_psn) { | 1271 | if ((psn & IPATH_PSN_MASK) != qp->r_atomic_psn) |
1390 | spin_unlock(&qp->s_lock); | ||
1391 | goto done; | 1272 | goto done; |
1392 | } | ||
1393 | qp->s_ack_atomic = qp->r_atomic_data; | ||
1394 | break; | 1273 | break; |
1395 | } | 1274 | } |
1396 | qp->s_ack_state = opcode; | 1275 | qp->r_ack_state = opcode; |
1397 | qp->s_nak_state = 0; | 1276 | qp->r_nak_state = 0; |
1398 | qp->s_ack_psn = psn; | 1277 | qp->r_ack_psn = psn; |
1399 | resched: | 1278 | send_ack: |
1400 | return 0; | 1279 | return 0; |
1401 | 1280 | ||
1402 | done: | 1281 | done: |
@@ -1424,7 +1303,6 @@ void ipath_rc_rcv(struct ipath_ibdev *dev, struct ipath_ib_header *hdr, | |||
1424 | u32 hdrsize; | 1303 | u32 hdrsize; |
1425 | u32 psn; | 1304 | u32 psn; |
1426 | u32 pad; | 1305 | u32 pad; |
1427 | unsigned long flags; | ||
1428 | struct ib_wc wc; | 1306 | struct ib_wc wc; |
1429 | u32 pmtu = ib_mtu_enum_to_int(qp->path_mtu); | 1307 | u32 pmtu = ib_mtu_enum_to_int(qp->path_mtu); |
1430 | int diff; | 1308 | int diff; |
@@ -1453,11 +1331,6 @@ void ipath_rc_rcv(struct ipath_ibdev *dev, struct ipath_ib_header *hdr, | |||
1453 | } else | 1331 | } else |
1454 | psn = be32_to_cpu(ohdr->bth[2]); | 1332 | psn = be32_to_cpu(ohdr->bth[2]); |
1455 | } | 1333 | } |
1456 | /* | ||
1457 | * The opcode is in the low byte when its in network order | ||
1458 | * (top byte when in host order). | ||
1459 | */ | ||
1460 | opcode = be32_to_cpu(ohdr->bth[0]) >> 24; | ||
1461 | 1334 | ||
1462 | /* | 1335 | /* |
1463 | * Process responses (ACKs) before anything else. Note that the | 1336 | * Process responses (ACKs) before anything else. Note that the |
@@ -1465,22 +1338,21 @@ void ipath_rc_rcv(struct ipath_ibdev *dev, struct ipath_ib_header *hdr, | |||
1465 | * queue rather than the expected receive packet sequence number. | 1338 | * queue rather than the expected receive packet sequence number. |
1466 | * In other words, this QP is the requester. | 1339 | * In other words, this QP is the requester. |
1467 | */ | 1340 | */ |
1341 | opcode = be32_to_cpu(ohdr->bth[0]) >> 24; | ||
1468 | if (opcode >= OP(RDMA_READ_RESPONSE_FIRST) && | 1342 | if (opcode >= OP(RDMA_READ_RESPONSE_FIRST) && |
1469 | opcode <= OP(ATOMIC_ACKNOWLEDGE)) { | 1343 | opcode <= OP(ATOMIC_ACKNOWLEDGE)) { |
1470 | ipath_rc_rcv_resp(dev, ohdr, data, tlen, qp, opcode, psn, | 1344 | ipath_rc_rcv_resp(dev, ohdr, data, tlen, qp, opcode, psn, |
1471 | hdrsize, pmtu, header_in_data); | 1345 | hdrsize, pmtu, header_in_data); |
1472 | goto bail; | 1346 | goto done; |
1473 | } | 1347 | } |
1474 | 1348 | ||
1475 | spin_lock_irqsave(&qp->r_rq.lock, flags); | ||
1476 | |||
1477 | /* Compute 24 bits worth of difference. */ | 1349 | /* Compute 24 bits worth of difference. */ |
1478 | diff = ipath_cmp24(psn, qp->r_psn); | 1350 | diff = ipath_cmp24(psn, qp->r_psn); |
1479 | if (unlikely(diff)) { | 1351 | if (unlikely(diff)) { |
1480 | if (ipath_rc_rcv_error(dev, ohdr, data, qp, opcode, | 1352 | if (ipath_rc_rcv_error(dev, ohdr, data, qp, opcode, |
1481 | psn, diff, header_in_data)) | 1353 | psn, diff, header_in_data)) |
1482 | goto done; | 1354 | goto done; |
1483 | goto resched; | 1355 | goto send_ack; |
1484 | } | 1356 | } |
1485 | 1357 | ||
1486 | /* Check for opcode sequence errors. */ | 1358 | /* Check for opcode sequence errors. */ |
@@ -1492,22 +1364,19 @@ void ipath_rc_rcv(struct ipath_ibdev *dev, struct ipath_ib_header *hdr, | |||
1492 | opcode == OP(SEND_LAST_WITH_IMMEDIATE)) | 1364 | opcode == OP(SEND_LAST_WITH_IMMEDIATE)) |
1493 | break; | 1365 | break; |
1494 | nack_inv: | 1366 | nack_inv: |
1495 | /* | 1367 | /* |
1496 | * A NAK will ACK earlier sends and RDMA writes. Don't queue the | 1368 | * A NAK will ACK earlier sends and RDMA writes. |
1497 | * NAK if a RDMA read, atomic, or NAK is pending though. | 1369 | * Don't queue the NAK if a RDMA read, atomic, or NAK |
1498 | */ | 1370 | * is pending though. |
1499 | spin_lock(&qp->s_lock); | 1371 | */ |
1500 | if (qp->s_ack_state >= OP(RDMA_READ_REQUEST) && | 1372 | if (qp->r_ack_state >= OP(COMPARE_SWAP)) |
1501 | qp->s_ack_state != IB_OPCODE_ACKNOWLEDGE) { | 1373 | goto send_ack; |
1502 | spin_unlock(&qp->s_lock); | 1374 | /* XXX Flush WQEs */ |
1503 | goto done; | 1375 | qp->state = IB_QPS_ERR; |
1504 | } | 1376 | qp->r_ack_state = OP(SEND_ONLY); |
1505 | /* XXX Flush WQEs */ | 1377 | qp->r_nak_state = IB_NAK_INVALID_REQUEST; |
1506 | qp->state = IB_QPS_ERR; | 1378 | qp->r_ack_psn = qp->r_psn; |
1507 | qp->s_ack_state = OP(SEND_ONLY); | 1379 | goto send_ack; |
1508 | qp->s_nak_state = IB_NAK_INVALID_REQUEST; | ||
1509 | qp->s_ack_psn = qp->r_psn; | ||
1510 | goto resched; | ||
1511 | 1380 | ||
1512 | case OP(RDMA_WRITE_FIRST): | 1381 | case OP(RDMA_WRITE_FIRST): |
1513 | case OP(RDMA_WRITE_MIDDLE): | 1382 | case OP(RDMA_WRITE_MIDDLE): |
@@ -1517,20 +1386,6 @@ void ipath_rc_rcv(struct ipath_ibdev *dev, struct ipath_ib_header *hdr, | |||
1517 | break; | 1386 | break; |
1518 | goto nack_inv; | 1387 | goto nack_inv; |
1519 | 1388 | ||
1520 | case OP(RDMA_READ_REQUEST): | ||
1521 | case OP(COMPARE_SWAP): | ||
1522 | case OP(FETCH_ADD): | ||
1523 | /* | ||
1524 | * Drop all new requests until a response has been sent. A | ||
1525 | * new request then ACKs the RDMA response we sent. Relaxed | ||
1526 | * ordering would allow new requests to be processed but we | ||
1527 | * would need to keep a queue of rwqe's for all that are in | ||
1528 | * progress. Note that we can't RNR NAK this request since | ||
1529 | * the RDMA READ or atomic response is already queued to be | ||
1530 | * sent (unless we implement a response send queue). | ||
1531 | */ | ||
1532 | goto done; | ||
1533 | |||
1534 | default: | 1389 | default: |
1535 | if (opcode == OP(SEND_MIDDLE) || | 1390 | if (opcode == OP(SEND_MIDDLE) || |
1536 | opcode == OP(SEND_LAST) || | 1391 | opcode == OP(SEND_LAST) || |
@@ -1539,6 +1394,11 @@ void ipath_rc_rcv(struct ipath_ibdev *dev, struct ipath_ib_header *hdr, | |||
1539 | opcode == OP(RDMA_WRITE_LAST) || | 1394 | opcode == OP(RDMA_WRITE_LAST) || |
1540 | opcode == OP(RDMA_WRITE_LAST_WITH_IMMEDIATE)) | 1395 | opcode == OP(RDMA_WRITE_LAST_WITH_IMMEDIATE)) |
1541 | goto nack_inv; | 1396 | goto nack_inv; |
1397 | /* | ||
1398 | * Note that it is up to the requester to not send a new | ||
1399 | * RDMA read or atomic operation before receiving an ACK | ||
1400 | * for the previous operation. | ||
1401 | */ | ||
1542 | break; | 1402 | break; |
1543 | } | 1403 | } |
1544 | 1404 | ||
@@ -1555,17 +1415,12 @@ void ipath_rc_rcv(struct ipath_ibdev *dev, struct ipath_ib_header *hdr, | |||
1555 | * Don't queue the NAK if a RDMA read or atomic | 1415 | * Don't queue the NAK if a RDMA read or atomic |
1556 | * is pending though. | 1416 | * is pending though. |
1557 | */ | 1417 | */ |
1558 | spin_lock(&qp->s_lock); | 1418 | if (qp->r_ack_state >= OP(COMPARE_SWAP)) |
1559 | if (qp->s_ack_state >= | 1419 | goto send_ack; |
1560 | OP(RDMA_READ_REQUEST) && | 1420 | qp->r_ack_state = OP(SEND_ONLY); |
1561 | qp->s_ack_state != IB_OPCODE_ACKNOWLEDGE) { | 1421 | qp->r_nak_state = IB_RNR_NAK | qp->r_min_rnr_timer; |
1562 | spin_unlock(&qp->s_lock); | 1422 | qp->r_ack_psn = qp->r_psn; |
1563 | goto done; | 1423 | goto send_ack; |
1564 | } | ||
1565 | qp->s_ack_state = OP(SEND_ONLY); | ||
1566 | qp->s_nak_state = IB_RNR_NAK | qp->s_min_rnr_timer; | ||
1567 | qp->s_ack_psn = qp->r_psn; | ||
1568 | goto resched; | ||
1569 | } | 1424 | } |
1570 | qp->r_rcv_len = 0; | 1425 | qp->r_rcv_len = 0; |
1571 | /* FALLTHROUGH */ | 1426 | /* FALLTHROUGH */ |
@@ -1622,7 +1477,7 @@ void ipath_rc_rcv(struct ipath_ibdev *dev, struct ipath_ib_header *hdr, | |||
1622 | if (unlikely(wc.byte_len > qp->r_len)) | 1477 | if (unlikely(wc.byte_len > qp->r_len)) |
1623 | goto nack_inv; | 1478 | goto nack_inv; |
1624 | ipath_copy_sge(&qp->r_sge, data, tlen); | 1479 | ipath_copy_sge(&qp->r_sge, data, tlen); |
1625 | atomic_inc(&qp->msn); | 1480 | qp->r_msn++; |
1626 | if (opcode == OP(RDMA_WRITE_LAST) || | 1481 | if (opcode == OP(RDMA_WRITE_LAST) || |
1627 | opcode == OP(RDMA_WRITE_ONLY)) | 1482 | opcode == OP(RDMA_WRITE_ONLY)) |
1628 | break; | 1483 | break; |
@@ -1666,29 +1521,8 @@ void ipath_rc_rcv(struct ipath_ibdev *dev, struct ipath_ib_header *hdr, | |||
1666 | ok = ipath_rkey_ok(dev, &qp->r_sge, | 1521 | ok = ipath_rkey_ok(dev, &qp->r_sge, |
1667 | qp->r_len, vaddr, rkey, | 1522 | qp->r_len, vaddr, rkey, |
1668 | IB_ACCESS_REMOTE_WRITE); | 1523 | IB_ACCESS_REMOTE_WRITE); |
1669 | if (unlikely(!ok)) { | 1524 | if (unlikely(!ok)) |
1670 | nack_acc: | 1525 | goto nack_acc; |
1671 | /* | ||
1672 | * A NAK will ACK earlier sends and RDMA | ||
1673 | * writes. Don't queue the NAK if a RDMA | ||
1674 | * read, atomic, or NAK is pending though. | ||
1675 | */ | ||
1676 | spin_lock(&qp->s_lock); | ||
1677 | if (qp->s_ack_state >= | ||
1678 | OP(RDMA_READ_REQUEST) && | ||
1679 | qp->s_ack_state != | ||
1680 | IB_OPCODE_ACKNOWLEDGE) { | ||
1681 | spin_unlock(&qp->s_lock); | ||
1682 | goto done; | ||
1683 | } | ||
1684 | /* XXX Flush WQEs */ | ||
1685 | qp->state = IB_QPS_ERR; | ||
1686 | qp->s_ack_state = OP(RDMA_WRITE_ONLY); | ||
1687 | qp->s_nak_state = | ||
1688 | IB_NAK_REMOTE_ACCESS_ERROR; | ||
1689 | qp->s_ack_psn = qp->r_psn; | ||
1690 | goto resched; | ||
1691 | } | ||
1692 | } else { | 1526 | } else { |
1693 | qp->r_sge.sg_list = NULL; | 1527 | qp->r_sge.sg_list = NULL; |
1694 | qp->r_sge.sge.mr = NULL; | 1528 | qp->r_sge.sge.mr = NULL; |
@@ -1715,12 +1549,10 @@ void ipath_rc_rcv(struct ipath_ibdev *dev, struct ipath_ib_header *hdr, | |||
1715 | reth = (struct ib_reth *)data; | 1549 | reth = (struct ib_reth *)data; |
1716 | data += sizeof(*reth); | 1550 | data += sizeof(*reth); |
1717 | } | 1551 | } |
1718 | spin_lock(&qp->s_lock); | 1552 | if (unlikely(!(qp->qp_access_flags & |
1719 | if (qp->s_ack_state != OP(ACKNOWLEDGE) && | 1553 | IB_ACCESS_REMOTE_READ))) |
1720 | qp->s_ack_state >= IB_OPCODE_RDMA_READ_REQUEST) { | 1554 | goto nack_acc; |
1721 | spin_unlock(&qp->s_lock); | 1555 | spin_lock_irq(&qp->s_lock); |
1722 | goto done; | ||
1723 | } | ||
1724 | qp->s_rdma_len = be32_to_cpu(reth->length); | 1556 | qp->s_rdma_len = be32_to_cpu(reth->length); |
1725 | if (qp->s_rdma_len != 0) { | 1557 | if (qp->s_rdma_len != 0) { |
1726 | u32 rkey = be32_to_cpu(reth->rkey); | 1558 | u32 rkey = be32_to_cpu(reth->rkey); |
@@ -1732,7 +1564,7 @@ void ipath_rc_rcv(struct ipath_ibdev *dev, struct ipath_ib_header *hdr, | |||
1732 | qp->s_rdma_len, vaddr, rkey, | 1564 | qp->s_rdma_len, vaddr, rkey, |
1733 | IB_ACCESS_REMOTE_READ); | 1565 | IB_ACCESS_REMOTE_READ); |
1734 | if (unlikely(!ok)) { | 1566 | if (unlikely(!ok)) { |
1735 | spin_unlock(&qp->s_lock); | 1567 | spin_unlock_irq(&qp->s_lock); |
1736 | goto nack_acc; | 1568 | goto nack_acc; |
1737 | } | 1569 | } |
1738 | /* | 1570 | /* |
@@ -1749,21 +1581,25 @@ void ipath_rc_rcv(struct ipath_ibdev *dev, struct ipath_ib_header *hdr, | |||
1749 | qp->s_rdma_sge.sge.length = 0; | 1581 | qp->s_rdma_sge.sge.length = 0; |
1750 | qp->s_rdma_sge.sge.sge_length = 0; | 1582 | qp->s_rdma_sge.sge.sge_length = 0; |
1751 | } | 1583 | } |
1752 | if (unlikely(!(qp->qp_access_flags & | ||
1753 | IB_ACCESS_REMOTE_READ))) | ||
1754 | goto nack_acc; | ||
1755 | /* | 1584 | /* |
1756 | * We need to increment the MSN here instead of when we | 1585 | * We need to increment the MSN here instead of when we |
1757 | * finish sending the result since a duplicate request would | 1586 | * finish sending the result since a duplicate request would |
1758 | * increment it more than once. | 1587 | * increment it more than once. |
1759 | */ | 1588 | */ |
1760 | atomic_inc(&qp->msn); | 1589 | qp->r_msn++; |
1590 | |||
1761 | qp->s_ack_state = opcode; | 1591 | qp->s_ack_state = opcode; |
1762 | qp->s_nak_state = 0; | ||
1763 | qp->s_ack_psn = psn; | 1592 | qp->s_ack_psn = psn; |
1593 | spin_unlock_irq(&qp->s_lock); | ||
1594 | |||
1764 | qp->r_psn++; | 1595 | qp->r_psn++; |
1765 | qp->r_state = opcode; | 1596 | qp->r_state = opcode; |
1766 | goto rdmadone; | 1597 | qp->r_nak_state = 0; |
1598 | |||
1599 | /* Call ipath_do_rc_send() in another thread. */ | ||
1600 | tasklet_hi_schedule(&qp->s_task); | ||
1601 | |||
1602 | goto done; | ||
1767 | 1603 | ||
1768 | case OP(COMPARE_SWAP): | 1604 | case OP(COMPARE_SWAP): |
1769 | case OP(FETCH_ADD): { | 1605 | case OP(FETCH_ADD): { |
@@ -1792,7 +1628,7 @@ void ipath_rc_rcv(struct ipath_ibdev *dev, struct ipath_ib_header *hdr, | |||
1792 | goto nack_acc; | 1628 | goto nack_acc; |
1793 | /* Perform atomic OP and save result. */ | 1629 | /* Perform atomic OP and save result. */ |
1794 | sdata = be64_to_cpu(ateth->swap_data); | 1630 | sdata = be64_to_cpu(ateth->swap_data); |
1795 | spin_lock(&dev->pending_lock); | 1631 | spin_lock_irq(&dev->pending_lock); |
1796 | qp->r_atomic_data = *(u64 *) qp->r_sge.sge.vaddr; | 1632 | qp->r_atomic_data = *(u64 *) qp->r_sge.sge.vaddr; |
1797 | if (opcode == OP(FETCH_ADD)) | 1633 | if (opcode == OP(FETCH_ADD)) |
1798 | *(u64 *) qp->r_sge.sge.vaddr = | 1634 | *(u64 *) qp->r_sge.sge.vaddr = |
@@ -1800,9 +1636,9 @@ void ipath_rc_rcv(struct ipath_ibdev *dev, struct ipath_ib_header *hdr, | |||
1800 | else if (qp->r_atomic_data == | 1636 | else if (qp->r_atomic_data == |
1801 | be64_to_cpu(ateth->compare_data)) | 1637 | be64_to_cpu(ateth->compare_data)) |
1802 | *(u64 *) qp->r_sge.sge.vaddr = sdata; | 1638 | *(u64 *) qp->r_sge.sge.vaddr = sdata; |
1803 | spin_unlock(&dev->pending_lock); | 1639 | spin_unlock_irq(&dev->pending_lock); |
1804 | atomic_inc(&qp->msn); | 1640 | qp->r_msn++; |
1805 | qp->r_atomic_psn = psn & IPS_PSN_MASK; | 1641 | qp->r_atomic_psn = psn & IPATH_PSN_MASK; |
1806 | psn |= 1 << 31; | 1642 | psn |= 1 << 31; |
1807 | break; | 1643 | break; |
1808 | } | 1644 | } |
@@ -1813,44 +1649,39 @@ void ipath_rc_rcv(struct ipath_ibdev *dev, struct ipath_ib_header *hdr, | |||
1813 | } | 1649 | } |
1814 | qp->r_psn++; | 1650 | qp->r_psn++; |
1815 | qp->r_state = opcode; | 1651 | qp->r_state = opcode; |
1652 | qp->r_nak_state = 0; | ||
1816 | /* Send an ACK if requested or required. */ | 1653 | /* Send an ACK if requested or required. */ |
1817 | if (psn & (1 << 31)) { | 1654 | if (psn & (1 << 31)) { |
1818 | /* | 1655 | /* |
1819 | * Coalesce ACKs unless there is a RDMA READ or | 1656 | * Coalesce ACKs unless there is a RDMA READ or |
1820 | * ATOMIC pending. | 1657 | * ATOMIC pending. |
1821 | */ | 1658 | */ |
1822 | spin_lock(&qp->s_lock); | 1659 | if (qp->r_ack_state < OP(COMPARE_SWAP)) { |
1823 | if (qp->s_ack_state == OP(ACKNOWLEDGE) || | 1660 | qp->r_ack_state = opcode; |
1824 | qp->s_ack_state < IB_OPCODE_RDMA_READ_REQUEST) { | 1661 | qp->r_ack_psn = psn; |
1825 | qp->s_ack_state = opcode; | ||
1826 | qp->s_nak_state = 0; | ||
1827 | qp->s_ack_psn = psn; | ||
1828 | qp->s_ack_atomic = qp->r_atomic_data; | ||
1829 | goto resched; | ||
1830 | } | 1662 | } |
1831 | spin_unlock(&qp->s_lock); | 1663 | goto send_ack; |
1832 | } | 1664 | } |
1833 | done: | 1665 | goto done; |
1834 | spin_unlock_irqrestore(&qp->r_rq.lock, flags); | ||
1835 | goto bail; | ||
1836 | 1666 | ||
1837 | resched: | 1667 | nack_acc: |
1838 | /* | 1668 | /* |
1839 | * Try to send ACK right away but not if ipath_do_rc_send() is | 1669 | * A NAK will ACK earlier sends and RDMA writes. |
1840 | * active. | 1670 | * Don't queue the NAK if a RDMA read, atomic, or NAK |
1671 | * is pending though. | ||
1841 | */ | 1672 | */ |
1842 | if (qp->s_hdrwords == 0 && | 1673 | if (qp->r_ack_state < OP(COMPARE_SWAP)) { |
1843 | (qp->s_ack_state < IB_OPCODE_RDMA_READ_REQUEST || | 1674 | /* XXX Flush WQEs */ |
1844 | qp->s_ack_state >= IB_OPCODE_COMPARE_SWAP)) | 1675 | qp->state = IB_QPS_ERR; |
1676 | qp->r_ack_state = OP(RDMA_WRITE_ONLY); | ||
1677 | qp->r_nak_state = IB_NAK_REMOTE_ACCESS_ERROR; | ||
1678 | qp->r_ack_psn = qp->r_psn; | ||
1679 | } | ||
1680 | send_ack: | ||
1681 | /* Send ACK right away unless the send tasklet has a pending ACK. */ | ||
1682 | if (qp->s_ack_state == OP(ACKNOWLEDGE)) | ||
1845 | send_rc_ack(qp); | 1683 | send_rc_ack(qp); |
1846 | 1684 | ||
1847 | rdmadone: | 1685 | done: |
1848 | spin_unlock(&qp->s_lock); | ||
1849 | spin_unlock_irqrestore(&qp->r_rq.lock, flags); | ||
1850 | |||
1851 | /* Call ipath_do_rc_send() in another thread. */ | ||
1852 | tasklet_hi_schedule(&qp->s_task); | ||
1853 | |||
1854 | bail: | ||
1855 | return; | 1686 | return; |
1856 | } | 1687 | } |
diff --git a/drivers/infiniband/hw/ipath/ipath_registers.h b/drivers/infiniband/hw/ipath/ipath_registers.h index 402126eb79c9..89df8f5ea998 100644 --- a/drivers/infiniband/hw/ipath/ipath_registers.h +++ b/drivers/infiniband/hw/ipath/ipath_registers.h | |||
@@ -1,4 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2006 QLogic, Inc. All rights reserved. | ||
2 | * Copyright (c) 2003, 2004, 2005, 2006 PathScale, Inc. All rights reserved. | 3 | * Copyright (c) 2003, 2004, 2005, 2006 PathScale, Inc. All rights reserved. |
3 | * | 4 | * |
4 | * This software is available to you under a choice of one of two | 5 | * This software is available to you under a choice of one of two |
diff --git a/drivers/infiniband/hw/ipath/ipath_ruc.c b/drivers/infiniband/hw/ipath/ipath_ruc.c index d38f4f3cfd1d..772bc59fb85c 100644 --- a/drivers/infiniband/hw/ipath/ipath_ruc.c +++ b/drivers/infiniband/hw/ipath/ipath_ruc.c | |||
@@ -1,4 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2006 QLogic, Inc. All rights reserved. | ||
2 | * Copyright (c) 2005, 2006 PathScale, Inc. All rights reserved. | 3 | * Copyright (c) 2005, 2006 PathScale, Inc. All rights reserved. |
3 | * | 4 | * |
4 | * This software is available to you under a choice of one of two | 5 | * This software is available to you under a choice of one of two |
@@ -31,6 +32,7 @@ | |||
31 | */ | 32 | */ |
32 | 33 | ||
33 | #include "ipath_verbs.h" | 34 | #include "ipath_verbs.h" |
35 | #include "ipath_common.h" | ||
34 | 36 | ||
35 | /* | 37 | /* |
36 | * Convert the AETH RNR timeout code into the number of milliseconds. | 38 | * Convert the AETH RNR timeout code into the number of milliseconds. |
@@ -111,20 +113,23 @@ void ipath_insert_rnr_queue(struct ipath_qp *qp) | |||
111 | * | 113 | * |
112 | * Return 0 if no RWQE is available, otherwise return 1. | 114 | * Return 0 if no RWQE is available, otherwise return 1. |
113 | * | 115 | * |
114 | * Called at interrupt level with the QP r_rq.lock held. | 116 | * Can be called from interrupt level. |
115 | */ | 117 | */ |
116 | int ipath_get_rwqe(struct ipath_qp *qp, int wr_id_only) | 118 | int ipath_get_rwqe(struct ipath_qp *qp, int wr_id_only) |
117 | { | 119 | { |
120 | unsigned long flags; | ||
118 | struct ipath_rq *rq; | 121 | struct ipath_rq *rq; |
119 | struct ipath_srq *srq; | 122 | struct ipath_srq *srq; |
120 | struct ipath_rwqe *wqe; | 123 | struct ipath_rwqe *wqe; |
121 | int ret; | 124 | int ret = 1; |
122 | 125 | ||
123 | if (!qp->ibqp.srq) { | 126 | if (!qp->ibqp.srq) { |
124 | rq = &qp->r_rq; | 127 | rq = &qp->r_rq; |
128 | spin_lock_irqsave(&rq->lock, flags); | ||
129 | |||
125 | if (unlikely(rq->tail == rq->head)) { | 130 | if (unlikely(rq->tail == rq->head)) { |
126 | ret = 0; | 131 | ret = 0; |
127 | goto bail; | 132 | goto done; |
128 | } | 133 | } |
129 | wqe = get_rwqe_ptr(rq, rq->tail); | 134 | wqe = get_rwqe_ptr(rq, rq->tail); |
130 | qp->r_wr_id = wqe->wr_id; | 135 | qp->r_wr_id = wqe->wr_id; |
@@ -136,17 +141,16 @@ int ipath_get_rwqe(struct ipath_qp *qp, int wr_id_only) | |||
136 | } | 141 | } |
137 | if (++rq->tail >= rq->size) | 142 | if (++rq->tail >= rq->size) |
138 | rq->tail = 0; | 143 | rq->tail = 0; |
139 | ret = 1; | 144 | goto done; |
140 | goto bail; | ||
141 | } | 145 | } |
142 | 146 | ||
143 | srq = to_isrq(qp->ibqp.srq); | 147 | srq = to_isrq(qp->ibqp.srq); |
144 | rq = &srq->rq; | 148 | rq = &srq->rq; |
145 | spin_lock(&rq->lock); | 149 | spin_lock_irqsave(&rq->lock, flags); |
150 | |||
146 | if (unlikely(rq->tail == rq->head)) { | 151 | if (unlikely(rq->tail == rq->head)) { |
147 | spin_unlock(&rq->lock); | ||
148 | ret = 0; | 152 | ret = 0; |
149 | goto bail; | 153 | goto done; |
150 | } | 154 | } |
151 | wqe = get_rwqe_ptr(rq, rq->tail); | 155 | wqe = get_rwqe_ptr(rq, rq->tail); |
152 | qp->r_wr_id = wqe->wr_id; | 156 | qp->r_wr_id = wqe->wr_id; |
@@ -168,18 +172,18 @@ int ipath_get_rwqe(struct ipath_qp *qp, int wr_id_only) | |||
168 | n = rq->head - rq->tail; | 172 | n = rq->head - rq->tail; |
169 | if (n < srq->limit) { | 173 | if (n < srq->limit) { |
170 | srq->limit = 0; | 174 | srq->limit = 0; |
171 | spin_unlock(&rq->lock); | 175 | spin_unlock_irqrestore(&rq->lock, flags); |
172 | ev.device = qp->ibqp.device; | 176 | ev.device = qp->ibqp.device; |
173 | ev.element.srq = qp->ibqp.srq; | 177 | ev.element.srq = qp->ibqp.srq; |
174 | ev.event = IB_EVENT_SRQ_LIMIT_REACHED; | 178 | ev.event = IB_EVENT_SRQ_LIMIT_REACHED; |
175 | srq->ibsrq.event_handler(&ev, | 179 | srq->ibsrq.event_handler(&ev, |
176 | srq->ibsrq.srq_context); | 180 | srq->ibsrq.srq_context); |
177 | } else | 181 | goto bail; |
178 | spin_unlock(&rq->lock); | 182 | } |
179 | } else | 183 | } |
180 | spin_unlock(&rq->lock); | ||
181 | ret = 1; | ||
182 | 184 | ||
185 | done: | ||
186 | spin_unlock_irqrestore(&rq->lock, flags); | ||
183 | bail: | 187 | bail: |
184 | return ret; | 188 | return ret; |
185 | } | 189 | } |
@@ -187,7 +191,6 @@ bail: | |||
187 | /** | 191 | /** |
188 | * ipath_ruc_loopback - handle UC and RC lookback requests | 192 | * ipath_ruc_loopback - handle UC and RC lookback requests |
189 | * @sqp: the loopback QP | 193 | * @sqp: the loopback QP |
190 | * @wc: the work completion entry | ||
191 | * | 194 | * |
192 | * This is called from ipath_do_uc_send() or ipath_do_rc_send() to | 195 | * This is called from ipath_do_uc_send() or ipath_do_rc_send() to |
193 | * forward a WQE addressed to the same HCA. | 196 | * forward a WQE addressed to the same HCA. |
@@ -196,13 +199,14 @@ bail: | |||
196 | * receive interrupts since this is a connected protocol and all packets | 199 | * receive interrupts since this is a connected protocol and all packets |
197 | * will pass through here. | 200 | * will pass through here. |
198 | */ | 201 | */ |
199 | void ipath_ruc_loopback(struct ipath_qp *sqp, struct ib_wc *wc) | 202 | static void ipath_ruc_loopback(struct ipath_qp *sqp) |
200 | { | 203 | { |
201 | struct ipath_ibdev *dev = to_idev(sqp->ibqp.device); | 204 | struct ipath_ibdev *dev = to_idev(sqp->ibqp.device); |
202 | struct ipath_qp *qp; | 205 | struct ipath_qp *qp; |
203 | struct ipath_swqe *wqe; | 206 | struct ipath_swqe *wqe; |
204 | struct ipath_sge *sge; | 207 | struct ipath_sge *sge; |
205 | unsigned long flags; | 208 | unsigned long flags; |
209 | struct ib_wc wc; | ||
206 | u64 sdata; | 210 | u64 sdata; |
207 | 211 | ||
208 | qp = ipath_lookup_qpn(&dev->qp_table, sqp->remote_qpn); | 212 | qp = ipath_lookup_qpn(&dev->qp_table, sqp->remote_qpn); |
@@ -233,8 +237,8 @@ again: | |||
233 | wqe = get_swqe_ptr(sqp, sqp->s_last); | 237 | wqe = get_swqe_ptr(sqp, sqp->s_last); |
234 | spin_unlock_irqrestore(&sqp->s_lock, flags); | 238 | spin_unlock_irqrestore(&sqp->s_lock, flags); |
235 | 239 | ||
236 | wc->wc_flags = 0; | 240 | wc.wc_flags = 0; |
237 | wc->imm_data = 0; | 241 | wc.imm_data = 0; |
238 | 242 | ||
239 | sqp->s_sge.sge = wqe->sg_list[0]; | 243 | sqp->s_sge.sge = wqe->sg_list[0]; |
240 | sqp->s_sge.sg_list = wqe->sg_list + 1; | 244 | sqp->s_sge.sg_list = wqe->sg_list + 1; |
@@ -242,39 +246,34 @@ again: | |||
242 | sqp->s_len = wqe->length; | 246 | sqp->s_len = wqe->length; |
243 | switch (wqe->wr.opcode) { | 247 | switch (wqe->wr.opcode) { |
244 | case IB_WR_SEND_WITH_IMM: | 248 | case IB_WR_SEND_WITH_IMM: |
245 | wc->wc_flags = IB_WC_WITH_IMM; | 249 | wc.wc_flags = IB_WC_WITH_IMM; |
246 | wc->imm_data = wqe->wr.imm_data; | 250 | wc.imm_data = wqe->wr.imm_data; |
247 | /* FALLTHROUGH */ | 251 | /* FALLTHROUGH */ |
248 | case IB_WR_SEND: | 252 | case IB_WR_SEND: |
249 | spin_lock_irqsave(&qp->r_rq.lock, flags); | ||
250 | if (!ipath_get_rwqe(qp, 0)) { | 253 | if (!ipath_get_rwqe(qp, 0)) { |
251 | rnr_nak: | 254 | rnr_nak: |
252 | spin_unlock_irqrestore(&qp->r_rq.lock, flags); | ||
253 | /* Handle RNR NAK */ | 255 | /* Handle RNR NAK */ |
254 | if (qp->ibqp.qp_type == IB_QPT_UC) | 256 | if (qp->ibqp.qp_type == IB_QPT_UC) |
255 | goto send_comp; | 257 | goto send_comp; |
256 | if (sqp->s_rnr_retry == 0) { | 258 | if (sqp->s_rnr_retry == 0) { |
257 | wc->status = IB_WC_RNR_RETRY_EXC_ERR; | 259 | wc.status = IB_WC_RNR_RETRY_EXC_ERR; |
258 | goto err; | 260 | goto err; |
259 | } | 261 | } |
260 | if (sqp->s_rnr_retry_cnt < 7) | 262 | if (sqp->s_rnr_retry_cnt < 7) |
261 | sqp->s_rnr_retry--; | 263 | sqp->s_rnr_retry--; |
262 | dev->n_rnr_naks++; | 264 | dev->n_rnr_naks++; |
263 | sqp->s_rnr_timeout = | 265 | sqp->s_rnr_timeout = |
264 | ib_ipath_rnr_table[sqp->s_min_rnr_timer]; | 266 | ib_ipath_rnr_table[sqp->r_min_rnr_timer]; |
265 | ipath_insert_rnr_queue(sqp); | 267 | ipath_insert_rnr_queue(sqp); |
266 | goto done; | 268 | goto done; |
267 | } | 269 | } |
268 | spin_unlock_irqrestore(&qp->r_rq.lock, flags); | ||
269 | break; | 270 | break; |
270 | 271 | ||
271 | case IB_WR_RDMA_WRITE_WITH_IMM: | 272 | case IB_WR_RDMA_WRITE_WITH_IMM: |
272 | wc->wc_flags = IB_WC_WITH_IMM; | 273 | wc.wc_flags = IB_WC_WITH_IMM; |
273 | wc->imm_data = wqe->wr.imm_data; | 274 | wc.imm_data = wqe->wr.imm_data; |
274 | spin_lock_irqsave(&qp->r_rq.lock, flags); | ||
275 | if (!ipath_get_rwqe(qp, 1)) | 275 | if (!ipath_get_rwqe(qp, 1)) |
276 | goto rnr_nak; | 276 | goto rnr_nak; |
277 | spin_unlock_irqrestore(&qp->r_rq.lock, flags); | ||
278 | /* FALLTHROUGH */ | 277 | /* FALLTHROUGH */ |
279 | case IB_WR_RDMA_WRITE: | 278 | case IB_WR_RDMA_WRITE: |
280 | if (wqe->length == 0) | 279 | if (wqe->length == 0) |
@@ -284,20 +283,20 @@ again: | |||
284 | wqe->wr.wr.rdma.rkey, | 283 | wqe->wr.wr.rdma.rkey, |
285 | IB_ACCESS_REMOTE_WRITE))) { | 284 | IB_ACCESS_REMOTE_WRITE))) { |
286 | acc_err: | 285 | acc_err: |
287 | wc->status = IB_WC_REM_ACCESS_ERR; | 286 | wc.status = IB_WC_REM_ACCESS_ERR; |
288 | err: | 287 | err: |
289 | wc->wr_id = wqe->wr.wr_id; | 288 | wc.wr_id = wqe->wr.wr_id; |
290 | wc->opcode = ib_ipath_wc_opcode[wqe->wr.opcode]; | 289 | wc.opcode = ib_ipath_wc_opcode[wqe->wr.opcode]; |
291 | wc->vendor_err = 0; | 290 | wc.vendor_err = 0; |
292 | wc->byte_len = 0; | 291 | wc.byte_len = 0; |
293 | wc->qp_num = sqp->ibqp.qp_num; | 292 | wc.qp_num = sqp->ibqp.qp_num; |
294 | wc->src_qp = sqp->remote_qpn; | 293 | wc.src_qp = sqp->remote_qpn; |
295 | wc->pkey_index = 0; | 294 | wc.pkey_index = 0; |
296 | wc->slid = sqp->remote_ah_attr.dlid; | 295 | wc.slid = sqp->remote_ah_attr.dlid; |
297 | wc->sl = sqp->remote_ah_attr.sl; | 296 | wc.sl = sqp->remote_ah_attr.sl; |
298 | wc->dlid_path_bits = 0; | 297 | wc.dlid_path_bits = 0; |
299 | wc->port_num = 0; | 298 | wc.port_num = 0; |
300 | ipath_sqerror_qp(sqp, wc); | 299 | ipath_sqerror_qp(sqp, &wc); |
301 | goto done; | 300 | goto done; |
302 | } | 301 | } |
303 | break; | 302 | break; |
@@ -373,22 +372,22 @@ again: | |||
373 | goto send_comp; | 372 | goto send_comp; |
374 | 373 | ||
375 | if (wqe->wr.opcode == IB_WR_RDMA_WRITE_WITH_IMM) | 374 | if (wqe->wr.opcode == IB_WR_RDMA_WRITE_WITH_IMM) |
376 | wc->opcode = IB_WC_RECV_RDMA_WITH_IMM; | 375 | wc.opcode = IB_WC_RECV_RDMA_WITH_IMM; |
377 | else | 376 | else |
378 | wc->opcode = IB_WC_RECV; | 377 | wc.opcode = IB_WC_RECV; |
379 | wc->wr_id = qp->r_wr_id; | 378 | wc.wr_id = qp->r_wr_id; |
380 | wc->status = IB_WC_SUCCESS; | 379 | wc.status = IB_WC_SUCCESS; |
381 | wc->vendor_err = 0; | 380 | wc.vendor_err = 0; |
382 | wc->byte_len = wqe->length; | 381 | wc.byte_len = wqe->length; |
383 | wc->qp_num = qp->ibqp.qp_num; | 382 | wc.qp_num = qp->ibqp.qp_num; |
384 | wc->src_qp = qp->remote_qpn; | 383 | wc.src_qp = qp->remote_qpn; |
385 | /* XXX do we know which pkey matched? Only needed for GSI. */ | 384 | /* XXX do we know which pkey matched? Only needed for GSI. */ |
386 | wc->pkey_index = 0; | 385 | wc.pkey_index = 0; |
387 | wc->slid = qp->remote_ah_attr.dlid; | 386 | wc.slid = qp->remote_ah_attr.dlid; |
388 | wc->sl = qp->remote_ah_attr.sl; | 387 | wc.sl = qp->remote_ah_attr.sl; |
389 | wc->dlid_path_bits = 0; | 388 | wc.dlid_path_bits = 0; |
390 | /* Signal completion event if the solicited bit is set. */ | 389 | /* Signal completion event if the solicited bit is set. */ |
391 | ipath_cq_enter(to_icq(qp->ibqp.recv_cq), wc, | 390 | ipath_cq_enter(to_icq(qp->ibqp.recv_cq), &wc, |
392 | wqe->wr.send_flags & IB_SEND_SOLICITED); | 391 | wqe->wr.send_flags & IB_SEND_SOLICITED); |
393 | 392 | ||
394 | send_comp: | 393 | send_comp: |
@@ -396,19 +395,19 @@ send_comp: | |||
396 | 395 | ||
397 | if (!test_bit(IPATH_S_SIGNAL_REQ_WR, &sqp->s_flags) || | 396 | if (!test_bit(IPATH_S_SIGNAL_REQ_WR, &sqp->s_flags) || |
398 | (wqe->wr.send_flags & IB_SEND_SIGNALED)) { | 397 | (wqe->wr.send_flags & IB_SEND_SIGNALED)) { |
399 | wc->wr_id = wqe->wr.wr_id; | 398 | wc.wr_id = wqe->wr.wr_id; |
400 | wc->status = IB_WC_SUCCESS; | 399 | wc.status = IB_WC_SUCCESS; |
401 | wc->opcode = ib_ipath_wc_opcode[wqe->wr.opcode]; | 400 | wc.opcode = ib_ipath_wc_opcode[wqe->wr.opcode]; |
402 | wc->vendor_err = 0; | 401 | wc.vendor_err = 0; |
403 | wc->byte_len = wqe->length; | 402 | wc.byte_len = wqe->length; |
404 | wc->qp_num = sqp->ibqp.qp_num; | 403 | wc.qp_num = sqp->ibqp.qp_num; |
405 | wc->src_qp = 0; | 404 | wc.src_qp = 0; |
406 | wc->pkey_index = 0; | 405 | wc.pkey_index = 0; |
407 | wc->slid = 0; | 406 | wc.slid = 0; |
408 | wc->sl = 0; | 407 | wc.sl = 0; |
409 | wc->dlid_path_bits = 0; | 408 | wc.dlid_path_bits = 0; |
410 | wc->port_num = 0; | 409 | wc.port_num = 0; |
411 | ipath_cq_enter(to_icq(sqp->ibqp.send_cq), wc, 0); | 410 | ipath_cq_enter(to_icq(sqp->ibqp.send_cq), &wc, 0); |
412 | } | 411 | } |
413 | 412 | ||
414 | /* Update s_last now that we are finished with the SWQE */ | 413 | /* Update s_last now that we are finished with the SWQE */ |
@@ -454,11 +453,11 @@ void ipath_no_bufs_available(struct ipath_qp *qp, struct ipath_ibdev *dev) | |||
454 | } | 453 | } |
455 | 454 | ||
456 | /** | 455 | /** |
457 | * ipath_post_rc_send - post RC and UC sends | 456 | * ipath_post_ruc_send - post RC and UC sends |
458 | * @qp: the QP to post on | 457 | * @qp: the QP to post on |
459 | * @wr: the work request to send | 458 | * @wr: the work request to send |
460 | */ | 459 | */ |
461 | int ipath_post_rc_send(struct ipath_qp *qp, struct ib_send_wr *wr) | 460 | int ipath_post_ruc_send(struct ipath_qp *qp, struct ib_send_wr *wr) |
462 | { | 461 | { |
463 | struct ipath_swqe *wqe; | 462 | struct ipath_swqe *wqe; |
464 | unsigned long flags; | 463 | unsigned long flags; |
@@ -533,13 +532,149 @@ int ipath_post_rc_send(struct ipath_qp *qp, struct ib_send_wr *wr) | |||
533 | qp->s_head = next; | 532 | qp->s_head = next; |
534 | spin_unlock_irqrestore(&qp->s_lock, flags); | 533 | spin_unlock_irqrestore(&qp->s_lock, flags); |
535 | 534 | ||
536 | if (qp->ibqp.qp_type == IB_QPT_UC) | 535 | ipath_do_ruc_send((unsigned long) qp); |
537 | ipath_do_uc_send((unsigned long) qp); | ||
538 | else | ||
539 | ipath_do_rc_send((unsigned long) qp); | ||
540 | 536 | ||
541 | ret = 0; | 537 | ret = 0; |
542 | 538 | ||
543 | bail: | 539 | bail: |
544 | return ret; | 540 | return ret; |
545 | } | 541 | } |
542 | |||
543 | /** | ||
544 | * ipath_make_grh - construct a GRH header | ||
545 | * @dev: a pointer to the ipath device | ||
546 | * @hdr: a pointer to the GRH header being constructed | ||
547 | * @grh: the global route address to send to | ||
548 | * @hwords: the number of 32 bit words of header being sent | ||
549 | * @nwords: the number of 32 bit words of data being sent | ||
550 | * | ||
551 | * Return the size of the header in 32 bit words. | ||
552 | */ | ||
553 | u32 ipath_make_grh(struct ipath_ibdev *dev, struct ib_grh *hdr, | ||
554 | struct ib_global_route *grh, u32 hwords, u32 nwords) | ||
555 | { | ||
556 | hdr->version_tclass_flow = | ||
557 | cpu_to_be32((6 << 28) | | ||
558 | (grh->traffic_class << 20) | | ||
559 | grh->flow_label); | ||
560 | hdr->paylen = cpu_to_be16((hwords - 2 + nwords + SIZE_OF_CRC) << 2); | ||
561 | /* next_hdr is defined by C8-7 in ch. 8.4.1 */ | ||
562 | hdr->next_hdr = 0x1B; | ||
563 | hdr->hop_limit = grh->hop_limit; | ||
564 | /* The SGID is 32-bit aligned. */ | ||
565 | hdr->sgid.global.subnet_prefix = dev->gid_prefix; | ||
566 | hdr->sgid.global.interface_id = ipath_layer_get_guid(dev->dd); | ||
567 | hdr->dgid = grh->dgid; | ||
568 | |||
569 | /* GRH header size in 32-bit words. */ | ||
570 | return sizeof(struct ib_grh) / sizeof(u32); | ||
571 | } | ||
572 | |||
573 | /** | ||
574 | * ipath_do_ruc_send - perform a send on an RC or UC QP | ||
575 | * @data: contains a pointer to the QP | ||
576 | * | ||
577 | * Process entries in the send work queue until credit or queue is | ||
578 | * exhausted. Only allow one CPU to send a packet per QP (tasklet). | ||
579 | * Otherwise, after we drop the QP s_lock, two threads could send | ||
580 | * packets out of order. | ||
581 | */ | ||
582 | void ipath_do_ruc_send(unsigned long data) | ||
583 | { | ||
584 | struct ipath_qp *qp = (struct ipath_qp *)data; | ||
585 | struct ipath_ibdev *dev = to_idev(qp->ibqp.device); | ||
586 | unsigned long flags; | ||
587 | u16 lrh0; | ||
588 | u32 nwords; | ||
589 | u32 extra_bytes; | ||
590 | u32 bth0; | ||
591 | u32 bth2; | ||
592 | u32 pmtu = ib_mtu_enum_to_int(qp->path_mtu); | ||
593 | struct ipath_other_headers *ohdr; | ||
594 | |||
595 | if (test_and_set_bit(IPATH_S_BUSY, &qp->s_flags)) | ||
596 | goto bail; | ||
597 | |||
598 | if (unlikely(qp->remote_ah_attr.dlid == | ||
599 | ipath_layer_get_lid(dev->dd))) { | ||
600 | ipath_ruc_loopback(qp); | ||
601 | goto clear; | ||
602 | } | ||
603 | |||
604 | ohdr = &qp->s_hdr.u.oth; | ||
605 | if (qp->remote_ah_attr.ah_flags & IB_AH_GRH) | ||
606 | ohdr = &qp->s_hdr.u.l.oth; | ||
607 | |||
608 | again: | ||
609 | /* Check for a constructed packet to be sent. */ | ||
610 | if (qp->s_hdrwords != 0) { | ||
611 | /* | ||
612 | * If no PIO bufs are available, return. An interrupt will | ||
613 | * call ipath_ib_piobufavail() when one is available. | ||
614 | */ | ||
615 | if (ipath_verbs_send(dev->dd, qp->s_hdrwords, | ||
616 | (u32 *) &qp->s_hdr, qp->s_cur_size, | ||
617 | qp->s_cur_sge)) { | ||
618 | ipath_no_bufs_available(qp, dev); | ||
619 | goto bail; | ||
620 | } | ||
621 | dev->n_unicast_xmit++; | ||
622 | /* Record that we sent the packet and s_hdr is empty. */ | ||
623 | qp->s_hdrwords = 0; | ||
624 | } | ||
625 | |||
626 | /* | ||
627 | * The lock is needed to synchronize between setting | ||
628 | * qp->s_ack_state, resend timer, and post_send(). | ||
629 | */ | ||
630 | spin_lock_irqsave(&qp->s_lock, flags); | ||
631 | |||
632 | /* Sending responses has higher priority over sending requests. */ | ||
633 | if (qp->s_ack_state != IB_OPCODE_RC_ACKNOWLEDGE && | ||
634 | (bth0 = ipath_make_rc_ack(qp, ohdr, pmtu)) != 0) | ||
635 | bth2 = qp->s_ack_psn++ & IPATH_PSN_MASK; | ||
636 | else if (!((qp->ibqp.qp_type == IB_QPT_RC) ? | ||
637 | ipath_make_rc_req(qp, ohdr, pmtu, &bth0, &bth2) : | ||
638 | ipath_make_uc_req(qp, ohdr, pmtu, &bth0, &bth2))) { | ||
639 | /* | ||
640 | * Clear the busy bit before unlocking to avoid races with | ||
641 | * adding new work queue items and then failing to process | ||
642 | * them. | ||
643 | */ | ||
644 | clear_bit(IPATH_S_BUSY, &qp->s_flags); | ||
645 | spin_unlock_irqrestore(&qp->s_lock, flags); | ||
646 | goto bail; | ||
647 | } | ||
648 | |||
649 | spin_unlock_irqrestore(&qp->s_lock, flags); | ||
650 | |||
651 | /* Construct the header. */ | ||
652 | extra_bytes = (4 - qp->s_cur_size) & 3; | ||
653 | nwords = (qp->s_cur_size + extra_bytes) >> 2; | ||
654 | lrh0 = IPATH_LRH_BTH; | ||
655 | if (unlikely(qp->remote_ah_attr.ah_flags & IB_AH_GRH)) { | ||
656 | qp->s_hdrwords += ipath_make_grh(dev, &qp->s_hdr.u.l.grh, | ||
657 | &qp->remote_ah_attr.grh, | ||
658 | qp->s_hdrwords, nwords); | ||
659 | lrh0 = IPATH_LRH_GRH; | ||
660 | } | ||
661 | lrh0 |= qp->remote_ah_attr.sl << 4; | ||
662 | qp->s_hdr.lrh[0] = cpu_to_be16(lrh0); | ||
663 | qp->s_hdr.lrh[1] = cpu_to_be16(qp->remote_ah_attr.dlid); | ||
664 | qp->s_hdr.lrh[2] = cpu_to_be16(qp->s_hdrwords + nwords + | ||
665 | SIZE_OF_CRC); | ||
666 | qp->s_hdr.lrh[3] = cpu_to_be16(ipath_layer_get_lid(dev->dd)); | ||
667 | bth0 |= ipath_layer_get_pkey(dev->dd, qp->s_pkey_index); | ||
668 | bth0 |= extra_bytes << 20; | ||
669 | ohdr->bth[0] = cpu_to_be32(bth0); | ||
670 | ohdr->bth[1] = cpu_to_be32(qp->remote_qpn); | ||
671 | ohdr->bth[2] = cpu_to_be32(bth2); | ||
672 | |||
673 | /* Check for more work to do. */ | ||
674 | goto again; | ||
675 | |||
676 | clear: | ||
677 | clear_bit(IPATH_S_BUSY, &qp->s_flags); | ||
678 | bail: | ||
679 | return; | ||
680 | } | ||
diff --git a/drivers/infiniband/hw/ipath/ipath_srq.c b/drivers/infiniband/hw/ipath/ipath_srq.c index 01c4c6c56118..f760434660bd 100644 --- a/drivers/infiniband/hw/ipath/ipath_srq.c +++ b/drivers/infiniband/hw/ipath/ipath_srq.c | |||
@@ -1,4 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2006 QLogic, Inc. All rights reserved. | ||
2 | * Copyright (c) 2005, 2006 PathScale, Inc. All rights reserved. | 3 | * Copyright (c) 2005, 2006 PathScale, Inc. All rights reserved. |
3 | * | 4 | * |
4 | * This software is available to you under a choice of one of two | 5 | * This software is available to you under a choice of one of two |
@@ -125,11 +126,23 @@ struct ib_srq *ipath_create_srq(struct ib_pd *ibpd, | |||
125 | struct ib_srq_init_attr *srq_init_attr, | 126 | struct ib_srq_init_attr *srq_init_attr, |
126 | struct ib_udata *udata) | 127 | struct ib_udata *udata) |
127 | { | 128 | { |
129 | struct ipath_ibdev *dev = to_idev(ibpd->device); | ||
128 | struct ipath_srq *srq; | 130 | struct ipath_srq *srq; |
129 | u32 sz; | 131 | u32 sz; |
130 | struct ib_srq *ret; | 132 | struct ib_srq *ret; |
131 | 133 | ||
132 | if (srq_init_attr->attr.max_sge < 1) { | 134 | if (dev->n_srqs_allocated == ib_ipath_max_srqs) { |
135 | ret = ERR_PTR(-ENOMEM); | ||
136 | goto bail; | ||
137 | } | ||
138 | |||
139 | if (srq_init_attr->attr.max_wr == 0) { | ||
140 | ret = ERR_PTR(-EINVAL); | ||
141 | goto bail; | ||
142 | } | ||
143 | |||
144 | if ((srq_init_attr->attr.max_sge > ib_ipath_max_srq_sges) || | ||
145 | (srq_init_attr->attr.max_wr > ib_ipath_max_srq_wrs)) { | ||
133 | ret = ERR_PTR(-EINVAL); | 146 | ret = ERR_PTR(-EINVAL); |
134 | goto bail; | 147 | goto bail; |
135 | } | 148 | } |
@@ -164,6 +177,8 @@ struct ib_srq *ipath_create_srq(struct ib_pd *ibpd, | |||
164 | 177 | ||
165 | ret = &srq->ibsrq; | 178 | ret = &srq->ibsrq; |
166 | 179 | ||
180 | dev->n_srqs_allocated++; | ||
181 | |||
167 | bail: | 182 | bail: |
168 | return ret; | 183 | return ret; |
169 | } | 184 | } |
@@ -181,24 +196,26 @@ int ipath_modify_srq(struct ib_srq *ibsrq, struct ib_srq_attr *attr, | |||
181 | unsigned long flags; | 196 | unsigned long flags; |
182 | int ret; | 197 | int ret; |
183 | 198 | ||
184 | if (attr_mask & IB_SRQ_LIMIT) { | 199 | if (attr_mask & IB_SRQ_MAX_WR) |
185 | spin_lock_irqsave(&srq->rq.lock, flags); | 200 | if ((attr->max_wr > ib_ipath_max_srq_wrs) || |
186 | srq->limit = attr->srq_limit; | 201 | (attr->max_sge > srq->rq.max_sge)) { |
187 | spin_unlock_irqrestore(&srq->rq.lock, flags); | 202 | ret = -EINVAL; |
188 | } | 203 | goto bail; |
189 | if (attr_mask & IB_SRQ_MAX_WR) { | 204 | } |
190 | u32 size = attr->max_wr + 1; | ||
191 | struct ipath_rwqe *wq, *p; | ||
192 | u32 n; | ||
193 | u32 sz; | ||
194 | 205 | ||
195 | if (attr->max_sge < srq->rq.max_sge) { | 206 | if (attr_mask & IB_SRQ_LIMIT) |
207 | if (attr->srq_limit >= srq->rq.size) { | ||
196 | ret = -EINVAL; | 208 | ret = -EINVAL; |
197 | goto bail; | 209 | goto bail; |
198 | } | 210 | } |
199 | 211 | ||
212 | if (attr_mask & IB_SRQ_MAX_WR) { | ||
213 | struct ipath_rwqe *wq, *p; | ||
214 | u32 sz, size, n; | ||
215 | |||
200 | sz = sizeof(struct ipath_rwqe) + | 216 | sz = sizeof(struct ipath_rwqe) + |
201 | attr->max_sge * sizeof(struct ipath_sge); | 217 | attr->max_sge * sizeof(struct ipath_sge); |
218 | size = attr->max_wr + 1; | ||
202 | wq = vmalloc(size * sz); | 219 | wq = vmalloc(size * sz); |
203 | if (!wq) { | 220 | if (!wq) { |
204 | ret = -ENOMEM; | 221 | ret = -ENOMEM; |
@@ -242,6 +259,11 @@ int ipath_modify_srq(struct ib_srq *ibsrq, struct ib_srq_attr *attr, | |||
242 | spin_unlock_irqrestore(&srq->rq.lock, flags); | 259 | spin_unlock_irqrestore(&srq->rq.lock, flags); |
243 | } | 260 | } |
244 | 261 | ||
262 | if (attr_mask & IB_SRQ_LIMIT) { | ||
263 | spin_lock_irqsave(&srq->rq.lock, flags); | ||
264 | srq->limit = attr->srq_limit; | ||
265 | spin_unlock_irqrestore(&srq->rq.lock, flags); | ||
266 | } | ||
245 | ret = 0; | 267 | ret = 0; |
246 | 268 | ||
247 | bail: | 269 | bail: |
@@ -265,7 +287,9 @@ int ipath_query_srq(struct ib_srq *ibsrq, struct ib_srq_attr *attr) | |||
265 | int ipath_destroy_srq(struct ib_srq *ibsrq) | 287 | int ipath_destroy_srq(struct ib_srq *ibsrq) |
266 | { | 288 | { |
267 | struct ipath_srq *srq = to_isrq(ibsrq); | 289 | struct ipath_srq *srq = to_isrq(ibsrq); |
290 | struct ipath_ibdev *dev = to_idev(ibsrq->device); | ||
268 | 291 | ||
292 | dev->n_srqs_allocated--; | ||
269 | vfree(srq->rq.wq); | 293 | vfree(srq->rq.wq); |
270 | kfree(srq); | 294 | kfree(srq); |
271 | 295 | ||
diff --git a/drivers/infiniband/hw/ipath/ipath_stats.c b/drivers/infiniband/hw/ipath/ipath_stats.c index fe209137ee74..70351b7e35c0 100644 --- a/drivers/infiniband/hw/ipath/ipath_stats.c +++ b/drivers/infiniband/hw/ipath/ipath_stats.c | |||
@@ -1,4 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2006 QLogic, Inc. All rights reserved. | ||
2 | * Copyright (c) 2003, 2004, 2005, 2006 PathScale, Inc. All rights reserved. | 3 | * Copyright (c) 2003, 2004, 2005, 2006 PathScale, Inc. All rights reserved. |
3 | * | 4 | * |
4 | * This software is available to you under a choice of one of two | 5 | * This software is available to you under a choice of one of two |
@@ -185,7 +186,6 @@ static void ipath_qcheck(struct ipath_devdata *dd) | |||
185 | dd->ipath_port0head, | 186 | dd->ipath_port0head, |
186 | (unsigned long long) | 187 | (unsigned long long) |
187 | ipath_stats.sps_port0pkts); | 188 | ipath_stats.sps_port0pkts); |
188 | ipath_kreceive(dd); | ||
189 | } | 189 | } |
190 | dd->ipath_lastport0rcv_cnt = ipath_stats.sps_port0pkts; | 190 | dd->ipath_lastport0rcv_cnt = ipath_stats.sps_port0pkts; |
191 | } | 191 | } |
diff --git a/drivers/infiniband/hw/ipath/ipath_sysfs.c b/drivers/infiniband/hw/ipath/ipath_sysfs.c index f323791cc495..b98821d7801d 100644 --- a/drivers/infiniband/hw/ipath/ipath_sysfs.c +++ b/drivers/infiniband/hw/ipath/ipath_sysfs.c | |||
@@ -1,4 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2006 QLogic, Inc. All rights reserved. | ||
2 | * Copyright (c) 2006 PathScale, Inc. All rights reserved. | 3 | * Copyright (c) 2006 PathScale, Inc. All rights reserved. |
3 | * | 4 | * |
4 | * This software is available to you under a choice of one of two | 5 | * This software is available to you under a choice of one of two |
@@ -34,8 +35,8 @@ | |||
34 | #include <linux/pci.h> | 35 | #include <linux/pci.h> |
35 | 36 | ||
36 | #include "ipath_kernel.h" | 37 | #include "ipath_kernel.h" |
37 | #include "ips_common.h" | ||
38 | #include "ipath_layer.h" | 38 | #include "ipath_layer.h" |
39 | #include "ipath_common.h" | ||
39 | 40 | ||
40 | /** | 41 | /** |
41 | * ipath_parse_ushort - parse an unsigned short value in an arbitrary base | 42 | * ipath_parse_ushort - parse an unsigned short value in an arbitrary base |
@@ -84,99 +85,6 @@ static ssize_t show_num_units(struct device_driver *dev, char *buf) | |||
84 | ipath_count_units(NULL, NULL, NULL)); | 85 | ipath_count_units(NULL, NULL, NULL)); |
85 | } | 86 | } |
86 | 87 | ||
87 | #define DRIVER_STAT(name, attr) \ | ||
88 | static ssize_t show_stat_##name(struct device_driver *dev, \ | ||
89 | char *buf) \ | ||
90 | { \ | ||
91 | return scnprintf( \ | ||
92 | buf, PAGE_SIZE, "%llu\n", \ | ||
93 | (unsigned long long) ipath_stats.sps_ ##attr); \ | ||
94 | } \ | ||
95 | static DRIVER_ATTR(name, S_IRUGO, show_stat_##name, NULL) | ||
96 | |||
97 | DRIVER_STAT(intrs, ints); | ||
98 | DRIVER_STAT(err_intrs, errints); | ||
99 | DRIVER_STAT(errs, errs); | ||
100 | DRIVER_STAT(pkt_errs, pkterrs); | ||
101 | DRIVER_STAT(crc_errs, crcerrs); | ||
102 | DRIVER_STAT(hw_errs, hwerrs); | ||
103 | DRIVER_STAT(ib_link, iblink); | ||
104 | DRIVER_STAT(port0_pkts, port0pkts); | ||
105 | DRIVER_STAT(ether_spkts, ether_spkts); | ||
106 | DRIVER_STAT(ether_rpkts, ether_rpkts); | ||
107 | DRIVER_STAT(sma_spkts, sma_spkts); | ||
108 | DRIVER_STAT(sma_rpkts, sma_rpkts); | ||
109 | DRIVER_STAT(hdrq_full, hdrqfull); | ||
110 | DRIVER_STAT(etid_full, etidfull); | ||
111 | DRIVER_STAT(no_piobufs, nopiobufs); | ||
112 | DRIVER_STAT(ports, ports); | ||
113 | DRIVER_STAT(pkey0, pkeys[0]); | ||
114 | DRIVER_STAT(pkey1, pkeys[1]); | ||
115 | DRIVER_STAT(pkey2, pkeys[2]); | ||
116 | DRIVER_STAT(pkey3, pkeys[3]); | ||
117 | /* XXX fix the following when dynamic table of devices used */ | ||
118 | DRIVER_STAT(lid0, lid[0]); | ||
119 | DRIVER_STAT(lid1, lid[1]); | ||
120 | DRIVER_STAT(lid2, lid[2]); | ||
121 | DRIVER_STAT(lid3, lid[3]); | ||
122 | |||
123 | DRIVER_STAT(nports, nports); | ||
124 | DRIVER_STAT(null_intr, nullintr); | ||
125 | DRIVER_STAT(max_pkts_call, maxpkts_call); | ||
126 | DRIVER_STAT(avg_pkts_call, avgpkts_call); | ||
127 | DRIVER_STAT(page_locks, pagelocks); | ||
128 | DRIVER_STAT(page_unlocks, pageunlocks); | ||
129 | DRIVER_STAT(krdrops, krdrops); | ||
130 | /* XXX fix the following when dynamic table of devices used */ | ||
131 | DRIVER_STAT(mlid0, mlid[0]); | ||
132 | DRIVER_STAT(mlid1, mlid[1]); | ||
133 | DRIVER_STAT(mlid2, mlid[2]); | ||
134 | DRIVER_STAT(mlid3, mlid[3]); | ||
135 | |||
136 | static struct attribute *driver_stat_attributes[] = { | ||
137 | &driver_attr_intrs.attr, | ||
138 | &driver_attr_err_intrs.attr, | ||
139 | &driver_attr_errs.attr, | ||
140 | &driver_attr_pkt_errs.attr, | ||
141 | &driver_attr_crc_errs.attr, | ||
142 | &driver_attr_hw_errs.attr, | ||
143 | &driver_attr_ib_link.attr, | ||
144 | &driver_attr_port0_pkts.attr, | ||
145 | &driver_attr_ether_spkts.attr, | ||
146 | &driver_attr_ether_rpkts.attr, | ||
147 | &driver_attr_sma_spkts.attr, | ||
148 | &driver_attr_sma_rpkts.attr, | ||
149 | &driver_attr_hdrq_full.attr, | ||
150 | &driver_attr_etid_full.attr, | ||
151 | &driver_attr_no_piobufs.attr, | ||
152 | &driver_attr_ports.attr, | ||
153 | &driver_attr_pkey0.attr, | ||
154 | &driver_attr_pkey1.attr, | ||
155 | &driver_attr_pkey2.attr, | ||
156 | &driver_attr_pkey3.attr, | ||
157 | &driver_attr_lid0.attr, | ||
158 | &driver_attr_lid1.attr, | ||
159 | &driver_attr_lid2.attr, | ||
160 | &driver_attr_lid3.attr, | ||
161 | &driver_attr_nports.attr, | ||
162 | &driver_attr_null_intr.attr, | ||
163 | &driver_attr_max_pkts_call.attr, | ||
164 | &driver_attr_avg_pkts_call.attr, | ||
165 | &driver_attr_page_locks.attr, | ||
166 | &driver_attr_page_unlocks.attr, | ||
167 | &driver_attr_krdrops.attr, | ||
168 | &driver_attr_mlid0.attr, | ||
169 | &driver_attr_mlid1.attr, | ||
170 | &driver_attr_mlid2.attr, | ||
171 | &driver_attr_mlid3.attr, | ||
172 | NULL | ||
173 | }; | ||
174 | |||
175 | static struct attribute_group driver_stat_attr_group = { | ||
176 | .name = "stats", | ||
177 | .attrs = driver_stat_attributes | ||
178 | }; | ||
179 | |||
180 | static ssize_t show_status(struct device *dev, | 88 | static ssize_t show_status(struct device *dev, |
181 | struct device_attribute *attr, | 89 | struct device_attribute *attr, |
182 | char *buf) | 90 | char *buf) |
@@ -272,23 +180,23 @@ static ssize_t store_lid(struct device *dev, | |||
272 | size_t count) | 180 | size_t count) |
273 | { | 181 | { |
274 | struct ipath_devdata *dd = dev_get_drvdata(dev); | 182 | struct ipath_devdata *dd = dev_get_drvdata(dev); |
275 | u16 lid; | 183 | u16 lid = 0; |
276 | int ret; | 184 | int ret; |
277 | 185 | ||
278 | ret = ipath_parse_ushort(buf, &lid); | 186 | ret = ipath_parse_ushort(buf, &lid); |
279 | if (ret < 0) | 187 | if (ret < 0) |
280 | goto invalid; | 188 | goto invalid; |
281 | 189 | ||
282 | if (lid == 0 || lid >= 0xc000) { | 190 | if (lid == 0 || lid >= IPATH_MULTICAST_LID_BASE) { |
283 | ret = -EINVAL; | 191 | ret = -EINVAL; |
284 | goto invalid; | 192 | goto invalid; |
285 | } | 193 | } |
286 | 194 | ||
287 | ipath_set_sps_lid(dd, lid, 0); | 195 | ipath_set_lid(dd, lid, 0); |
288 | 196 | ||
289 | goto bail; | 197 | goto bail; |
290 | invalid: | 198 | invalid: |
291 | ipath_dev_err(dd, "attempt to set invalid LID\n"); | 199 | ipath_dev_err(dd, "attempt to set invalid LID 0x%x\n", lid); |
292 | bail: | 200 | bail: |
293 | return ret; | 201 | return ret; |
294 | } | 202 | } |
@@ -313,13 +221,12 @@ static ssize_t store_mlid(struct device *dev, | |||
313 | int ret; | 221 | int ret; |
314 | 222 | ||
315 | ret = ipath_parse_ushort(buf, &mlid); | 223 | ret = ipath_parse_ushort(buf, &mlid); |
316 | if (ret < 0) | 224 | if (ret < 0 || mlid < IPATH_MULTICAST_LID_BASE) |
317 | goto invalid; | 225 | goto invalid; |
318 | 226 | ||
319 | unit = dd->ipath_unit; | 227 | unit = dd->ipath_unit; |
320 | 228 | ||
321 | dd->ipath_mlid = mlid; | 229 | dd->ipath_mlid = mlid; |
322 | ipath_stats.sps_mlid[unit] = mlid; | ||
323 | ipath_layer_intr(dd, IPATH_LAYER_INT_BCAST); | 230 | ipath_layer_intr(dd, IPATH_LAYER_INT_BCAST); |
324 | 231 | ||
325 | goto bail; | 232 | goto bail; |
@@ -734,20 +641,12 @@ int ipath_driver_create_group(struct device_driver *drv) | |||
734 | int ret; | 641 | int ret; |
735 | 642 | ||
736 | ret = sysfs_create_group(&drv->kobj, &driver_attr_group); | 643 | ret = sysfs_create_group(&drv->kobj, &driver_attr_group); |
737 | if (ret) | ||
738 | goto bail; | ||
739 | 644 | ||
740 | ret = sysfs_create_group(&drv->kobj, &driver_stat_attr_group); | ||
741 | if (ret) | ||
742 | sysfs_remove_group(&drv->kobj, &driver_attr_group); | ||
743 | |||
744 | bail: | ||
745 | return ret; | 645 | return ret; |
746 | } | 646 | } |
747 | 647 | ||
748 | void ipath_driver_remove_group(struct device_driver *drv) | 648 | void ipath_driver_remove_group(struct device_driver *drv) |
749 | { | 649 | { |
750 | sysfs_remove_group(&drv->kobj, &driver_stat_attr_group); | ||
751 | sysfs_remove_group(&drv->kobj, &driver_attr_group); | 650 | sysfs_remove_group(&drv->kobj, &driver_attr_group); |
752 | } | 651 | } |
753 | 652 | ||
diff --git a/drivers/infiniband/hw/ipath/ipath_uc.c b/drivers/infiniband/hw/ipath/ipath_uc.c index 0d6dbc0a541e..c33abea2d5a7 100644 --- a/drivers/infiniband/hw/ipath/ipath_uc.c +++ b/drivers/infiniband/hw/ipath/ipath_uc.c | |||
@@ -1,4 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2006 QLogic, Inc. All rights reserved. | ||
2 | * Copyright (c) 2005, 2006 PathScale, Inc. All rights reserved. | 3 | * Copyright (c) 2005, 2006 PathScale, Inc. All rights reserved. |
3 | * | 4 | * |
4 | * This software is available to you under a choice of one of two | 5 | * This software is available to you under a choice of one of two |
@@ -31,7 +32,7 @@ | |||
31 | */ | 32 | */ |
32 | 33 | ||
33 | #include "ipath_verbs.h" | 34 | #include "ipath_verbs.h" |
34 | #include "ips_common.h" | 35 | #include "ipath_common.h" |
35 | 36 | ||
36 | /* cut down ridiculously long IB macro names */ | 37 | /* cut down ridiculously long IB macro names */ |
37 | #define OP(x) IB_OPCODE_UC_##x | 38 | #define OP(x) IB_OPCODE_UC_##x |
@@ -61,90 +62,40 @@ static void complete_last_send(struct ipath_qp *qp, struct ipath_swqe *wqe, | |||
61 | } | 62 | } |
62 | 63 | ||
63 | /** | 64 | /** |
64 | * ipath_do_uc_send - do a send on a UC queue | 65 | * ipath_make_uc_req - construct a request packet (SEND, RDMA write) |
65 | * @data: contains a pointer to the QP to send on | 66 | * @qp: a pointer to the QP |
67 | * @ohdr: a pointer to the IB header being constructed | ||
68 | * @pmtu: the path MTU | ||
69 | * @bth0p: pointer to the BTH opcode word | ||
70 | * @bth2p: pointer to the BTH PSN word | ||
66 | * | 71 | * |
67 | * Process entries in the send work queue until the queue is exhausted. | 72 | * Return 1 if constructed; otherwise, return 0. |
68 | * Only allow one CPU to send a packet per QP (tasklet). | 73 | * Note the QP s_lock must be held and interrupts disabled. |
69 | * Otherwise, after we drop the QP lock, two threads could send | ||
70 | * packets out of order. | ||
71 | * This is similar to ipath_do_rc_send() below except we don't have | ||
72 | * timeouts or resends. | ||
73 | */ | 74 | */ |
74 | void ipath_do_uc_send(unsigned long data) | 75 | int ipath_make_uc_req(struct ipath_qp *qp, |
76 | struct ipath_other_headers *ohdr, | ||
77 | u32 pmtu, u32 *bth0p, u32 *bth2p) | ||
75 | { | 78 | { |
76 | struct ipath_qp *qp = (struct ipath_qp *)data; | ||
77 | struct ipath_ibdev *dev = to_idev(qp->ibqp.device); | ||
78 | struct ipath_swqe *wqe; | 79 | struct ipath_swqe *wqe; |
79 | unsigned long flags; | ||
80 | u16 lrh0; | ||
81 | u32 hwords; | 80 | u32 hwords; |
82 | u32 nwords; | ||
83 | u32 extra_bytes; | ||
84 | u32 bth0; | 81 | u32 bth0; |
85 | u32 bth2; | ||
86 | u32 pmtu = ib_mtu_enum_to_int(qp->path_mtu); | ||
87 | u32 len; | 82 | u32 len; |
88 | struct ipath_other_headers *ohdr; | ||
89 | struct ib_wc wc; | 83 | struct ib_wc wc; |
90 | 84 | ||
91 | if (test_and_set_bit(IPATH_S_BUSY, &qp->s_flags)) | ||
92 | goto bail; | ||
93 | |||
94 | if (unlikely(qp->remote_ah_attr.dlid == | ||
95 | ipath_layer_get_lid(dev->dd))) { | ||
96 | /* Pass in an uninitialized ib_wc to save stack space. */ | ||
97 | ipath_ruc_loopback(qp, &wc); | ||
98 | clear_bit(IPATH_S_BUSY, &qp->s_flags); | ||
99 | goto bail; | ||
100 | } | ||
101 | |||
102 | ohdr = &qp->s_hdr.u.oth; | ||
103 | if (qp->remote_ah_attr.ah_flags & IB_AH_GRH) | ||
104 | ohdr = &qp->s_hdr.u.l.oth; | ||
105 | |||
106 | again: | ||
107 | /* Check for a constructed packet to be sent. */ | ||
108 | if (qp->s_hdrwords != 0) { | ||
109 | /* | ||
110 | * If no PIO bufs are available, return. | ||
111 | * An interrupt will call ipath_ib_piobufavail() | ||
112 | * when one is available. | ||
113 | */ | ||
114 | if (ipath_verbs_send(dev->dd, qp->s_hdrwords, | ||
115 | (u32 *) &qp->s_hdr, | ||
116 | qp->s_cur_size, | ||
117 | qp->s_cur_sge)) { | ||
118 | ipath_no_bufs_available(qp, dev); | ||
119 | goto bail; | ||
120 | } | ||
121 | dev->n_unicast_xmit++; | ||
122 | /* Record that we sent the packet and s_hdr is empty. */ | ||
123 | qp->s_hdrwords = 0; | ||
124 | } | ||
125 | |||
126 | lrh0 = IPS_LRH_BTH; | ||
127 | /* header size in 32-bit words LRH+BTH = (8+12)/4. */ | ||
128 | hwords = 5; | ||
129 | |||
130 | /* | ||
131 | * The lock is needed to synchronize between | ||
132 | * setting qp->s_ack_state and post_send(). | ||
133 | */ | ||
134 | spin_lock_irqsave(&qp->s_lock, flags); | ||
135 | |||
136 | if (!(ib_ipath_state_ops[qp->state] & IPATH_PROCESS_SEND_OK)) | 85 | if (!(ib_ipath_state_ops[qp->state] & IPATH_PROCESS_SEND_OK)) |
137 | goto done; | 86 | goto done; |
138 | 87 | ||
139 | bth0 = ipath_layer_get_pkey(dev->dd, qp->s_pkey_index); | 88 | /* header size in 32-bit words LRH+BTH = (8+12)/4. */ |
89 | hwords = 5; | ||
90 | bth0 = 0; | ||
140 | 91 | ||
141 | /* Send a request. */ | 92 | /* Get the next send request. */ |
142 | wqe = get_swqe_ptr(qp, qp->s_last); | 93 | wqe = get_swqe_ptr(qp, qp->s_last); |
143 | switch (qp->s_state) { | 94 | switch (qp->s_state) { |
144 | default: | 95 | default: |
145 | /* | 96 | /* |
146 | * Signal the completion of the last send (if there is | 97 | * Signal the completion of the last send |
147 | * one). | 98 | * (if there is one). |
148 | */ | 99 | */ |
149 | if (qp->s_last != qp->s_tail) | 100 | if (qp->s_last != qp->s_tail) |
150 | complete_last_send(qp, wqe, &wc); | 101 | complete_last_send(qp, wqe, &wc); |
@@ -257,61 +208,16 @@ again: | |||
257 | } | 208 | } |
258 | break; | 209 | break; |
259 | } | 210 | } |
260 | bth2 = qp->s_next_psn++ & IPS_PSN_MASK; | ||
261 | qp->s_len -= len; | 211 | qp->s_len -= len; |
262 | bth0 |= qp->s_state << 24; | ||
263 | |||
264 | spin_unlock_irqrestore(&qp->s_lock, flags); | ||
265 | |||
266 | /* Construct the header. */ | ||
267 | extra_bytes = (4 - len) & 3; | ||
268 | nwords = (len + extra_bytes) >> 2; | ||
269 | if (unlikely(qp->remote_ah_attr.ah_flags & IB_AH_GRH)) { | ||
270 | /* Header size in 32-bit words. */ | ||
271 | hwords += 10; | ||
272 | lrh0 = IPS_LRH_GRH; | ||
273 | qp->s_hdr.u.l.grh.version_tclass_flow = | ||
274 | cpu_to_be32((6 << 28) | | ||
275 | (qp->remote_ah_attr.grh.traffic_class | ||
276 | << 20) | | ||
277 | qp->remote_ah_attr.grh.flow_label); | ||
278 | qp->s_hdr.u.l.grh.paylen = | ||
279 | cpu_to_be16(((hwords - 12) + nwords + | ||
280 | SIZE_OF_CRC) << 2); | ||
281 | /* next_hdr is defined by C8-7 in ch. 8.4.1 */ | ||
282 | qp->s_hdr.u.l.grh.next_hdr = 0x1B; | ||
283 | qp->s_hdr.u.l.grh.hop_limit = | ||
284 | qp->remote_ah_attr.grh.hop_limit; | ||
285 | /* The SGID is 32-bit aligned. */ | ||
286 | qp->s_hdr.u.l.grh.sgid.global.subnet_prefix = | ||
287 | dev->gid_prefix; | ||
288 | qp->s_hdr.u.l.grh.sgid.global.interface_id = | ||
289 | ipath_layer_get_guid(dev->dd); | ||
290 | qp->s_hdr.u.l.grh.dgid = qp->remote_ah_attr.grh.dgid; | ||
291 | } | ||
292 | qp->s_hdrwords = hwords; | 212 | qp->s_hdrwords = hwords; |
293 | qp->s_cur_sge = &qp->s_sge; | 213 | qp->s_cur_sge = &qp->s_sge; |
294 | qp->s_cur_size = len; | 214 | qp->s_cur_size = len; |
295 | lrh0 |= qp->remote_ah_attr.sl << 4; | 215 | *bth0p = bth0 | (qp->s_state << 24); |
296 | qp->s_hdr.lrh[0] = cpu_to_be16(lrh0); | 216 | *bth2p = qp->s_next_psn++ & IPATH_PSN_MASK; |
297 | /* DEST LID */ | 217 | return 1; |
298 | qp->s_hdr.lrh[1] = cpu_to_be16(qp->remote_ah_attr.dlid); | ||
299 | qp->s_hdr.lrh[2] = cpu_to_be16(hwords + nwords + SIZE_OF_CRC); | ||
300 | qp->s_hdr.lrh[3] = cpu_to_be16(ipath_layer_get_lid(dev->dd)); | ||
301 | bth0 |= extra_bytes << 20; | ||
302 | ohdr->bth[0] = cpu_to_be32(bth0); | ||
303 | ohdr->bth[1] = cpu_to_be32(qp->remote_qpn); | ||
304 | ohdr->bth[2] = cpu_to_be32(bth2); | ||
305 | |||
306 | /* Check for more work to do. */ | ||
307 | goto again; | ||
308 | 218 | ||
309 | done: | 219 | done: |
310 | spin_unlock_irqrestore(&qp->s_lock, flags); | 220 | return 0; |
311 | clear_bit(IPATH_S_BUSY, &qp->s_flags); | ||
312 | |||
313 | bail: | ||
314 | return; | ||
315 | } | 221 | } |
316 | 222 | ||
317 | /** | 223 | /** |
@@ -335,7 +241,6 @@ void ipath_uc_rcv(struct ipath_ibdev *dev, struct ipath_ib_header *hdr, | |||
335 | u32 hdrsize; | 241 | u32 hdrsize; |
336 | u32 psn; | 242 | u32 psn; |
337 | u32 pad; | 243 | u32 pad; |
338 | unsigned long flags; | ||
339 | struct ib_wc wc; | 244 | struct ib_wc wc; |
340 | u32 pmtu = ib_mtu_enum_to_int(qp->path_mtu); | 245 | u32 pmtu = ib_mtu_enum_to_int(qp->path_mtu); |
341 | struct ib_reth *reth; | 246 | struct ib_reth *reth; |
@@ -373,8 +278,6 @@ void ipath_uc_rcv(struct ipath_ibdev *dev, struct ipath_ib_header *hdr, | |||
373 | wc.imm_data = 0; | 278 | wc.imm_data = 0; |
374 | wc.wc_flags = 0; | 279 | wc.wc_flags = 0; |
375 | 280 | ||
376 | spin_lock_irqsave(&qp->r_rq.lock, flags); | ||
377 | |||
378 | /* Compare the PSN verses the expected PSN. */ | 281 | /* Compare the PSN verses the expected PSN. */ |
379 | if (unlikely(ipath_cmp24(psn, qp->r_psn) != 0)) { | 282 | if (unlikely(ipath_cmp24(psn, qp->r_psn) != 0)) { |
380 | /* | 283 | /* |
@@ -535,12 +438,13 @@ void ipath_uc_rcv(struct ipath_ibdev *dev, struct ipath_ib_header *hdr, | |||
535 | if (qp->r_len != 0) { | 438 | if (qp->r_len != 0) { |
536 | u32 rkey = be32_to_cpu(reth->rkey); | 439 | u32 rkey = be32_to_cpu(reth->rkey); |
537 | u64 vaddr = be64_to_cpu(reth->vaddr); | 440 | u64 vaddr = be64_to_cpu(reth->vaddr); |
441 | int ok; | ||
538 | 442 | ||
539 | /* Check rkey */ | 443 | /* Check rkey */ |
540 | if (unlikely(!ipath_rkey_ok( | 444 | ok = ipath_rkey_ok(dev, &qp->r_sge, qp->r_len, |
541 | dev, &qp->r_sge, qp->r_len, | 445 | vaddr, rkey, |
542 | vaddr, rkey, | 446 | IB_ACCESS_REMOTE_WRITE); |
543 | IB_ACCESS_REMOTE_WRITE))) { | 447 | if (unlikely(!ok)) { |
544 | dev->n_pkt_drops++; | 448 | dev->n_pkt_drops++; |
545 | goto done; | 449 | goto done; |
546 | } | 450 | } |
@@ -558,8 +462,7 @@ void ipath_uc_rcv(struct ipath_ibdev *dev, struct ipath_ib_header *hdr, | |||
558 | } | 462 | } |
559 | if (opcode == OP(RDMA_WRITE_ONLY)) | 463 | if (opcode == OP(RDMA_WRITE_ONLY)) |
560 | goto rdma_last; | 464 | goto rdma_last; |
561 | else if (opcode == | 465 | else if (opcode == OP(RDMA_WRITE_ONLY_WITH_IMMEDIATE)) |
562 | OP(RDMA_WRITE_ONLY_WITH_IMMEDIATE)) | ||
563 | goto rdma_last_imm; | 466 | goto rdma_last_imm; |
564 | /* FALLTHROUGH */ | 467 | /* FALLTHROUGH */ |
565 | case OP(RDMA_WRITE_MIDDLE): | 468 | case OP(RDMA_WRITE_MIDDLE): |
@@ -592,9 +495,9 @@ void ipath_uc_rcv(struct ipath_ibdev *dev, struct ipath_ib_header *hdr, | |||
592 | dev->n_pkt_drops++; | 495 | dev->n_pkt_drops++; |
593 | goto done; | 496 | goto done; |
594 | } | 497 | } |
595 | if (qp->r_reuse_sge) { | 498 | if (qp->r_reuse_sge) |
596 | qp->r_reuse_sge = 0; | 499 | qp->r_reuse_sge = 0; |
597 | } else if (!ipath_get_rwqe(qp, 1)) { | 500 | else if (!ipath_get_rwqe(qp, 1)) { |
598 | dev->n_pkt_drops++; | 501 | dev->n_pkt_drops++; |
599 | goto done; | 502 | goto done; |
600 | } | 503 | } |
@@ -631,15 +534,11 @@ void ipath_uc_rcv(struct ipath_ibdev *dev, struct ipath_ib_header *hdr, | |||
631 | 534 | ||
632 | default: | 535 | default: |
633 | /* Drop packet for unknown opcodes. */ | 536 | /* Drop packet for unknown opcodes. */ |
634 | spin_unlock_irqrestore(&qp->r_rq.lock, flags); | ||
635 | dev->n_pkt_drops++; | 537 | dev->n_pkt_drops++; |
636 | goto bail; | 538 | goto done; |
637 | } | 539 | } |
638 | qp->r_psn++; | 540 | qp->r_psn++; |
639 | qp->r_state = opcode; | 541 | qp->r_state = opcode; |
640 | done: | 542 | done: |
641 | spin_unlock_irqrestore(&qp->r_rq.lock, flags); | ||
642 | |||
643 | bail: | ||
644 | return; | 543 | return; |
645 | } | 544 | } |
diff --git a/drivers/infiniband/hw/ipath/ipath_ud.c b/drivers/infiniband/hw/ipath/ipath_ud.c index e606daf83210..3466129af804 100644 --- a/drivers/infiniband/hw/ipath/ipath_ud.c +++ b/drivers/infiniband/hw/ipath/ipath_ud.c | |||
@@ -1,4 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2006 QLogic, Inc. All rights reserved. | ||
2 | * Copyright (c) 2005, 2006 PathScale, Inc. All rights reserved. | 3 | * Copyright (c) 2005, 2006 PathScale, Inc. All rights reserved. |
3 | * | 4 | * |
4 | * This software is available to you under a choice of one of two | 5 | * This software is available to you under a choice of one of two |
@@ -33,7 +34,7 @@ | |||
33 | #include <rdma/ib_smi.h> | 34 | #include <rdma/ib_smi.h> |
34 | 35 | ||
35 | #include "ipath_verbs.h" | 36 | #include "ipath_verbs.h" |
36 | #include "ips_common.h" | 37 | #include "ipath_common.h" |
37 | 38 | ||
38 | /** | 39 | /** |
39 | * ipath_ud_loopback - handle send on loopback QPs | 40 | * ipath_ud_loopback - handle send on loopback QPs |
@@ -274,6 +275,11 @@ int ipath_post_ud_send(struct ipath_qp *qp, struct ib_send_wr *wr) | |||
274 | len += wr->sg_list[i].length; | 275 | len += wr->sg_list[i].length; |
275 | ss.num_sge++; | 276 | ss.num_sge++; |
276 | } | 277 | } |
278 | /* Check for invalid packet size. */ | ||
279 | if (len > ipath_layer_get_ibmtu(dev->dd)) { | ||
280 | ret = -EINVAL; | ||
281 | goto bail; | ||
282 | } | ||
277 | extra_bytes = (4 - len) & 3; | 283 | extra_bytes = (4 - len) & 3; |
278 | nwords = (len + extra_bytes) >> 2; | 284 | nwords = (len + extra_bytes) >> 2; |
279 | 285 | ||
@@ -283,8 +289,8 @@ int ipath_post_ud_send(struct ipath_qp *qp, struct ib_send_wr *wr) | |||
283 | ret = -EINVAL; | 289 | ret = -EINVAL; |
284 | goto bail; | 290 | goto bail; |
285 | } | 291 | } |
286 | if (ah_attr->dlid >= IPS_MULTICAST_LID_BASE) { | 292 | if (ah_attr->dlid >= IPATH_MULTICAST_LID_BASE) { |
287 | if (ah_attr->dlid != IPS_PERMISSIVE_LID) | 293 | if (ah_attr->dlid != IPATH_PERMISSIVE_LID) |
288 | dev->n_multicast_xmit++; | 294 | dev->n_multicast_xmit++; |
289 | else | 295 | else |
290 | dev->n_unicast_xmit++; | 296 | dev->n_unicast_xmit++; |
@@ -304,7 +310,7 @@ int ipath_post_ud_send(struct ipath_qp *qp, struct ib_send_wr *wr) | |||
304 | if (ah_attr->ah_flags & IB_AH_GRH) { | 310 | if (ah_attr->ah_flags & IB_AH_GRH) { |
305 | /* Header size in 32-bit words. */ | 311 | /* Header size in 32-bit words. */ |
306 | hwords = 17; | 312 | hwords = 17; |
307 | lrh0 = IPS_LRH_GRH; | 313 | lrh0 = IPATH_LRH_GRH; |
308 | ohdr = &qp->s_hdr.u.l.oth; | 314 | ohdr = &qp->s_hdr.u.l.oth; |
309 | qp->s_hdr.u.l.grh.version_tclass_flow = | 315 | qp->s_hdr.u.l.grh.version_tclass_flow = |
310 | cpu_to_be32((6 << 28) | | 316 | cpu_to_be32((6 << 28) | |
@@ -330,7 +336,7 @@ int ipath_post_ud_send(struct ipath_qp *qp, struct ib_send_wr *wr) | |||
330 | } else { | 336 | } else { |
331 | /* Header size in 32-bit words. */ | 337 | /* Header size in 32-bit words. */ |
332 | hwords = 7; | 338 | hwords = 7; |
333 | lrh0 = IPS_LRH_BTH; | 339 | lrh0 = IPATH_LRH_BTH; |
334 | ohdr = &qp->s_hdr.u.oth; | 340 | ohdr = &qp->s_hdr.u.oth; |
335 | } | 341 | } |
336 | if (wr->opcode == IB_WR_SEND_WITH_IMM) { | 342 | if (wr->opcode == IB_WR_SEND_WITH_IMM) { |
@@ -361,18 +367,18 @@ int ipath_post_ud_send(struct ipath_qp *qp, struct ib_send_wr *wr) | |||
361 | if (wr->send_flags & IB_SEND_SOLICITED) | 367 | if (wr->send_flags & IB_SEND_SOLICITED) |
362 | bth0 |= 1 << 23; | 368 | bth0 |= 1 << 23; |
363 | bth0 |= extra_bytes << 20; | 369 | bth0 |= extra_bytes << 20; |
364 | bth0 |= qp->ibqp.qp_type == IB_QPT_SMI ? IPS_DEFAULT_P_KEY : | 370 | bth0 |= qp->ibqp.qp_type == IB_QPT_SMI ? IPATH_DEFAULT_P_KEY : |
365 | ipath_layer_get_pkey(dev->dd, qp->s_pkey_index); | 371 | ipath_layer_get_pkey(dev->dd, qp->s_pkey_index); |
366 | ohdr->bth[0] = cpu_to_be32(bth0); | 372 | ohdr->bth[0] = cpu_to_be32(bth0); |
367 | /* | 373 | /* |
368 | * Use the multicast QP if the destination LID is a multicast LID. | 374 | * Use the multicast QP if the destination LID is a multicast LID. |
369 | */ | 375 | */ |
370 | ohdr->bth[1] = ah_attr->dlid >= IPS_MULTICAST_LID_BASE && | 376 | ohdr->bth[1] = ah_attr->dlid >= IPATH_MULTICAST_LID_BASE && |
371 | ah_attr->dlid != IPS_PERMISSIVE_LID ? | 377 | ah_attr->dlid != IPATH_PERMISSIVE_LID ? |
372 | __constant_cpu_to_be32(IPS_MULTICAST_QPN) : | 378 | __constant_cpu_to_be32(IPATH_MULTICAST_QPN) : |
373 | cpu_to_be32(wr->wr.ud.remote_qpn); | 379 | cpu_to_be32(wr->wr.ud.remote_qpn); |
374 | /* XXX Could lose a PSN count but not worth locking */ | 380 | /* XXX Could lose a PSN count but not worth locking */ |
375 | ohdr->bth[2] = cpu_to_be32(qp->s_next_psn++ & IPS_PSN_MASK); | 381 | ohdr->bth[2] = cpu_to_be32(qp->s_next_psn++ & IPATH_PSN_MASK); |
376 | /* | 382 | /* |
377 | * Qkeys with the high order bit set mean use the | 383 | * Qkeys with the high order bit set mean use the |
378 | * qkey from the QP context instead of the WR (see 10.2.5). | 384 | * qkey from the QP context instead of the WR (see 10.2.5). |
@@ -463,7 +469,7 @@ void ipath_ud_rcv(struct ipath_ibdev *dev, struct ipath_ib_header *hdr, | |||
463 | src_qp = be32_to_cpu(ohdr->u.ud.deth[1]); | 469 | src_qp = be32_to_cpu(ohdr->u.ud.deth[1]); |
464 | } | 470 | } |
465 | } | 471 | } |
466 | src_qp &= IPS_QPN_MASK; | 472 | src_qp &= IPATH_QPN_MASK; |
467 | 473 | ||
468 | /* | 474 | /* |
469 | * Check that the permissive LID is only used on QP0 | 475 | * Check that the permissive LID is only used on QP0 |
@@ -554,7 +560,16 @@ void ipath_ud_rcv(struct ipath_ibdev *dev, struct ipath_ib_header *hdr, | |||
554 | spin_lock_irqsave(&rq->lock, flags); | 560 | spin_lock_irqsave(&rq->lock, flags); |
555 | if (rq->tail == rq->head) { | 561 | if (rq->tail == rq->head) { |
556 | spin_unlock_irqrestore(&rq->lock, flags); | 562 | spin_unlock_irqrestore(&rq->lock, flags); |
557 | dev->n_pkt_drops++; | 563 | /* |
564 | * Count VL15 packets dropped due to no receive buffer. | ||
565 | * Otherwise, count them as buffer overruns since usually, | ||
566 | * the HW will be able to receive packets even if there are | ||
567 | * no QPs with posted receive buffers. | ||
568 | */ | ||
569 | if (qp->ibqp.qp_num == 0) | ||
570 | dev->n_vl15_dropped++; | ||
571 | else | ||
572 | dev->rcv_errors++; | ||
558 | goto bail; | 573 | goto bail; |
559 | } | 574 | } |
560 | /* Silently drop packets which are too big. */ | 575 | /* Silently drop packets which are too big. */ |
@@ -612,7 +627,7 @@ void ipath_ud_rcv(struct ipath_ibdev *dev, struct ipath_ib_header *hdr, | |||
612 | /* | 627 | /* |
613 | * Save the LMC lower bits if the destination LID is a unicast LID. | 628 | * Save the LMC lower bits if the destination LID is a unicast LID. |
614 | */ | 629 | */ |
615 | wc.dlid_path_bits = dlid >= IPS_MULTICAST_LID_BASE ? 0 : | 630 | wc.dlid_path_bits = dlid >= IPATH_MULTICAST_LID_BASE ? 0 : |
616 | dlid & ((1 << (dev->mkeyprot_resv_lmc & 7)) - 1); | 631 | dlid & ((1 << (dev->mkeyprot_resv_lmc & 7)) - 1); |
617 | /* Signal completion event if the solicited bit is set. */ | 632 | /* Signal completion event if the solicited bit is set. */ |
618 | ipath_cq_enter(to_icq(qp->ibqp.recv_cq), &wc, | 633 | ipath_cq_enter(to_icq(qp->ibqp.recv_cq), &wc, |
diff --git a/drivers/infiniband/hw/ipath/ipath_user_pages.c b/drivers/infiniband/hw/ipath/ipath_user_pages.c index 2bb08afc86d0..e32fca9faf80 100644 --- a/drivers/infiniband/hw/ipath/ipath_user_pages.c +++ b/drivers/infiniband/hw/ipath/ipath_user_pages.c | |||
@@ -1,4 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2006 QLogic, Inc. All rights reserved. | ||
2 | * Copyright (c) 2003, 2004, 2005, 2006 PathScale, Inc. All rights reserved. | 3 | * Copyright (c) 2003, 2004, 2005, 2006 PathScale, Inc. All rights reserved. |
3 | * | 4 | * |
4 | * This software is available to you under a choice of one of two | 5 | * This software is available to you under a choice of one of two |
@@ -57,17 +58,6 @@ static int __get_user_pages(unsigned long start_page, size_t num_pages, | |||
57 | size_t got; | 58 | size_t got; |
58 | int ret; | 59 | int ret; |
59 | 60 | ||
60 | #if 0 | ||
61 | /* | ||
62 | * XXX - causes MPI programs to fail, haven't had time to check | ||
63 | * yet | ||
64 | */ | ||
65 | if (!capable(CAP_IPC_LOCK)) { | ||
66 | ret = -EPERM; | ||
67 | goto bail; | ||
68 | } | ||
69 | #endif | ||
70 | |||
71 | lock_limit = current->signal->rlim[RLIMIT_MEMLOCK].rlim_cur >> | 61 | lock_limit = current->signal->rlim[RLIMIT_MEMLOCK].rlim_cur >> |
72 | PAGE_SHIFT; | 62 | PAGE_SHIFT; |
73 | 63 | ||
diff --git a/drivers/infiniband/hw/ipath/ipath_verbs.c b/drivers/infiniband/hw/ipath/ipath_verbs.c index 28fdbdaa789d..56ac336dd1ec 100644 --- a/drivers/infiniband/hw/ipath/ipath_verbs.c +++ b/drivers/infiniband/hw/ipath/ipath_verbs.c | |||
@@ -1,4 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2006 QLogic, Inc. All rights reserved. | ||
2 | * Copyright (c) 2005, 2006 PathScale, Inc. All rights reserved. | 3 | * Copyright (c) 2005, 2006 PathScale, Inc. All rights reserved. |
3 | * | 4 | * |
4 | * This software is available to you under a choice of one of two | 5 | * This software is available to you under a choice of one of two |
@@ -36,7 +37,7 @@ | |||
36 | 37 | ||
37 | #include "ipath_kernel.h" | 38 | #include "ipath_kernel.h" |
38 | #include "ipath_verbs.h" | 39 | #include "ipath_verbs.h" |
39 | #include "ips_common.h" | 40 | #include "ipath_common.h" |
40 | 41 | ||
41 | /* Not static, because we don't want the compiler removing it */ | 42 | /* Not static, because we don't want the compiler removing it */ |
42 | const char ipath_verbs_version[] = "ipath_verbs " IPATH_IDSTR; | 43 | const char ipath_verbs_version[] = "ipath_verbs " IPATH_IDSTR; |
@@ -55,9 +56,62 @@ unsigned int ib_ipath_debug; /* debug mask */ | |||
55 | module_param_named(debug, ib_ipath_debug, uint, S_IWUSR | S_IRUGO); | 56 | module_param_named(debug, ib_ipath_debug, uint, S_IWUSR | S_IRUGO); |
56 | MODULE_PARM_DESC(debug, "Verbs debug mask"); | 57 | MODULE_PARM_DESC(debug, "Verbs debug mask"); |
57 | 58 | ||
59 | static unsigned int ib_ipath_max_pds = 0xFFFF; | ||
60 | module_param_named(max_pds, ib_ipath_max_pds, uint, S_IWUSR | S_IRUGO); | ||
61 | MODULE_PARM_DESC(max_pds, | ||
62 | "Maximum number of protection domains to support"); | ||
63 | |||
64 | static unsigned int ib_ipath_max_ahs = 0xFFFF; | ||
65 | module_param_named(max_ahs, ib_ipath_max_ahs, uint, S_IWUSR | S_IRUGO); | ||
66 | MODULE_PARM_DESC(max_ahs, "Maximum number of address handles to support"); | ||
67 | |||
68 | unsigned int ib_ipath_max_cqes = 0x2FFFF; | ||
69 | module_param_named(max_cqes, ib_ipath_max_cqes, uint, S_IWUSR | S_IRUGO); | ||
70 | MODULE_PARM_DESC(max_cqes, | ||
71 | "Maximum number of completion queue entries to support"); | ||
72 | |||
73 | unsigned int ib_ipath_max_cqs = 0x1FFFF; | ||
74 | module_param_named(max_cqs, ib_ipath_max_cqs, uint, S_IWUSR | S_IRUGO); | ||
75 | MODULE_PARM_DESC(max_cqs, "Maximum number of completion queues to support"); | ||
76 | |||
77 | unsigned int ib_ipath_max_qp_wrs = 0x3FFF; | ||
78 | module_param_named(max_qp_wrs, ib_ipath_max_qp_wrs, uint, | ||
79 | S_IWUSR | S_IRUGO); | ||
80 | MODULE_PARM_DESC(max_qp_wrs, "Maximum number of QP WRs to support"); | ||
81 | |||
82 | unsigned int ib_ipath_max_sges = 0x60; | ||
83 | module_param_named(max_sges, ib_ipath_max_sges, uint, S_IWUSR | S_IRUGO); | ||
84 | MODULE_PARM_DESC(max_sges, "Maximum number of SGEs to support"); | ||
85 | |||
86 | unsigned int ib_ipath_max_mcast_grps = 16384; | ||
87 | module_param_named(max_mcast_grps, ib_ipath_max_mcast_grps, uint, | ||
88 | S_IWUSR | S_IRUGO); | ||
89 | MODULE_PARM_DESC(max_mcast_grps, | ||
90 | "Maximum number of multicast groups to support"); | ||
91 | |||
92 | unsigned int ib_ipath_max_mcast_qp_attached = 16; | ||
93 | module_param_named(max_mcast_qp_attached, ib_ipath_max_mcast_qp_attached, | ||
94 | uint, S_IWUSR | S_IRUGO); | ||
95 | MODULE_PARM_DESC(max_mcast_qp_attached, | ||
96 | "Maximum number of attached QPs to support"); | ||
97 | |||
98 | unsigned int ib_ipath_max_srqs = 1024; | ||
99 | module_param_named(max_srqs, ib_ipath_max_srqs, uint, S_IWUSR | S_IRUGO); | ||
100 | MODULE_PARM_DESC(max_srqs, "Maximum number of SRQs to support"); | ||
101 | |||
102 | unsigned int ib_ipath_max_srq_sges = 128; | ||
103 | module_param_named(max_srq_sges, ib_ipath_max_srq_sges, | ||
104 | uint, S_IWUSR | S_IRUGO); | ||
105 | MODULE_PARM_DESC(max_srq_sges, "Maximum number of SRQ SGEs to support"); | ||
106 | |||
107 | unsigned int ib_ipath_max_srq_wrs = 0x1FFFF; | ||
108 | module_param_named(max_srq_wrs, ib_ipath_max_srq_wrs, | ||
109 | uint, S_IWUSR | S_IRUGO); | ||
110 | MODULE_PARM_DESC(max_srq_wrs, "Maximum number of SRQ WRs support"); | ||
111 | |||
58 | MODULE_LICENSE("GPL"); | 112 | MODULE_LICENSE("GPL"); |
59 | MODULE_AUTHOR("PathScale <support@pathscale.com>"); | 113 | MODULE_AUTHOR("QLogic <support@pathscale.com>"); |
60 | MODULE_DESCRIPTION("Pathscale InfiniPath driver"); | 114 | MODULE_DESCRIPTION("QLogic InfiniPath driver"); |
61 | 115 | ||
62 | const int ib_ipath_state_ops[IB_QPS_ERR + 1] = { | 116 | const int ib_ipath_state_ops[IB_QPS_ERR + 1] = { |
63 | [IB_QPS_RESET] = 0, | 117 | [IB_QPS_RESET] = 0, |
@@ -193,7 +247,7 @@ static int ipath_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr, | |||
193 | switch (qp->ibqp.qp_type) { | 247 | switch (qp->ibqp.qp_type) { |
194 | case IB_QPT_UC: | 248 | case IB_QPT_UC: |
195 | case IB_QPT_RC: | 249 | case IB_QPT_RC: |
196 | err = ipath_post_rc_send(qp, wr); | 250 | err = ipath_post_ruc_send(qp, wr); |
197 | break; | 251 | break; |
198 | 252 | ||
199 | case IB_QPT_SMI: | 253 | case IB_QPT_SMI: |
@@ -375,7 +429,7 @@ static void ipath_ib_rcv(void *arg, void *rhdr, void *data, u32 tlen) | |||
375 | 429 | ||
376 | /* Check for a valid destination LID (see ch. 7.11.1). */ | 430 | /* Check for a valid destination LID (see ch. 7.11.1). */ |
377 | lid = be16_to_cpu(hdr->lrh[1]); | 431 | lid = be16_to_cpu(hdr->lrh[1]); |
378 | if (lid < IPS_MULTICAST_LID_BASE) { | 432 | if (lid < IPATH_MULTICAST_LID_BASE) { |
379 | lid &= ~((1 << (dev->mkeyprot_resv_lmc & 7)) - 1); | 433 | lid &= ~((1 << (dev->mkeyprot_resv_lmc & 7)) - 1); |
380 | if (unlikely(lid != ipath_layer_get_lid(dev->dd))) { | 434 | if (unlikely(lid != ipath_layer_get_lid(dev->dd))) { |
381 | dev->rcv_errors++; | 435 | dev->rcv_errors++; |
@@ -385,9 +439,9 @@ static void ipath_ib_rcv(void *arg, void *rhdr, void *data, u32 tlen) | |||
385 | 439 | ||
386 | /* Check for GRH */ | 440 | /* Check for GRH */ |
387 | lnh = be16_to_cpu(hdr->lrh[0]) & 3; | 441 | lnh = be16_to_cpu(hdr->lrh[0]) & 3; |
388 | if (lnh == IPS_LRH_BTH) | 442 | if (lnh == IPATH_LRH_BTH) |
389 | ohdr = &hdr->u.oth; | 443 | ohdr = &hdr->u.oth; |
390 | else if (lnh == IPS_LRH_GRH) | 444 | else if (lnh == IPATH_LRH_GRH) |
391 | ohdr = &hdr->u.l.oth; | 445 | ohdr = &hdr->u.l.oth; |
392 | else { | 446 | else { |
393 | dev->rcv_errors++; | 447 | dev->rcv_errors++; |
@@ -399,8 +453,8 @@ static void ipath_ib_rcv(void *arg, void *rhdr, void *data, u32 tlen) | |||
399 | dev->opstats[opcode].n_packets++; | 453 | dev->opstats[opcode].n_packets++; |
400 | 454 | ||
401 | /* Get the destination QP number. */ | 455 | /* Get the destination QP number. */ |
402 | qp_num = be32_to_cpu(ohdr->bth[1]) & IPS_QPN_MASK; | 456 | qp_num = be32_to_cpu(ohdr->bth[1]) & IPATH_QPN_MASK; |
403 | if (qp_num == IPS_MULTICAST_QPN) { | 457 | if (qp_num == IPATH_MULTICAST_QPN) { |
404 | struct ipath_mcast *mcast; | 458 | struct ipath_mcast *mcast; |
405 | struct ipath_mcast_qp *p; | 459 | struct ipath_mcast_qp *p; |
406 | 460 | ||
@@ -411,7 +465,7 @@ static void ipath_ib_rcv(void *arg, void *rhdr, void *data, u32 tlen) | |||
411 | } | 465 | } |
412 | dev->n_multicast_rcv++; | 466 | dev->n_multicast_rcv++; |
413 | list_for_each_entry_rcu(p, &mcast->qp_list, list) | 467 | list_for_each_entry_rcu(p, &mcast->qp_list, list) |
414 | ipath_qp_rcv(dev, hdr, lnh == IPS_LRH_GRH, data, | 468 | ipath_qp_rcv(dev, hdr, lnh == IPATH_LRH_GRH, data, |
415 | tlen, p->qp); | 469 | tlen, p->qp); |
416 | /* | 470 | /* |
417 | * Notify ipath_multicast_detach() if it is waiting for us | 471 | * Notify ipath_multicast_detach() if it is waiting for us |
@@ -423,7 +477,7 @@ static void ipath_ib_rcv(void *arg, void *rhdr, void *data, u32 tlen) | |||
423 | qp = ipath_lookup_qpn(&dev->qp_table, qp_num); | 477 | qp = ipath_lookup_qpn(&dev->qp_table, qp_num); |
424 | if (qp) { | 478 | if (qp) { |
425 | dev->n_unicast_rcv++; | 479 | dev->n_unicast_rcv++; |
426 | ipath_qp_rcv(dev, hdr, lnh == IPS_LRH_GRH, data, | 480 | ipath_qp_rcv(dev, hdr, lnh == IPATH_LRH_GRH, data, |
427 | tlen, qp); | 481 | tlen, qp); |
428 | /* | 482 | /* |
429 | * Notify ipath_destroy_qp() if it is waiting | 483 | * Notify ipath_destroy_qp() if it is waiting |
@@ -567,40 +621,38 @@ static int ipath_query_device(struct ib_device *ibdev, | |||
567 | struct ib_device_attr *props) | 621 | struct ib_device_attr *props) |
568 | { | 622 | { |
569 | struct ipath_ibdev *dev = to_idev(ibdev); | 623 | struct ipath_ibdev *dev = to_idev(ibdev); |
570 | u32 vendor, boardrev, majrev, minrev; | ||
571 | 624 | ||
572 | memset(props, 0, sizeof(*props)); | 625 | memset(props, 0, sizeof(*props)); |
573 | 626 | ||
574 | props->device_cap_flags = IB_DEVICE_BAD_PKEY_CNTR | | 627 | props->device_cap_flags = IB_DEVICE_BAD_PKEY_CNTR | |
575 | IB_DEVICE_BAD_QKEY_CNTR | IB_DEVICE_SHUTDOWN_PORT | | 628 | IB_DEVICE_BAD_QKEY_CNTR | IB_DEVICE_SHUTDOWN_PORT | |
576 | IB_DEVICE_SYS_IMAGE_GUID; | 629 | IB_DEVICE_SYS_IMAGE_GUID; |
577 | ipath_layer_query_device(dev->dd, &vendor, &boardrev, | 630 | props->vendor_id = ipath_layer_get_vendorid(dev->dd); |
578 | &majrev, &minrev); | 631 | props->vendor_part_id = ipath_layer_get_deviceid(dev->dd); |
579 | props->vendor_id = vendor; | 632 | props->hw_ver = ipath_layer_get_pcirev(dev->dd); |
580 | props->vendor_part_id = boardrev; | ||
581 | props->hw_ver = boardrev << 16 | majrev << 8 | minrev; | ||
582 | 633 | ||
583 | props->sys_image_guid = dev->sys_image_guid; | 634 | props->sys_image_guid = dev->sys_image_guid; |
584 | 635 | ||
585 | props->max_mr_size = ~0ull; | 636 | props->max_mr_size = ~0ull; |
586 | props->max_qp = 0xffff; | 637 | props->max_qp = dev->qp_table.max; |
587 | props->max_qp_wr = 0xffff; | 638 | props->max_qp_wr = ib_ipath_max_qp_wrs; |
588 | props->max_sge = 255; | 639 | props->max_sge = ib_ipath_max_sges; |
589 | props->max_cq = 0xffff; | 640 | props->max_cq = ib_ipath_max_cqs; |
590 | props->max_cqe = 0xffff; | 641 | props->max_ah = ib_ipath_max_ahs; |
591 | props->max_mr = 0xffff; | 642 | props->max_cqe = ib_ipath_max_cqes; |
592 | props->max_pd = 0xffff; | 643 | props->max_mr = dev->lk_table.max; |
644 | props->max_pd = ib_ipath_max_pds; | ||
593 | props->max_qp_rd_atom = 1; | 645 | props->max_qp_rd_atom = 1; |
594 | props->max_qp_init_rd_atom = 1; | 646 | props->max_qp_init_rd_atom = 1; |
595 | /* props->max_res_rd_atom */ | 647 | /* props->max_res_rd_atom */ |
596 | props->max_srq = 0xffff; | 648 | props->max_srq = ib_ipath_max_srqs; |
597 | props->max_srq_wr = 0xffff; | 649 | props->max_srq_wr = ib_ipath_max_srq_wrs; |
598 | props->max_srq_sge = 255; | 650 | props->max_srq_sge = ib_ipath_max_srq_sges; |
599 | /* props->local_ca_ack_delay */ | 651 | /* props->local_ca_ack_delay */ |
600 | props->atomic_cap = IB_ATOMIC_HCA; | 652 | props->atomic_cap = IB_ATOMIC_HCA; |
601 | props->max_pkeys = ipath_layer_get_npkeys(dev->dd); | 653 | props->max_pkeys = ipath_layer_get_npkeys(dev->dd); |
602 | props->max_mcast_grp = 0xffff; | 654 | props->max_mcast_grp = ib_ipath_max_mcast_grps; |
603 | props->max_mcast_qp_attach = 0xffff; | 655 | props->max_mcast_qp_attach = ib_ipath_max_mcast_qp_attached; |
604 | props->max_total_mcast_qp_attach = props->max_mcast_qp_attach * | 656 | props->max_total_mcast_qp_attach = props->max_mcast_qp_attach * |
605 | props->max_mcast_grp; | 657 | props->max_mcast_grp; |
606 | 658 | ||
@@ -643,10 +695,10 @@ static int ipath_query_port(struct ib_device *ibdev, | |||
643 | ipath_layer_get_lastibcstat(dev->dd) & 0xf]; | 695 | ipath_layer_get_lastibcstat(dev->dd) & 0xf]; |
644 | props->port_cap_flags = dev->port_cap_flags; | 696 | props->port_cap_flags = dev->port_cap_flags; |
645 | props->gid_tbl_len = 1; | 697 | props->gid_tbl_len = 1; |
646 | props->max_msg_sz = 4096; | 698 | props->max_msg_sz = 0x80000000; |
647 | props->pkey_tbl_len = ipath_layer_get_npkeys(dev->dd); | 699 | props->pkey_tbl_len = ipath_layer_get_npkeys(dev->dd); |
648 | props->bad_pkey_cntr = ipath_layer_get_cr_errpkey(dev->dd) - | 700 | props->bad_pkey_cntr = ipath_layer_get_cr_errpkey(dev->dd) - |
649 | dev->n_pkey_violations; | 701 | dev->z_pkey_violations; |
650 | props->qkey_viol_cntr = dev->qkey_violations; | 702 | props->qkey_viol_cntr = dev->qkey_violations; |
651 | props->active_width = IB_WIDTH_4X; | 703 | props->active_width = IB_WIDTH_4X; |
652 | /* See rate_show() */ | 704 | /* See rate_show() */ |
@@ -743,15 +795,30 @@ static struct ib_pd *ipath_alloc_pd(struct ib_device *ibdev, | |||
743 | struct ib_ucontext *context, | 795 | struct ib_ucontext *context, |
744 | struct ib_udata *udata) | 796 | struct ib_udata *udata) |
745 | { | 797 | { |
798 | struct ipath_ibdev *dev = to_idev(ibdev); | ||
746 | struct ipath_pd *pd; | 799 | struct ipath_pd *pd; |
747 | struct ib_pd *ret; | 800 | struct ib_pd *ret; |
748 | 801 | ||
802 | /* | ||
803 | * This is actually totally arbitrary. Some correctness tests | ||
804 | * assume there's a maximum number of PDs that can be allocated. | ||
805 | * We don't actually have this limit, but we fail the test if | ||
806 | * we allow allocations of more than we report for this value. | ||
807 | */ | ||
808 | |||
809 | if (dev->n_pds_allocated == ib_ipath_max_pds) { | ||
810 | ret = ERR_PTR(-ENOMEM); | ||
811 | goto bail; | ||
812 | } | ||
813 | |||
749 | pd = kmalloc(sizeof *pd, GFP_KERNEL); | 814 | pd = kmalloc(sizeof *pd, GFP_KERNEL); |
750 | if (!pd) { | 815 | if (!pd) { |
751 | ret = ERR_PTR(-ENOMEM); | 816 | ret = ERR_PTR(-ENOMEM); |
752 | goto bail; | 817 | goto bail; |
753 | } | 818 | } |
754 | 819 | ||
820 | dev->n_pds_allocated++; | ||
821 | |||
755 | /* ib_alloc_pd() will initialize pd->ibpd. */ | 822 | /* ib_alloc_pd() will initialize pd->ibpd. */ |
756 | pd->user = udata != NULL; | 823 | pd->user = udata != NULL; |
757 | 824 | ||
@@ -764,6 +831,9 @@ bail: | |||
764 | static int ipath_dealloc_pd(struct ib_pd *ibpd) | 831 | static int ipath_dealloc_pd(struct ib_pd *ibpd) |
765 | { | 832 | { |
766 | struct ipath_pd *pd = to_ipd(ibpd); | 833 | struct ipath_pd *pd = to_ipd(ibpd); |
834 | struct ipath_ibdev *dev = to_idev(ibpd->device); | ||
835 | |||
836 | dev->n_pds_allocated--; | ||
767 | 837 | ||
768 | kfree(pd); | 838 | kfree(pd); |
769 | 839 | ||
@@ -782,21 +852,40 @@ static struct ib_ah *ipath_create_ah(struct ib_pd *pd, | |||
782 | { | 852 | { |
783 | struct ipath_ah *ah; | 853 | struct ipath_ah *ah; |
784 | struct ib_ah *ret; | 854 | struct ib_ah *ret; |
855 | struct ipath_ibdev *dev = to_idev(pd->device); | ||
856 | |||
857 | if (dev->n_ahs_allocated == ib_ipath_max_ahs) { | ||
858 | ret = ERR_PTR(-ENOMEM); | ||
859 | goto bail; | ||
860 | } | ||
785 | 861 | ||
786 | /* A multicast address requires a GRH (see ch. 8.4.1). */ | 862 | /* A multicast address requires a GRH (see ch. 8.4.1). */ |
787 | if (ah_attr->dlid >= IPS_MULTICAST_LID_BASE && | 863 | if (ah_attr->dlid >= IPATH_MULTICAST_LID_BASE && |
788 | ah_attr->dlid != IPS_PERMISSIVE_LID && | 864 | ah_attr->dlid != IPATH_PERMISSIVE_LID && |
789 | !(ah_attr->ah_flags & IB_AH_GRH)) { | 865 | !(ah_attr->ah_flags & IB_AH_GRH)) { |
790 | ret = ERR_PTR(-EINVAL); | 866 | ret = ERR_PTR(-EINVAL); |
791 | goto bail; | 867 | goto bail; |
792 | } | 868 | } |
793 | 869 | ||
870 | if (ah_attr->dlid == 0) { | ||
871 | ret = ERR_PTR(-EINVAL); | ||
872 | goto bail; | ||
873 | } | ||
874 | |||
875 | if (ah_attr->port_num < 1 || | ||
876 | ah_attr->port_num > pd->device->phys_port_cnt) { | ||
877 | ret = ERR_PTR(-EINVAL); | ||
878 | goto bail; | ||
879 | } | ||
880 | |||
794 | ah = kmalloc(sizeof *ah, GFP_ATOMIC); | 881 | ah = kmalloc(sizeof *ah, GFP_ATOMIC); |
795 | if (!ah) { | 882 | if (!ah) { |
796 | ret = ERR_PTR(-ENOMEM); | 883 | ret = ERR_PTR(-ENOMEM); |
797 | goto bail; | 884 | goto bail; |
798 | } | 885 | } |
799 | 886 | ||
887 | dev->n_ahs_allocated++; | ||
888 | |||
800 | /* ib_create_ah() will initialize ah->ibah. */ | 889 | /* ib_create_ah() will initialize ah->ibah. */ |
801 | ah->attr = *ah_attr; | 890 | ah->attr = *ah_attr; |
802 | 891 | ||
@@ -814,8 +903,11 @@ bail: | |||
814 | */ | 903 | */ |
815 | static int ipath_destroy_ah(struct ib_ah *ibah) | 904 | static int ipath_destroy_ah(struct ib_ah *ibah) |
816 | { | 905 | { |
906 | struct ipath_ibdev *dev = to_idev(ibah->device); | ||
817 | struct ipath_ah *ah = to_iah(ibah); | 907 | struct ipath_ah *ah = to_iah(ibah); |
818 | 908 | ||
909 | dev->n_ahs_allocated--; | ||
910 | |||
819 | kfree(ah); | 911 | kfree(ah); |
820 | 912 | ||
821 | return 0; | 913 | return 0; |
@@ -889,6 +981,7 @@ static int ipath_verbs_register_sysfs(struct ib_device *dev); | |||
889 | */ | 981 | */ |
890 | static void *ipath_register_ib_device(int unit, struct ipath_devdata *dd) | 982 | static void *ipath_register_ib_device(int unit, struct ipath_devdata *dd) |
891 | { | 983 | { |
984 | struct ipath_layer_counters cntrs; | ||
892 | struct ipath_ibdev *idev; | 985 | struct ipath_ibdev *idev; |
893 | struct ib_device *dev; | 986 | struct ib_device *dev; |
894 | int ret; | 987 | int ret; |
@@ -939,6 +1032,25 @@ static void *ipath_register_ib_device(int unit, struct ipath_devdata *dd) | |||
939 | idev->pma_counter_select[5] = IB_PMA_PORT_XMIT_WAIT; | 1032 | idev->pma_counter_select[5] = IB_PMA_PORT_XMIT_WAIT; |
940 | idev->link_width_enabled = 3; /* 1x or 4x */ | 1033 | idev->link_width_enabled = 3; /* 1x or 4x */ |
941 | 1034 | ||
1035 | /* Snapshot current HW counters to "clear" them. */ | ||
1036 | ipath_layer_get_counters(dd, &cntrs); | ||
1037 | idev->z_symbol_error_counter = cntrs.symbol_error_counter; | ||
1038 | idev->z_link_error_recovery_counter = | ||
1039 | cntrs.link_error_recovery_counter; | ||
1040 | idev->z_link_downed_counter = cntrs.link_downed_counter; | ||
1041 | idev->z_port_rcv_errors = cntrs.port_rcv_errors; | ||
1042 | idev->z_port_rcv_remphys_errors = | ||
1043 | cntrs.port_rcv_remphys_errors; | ||
1044 | idev->z_port_xmit_discards = cntrs.port_xmit_discards; | ||
1045 | idev->z_port_xmit_data = cntrs.port_xmit_data; | ||
1046 | idev->z_port_rcv_data = cntrs.port_rcv_data; | ||
1047 | idev->z_port_xmit_packets = cntrs.port_xmit_packets; | ||
1048 | idev->z_port_rcv_packets = cntrs.port_rcv_packets; | ||
1049 | idev->z_local_link_integrity_errors = | ||
1050 | cntrs.local_link_integrity_errors; | ||
1051 | idev->z_excessive_buffer_overrun_errors = | ||
1052 | cntrs.excessive_buffer_overrun_errors; | ||
1053 | |||
942 | /* | 1054 | /* |
943 | * The system image GUID is supposed to be the same for all | 1055 | * The system image GUID is supposed to be the same for all |
944 | * IB HCAs in a single system but since there can be other | 1056 | * IB HCAs in a single system but since there can be other |
@@ -1109,11 +1221,8 @@ static ssize_t show_rev(struct class_device *cdev, char *buf) | |||
1109 | { | 1221 | { |
1110 | struct ipath_ibdev *dev = | 1222 | struct ipath_ibdev *dev = |
1111 | container_of(cdev, struct ipath_ibdev, ibdev.class_dev); | 1223 | container_of(cdev, struct ipath_ibdev, ibdev.class_dev); |
1112 | int vendor, boardrev, majrev, minrev; | ||
1113 | 1224 | ||
1114 | ipath_layer_query_device(dev->dd, &vendor, &boardrev, | 1225 | return sprintf(buf, "%x\n", ipath_layer_get_pcirev(dev->dd)); |
1115 | &majrev, &minrev); | ||
1116 | return sprintf(buf, "%d.%d\n", majrev, minrev); | ||
1117 | } | 1226 | } |
1118 | 1227 | ||
1119 | static ssize_t show_hca(struct class_device *cdev, char *buf) | 1228 | static ssize_t show_hca(struct class_device *cdev, char *buf) |
diff --git a/drivers/infiniband/hw/ipath/ipath_verbs.h b/drivers/infiniband/hw/ipath/ipath_verbs.h index 4f8d59300e9b..2df684727dc1 100644 --- a/drivers/infiniband/hw/ipath/ipath_verbs.h +++ b/drivers/infiniband/hw/ipath/ipath_verbs.h | |||
@@ -1,4 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2006 QLogic, Inc. All rights reserved. | ||
2 | * Copyright (c) 2005, 2006 PathScale, Inc. All rights reserved. | 3 | * Copyright (c) 2005, 2006 PathScale, Inc. All rights reserved. |
3 | * | 4 | * |
4 | * This software is available to you under a choice of one of two | 5 | * This software is available to you under a choice of one of two |
@@ -148,6 +149,7 @@ struct ipath_mcast { | |||
148 | struct list_head qp_list; | 149 | struct list_head qp_list; |
149 | wait_queue_head_t wait; | 150 | wait_queue_head_t wait; |
150 | atomic_t refcount; | 151 | atomic_t refcount; |
152 | int n_attached; | ||
151 | }; | 153 | }; |
152 | 154 | ||
153 | /* Memory region */ | 155 | /* Memory region */ |
@@ -305,32 +307,34 @@ struct ipath_qp { | |||
305 | u32 s_next_psn; /* PSN for next request */ | 307 | u32 s_next_psn; /* PSN for next request */ |
306 | u32 s_last_psn; /* last response PSN processed */ | 308 | u32 s_last_psn; /* last response PSN processed */ |
307 | u32 s_psn; /* current packet sequence number */ | 309 | u32 s_psn; /* current packet sequence number */ |
310 | u32 s_ack_psn; /* PSN for RDMA_READ */ | ||
308 | u32 s_rnr_timeout; /* number of milliseconds for RNR timeout */ | 311 | u32 s_rnr_timeout; /* number of milliseconds for RNR timeout */ |
309 | u32 s_ack_psn; /* PSN for next ACK or RDMA_READ */ | 312 | u32 r_ack_psn; /* PSN for next ACK or atomic ACK */ |
310 | u64 s_ack_atomic; /* data for atomic ACK */ | ||
311 | u64 r_wr_id; /* ID for current receive WQE */ | 313 | u64 r_wr_id; /* ID for current receive WQE */ |
312 | u64 r_atomic_data; /* data for last atomic op */ | 314 | u64 r_atomic_data; /* data for last atomic op */ |
313 | u32 r_atomic_psn; /* PSN of last atomic op */ | 315 | u32 r_atomic_psn; /* PSN of last atomic op */ |
314 | u32 r_len; /* total length of r_sge */ | 316 | u32 r_len; /* total length of r_sge */ |
315 | u32 r_rcv_len; /* receive data len processed */ | 317 | u32 r_rcv_len; /* receive data len processed */ |
316 | u32 r_psn; /* expected rcv packet sequence number */ | 318 | u32 r_psn; /* expected rcv packet sequence number */ |
319 | u32 r_msn; /* message sequence number */ | ||
317 | u8 state; /* QP state */ | 320 | u8 state; /* QP state */ |
318 | u8 s_state; /* opcode of last packet sent */ | 321 | u8 s_state; /* opcode of last packet sent */ |
319 | u8 s_ack_state; /* opcode of packet to ACK */ | 322 | u8 s_ack_state; /* opcode of packet to ACK */ |
320 | u8 s_nak_state; /* non-zero if NAK is pending */ | 323 | u8 s_nak_state; /* non-zero if NAK is pending */ |
321 | u8 r_state; /* opcode of last packet received */ | 324 | u8 r_state; /* opcode of last packet received */ |
325 | u8 r_ack_state; /* opcode of packet to ACK */ | ||
326 | u8 r_nak_state; /* non-zero if NAK is pending */ | ||
327 | u8 r_min_rnr_timer; /* retry timeout value for RNR NAKs */ | ||
322 | u8 r_reuse_sge; /* for UC receive errors */ | 328 | u8 r_reuse_sge; /* for UC receive errors */ |
323 | u8 r_sge_inx; /* current index into sg_list */ | 329 | u8 r_sge_inx; /* current index into sg_list */ |
324 | u8 s_max_sge; /* size of s_wq->sg_list */ | ||
325 | u8 qp_access_flags; | 330 | u8 qp_access_flags; |
331 | u8 s_max_sge; /* size of s_wq->sg_list */ | ||
326 | u8 s_retry_cnt; /* number of times to retry */ | 332 | u8 s_retry_cnt; /* number of times to retry */ |
327 | u8 s_rnr_retry_cnt; | 333 | u8 s_rnr_retry_cnt; |
328 | u8 s_min_rnr_timer; | ||
329 | u8 s_retry; /* requester retry counter */ | 334 | u8 s_retry; /* requester retry counter */ |
330 | u8 s_rnr_retry; /* requester RNR retry counter */ | 335 | u8 s_rnr_retry; /* requester RNR retry counter */ |
331 | u8 s_pkey_index; /* PKEY index to use */ | 336 | u8 s_pkey_index; /* PKEY index to use */ |
332 | enum ib_mtu path_mtu; | 337 | enum ib_mtu path_mtu; |
333 | atomic_t msn; /* message sequence number */ | ||
334 | u32 remote_qpn; | 338 | u32 remote_qpn; |
335 | u32 qkey; /* QKEY for this QP (for UD or RD) */ | 339 | u32 qkey; /* QKEY for this QP (for UD or RD) */ |
336 | u32 s_size; /* send work queue size */ | 340 | u32 s_size; /* send work queue size */ |
@@ -431,6 +435,11 @@ struct ipath_ibdev { | |||
431 | __be64 sys_image_guid; /* in network order */ | 435 | __be64 sys_image_guid; /* in network order */ |
432 | __be64 gid_prefix; /* in network order */ | 436 | __be64 gid_prefix; /* in network order */ |
433 | __be64 mkey; | 437 | __be64 mkey; |
438 | u32 n_pds_allocated; /* number of PDs allocated for device */ | ||
439 | u32 n_ahs_allocated; /* number of AHs allocated for device */ | ||
440 | u32 n_cqs_allocated; /* number of CQs allocated for device */ | ||
441 | u32 n_srqs_allocated; /* number of SRQs allocated for device */ | ||
442 | u32 n_mcast_grps_allocated; /* number of mcast groups allocated */ | ||
434 | u64 ipath_sword; /* total dwords sent (sample result) */ | 443 | u64 ipath_sword; /* total dwords sent (sample result) */ |
435 | u64 ipath_rword; /* total dwords received (sample result) */ | 444 | u64 ipath_rword; /* total dwords received (sample result) */ |
436 | u64 ipath_spkts; /* total packets sent (sample result) */ | 445 | u64 ipath_spkts; /* total packets sent (sample result) */ |
@@ -442,17 +451,19 @@ struct ipath_ibdev { | |||
442 | u64 n_unicast_rcv; /* total unicast packets received */ | 451 | u64 n_unicast_rcv; /* total unicast packets received */ |
443 | u64 n_multicast_xmit; /* total multicast packets sent */ | 452 | u64 n_multicast_xmit; /* total multicast packets sent */ |
444 | u64 n_multicast_rcv; /* total multicast packets received */ | 453 | u64 n_multicast_rcv; /* total multicast packets received */ |
445 | u64 n_symbol_error_counter; /* starting count for PMA */ | 454 | u64 z_symbol_error_counter; /* starting count for PMA */ |
446 | u64 n_link_error_recovery_counter; /* starting count for PMA */ | 455 | u64 z_link_error_recovery_counter; /* starting count for PMA */ |
447 | u64 n_link_downed_counter; /* starting count for PMA */ | 456 | u64 z_link_downed_counter; /* starting count for PMA */ |
448 | u64 n_port_rcv_errors; /* starting count for PMA */ | 457 | u64 z_port_rcv_errors; /* starting count for PMA */ |
449 | u64 n_port_rcv_remphys_errors; /* starting count for PMA */ | 458 | u64 z_port_rcv_remphys_errors; /* starting count for PMA */ |
450 | u64 n_port_xmit_discards; /* starting count for PMA */ | 459 | u64 z_port_xmit_discards; /* starting count for PMA */ |
451 | u64 n_port_xmit_data; /* starting count for PMA */ | 460 | u64 z_port_xmit_data; /* starting count for PMA */ |
452 | u64 n_port_rcv_data; /* starting count for PMA */ | 461 | u64 z_port_rcv_data; /* starting count for PMA */ |
453 | u64 n_port_xmit_packets; /* starting count for PMA */ | 462 | u64 z_port_xmit_packets; /* starting count for PMA */ |
454 | u64 n_port_rcv_packets; /* starting count for PMA */ | 463 | u64 z_port_rcv_packets; /* starting count for PMA */ |
455 | u32 n_pkey_violations; /* starting count for PMA */ | 464 | u32 z_pkey_violations; /* starting count for PMA */ |
465 | u32 z_local_link_integrity_errors; /* starting count for PMA */ | ||
466 | u32 z_excessive_buffer_overrun_errors; /* starting count for PMA */ | ||
456 | u32 n_rc_resends; | 467 | u32 n_rc_resends; |
457 | u32 n_rc_acks; | 468 | u32 n_rc_acks; |
458 | u32 n_rc_qacks; | 469 | u32 n_rc_qacks; |
@@ -462,6 +473,7 @@ struct ipath_ibdev { | |||
462 | u32 n_other_naks; | 473 | u32 n_other_naks; |
463 | u32 n_timeouts; | 474 | u32 n_timeouts; |
464 | u32 n_pkt_drops; | 475 | u32 n_pkt_drops; |
476 | u32 n_vl15_dropped; | ||
465 | u32 n_wqe_errs; | 477 | u32 n_wqe_errs; |
466 | u32 n_rdma_dup_busy; | 478 | u32 n_rdma_dup_busy; |
467 | u32 n_piowait; | 479 | u32 n_piowait; |
@@ -580,10 +592,6 @@ void ipath_sqerror_qp(struct ipath_qp *qp, struct ib_wc *wc); | |||
580 | 592 | ||
581 | void ipath_get_credit(struct ipath_qp *qp, u32 aeth); | 593 | void ipath_get_credit(struct ipath_qp *qp, u32 aeth); |
582 | 594 | ||
583 | void ipath_do_rc_send(unsigned long data); | ||
584 | |||
585 | void ipath_do_uc_send(unsigned long data); | ||
586 | |||
587 | void ipath_cq_enter(struct ipath_cq *cq, struct ib_wc *entry, int sig); | 595 | void ipath_cq_enter(struct ipath_cq *cq, struct ib_wc *entry, int sig); |
588 | 596 | ||
589 | int ipath_rkey_ok(struct ipath_ibdev *dev, struct ipath_sge_state *ss, | 597 | int ipath_rkey_ok(struct ipath_ibdev *dev, struct ipath_sge_state *ss, |
@@ -596,7 +604,7 @@ void ipath_copy_sge(struct ipath_sge_state *ss, void *data, u32 length); | |||
596 | 604 | ||
597 | void ipath_skip_sge(struct ipath_sge_state *ss, u32 length); | 605 | void ipath_skip_sge(struct ipath_sge_state *ss, u32 length); |
598 | 606 | ||
599 | int ipath_post_rc_send(struct ipath_qp *qp, struct ib_send_wr *wr); | 607 | int ipath_post_ruc_send(struct ipath_qp *qp, struct ib_send_wr *wr); |
600 | 608 | ||
601 | void ipath_uc_rcv(struct ipath_ibdev *dev, struct ipath_ib_header *hdr, | 609 | void ipath_uc_rcv(struct ipath_ibdev *dev, struct ipath_ib_header *hdr, |
602 | int has_grh, void *data, u32 tlen, struct ipath_qp *qp); | 610 | int has_grh, void *data, u32 tlen, struct ipath_qp *qp); |
@@ -678,7 +686,19 @@ void ipath_insert_rnr_queue(struct ipath_qp *qp); | |||
678 | 686 | ||
679 | int ipath_get_rwqe(struct ipath_qp *qp, int wr_id_only); | 687 | int ipath_get_rwqe(struct ipath_qp *qp, int wr_id_only); |
680 | 688 | ||
681 | void ipath_ruc_loopback(struct ipath_qp *sqp, struct ib_wc *wc); | 689 | u32 ipath_make_grh(struct ipath_ibdev *dev, struct ib_grh *hdr, |
690 | struct ib_global_route *grh, u32 hwords, u32 nwords); | ||
691 | |||
692 | void ipath_do_ruc_send(unsigned long data); | ||
693 | |||
694 | u32 ipath_make_rc_ack(struct ipath_qp *qp, struct ipath_other_headers *ohdr, | ||
695 | u32 pmtu); | ||
696 | |||
697 | int ipath_make_rc_req(struct ipath_qp *qp, struct ipath_other_headers *ohdr, | ||
698 | u32 pmtu, u32 *bth0p, u32 *bth2p); | ||
699 | |||
700 | int ipath_make_uc_req(struct ipath_qp *qp, struct ipath_other_headers *ohdr, | ||
701 | u32 pmtu, u32 *bth0p, u32 *bth2p); | ||
682 | 702 | ||
683 | extern const enum ib_wc_opcode ib_ipath_wc_opcode[]; | 703 | extern const enum ib_wc_opcode ib_ipath_wc_opcode[]; |
684 | 704 | ||
@@ -688,6 +708,24 @@ extern const int ib_ipath_state_ops[]; | |||
688 | 708 | ||
689 | extern unsigned int ib_ipath_lkey_table_size; | 709 | extern unsigned int ib_ipath_lkey_table_size; |
690 | 710 | ||
711 | extern unsigned int ib_ipath_max_cqes; | ||
712 | |||
713 | extern unsigned int ib_ipath_max_cqs; | ||
714 | |||
715 | extern unsigned int ib_ipath_max_qp_wrs; | ||
716 | |||
717 | extern unsigned int ib_ipath_max_sges; | ||
718 | |||
719 | extern unsigned int ib_ipath_max_mcast_grps; | ||
720 | |||
721 | extern unsigned int ib_ipath_max_mcast_qp_attached; | ||
722 | |||
723 | extern unsigned int ib_ipath_max_srqs; | ||
724 | |||
725 | extern unsigned int ib_ipath_max_srq_sges; | ||
726 | |||
727 | extern unsigned int ib_ipath_max_srq_wrs; | ||
728 | |||
691 | extern const u32 ib_ipath_rnr_table[]; | 729 | extern const u32 ib_ipath_rnr_table[]; |
692 | 730 | ||
693 | #endif /* IPATH_VERBS_H */ | 731 | #endif /* IPATH_VERBS_H */ |
diff --git a/drivers/infiniband/hw/ipath/ipath_verbs_mcast.c b/drivers/infiniband/hw/ipath/ipath_verbs_mcast.c index 10b31d2c4f20..ee0e1d96d723 100644 --- a/drivers/infiniband/hw/ipath/ipath_verbs_mcast.c +++ b/drivers/infiniband/hw/ipath/ipath_verbs_mcast.c | |||
@@ -1,4 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2006 QLogic, Inc. All rights reserved. | ||
2 | * Copyright (c) 2005, 2006 PathScale, Inc. All rights reserved. | 3 | * Copyright (c) 2005, 2006 PathScale, Inc. All rights reserved. |
3 | * | 4 | * |
4 | * This software is available to you under a choice of one of two | 5 | * This software is available to you under a choice of one of two |
@@ -92,6 +93,7 @@ static struct ipath_mcast *ipath_mcast_alloc(union ib_gid *mgid) | |||
92 | INIT_LIST_HEAD(&mcast->qp_list); | 93 | INIT_LIST_HEAD(&mcast->qp_list); |
93 | init_waitqueue_head(&mcast->wait); | 94 | init_waitqueue_head(&mcast->wait); |
94 | atomic_set(&mcast->refcount, 0); | 95 | atomic_set(&mcast->refcount, 0); |
96 | mcast->n_attached = 0; | ||
95 | 97 | ||
96 | bail: | 98 | bail: |
97 | return mcast; | 99 | return mcast; |
@@ -157,7 +159,8 @@ bail: | |||
157 | * the table but the QP was added. Return ESRCH if the QP was already | 159 | * the table but the QP was added. Return ESRCH if the QP was already |
158 | * attached and neither structure was added. | 160 | * attached and neither structure was added. |
159 | */ | 161 | */ |
160 | static int ipath_mcast_add(struct ipath_mcast *mcast, | 162 | static int ipath_mcast_add(struct ipath_ibdev *dev, |
163 | struct ipath_mcast *mcast, | ||
161 | struct ipath_mcast_qp *mqp) | 164 | struct ipath_mcast_qp *mqp) |
162 | { | 165 | { |
163 | struct rb_node **n = &mcast_tree.rb_node; | 166 | struct rb_node **n = &mcast_tree.rb_node; |
@@ -188,34 +191,47 @@ static int ipath_mcast_add(struct ipath_mcast *mcast, | |||
188 | /* Search the QP list to see if this is already there. */ | 191 | /* Search the QP list to see if this is already there. */ |
189 | list_for_each_entry_rcu(p, &tmcast->qp_list, list) { | 192 | list_for_each_entry_rcu(p, &tmcast->qp_list, list) { |
190 | if (p->qp == mqp->qp) { | 193 | if (p->qp == mqp->qp) { |
191 | spin_unlock_irqrestore(&mcast_lock, flags); | ||
192 | ret = ESRCH; | 194 | ret = ESRCH; |
193 | goto bail; | 195 | goto bail; |
194 | } | 196 | } |
195 | } | 197 | } |
198 | if (tmcast->n_attached == ib_ipath_max_mcast_qp_attached) { | ||
199 | ret = ENOMEM; | ||
200 | goto bail; | ||
201 | } | ||
202 | |||
203 | tmcast->n_attached++; | ||
204 | |||
196 | list_add_tail_rcu(&mqp->list, &tmcast->qp_list); | 205 | list_add_tail_rcu(&mqp->list, &tmcast->qp_list); |
197 | spin_unlock_irqrestore(&mcast_lock, flags); | ||
198 | ret = EEXIST; | 206 | ret = EEXIST; |
199 | goto bail; | 207 | goto bail; |
200 | } | 208 | } |
201 | 209 | ||
210 | if (dev->n_mcast_grps_allocated == ib_ipath_max_mcast_grps) { | ||
211 | ret = ENOMEM; | ||
212 | goto bail; | ||
213 | } | ||
214 | |||
215 | dev->n_mcast_grps_allocated++; | ||
216 | |||
202 | list_add_tail_rcu(&mqp->list, &mcast->qp_list); | 217 | list_add_tail_rcu(&mqp->list, &mcast->qp_list); |
203 | 218 | ||
204 | atomic_inc(&mcast->refcount); | 219 | atomic_inc(&mcast->refcount); |
205 | rb_link_node(&mcast->rb_node, pn, n); | 220 | rb_link_node(&mcast->rb_node, pn, n); |
206 | rb_insert_color(&mcast->rb_node, &mcast_tree); | 221 | rb_insert_color(&mcast->rb_node, &mcast_tree); |
207 | 222 | ||
208 | spin_unlock_irqrestore(&mcast_lock, flags); | ||
209 | |||
210 | ret = 0; | 223 | ret = 0; |
211 | 224 | ||
212 | bail: | 225 | bail: |
226 | spin_unlock_irqrestore(&mcast_lock, flags); | ||
227 | |||
213 | return ret; | 228 | return ret; |
214 | } | 229 | } |
215 | 230 | ||
216 | int ipath_multicast_attach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid) | 231 | int ipath_multicast_attach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid) |
217 | { | 232 | { |
218 | struct ipath_qp *qp = to_iqp(ibqp); | 233 | struct ipath_qp *qp = to_iqp(ibqp); |
234 | struct ipath_ibdev *dev = to_idev(ibqp->device); | ||
219 | struct ipath_mcast *mcast; | 235 | struct ipath_mcast *mcast; |
220 | struct ipath_mcast_qp *mqp; | 236 | struct ipath_mcast_qp *mqp; |
221 | int ret; | 237 | int ret; |
@@ -235,7 +251,7 @@ int ipath_multicast_attach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid) | |||
235 | ret = -ENOMEM; | 251 | ret = -ENOMEM; |
236 | goto bail; | 252 | goto bail; |
237 | } | 253 | } |
238 | switch (ipath_mcast_add(mcast, mqp)) { | 254 | switch (ipath_mcast_add(dev, mcast, mqp)) { |
239 | case ESRCH: | 255 | case ESRCH: |
240 | /* Neither was used: can't attach the same QP twice. */ | 256 | /* Neither was used: can't attach the same QP twice. */ |
241 | ipath_mcast_qp_free(mqp); | 257 | ipath_mcast_qp_free(mqp); |
@@ -245,6 +261,12 @@ int ipath_multicast_attach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid) | |||
245 | case EEXIST: /* The mcast wasn't used */ | 261 | case EEXIST: /* The mcast wasn't used */ |
246 | ipath_mcast_free(mcast); | 262 | ipath_mcast_free(mcast); |
247 | break; | 263 | break; |
264 | case ENOMEM: | ||
265 | /* Exceeded the maximum number of mcast groups. */ | ||
266 | ipath_mcast_qp_free(mqp); | ||
267 | ipath_mcast_free(mcast); | ||
268 | ret = -ENOMEM; | ||
269 | goto bail; | ||
248 | default: | 270 | default: |
249 | break; | 271 | break; |
250 | } | 272 | } |
@@ -258,6 +280,7 @@ bail: | |||
258 | int ipath_multicast_detach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid) | 280 | int ipath_multicast_detach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid) |
259 | { | 281 | { |
260 | struct ipath_qp *qp = to_iqp(ibqp); | 282 | struct ipath_qp *qp = to_iqp(ibqp); |
283 | struct ipath_ibdev *dev = to_idev(ibqp->device); | ||
261 | struct ipath_mcast *mcast = NULL; | 284 | struct ipath_mcast *mcast = NULL; |
262 | struct ipath_mcast_qp *p, *tmp; | 285 | struct ipath_mcast_qp *p, *tmp; |
263 | struct rb_node *n; | 286 | struct rb_node *n; |
@@ -272,7 +295,7 @@ int ipath_multicast_detach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid) | |||
272 | while (1) { | 295 | while (1) { |
273 | if (n == NULL) { | 296 | if (n == NULL) { |
274 | spin_unlock_irqrestore(&mcast_lock, flags); | 297 | spin_unlock_irqrestore(&mcast_lock, flags); |
275 | ret = 0; | 298 | ret = -EINVAL; |
276 | goto bail; | 299 | goto bail; |
277 | } | 300 | } |
278 | 301 | ||
@@ -296,6 +319,7 @@ int ipath_multicast_detach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid) | |||
296 | * link until we are sure there are no list walkers. | 319 | * link until we are sure there are no list walkers. |
297 | */ | 320 | */ |
298 | list_del_rcu(&p->list); | 321 | list_del_rcu(&p->list); |
322 | mcast->n_attached--; | ||
299 | 323 | ||
300 | /* If this was the last attached QP, remove the GID too. */ | 324 | /* If this was the last attached QP, remove the GID too. */ |
301 | if (list_empty(&mcast->qp_list)) { | 325 | if (list_empty(&mcast->qp_list)) { |
@@ -319,6 +343,7 @@ int ipath_multicast_detach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid) | |||
319 | atomic_dec(&mcast->refcount); | 343 | atomic_dec(&mcast->refcount); |
320 | wait_event(mcast->wait, !atomic_read(&mcast->refcount)); | 344 | wait_event(mcast->wait, !atomic_read(&mcast->refcount)); |
321 | ipath_mcast_free(mcast); | 345 | ipath_mcast_free(mcast); |
346 | dev->n_mcast_grps_allocated--; | ||
322 | } | 347 | } |
323 | 348 | ||
324 | ret = 0; | 349 | ret = 0; |
diff --git a/drivers/infiniband/hw/ipath/ipath_wc_x86_64.c b/drivers/infiniband/hw/ipath/ipath_wc_x86_64.c index adc5322f15c1..f8f9e2e8cbdd 100644 --- a/drivers/infiniband/hw/ipath/ipath_wc_x86_64.c +++ b/drivers/infiniband/hw/ipath/ipath_wc_x86_64.c | |||
@@ -1,4 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2006 QLogic, Inc. All rights reserved. | ||
2 | * Copyright (c) 2003, 2004, 2005, 2006 PathScale, Inc. All rights reserved. | 3 | * Copyright (c) 2003, 2004, 2005, 2006 PathScale, Inc. All rights reserved. |
3 | * | 4 | * |
4 | * This software is available to you under a choice of one of two | 5 | * This software is available to you under a choice of one of two |
diff --git a/drivers/infiniband/hw/ipath/ips_common.h b/drivers/infiniband/hw/ipath/ips_common.h deleted file mode 100644 index ab7cbbbfd03a..000000000000 --- a/drivers/infiniband/hw/ipath/ips_common.h +++ /dev/null | |||
@@ -1,263 +0,0 @@ | |||
1 | #ifndef IPS_COMMON_H | ||
2 | #define IPS_COMMON_H | ||
3 | /* | ||
4 | * Copyright (c) 2003, 2004, 2005, 2006 PathScale, Inc. All rights reserved. | ||
5 | * | ||
6 | * This software is available to you under a choice of one of two | ||
7 | * licenses. You may choose to be licensed under the terms of the GNU | ||
8 | * General Public License (GPL) Version 2, available from the file | ||
9 | * COPYING in the main directory of this source tree, or the | ||
10 | * OpenIB.org BSD license below: | ||
11 | * | ||
12 | * Redistribution and use in source and binary forms, with or | ||
13 | * without modification, are permitted provided that the following | ||
14 | * conditions are met: | ||
15 | * | ||
16 | * - Redistributions of source code must retain the above | ||
17 | * copyright notice, this list of conditions and the following | ||
18 | * disclaimer. | ||
19 | * | ||
20 | * - Redistributions in binary form must reproduce the above | ||
21 | * copyright notice, this list of conditions and the following | ||
22 | * disclaimer in the documentation and/or other materials | ||
23 | * provided with the distribution. | ||
24 | * | ||
25 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
26 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
27 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
28 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS | ||
29 | * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN | ||
30 | * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | ||
31 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
32 | * SOFTWARE. | ||
33 | */ | ||
34 | |||
35 | #include "ipath_common.h" | ||
36 | |||
37 | struct ipath_header { | ||
38 | /* | ||
39 | * Version - 4 bits, Port - 4 bits, TID - 10 bits and Offset - | ||
40 | * 14 bits before ECO change ~28 Dec 03. After that, Vers 4, | ||
41 | * Port 3, TID 11, offset 14. | ||
42 | */ | ||
43 | __le32 ver_port_tid_offset; | ||
44 | __le16 chksum; | ||
45 | __le16 pkt_flags; | ||
46 | }; | ||
47 | |||
48 | struct ips_message_header { | ||
49 | __be16 lrh[4]; | ||
50 | __be32 bth[3]; | ||
51 | /* fields below this point are in host byte order */ | ||
52 | struct ipath_header iph; | ||
53 | __u8 sub_opcode; | ||
54 | __u8 flags; | ||
55 | __u16 src_rank; | ||
56 | /* 24 bits. The upper 8 bit is available for other use */ | ||
57 | union { | ||
58 | struct { | ||
59 | unsigned ack_seq_num:24; | ||
60 | unsigned port:4; | ||
61 | unsigned unused:4; | ||
62 | }; | ||
63 | __u32 ack_seq_num_org; | ||
64 | }; | ||
65 | __u8 expected_tid_session_id; | ||
66 | __u8 tinylen; /* to aid MPI */ | ||
67 | union { | ||
68 | __u16 tag; /* to aid MPI */ | ||
69 | __u16 mqhdr; /* for PSM MQ */ | ||
70 | }; | ||
71 | union { | ||
72 | __u32 mpi[4]; /* to aid MPI */ | ||
73 | __u32 data[4]; | ||
74 | __u64 mq[2]; /* for PSM MQ */ | ||
75 | struct { | ||
76 | __u16 mtu; | ||
77 | __u8 major_ver; | ||
78 | __u8 minor_ver; | ||
79 | __u32 not_used; //free | ||
80 | __u32 run_id; | ||
81 | __u32 client_ver; | ||
82 | }; | ||
83 | }; | ||
84 | }; | ||
85 | |||
86 | struct ether_header { | ||
87 | __be16 lrh[4]; | ||
88 | __be32 bth[3]; | ||
89 | struct ipath_header iph; | ||
90 | __u8 sub_opcode; | ||
91 | __u8 cmd; | ||
92 | __be16 lid; | ||
93 | __u16 mac[3]; | ||
94 | __u8 frag_num; | ||
95 | __u8 seq_num; | ||
96 | __le32 len; | ||
97 | /* MUST be of word size due to PIO write requirements */ | ||
98 | __le32 csum; | ||
99 | __le16 csum_offset; | ||
100 | __le16 flags; | ||
101 | __u16 first_2_bytes; | ||
102 | __u8 unused[2]; /* currently unused */ | ||
103 | }; | ||
104 | |||
105 | /* | ||
106 | * The PIO buffer used for sending infinipath messages must only be written | ||
107 | * in 32-bit words, all the data must be written, and no writes can occur | ||
108 | * after the last word is written (which transfers "ownership" of the buffer | ||
109 | * to the chip and triggers the message to be sent). | ||
110 | * Since the Linux sk_buff structure can be recursive, non-aligned, and | ||
111 | * any number of bytes in each segment, we use the following structure | ||
112 | * to keep information about the overall state of the copy operation. | ||
113 | * This is used to save the information needed to store the checksum | ||
114 | * in the right place before sending the last word to the hardware and | ||
115 | * to buffer the last 0-3 bytes of non-word sized segments. | ||
116 | */ | ||
117 | struct copy_data_s { | ||
118 | struct ether_header *hdr; | ||
119 | /* addr of PIO buf to write csum to */ | ||
120 | __u32 __iomem *csum_pio; | ||
121 | __u32 __iomem *to; /* addr of PIO buf to write data to */ | ||
122 | __u32 device; /* which device to allocate PIO bufs from */ | ||
123 | __s32 error; /* set if there is an error. */ | ||
124 | __s32 extra; /* amount of data saved in u.buf below */ | ||
125 | __u32 len; /* total length to send in bytes */ | ||
126 | __u32 flen; /* frament length in words */ | ||
127 | __u32 csum; /* partial IP checksum */ | ||
128 | __u32 pos; /* position for partial checksum */ | ||
129 | __u32 offset; /* offset to where data currently starts */ | ||
130 | __s32 checksum_calc; /* set to 1 when csum has been calculated */ | ||
131 | struct sk_buff *skb; | ||
132 | union { | ||
133 | __u32 w; | ||
134 | __u8 buf[4]; | ||
135 | } u; | ||
136 | }; | ||
137 | |||
138 | /* IB - LRH header consts */ | ||
139 | #define IPS_LRH_GRH 0x0003 /* 1. word of IB LRH - next header: GRH */ | ||
140 | #define IPS_LRH_BTH 0x0002 /* 1. word of IB LRH - next header: BTH */ | ||
141 | |||
142 | #define IPS_OFFSET 0 | ||
143 | |||
144 | /* | ||
145 | * defines the cut-off point between the header queue and eager/expected | ||
146 | * TID queue | ||
147 | */ | ||
148 | #define NUM_OF_EXTRA_WORDS_IN_HEADER_QUEUE \ | ||
149 | ((sizeof(struct ips_message_header) - \ | ||
150 | offsetof(struct ips_message_header, iph)) >> 2) | ||
151 | |||
152 | /* OpCodes */ | ||
153 | #define OPCODE_IPS 0xC0 | ||
154 | #define OPCODE_ITH4X 0xC1 | ||
155 | |||
156 | /* OpCode 30 is use by stand-alone test programs */ | ||
157 | #define OPCODE_RAW_DATA 0xDE | ||
158 | /* last OpCode (31) is reserved for test */ | ||
159 | #define OPCODE_TEST 0xDF | ||
160 | |||
161 | /* sub OpCodes - ips */ | ||
162 | #define OPCODE_SEQ_DATA 0x01 | ||
163 | #define OPCODE_SEQ_CTRL 0x02 | ||
164 | |||
165 | #define OPCODE_SEQ_MQ_DATA 0x03 | ||
166 | #define OPCODE_SEQ_MQ_CTRL 0x04 | ||
167 | |||
168 | #define OPCODE_ACK 0x10 | ||
169 | #define OPCODE_NAK 0x11 | ||
170 | |||
171 | #define OPCODE_ERR_CHK 0x20 | ||
172 | #define OPCODE_ERR_CHK_PLS 0x21 | ||
173 | |||
174 | #define OPCODE_STARTUP 0x30 | ||
175 | #define OPCODE_STARTUP_ACK 0x31 | ||
176 | #define OPCODE_STARTUP_NAK 0x32 | ||
177 | |||
178 | #define OPCODE_STARTUP_EXT 0x34 | ||
179 | #define OPCODE_STARTUP_ACK_EXT 0x35 | ||
180 | #define OPCODE_STARTUP_NAK_EXT 0x36 | ||
181 | |||
182 | #define OPCODE_TIDS_RELEASE 0x40 | ||
183 | #define OPCODE_TIDS_RELEASE_CONFIRM 0x41 | ||
184 | |||
185 | #define OPCODE_CLOSE 0x50 | ||
186 | #define OPCODE_CLOSE_ACK 0x51 | ||
187 | /* | ||
188 | * like OPCODE_CLOSE, but no complaint if other side has already closed. | ||
189 | * Used when doing abort(), MPI_Abort(), etc. | ||
190 | */ | ||
191 | #define OPCODE_ABORT 0x52 | ||
192 | |||
193 | /* sub OpCodes - ith4x */ | ||
194 | #define OPCODE_ENCAP 0x81 | ||
195 | #define OPCODE_LID_ARP 0x82 | ||
196 | |||
197 | /* Receive Header Queue: receive type (from infinipath) */ | ||
198 | #define RCVHQ_RCV_TYPE_EXPECTED 0 | ||
199 | #define RCVHQ_RCV_TYPE_EAGER 1 | ||
200 | #define RCVHQ_RCV_TYPE_NON_KD 2 | ||
201 | #define RCVHQ_RCV_TYPE_ERROR 3 | ||
202 | |||
203 | /* misc. */ | ||
204 | #define SIZE_OF_CRC 1 | ||
205 | |||
206 | #define EAGER_TID_ID INFINIPATH_I_TID_MASK | ||
207 | |||
208 | #define IPS_DEFAULT_P_KEY 0xFFFF | ||
209 | |||
210 | #define IPS_PERMISSIVE_LID 0xFFFF | ||
211 | #define IPS_MULTICAST_LID_BASE 0xC000 | ||
212 | |||
213 | #define IPS_AETH_CREDIT_SHIFT 24 | ||
214 | #define IPS_AETH_CREDIT_MASK 0x1F | ||
215 | #define IPS_AETH_CREDIT_INVAL 0x1F | ||
216 | |||
217 | #define IPS_PSN_MASK 0xFFFFFF | ||
218 | #define IPS_MSN_MASK 0xFFFFFF | ||
219 | #define IPS_QPN_MASK 0xFFFFFF | ||
220 | #define IPS_MULTICAST_QPN 0xFFFFFF | ||
221 | |||
222 | /* functions for extracting fields from rcvhdrq entries */ | ||
223 | static inline __u32 ips_get_hdr_err_flags(const __le32 * rbuf) | ||
224 | { | ||
225 | return __le32_to_cpu(rbuf[1]); | ||
226 | } | ||
227 | |||
228 | static inline __u32 ips_get_index(const __le32 * rbuf) | ||
229 | { | ||
230 | return (__le32_to_cpu(rbuf[0]) >> INFINIPATH_RHF_EGRINDEX_SHIFT) | ||
231 | & INFINIPATH_RHF_EGRINDEX_MASK; | ||
232 | } | ||
233 | |||
234 | static inline __u32 ips_get_rcv_type(const __le32 * rbuf) | ||
235 | { | ||
236 | return (__le32_to_cpu(rbuf[0]) >> INFINIPATH_RHF_RCVTYPE_SHIFT) | ||
237 | & INFINIPATH_RHF_RCVTYPE_MASK; | ||
238 | } | ||
239 | |||
240 | static inline __u32 ips_get_length_in_bytes(const __le32 * rbuf) | ||
241 | { | ||
242 | return ((__le32_to_cpu(rbuf[0]) >> INFINIPATH_RHF_LENGTH_SHIFT) | ||
243 | & INFINIPATH_RHF_LENGTH_MASK) << 2; | ||
244 | } | ||
245 | |||
246 | static inline void *ips_get_first_protocol_header(const __u32 * rbuf) | ||
247 | { | ||
248 | return (void *)&rbuf[2]; | ||
249 | } | ||
250 | |||
251 | static inline struct ips_message_header *ips_get_ips_header(const __u32 * | ||
252 | rbuf) | ||
253 | { | ||
254 | return (struct ips_message_header *)&rbuf[2]; | ||
255 | } | ||
256 | |||
257 | static inline __u32 ips_get_ipath_ver(__le32 hdrword) | ||
258 | { | ||
259 | return (__le32_to_cpu(hdrword) >> INFINIPATH_I_VERS_SHIFT) | ||
260 | & INFINIPATH_I_VERS_MASK; | ||
261 | } | ||
262 | |||
263 | #endif /* IPS_COMMON_H */ | ||
diff --git a/drivers/infiniband/hw/ipath/verbs_debug.h b/drivers/infiniband/hw/ipath/verbs_debug.h index 40d693cf3f94..6186676f2a16 100644 --- a/drivers/infiniband/hw/ipath/verbs_debug.h +++ b/drivers/infiniband/hw/ipath/verbs_debug.h | |||
@@ -1,4 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2006 QLogic, Inc. All rights reserved. | ||
2 | * Copyright (c) 2003, 2004, 2005, 2006 PathScale, Inc. All rights reserved. | 3 | * Copyright (c) 2003, 2004, 2005, 2006 PathScale, Inc. All rights reserved. |
3 | * | 4 | * |
4 | * This software is available to you under a choice of one of two | 5 | * This software is available to you under a choice of one of two |
diff --git a/drivers/infiniband/hw/mthca/mthca_eq.c b/drivers/infiniband/hw/mthca/mthca_eq.c index d536217e700e..a29b1b6d82b1 100644 --- a/drivers/infiniband/hw/mthca/mthca_eq.c +++ b/drivers/infiniband/hw/mthca/mthca_eq.c | |||
@@ -900,7 +900,7 @@ int __devinit mthca_init_eq_table(struct mthca_dev *dev) | |||
900 | mthca_is_memfree(dev) ? | 900 | mthca_is_memfree(dev) ? |
901 | mthca_arbel_interrupt : | 901 | mthca_arbel_interrupt : |
902 | mthca_tavor_interrupt, | 902 | mthca_tavor_interrupt, |
903 | SA_SHIRQ, DRV_NAME, dev); | 903 | IRQF_SHARED, DRV_NAME, dev); |
904 | if (err) | 904 | if (err) |
905 | goto err_out_cmd; | 905 | goto err_out_cmd; |
906 | dev->eq_table.have_irq = 1; | 906 | dev->eq_table.have_irq = 1; |
diff --git a/drivers/input/keyboard/corgikbd.c b/drivers/input/keyboard/corgikbd.c index 1f0e720267d7..1e03153b9bca 100644 --- a/drivers/input/keyboard/corgikbd.c +++ b/drivers/input/keyboard/corgikbd.c | |||
@@ -352,7 +352,7 @@ static int __init corgikbd_probe(struct platform_device *pdev) | |||
352 | for (i = 0; i < CORGI_KEY_SENSE_NUM; i++) { | 352 | for (i = 0; i < CORGI_KEY_SENSE_NUM; i++) { |
353 | pxa_gpio_mode(CORGI_GPIO_KEY_SENSE(i) | GPIO_IN); | 353 | pxa_gpio_mode(CORGI_GPIO_KEY_SENSE(i) | GPIO_IN); |
354 | if (request_irq(CORGI_IRQ_GPIO_KEY_SENSE(i), corgikbd_interrupt, | 354 | if (request_irq(CORGI_IRQ_GPIO_KEY_SENSE(i), corgikbd_interrupt, |
355 | SA_INTERRUPT | SA_TRIGGER_RISING, | 355 | IRQF_DISABLED | IRQF_TRIGGER_RISING, |
356 | "corgikbd", corgikbd)) | 356 | "corgikbd", corgikbd)) |
357 | printk(KERN_WARNING "corgikbd: Can't get IRQ: %d!\n", i); | 357 | printk(KERN_WARNING "corgikbd: Can't get IRQ: %d!\n", i); |
358 | } | 358 | } |
diff --git a/drivers/input/keyboard/spitzkbd.c b/drivers/input/keyboard/spitzkbd.c index c5d03fb77bcb..e385710233f4 100644 --- a/drivers/input/keyboard/spitzkbd.c +++ b/drivers/input/keyboard/spitzkbd.c | |||
@@ -410,7 +410,7 @@ static int __init spitzkbd_probe(struct platform_device *dev) | |||
410 | for (i = 0; i < SPITZ_KEY_SENSE_NUM; i++) { | 410 | for (i = 0; i < SPITZ_KEY_SENSE_NUM; i++) { |
411 | pxa_gpio_mode(spitz_senses[i] | GPIO_IN); | 411 | pxa_gpio_mode(spitz_senses[i] | GPIO_IN); |
412 | if (request_irq(IRQ_GPIO(spitz_senses[i]), spitzkbd_interrupt, | 412 | if (request_irq(IRQ_GPIO(spitz_senses[i]), spitzkbd_interrupt, |
413 | SA_INTERRUPT|SA_TRIGGER_RISING, | 413 | IRQF_DISABLED|IRQF_TRIGGER_RISING, |
414 | "Spitzkbd Sense", spitzkbd)) | 414 | "Spitzkbd Sense", spitzkbd)) |
415 | printk(KERN_WARNING "spitzkbd: Can't get Sense IRQ: %d!\n", i); | 415 | printk(KERN_WARNING "spitzkbd: Can't get Sense IRQ: %d!\n", i); |
416 | } | 416 | } |
@@ -425,19 +425,19 @@ static int __init spitzkbd_probe(struct platform_device *dev) | |||
425 | pxa_gpio_mode(SPITZ_GPIO_SWB | GPIO_IN); | 425 | pxa_gpio_mode(SPITZ_GPIO_SWB | GPIO_IN); |
426 | 426 | ||
427 | request_irq(SPITZ_IRQ_GPIO_SYNC, spitzkbd_interrupt, | 427 | request_irq(SPITZ_IRQ_GPIO_SYNC, spitzkbd_interrupt, |
428 | SA_INTERRUPT | SA_TRIGGER_RISING | SA_TRIGGER_FALLING, | 428 | IRQF_DISABLED | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING, |
429 | "Spitzkbd Sync", spitzkbd); | 429 | "Spitzkbd Sync", spitzkbd); |
430 | request_irq(SPITZ_IRQ_GPIO_ON_KEY, spitzkbd_interrupt, | 430 | request_irq(SPITZ_IRQ_GPIO_ON_KEY, spitzkbd_interrupt, |
431 | SA_INTERRUPT | SA_TRIGGER_RISING | SA_TRIGGER_FALLING, | 431 | IRQF_DISABLED | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING, |
432 | "Spitzkbd PwrOn", spitzkbd); | 432 | "Spitzkbd PwrOn", spitzkbd); |
433 | request_irq(SPITZ_IRQ_GPIO_SWA, spitzkbd_hinge_isr, | 433 | request_irq(SPITZ_IRQ_GPIO_SWA, spitzkbd_hinge_isr, |
434 | SA_INTERRUPT | SA_TRIGGER_RISING | SA_TRIGGER_FALLING, | 434 | IRQF_DISABLED | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING, |
435 | "Spitzkbd SWA", spitzkbd); | 435 | "Spitzkbd SWA", spitzkbd); |
436 | request_irq(SPITZ_IRQ_GPIO_SWB, spitzkbd_hinge_isr, | 436 | request_irq(SPITZ_IRQ_GPIO_SWB, spitzkbd_hinge_isr, |
437 | SA_INTERRUPT | SA_TRIGGER_RISING | SA_TRIGGER_FALLING, | 437 | IRQF_DISABLED | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING, |
438 | "Spitzkbd SWB", spitzkbd); | 438 | "Spitzkbd SWB", spitzkbd); |
439 | request_irq(SPITZ_IRQ_GPIO_AK_INT, spitzkbd_hinge_isr, | 439 | request_irq(SPITZ_IRQ_GPIO_AK_INT, spitzkbd_hinge_isr, |
440 | SA_INTERRUPT | SA_TRIGGER_RISING | SA_TRIGGER_FALLING, | 440 | IRQF_DISABLED | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING, |
441 | "Spitzkbd HP", spitzkbd); | 441 | "Spitzkbd HP", spitzkbd); |
442 | 442 | ||
443 | printk(KERN_INFO "input: Spitz Keyboard Registered\n"); | 443 | printk(KERN_INFO "input: Spitz Keyboard Registered\n"); |
diff --git a/drivers/input/misc/ixp4xx-beeper.c b/drivers/input/misc/ixp4xx-beeper.c index 3a6ae85cd69c..805b636e73d9 100644 --- a/drivers/input/misc/ixp4xx-beeper.c +++ b/drivers/input/misc/ixp4xx-beeper.c | |||
@@ -113,7 +113,7 @@ static int __devinit ixp4xx_spkr_probe(struct platform_device *dev) | |||
113 | input_dev->event = ixp4xx_spkr_event; | 113 | input_dev->event = ixp4xx_spkr_event; |
114 | 114 | ||
115 | err = request_irq(IRQ_IXP4XX_TIMER2, &ixp4xx_spkr_interrupt, | 115 | err = request_irq(IRQ_IXP4XX_TIMER2, &ixp4xx_spkr_interrupt, |
116 | SA_INTERRUPT | SA_TIMER, "ixp4xx-beeper", (void *) dev->id); | 116 | IRQF_DISABLED | IRQF_TIMER, "ixp4xx-beeper", (void *) dev->id); |
117 | if (err) | 117 | if (err) |
118 | goto err_free_device; | 118 | goto err_free_device; |
119 | 119 | ||
diff --git a/drivers/input/mouse/rpcmouse.c b/drivers/input/mouse/rpcmouse.c index 09b6ffdb7582..872b30bf7aad 100644 --- a/drivers/input/mouse/rpcmouse.c +++ b/drivers/input/mouse/rpcmouse.c | |||
@@ -85,7 +85,7 @@ static int __init rpcmouse_init(void) | |||
85 | rpcmouse_lastx = (short) iomd_readl(IOMD_MOUSEX); | 85 | rpcmouse_lastx = (short) iomd_readl(IOMD_MOUSEX); |
86 | rpcmouse_lasty = (short) iomd_readl(IOMD_MOUSEY); | 86 | rpcmouse_lasty = (short) iomd_readl(IOMD_MOUSEY); |
87 | 87 | ||
88 | if (request_irq(IRQ_VSYNCPULSE, rpcmouse_irq, SA_SHIRQ, "rpcmouse", rpcmouse_dev)) { | 88 | if (request_irq(IRQ_VSYNCPULSE, rpcmouse_irq, IRQF_SHARED, "rpcmouse", rpcmouse_dev)) { |
89 | printk(KERN_ERR "rpcmouse: unable to allocate VSYNC interrupt\n"); | 89 | printk(KERN_ERR "rpcmouse: unable to allocate VSYNC interrupt\n"); |
90 | input_free_device(rpcmouse_dev); | 90 | input_free_device(rpcmouse_dev); |
91 | return -EBUSY; | 91 | return -EBUSY; |
diff --git a/drivers/input/serio/gscps2.c b/drivers/input/serio/gscps2.c index 22d02d53eb16..cde036a92168 100644 --- a/drivers/input/serio/gscps2.c +++ b/drivers/input/serio/gscps2.c | |||
@@ -370,7 +370,7 @@ static int __init gscps2_probe(struct parisc_device *dev) | |||
370 | serio->dev.parent = &dev->dev; | 370 | serio->dev.parent = &dev->dev; |
371 | 371 | ||
372 | ret = -EBUSY; | 372 | ret = -EBUSY; |
373 | if (request_irq(dev->irq, gscps2_interrupt, SA_SHIRQ, ps2port->port->name, ps2port)) | 373 | if (request_irq(dev->irq, gscps2_interrupt, IRQF_SHARED, ps2port->port->name, ps2port)) |
374 | goto fail_miserably; | 374 | goto fail_miserably; |
375 | 375 | ||
376 | if (ps2port->id != GSC_ID_KEYBOARD && ps2port->id != GSC_ID_MOUSE) { | 376 | if (ps2port->id != GSC_ID_KEYBOARD && ps2port->id != GSC_ID_MOUSE) { |
diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c index 7fa4bc222583..06a3f25657dd 100644 --- a/drivers/input/serio/i8042.c +++ b/drivers/input/serio/i8042.c | |||
@@ -328,7 +328,7 @@ static int i8042_open(struct serio *serio) | |||
328 | return 0; | 328 | return 0; |
329 | 329 | ||
330 | if (request_irq(port->irq, i8042_interrupt, | 330 | if (request_irq(port->irq, i8042_interrupt, |
331 | SA_SHIRQ, "i8042", i8042_request_irq_cookie)) { | 331 | IRQF_SHARED, "i8042", i8042_request_irq_cookie)) { |
332 | printk(KERN_ERR "i8042.c: Can't get irq %d for %s, unregistering the port.\n", port->irq, port->name); | 332 | printk(KERN_ERR "i8042.c: Can't get irq %d for %s, unregistering the port.\n", port->irq, port->name); |
333 | goto irq_fail; | 333 | goto irq_fail; |
334 | } | 334 | } |
@@ -610,7 +610,7 @@ static int __devinit i8042_check_aux(void) | |||
610 | */ | 610 | */ |
611 | 611 | ||
612 | if (request_irq(i8042_ports[I8042_AUX_PORT_NO].irq, i8042_interrupt, | 612 | if (request_irq(i8042_ports[I8042_AUX_PORT_NO].irq, i8042_interrupt, |
613 | SA_SHIRQ, "i8042", &i8042_check_aux_cookie)) | 613 | IRQF_SHARED, "i8042", &i8042_check_aux_cookie)) |
614 | return -1; | 614 | return -1; |
615 | free_irq(i8042_ports[I8042_AUX_PORT_NO].irq, &i8042_check_aux_cookie); | 615 | free_irq(i8042_ports[I8042_AUX_PORT_NO].irq, &i8042_check_aux_cookie); |
616 | 616 | ||
diff --git a/drivers/input/serio/pcips2.c b/drivers/input/serio/pcips2.c index 1e139c5e59de..fb727c665253 100644 --- a/drivers/input/serio/pcips2.c +++ b/drivers/input/serio/pcips2.c | |||
@@ -107,7 +107,7 @@ static int pcips2_open(struct serio *io) | |||
107 | outb(PS2_CTRL_ENABLE, ps2if->base); | 107 | outb(PS2_CTRL_ENABLE, ps2if->base); |
108 | pcips2_flush_input(ps2if); | 108 | pcips2_flush_input(ps2if); |
109 | 109 | ||
110 | ret = request_irq(ps2if->dev->irq, pcips2_interrupt, SA_SHIRQ, | 110 | ret = request_irq(ps2if->dev->irq, pcips2_interrupt, IRQF_SHARED, |
111 | "pcips2", ps2if); | 111 | "pcips2", ps2if); |
112 | if (ret == 0) | 112 | if (ret == 0) |
113 | val = PS2_CTRL_ENABLE | PS2_CTRL_RXIRQ; | 113 | val = PS2_CTRL_ENABLE | PS2_CTRL_RXIRQ; |
diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c index 386023c594d7..66e411badf70 100644 --- a/drivers/input/touchscreen/ads7846.c +++ b/drivers/input/touchscreen/ads7846.c | |||
@@ -773,7 +773,7 @@ static int __devinit ads7846_probe(struct spi_device *spi) | |||
773 | 773 | ||
774 | ts->last_msg = m; | 774 | ts->last_msg = m; |
775 | 775 | ||
776 | if (request_irq(spi->irq, ads7846_irq, SA_TRIGGER_FALLING, | 776 | if (request_irq(spi->irq, ads7846_irq, IRQF_TRIGGER_FALLING, |
777 | spi->dev.driver->name, ts)) { | 777 | spi->dev.driver->name, ts)) { |
778 | dev_dbg(&spi->dev, "irq %d busy?\n", spi->irq); | 778 | dev_dbg(&spi->dev, "irq %d busy?\n", spi->irq); |
779 | err = -EBUSY; | 779 | err = -EBUSY; |
diff --git a/drivers/input/touchscreen/corgi_ts.c b/drivers/input/touchscreen/corgi_ts.c index b3eaf23b17c8..9b66271d3ba8 100644 --- a/drivers/input/touchscreen/corgi_ts.c +++ b/drivers/input/touchscreen/corgi_ts.c | |||
@@ -318,7 +318,7 @@ static int __init corgits_probe(struct platform_device *pdev) | |||
318 | corgi_ssp_ads7846_putget((5u << ADSCTRL_ADR_SH) | ADSCTRL_STS); | 318 | corgi_ssp_ads7846_putget((5u << ADSCTRL_ADR_SH) | ADSCTRL_STS); |
319 | mdelay(5); | 319 | mdelay(5); |
320 | 320 | ||
321 | if (request_irq(corgi_ts->irq_gpio, ts_interrupt, SA_INTERRUPT, "ts", corgi_ts)) { | 321 | if (request_irq(corgi_ts->irq_gpio, ts_interrupt, IRQF_DISABLED, "ts", corgi_ts)) { |
322 | err = -EBUSY; | 322 | err = -EBUSY; |
323 | goto fail; | 323 | goto fail; |
324 | } | 324 | } |
diff --git a/drivers/input/touchscreen/h3600_ts_input.c b/drivers/input/touchscreen/h3600_ts_input.c index 2de2139f2fed..e2b910018773 100644 --- a/drivers/input/touchscreen/h3600_ts_input.c +++ b/drivers/input/touchscreen/h3600_ts_input.c | |||
@@ -399,14 +399,14 @@ static int h3600ts_connect(struct serio *serio, struct serio_driver *drv) | |||
399 | set_GPIO_IRQ_edge(GPIO_BITSY_NPOWER_BUTTON, GPIO_RISING_EDGE); | 399 | set_GPIO_IRQ_edge(GPIO_BITSY_NPOWER_BUTTON, GPIO_RISING_EDGE); |
400 | 400 | ||
401 | if (request_irq(IRQ_GPIO_BITSY_ACTION_BUTTON, action_button_handler, | 401 | if (request_irq(IRQ_GPIO_BITSY_ACTION_BUTTON, action_button_handler, |
402 | SA_SHIRQ | SA_INTERRUPT, "h3600_action", &ts->dev)) { | 402 | IRQF_SHARED | IRQF_DISABLED, "h3600_action", &ts->dev)) { |
403 | printk(KERN_ERR "h3600ts.c: Could not allocate Action Button IRQ!\n"); | 403 | printk(KERN_ERR "h3600ts.c: Could not allocate Action Button IRQ!\n"); |
404 | err = -EBUSY; | 404 | err = -EBUSY; |
405 | goto fail2; | 405 | goto fail2; |
406 | } | 406 | } |
407 | 407 | ||
408 | if (request_irq(IRQ_GPIO_BITSY_NPOWER_BUTTON, npower_button_handler, | 408 | if (request_irq(IRQ_GPIO_BITSY_NPOWER_BUTTON, npower_button_handler, |
409 | SA_SHIRQ | SA_INTERRUPT, "h3600_suspend", &ts->dev)) { | 409 | IRQF_SHARED | IRQF_DISABLED, "h3600_suspend", &ts->dev)) { |
410 | printk(KERN_ERR "h3600ts.c: Could not allocate Power Button IRQ!\n"); | 410 | printk(KERN_ERR "h3600ts.c: Could not allocate Power Button IRQ!\n"); |
411 | err = -EBUSY; | 411 | err = -EBUSY; |
412 | goto fail3; | 412 | goto fail3; |
diff --git a/drivers/input/touchscreen/hp680_ts_input.c b/drivers/input/touchscreen/hp680_ts_input.c index 957dd5a1b15e..fa97e0f79e7e 100644 --- a/drivers/input/touchscreen/hp680_ts_input.c +++ b/drivers/input/touchscreen/hp680_ts_input.c | |||
@@ -109,7 +109,7 @@ static int __init hp680_ts_init(void) | |||
109 | input_register_device(hp680_ts_dev); | 109 | input_register_device(hp680_ts_dev); |
110 | 110 | ||
111 | if (request_irq(HP680_TS_IRQ, hp680_ts_interrupt, | 111 | if (request_irq(HP680_TS_IRQ, hp680_ts_interrupt, |
112 | SA_INTERRUPT, MODNAME, 0) < 0) { | 112 | IRQF_DISABLED, MODNAME, 0) < 0) { |
113 | printk(KERN_ERR "hp680_touchscreen.c: Can't allocate irq %d\n", | 113 | printk(KERN_ERR "hp680_touchscreen.c: Can't allocate irq %d\n", |
114 | HP680_TS_IRQ); | 114 | HP680_TS_IRQ); |
115 | input_unregister_device(hp680_ts_dev); | 115 | input_unregister_device(hp680_ts_dev); |
diff --git a/drivers/isdn/hardware/avm/b1pci.c b/drivers/isdn/hardware/avm/b1pci.c index 7edf19b32299..90e2e6643d19 100644 --- a/drivers/isdn/hardware/avm/b1pci.c +++ b/drivers/isdn/hardware/avm/b1pci.c | |||
@@ -97,7 +97,7 @@ static int b1pci_probe(struct capicardparams *p, struct pci_dev *pdev) | |||
97 | b1_reset(card->port); | 97 | b1_reset(card->port); |
98 | b1_getrevision(card); | 98 | b1_getrevision(card); |
99 | 99 | ||
100 | retval = request_irq(card->irq, b1_interrupt, SA_SHIRQ, card->name, card); | 100 | retval = request_irq(card->irq, b1_interrupt, IRQF_SHARED, card->name, card); |
101 | if (retval) { | 101 | if (retval) { |
102 | printk(KERN_ERR "b1pci: unable to get IRQ %d.\n", card->irq); | 102 | printk(KERN_ERR "b1pci: unable to get IRQ %d.\n", card->irq); |
103 | retval = -EBUSY; | 103 | retval = -EBUSY; |
@@ -234,7 +234,7 @@ static int b1pciv4_probe(struct capicardparams *p, struct pci_dev *pdev) | |||
234 | b1dma_reset(card); | 234 | b1dma_reset(card); |
235 | b1_getrevision(card); | 235 | b1_getrevision(card); |
236 | 236 | ||
237 | retval = request_irq(card->irq, b1dma_interrupt, SA_SHIRQ, card->name, card); | 237 | retval = request_irq(card->irq, b1dma_interrupt, IRQF_SHARED, card->name, card); |
238 | if (retval) { | 238 | if (retval) { |
239 | printk(KERN_ERR "b1pci: unable to get IRQ %d.\n", | 239 | printk(KERN_ERR "b1pci: unable to get IRQ %d.\n", |
240 | card->irq); | 240 | card->irq); |
diff --git a/drivers/isdn/hardware/avm/b1pcmcia.c b/drivers/isdn/hardware/avm/b1pcmcia.c index ad5025155b4e..e479c0aef38d 100644 --- a/drivers/isdn/hardware/avm/b1pcmcia.c +++ b/drivers/isdn/hardware/avm/b1pcmcia.c | |||
@@ -82,7 +82,7 @@ static int b1pcmcia_add_card(unsigned int port, unsigned irq, | |||
82 | card->irq = irq; | 82 | card->irq = irq; |
83 | card->cardtype = cardtype; | 83 | card->cardtype = cardtype; |
84 | 84 | ||
85 | retval = request_irq(card->irq, b1_interrupt, SA_SHIRQ, card->name, card); | 85 | retval = request_irq(card->irq, b1_interrupt, IRQF_SHARED, card->name, card); |
86 | if (retval) { | 86 | if (retval) { |
87 | printk(KERN_ERR "b1pcmcia: unable to get IRQ %d.\n", | 87 | printk(KERN_ERR "b1pcmcia: unable to get IRQ %d.\n", |
88 | card->irq); | 88 | card->irq); |
diff --git a/drivers/isdn/hardware/avm/c4.c b/drivers/isdn/hardware/avm/c4.c index e7924a545d49..6c3d5f5f1f4b 100644 --- a/drivers/isdn/hardware/avm/c4.c +++ b/drivers/isdn/hardware/avm/c4.c | |||
@@ -1172,7 +1172,7 @@ static int c4_add_card(struct capicardparams *p, struct pci_dev *dev, | |||
1172 | } | 1172 | } |
1173 | c4_reset(card); | 1173 | c4_reset(card); |
1174 | 1174 | ||
1175 | retval = request_irq(card->irq, c4_interrupt, SA_SHIRQ, card->name, card); | 1175 | retval = request_irq(card->irq, c4_interrupt, IRQF_SHARED, card->name, card); |
1176 | if (retval) { | 1176 | if (retval) { |
1177 | printk(KERN_ERR "c4: unable to get IRQ %d.\n",card->irq); | 1177 | printk(KERN_ERR "c4: unable to get IRQ %d.\n",card->irq); |
1178 | retval = -EBUSY; | 1178 | retval = -EBUSY; |
diff --git a/drivers/isdn/hardware/avm/t1pci.c b/drivers/isdn/hardware/avm/t1pci.c index af85511600d0..d1e253c94db4 100644 --- a/drivers/isdn/hardware/avm/t1pci.c +++ b/drivers/isdn/hardware/avm/t1pci.c | |||
@@ -103,7 +103,7 @@ static int t1pci_add_card(struct capicardparams *p, struct pci_dev *pdev) | |||
103 | } | 103 | } |
104 | b1dma_reset(card); | 104 | b1dma_reset(card); |
105 | 105 | ||
106 | retval = request_irq(card->irq, b1dma_interrupt, SA_SHIRQ, card->name, card); | 106 | retval = request_irq(card->irq, b1dma_interrupt, IRQF_SHARED, card->name, card); |
107 | if (retval) { | 107 | if (retval) { |
108 | printk(KERN_ERR "t1pci: unable to get IRQ %d.\n", card->irq); | 108 | printk(KERN_ERR "t1pci: unable to get IRQ %d.\n", card->irq); |
109 | retval = -EBUSY; | 109 | retval = -EBUSY; |
diff --git a/drivers/isdn/hardware/eicon/divasmain.c b/drivers/isdn/hardware/eicon/divasmain.c index b05e35f7ccb1..b7dadba13e82 100644 --- a/drivers/isdn/hardware/eicon/divasmain.c +++ b/drivers/isdn/hardware/eicon/divasmain.c | |||
@@ -486,7 +486,7 @@ void __inline__ outpp(void __iomem *addr, word p) | |||
486 | int diva_os_register_irq(void *context, byte irq, const char *name) | 486 | int diva_os_register_irq(void *context, byte irq, const char *name) |
487 | { | 487 | { |
488 | int result = request_irq(irq, diva_os_irq_wrapper, | 488 | int result = request_irq(irq, diva_os_irq_wrapper, |
489 | SA_INTERRUPT | SA_SHIRQ, name, context); | 489 | IRQF_DISABLED | IRQF_SHARED, name, context); |
490 | return (result); | 490 | return (result); |
491 | } | 491 | } |
492 | 492 | ||
diff --git a/drivers/isdn/hisax/avm_a1p.c b/drivers/isdn/hisax/avm_a1p.c index d643bb32ad09..574e252dfa43 100644 --- a/drivers/isdn/hisax/avm_a1p.c +++ b/drivers/isdn/hisax/avm_a1p.c | |||
@@ -255,7 +255,7 @@ setup_avm_a1_pcmcia(struct IsdnCard *card) | |||
255 | cs->BC_Write_Reg = &WriteHSCX; | 255 | cs->BC_Write_Reg = &WriteHSCX; |
256 | cs->BC_Send_Data = &hscx_fill_fifo; | 256 | cs->BC_Send_Data = &hscx_fill_fifo; |
257 | cs->cardmsg = &AVM_card_msg; | 257 | cs->cardmsg = &AVM_card_msg; |
258 | cs->irq_flags = SA_SHIRQ; | 258 | cs->irq_flags = IRQF_SHARED; |
259 | cs->irq_func = &avm_a1p_interrupt; | 259 | cs->irq_func = &avm_a1p_interrupt; |
260 | 260 | ||
261 | ISACVersion(cs, "AVM A1 PCMCIA:"); | 261 | ISACVersion(cs, "AVM A1 PCMCIA:"); |
diff --git a/drivers/isdn/hisax/avm_pci.c b/drivers/isdn/hisax/avm_pci.c index 93f3a5343a74..04f5917bf5a1 100644 --- a/drivers/isdn/hisax/avm_pci.c +++ b/drivers/isdn/hisax/avm_pci.c | |||
@@ -808,7 +808,7 @@ setup_avm_pcipnp(struct IsdnCard *card) | |||
808 | printk(KERN_WARNING "FritzPCI: No PCI card found\n"); | 808 | printk(KERN_WARNING "FritzPCI: No PCI card found\n"); |
809 | return(0); | 809 | return(0); |
810 | } | 810 | } |
811 | cs->irq_flags |= SA_SHIRQ; | 811 | cs->irq_flags |= IRQF_SHARED; |
812 | #else | 812 | #else |
813 | printk(KERN_WARNING "FritzPCI: NO_PCI_BIOS\n"); | 813 | printk(KERN_WARNING "FritzPCI: NO_PCI_BIOS\n"); |
814 | return (0); | 814 | return (0); |
diff --git a/drivers/isdn/hisax/bkm_a4t.c b/drivers/isdn/hisax/bkm_a4t.c index de28cb54817d..3cf1f2421789 100644 --- a/drivers/isdn/hisax/bkm_a4t.c +++ b/drivers/isdn/hisax/bkm_a4t.c | |||
@@ -335,7 +335,7 @@ setup_bkm_a4t(struct IsdnCard *card) | |||
335 | cs->BC_Send_Data = &jade_fill_fifo; | 335 | cs->BC_Send_Data = &jade_fill_fifo; |
336 | cs->cardmsg = &BKM_card_msg; | 336 | cs->cardmsg = &BKM_card_msg; |
337 | cs->irq_func = &bkm_interrupt; | 337 | cs->irq_func = &bkm_interrupt; |
338 | cs->irq_flags |= SA_SHIRQ; | 338 | cs->irq_flags |= IRQF_SHARED; |
339 | ISACVersion(cs, "Telekom A4T:"); | 339 | ISACVersion(cs, "Telekom A4T:"); |
340 | /* Jade version */ | 340 | /* Jade version */ |
341 | JadeVersion(cs, "Telekom A4T:"); | 341 | JadeVersion(cs, "Telekom A4T:"); |
diff --git a/drivers/isdn/hisax/bkm_a8.c b/drivers/isdn/hisax/bkm_a8.c index 9d1abfb93dde..15681f3e73b8 100644 --- a/drivers/isdn/hisax/bkm_a8.c +++ b/drivers/isdn/hisax/bkm_a8.c | |||
@@ -374,7 +374,7 @@ setup_sct_quadro(struct IsdnCard *card) | |||
374 | pci_ioaddr5 &= PCI_BASE_ADDRESS_IO_MASK; | 374 | pci_ioaddr5 &= PCI_BASE_ADDRESS_IO_MASK; |
375 | /* Take over */ | 375 | /* Take over */ |
376 | cs->irq = pci_irq; | 376 | cs->irq = pci_irq; |
377 | cs->irq_flags |= SA_SHIRQ; | 377 | cs->irq_flags |= IRQF_SHARED; |
378 | /* pci_ioaddr1 is unique to all subdevices */ | 378 | /* pci_ioaddr1 is unique to all subdevices */ |
379 | /* pci_ioaddr2 is for the fourth subdevice only */ | 379 | /* pci_ioaddr2 is for the fourth subdevice only */ |
380 | /* pci_ioaddr3 is for the third subdevice only */ | 380 | /* pci_ioaddr3 is for the third subdevice only */ |
diff --git a/drivers/isdn/hisax/diva.c b/drivers/isdn/hisax/diva.c index fbb9d02e3e29..323a02ef3844 100644 --- a/drivers/isdn/hisax/diva.c +++ b/drivers/isdn/hisax/diva.c | |||
@@ -1076,7 +1076,7 @@ setup_diva(struct IsdnCard *card) | |||
1076 | printk(KERN_WARNING "Diva: No IO-Adr for PCI card found\n"); | 1076 | printk(KERN_WARNING "Diva: No IO-Adr for PCI card found\n"); |
1077 | return(0); | 1077 | return(0); |
1078 | } | 1078 | } |
1079 | cs->irq_flags |= SA_SHIRQ; | 1079 | cs->irq_flags |= IRQF_SHARED; |
1080 | #else | 1080 | #else |
1081 | printk(KERN_WARNING "Diva: cfgreg 0 and NO_PCI_BIOS\n"); | 1081 | printk(KERN_WARNING "Diva: cfgreg 0 and NO_PCI_BIOS\n"); |
1082 | printk(KERN_WARNING "Diva: unable to config DIVA PCI\n"); | 1082 | printk(KERN_WARNING "Diva: unable to config DIVA PCI\n"); |
diff --git a/drivers/isdn/hisax/elsa.c b/drivers/isdn/hisax/elsa.c index 7a5cdb1dee1e..3b3e318f6076 100644 --- a/drivers/isdn/hisax/elsa.c +++ b/drivers/isdn/hisax/elsa.c | |||
@@ -85,8 +85,8 @@ static const char *ITACVer[] = | |||
85 | *** ***/ | 85 | *** ***/ |
86 | 86 | ||
87 | /* Config-Register (Read) */ | 87 | /* Config-Register (Read) */ |
88 | #define ELSA_TIMER_RUN 0x02 /* Bit 1 des Config-Reg */ | 88 | #define ELIRQF_TIMER_RUN 0x02 /* Bit 1 des Config-Reg */ |
89 | #define ELSA_TIMER_RUN_PCC8 0x01 /* Bit 0 des Config-Reg bei PCC */ | 89 | #define ELIRQF_TIMER_RUN_PCC8 0x01 /* Bit 0 des Config-Reg bei PCC */ |
90 | #define ELSA_IRQ_IDX 0x38 /* Bit 3,4,5 des Config-Reg */ | 90 | #define ELSA_IRQ_IDX 0x38 /* Bit 3,4,5 des Config-Reg */ |
91 | #define ELSA_IRQ_IDX_PCC8 0x30 /* Bit 4,5 des Config-Reg */ | 91 | #define ELSA_IRQ_IDX_PCC8 0x30 /* Bit 4,5 des Config-Reg */ |
92 | #define ELSA_IRQ_IDX_PC 0x0c /* Bit 2,3 des Config-Reg */ | 92 | #define ELSA_IRQ_IDX_PC 0x0c /* Bit 2,3 des Config-Reg */ |
@@ -102,7 +102,7 @@ static const char *ITACVer[] = | |||
102 | #define ELSA_S0_POWER_BAD 0x08 /* Bit 3 S0-Bus Spannung fehlt */ | 102 | #define ELSA_S0_POWER_BAD 0x08 /* Bit 3 S0-Bus Spannung fehlt */ |
103 | 103 | ||
104 | /* Status Flags */ | 104 | /* Status Flags */ |
105 | #define ELSA_TIMER_AKTIV 1 | 105 | #define ELIRQF_TIMER_AKTIV 1 |
106 | #define ELSA_BAD_PWR 2 | 106 | #define ELSA_BAD_PWR 2 |
107 | #define ELSA_ASSIGN 4 | 107 | #define ELSA_ASSIGN 4 |
108 | 108 | ||
@@ -259,10 +259,10 @@ TimerRun(struct IsdnCardState *cs) | |||
259 | 259 | ||
260 | v = bytein(cs->hw.elsa.cfg); | 260 | v = bytein(cs->hw.elsa.cfg); |
261 | if ((cs->subtyp == ELSA_QS1000) || (cs->subtyp == ELSA_QS3000)) | 261 | if ((cs->subtyp == ELSA_QS1000) || (cs->subtyp == ELSA_QS3000)) |
262 | return (0 == (v & ELSA_TIMER_RUN)); | 262 | return (0 == (v & ELIRQF_TIMER_RUN)); |
263 | else if (cs->subtyp == ELSA_PCC8) | 263 | else if (cs->subtyp == ELSA_PCC8) |
264 | return (v & ELSA_TIMER_RUN_PCC8); | 264 | return (v & ELIRQF_TIMER_RUN_PCC8); |
265 | return (v & ELSA_TIMER_RUN); | 265 | return (v & ELIRQF_TIMER_RUN); |
266 | } | 266 | } |
267 | /* | 267 | /* |
268 | * fast interrupt HSCX stuff goes here | 268 | * fast interrupt HSCX stuff goes here |
@@ -334,7 +334,7 @@ elsa_interrupt(int intno, void *dev_id, struct pt_regs *regs) | |||
334 | writereg(cs->hw.elsa.ale, cs->hw.elsa.hscx, HSCX_MASK, 0xFF); | 334 | writereg(cs->hw.elsa.ale, cs->hw.elsa.hscx, HSCX_MASK, 0xFF); |
335 | writereg(cs->hw.elsa.ale, cs->hw.elsa.hscx, HSCX_MASK + 0x40, 0xFF); | 335 | writereg(cs->hw.elsa.ale, cs->hw.elsa.hscx, HSCX_MASK + 0x40, 0xFF); |
336 | writereg(cs->hw.elsa.ale, cs->hw.elsa.isac, ISAC_MASK, 0xFF); | 336 | writereg(cs->hw.elsa.ale, cs->hw.elsa.isac, ISAC_MASK, 0xFF); |
337 | if (cs->hw.elsa.status & ELSA_TIMER_AKTIV) { | 337 | if (cs->hw.elsa.status & ELIRQF_TIMER_AKTIV) { |
338 | if (!TimerRun(cs)) { | 338 | if (!TimerRun(cs)) { |
339 | /* Timer Restart */ | 339 | /* Timer Restart */ |
340 | byteout(cs->hw.elsa.timer, 0); | 340 | byteout(cs->hw.elsa.timer, 0); |
@@ -685,7 +685,7 @@ Elsa_card_msg(struct IsdnCardState *cs, int mt, void *arg) | |||
685 | spin_lock_irqsave(&cs->lock, flags); | 685 | spin_lock_irqsave(&cs->lock, flags); |
686 | cs->hw.elsa.counter = 0; | 686 | cs->hw.elsa.counter = 0; |
687 | cs->hw.elsa.ctrl_reg |= ELSA_ENA_TIMER_INT; | 687 | cs->hw.elsa.ctrl_reg |= ELSA_ENA_TIMER_INT; |
688 | cs->hw.elsa.status |= ELSA_TIMER_AKTIV; | 688 | cs->hw.elsa.status |= ELIRQF_TIMER_AKTIV; |
689 | byteout(cs->hw.elsa.ctrl, cs->hw.elsa.ctrl_reg); | 689 | byteout(cs->hw.elsa.ctrl, cs->hw.elsa.ctrl_reg); |
690 | byteout(cs->hw.elsa.timer, 0); | 690 | byteout(cs->hw.elsa.timer, 0); |
691 | spin_unlock_irqrestore(&cs->lock, flags); | 691 | spin_unlock_irqrestore(&cs->lock, flags); |
@@ -693,7 +693,7 @@ Elsa_card_msg(struct IsdnCardState *cs, int mt, void *arg) | |||
693 | spin_lock_irqsave(&cs->lock, flags); | 693 | spin_lock_irqsave(&cs->lock, flags); |
694 | cs->hw.elsa.ctrl_reg &= ~ELSA_ENA_TIMER_INT; | 694 | cs->hw.elsa.ctrl_reg &= ~ELSA_ENA_TIMER_INT; |
695 | byteout(cs->hw.elsa.ctrl, cs->hw.elsa.ctrl_reg); | 695 | byteout(cs->hw.elsa.ctrl, cs->hw.elsa.ctrl_reg); |
696 | cs->hw.elsa.status &= ~ELSA_TIMER_AKTIV; | 696 | cs->hw.elsa.status &= ~ELIRQF_TIMER_AKTIV; |
697 | spin_unlock_irqrestore(&cs->lock, flags); | 697 | spin_unlock_irqrestore(&cs->lock, flags); |
698 | printk(KERN_INFO "Elsa: %d timer tics in 110 msek\n", | 698 | printk(KERN_INFO "Elsa: %d timer tics in 110 msek\n", |
699 | cs->hw.elsa.counter); | 699 | cs->hw.elsa.counter); |
@@ -1012,7 +1012,7 @@ setup_elsa(struct IsdnCard *card) | |||
1012 | cs->hw.elsa.timer = 0; | 1012 | cs->hw.elsa.timer = 0; |
1013 | cs->hw.elsa.trig = 0; | 1013 | cs->hw.elsa.trig = 0; |
1014 | cs->hw.elsa.ctrl = 0; | 1014 | cs->hw.elsa.ctrl = 0; |
1015 | cs->irq_flags |= SA_SHIRQ; | 1015 | cs->irq_flags |= IRQF_SHARED; |
1016 | printk(KERN_INFO | 1016 | printk(KERN_INFO |
1017 | "Elsa: %s defined at %#lx IRQ %d\n", | 1017 | "Elsa: %s defined at %#lx IRQ %d\n", |
1018 | Elsa_Types[cs->subtyp], | 1018 | Elsa_Types[cs->subtyp], |
@@ -1061,7 +1061,7 @@ setup_elsa(struct IsdnCard *card) | |||
1061 | test_and_set_bit(HW_IPAC, &cs->HW_Flags); | 1061 | test_and_set_bit(HW_IPAC, &cs->HW_Flags); |
1062 | cs->hw.elsa.timer = 0; | 1062 | cs->hw.elsa.timer = 0; |
1063 | cs->hw.elsa.trig = 0; | 1063 | cs->hw.elsa.trig = 0; |
1064 | cs->irq_flags |= SA_SHIRQ; | 1064 | cs->irq_flags |= IRQF_SHARED; |
1065 | printk(KERN_INFO | 1065 | printk(KERN_INFO |
1066 | "Elsa: %s defined at %#lx/0x%x IRQ %d\n", | 1066 | "Elsa: %s defined at %#lx/0x%x IRQ %d\n", |
1067 | Elsa_Types[cs->subtyp], | 1067 | Elsa_Types[cs->subtyp], |
diff --git a/drivers/isdn/hisax/enternow_pci.c b/drivers/isdn/hisax/enternow_pci.c index 5f4876184691..8fcbe2e7d765 100644 --- a/drivers/isdn/hisax/enternow_pci.c +++ b/drivers/isdn/hisax/enternow_pci.c | |||
@@ -405,7 +405,7 @@ setup_enternow_pci(struct IsdnCard *card) | |||
405 | cs->BC_Send_Data = &netjet_fill_dma; | 405 | cs->BC_Send_Data = &netjet_fill_dma; |
406 | cs->cardmsg = &enpci_card_msg; | 406 | cs->cardmsg = &enpci_card_msg; |
407 | cs->irq_func = &enpci_interrupt; | 407 | cs->irq_func = &enpci_interrupt; |
408 | cs->irq_flags |= SA_SHIRQ; | 408 | cs->irq_flags |= IRQF_SHARED; |
409 | 409 | ||
410 | return (1); | 410 | return (1); |
411 | } | 411 | } |
diff --git a/drivers/isdn/hisax/gazel.c b/drivers/isdn/hisax/gazel.c index 82a1d2e86cee..3e7d92303582 100644 --- a/drivers/isdn/hisax/gazel.c +++ b/drivers/isdn/hisax/gazel.c | |||
@@ -592,7 +592,7 @@ setup_gazelpci(struct IsdnCardState *cs) | |||
592 | cs->hw.gazel.hscxfifo[0] = cs->hw.gazel.hscx[0]; | 592 | cs->hw.gazel.hscxfifo[0] = cs->hw.gazel.hscx[0]; |
593 | cs->hw.gazel.hscxfifo[1] = cs->hw.gazel.hscx[1]; | 593 | cs->hw.gazel.hscxfifo[1] = cs->hw.gazel.hscx[1]; |
594 | cs->irq = pci_irq; | 594 | cs->irq = pci_irq; |
595 | cs->irq_flags |= SA_SHIRQ; | 595 | cs->irq_flags |= IRQF_SHARED; |
596 | 596 | ||
597 | switch (seekcard) { | 597 | switch (seekcard) { |
598 | case PCI_DEVICE_ID_PLX_R685: | 598 | case PCI_DEVICE_ID_PLX_R685: |
diff --git a/drivers/isdn/hisax/hfc4s8s_l1.c b/drivers/isdn/hisax/hfc4s8s_l1.c index 913fd27a1f55..0f967b3df79d 100644 --- a/drivers/isdn/hisax/hfc4s8s_l1.c +++ b/drivers/isdn/hisax/hfc4s8s_l1.c | |||
@@ -1552,7 +1552,7 @@ setup_instance(hfc4s8s_hw * hw) | |||
1552 | INIT_WORK(&hw->tqueue, (void *) (void *) hfc4s8s_bh, hw); | 1552 | INIT_WORK(&hw->tqueue, (void *) (void *) hfc4s8s_bh, hw); |
1553 | 1553 | ||
1554 | if (request_irq | 1554 | if (request_irq |
1555 | (hw->irq, hfc4s8s_interrupt, SA_SHIRQ, hw->card_name, hw)) { | 1555 | (hw->irq, hfc4s8s_interrupt, IRQF_SHARED, hw->card_name, hw)) { |
1556 | printk(KERN_INFO | 1556 | printk(KERN_INFO |
1557 | "HFC-4S/8S: unable to alloc irq %d, card ignored\n", | 1557 | "HFC-4S/8S: unable to alloc irq %d, card ignored\n", |
1558 | hw->irq); | 1558 | hw->irq); |
diff --git a/drivers/isdn/hisax/hfc_pci.c b/drivers/isdn/hisax/hfc_pci.c index fa9615747e26..7241e73879ba 100644 --- a/drivers/isdn/hisax/hfc_pci.c +++ b/drivers/isdn/hisax/hfc_pci.c | |||
@@ -1732,7 +1732,7 @@ setup_hfcpci(struct IsdnCard *card) | |||
1732 | cs->BC_Read_Reg = NULL; | 1732 | cs->BC_Read_Reg = NULL; |
1733 | cs->BC_Write_Reg = NULL; | 1733 | cs->BC_Write_Reg = NULL; |
1734 | cs->irq_func = &hfcpci_interrupt; | 1734 | cs->irq_func = &hfcpci_interrupt; |
1735 | cs->irq_flags |= SA_SHIRQ; | 1735 | cs->irq_flags |= IRQF_SHARED; |
1736 | cs->hw.hfcpci.timer.function = (void *) hfcpci_Timer; | 1736 | cs->hw.hfcpci.timer.function = (void *) hfcpci_Timer; |
1737 | cs->hw.hfcpci.timer.data = (long) cs; | 1737 | cs->hw.hfcpci.timer.data = (long) cs; |
1738 | init_timer(&cs->hw.hfcpci.timer); | 1738 | init_timer(&cs->hw.hfcpci.timer); |
diff --git a/drivers/isdn/hisax/hisax_fcpcipnp.c b/drivers/isdn/hisax/hisax_fcpcipnp.c index dbcca287ee2c..1d7cf3bd6aa3 100644 --- a/drivers/isdn/hisax/hisax_fcpcipnp.c +++ b/drivers/isdn/hisax/hisax_fcpcipnp.c | |||
@@ -725,11 +725,11 @@ static int __devinit fcpcipnp_setup(struct fritz_adapter *adapter) | |||
725 | 725 | ||
726 | switch (adapter->type) { | 726 | switch (adapter->type) { |
727 | case AVM_FRITZ_PCIV2: | 727 | case AVM_FRITZ_PCIV2: |
728 | retval = request_irq(adapter->irq, fcpci2_irq, SA_SHIRQ, | 728 | retval = request_irq(adapter->irq, fcpci2_irq, IRQF_SHARED, |
729 | "fcpcipnp", adapter); | 729 | "fcpcipnp", adapter); |
730 | break; | 730 | break; |
731 | case AVM_FRITZ_PCI: | 731 | case AVM_FRITZ_PCI: |
732 | retval = request_irq(adapter->irq, fcpci_irq, SA_SHIRQ, | 732 | retval = request_irq(adapter->irq, fcpci_irq, IRQF_SHARED, |
733 | "fcpcipnp", adapter); | 733 | "fcpcipnp", adapter); |
734 | break; | 734 | break; |
735 | case AVM_FRITZ_PNP: | 735 | case AVM_FRITZ_PNP: |
diff --git a/drivers/isdn/hisax/niccy.c b/drivers/isdn/hisax/niccy.c index 868762cf76c6..79a97b1c3812 100644 --- a/drivers/isdn/hisax/niccy.c +++ b/drivers/isdn/hisax/niccy.c | |||
@@ -336,7 +336,7 @@ setup_niccy(struct IsdnCard *card) | |||
336 | printk(KERN_WARNING "Niccy: No PCI card found\n"); | 336 | printk(KERN_WARNING "Niccy: No PCI card found\n"); |
337 | return(0); | 337 | return(0); |
338 | } | 338 | } |
339 | cs->irq_flags |= SA_SHIRQ; | 339 | cs->irq_flags |= IRQF_SHARED; |
340 | cs->hw.niccy.isac = pci_ioaddr + ISAC_PCI_DATA; | 340 | cs->hw.niccy.isac = pci_ioaddr + ISAC_PCI_DATA; |
341 | cs->hw.niccy.isac_ale = pci_ioaddr + ISAC_PCI_ADDR; | 341 | cs->hw.niccy.isac_ale = pci_ioaddr + ISAC_PCI_ADDR; |
342 | cs->hw.niccy.hscx = pci_ioaddr + HSCX_PCI_DATA; | 342 | cs->hw.niccy.hscx = pci_ioaddr + HSCX_PCI_DATA; |
diff --git a/drivers/isdn/hisax/nj_s.c b/drivers/isdn/hisax/nj_s.c index 1b3ac46df52c..e5b900a6fa0b 100644 --- a/drivers/isdn/hisax/nj_s.c +++ b/drivers/isdn/hisax/nj_s.c | |||
@@ -271,7 +271,7 @@ setup_netjet_s(struct IsdnCard *card) | |||
271 | setup_isac(cs); | 271 | setup_isac(cs); |
272 | cs->cardmsg = &NETjet_S_card_msg; | 272 | cs->cardmsg = &NETjet_S_card_msg; |
273 | cs->irq_func = &netjet_s_interrupt; | 273 | cs->irq_func = &netjet_s_interrupt; |
274 | cs->irq_flags |= SA_SHIRQ; | 274 | cs->irq_flags |= IRQF_SHARED; |
275 | ISACVersion(cs, "NETjet-S:"); | 275 | ISACVersion(cs, "NETjet-S:"); |
276 | return (1); | 276 | return (1); |
277 | } | 277 | } |
diff --git a/drivers/isdn/hisax/nj_u.c b/drivers/isdn/hisax/nj_u.c index 7a6010eac60d..7002b09936d4 100644 --- a/drivers/isdn/hisax/nj_u.c +++ b/drivers/isdn/hisax/nj_u.c | |||
@@ -237,7 +237,7 @@ setup_netjet_u(struct IsdnCard *card) | |||
237 | cs->BC_Send_Data = &netjet_fill_dma; | 237 | cs->BC_Send_Data = &netjet_fill_dma; |
238 | cs->cardmsg = &NETjet_U_card_msg; | 238 | cs->cardmsg = &NETjet_U_card_msg; |
239 | cs->irq_func = &netjet_u_interrupt; | 239 | cs->irq_func = &netjet_u_interrupt; |
240 | cs->irq_flags |= SA_SHIRQ; | 240 | cs->irq_flags |= IRQF_SHARED; |
241 | ICCVersion(cs, "NETspider-U:"); | 241 | ICCVersion(cs, "NETspider-U:"); |
242 | return (1); | 242 | return (1); |
243 | } | 243 | } |
diff --git a/drivers/isdn/hisax/sedlbauer.c b/drivers/isdn/hisax/sedlbauer.c index 11ea456626b6..8d8e8a299892 100644 --- a/drivers/isdn/hisax/sedlbauer.c +++ b/drivers/isdn/hisax/sedlbauer.c | |||
@@ -632,7 +632,7 @@ setup_sedlbauer(struct IsdnCard *card) | |||
632 | printk(KERN_WARNING "Sedlbauer: No PCI card found\n"); | 632 | printk(KERN_WARNING "Sedlbauer: No PCI card found\n"); |
633 | return(0); | 633 | return(0); |
634 | } | 634 | } |
635 | cs->irq_flags |= SA_SHIRQ; | 635 | cs->irq_flags |= IRQF_SHARED; |
636 | cs->hw.sedl.bus = SEDL_BUS_PCI; | 636 | cs->hw.sedl.bus = SEDL_BUS_PCI; |
637 | sub_vendor_id = dev_sedl->subsystem_vendor; | 637 | sub_vendor_id = dev_sedl->subsystem_vendor; |
638 | sub_id = dev_sedl->subsystem_device; | 638 | sub_id = dev_sedl->subsystem_device; |
@@ -809,7 +809,7 @@ ready: | |||
809 | cs->hw.sedl.hscx = cs->hw.sedl.cfg_reg + SEDL_HSCX_PCMCIA_HSCX; | 809 | cs->hw.sedl.hscx = cs->hw.sedl.cfg_reg + SEDL_HSCX_PCMCIA_HSCX; |
810 | cs->hw.sedl.reset_on = cs->hw.sedl.cfg_reg + SEDL_HSCX_PCMCIA_RESET; | 810 | cs->hw.sedl.reset_on = cs->hw.sedl.cfg_reg + SEDL_HSCX_PCMCIA_RESET; |
811 | cs->hw.sedl.reset_off = cs->hw.sedl.cfg_reg + SEDL_HSCX_PCMCIA_RESET; | 811 | cs->hw.sedl.reset_off = cs->hw.sedl.cfg_reg + SEDL_HSCX_PCMCIA_RESET; |
812 | cs->irq_flags |= SA_SHIRQ; | 812 | cs->irq_flags |= IRQF_SHARED; |
813 | } else { | 813 | } else { |
814 | cs->hw.sedl.adr = cs->hw.sedl.cfg_reg + SEDL_HSCX_ISA_ADR; | 814 | cs->hw.sedl.adr = cs->hw.sedl.cfg_reg + SEDL_HSCX_ISA_ADR; |
815 | cs->hw.sedl.isac = cs->hw.sedl.cfg_reg + SEDL_HSCX_ISA_ISAC; | 815 | cs->hw.sedl.isac = cs->hw.sedl.cfg_reg + SEDL_HSCX_ISA_ISAC; |
diff --git a/drivers/isdn/hisax/teles3.c b/drivers/isdn/hisax/teles3.c index 090abd16b4bc..5cb712437da4 100644 --- a/drivers/isdn/hisax/teles3.c +++ b/drivers/isdn/hisax/teles3.c | |||
@@ -369,7 +369,7 @@ setup_teles3(struct IsdnCard *card) | |||
369 | cs->hw.teles3.hscx[1] + 96); | 369 | cs->hw.teles3.hscx[1] + 96); |
370 | return (0); | 370 | return (0); |
371 | } | 371 | } |
372 | cs->irq_flags |= SA_SHIRQ; /* cardbus can share */ | 372 | cs->irq_flags |= IRQF_SHARED; /* cardbus can share */ |
373 | } else { | 373 | } else { |
374 | if (cs->hw.teles3.cfg_reg) { | 374 | if (cs->hw.teles3.cfg_reg) { |
375 | if (cs->typ == ISDN_CTYPE_COMPAQ_ISA) { | 375 | if (cs->typ == ISDN_CTYPE_COMPAQ_ISA) { |
diff --git a/drivers/isdn/hisax/telespci.c b/drivers/isdn/hisax/telespci.c index a1bb73e28841..9382cdf04d8d 100644 --- a/drivers/isdn/hisax/telespci.c +++ b/drivers/isdn/hisax/telespci.c | |||
@@ -347,7 +347,7 @@ setup_telespci(struct IsdnCard *card) | |||
347 | cs->BC_Send_Data = &hscx_fill_fifo; | 347 | cs->BC_Send_Data = &hscx_fill_fifo; |
348 | cs->cardmsg = &TelesPCI_card_msg; | 348 | cs->cardmsg = &TelesPCI_card_msg; |
349 | cs->irq_func = &telespci_interrupt; | 349 | cs->irq_func = &telespci_interrupt; |
350 | cs->irq_flags |= SA_SHIRQ; | 350 | cs->irq_flags |= IRQF_SHARED; |
351 | ISACVersion(cs, "TelesPCI:"); | 351 | ISACVersion(cs, "TelesPCI:"); |
352 | if (HscxVersion(cs, "TelesPCI:")) { | 352 | if (HscxVersion(cs, "TelesPCI:")) { |
353 | printk(KERN_WARNING | 353 | printk(KERN_WARNING |
diff --git a/drivers/isdn/hisax/w6692.c b/drivers/isdn/hisax/w6692.c index 00e4fa2aef51..6c68419c05ff 100644 --- a/drivers/isdn/hisax/w6692.c +++ b/drivers/isdn/hisax/w6692.c | |||
@@ -1080,7 +1080,7 @@ setup_w6692(struct IsdnCard *card) | |||
1080 | cs->BC_Send_Data = &W6692B_fill_fifo; | 1080 | cs->BC_Send_Data = &W6692B_fill_fifo; |
1081 | cs->cardmsg = &w6692_card_msg; | 1081 | cs->cardmsg = &w6692_card_msg; |
1082 | cs->irq_func = &W6692_interrupt; | 1082 | cs->irq_func = &W6692_interrupt; |
1083 | cs->irq_flags |= SA_SHIRQ; | 1083 | cs->irq_flags |= IRQF_SHARED; |
1084 | W6692Version(cs, "W6692:"); | 1084 | W6692Version(cs, "W6692:"); |
1085 | printk(KERN_INFO "W6692 ISTA=0x%X\n", ReadW6692(cs, W_ISTA)); | 1085 | printk(KERN_INFO "W6692 ISTA=0x%X\n", ReadW6692(cs, W_ISTA)); |
1086 | printk(KERN_INFO "W6692 IMASK=0x%X\n", ReadW6692(cs, W_IMASK)); | 1086 | printk(KERN_INFO "W6692 IMASK=0x%X\n", ReadW6692(cs, W_IMASK)); |
diff --git a/drivers/isdn/hysdn/boardergo.c b/drivers/isdn/hysdn/boardergo.c index 89fd531fbce6..73afebdf80bd 100644 --- a/drivers/isdn/hysdn/boardergo.c +++ b/drivers/isdn/hysdn/boardergo.c | |||
@@ -435,7 +435,7 @@ ergo_inithardware(hysdn_card * card) | |||
435 | } | 435 | } |
436 | 436 | ||
437 | ergo_stopcard(card); /* disable interrupts */ | 437 | ergo_stopcard(card); /* disable interrupts */ |
438 | if (request_irq(card->irq, ergo_interrupt, SA_SHIRQ, "HYSDN", card)) { | 438 | if (request_irq(card->irq, ergo_interrupt, IRQF_SHARED, "HYSDN", card)) { |
439 | ergo_releasehardware(card); /* return the acquired hardware */ | 439 | ergo_releasehardware(card); /* return the acquired hardware */ |
440 | return (-1); | 440 | return (-1); |
441 | } | 441 | } |
diff --git a/drivers/isdn/sc/init.c b/drivers/isdn/sc/init.c index 62b7acfad8a4..a627e68023f6 100644 --- a/drivers/isdn/sc/init.c +++ b/drivers/isdn/sc/init.c | |||
@@ -342,7 +342,7 @@ static int __init sc_init(void) | |||
342 | */ | 342 | */ |
343 | sc_adapter[cinst]->interrupt = irq[b]; | 343 | sc_adapter[cinst]->interrupt = irq[b]; |
344 | if (request_irq(sc_adapter[cinst]->interrupt, interrupt_handler, | 344 | if (request_irq(sc_adapter[cinst]->interrupt, interrupt_handler, |
345 | SA_INTERRUPT, interface->id, NULL)) | 345 | IRQF_DISABLED, interface->id, NULL)) |
346 | { | 346 | { |
347 | kfree(sc_adapter[cinst]->channel); | 347 | kfree(sc_adapter[cinst]->channel); |
348 | indicate_status(cinst, ISDN_STAT_UNLOAD, 0, NULL); /* Fix me */ | 348 | indicate_status(cinst, ISDN_STAT_UNLOAD, 0, NULL); /* Fix me */ |
diff --git a/drivers/macintosh/macio_asic.c b/drivers/macintosh/macio_asic.c index d832e109b1b1..40ae7b6a939d 100644 --- a/drivers/macintosh/macio_asic.c +++ b/drivers/macintosh/macio_asic.c | |||
@@ -427,10 +427,10 @@ static struct macio_dev * macio_add_one_device(struct macio_chip *chip, | |||
427 | 427 | ||
428 | /* MacIO itself has a different reg, we use it's PCI base */ | 428 | /* MacIO itself has a different reg, we use it's PCI base */ |
429 | if (np == chip->of_node) { | 429 | if (np == chip->of_node) { |
430 | sprintf(dev->ofdev.dev.bus_id, "%1d.%016llx:%.*s", | 430 | sprintf(dev->ofdev.dev.bus_id, "%1d.%08x:%.*s", |
431 | chip->lbus.index, | 431 | chip->lbus.index, |
432 | #ifdef CONFIG_PCI | 432 | #ifdef CONFIG_PCI |
433 | (unsigned long long)pci_resource_start(chip->lbus.pdev, 0), | 433 | (unsigned int)pci_resource_start(chip->lbus.pdev, 0), |
434 | #else | 434 | #else |
435 | 0, /* NuBus may want to do something better here */ | 435 | 0, /* NuBus may want to do something better here */ |
436 | #endif | 436 | #endif |
diff --git a/drivers/macintosh/smu.c b/drivers/macintosh/smu.c index 030130570e0a..ff6d9bfdc3d2 100644 --- a/drivers/macintosh/smu.c +++ b/drivers/macintosh/smu.c | |||
@@ -555,7 +555,7 @@ static int smu_late_init(void) | |||
555 | 555 | ||
556 | if (smu->db_irq != NO_IRQ) { | 556 | if (smu->db_irq != NO_IRQ) { |
557 | if (request_irq(smu->db_irq, smu_db_intr, | 557 | if (request_irq(smu->db_irq, smu_db_intr, |
558 | SA_SHIRQ, "SMU doorbell", smu) < 0) { | 558 | IRQF_SHARED, "SMU doorbell", smu) < 0) { |
559 | printk(KERN_WARNING "SMU: can't " | 559 | printk(KERN_WARNING "SMU: can't " |
560 | "request interrupt %d\n", | 560 | "request interrupt %d\n", |
561 | smu->db_irq); | 561 | smu->db_irq); |
@@ -565,7 +565,7 @@ static int smu_late_init(void) | |||
565 | 565 | ||
566 | if (smu->msg_irq != NO_IRQ) { | 566 | if (smu->msg_irq != NO_IRQ) { |
567 | if (request_irq(smu->msg_irq, smu_msg_intr, | 567 | if (request_irq(smu->msg_irq, smu_msg_intr, |
568 | SA_SHIRQ, "SMU message", smu) < 0) { | 568 | IRQF_SHARED, "SMU message", smu) < 0) { |
569 | printk(KERN_WARNING "SMU: can't " | 569 | printk(KERN_WARNING "SMU: can't " |
570 | "request interrupt %d\n", | 570 | "request interrupt %d\n", |
571 | smu->msg_irq); | 571 | smu->msg_irq); |
diff --git a/drivers/media/common/saa7146_core.c b/drivers/media/common/saa7146_core.c index 8cdd4d265ffa..b88451e33c09 100644 --- a/drivers/media/common/saa7146_core.c +++ b/drivers/media/common/saa7146_core.c | |||
@@ -363,7 +363,7 @@ static int saa7146_init_one(struct pci_dev *pci, const struct pci_device_id *ent | |||
363 | saa7146_write(dev, MC2, 0xf8000000); | 363 | saa7146_write(dev, MC2, 0xf8000000); |
364 | 364 | ||
365 | /* request an interrupt for the saa7146 */ | 365 | /* request an interrupt for the saa7146 */ |
366 | err = request_irq(pci->irq, interrupt_hw, SA_SHIRQ | SA_INTERRUPT, | 366 | err = request_irq(pci->irq, interrupt_hw, IRQF_SHARED | IRQF_DISABLED, |
367 | dev->name, dev); | 367 | dev->name, dev); |
368 | if (err < 0) { | 368 | if (err < 0) { |
369 | ERR(("request_irq() failed.\n")); | 369 | ERR(("request_irq() failed.\n")); |
diff --git a/drivers/media/dvb/b2c2/flexcop-pci.c b/drivers/media/dvb/b2c2/flexcop-pci.c index f04041702191..eb2e6432c8c2 100644 --- a/drivers/media/dvb/b2c2/flexcop-pci.c +++ b/drivers/media/dvb/b2c2/flexcop-pci.c | |||
@@ -294,7 +294,7 @@ static int flexcop_pci_init(struct flexcop_pci *fc_pci) | |||
294 | pci_set_drvdata(fc_pci->pdev, fc_pci); | 294 | pci_set_drvdata(fc_pci->pdev, fc_pci); |
295 | 295 | ||
296 | if ((ret = request_irq(fc_pci->pdev->irq, flexcop_pci_isr, | 296 | if ((ret = request_irq(fc_pci->pdev->irq, flexcop_pci_isr, |
297 | SA_SHIRQ, DRIVER_NAME, fc_pci)) != 0) | 297 | IRQF_SHARED, DRIVER_NAME, fc_pci)) != 0) |
298 | goto err_pci_iounmap; | 298 | goto err_pci_iounmap; |
299 | 299 | ||
300 | spin_lock_init(&fc_pci->irq_lock); | 300 | spin_lock_init(&fc_pci->irq_lock); |
diff --git a/drivers/media/dvb/bt8xx/bt878.c b/drivers/media/dvb/bt8xx/bt878.c index 761fa6e7d762..755822ee6e9b 100644 --- a/drivers/media/dvb/bt8xx/bt878.c +++ b/drivers/media/dvb/bt8xx/bt878.c | |||
@@ -488,7 +488,7 @@ static int __devinit bt878_probe(struct pci_dev *dev, | |||
488 | btwrite(0, BT848_INT_MASK); | 488 | btwrite(0, BT848_INT_MASK); |
489 | 489 | ||
490 | result = request_irq(bt->irq, bt878_irq, | 490 | result = request_irq(bt->irq, bt878_irq, |
491 | SA_SHIRQ | SA_INTERRUPT, "bt878", | 491 | IRQF_SHARED | IRQF_DISABLED, "bt878", |
492 | (void *) bt); | 492 | (void *) bt); |
493 | if (result == -EINVAL) { | 493 | if (result == -EINVAL) { |
494 | printk(KERN_ERR "bt878(%d): Bad irq number or handler\n", | 494 | printk(KERN_ERR "bt878(%d): Bad irq number or handler\n", |
diff --git a/drivers/media/dvb/pluto2/pluto2.c b/drivers/media/dvb/pluto2/pluto2.c index acabea0793b6..2310b2bfed4e 100644 --- a/drivers/media/dvb/pluto2/pluto2.c +++ b/drivers/media/dvb/pluto2/pluto2.c | |||
@@ -616,7 +616,7 @@ static int __devinit pluto2_probe(struct pci_dev *pdev, | |||
616 | 616 | ||
617 | pci_set_drvdata(pdev, pluto); | 617 | pci_set_drvdata(pdev, pluto); |
618 | 618 | ||
619 | ret = request_irq(pdev->irq, pluto_irq, SA_SHIRQ, DRIVER_NAME, pluto); | 619 | ret = request_irq(pdev->irq, pluto_irq, IRQF_SHARED, DRIVER_NAME, pluto); |
620 | if (ret < 0) | 620 | if (ret < 0) |
621 | goto err_pci_iounmap; | 621 | goto err_pci_iounmap; |
622 | 622 | ||
diff --git a/drivers/media/video/bt8xx/bttv-driver.c b/drivers/media/video/bt8xx/bttv-driver.c index aa3203ae670c..5764a89d3562 100644 --- a/drivers/media/video/bt8xx/bttv-driver.c +++ b/drivers/media/video/bt8xx/bttv-driver.c | |||
@@ -4050,7 +4050,7 @@ static int __devinit bttv_probe(struct pci_dev *dev, | |||
4050 | /* disable irqs, register irq handler */ | 4050 | /* disable irqs, register irq handler */ |
4051 | btwrite(0, BT848_INT_MASK); | 4051 | btwrite(0, BT848_INT_MASK); |
4052 | result = request_irq(btv->c.pci->irq, bttv_irq, | 4052 | result = request_irq(btv->c.pci->irq, bttv_irq, |
4053 | SA_SHIRQ | SA_INTERRUPT,btv->c.name,(void *)btv); | 4053 | IRQF_SHARED | IRQF_DISABLED,btv->c.name,(void *)btv); |
4054 | if (result < 0) { | 4054 | if (result < 0) { |
4055 | printk(KERN_ERR "bttv%d: can't get IRQ %d\n", | 4055 | printk(KERN_ERR "bttv%d: can't get IRQ %d\n", |
4056 | bttv_num,btv->c.pci->irq); | 4056 | bttv_num,btv->c.pci->irq); |
diff --git a/drivers/media/video/cx88/cx88-alsa.c b/drivers/media/video/cx88/cx88-alsa.c index 292a5e81eb75..f0340662e078 100644 --- a/drivers/media/video/cx88/cx88-alsa.c +++ b/drivers/media/video/cx88/cx88-alsa.c | |||
@@ -700,7 +700,7 @@ static int __devinit snd_cx88_create(struct snd_card *card, | |||
700 | 700 | ||
701 | /* get irq */ | 701 | /* get irq */ |
702 | err = request_irq(chip->pci->irq, cx8801_irq, | 702 | err = request_irq(chip->pci->irq, cx8801_irq, |
703 | SA_SHIRQ | SA_INTERRUPT, chip->core->name, chip); | 703 | IRQF_SHARED | IRQF_DISABLED, chip->core->name, chip); |
704 | if (err < 0) { | 704 | if (err < 0) { |
705 | dprintk(0, "%s: can't get IRQ %d\n", | 705 | dprintk(0, "%s: can't get IRQ %d\n", |
706 | chip->core->name, chip->pci->irq); | 706 | chip->core->name, chip->pci->irq); |
diff --git a/drivers/media/video/cx88/cx88-mpeg.c b/drivers/media/video/cx88/cx88-mpeg.c index 2c12aca1b6a3..138a4f692501 100644 --- a/drivers/media/video/cx88/cx88-mpeg.c +++ b/drivers/media/video/cx88/cx88-mpeg.c | |||
@@ -438,7 +438,7 @@ int cx8802_init_common(struct cx8802_dev *dev) | |||
438 | 438 | ||
439 | /* get irq */ | 439 | /* get irq */ |
440 | err = request_irq(dev->pci->irq, cx8802_irq, | 440 | err = request_irq(dev->pci->irq, cx8802_irq, |
441 | SA_SHIRQ | SA_INTERRUPT, dev->core->name, dev); | 441 | IRQF_SHARED | IRQF_DISABLED, dev->core->name, dev); |
442 | if (err < 0) { | 442 | if (err < 0) { |
443 | printk(KERN_ERR "%s: can't get IRQ %d\n", | 443 | printk(KERN_ERR "%s: can't get IRQ %d\n", |
444 | dev->core->name, dev->pci->irq); | 444 | dev->core->name, dev->pci->irq); |
diff --git a/drivers/media/video/cx88/cx88-video.c b/drivers/media/video/cx88/cx88-video.c index c538d99ec9f6..2225d4b94140 100644 --- a/drivers/media/video/cx88/cx88-video.c +++ b/drivers/media/video/cx88/cx88-video.c | |||
@@ -1915,7 +1915,7 @@ static int __devinit cx8800_initdev(struct pci_dev *pci_dev, | |||
1915 | 1915 | ||
1916 | /* get irq */ | 1916 | /* get irq */ |
1917 | err = request_irq(pci_dev->irq, cx8800_irq, | 1917 | err = request_irq(pci_dev->irq, cx8800_irq, |
1918 | SA_SHIRQ | SA_INTERRUPT, core->name, dev); | 1918 | IRQF_SHARED | IRQF_DISABLED, core->name, dev); |
1919 | if (err < 0) { | 1919 | if (err < 0) { |
1920 | printk(KERN_ERR "%s: can't get IRQ %d\n", | 1920 | printk(KERN_ERR "%s: can't get IRQ %d\n", |
1921 | core->name,pci_dev->irq); | 1921 | core->name,pci_dev->irq); |
diff --git a/drivers/media/video/meye.c b/drivers/media/video/meye.c index ddd62214bee5..e278753f8f25 100644 --- a/drivers/media/video/meye.c +++ b/drivers/media/video/meye.c | |||
@@ -1881,7 +1881,7 @@ static int __devinit meye_probe(struct pci_dev *pcidev, | |||
1881 | 1881 | ||
1882 | meye.mchip_irq = pcidev->irq; | 1882 | meye.mchip_irq = pcidev->irq; |
1883 | if (request_irq(meye.mchip_irq, meye_irq, | 1883 | if (request_irq(meye.mchip_irq, meye_irq, |
1884 | SA_INTERRUPT | SA_SHIRQ, "meye", meye_irq)) { | 1884 | IRQF_DISABLED | IRQF_SHARED, "meye", meye_irq)) { |
1885 | printk(KERN_ERR "meye: request_irq failed\n"); | 1885 | printk(KERN_ERR "meye: request_irq failed\n"); |
1886 | goto outreqirq; | 1886 | goto outreqirq; |
1887 | } | 1887 | } |
diff --git a/drivers/media/video/saa7134/saa7134-alsa.c b/drivers/media/video/saa7134/saa7134-alsa.c index d77e6a8d9432..f1fd69e7f119 100644 --- a/drivers/media/video/saa7134/saa7134-alsa.c +++ b/drivers/media/video/saa7134/saa7134-alsa.c | |||
@@ -929,7 +929,7 @@ static int alsa_card_saa7134_create(struct saa7134_dev *dev, int devnum) | |||
929 | 929 | ||
930 | 930 | ||
931 | err = request_irq(dev->pci->irq, saa7134_alsa_irq, | 931 | err = request_irq(dev->pci->irq, saa7134_alsa_irq, |
932 | SA_SHIRQ | SA_INTERRUPT, dev->name, | 932 | IRQF_SHARED | IRQF_DISABLED, dev->name, |
933 | (void*) &dev->dmasound); | 933 | (void*) &dev->dmasound); |
934 | 934 | ||
935 | if (err < 0) { | 935 | if (err < 0) { |
diff --git a/drivers/media/video/saa7134/saa7134-core.c b/drivers/media/video/saa7134/saa7134-core.c index 535172f643b9..6e97cc84ba89 100644 --- a/drivers/media/video/saa7134/saa7134-core.c +++ b/drivers/media/video/saa7134/saa7134-core.c | |||
@@ -923,7 +923,7 @@ static int __devinit saa7134_initdev(struct pci_dev *pci_dev, | |||
923 | 923 | ||
924 | /* get irq */ | 924 | /* get irq */ |
925 | err = request_irq(pci_dev->irq, saa7134_irq, | 925 | err = request_irq(pci_dev->irq, saa7134_irq, |
926 | SA_SHIRQ | SA_INTERRUPT, dev->name, dev); | 926 | IRQF_SHARED | IRQF_DISABLED, dev->name, dev); |
927 | if (err < 0) { | 927 | if (err < 0) { |
928 | printk(KERN_ERR "%s: can't get IRQ %d\n", | 928 | printk(KERN_ERR "%s: can't get IRQ %d\n", |
929 | dev->name,pci_dev->irq); | 929 | dev->name,pci_dev->irq); |
diff --git a/drivers/media/video/saa7134/saa7134-oss.c b/drivers/media/video/saa7134/saa7134-oss.c index 7aa02b34e012..3895d05804ae 100644 --- a/drivers/media/video/saa7134/saa7134-oss.c +++ b/drivers/media/video/saa7134/saa7134-oss.c | |||
@@ -845,7 +845,7 @@ int saa7134_oss_init1(struct saa7134_dev *dev) | |||
845 | { | 845 | { |
846 | 846 | ||
847 | if ((request_irq(dev->pci->irq, saa7134_oss_irq, | 847 | if ((request_irq(dev->pci->irq, saa7134_oss_irq, |
848 | SA_SHIRQ | SA_INTERRUPT, dev->name, | 848 | IRQF_SHARED | IRQF_DISABLED, dev->name, |
849 | (void*) &dev->dmasound)) < 0) | 849 | (void*) &dev->dmasound)) < 0) |
850 | return -1; | 850 | return -1; |
851 | 851 | ||
diff --git a/drivers/media/video/stradis.c b/drivers/media/video/stradis.c index c18b31d9928c..b36ba9fa3a28 100644 --- a/drivers/media/video/stradis.c +++ b/drivers/media/video/stradis.c | |||
@@ -1983,7 +1983,7 @@ static int __devinit configure_saa7146(struct pci_dev *pdev, int num) | |||
1983 | memcpy(&saa->video_dev, &saa_template, sizeof(saa_template)); | 1983 | memcpy(&saa->video_dev, &saa_template, sizeof(saa_template)); |
1984 | saawrite(0, SAA7146_IER); /* turn off all interrupts */ | 1984 | saawrite(0, SAA7146_IER); /* turn off all interrupts */ |
1985 | 1985 | ||
1986 | retval = request_irq(saa->irq, saa7146_irq, SA_SHIRQ | SA_INTERRUPT, | 1986 | retval = request_irq(saa->irq, saa7146_irq, IRQF_SHARED | IRQF_DISABLED, |
1987 | "stradis", saa); | 1987 | "stradis", saa); |
1988 | if (retval == -EINVAL) | 1988 | if (retval == -EINVAL) |
1989 | dev_err(&pdev->dev, "%d: Bad irq number or handler\n", num); | 1989 | dev_err(&pdev->dev, "%d: Bad irq number or handler\n", num); |
diff --git a/drivers/media/video/zoran_card.c b/drivers/media/video/zoran_card.c index 33b32f3cf84e..f2249ed25273 100644 --- a/drivers/media/video/zoran_card.c +++ b/drivers/media/video/zoran_card.c | |||
@@ -1380,7 +1380,7 @@ find_zr36057 (void) | |||
1380 | 1380 | ||
1381 | result = request_irq(zr->pci_dev->irq, | 1381 | result = request_irq(zr->pci_dev->irq, |
1382 | zoran_irq, | 1382 | zoran_irq, |
1383 | SA_SHIRQ | SA_INTERRUPT, | 1383 | IRQF_SHARED | IRQF_DISABLED, |
1384 | ZR_DEVNAME(zr), | 1384 | ZR_DEVNAME(zr), |
1385 | (void *) zr); | 1385 | (void *) zr); |
1386 | if (result < 0) { | 1386 | if (result < 0) { |
diff --git a/drivers/media/video/zr36120.c b/drivers/media/video/zr36120.c index 6ac3b6740089..50437383ed62 100644 --- a/drivers/media/video/zr36120.c +++ b/drivers/media/video/zr36120.c | |||
@@ -1858,7 +1858,7 @@ int __init find_zoran(void) | |||
1858 | DEBUG(printk(KERN_DEBUG "zoran: mapped-memory at 0x%p\n",ztv->zoran_mem)); | 1858 | DEBUG(printk(KERN_DEBUG "zoran: mapped-memory at 0x%p\n",ztv->zoran_mem)); |
1859 | 1859 | ||
1860 | result = request_irq(dev->irq, zoran_irq, | 1860 | result = request_irq(dev->irq, zoran_irq, |
1861 | SA_SHIRQ|SA_INTERRUPT,"zoran", ztv); | 1861 | IRQF_SHARED|IRQF_DISABLED,"zoran", ztv); |
1862 | if (result==-EINVAL) | 1862 | if (result==-EINVAL) |
1863 | { | 1863 | { |
1864 | iounmap(ztv->zoran_mem); | 1864 | iounmap(ztv->zoran_mem); |
diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c index 2544fc7af0f6..57543603d6c8 100644 --- a/drivers/message/fusion/mptbase.c +++ b/drivers/message/fusion/mptbase.c | |||
@@ -1705,7 +1705,7 @@ mpt_do_ioc_recovery(MPT_ADAPTER *ioc, u32 reason, int sleepFlag) | |||
1705 | printk(MYIOC_s_INFO_FMT "PCI-MSI enabled\n", | 1705 | printk(MYIOC_s_INFO_FMT "PCI-MSI enabled\n", |
1706 | ioc->name); | 1706 | ioc->name); |
1707 | rc = request_irq(ioc->pcidev->irq, mpt_interrupt, | 1707 | rc = request_irq(ioc->pcidev->irq, mpt_interrupt, |
1708 | SA_SHIRQ, ioc->name, ioc); | 1708 | IRQF_SHARED, ioc->name, ioc); |
1709 | if (rc < 0) { | 1709 | if (rc < 0) { |
1710 | printk(MYIOC_s_ERR_FMT "Unable to allocate " | 1710 | printk(MYIOC_s_ERR_FMT "Unable to allocate " |
1711 | "interrupt %d!\n", ioc->name, | 1711 | "interrupt %d!\n", ioc->name, |
diff --git a/drivers/message/i2o/pci.c b/drivers/message/i2o/pci.c index 4f1515cae5dc..1b58444d5aaf 100644 --- a/drivers/message/i2o/pci.c +++ b/drivers/message/i2o/pci.c | |||
@@ -274,7 +274,7 @@ static int i2o_pci_irq_enable(struct i2o_controller *c) | |||
274 | writel(0xffffffff, c->irq_mask); | 274 | writel(0xffffffff, c->irq_mask); |
275 | 275 | ||
276 | if (pdev->irq) { | 276 | if (pdev->irq) { |
277 | rc = request_irq(pdev->irq, i2o_pci_interrupt, SA_SHIRQ, | 277 | rc = request_irq(pdev->irq, i2o_pci_interrupt, IRQF_SHARED, |
278 | c->name, c); | 278 | c->name, c); |
279 | if (rc < 0) { | 279 | if (rc < 0) { |
280 | printk(KERN_ERR "%s: unable to allocate interrupt %d." | 280 | printk(KERN_ERR "%s: unable to allocate interrupt %d." |
diff --git a/drivers/mfd/ucb1x00-core.c b/drivers/mfd/ucb1x00-core.c index 6fe2ff5a63db..632bc218c86a 100644 --- a/drivers/mfd/ucb1x00-core.c +++ b/drivers/mfd/ucb1x00-core.c | |||
@@ -508,7 +508,7 @@ static int ucb1x00_probe(struct mcp *mcp) | |||
508 | goto err_free; | 508 | goto err_free; |
509 | } | 509 | } |
510 | 510 | ||
511 | ret = request_irq(ucb->irq, ucb1x00_irq, SA_TRIGGER_RISING, | 511 | ret = request_irq(ucb->irq, ucb1x00_irq, IRQF_TRIGGER_RISING, |
512 | "UCB1x00", ucb); | 512 | "UCB1x00", ucb); |
513 | if (ret) { | 513 | if (ret) { |
514 | printk(KERN_ERR "ucb1x00: unable to grab irq%d: %d\n", | 514 | printk(KERN_ERR "ucb1x00: unable to grab irq%d: %d\n", |
diff --git a/drivers/misc/ibmasm/module.c b/drivers/misc/ibmasm/module.c index 9706cc19134a..2f3bddfab937 100644 --- a/drivers/misc/ibmasm/module.c +++ b/drivers/misc/ibmasm/module.c | |||
@@ -113,7 +113,7 @@ static int __devinit ibmasm_init_one(struct pci_dev *pdev, const struct pci_devi | |||
113 | goto error_ioremap; | 113 | goto error_ioremap; |
114 | } | 114 | } |
115 | 115 | ||
116 | result = request_irq(sp->irq, ibmasm_interrupt_handler, SA_SHIRQ, sp->devname, (void*)sp); | 116 | result = request_irq(sp->irq, ibmasm_interrupt_handler, IRQF_SHARED, sp->devname, (void*)sp); |
117 | if (result) { | 117 | if (result) { |
118 | dev_err(sp->dev, "Failed to register interrupt handler\n"); | 118 | dev_err(sp->dev, "Failed to register interrupt handler\n"); |
119 | goto error_request_irq; | 119 | goto error_request_irq; |
diff --git a/drivers/mmc/at91_mci.c b/drivers/mmc/at91_mci.c index 075a2a07924e..6b7638b84290 100644 --- a/drivers/mmc/at91_mci.c +++ b/drivers/mmc/at91_mci.c | |||
@@ -850,7 +850,7 @@ static int at91_mci_probe(struct platform_device *pdev) | |||
850 | /* | 850 | /* |
851 | * Allocate the MCI interrupt | 851 | * Allocate the MCI interrupt |
852 | */ | 852 | */ |
853 | ret = request_irq(AT91_ID_MCI, at91_mci_irq, SA_SHIRQ, DRIVER_NAME, host); | 853 | ret = request_irq(AT91_ID_MCI, at91_mci_irq, IRQF_SHARED, DRIVER_NAME, host); |
854 | if (ret) { | 854 | if (ret) { |
855 | printk(KERN_ERR "Failed to request MCI interrupt\n"); | 855 | printk(KERN_ERR "Failed to request MCI interrupt\n"); |
856 | clk_disable(mci_clk); | 856 | clk_disable(mci_clk); |
diff --git a/drivers/mmc/au1xmmc.c b/drivers/mmc/au1xmmc.c index 41069908f4a7..fb606165af3b 100644 --- a/drivers/mmc/au1xmmc.c +++ b/drivers/mmc/au1xmmc.c | |||
@@ -886,7 +886,7 @@ static int __devinit au1xmmc_probe(struct platform_device *pdev) | |||
886 | int i, ret = 0; | 886 | int i, ret = 0; |
887 | 887 | ||
888 | /* THe interrupt is shared among all controllers */ | 888 | /* THe interrupt is shared among all controllers */ |
889 | ret = request_irq(AU1100_SD_IRQ, au1xmmc_irq, SA_INTERRUPT, "MMC", 0); | 889 | ret = request_irq(AU1100_SD_IRQ, au1xmmc_irq, IRQF_DISABLED, "MMC", 0); |
890 | 890 | ||
891 | if (ret) { | 891 | if (ret) { |
892 | printk(DRIVER_NAME "ERROR: Couldn't get int %d: %d\n", | 892 | printk(DRIVER_NAME "ERROR: Couldn't get int %d: %d\n", |
diff --git a/drivers/mmc/mmci.c b/drivers/mmc/mmci.c index 9dfb34a857e3..1886562abdd4 100644 --- a/drivers/mmc/mmci.c +++ b/drivers/mmc/mmci.c | |||
@@ -531,11 +531,11 @@ static int mmci_probe(struct amba_device *dev, void *id) | |||
531 | writel(0, host->base + MMCIMASK1); | 531 | writel(0, host->base + MMCIMASK1); |
532 | writel(0xfff, host->base + MMCICLEAR); | 532 | writel(0xfff, host->base + MMCICLEAR); |
533 | 533 | ||
534 | ret = request_irq(dev->irq[0], mmci_irq, SA_SHIRQ, DRIVER_NAME " (cmd)", host); | 534 | ret = request_irq(dev->irq[0], mmci_irq, IRQF_SHARED, DRIVER_NAME " (cmd)", host); |
535 | if (ret) | 535 | if (ret) |
536 | goto unmap; | 536 | goto unmap; |
537 | 537 | ||
538 | ret = request_irq(dev->irq[1], mmci_pio_irq, SA_SHIRQ, DRIVER_NAME " (pio)", host); | 538 | ret = request_irq(dev->irq[1], mmci_pio_irq, IRQF_SHARED, DRIVER_NAME " (pio)", host); |
539 | if (ret) | 539 | if (ret) |
540 | goto irq0_free; | 540 | goto irq0_free; |
541 | 541 | ||
diff --git a/drivers/mmc/omap.c b/drivers/mmc/omap.c index 7a4840ec53b7..ddf06b32c159 100644 --- a/drivers/mmc/omap.c +++ b/drivers/mmc/omap.c | |||
@@ -60,6 +60,7 @@ struct mmc_omap_host { | |||
60 | unsigned char id; /* 16xx chips have 2 MMC blocks */ | 60 | unsigned char id; /* 16xx chips have 2 MMC blocks */ |
61 | struct clk * iclk; | 61 | struct clk * iclk; |
62 | struct clk * fclk; | 62 | struct clk * fclk; |
63 | struct resource *res; | ||
63 | void __iomem *base; | 64 | void __iomem *base; |
64 | int irq; | 65 | int irq; |
65 | unsigned char bus_mode; | 66 | unsigned char bus_mode; |
@@ -339,8 +340,6 @@ static void | |||
339 | mmc_omap_xfer_data(struct mmc_omap_host *host, int write) | 340 | mmc_omap_xfer_data(struct mmc_omap_host *host, int write) |
340 | { | 341 | { |
341 | int n; | 342 | int n; |
342 | void __iomem *reg; | ||
343 | u16 *p; | ||
344 | 343 | ||
345 | if (host->buffer_bytes_left == 0) { | 344 | if (host->buffer_bytes_left == 0) { |
346 | host->sg_idx++; | 345 | host->sg_idx++; |
@@ -657,12 +656,12 @@ static void mmc_omap_dma_cb(int lch, u16 ch_status, void *data) | |||
657 | struct mmc_data *mmcdat = host->data; | 656 | struct mmc_data *mmcdat = host->data; |
658 | 657 | ||
659 | if (unlikely(host->dma_ch < 0)) { | 658 | if (unlikely(host->dma_ch < 0)) { |
660 | dev_err(mmc_dev(host->mmc), "DMA callback while DMA not | 659 | dev_err(mmc_dev(host->mmc), |
661 | enabled\n"); | 660 | "DMA callback while DMA not enabled\n"); |
662 | return; | 661 | return; |
663 | } | 662 | } |
664 | /* FIXME: We really should do something to _handle_ the errors */ | 663 | /* FIXME: We really should do something to _handle_ the errors */ |
665 | if (ch_status & OMAP_DMA_TOUT_IRQ) { | 664 | if (ch_status & OMAP1_DMA_TOUT_IRQ) { |
666 | dev_err(mmc_dev(host->mmc),"DMA timeout\n"); | 665 | dev_err(mmc_dev(host->mmc),"DMA timeout\n"); |
667 | return; | 666 | return; |
668 | } | 667 | } |
@@ -972,20 +971,20 @@ static int __init mmc_omap_probe(struct platform_device *pdev) | |||
972 | struct omap_mmc_conf *minfo = pdev->dev.platform_data; | 971 | struct omap_mmc_conf *minfo = pdev->dev.platform_data; |
973 | struct mmc_host *mmc; | 972 | struct mmc_host *mmc; |
974 | struct mmc_omap_host *host = NULL; | 973 | struct mmc_omap_host *host = NULL; |
974 | struct resource *r; | ||
975 | int ret = 0; | 975 | int ret = 0; |
976 | int irq; | ||
976 | 977 | ||
977 | if (platform_get_resource(pdev, IORESOURCE_MEM, 0) || | 978 | r = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
978 | platform_get_irq(pdev, IORESOURCE_IRQ, 0)) { | 979 | irq = platform_get_irq(pdev, 0); |
979 | dev_err(&pdev->dev, "mmc_omap_probe: invalid resource type\n"); | 980 | if (!r || irq < 0) |
980 | return -ENODEV; | 981 | return -ENXIO; |
981 | } | ||
982 | 982 | ||
983 | if (!request_mem_region(pdev->resource[0].start, | 983 | r = request_mem_region(pdev->resource[0].start, |
984 | pdev->resource[0].end - pdev->resource[0].start + 1, | 984 | pdev->resource[0].end - pdev->resource[0].start + 1, |
985 | pdev->name)) { | 985 | pdev->name); |
986 | dev_dbg(&pdev->dev, "request_mem_region failed\n"); | 986 | if (!r) |
987 | return -EBUSY; | 987 | return -EBUSY; |
988 | } | ||
989 | 988 | ||
990 | mmc = mmc_alloc_host(sizeof(struct mmc_omap_host), &pdev->dev); | 989 | mmc = mmc_alloc_host(sizeof(struct mmc_omap_host), &pdev->dev); |
991 | if (!mmc) { | 990 | if (!mmc) { |
@@ -1002,6 +1001,8 @@ static int __init mmc_omap_probe(struct platform_device *pdev) | |||
1002 | host->dma_timer.data = (unsigned long) host; | 1001 | host->dma_timer.data = (unsigned long) host; |
1003 | 1002 | ||
1004 | host->id = pdev->id; | 1003 | host->id = pdev->id; |
1004 | host->res = r; | ||
1005 | host->irq = irq; | ||
1005 | 1006 | ||
1006 | if (cpu_is_omap24xx()) { | 1007 | if (cpu_is_omap24xx()) { |
1007 | host->iclk = clk_get(&pdev->dev, "mmc_ick"); | 1008 | host->iclk = clk_get(&pdev->dev, "mmc_ick"); |
@@ -1031,13 +1032,9 @@ static int __init mmc_omap_probe(struct platform_device *pdev) | |||
1031 | host->dma_ch = -1; | 1032 | host->dma_ch = -1; |
1032 | 1033 | ||
1033 | host->irq = pdev->resource[1].start; | 1034 | host->irq = pdev->resource[1].start; |
1034 | host->base = ioremap(pdev->res.start, SZ_4K); | 1035 | host->base = (void __iomem*)IO_ADDRESS(r->start); |
1035 | if (!host->base) { | ||
1036 | ret = -ENOMEM; | ||
1037 | goto out; | ||
1038 | } | ||
1039 | 1036 | ||
1040 | if (minfo->wire4) | 1037 | if (minfo->wire4) |
1041 | mmc->caps |= MMC_CAP_4_BIT_DATA; | 1038 | mmc->caps |= MMC_CAP_4_BIT_DATA; |
1042 | 1039 | ||
1043 | mmc->ops = &mmc_omap_ops; | 1040 | mmc->ops = &mmc_omap_ops; |
@@ -1056,8 +1053,8 @@ static int __init mmc_omap_probe(struct platform_device *pdev) | |||
1056 | 1053 | ||
1057 | if (host->power_pin >= 0) { | 1054 | if (host->power_pin >= 0) { |
1058 | if ((ret = omap_request_gpio(host->power_pin)) != 0) { | 1055 | if ((ret = omap_request_gpio(host->power_pin)) != 0) { |
1059 | dev_err(mmc_dev(host->mmc), "Unable to get GPIO | 1056 | dev_err(mmc_dev(host->mmc), |
1060 | pin for MMC power\n"); | 1057 | "Unable to get GPIO pin for MMC power\n"); |
1061 | goto out; | 1058 | goto out; |
1062 | } | 1059 | } |
1063 | omap_set_gpio_direction(host->power_pin, 0); | 1060 | omap_set_gpio_direction(host->power_pin, 0); |
@@ -1085,7 +1082,7 @@ static int __init mmc_omap_probe(struct platform_device *pdev) | |||
1085 | 1082 | ||
1086 | omap_set_gpio_direction(host->switch_pin, 1); | 1083 | omap_set_gpio_direction(host->switch_pin, 1); |
1087 | ret = request_irq(OMAP_GPIO_IRQ(host->switch_pin), | 1084 | ret = request_irq(OMAP_GPIO_IRQ(host->switch_pin), |
1088 | mmc_omap_switch_irq, SA_TRIGGER_RISING, DRIVER_NAME, host); | 1085 | mmc_omap_switch_irq, IRQF_TRIGGER_RISING, DRIVER_NAME, host); |
1089 | if (ret) { | 1086 | if (ret) { |
1090 | dev_warn(mmc_dev(host->mmc), "Unable to get IRQ for MMC cover switch\n"); | 1087 | dev_warn(mmc_dev(host->mmc), "Unable to get IRQ for MMC cover switch\n"); |
1091 | omap_free_gpio(host->switch_pin); | 1088 | omap_free_gpio(host->switch_pin); |
@@ -1099,7 +1096,7 @@ static int __init mmc_omap_probe(struct platform_device *pdev) | |||
1099 | device_remove_file(&pdev->dev, &dev_attr_cover_switch); | 1096 | device_remove_file(&pdev->dev, &dev_attr_cover_switch); |
1100 | } | 1097 | } |
1101 | if (ret) { | 1098 | if (ret) { |
1102 | dev_wan(mmc_dev(host->mmc), "Unable to create sysfs attributes\n"); | 1099 | dev_warn(mmc_dev(host->mmc), "Unable to create sysfs attributes\n"); |
1103 | free_irq(OMAP_GPIO_IRQ(host->switch_pin), host); | 1100 | free_irq(OMAP_GPIO_IRQ(host->switch_pin), host); |
1104 | omap_free_gpio(host->switch_pin); | 1101 | omap_free_gpio(host->switch_pin); |
1105 | host->switch_pin = -1; | 1102 | host->switch_pin = -1; |
diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c index 8e9100bd57ef..74134699ccee 100644 --- a/drivers/mmc/sdhci.c +++ b/drivers/mmc/sdhci.c | |||
@@ -8,12 +8,6 @@ | |||
8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | /* | ||
12 | * Note that PIO transfer is rather crappy atm. The buffer full/empty | ||
13 | * interrupts aren't reliable so we currently transfer the entire buffer | ||
14 | * directly. Patches to solve the problem are welcome. | ||
15 | */ | ||
16 | |||
17 | #include <linux/delay.h> | 11 | #include <linux/delay.h> |
18 | #include <linux/highmem.h> | 12 | #include <linux/highmem.h> |
19 | #include <linux/pci.h> | 13 | #include <linux/pci.h> |
@@ -27,13 +21,17 @@ | |||
27 | #include "sdhci.h" | 21 | #include "sdhci.h" |
28 | 22 | ||
29 | #define DRIVER_NAME "sdhci" | 23 | #define DRIVER_NAME "sdhci" |
30 | #define DRIVER_VERSION "0.11" | 24 | #define DRIVER_VERSION "0.12" |
31 | 25 | ||
32 | #define BUGMAIL "<sdhci-devel@list.drzeus.cx>" | 26 | #define BUGMAIL "<sdhci-devel@list.drzeus.cx>" |
33 | 27 | ||
34 | #define DBG(f, x...) \ | 28 | #define DBG(f, x...) \ |
35 | pr_debug(DRIVER_NAME " [%s()]: " f, __func__,## x) | 29 | pr_debug(DRIVER_NAME " [%s()]: " f, __func__,## x) |
36 | 30 | ||
31 | static unsigned int debug_nodma = 0; | ||
32 | static unsigned int debug_forcedma = 0; | ||
33 | static unsigned int debug_quirks = 0; | ||
34 | |||
37 | static const struct pci_device_id pci_ids[] __devinitdata = { | 35 | static const struct pci_device_id pci_ids[] __devinitdata = { |
38 | /* handle any SD host controller */ | 36 | /* handle any SD host controller */ |
39 | {PCI_DEVICE_CLASS((PCI_CLASS_SYSTEM_SDHCI << 8), 0xFFFF00)}, | 37 | {PCI_DEVICE_CLASS((PCI_CLASS_SYSTEM_SDHCI << 8), 0xFFFF00)}, |
@@ -94,12 +92,27 @@ static void sdhci_dumpregs(struct sdhci_host *host) | |||
94 | 92 | ||
95 | static void sdhci_reset(struct sdhci_host *host, u8 mask) | 93 | static void sdhci_reset(struct sdhci_host *host, u8 mask) |
96 | { | 94 | { |
95 | unsigned long timeout; | ||
96 | |||
97 | writeb(mask, host->ioaddr + SDHCI_SOFTWARE_RESET); | 97 | writeb(mask, host->ioaddr + SDHCI_SOFTWARE_RESET); |
98 | 98 | ||
99 | if (mask & SDHCI_RESET_ALL) { | 99 | if (mask & SDHCI_RESET_ALL) |
100 | host->clock = 0; | 100 | host->clock = 0; |
101 | 101 | ||
102 | mdelay(50); | 102 | /* Wait max 100 ms */ |
103 | timeout = 100; | ||
104 | |||
105 | /* hw clears the bit when it's done */ | ||
106 | while (readb(host->ioaddr + SDHCI_SOFTWARE_RESET) & mask) { | ||
107 | if (timeout == 0) { | ||
108 | printk(KERN_ERR "%s: Reset 0x%x never completed. " | ||
109 | "Please report this to " BUGMAIL ".\n", | ||
110 | mmc_hostname(host->mmc), (int)mask); | ||
111 | sdhci_dumpregs(host); | ||
112 | return; | ||
113 | } | ||
114 | timeout--; | ||
115 | mdelay(1); | ||
103 | } | 116 | } |
104 | } | 117 | } |
105 | 118 | ||
@@ -109,13 +122,15 @@ static void sdhci_init(struct sdhci_host *host) | |||
109 | 122 | ||
110 | sdhci_reset(host, SDHCI_RESET_ALL); | 123 | sdhci_reset(host, SDHCI_RESET_ALL); |
111 | 124 | ||
112 | intmask = ~(SDHCI_INT_CARD_INT | SDHCI_INT_BUF_EMPTY | SDHCI_INT_BUF_FULL); | 125 | intmask = SDHCI_INT_BUS_POWER | SDHCI_INT_DATA_END_BIT | |
126 | SDHCI_INT_DATA_CRC | SDHCI_INT_DATA_TIMEOUT | SDHCI_INT_INDEX | | ||
127 | SDHCI_INT_END_BIT | SDHCI_INT_CRC | SDHCI_INT_TIMEOUT | | ||
128 | SDHCI_INT_CARD_REMOVE | SDHCI_INT_CARD_INSERT | | ||
129 | SDHCI_INT_DATA_AVAIL | SDHCI_INT_SPACE_AVAIL | | ||
130 | SDHCI_INT_DMA_END | SDHCI_INT_DATA_END | SDHCI_INT_RESPONSE; | ||
113 | 131 | ||
114 | writel(intmask, host->ioaddr + SDHCI_INT_ENABLE); | 132 | writel(intmask, host->ioaddr + SDHCI_INT_ENABLE); |
115 | writel(intmask, host->ioaddr + SDHCI_SIGNAL_ENABLE); | 133 | writel(intmask, host->ioaddr + SDHCI_SIGNAL_ENABLE); |
116 | |||
117 | /* This is unknown magic. */ | ||
118 | writeb(0xE, host->ioaddr + SDHCI_TIMEOUT_CONTROL); | ||
119 | } | 134 | } |
120 | 135 | ||
121 | static void sdhci_activate_led(struct sdhci_host *host) | 136 | static void sdhci_activate_led(struct sdhci_host *host) |
@@ -172,79 +187,96 @@ static inline int sdhci_next_sg(struct sdhci_host* host) | |||
172 | return host->num_sg; | 187 | return host->num_sg; |
173 | } | 188 | } |
174 | 189 | ||
175 | static void sdhci_transfer_pio(struct sdhci_host *host) | 190 | static void sdhci_read_block_pio(struct sdhci_host *host) |
176 | { | 191 | { |
192 | int blksize, chunk_remain; | ||
193 | u32 data; | ||
177 | char *buffer; | 194 | char *buffer; |
178 | u32 mask; | 195 | int size; |
179 | int bytes, size; | ||
180 | unsigned long max_jiffies; | ||
181 | |||
182 | BUG_ON(!host->data); | ||
183 | 196 | ||
184 | if (host->num_sg == 0) | 197 | DBG("PIO reading\n"); |
185 | return; | ||
186 | 198 | ||
187 | bytes = 0; | 199 | blksize = host->data->blksz; |
188 | if (host->data->flags & MMC_DATA_READ) | 200 | chunk_remain = 0; |
189 | mask = SDHCI_DATA_AVAILABLE; | 201 | data = 0; |
190 | else | ||
191 | mask = SDHCI_SPACE_AVAILABLE; | ||
192 | 202 | ||
193 | buffer = sdhci_kmap_sg(host) + host->offset; | 203 | buffer = sdhci_kmap_sg(host) + host->offset; |
194 | 204 | ||
195 | /* Transfer shouldn't take more than 5 s */ | 205 | while (blksize) { |
196 | max_jiffies = jiffies + HZ * 5; | 206 | if (chunk_remain == 0) { |
207 | data = readl(host->ioaddr + SDHCI_BUFFER); | ||
208 | chunk_remain = min(blksize, 4); | ||
209 | } | ||
197 | 210 | ||
198 | while (host->size > 0) { | 211 | size = min(host->size, host->remain); |
199 | if (time_after(jiffies, max_jiffies)) { | 212 | size = min(size, chunk_remain); |
200 | printk(KERN_ERR "%s: PIO transfer stalled. " | ||
201 | "Please report this to " | ||
202 | BUGMAIL ".\n", mmc_hostname(host->mmc)); | ||
203 | sdhci_dumpregs(host); | ||
204 | 213 | ||
205 | sdhci_kunmap_sg(host); | 214 | chunk_remain -= size; |
215 | blksize -= size; | ||
216 | host->offset += size; | ||
217 | host->remain -= size; | ||
218 | host->size -= size; | ||
219 | while (size) { | ||
220 | *buffer = data & 0xFF; | ||
221 | buffer++; | ||
222 | data >>= 8; | ||
223 | size--; | ||
224 | } | ||
206 | 225 | ||
207 | host->data->error = MMC_ERR_FAILED; | 226 | if (host->remain == 0) { |
208 | sdhci_finish_data(host); | 227 | sdhci_kunmap_sg(host); |
209 | return; | 228 | if (sdhci_next_sg(host) == 0) { |
229 | BUG_ON(blksize != 0); | ||
230 | return; | ||
231 | } | ||
232 | buffer = sdhci_kmap_sg(host); | ||
210 | } | 233 | } |
234 | } | ||
211 | 235 | ||
212 | if (!(readl(host->ioaddr + SDHCI_PRESENT_STATE) & mask)) | 236 | sdhci_kunmap_sg(host); |
213 | continue; | 237 | } |
214 | 238 | ||
215 | size = min(host->size, host->remain); | 239 | static void sdhci_write_block_pio(struct sdhci_host *host) |
240 | { | ||
241 | int blksize, chunk_remain; | ||
242 | u32 data; | ||
243 | char *buffer; | ||
244 | int bytes, size; | ||
216 | 245 | ||
217 | if (size >= 4) { | 246 | DBG("PIO writing\n"); |
218 | if (host->data->flags & MMC_DATA_READ) | 247 | |
219 | *(u32*)buffer = readl(host->ioaddr + SDHCI_BUFFER); | 248 | blksize = host->data->blksz; |
220 | else | 249 | chunk_remain = 4; |
221 | writel(*(u32*)buffer, host->ioaddr + SDHCI_BUFFER); | 250 | data = 0; |
222 | size = 4; | ||
223 | } else if (size >= 2) { | ||
224 | if (host->data->flags & MMC_DATA_READ) | ||
225 | *(u16*)buffer = readw(host->ioaddr + SDHCI_BUFFER); | ||
226 | else | ||
227 | writew(*(u16*)buffer, host->ioaddr + SDHCI_BUFFER); | ||
228 | size = 2; | ||
229 | } else { | ||
230 | if (host->data->flags & MMC_DATA_READ) | ||
231 | *(u8*)buffer = readb(host->ioaddr + SDHCI_BUFFER); | ||
232 | else | ||
233 | writeb(*(u8*)buffer, host->ioaddr + SDHCI_BUFFER); | ||
234 | size = 1; | ||
235 | } | ||
236 | 251 | ||
237 | buffer += size; | 252 | bytes = 0; |
253 | buffer = sdhci_kmap_sg(host) + host->offset; | ||
254 | |||
255 | while (blksize) { | ||
256 | size = min(host->size, host->remain); | ||
257 | size = min(size, chunk_remain); | ||
258 | |||
259 | chunk_remain -= size; | ||
260 | blksize -= size; | ||
238 | host->offset += size; | 261 | host->offset += size; |
239 | host->remain -= size; | 262 | host->remain -= size; |
240 | |||
241 | bytes += size; | ||
242 | host->size -= size; | 263 | host->size -= size; |
264 | while (size) { | ||
265 | data >>= 8; | ||
266 | data |= (u32)*buffer << 24; | ||
267 | buffer++; | ||
268 | size--; | ||
269 | } | ||
270 | |||
271 | if (chunk_remain == 0) { | ||
272 | writel(data, host->ioaddr + SDHCI_BUFFER); | ||
273 | chunk_remain = min(blksize, 4); | ||
274 | } | ||
243 | 275 | ||
244 | if (host->remain == 0) { | 276 | if (host->remain == 0) { |
245 | sdhci_kunmap_sg(host); | 277 | sdhci_kunmap_sg(host); |
246 | if (sdhci_next_sg(host) == 0) { | 278 | if (sdhci_next_sg(host) == 0) { |
247 | DBG("PIO transfer: %d bytes\n", bytes); | 279 | BUG_ON(blksize != 0); |
248 | return; | 280 | return; |
249 | } | 281 | } |
250 | buffer = sdhci_kmap_sg(host); | 282 | buffer = sdhci_kmap_sg(host); |
@@ -252,38 +284,87 @@ static void sdhci_transfer_pio(struct sdhci_host *host) | |||
252 | } | 284 | } |
253 | 285 | ||
254 | sdhci_kunmap_sg(host); | 286 | sdhci_kunmap_sg(host); |
287 | } | ||
288 | |||
289 | static void sdhci_transfer_pio(struct sdhci_host *host) | ||
290 | { | ||
291 | u32 mask; | ||
292 | |||
293 | BUG_ON(!host->data); | ||
294 | |||
295 | if (host->size == 0) | ||
296 | return; | ||
297 | |||
298 | if (host->data->flags & MMC_DATA_READ) | ||
299 | mask = SDHCI_DATA_AVAILABLE; | ||
300 | else | ||
301 | mask = SDHCI_SPACE_AVAILABLE; | ||
302 | |||
303 | while (readl(host->ioaddr + SDHCI_PRESENT_STATE) & mask) { | ||
304 | if (host->data->flags & MMC_DATA_READ) | ||
305 | sdhci_read_block_pio(host); | ||
306 | else | ||
307 | sdhci_write_block_pio(host); | ||
255 | 308 | ||
256 | DBG("PIO transfer: %d bytes\n", bytes); | 309 | if (host->size == 0) |
310 | break; | ||
311 | |||
312 | BUG_ON(host->num_sg == 0); | ||
313 | } | ||
314 | |||
315 | DBG("PIO transfer complete.\n"); | ||
257 | } | 316 | } |
258 | 317 | ||
259 | static void sdhci_prepare_data(struct sdhci_host *host, struct mmc_data *data) | 318 | static void sdhci_prepare_data(struct sdhci_host *host, struct mmc_data *data) |
260 | { | 319 | { |
261 | u16 mode; | 320 | u8 count; |
321 | unsigned target_timeout, current_timeout; | ||
262 | 322 | ||
263 | WARN_ON(host->data); | 323 | WARN_ON(host->data); |
264 | 324 | ||
265 | if (data == NULL) { | 325 | if (data == NULL) |
266 | writew(0, host->ioaddr + SDHCI_TRANSFER_MODE); | ||
267 | return; | 326 | return; |
268 | } | ||
269 | 327 | ||
270 | DBG("blksz %04x blks %04x flags %08x\n", | 328 | DBG("blksz %04x blks %04x flags %08x\n", |
271 | data->blksz, data->blocks, data->flags); | 329 | data->blksz, data->blocks, data->flags); |
272 | DBG("tsac %d ms nsac %d clk\n", | 330 | DBG("tsac %d ms nsac %d clk\n", |
273 | data->timeout_ns / 1000000, data->timeout_clks); | 331 | data->timeout_ns / 1000000, data->timeout_clks); |
274 | 332 | ||
275 | mode = SDHCI_TRNS_BLK_CNT_EN; | 333 | /* Sanity checks */ |
276 | if (data->blocks > 1) | 334 | BUG_ON(data->blksz * data->blocks > 524288); |
277 | mode |= SDHCI_TRNS_MULTI; | 335 | BUG_ON(data->blksz > host->max_block); |
278 | if (data->flags & MMC_DATA_READ) | 336 | BUG_ON(data->blocks > 65535); |
279 | mode |= SDHCI_TRNS_READ; | ||
280 | if (host->flags & SDHCI_USE_DMA) | ||
281 | mode |= SDHCI_TRNS_DMA; | ||
282 | 337 | ||
283 | writew(mode, host->ioaddr + SDHCI_TRANSFER_MODE); | 338 | /* timeout in us */ |
339 | target_timeout = data->timeout_ns / 1000 + | ||
340 | data->timeout_clks / host->clock; | ||
284 | 341 | ||
285 | writew(data->blksz, host->ioaddr + SDHCI_BLOCK_SIZE); | 342 | /* |
286 | writew(data->blocks, host->ioaddr + SDHCI_BLOCK_COUNT); | 343 | * Figure out needed cycles. |
344 | * We do this in steps in order to fit inside a 32 bit int. | ||
345 | * The first step is the minimum timeout, which will have a | ||
346 | * minimum resolution of 6 bits: | ||
347 | * (1) 2^13*1000 > 2^22, | ||
348 | * (2) host->timeout_clk < 2^16 | ||
349 | * => | ||
350 | * (1) / (2) > 2^6 | ||
351 | */ | ||
352 | count = 0; | ||
353 | current_timeout = (1 << 13) * 1000 / host->timeout_clk; | ||
354 | while (current_timeout < target_timeout) { | ||
355 | count++; | ||
356 | current_timeout <<= 1; | ||
357 | if (count >= 0xF) | ||
358 | break; | ||
359 | } | ||
360 | |||
361 | if (count >= 0xF) { | ||
362 | printk(KERN_WARNING "%s: Too large timeout requested!\n", | ||
363 | mmc_hostname(host->mmc)); | ||
364 | count = 0xE; | ||
365 | } | ||
366 | |||
367 | writeb(count, host->ioaddr + SDHCI_TIMEOUT_CONTROL); | ||
287 | 368 | ||
288 | if (host->flags & SDHCI_USE_DMA) { | 369 | if (host->flags & SDHCI_USE_DMA) { |
289 | int count; | 370 | int count; |
@@ -302,12 +383,37 @@ static void sdhci_prepare_data(struct sdhci_host *host, struct mmc_data *data) | |||
302 | host->offset = 0; | 383 | host->offset = 0; |
303 | host->remain = host->cur_sg->length; | 384 | host->remain = host->cur_sg->length; |
304 | } | 385 | } |
386 | |||
387 | /* We do not handle DMA boundaries, so set it to max (512 KiB) */ | ||
388 | writew(SDHCI_MAKE_BLKSZ(7, data->blksz), | ||
389 | host->ioaddr + SDHCI_BLOCK_SIZE); | ||
390 | writew(data->blocks, host->ioaddr + SDHCI_BLOCK_COUNT); | ||
391 | } | ||
392 | |||
393 | static void sdhci_set_transfer_mode(struct sdhci_host *host, | ||
394 | struct mmc_data *data) | ||
395 | { | ||
396 | u16 mode; | ||
397 | |||
398 | WARN_ON(host->data); | ||
399 | |||
400 | if (data == NULL) | ||
401 | return; | ||
402 | |||
403 | mode = SDHCI_TRNS_BLK_CNT_EN; | ||
404 | if (data->blocks > 1) | ||
405 | mode |= SDHCI_TRNS_MULTI; | ||
406 | if (data->flags & MMC_DATA_READ) | ||
407 | mode |= SDHCI_TRNS_READ; | ||
408 | if (host->flags & SDHCI_USE_DMA) | ||
409 | mode |= SDHCI_TRNS_DMA; | ||
410 | |||
411 | writew(mode, host->ioaddr + SDHCI_TRANSFER_MODE); | ||
305 | } | 412 | } |
306 | 413 | ||
307 | static void sdhci_finish_data(struct sdhci_host *host) | 414 | static void sdhci_finish_data(struct sdhci_host *host) |
308 | { | 415 | { |
309 | struct mmc_data *data; | 416 | struct mmc_data *data; |
310 | u32 intmask; | ||
311 | u16 blocks; | 417 | u16 blocks; |
312 | 418 | ||
313 | BUG_ON(!host->data); | 419 | BUG_ON(!host->data); |
@@ -318,14 +424,6 @@ static void sdhci_finish_data(struct sdhci_host *host) | |||
318 | if (host->flags & SDHCI_USE_DMA) { | 424 | if (host->flags & SDHCI_USE_DMA) { |
319 | pci_unmap_sg(host->chip->pdev, data->sg, data->sg_len, | 425 | pci_unmap_sg(host->chip->pdev, data->sg, data->sg_len, |
320 | (data->flags & MMC_DATA_READ)?PCI_DMA_FROMDEVICE:PCI_DMA_TODEVICE); | 426 | (data->flags & MMC_DATA_READ)?PCI_DMA_FROMDEVICE:PCI_DMA_TODEVICE); |
321 | } else { | ||
322 | intmask = readl(host->ioaddr + SDHCI_SIGNAL_ENABLE); | ||
323 | intmask &= ~(SDHCI_INT_BUF_EMPTY | SDHCI_INT_BUF_FULL); | ||
324 | writel(intmask, host->ioaddr + SDHCI_SIGNAL_ENABLE); | ||
325 | |||
326 | intmask = readl(host->ioaddr + SDHCI_INT_ENABLE); | ||
327 | intmask &= ~(SDHCI_INT_BUF_EMPTY | SDHCI_INT_BUF_FULL); | ||
328 | writel(intmask, host->ioaddr + SDHCI_INT_ENABLE); | ||
329 | } | 427 | } |
330 | 428 | ||
331 | /* | 429 | /* |
@@ -371,27 +469,38 @@ static void sdhci_finish_data(struct sdhci_host *host) | |||
371 | static void sdhci_send_command(struct sdhci_host *host, struct mmc_command *cmd) | 469 | static void sdhci_send_command(struct sdhci_host *host, struct mmc_command *cmd) |
372 | { | 470 | { |
373 | int flags; | 471 | int flags; |
374 | u32 present; | 472 | u32 mask; |
375 | unsigned long max_jiffies; | 473 | unsigned long timeout; |
376 | 474 | ||
377 | WARN_ON(host->cmd); | 475 | WARN_ON(host->cmd); |
378 | 476 | ||
379 | DBG("Sending cmd (%x)\n", cmd->opcode); | 477 | DBG("Sending cmd (%x)\n", cmd->opcode); |
380 | 478 | ||
381 | /* Wait max 10 ms */ | 479 | /* Wait max 10 ms */ |
382 | max_jiffies = jiffies + (HZ + 99)/100; | 480 | timeout = 10; |
383 | do { | 481 | |
384 | if (time_after(jiffies, max_jiffies)) { | 482 | mask = SDHCI_CMD_INHIBIT; |
483 | if ((cmd->data != NULL) || (cmd->flags & MMC_RSP_BUSY)) | ||
484 | mask |= SDHCI_DATA_INHIBIT; | ||
485 | |||
486 | /* We shouldn't wait for data inihibit for stop commands, even | ||
487 | though they might use busy signaling */ | ||
488 | if (host->mrq->data && (cmd == host->mrq->data->stop)) | ||
489 | mask &= ~SDHCI_DATA_INHIBIT; | ||
490 | |||
491 | while (readl(host->ioaddr + SDHCI_PRESENT_STATE) & mask) { | ||
492 | if (timeout == 0) { | ||
385 | printk(KERN_ERR "%s: Controller never released " | 493 | printk(KERN_ERR "%s: Controller never released " |
386 | "inhibit bits. Please report this to " | 494 | "inhibit bit(s). Please report this to " |
387 | BUGMAIL ".\n", mmc_hostname(host->mmc)); | 495 | BUGMAIL ".\n", mmc_hostname(host->mmc)); |
388 | sdhci_dumpregs(host); | 496 | sdhci_dumpregs(host); |
389 | cmd->error = MMC_ERR_FAILED; | 497 | cmd->error = MMC_ERR_FAILED; |
390 | tasklet_schedule(&host->finish_tasklet); | 498 | tasklet_schedule(&host->finish_tasklet); |
391 | return; | 499 | return; |
392 | } | 500 | } |
393 | present = readl(host->ioaddr + SDHCI_PRESENT_STATE); | 501 | timeout--; |
394 | } while (present & (SDHCI_CMD_INHIBIT | SDHCI_DATA_INHIBIT)); | 502 | mdelay(1); |
503 | } | ||
395 | 504 | ||
396 | mod_timer(&host->timer, jiffies + 10 * HZ); | 505 | mod_timer(&host->timer, jiffies + 10 * HZ); |
397 | 506 | ||
@@ -401,6 +510,8 @@ static void sdhci_send_command(struct sdhci_host *host, struct mmc_command *cmd) | |||
401 | 510 | ||
402 | writel(cmd->arg, host->ioaddr + SDHCI_ARGUMENT); | 511 | writel(cmd->arg, host->ioaddr + SDHCI_ARGUMENT); |
403 | 512 | ||
513 | sdhci_set_transfer_mode(host, cmd->data); | ||
514 | |||
404 | if ((cmd->flags & MMC_RSP_136) && (cmd->flags & MMC_RSP_BUSY)) { | 515 | if ((cmd->flags & MMC_RSP_136) && (cmd->flags & MMC_RSP_BUSY)) { |
405 | printk(KERN_ERR "%s: Unsupported response type! " | 516 | printk(KERN_ERR "%s: Unsupported response type! " |
406 | "Please report this to " BUGMAIL ".\n", | 517 | "Please report this to " BUGMAIL ".\n", |
@@ -456,31 +567,9 @@ static void sdhci_finish_command(struct sdhci_host *host) | |||
456 | 567 | ||
457 | DBG("Ending cmd (%x)\n", host->cmd->opcode); | 568 | DBG("Ending cmd (%x)\n", host->cmd->opcode); |
458 | 569 | ||
459 | if (host->cmd->data) { | 570 | if (host->cmd->data) |
460 | u32 intmask; | ||
461 | |||
462 | host->data = host->cmd->data; | 571 | host->data = host->cmd->data; |
463 | 572 | else | |
464 | if (!(host->flags & SDHCI_USE_DMA)) { | ||
465 | /* | ||
466 | * Don't enable the interrupts until now to make sure we | ||
467 | * get stable handling of the FIFO. | ||
468 | */ | ||
469 | intmask = readl(host->ioaddr + SDHCI_INT_ENABLE); | ||
470 | intmask |= SDHCI_INT_BUF_EMPTY | SDHCI_INT_BUF_FULL; | ||
471 | writel(intmask, host->ioaddr + SDHCI_INT_ENABLE); | ||
472 | |||
473 | intmask = readl(host->ioaddr + SDHCI_SIGNAL_ENABLE); | ||
474 | intmask |= SDHCI_INT_BUF_EMPTY | SDHCI_INT_BUF_FULL; | ||
475 | writel(intmask, host->ioaddr + SDHCI_SIGNAL_ENABLE); | ||
476 | |||
477 | /* | ||
478 | * The buffer interrupts are to unreliable so we | ||
479 | * start the transfer immediatly. | ||
480 | */ | ||
481 | sdhci_transfer_pio(host); | ||
482 | } | ||
483 | } else | ||
484 | tasklet_schedule(&host->finish_tasklet); | 573 | tasklet_schedule(&host->finish_tasklet); |
485 | 574 | ||
486 | host->cmd = NULL; | 575 | host->cmd = NULL; |
@@ -490,7 +579,7 @@ static void sdhci_set_clock(struct sdhci_host *host, unsigned int clock) | |||
490 | { | 579 | { |
491 | int div; | 580 | int div; |
492 | u16 clk; | 581 | u16 clk; |
493 | unsigned long max_jiffies; | 582 | unsigned long timeout; |
494 | 583 | ||
495 | if (clock == host->clock) | 584 | if (clock == host->clock) |
496 | return; | 585 | return; |
@@ -511,17 +600,19 @@ static void sdhci_set_clock(struct sdhci_host *host, unsigned int clock) | |||
511 | writew(clk, host->ioaddr + SDHCI_CLOCK_CONTROL); | 600 | writew(clk, host->ioaddr + SDHCI_CLOCK_CONTROL); |
512 | 601 | ||
513 | /* Wait max 10 ms */ | 602 | /* Wait max 10 ms */ |
514 | max_jiffies = jiffies + (HZ + 99)/100; | 603 | timeout = 10; |
515 | do { | 604 | while (!((clk = readw(host->ioaddr + SDHCI_CLOCK_CONTROL)) |
516 | if (time_after(jiffies, max_jiffies)) { | 605 | & SDHCI_CLOCK_INT_STABLE)) { |
606 | if (timeout == 0) { | ||
517 | printk(KERN_ERR "%s: Internal clock never stabilised. " | 607 | printk(KERN_ERR "%s: Internal clock never stabilised. " |
518 | "Please report this to " BUGMAIL ".\n", | 608 | "Please report this to " BUGMAIL ".\n", |
519 | mmc_hostname(host->mmc)); | 609 | mmc_hostname(host->mmc)); |
520 | sdhci_dumpregs(host); | 610 | sdhci_dumpregs(host); |
521 | return; | 611 | return; |
522 | } | 612 | } |
523 | clk = readw(host->ioaddr + SDHCI_CLOCK_CONTROL); | 613 | timeout--; |
524 | } while (!(clk & SDHCI_CLOCK_INT_STABLE)); | 614 | mdelay(1); |
615 | } | ||
525 | 616 | ||
526 | clk |= SDHCI_CLOCK_CARD_EN; | 617 | clk |= SDHCI_CLOCK_CARD_EN; |
527 | writew(clk, host->ioaddr + SDHCI_CLOCK_CONTROL); | 618 | writew(clk, host->ioaddr + SDHCI_CLOCK_CONTROL); |
@@ -530,6 +621,46 @@ out: | |||
530 | host->clock = clock; | 621 | host->clock = clock; |
531 | } | 622 | } |
532 | 623 | ||
624 | static void sdhci_set_power(struct sdhci_host *host, unsigned short power) | ||
625 | { | ||
626 | u8 pwr; | ||
627 | |||
628 | if (host->power == power) | ||
629 | return; | ||
630 | |||
631 | writeb(0, host->ioaddr + SDHCI_POWER_CONTROL); | ||
632 | |||
633 | if (power == (unsigned short)-1) | ||
634 | goto out; | ||
635 | |||
636 | pwr = SDHCI_POWER_ON; | ||
637 | |||
638 | switch (power) { | ||
639 | case MMC_VDD_170: | ||
640 | case MMC_VDD_180: | ||
641 | case MMC_VDD_190: | ||
642 | pwr |= SDHCI_POWER_180; | ||
643 | break; | ||
644 | case MMC_VDD_290: | ||
645 | case MMC_VDD_300: | ||
646 | case MMC_VDD_310: | ||
647 | pwr |= SDHCI_POWER_300; | ||
648 | break; | ||
649 | case MMC_VDD_320: | ||
650 | case MMC_VDD_330: | ||
651 | case MMC_VDD_340: | ||
652 | pwr |= SDHCI_POWER_330; | ||
653 | break; | ||
654 | default: | ||
655 | BUG(); | ||
656 | } | ||
657 | |||
658 | writeb(pwr, host->ioaddr + SDHCI_POWER_CONTROL); | ||
659 | |||
660 | out: | ||
661 | host->power = power; | ||
662 | } | ||
663 | |||
533 | /*****************************************************************************\ | 664 | /*****************************************************************************\ |
534 | * * | 665 | * * |
535 | * MMC callbacks * | 666 | * MMC callbacks * |
@@ -576,17 +707,15 @@ static void sdhci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) | |||
576 | */ | 707 | */ |
577 | if (ios->power_mode == MMC_POWER_OFF) { | 708 | if (ios->power_mode == MMC_POWER_OFF) { |
578 | writel(0, host->ioaddr + SDHCI_SIGNAL_ENABLE); | 709 | writel(0, host->ioaddr + SDHCI_SIGNAL_ENABLE); |
579 | spin_unlock_irqrestore(&host->lock, flags); | ||
580 | sdhci_init(host); | 710 | sdhci_init(host); |
581 | spin_lock_irqsave(&host->lock, flags); | ||
582 | } | 711 | } |
583 | 712 | ||
584 | sdhci_set_clock(host, ios->clock); | 713 | sdhci_set_clock(host, ios->clock); |
585 | 714 | ||
586 | if (ios->power_mode == MMC_POWER_OFF) | 715 | if (ios->power_mode == MMC_POWER_OFF) |
587 | writeb(0, host->ioaddr + SDHCI_POWER_CONTROL); | 716 | sdhci_set_power(host, -1); |
588 | else | 717 | else |
589 | writeb(0xFF, host->ioaddr + SDHCI_POWER_CONTROL); | 718 | sdhci_set_power(host, ios->vdd); |
590 | 719 | ||
591 | ctrl = readb(host->ioaddr + SDHCI_HOST_CONTROL); | 720 | ctrl = readb(host->ioaddr + SDHCI_HOST_CONTROL); |
592 | if (ios->bus_width == MMC_BUS_WIDTH_4) | 721 | if (ios->bus_width == MMC_BUS_WIDTH_4) |
@@ -793,7 +922,7 @@ static void sdhci_data_irq(struct sdhci_host *host, u32 intmask) | |||
793 | if (host->data->error != MMC_ERR_NONE) | 922 | if (host->data->error != MMC_ERR_NONE) |
794 | sdhci_finish_data(host); | 923 | sdhci_finish_data(host); |
795 | else { | 924 | else { |
796 | if (intmask & (SDHCI_INT_BUF_FULL | SDHCI_INT_BUF_EMPTY)) | 925 | if (intmask & (SDHCI_INT_DATA_AVAIL | SDHCI_INT_SPACE_AVAIL)) |
797 | sdhci_transfer_pio(host); | 926 | sdhci_transfer_pio(host); |
798 | 927 | ||
799 | if (intmask & SDHCI_INT_DATA_END) | 928 | if (intmask & SDHCI_INT_DATA_END) |
@@ -818,50 +947,44 @@ static irqreturn_t sdhci_irq(int irq, void *dev_id, struct pt_regs *regs) | |||
818 | 947 | ||
819 | DBG("*** %s got interrupt: 0x%08x\n", host->slot_descr, intmask); | 948 | DBG("*** %s got interrupt: 0x%08x\n", host->slot_descr, intmask); |
820 | 949 | ||
821 | if (intmask & (SDHCI_INT_CARD_INSERT | SDHCI_INT_CARD_REMOVE)) | 950 | if (intmask & (SDHCI_INT_CARD_INSERT | SDHCI_INT_CARD_REMOVE)) { |
951 | writel(intmask & (SDHCI_INT_CARD_INSERT | SDHCI_INT_CARD_REMOVE), | ||
952 | host->ioaddr + SDHCI_INT_STATUS); | ||
822 | tasklet_schedule(&host->card_tasklet); | 953 | tasklet_schedule(&host->card_tasklet); |
954 | } | ||
823 | 955 | ||
824 | if (intmask & SDHCI_INT_CMD_MASK) { | 956 | intmask &= ~(SDHCI_INT_CARD_INSERT | SDHCI_INT_CARD_REMOVE); |
825 | sdhci_cmd_irq(host, intmask & SDHCI_INT_CMD_MASK); | ||
826 | 957 | ||
958 | if (intmask & SDHCI_INT_CMD_MASK) { | ||
827 | writel(intmask & SDHCI_INT_CMD_MASK, | 959 | writel(intmask & SDHCI_INT_CMD_MASK, |
828 | host->ioaddr + SDHCI_INT_STATUS); | 960 | host->ioaddr + SDHCI_INT_STATUS); |
961 | sdhci_cmd_irq(host, intmask & SDHCI_INT_CMD_MASK); | ||
829 | } | 962 | } |
830 | 963 | ||
831 | if (intmask & SDHCI_INT_DATA_MASK) { | 964 | if (intmask & SDHCI_INT_DATA_MASK) { |
832 | sdhci_data_irq(host, intmask & SDHCI_INT_DATA_MASK); | ||
833 | |||
834 | writel(intmask & SDHCI_INT_DATA_MASK, | 965 | writel(intmask & SDHCI_INT_DATA_MASK, |
835 | host->ioaddr + SDHCI_INT_STATUS); | 966 | host->ioaddr + SDHCI_INT_STATUS); |
967 | sdhci_data_irq(host, intmask & SDHCI_INT_DATA_MASK); | ||
836 | } | 968 | } |
837 | 969 | ||
838 | intmask &= ~(SDHCI_INT_CMD_MASK | SDHCI_INT_DATA_MASK); | 970 | intmask &= ~(SDHCI_INT_CMD_MASK | SDHCI_INT_DATA_MASK); |
839 | 971 | ||
840 | if (intmask & SDHCI_INT_CARD_INT) { | ||
841 | printk(KERN_ERR "%s: Unexpected card interrupt. Please " | ||
842 | "report this to " BUGMAIL ".\n", | ||
843 | mmc_hostname(host->mmc)); | ||
844 | sdhci_dumpregs(host); | ||
845 | } | ||
846 | |||
847 | if (intmask & SDHCI_INT_BUS_POWER) { | 972 | if (intmask & SDHCI_INT_BUS_POWER) { |
848 | printk(KERN_ERR "%s: Unexpected bus power interrupt. Please " | 973 | printk(KERN_ERR "%s: Card is consuming too much power!\n", |
849 | "report this to " BUGMAIL ".\n", | ||
850 | mmc_hostname(host->mmc)); | 974 | mmc_hostname(host->mmc)); |
851 | sdhci_dumpregs(host); | 975 | writel(SDHCI_INT_BUS_POWER, host->ioaddr + SDHCI_INT_STATUS); |
852 | } | 976 | } |
853 | 977 | ||
854 | if (intmask & SDHCI_INT_ACMD12ERR) { | 978 | intmask &= SDHCI_INT_BUS_POWER; |
855 | printk(KERN_ERR "%s: Unexpected auto CMD12 error. Please " | 979 | |
980 | if (intmask) { | ||
981 | printk(KERN_ERR "%s: Unexpected interrupt 0x%08x. Please " | ||
856 | "report this to " BUGMAIL ".\n", | 982 | "report this to " BUGMAIL ".\n", |
857 | mmc_hostname(host->mmc)); | 983 | mmc_hostname(host->mmc), intmask); |
858 | sdhci_dumpregs(host); | 984 | sdhci_dumpregs(host); |
859 | 985 | ||
860 | writew(~0, host->ioaddr + SDHCI_ACMD12_ERR); | ||
861 | } | ||
862 | |||
863 | if (intmask) | ||
864 | writel(intmask, host->ioaddr + SDHCI_INT_STATUS); | 986 | writel(intmask, host->ioaddr + SDHCI_INT_STATUS); |
987 | } | ||
865 | 988 | ||
866 | result = IRQ_HANDLED; | 989 | result = IRQ_HANDLED; |
867 | 990 | ||
@@ -954,6 +1077,7 @@ static int sdhci_resume (struct pci_dev *pdev) | |||
954 | static int __devinit sdhci_probe_slot(struct pci_dev *pdev, int slot) | 1077 | static int __devinit sdhci_probe_slot(struct pci_dev *pdev, int slot) |
955 | { | 1078 | { |
956 | int ret; | 1079 | int ret; |
1080 | unsigned int version; | ||
957 | struct sdhci_chip *chip; | 1081 | struct sdhci_chip *chip; |
958 | struct mmc_host *mmc; | 1082 | struct mmc_host *mmc; |
959 | struct sdhci_host *host; | 1083 | struct sdhci_host *host; |
@@ -985,6 +1109,16 @@ static int __devinit sdhci_probe_slot(struct pci_dev *pdev, int slot) | |||
985 | return -ENODEV; | 1109 | return -ENODEV; |
986 | } | 1110 | } |
987 | 1111 | ||
1112 | if ((pdev->class & 0x0000FF) == PCI_SDHCI_IFVENDOR) { | ||
1113 | printk(KERN_ERR DRIVER_NAME ": Vendor specific interface. Aborting.\n"); | ||
1114 | return -ENODEV; | ||
1115 | } | ||
1116 | |||
1117 | if ((pdev->class & 0x0000FF) > PCI_SDHCI_IFVENDOR) { | ||
1118 | printk(KERN_ERR DRIVER_NAME ": Unknown interface. Aborting.\n"); | ||
1119 | return -ENODEV; | ||
1120 | } | ||
1121 | |||
988 | mmc = mmc_alloc_host(sizeof(struct sdhci_host), &pdev->dev); | 1122 | mmc = mmc_alloc_host(sizeof(struct sdhci_host), &pdev->dev); |
989 | if (!mmc) | 1123 | if (!mmc) |
990 | return -ENOMEM; | 1124 | return -ENOMEM; |
@@ -1012,9 +1146,30 @@ static int __devinit sdhci_probe_slot(struct pci_dev *pdev, int slot) | |||
1012 | goto release; | 1146 | goto release; |
1013 | } | 1147 | } |
1014 | 1148 | ||
1149 | sdhci_reset(host, SDHCI_RESET_ALL); | ||
1150 | |||
1151 | version = readw(host->ioaddr + SDHCI_HOST_VERSION); | ||
1152 | version = (version & SDHCI_SPEC_VER_MASK) >> SDHCI_SPEC_VER_SHIFT; | ||
1153 | if (version != 0) { | ||
1154 | printk(KERN_ERR "%s: Unknown controller version (%d). " | ||
1155 | "Cowardly refusing to continue.\n", host->slot_descr, | ||
1156 | version); | ||
1157 | ret = -ENODEV; | ||
1158 | goto unmap; | ||
1159 | } | ||
1160 | |||
1015 | caps = readl(host->ioaddr + SDHCI_CAPABILITIES); | 1161 | caps = readl(host->ioaddr + SDHCI_CAPABILITIES); |
1016 | 1162 | ||
1017 | if ((caps & SDHCI_CAN_DO_DMA) && ((pdev->class & 0x0000FF) == 0x01)) | 1163 | if (debug_nodma) |
1164 | DBG("DMA forced off\n"); | ||
1165 | else if (debug_forcedma) { | ||
1166 | DBG("DMA forced on\n"); | ||
1167 | host->flags |= SDHCI_USE_DMA; | ||
1168 | } else if ((pdev->class & 0x0000FF) != PCI_SDHCI_IFDMA) | ||
1169 | DBG("Controller doesn't have DMA interface\n"); | ||
1170 | else if (!(caps & SDHCI_CAN_DO_DMA)) | ||
1171 | DBG("Controller doesn't have DMA capability\n"); | ||
1172 | else | ||
1018 | host->flags |= SDHCI_USE_DMA; | 1173 | host->flags |= SDHCI_USE_DMA; |
1019 | 1174 | ||
1020 | if (host->flags & SDHCI_USE_DMA) { | 1175 | if (host->flags & SDHCI_USE_DMA) { |
@@ -1030,18 +1185,59 @@ static int __devinit sdhci_probe_slot(struct pci_dev *pdev, int slot) | |||
1030 | else /* XXX: Hack to get MMC layer to avoid highmem */ | 1185 | else /* XXX: Hack to get MMC layer to avoid highmem */ |
1031 | pdev->dma_mask = 0; | 1186 | pdev->dma_mask = 0; |
1032 | 1187 | ||
1033 | host->max_clk = (caps & SDHCI_CLOCK_BASE_MASK) >> SDHCI_CLOCK_BASE_SHIFT; | 1188 | host->max_clk = |
1189 | (caps & SDHCI_CLOCK_BASE_MASK) >> SDHCI_CLOCK_BASE_SHIFT; | ||
1190 | if (host->max_clk == 0) { | ||
1191 | printk(KERN_ERR "%s: Hardware doesn't specify base clock " | ||
1192 | "frequency.\n", host->slot_descr); | ||
1193 | ret = -ENODEV; | ||
1194 | goto unmap; | ||
1195 | } | ||
1034 | host->max_clk *= 1000000; | 1196 | host->max_clk *= 1000000; |
1035 | 1197 | ||
1198 | host->timeout_clk = | ||
1199 | (caps & SDHCI_TIMEOUT_CLK_MASK) >> SDHCI_TIMEOUT_CLK_SHIFT; | ||
1200 | if (host->timeout_clk == 0) { | ||
1201 | printk(KERN_ERR "%s: Hardware doesn't specify timeout clock " | ||
1202 | "frequency.\n", host->slot_descr); | ||
1203 | ret = -ENODEV; | ||
1204 | goto unmap; | ||
1205 | } | ||
1206 | if (caps & SDHCI_TIMEOUT_CLK_UNIT) | ||
1207 | host->timeout_clk *= 1000; | ||
1208 | |||
1209 | host->max_block = (caps & SDHCI_MAX_BLOCK_MASK) >> SDHCI_MAX_BLOCK_SHIFT; | ||
1210 | if (host->max_block >= 3) { | ||
1211 | printk(KERN_ERR "%s: Invalid maximum block size.\n", | ||
1212 | host->slot_descr); | ||
1213 | ret = -ENODEV; | ||
1214 | goto unmap; | ||
1215 | } | ||
1216 | host->max_block = 512 << host->max_block; | ||
1217 | |||
1036 | /* | 1218 | /* |
1037 | * Set host parameters. | 1219 | * Set host parameters. |
1038 | */ | 1220 | */ |
1039 | mmc->ops = &sdhci_ops; | 1221 | mmc->ops = &sdhci_ops; |
1040 | mmc->f_min = host->max_clk / 256; | 1222 | mmc->f_min = host->max_clk / 256; |
1041 | mmc->f_max = host->max_clk; | 1223 | mmc->f_max = host->max_clk; |
1042 | mmc->ocr_avail = MMC_VDD_32_33|MMC_VDD_33_34; | ||
1043 | mmc->caps = MMC_CAP_4_BIT_DATA; | 1224 | mmc->caps = MMC_CAP_4_BIT_DATA; |
1044 | 1225 | ||
1226 | mmc->ocr_avail = 0; | ||
1227 | if (caps & SDHCI_CAN_VDD_330) | ||
1228 | mmc->ocr_avail |= MMC_VDD_32_33|MMC_VDD_33_34; | ||
1229 | else if (caps & SDHCI_CAN_VDD_300) | ||
1230 | mmc->ocr_avail |= MMC_VDD_29_30|MMC_VDD_30_31; | ||
1231 | else if (caps & SDHCI_CAN_VDD_180) | ||
1232 | mmc->ocr_avail |= MMC_VDD_17_18|MMC_VDD_18_19; | ||
1233 | |||
1234 | if (mmc->ocr_avail == 0) { | ||
1235 | printk(KERN_ERR "%s: Hardware doesn't report any " | ||
1236 | "support voltages.\n", host->slot_descr); | ||
1237 | ret = -ENODEV; | ||
1238 | goto unmap; | ||
1239 | } | ||
1240 | |||
1045 | spin_lock_init(&host->lock); | 1241 | spin_lock_init(&host->lock); |
1046 | 1242 | ||
1047 | /* | 1243 | /* |
@@ -1054,10 +1250,10 @@ static int __devinit sdhci_probe_slot(struct pci_dev *pdev, int slot) | |||
1054 | mmc->max_phys_segs = 16; | 1250 | mmc->max_phys_segs = 16; |
1055 | 1251 | ||
1056 | /* | 1252 | /* |
1057 | * Maximum number of sectors in one transfer. Limited by sector | 1253 | * Maximum number of sectors in one transfer. Limited by DMA boundary |
1058 | * count register. | 1254 | * size (512KiB), which means (512 KiB/512=) 1024 entries. |
1059 | */ | 1255 | */ |
1060 | mmc->max_sectors = 0x3FFF; | 1256 | mmc->max_sectors = 1024; |
1061 | 1257 | ||
1062 | /* | 1258 | /* |
1063 | * Maximum segment size. Could be one segment with the maximum number | 1259 | * Maximum segment size. Could be one segment with the maximum number |
@@ -1075,10 +1271,10 @@ static int __devinit sdhci_probe_slot(struct pci_dev *pdev, int slot) | |||
1075 | 1271 | ||
1076 | setup_timer(&host->timer, sdhci_timeout_timer, (long)host); | 1272 | setup_timer(&host->timer, sdhci_timeout_timer, (long)host); |
1077 | 1273 | ||
1078 | ret = request_irq(host->irq, sdhci_irq, SA_SHIRQ, | 1274 | ret = request_irq(host->irq, sdhci_irq, IRQF_SHARED, |
1079 | host->slot_descr, host); | 1275 | host->slot_descr, host); |
1080 | if (ret) | 1276 | if (ret) |
1081 | goto unmap; | 1277 | goto untasklet; |
1082 | 1278 | ||
1083 | sdhci_init(host); | 1279 | sdhci_init(host); |
1084 | 1280 | ||
@@ -1097,10 +1293,10 @@ static int __devinit sdhci_probe_slot(struct pci_dev *pdev, int slot) | |||
1097 | 1293 | ||
1098 | return 0; | 1294 | return 0; |
1099 | 1295 | ||
1100 | unmap: | 1296 | untasklet: |
1101 | tasklet_kill(&host->card_tasklet); | 1297 | tasklet_kill(&host->card_tasklet); |
1102 | tasklet_kill(&host->finish_tasklet); | 1298 | tasklet_kill(&host->finish_tasklet); |
1103 | 1299 | unmap: | |
1104 | iounmap(host->ioaddr); | 1300 | iounmap(host->ioaddr); |
1105 | release: | 1301 | release: |
1106 | pci_release_region(pdev, host->bar); | 1302 | pci_release_region(pdev, host->bar); |
@@ -1144,13 +1340,18 @@ static int __devinit sdhci_probe(struct pci_dev *pdev, | |||
1144 | const struct pci_device_id *ent) | 1340 | const struct pci_device_id *ent) |
1145 | { | 1341 | { |
1146 | int ret, i; | 1342 | int ret, i; |
1147 | u8 slots; | 1343 | u8 slots, rev; |
1148 | struct sdhci_chip *chip; | 1344 | struct sdhci_chip *chip; |
1149 | 1345 | ||
1150 | BUG_ON(pdev == NULL); | 1346 | BUG_ON(pdev == NULL); |
1151 | BUG_ON(ent == NULL); | 1347 | BUG_ON(ent == NULL); |
1152 | 1348 | ||
1153 | DBG("found at %s\n", pci_name(pdev)); | 1349 | pci_read_config_byte(pdev, PCI_CLASS_REVISION, &rev); |
1350 | |||
1351 | printk(KERN_INFO DRIVER_NAME | ||
1352 | ": SDHCI controller found at %s [%04x:%04x] (rev %x)\n", | ||
1353 | pci_name(pdev), (int)pdev->vendor, (int)pdev->device, | ||
1354 | (int)rev); | ||
1154 | 1355 | ||
1155 | ret = pci_read_config_byte(pdev, PCI_SLOT_INFO, &slots); | 1356 | ret = pci_read_config_byte(pdev, PCI_SLOT_INFO, &slots); |
1156 | if (ret) | 1357 | if (ret) |
@@ -1173,6 +1374,10 @@ static int __devinit sdhci_probe(struct pci_dev *pdev, | |||
1173 | } | 1374 | } |
1174 | 1375 | ||
1175 | chip->pdev = pdev; | 1376 | chip->pdev = pdev; |
1377 | chip->quirks = ent->driver_data; | ||
1378 | |||
1379 | if (debug_quirks) | ||
1380 | chip->quirks = debug_quirks; | ||
1176 | 1381 | ||
1177 | chip->num_slots = slots; | 1382 | chip->num_slots = slots; |
1178 | pci_set_drvdata(pdev, chip); | 1383 | pci_set_drvdata(pdev, chip); |
@@ -1251,7 +1456,15 @@ static void __exit sdhci_drv_exit(void) | |||
1251 | module_init(sdhci_drv_init); | 1456 | module_init(sdhci_drv_init); |
1252 | module_exit(sdhci_drv_exit); | 1457 | module_exit(sdhci_drv_exit); |
1253 | 1458 | ||
1459 | module_param(debug_nodma, uint, 0444); | ||
1460 | module_param(debug_forcedma, uint, 0444); | ||
1461 | module_param(debug_quirks, uint, 0444); | ||
1462 | |||
1254 | MODULE_AUTHOR("Pierre Ossman <drzeus@drzeus.cx>"); | 1463 | MODULE_AUTHOR("Pierre Ossman <drzeus@drzeus.cx>"); |
1255 | MODULE_DESCRIPTION("Secure Digital Host Controller Interface driver"); | 1464 | MODULE_DESCRIPTION("Secure Digital Host Controller Interface driver"); |
1256 | MODULE_VERSION(DRIVER_VERSION); | 1465 | MODULE_VERSION(DRIVER_VERSION); |
1257 | MODULE_LICENSE("GPL"); | 1466 | MODULE_LICENSE("GPL"); |
1467 | |||
1468 | MODULE_PARM_DESC(debug_nodma, "Forcefully disable DMA transfers. (default 0)"); | ||
1469 | MODULE_PARM_DESC(debug_forcedma, "Forcefully enable DMA transfers. (default 0)"); | ||
1470 | MODULE_PARM_DESC(debug_quirks, "Force certain quirks."); | ||
diff --git a/drivers/mmc/sdhci.h b/drivers/mmc/sdhci.h index 3b270ef486b4..f2453343f783 100644 --- a/drivers/mmc/sdhci.h +++ b/drivers/mmc/sdhci.h | |||
@@ -12,6 +12,10 @@ | |||
12 | * PCI registers | 12 | * PCI registers |
13 | */ | 13 | */ |
14 | 14 | ||
15 | #define PCI_SDHCI_IFPIO 0x00 | ||
16 | #define PCI_SDHCI_IFDMA 0x01 | ||
17 | #define PCI_SDHCI_IFVENDOR 0x02 | ||
18 | |||
15 | #define PCI_SLOT_INFO 0x40 /* 8 bits */ | 19 | #define PCI_SLOT_INFO 0x40 /* 8 bits */ |
16 | #define PCI_SLOT_INFO_SLOTS(x) ((x >> 4) & 7) | 20 | #define PCI_SLOT_INFO_SLOTS(x) ((x >> 4) & 7) |
17 | #define PCI_SLOT_INFO_FIRST_BAR_MASK 0x07 | 21 | #define PCI_SLOT_INFO_FIRST_BAR_MASK 0x07 |
@@ -23,6 +27,7 @@ | |||
23 | #define SDHCI_DMA_ADDRESS 0x00 | 27 | #define SDHCI_DMA_ADDRESS 0x00 |
24 | 28 | ||
25 | #define SDHCI_BLOCK_SIZE 0x04 | 29 | #define SDHCI_BLOCK_SIZE 0x04 |
30 | #define SDHCI_MAKE_BLKSZ(dma, blksz) (((dma & 0x7) << 12) | (blksz & 0xFFF)) | ||
26 | 31 | ||
27 | #define SDHCI_BLOCK_COUNT 0x06 | 32 | #define SDHCI_BLOCK_COUNT 0x06 |
28 | 33 | ||
@@ -67,6 +72,10 @@ | |||
67 | #define SDHCI_CTRL_4BITBUS 0x02 | 72 | #define SDHCI_CTRL_4BITBUS 0x02 |
68 | 73 | ||
69 | #define SDHCI_POWER_CONTROL 0x29 | 74 | #define SDHCI_POWER_CONTROL 0x29 |
75 | #define SDHCI_POWER_ON 0x01 | ||
76 | #define SDHCI_POWER_180 0x0A | ||
77 | #define SDHCI_POWER_300 0x0C | ||
78 | #define SDHCI_POWER_330 0x0E | ||
70 | 79 | ||
71 | #define SDHCI_BLOCK_GAP_CONTROL 0x2A | 80 | #define SDHCI_BLOCK_GAP_CONTROL 0x2A |
72 | 81 | ||
@@ -91,8 +100,8 @@ | |||
91 | #define SDHCI_INT_RESPONSE 0x00000001 | 100 | #define SDHCI_INT_RESPONSE 0x00000001 |
92 | #define SDHCI_INT_DATA_END 0x00000002 | 101 | #define SDHCI_INT_DATA_END 0x00000002 |
93 | #define SDHCI_INT_DMA_END 0x00000008 | 102 | #define SDHCI_INT_DMA_END 0x00000008 |
94 | #define SDHCI_INT_BUF_EMPTY 0x00000010 | 103 | #define SDHCI_INT_SPACE_AVAIL 0x00000010 |
95 | #define SDHCI_INT_BUF_FULL 0x00000020 | 104 | #define SDHCI_INT_DATA_AVAIL 0x00000020 |
96 | #define SDHCI_INT_CARD_INSERT 0x00000040 | 105 | #define SDHCI_INT_CARD_INSERT 0x00000040 |
97 | #define SDHCI_INT_CARD_REMOVE 0x00000080 | 106 | #define SDHCI_INT_CARD_REMOVE 0x00000080 |
98 | #define SDHCI_INT_CARD_INT 0x00000100 | 107 | #define SDHCI_INT_CARD_INT 0x00000100 |
@@ -112,7 +121,7 @@ | |||
112 | #define SDHCI_INT_CMD_MASK (SDHCI_INT_RESPONSE | SDHCI_INT_TIMEOUT | \ | 121 | #define SDHCI_INT_CMD_MASK (SDHCI_INT_RESPONSE | SDHCI_INT_TIMEOUT | \ |
113 | SDHCI_INT_CRC | SDHCI_INT_END_BIT | SDHCI_INT_INDEX) | 122 | SDHCI_INT_CRC | SDHCI_INT_END_BIT | SDHCI_INT_INDEX) |
114 | #define SDHCI_INT_DATA_MASK (SDHCI_INT_DATA_END | SDHCI_INT_DMA_END | \ | 123 | #define SDHCI_INT_DATA_MASK (SDHCI_INT_DATA_END | SDHCI_INT_DMA_END | \ |
115 | SDHCI_INT_BUF_EMPTY | SDHCI_INT_BUF_FULL | \ | 124 | SDHCI_INT_DATA_AVAIL | SDHCI_INT_SPACE_AVAIL | \ |
116 | SDHCI_INT_DATA_TIMEOUT | SDHCI_INT_DATA_CRC | \ | 125 | SDHCI_INT_DATA_TIMEOUT | SDHCI_INT_DATA_CRC | \ |
117 | SDHCI_INT_DATA_END_BIT) | 126 | SDHCI_INT_DATA_END_BIT) |
118 | 127 | ||
@@ -121,9 +130,17 @@ | |||
121 | /* 3E-3F reserved */ | 130 | /* 3E-3F reserved */ |
122 | 131 | ||
123 | #define SDHCI_CAPABILITIES 0x40 | 132 | #define SDHCI_CAPABILITIES 0x40 |
124 | #define SDHCI_CAN_DO_DMA 0x00400000 | 133 | #define SDHCI_TIMEOUT_CLK_MASK 0x0000003F |
134 | #define SDHCI_TIMEOUT_CLK_SHIFT 0 | ||
135 | #define SDHCI_TIMEOUT_CLK_UNIT 0x00000080 | ||
125 | #define SDHCI_CLOCK_BASE_MASK 0x00003F00 | 136 | #define SDHCI_CLOCK_BASE_MASK 0x00003F00 |
126 | #define SDHCI_CLOCK_BASE_SHIFT 8 | 137 | #define SDHCI_CLOCK_BASE_SHIFT 8 |
138 | #define SDHCI_MAX_BLOCK_MASK 0x00030000 | ||
139 | #define SDHCI_MAX_BLOCK_SHIFT 16 | ||
140 | #define SDHCI_CAN_DO_DMA 0x00400000 | ||
141 | #define SDHCI_CAN_VDD_330 0x01000000 | ||
142 | #define SDHCI_CAN_VDD_300 0x02000000 | ||
143 | #define SDHCI_CAN_VDD_180 0x04000000 | ||
127 | 144 | ||
128 | /* 44-47 reserved for more caps */ | 145 | /* 44-47 reserved for more caps */ |
129 | 146 | ||
@@ -136,6 +153,10 @@ | |||
136 | #define SDHCI_SLOT_INT_STATUS 0xFC | 153 | #define SDHCI_SLOT_INT_STATUS 0xFC |
137 | 154 | ||
138 | #define SDHCI_HOST_VERSION 0xFE | 155 | #define SDHCI_HOST_VERSION 0xFE |
156 | #define SDHCI_VENDOR_VER_MASK 0xFF00 | ||
157 | #define SDHCI_VENDOR_VER_SHIFT 8 | ||
158 | #define SDHCI_SPEC_VER_MASK 0x00FF | ||
159 | #define SDHCI_SPEC_VER_SHIFT 0 | ||
139 | 160 | ||
140 | struct sdhci_chip; | 161 | struct sdhci_chip; |
141 | 162 | ||
@@ -149,8 +170,11 @@ struct sdhci_host { | |||
149 | #define SDHCI_USE_DMA (1<<0) | 170 | #define SDHCI_USE_DMA (1<<0) |
150 | 171 | ||
151 | unsigned int max_clk; /* Max possible freq (MHz) */ | 172 | unsigned int max_clk; /* Max possible freq (MHz) */ |
173 | unsigned int timeout_clk; /* Timeout freq (KHz) */ | ||
174 | unsigned int max_block; /* Max block size (bytes) */ | ||
152 | 175 | ||
153 | unsigned int clock; /* Current clock (MHz) */ | 176 | unsigned int clock; /* Current clock (MHz) */ |
177 | unsigned short power; /* Current voltage */ | ||
154 | 178 | ||
155 | struct mmc_request *mrq; /* Current request */ | 179 | struct mmc_request *mrq; /* Current request */ |
156 | struct mmc_command *cmd; /* Current command */ | 180 | struct mmc_command *cmd; /* Current command */ |
@@ -180,6 +204,8 @@ struct sdhci_host { | |||
180 | struct sdhci_chip { | 204 | struct sdhci_chip { |
181 | struct pci_dev *pdev; | 205 | struct pci_dev *pdev; |
182 | 206 | ||
207 | unsigned long quirks; | ||
208 | |||
183 | int num_slots; /* Slots on controller */ | 209 | int num_slots; /* Slots on controller */ |
184 | struct sdhci_host *hosts[0]; /* Pointers to hosts */ | 210 | struct sdhci_host *hosts[0]; /* Pointers to hosts */ |
185 | }; | 211 | }; |
diff --git a/drivers/mmc/wbsd.c b/drivers/mmc/wbsd.c index 3fcd86c08ebd..8a30ef3ae419 100644 --- a/drivers/mmc/wbsd.c +++ b/drivers/mmc/wbsd.c | |||
@@ -1553,7 +1553,7 @@ static int __devinit wbsd_request_irq(struct wbsd_host *host, int irq) | |||
1553 | * Allocate interrupt. | 1553 | * Allocate interrupt. |
1554 | */ | 1554 | */ |
1555 | 1555 | ||
1556 | ret = request_irq(irq, wbsd_irq, SA_SHIRQ, DRIVER_NAME, host); | 1556 | ret = request_irq(irq, wbsd_irq, IRQF_SHARED, DRIVER_NAME, host); |
1557 | if (ret) | 1557 | if (ret) |
1558 | return ret; | 1558 | return ret; |
1559 | 1559 | ||
diff --git a/drivers/net/3c515.c b/drivers/net/3c515.c index ac60f3f62db8..4532b17e40ea 100644 --- a/drivers/net/3c515.c +++ b/drivers/net/3c515.c | |||
@@ -760,7 +760,7 @@ static int corkscrew_open(struct net_device *dev) | |||
760 | vp->product_name, dev)) return -EAGAIN; | 760 | vp->product_name, dev)) return -EAGAIN; |
761 | enable_dma(dev->dma); | 761 | enable_dma(dev->dma); |
762 | set_dma_mode(dev->dma, DMA_MODE_CASCADE); | 762 | set_dma_mode(dev->dma, DMA_MODE_CASCADE); |
763 | } else if (request_irq(dev->irq, &corkscrew_interrupt, SA_SHIRQ, | 763 | } else if (request_irq(dev->irq, &corkscrew_interrupt, IRQF_SHARED, |
764 | vp->product_name, dev)) { | 764 | vp->product_name, dev)) { |
765 | return -EAGAIN; | 765 | return -EAGAIN; |
766 | } | 766 | } |
diff --git a/drivers/net/3c523.c b/drivers/net/3c523.c index 4bf8510655c5..5dfd97f0ba9e 100644 --- a/drivers/net/3c523.c +++ b/drivers/net/3c523.c | |||
@@ -289,7 +289,7 @@ static int elmc_open(struct net_device *dev) | |||
289 | 289 | ||
290 | elmc_id_attn586(); /* disable interrupts */ | 290 | elmc_id_attn586(); /* disable interrupts */ |
291 | 291 | ||
292 | ret = request_irq(dev->irq, &elmc_interrupt, SA_SHIRQ | SA_SAMPLE_RANDOM, | 292 | ret = request_irq(dev->irq, &elmc_interrupt, IRQF_SHARED | IRQF_SAMPLE_RANDOM, |
293 | dev->name, dev); | 293 | dev->name, dev); |
294 | if (ret) { | 294 | if (ret) { |
295 | printk(KERN_ERR "%s: couldn't get irq %d\n", dev->name, dev->irq); | 295 | printk(KERN_ERR "%s: couldn't get irq %d\n", dev->name, dev->irq); |
diff --git a/drivers/net/3c527.c b/drivers/net/3c527.c index 157eda573925..03c0f7176fc9 100644 --- a/drivers/net/3c527.c +++ b/drivers/net/3c527.c | |||
@@ -435,7 +435,7 @@ static int __init mc32_probe1(struct net_device *dev, int slot) | |||
435 | * Grab the IRQ | 435 | * Grab the IRQ |
436 | */ | 436 | */ |
437 | 437 | ||
438 | err = request_irq(dev->irq, &mc32_interrupt, SA_SHIRQ | SA_SAMPLE_RANDOM, DRV_NAME, dev); | 438 | err = request_irq(dev->irq, &mc32_interrupt, IRQF_SHARED | IRQF_SAMPLE_RANDOM, DRV_NAME, dev); |
439 | if (err) { | 439 | if (err) { |
440 | release_region(dev->base_addr, MC32_IO_EXTENT); | 440 | release_region(dev->base_addr, MC32_IO_EXTENT); |
441 | printk(KERN_ERR "%s: unable to get IRQ %d.\n", DRV_NAME, dev->irq); | 441 | printk(KERN_ERR "%s: unable to get IRQ %d.\n", DRV_NAME, dev->irq); |
diff --git a/drivers/net/3c59x.c b/drivers/net/3c59x.c index 45125db44177..8ab03b4a885e 100644 --- a/drivers/net/3c59x.c +++ b/drivers/net/3c59x.c | |||
@@ -996,7 +996,7 @@ static int vortex_resume(struct pci_dev *pdev) | |||
996 | pci_enable_device(pdev); | 996 | pci_enable_device(pdev); |
997 | pci_set_master(pdev); | 997 | pci_set_master(pdev); |
998 | if (request_irq(dev->irq, vp->full_bus_master_rx ? | 998 | if (request_irq(dev->irq, vp->full_bus_master_rx ? |
999 | &boomerang_interrupt : &vortex_interrupt, SA_SHIRQ, dev->name, dev)) { | 999 | &boomerang_interrupt : &vortex_interrupt, IRQF_SHARED, dev->name, dev)) { |
1000 | printk(KERN_WARNING "%s: Could not reserve IRQ %d\n", dev->name, dev->irq); | 1000 | printk(KERN_WARNING "%s: Could not reserve IRQ %d\n", dev->name, dev->irq); |
1001 | pci_disable_device(pdev); | 1001 | pci_disable_device(pdev); |
1002 | return -EBUSY; | 1002 | return -EBUSY; |
@@ -1833,7 +1833,7 @@ vortex_open(struct net_device *dev) | |||
1833 | 1833 | ||
1834 | /* Use the now-standard shared IRQ implementation. */ | 1834 | /* Use the now-standard shared IRQ implementation. */ |
1835 | if ((retval = request_irq(dev->irq, vp->full_bus_master_rx ? | 1835 | if ((retval = request_irq(dev->irq, vp->full_bus_master_rx ? |
1836 | &boomerang_interrupt : &vortex_interrupt, SA_SHIRQ, dev->name, dev))) { | 1836 | &boomerang_interrupt : &vortex_interrupt, IRQF_SHARED, dev->name, dev))) { |
1837 | printk(KERN_ERR "%s: Could not reserve IRQ %d\n", dev->name, dev->irq); | 1837 | printk(KERN_ERR "%s: Could not reserve IRQ %d\n", dev->name, dev->irq); |
1838 | goto out; | 1838 | goto out; |
1839 | } | 1839 | } |
diff --git a/drivers/net/8139cp.c b/drivers/net/8139cp.c index 1d7af760c2b1..1959654cbec8 100644 --- a/drivers/net/8139cp.c +++ b/drivers/net/8139cp.c | |||
@@ -1203,7 +1203,7 @@ static int cp_open (struct net_device *dev) | |||
1203 | 1203 | ||
1204 | cp_init_hw(cp); | 1204 | cp_init_hw(cp); |
1205 | 1205 | ||
1206 | rc = request_irq(dev->irq, cp_interrupt, SA_SHIRQ, dev->name, dev); | 1206 | rc = request_irq(dev->irq, cp_interrupt, IRQF_SHARED, dev->name, dev); |
1207 | if (rc) | 1207 | if (rc) |
1208 | goto err_out_hw; | 1208 | goto err_out_hw; |
1209 | 1209 | ||
diff --git a/drivers/net/8139too.c b/drivers/net/8139too.c index d21e98f5adbc..717506b2b13a 100644 --- a/drivers/net/8139too.c +++ b/drivers/net/8139too.c | |||
@@ -1310,7 +1310,7 @@ static int rtl8139_open (struct net_device *dev) | |||
1310 | int retval; | 1310 | int retval; |
1311 | void __iomem *ioaddr = tp->mmio_addr; | 1311 | void __iomem *ioaddr = tp->mmio_addr; |
1312 | 1312 | ||
1313 | retval = request_irq (dev->irq, rtl8139_interrupt, SA_SHIRQ, dev->name, dev); | 1313 | retval = request_irq (dev->irq, rtl8139_interrupt, IRQF_SHARED, dev->name, dev); |
1314 | if (retval) | 1314 | if (retval) |
1315 | return retval; | 1315 | return retval; |
1316 | 1316 | ||
diff --git a/drivers/net/a2065.c b/drivers/net/a2065.c index 519390c033c3..f4ea62641acd 100644 --- a/drivers/net/a2065.c +++ b/drivers/net/a2065.c | |||
@@ -495,7 +495,7 @@ static int lance_open (struct net_device *dev) | |||
495 | ll->rdp = LE_C0_STOP; | 495 | ll->rdp = LE_C0_STOP; |
496 | 496 | ||
497 | /* Install the Interrupt handler */ | 497 | /* Install the Interrupt handler */ |
498 | ret = request_irq(IRQ_AMIGA_PORTS, lance_interrupt, SA_SHIRQ, | 498 | ret = request_irq(IRQ_AMIGA_PORTS, lance_interrupt, IRQF_SHARED, |
499 | dev->name, dev); | 499 | dev->name, dev); |
500 | if (ret) return ret; | 500 | if (ret) return ret; |
501 | 501 | ||
diff --git a/drivers/net/acenic.c b/drivers/net/acenic.c index c290b5ae63b2..1c01e9b3d07c 100644 --- a/drivers/net/acenic.c +++ b/drivers/net/acenic.c | |||
@@ -1194,7 +1194,7 @@ static int __devinit ace_init(struct net_device *dev) | |||
1194 | goto init_error; | 1194 | goto init_error; |
1195 | } | 1195 | } |
1196 | 1196 | ||
1197 | ecode = request_irq(pdev->irq, ace_interrupt, SA_SHIRQ, | 1197 | ecode = request_irq(pdev->irq, ace_interrupt, IRQF_SHARED, |
1198 | DRV_NAME, dev); | 1198 | DRV_NAME, dev); |
1199 | if (ecode) { | 1199 | if (ecode) { |
1200 | printk(KERN_WARNING "%s: Requested IRQ %d is busy\n", | 1200 | printk(KERN_WARNING "%s: Requested IRQ %d is busy\n", |
diff --git a/drivers/net/amd8111e.c b/drivers/net/amd8111e.c index c017c4f6b3b5..ed322a76980d 100644 --- a/drivers/net/amd8111e.c +++ b/drivers/net/amd8111e.c | |||
@@ -1376,7 +1376,7 @@ static int amd8111e_open(struct net_device * dev ) | |||
1376 | { | 1376 | { |
1377 | struct amd8111e_priv *lp = netdev_priv(dev); | 1377 | struct amd8111e_priv *lp = netdev_priv(dev); |
1378 | 1378 | ||
1379 | if(dev->irq ==0 || request_irq(dev->irq, amd8111e_interrupt, SA_SHIRQ, | 1379 | if(dev->irq ==0 || request_irq(dev->irq, amd8111e_interrupt, IRQF_SHARED, |
1380 | dev->name, dev)) | 1380 | dev->name, dev)) |
1381 | return -EAGAIN; | 1381 | return -EAGAIN; |
1382 | 1382 | ||
diff --git a/drivers/net/apne.c b/drivers/net/apne.c index b9820b86cdcc..9cc13a0250d6 100644 --- a/drivers/net/apne.c +++ b/drivers/net/apne.c | |||
@@ -313,7 +313,7 @@ static int __init apne_probe1(struct net_device *dev, int ioaddr) | |||
313 | dev->base_addr = ioaddr; | 313 | dev->base_addr = ioaddr; |
314 | 314 | ||
315 | /* Install the Interrupt handler */ | 315 | /* Install the Interrupt handler */ |
316 | i = request_irq(IRQ_AMIGA_PORTS, apne_interrupt, SA_SHIRQ, DRV_NAME, dev); | 316 | i = request_irq(IRQ_AMIGA_PORTS, apne_interrupt, IRQF_SHARED, DRV_NAME, dev); |
317 | if (i) return i; | 317 | if (i) return i; |
318 | 318 | ||
319 | for(i = 0; i < ETHER_ADDR_LEN; i++) { | 319 | for(i = 0; i < ETHER_ADDR_LEN; i++) { |
diff --git a/drivers/net/arcnet/com20020-pci.c b/drivers/net/arcnet/com20020-pci.c index 96636ca8754e..979a33df0a8c 100644 --- a/drivers/net/arcnet/com20020-pci.c +++ b/drivers/net/arcnet/com20020-pci.c | |||
@@ -120,7 +120,7 @@ static int __devinit com20020pci_probe(struct pci_dev *pdev, const struct pci_de | |||
120 | goto out_port; | 120 | goto out_port; |
121 | } | 121 | } |
122 | 122 | ||
123 | if ((err = com20020_found(dev, SA_SHIRQ)) != 0) | 123 | if ((err = com20020_found(dev, IRQF_SHARED)) != 0) |
124 | goto out_port; | 124 | goto out_port; |
125 | 125 | ||
126 | return 0; | 126 | return 0; |
diff --git a/drivers/net/ariadne.c b/drivers/net/ariadne.c index a9bb7a4aff98..cc721addd576 100644 --- a/drivers/net/ariadne.c +++ b/drivers/net/ariadne.c | |||
@@ -320,7 +320,7 @@ static int ariadne_open(struct net_device *dev) | |||
320 | 320 | ||
321 | netif_start_queue(dev); | 321 | netif_start_queue(dev); |
322 | 322 | ||
323 | i = request_irq(IRQ_AMIGA_PORTS, ariadne_interrupt, SA_SHIRQ, | 323 | i = request_irq(IRQ_AMIGA_PORTS, ariadne_interrupt, IRQF_SHARED, |
324 | dev->name, dev); | 324 | dev->name, dev); |
325 | if (i) return i; | 325 | if (i) return i; |
326 | 326 | ||
diff --git a/drivers/net/b44.c b/drivers/net/b44.c index a7e4ba5a580f..cd98d31dee8c 100644 --- a/drivers/net/b44.c +++ b/drivers/net/b44.c | |||
@@ -1421,7 +1421,7 @@ static int b44_open(struct net_device *dev) | |||
1421 | 1421 | ||
1422 | b44_check_phy(bp); | 1422 | b44_check_phy(bp); |
1423 | 1423 | ||
1424 | err = request_irq(dev->irq, b44_interrupt, SA_SHIRQ, dev->name, dev); | 1424 | err = request_irq(dev->irq, b44_interrupt, IRQF_SHARED, dev->name, dev); |
1425 | if (unlikely(err < 0)) { | 1425 | if (unlikely(err < 0)) { |
1426 | b44_chip_reset(bp); | 1426 | b44_chip_reset(bp); |
1427 | b44_free_rings(bp); | 1427 | b44_free_rings(bp); |
@@ -2322,7 +2322,7 @@ static int b44_resume(struct pci_dev *pdev) | |||
2322 | if (!netif_running(dev)) | 2322 | if (!netif_running(dev)) |
2323 | return 0; | 2323 | return 0; |
2324 | 2324 | ||
2325 | if (request_irq(dev->irq, b44_interrupt, SA_SHIRQ, dev->name, dev)) | 2325 | if (request_irq(dev->irq, b44_interrupt, IRQF_SHARED, dev->name, dev)) |
2326 | printk(KERN_ERR PFX "%s: request_irq failed\n", dev->name); | 2326 | printk(KERN_ERR PFX "%s: request_irq failed\n", dev->name); |
2327 | 2327 | ||
2328 | spin_lock_irq(&bp->lock); | 2328 | spin_lock_irq(&bp->lock); |
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c index 7e32d4ea71e2..4f4db5ae503b 100644 --- a/drivers/net/bnx2.c +++ b/drivers/net/bnx2.c | |||
@@ -4260,11 +4260,11 @@ bnx2_open(struct net_device *dev) | |||
4260 | } | 4260 | } |
4261 | else { | 4261 | else { |
4262 | rc = request_irq(bp->pdev->irq, bnx2_interrupt, | 4262 | rc = request_irq(bp->pdev->irq, bnx2_interrupt, |
4263 | SA_SHIRQ, dev->name, dev); | 4263 | IRQF_SHARED, dev->name, dev); |
4264 | } | 4264 | } |
4265 | } | 4265 | } |
4266 | else { | 4266 | else { |
4267 | rc = request_irq(bp->pdev->irq, bnx2_interrupt, SA_SHIRQ, | 4267 | rc = request_irq(bp->pdev->irq, bnx2_interrupt, IRQF_SHARED, |
4268 | dev->name, dev); | 4268 | dev->name, dev); |
4269 | } | 4269 | } |
4270 | if (rc) { | 4270 | if (rc) { |
@@ -4311,7 +4311,7 @@ bnx2_open(struct net_device *dev) | |||
4311 | 4311 | ||
4312 | if (!rc) { | 4312 | if (!rc) { |
4313 | rc = request_irq(bp->pdev->irq, bnx2_interrupt, | 4313 | rc = request_irq(bp->pdev->irq, bnx2_interrupt, |
4314 | SA_SHIRQ, dev->name, dev); | 4314 | IRQF_SHARED, dev->name, dev); |
4315 | } | 4315 | } |
4316 | if (rc) { | 4316 | if (rc) { |
4317 | bnx2_free_skbs(bp); | 4317 | bnx2_free_skbs(bp); |
diff --git a/drivers/net/cassini.c b/drivers/net/cassini.c index b89c7bb2c591..d33130f64700 100644 --- a/drivers/net/cassini.c +++ b/drivers/net/cassini.c | |||
@@ -4349,7 +4349,7 @@ static int cas_open(struct net_device *dev) | |||
4349 | * mapping to expose them | 4349 | * mapping to expose them |
4350 | */ | 4350 | */ |
4351 | if (request_irq(cp->pdev->irq, cas_interrupt, | 4351 | if (request_irq(cp->pdev->irq, cas_interrupt, |
4352 | SA_SHIRQ, dev->name, (void *) dev)) { | 4352 | IRQF_SHARED, dev->name, (void *) dev)) { |
4353 | printk(KERN_ERR "%s: failed to request irq !\n", | 4353 | printk(KERN_ERR "%s: failed to request irq !\n", |
4354 | cp->dev->name); | 4354 | cp->dev->name); |
4355 | err = -EAGAIN; | 4355 | err = -EAGAIN; |
diff --git a/drivers/net/chelsio/cxgb2.c b/drivers/net/chelsio/cxgb2.c index c490a862e79c..e67872433e92 100644 --- a/drivers/net/chelsio/cxgb2.c +++ b/drivers/net/chelsio/cxgb2.c | |||
@@ -218,7 +218,7 @@ static int cxgb_up(struct adapter *adapter) | |||
218 | 218 | ||
219 | t1_interrupts_clear(adapter); | 219 | t1_interrupts_clear(adapter); |
220 | if ((err = request_irq(adapter->pdev->irq, | 220 | if ((err = request_irq(adapter->pdev->irq, |
221 | t1_select_intr_handler(adapter), SA_SHIRQ, | 221 | t1_select_intr_handler(adapter), IRQF_SHARED, |
222 | adapter->name, adapter))) { | 222 | adapter->name, adapter))) { |
223 | goto out_err; | 223 | goto out_err; |
224 | } | 224 | } |
diff --git a/drivers/net/cris/eth_v10.c b/drivers/net/cris/eth_v10.c index d3654fd71604..0eb1f8787ed7 100644 --- a/drivers/net/cris/eth_v10.c +++ b/drivers/net/cris/eth_v10.c | |||
@@ -671,7 +671,7 @@ e100_open(struct net_device *dev) | |||
671 | /* allocate the irq corresponding to the receiving DMA */ | 671 | /* allocate the irq corresponding to the receiving DMA */ |
672 | 672 | ||
673 | if (request_irq(NETWORK_DMA_RX_IRQ_NBR, e100rxtx_interrupt, | 673 | if (request_irq(NETWORK_DMA_RX_IRQ_NBR, e100rxtx_interrupt, |
674 | SA_SAMPLE_RANDOM, cardname, (void *)dev)) { | 674 | IRQF_SAMPLE_RANDOM, cardname, (void *)dev)) { |
675 | goto grace_exit0; | 675 | goto grace_exit0; |
676 | } | 676 | } |
677 | 677 | ||
diff --git a/drivers/net/defxx.c b/drivers/net/defxx.c index 5acd35c312ac..91cc8cbdd440 100644 --- a/drivers/net/defxx.c +++ b/drivers/net/defxx.c | |||
@@ -1228,7 +1228,7 @@ static int dfx_open(struct net_device *dev) | |||
1228 | 1228 | ||
1229 | /* Register IRQ - support shared interrupts by passing device ptr */ | 1229 | /* Register IRQ - support shared interrupts by passing device ptr */ |
1230 | 1230 | ||
1231 | ret = request_irq(dev->irq, dfx_interrupt, SA_SHIRQ, dev->name, dev); | 1231 | ret = request_irq(dev->irq, dfx_interrupt, IRQF_SHARED, dev->name, dev); |
1232 | if (ret) { | 1232 | if (ret) { |
1233 | printk(KERN_ERR "%s: Requested IRQ %d is busy\n", dev->name, dev->irq); | 1233 | printk(KERN_ERR "%s: Requested IRQ %d is busy\n", dev->name, dev->irq); |
1234 | return ret; | 1234 | return ret; |
diff --git a/drivers/net/dgrs.c b/drivers/net/dgrs.c index e175d4876682..fa4f09432975 100644 --- a/drivers/net/dgrs.c +++ b/drivers/net/dgrs.c | |||
@@ -1191,7 +1191,7 @@ dgrs_probe1(struct net_device *dev) | |||
1191 | if (priv->plxreg) | 1191 | if (priv->plxreg) |
1192 | OUTL(dev->base_addr + PLX_LCL2PCI_DOORBELL, 1); | 1192 | OUTL(dev->base_addr + PLX_LCL2PCI_DOORBELL, 1); |
1193 | 1193 | ||
1194 | rc = request_irq(dev->irq, &dgrs_intr, SA_SHIRQ, "RightSwitch", dev); | 1194 | rc = request_irq(dev->irq, &dgrs_intr, IRQF_SHARED, "RightSwitch", dev); |
1195 | if (rc) | 1195 | if (rc) |
1196 | goto err_out; | 1196 | goto err_out; |
1197 | 1197 | ||
diff --git a/drivers/net/dl2k.c b/drivers/net/dl2k.c index 29778055223b..4b6ddb70f921 100644 --- a/drivers/net/dl2k.c +++ b/drivers/net/dl2k.c | |||
@@ -440,7 +440,7 @@ rio_open (struct net_device *dev) | |||
440 | int i; | 440 | int i; |
441 | u16 macctrl; | 441 | u16 macctrl; |
442 | 442 | ||
443 | i = request_irq (dev->irq, &rio_interrupt, SA_SHIRQ, dev->name, dev); | 443 | i = request_irq (dev->irq, &rio_interrupt, IRQF_SHARED, dev->name, dev); |
444 | if (i) | 444 | if (i) |
445 | return i; | 445 | return i; |
446 | 446 | ||
diff --git a/drivers/net/dm9000.c b/drivers/net/dm9000.c index 7965a9b08e79..1b758b707134 100644 --- a/drivers/net/dm9000.c +++ b/drivers/net/dm9000.c | |||
@@ -603,7 +603,7 @@ dm9000_open(struct net_device *dev) | |||
603 | 603 | ||
604 | PRINTK2("entering dm9000_open\n"); | 604 | PRINTK2("entering dm9000_open\n"); |
605 | 605 | ||
606 | if (request_irq(dev->irq, &dm9000_interrupt, SA_SHIRQ, dev->name, dev)) | 606 | if (request_irq(dev->irq, &dm9000_interrupt, IRQF_SHARED, dev->name, dev)) |
607 | return -EAGAIN; | 607 | return -EAGAIN; |
608 | 608 | ||
609 | /* Initialize DM9000 board */ | 609 | /* Initialize DM9000 board */ |
diff --git a/drivers/net/e100.c b/drivers/net/e100.c index a1d676a0df7c..91ef5f2fd768 100644 --- a/drivers/net/e100.c +++ b/drivers/net/e100.c | |||
@@ -2063,7 +2063,7 @@ static int e100_up(struct nic *nic) | |||
2063 | e100_set_multicast_list(nic->netdev); | 2063 | e100_set_multicast_list(nic->netdev); |
2064 | e100_start_receiver(nic, NULL); | 2064 | e100_start_receiver(nic, NULL); |
2065 | mod_timer(&nic->watchdog, jiffies); | 2065 | mod_timer(&nic->watchdog, jiffies); |
2066 | if((err = request_irq(nic->pdev->irq, e100_intr, SA_SHIRQ, | 2066 | if((err = request_irq(nic->pdev->irq, e100_intr, IRQF_SHARED, |
2067 | nic->netdev->name, nic->netdev))) | 2067 | nic->netdev->name, nic->netdev))) |
2068 | goto err_no_irq; | 2068 | goto err_no_irq; |
2069 | netif_wake_queue(nic->netdev); | 2069 | netif_wake_queue(nic->netdev); |
diff --git a/drivers/net/e1000/e1000_ethtool.c b/drivers/net/e1000/e1000_ethtool.c index 6ed7f599eba3..d19664891768 100644 --- a/drivers/net/e1000/e1000_ethtool.c +++ b/drivers/net/e1000/e1000_ethtool.c | |||
@@ -871,10 +871,10 @@ e1000_intr_test(struct e1000_adapter *adapter, uint64_t *data) | |||
871 | *data = 0; | 871 | *data = 0; |
872 | 872 | ||
873 | /* Hook up test interrupt handler just for this test */ | 873 | /* Hook up test interrupt handler just for this test */ |
874 | if (!request_irq(irq, &e1000_test_intr, SA_PROBEIRQ, netdev->name, | 874 | if (!request_irq(irq, &e1000_test_intr, IRQF_PROBE_SHARED, |
875 | netdev)) { | 875 | netdev->name, netdev)) { |
876 | shared_int = FALSE; | 876 | shared_int = FALSE; |
877 | } else if (request_irq(irq, &e1000_test_intr, SA_SHIRQ, | 877 | } else if (request_irq(irq, &e1000_test_intr, IRQF_SHARED, |
878 | netdev->name, netdev)){ | 878 | netdev->name, netdev)){ |
879 | *data = 1; | 879 | *data = 1; |
880 | return -1; | 880 | return -1; |
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c index 32b7d444b374..f77624f5f17b 100644 --- a/drivers/net/e1000/e1000_main.c +++ b/drivers/net/e1000/e1000_main.c | |||
@@ -426,7 +426,7 @@ e1000_up(struct e1000_adapter *adapter) | |||
426 | } | 426 | } |
427 | #endif | 427 | #endif |
428 | if ((err = request_irq(adapter->pdev->irq, &e1000_intr, | 428 | if ((err = request_irq(adapter->pdev->irq, &e1000_intr, |
429 | SA_SHIRQ | SA_SAMPLE_RANDOM, | 429 | IRQF_SHARED | IRQF_SAMPLE_RANDOM, |
430 | netdev->name, netdev))) { | 430 | netdev->name, netdev))) { |
431 | DPRINTK(PROBE, ERR, | 431 | DPRINTK(PROBE, ERR, |
432 | "Unable to allocate interrupt Error: %d\n", err); | 432 | "Unable to allocate interrupt Error: %d\n", err); |
diff --git a/drivers/net/eepro.c b/drivers/net/eepro.c index e70f172699db..20d31430c74f 100644 --- a/drivers/net/eepro.c +++ b/drivers/net/eepro.c | |||
@@ -920,7 +920,7 @@ static int eepro_grab_irq(struct net_device *dev) | |||
920 | 920 | ||
921 | eepro_sw2bank0(ioaddr); /* Switch back to Bank 0 */ | 921 | eepro_sw2bank0(ioaddr); /* Switch back to Bank 0 */ |
922 | 922 | ||
923 | if (request_irq (*irqp, NULL, SA_SHIRQ, "bogus", dev) != EBUSY) { | 923 | if (request_irq (*irqp, NULL, IRQF_SHARED, "bogus", dev) != EBUSY) { |
924 | unsigned long irq_mask; | 924 | unsigned long irq_mask; |
925 | /* Twinkle the interrupt, and check if it's seen */ | 925 | /* Twinkle the interrupt, and check if it's seen */ |
926 | irq_mask = probe_irq_on(); | 926 | irq_mask = probe_irq_on(); |
diff --git a/drivers/net/eepro100.c b/drivers/net/eepro100.c index 1e2fbbbb966e..2ad327542927 100644 --- a/drivers/net/eepro100.c +++ b/drivers/net/eepro100.c | |||
@@ -977,7 +977,7 @@ speedo_open(struct net_device *dev) | |||
977 | sp->in_interrupt = 0; | 977 | sp->in_interrupt = 0; |
978 | 978 | ||
979 | /* .. we can safely take handler calls during init. */ | 979 | /* .. we can safely take handler calls during init. */ |
980 | retval = request_irq(dev->irq, &speedo_interrupt, SA_SHIRQ, dev->name, dev); | 980 | retval = request_irq(dev->irq, &speedo_interrupt, IRQF_SHARED, dev->name, dev); |
981 | if (retval) { | 981 | if (retval) { |
982 | return retval; | 982 | return retval; |
983 | } | 983 | } |
diff --git a/drivers/net/epic100.c b/drivers/net/epic100.c index b160abed8dd7..9f3e09a3d88c 100644 --- a/drivers/net/epic100.c +++ b/drivers/net/epic100.c | |||
@@ -713,7 +713,7 @@ static int epic_open(struct net_device *dev) | |||
713 | /* Soft reset the chip. */ | 713 | /* Soft reset the chip. */ |
714 | outl(0x4001, ioaddr + GENCTL); | 714 | outl(0x4001, ioaddr + GENCTL); |
715 | 715 | ||
716 | if ((retval = request_irq(dev->irq, &epic_interrupt, SA_SHIRQ, dev->name, dev))) | 716 | if ((retval = request_irq(dev->irq, &epic_interrupt, IRQF_SHARED, dev->name, dev))) |
717 | return retval; | 717 | return retval; |
718 | 718 | ||
719 | epic_init_ring(dev); | 719 | epic_init_ring(dev); |
diff --git a/drivers/net/fealnx.c b/drivers/net/fealnx.c index 13eca7ede2af..c701951dcd6f 100644 --- a/drivers/net/fealnx.c +++ b/drivers/net/fealnx.c | |||
@@ -834,7 +834,7 @@ static int netdev_open(struct net_device *dev) | |||
834 | 834 | ||
835 | iowrite32(0x00000001, ioaddr + BCR); /* Reset */ | 835 | iowrite32(0x00000001, ioaddr + BCR); /* Reset */ |
836 | 836 | ||
837 | if (request_irq(dev->irq, &intr_handler, SA_SHIRQ, dev->name, dev)) | 837 | if (request_irq(dev->irq, &intr_handler, IRQF_SHARED, dev->name, dev)) |
838 | return -EAGAIN; | 838 | return -EAGAIN; |
839 | 839 | ||
840 | for (i = 0; i < 3; i++) | 840 | for (i = 0; i < 3; i++) |
diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c index 21be4fa071b5..3c90003f4230 100644 --- a/drivers/net/forcedeth.c +++ b/drivers/net/forcedeth.c | |||
@@ -2622,21 +2622,21 @@ static int nv_request_irq(struct net_device *dev, int intr_test) | |||
2622 | np->msi_flags |= NV_MSI_X_ENABLED; | 2622 | np->msi_flags |= NV_MSI_X_ENABLED; |
2623 | if (optimization_mode == NV_OPTIMIZATION_MODE_THROUGHPUT && !intr_test) { | 2623 | if (optimization_mode == NV_OPTIMIZATION_MODE_THROUGHPUT && !intr_test) { |
2624 | /* Request irq for rx handling */ | 2624 | /* Request irq for rx handling */ |
2625 | if (request_irq(np->msi_x_entry[NV_MSI_X_VECTOR_RX].vector, &nv_nic_irq_rx, SA_SHIRQ, dev->name, dev) != 0) { | 2625 | if (request_irq(np->msi_x_entry[NV_MSI_X_VECTOR_RX].vector, &nv_nic_irq_rx, IRQF_SHARED, dev->name, dev) != 0) { |
2626 | printk(KERN_INFO "forcedeth: request_irq failed for rx %d\n", ret); | 2626 | printk(KERN_INFO "forcedeth: request_irq failed for rx %d\n", ret); |
2627 | pci_disable_msix(np->pci_dev); | 2627 | pci_disable_msix(np->pci_dev); |
2628 | np->msi_flags &= ~NV_MSI_X_ENABLED; | 2628 | np->msi_flags &= ~NV_MSI_X_ENABLED; |
2629 | goto out_err; | 2629 | goto out_err; |
2630 | } | 2630 | } |
2631 | /* Request irq for tx handling */ | 2631 | /* Request irq for tx handling */ |
2632 | if (request_irq(np->msi_x_entry[NV_MSI_X_VECTOR_TX].vector, &nv_nic_irq_tx, SA_SHIRQ, dev->name, dev) != 0) { | 2632 | if (request_irq(np->msi_x_entry[NV_MSI_X_VECTOR_TX].vector, &nv_nic_irq_tx, IRQF_SHARED, dev->name, dev) != 0) { |
2633 | printk(KERN_INFO "forcedeth: request_irq failed for tx %d\n", ret); | 2633 | printk(KERN_INFO "forcedeth: request_irq failed for tx %d\n", ret); |
2634 | pci_disable_msix(np->pci_dev); | 2634 | pci_disable_msix(np->pci_dev); |
2635 | np->msi_flags &= ~NV_MSI_X_ENABLED; | 2635 | np->msi_flags &= ~NV_MSI_X_ENABLED; |
2636 | goto out_free_rx; | 2636 | goto out_free_rx; |
2637 | } | 2637 | } |
2638 | /* Request irq for link and timer handling */ | 2638 | /* Request irq for link and timer handling */ |
2639 | if (request_irq(np->msi_x_entry[NV_MSI_X_VECTOR_OTHER].vector, &nv_nic_irq_other, SA_SHIRQ, dev->name, dev) != 0) { | 2639 | if (request_irq(np->msi_x_entry[NV_MSI_X_VECTOR_OTHER].vector, &nv_nic_irq_other, IRQF_SHARED, dev->name, dev) != 0) { |
2640 | printk(KERN_INFO "forcedeth: request_irq failed for link %d\n", ret); | 2640 | printk(KERN_INFO "forcedeth: request_irq failed for link %d\n", ret); |
2641 | pci_disable_msix(np->pci_dev); | 2641 | pci_disable_msix(np->pci_dev); |
2642 | np->msi_flags &= ~NV_MSI_X_ENABLED; | 2642 | np->msi_flags &= ~NV_MSI_X_ENABLED; |
@@ -2651,9 +2651,9 @@ static int nv_request_irq(struct net_device *dev, int intr_test) | |||
2651 | } else { | 2651 | } else { |
2652 | /* Request irq for all interrupts */ | 2652 | /* Request irq for all interrupts */ |
2653 | if ((!intr_test && | 2653 | if ((!intr_test && |
2654 | request_irq(np->msi_x_entry[NV_MSI_X_VECTOR_ALL].vector, &nv_nic_irq, SA_SHIRQ, dev->name, dev) != 0) || | 2654 | request_irq(np->msi_x_entry[NV_MSI_X_VECTOR_ALL].vector, &nv_nic_irq, IRQF_SHARED, dev->name, dev) != 0) || |
2655 | (intr_test && | 2655 | (intr_test && |
2656 | request_irq(np->msi_x_entry[NV_MSI_X_VECTOR_ALL].vector, &nv_nic_irq_test, SA_SHIRQ, dev->name, dev) != 0)) { | 2656 | request_irq(np->msi_x_entry[NV_MSI_X_VECTOR_ALL].vector, &nv_nic_irq_test, IRQF_SHARED, dev->name, dev) != 0)) { |
2657 | printk(KERN_INFO "forcedeth: request_irq failed %d\n", ret); | 2657 | printk(KERN_INFO "forcedeth: request_irq failed %d\n", ret); |
2658 | pci_disable_msix(np->pci_dev); | 2658 | pci_disable_msix(np->pci_dev); |
2659 | np->msi_flags &= ~NV_MSI_X_ENABLED; | 2659 | np->msi_flags &= ~NV_MSI_X_ENABLED; |
@@ -2669,8 +2669,8 @@ static int nv_request_irq(struct net_device *dev, int intr_test) | |||
2669 | if (ret != 0 && np->msi_flags & NV_MSI_CAPABLE) { | 2669 | if (ret != 0 && np->msi_flags & NV_MSI_CAPABLE) { |
2670 | if ((ret = pci_enable_msi(np->pci_dev)) == 0) { | 2670 | if ((ret = pci_enable_msi(np->pci_dev)) == 0) { |
2671 | np->msi_flags |= NV_MSI_ENABLED; | 2671 | np->msi_flags |= NV_MSI_ENABLED; |
2672 | if ((!intr_test && request_irq(np->pci_dev->irq, &nv_nic_irq, SA_SHIRQ, dev->name, dev) != 0) || | 2672 | if ((!intr_test && request_irq(np->pci_dev->irq, &nv_nic_irq, IRQF_SHARED, dev->name, dev) != 0) || |
2673 | (intr_test && request_irq(np->pci_dev->irq, &nv_nic_irq_test, SA_SHIRQ, dev->name, dev) != 0)) { | 2673 | (intr_test && request_irq(np->pci_dev->irq, &nv_nic_irq_test, IRQF_SHARED, dev->name, dev) != 0)) { |
2674 | printk(KERN_INFO "forcedeth: request_irq failed %d\n", ret); | 2674 | printk(KERN_INFO "forcedeth: request_irq failed %d\n", ret); |
2675 | pci_disable_msi(np->pci_dev); | 2675 | pci_disable_msi(np->pci_dev); |
2676 | np->msi_flags &= ~NV_MSI_ENABLED; | 2676 | np->msi_flags &= ~NV_MSI_ENABLED; |
@@ -2685,8 +2685,8 @@ static int nv_request_irq(struct net_device *dev, int intr_test) | |||
2685 | } | 2685 | } |
2686 | } | 2686 | } |
2687 | if (ret != 0) { | 2687 | if (ret != 0) { |
2688 | if ((!intr_test && request_irq(np->pci_dev->irq, &nv_nic_irq, SA_SHIRQ, dev->name, dev) != 0) || | 2688 | if ((!intr_test && request_irq(np->pci_dev->irq, &nv_nic_irq, IRQF_SHARED, dev->name, dev) != 0) || |
2689 | (intr_test && request_irq(np->pci_dev->irq, &nv_nic_irq_test, SA_SHIRQ, dev->name, dev) != 0)) | 2689 | (intr_test && request_irq(np->pci_dev->irq, &nv_nic_irq_test, IRQF_SHARED, dev->name, dev) != 0)) |
2690 | goto out_err; | 2690 | goto out_err; |
2691 | 2691 | ||
2692 | } | 2692 | } |
diff --git a/drivers/net/fs_enet/fs_enet-main.c b/drivers/net/fs_enet/fs_enet-main.c index e96a93c94941..f6abff5846b3 100644 --- a/drivers/net/fs_enet/fs_enet-main.c +++ b/drivers/net/fs_enet/fs_enet-main.c | |||
@@ -671,7 +671,7 @@ static int fs_request_irq(struct net_device *dev, int irq, const char *name, | |||
671 | struct fs_enet_private *fep = netdev_priv(dev); | 671 | struct fs_enet_private *fep = netdev_priv(dev); |
672 | 672 | ||
673 | (*fep->ops->pre_request_irq)(dev, irq); | 673 | (*fep->ops->pre_request_irq)(dev, irq); |
674 | return request_irq(irq, irqf, SA_SHIRQ, name, dev); | 674 | return request_irq(irq, irqf, IRQF_SHARED, name, dev); |
675 | } | 675 | } |
676 | 676 | ||
677 | static void fs_free_irq(struct net_device *dev, int irq) | 677 | static void fs_free_irq(struct net_device *dev, int irq) |
diff --git a/drivers/net/gt96100eth.c b/drivers/net/gt96100eth.c index 2d2435404614..49dacc6e35aa 100644 --- a/drivers/net/gt96100eth.c +++ b/drivers/net/gt96100eth.c | |||
@@ -1030,7 +1030,7 @@ gt96100_open(struct net_device *dev) | |||
1030 | } | 1030 | } |
1031 | 1031 | ||
1032 | if ((retval = request_irq(dev->irq, >96100_interrupt, | 1032 | if ((retval = request_irq(dev->irq, >96100_interrupt, |
1033 | SA_SHIRQ, dev->name, dev))) { | 1033 | IRQF_SHARED, dev->name, dev))) { |
1034 | err("unable to get IRQ %d\n", dev->irq); | 1034 | err("unable to get IRQ %d\n", dev->irq); |
1035 | return retval; | 1035 | return retval; |
1036 | } | 1036 | } |
diff --git a/drivers/net/hamachi.c b/drivers/net/hamachi.c index 0ea4cb4a0d80..7bcd939c6edd 100644 --- a/drivers/net/hamachi.c +++ b/drivers/net/hamachi.c | |||
@@ -871,7 +871,7 @@ static int hamachi_open(struct net_device *dev) | |||
871 | u32 rx_int_var, tx_int_var; | 871 | u32 rx_int_var, tx_int_var; |
872 | u16 fifo_info; | 872 | u16 fifo_info; |
873 | 873 | ||
874 | i = request_irq(dev->irq, &hamachi_interrupt, SA_SHIRQ, dev->name, dev); | 874 | i = request_irq(dev->irq, &hamachi_interrupt, IRQF_SHARED, dev->name, dev); |
875 | if (i) | 875 | if (i) |
876 | return i; | 876 | return i; |
877 | 877 | ||
diff --git a/drivers/net/hamradio/baycom_ser_fdx.c b/drivers/net/hamradio/baycom_ser_fdx.c index 232793d2ce6b..55906c7b4bb1 100644 --- a/drivers/net/hamradio/baycom_ser_fdx.c +++ b/drivers/net/hamradio/baycom_ser_fdx.c | |||
@@ -434,7 +434,7 @@ static int ser12_open(struct net_device *dev) | |||
434 | outb(0, FCR(dev->base_addr)); /* disable FIFOs */ | 434 | outb(0, FCR(dev->base_addr)); /* disable FIFOs */ |
435 | outb(0x0d, MCR(dev->base_addr)); | 435 | outb(0x0d, MCR(dev->base_addr)); |
436 | outb(0, IER(dev->base_addr)); | 436 | outb(0, IER(dev->base_addr)); |
437 | if (request_irq(dev->irq, ser12_interrupt, SA_INTERRUPT | SA_SHIRQ, | 437 | if (request_irq(dev->irq, ser12_interrupt, IRQF_DISABLED | IRQF_SHARED, |
438 | "baycom_ser_fdx", dev)) { | 438 | "baycom_ser_fdx", dev)) { |
439 | release_region(dev->base_addr, SER12_EXTENT); | 439 | release_region(dev->base_addr, SER12_EXTENT); |
440 | return -EBUSY; | 440 | return -EBUSY; |
diff --git a/drivers/net/hamradio/baycom_ser_hdx.c b/drivers/net/hamradio/baycom_ser_hdx.c index be596a3eb3fd..de95de8983da 100644 --- a/drivers/net/hamradio/baycom_ser_hdx.c +++ b/drivers/net/hamradio/baycom_ser_hdx.c | |||
@@ -488,7 +488,7 @@ static int ser12_open(struct net_device *dev) | |||
488 | outb(0, FCR(dev->base_addr)); /* disable FIFOs */ | 488 | outb(0, FCR(dev->base_addr)); /* disable FIFOs */ |
489 | outb(0x0d, MCR(dev->base_addr)); | 489 | outb(0x0d, MCR(dev->base_addr)); |
490 | outb(0, IER(dev->base_addr)); | 490 | outb(0, IER(dev->base_addr)); |
491 | if (request_irq(dev->irq, ser12_interrupt, SA_INTERRUPT | SA_SHIRQ, | 491 | if (request_irq(dev->irq, ser12_interrupt, IRQF_DISABLED | IRQF_SHARED, |
492 | "baycom_ser12", dev)) { | 492 | "baycom_ser12", dev)) { |
493 | release_region(dev->base_addr, SER12_EXTENT); | 493 | release_region(dev->base_addr, SER12_EXTENT); |
494 | return -EBUSY; | 494 | return -EBUSY; |
diff --git a/drivers/net/hamradio/scc.c b/drivers/net/hamradio/scc.c index b9b10caa031c..df4b68142ac7 100644 --- a/drivers/net/hamradio/scc.c +++ b/drivers/net/hamradio/scc.c | |||
@@ -1736,7 +1736,7 @@ static int scc_net_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) | |||
1736 | 1736 | ||
1737 | if (!Ivec[hwcfg.irq].used && hwcfg.irq) | 1737 | if (!Ivec[hwcfg.irq].used && hwcfg.irq) |
1738 | { | 1738 | { |
1739 | if (request_irq(hwcfg.irq, scc_isr, SA_INTERRUPT, "AX.25 SCC", NULL)) | 1739 | if (request_irq(hwcfg.irq, scc_isr, IRQF_DISABLED, "AX.25 SCC", NULL)) |
1740 | printk(KERN_WARNING "z8530drv: warning, cannot get IRQ %d\n", hwcfg.irq); | 1740 | printk(KERN_WARNING "z8530drv: warning, cannot get IRQ %d\n", hwcfg.irq); |
1741 | else | 1741 | else |
1742 | Ivec[hwcfg.irq].used = 1; | 1742 | Ivec[hwcfg.irq].used = 1; |
diff --git a/drivers/net/hamradio/yam.c b/drivers/net/hamradio/yam.c index dd2f11c98530..f98f5777dfbb 100644 --- a/drivers/net/hamradio/yam.c +++ b/drivers/net/hamradio/yam.c | |||
@@ -873,7 +873,7 @@ static int yam_open(struct net_device *dev) | |||
873 | goto out_release_base; | 873 | goto out_release_base; |
874 | } | 874 | } |
875 | outb(0, IER(dev->base_addr)); | 875 | outb(0, IER(dev->base_addr)); |
876 | if (request_irq(dev->irq, yam_interrupt, SA_INTERRUPT | SA_SHIRQ, dev->name, dev)) { | 876 | if (request_irq(dev->irq, yam_interrupt, IRQF_DISABLED | IRQF_SHARED, dev->name, dev)) { |
877 | printk(KERN_ERR "%s: irq %d busy\n", dev->name, dev->irq); | 877 | printk(KERN_ERR "%s: irq %d busy\n", dev->name, dev->irq); |
878 | ret = -EBUSY; | 878 | ret = -EBUSY; |
879 | goto out_release_base; | 879 | goto out_release_base; |
diff --git a/drivers/net/hp100.c b/drivers/net/hp100.c index dd1dc32dc98d..e7d9bf330287 100644 --- a/drivers/net/hp100.c +++ b/drivers/net/hp100.c | |||
@@ -1079,7 +1079,7 @@ static int hp100_open(struct net_device *dev) | |||
1079 | /* New: if bus is PCI or EISA, interrupts might be shared interrupts */ | 1079 | /* New: if bus is PCI or EISA, interrupts might be shared interrupts */ |
1080 | if (request_irq(dev->irq, hp100_interrupt, | 1080 | if (request_irq(dev->irq, hp100_interrupt, |
1081 | lp->bus == HP100_BUS_PCI || lp->bus == | 1081 | lp->bus == HP100_BUS_PCI || lp->bus == |
1082 | HP100_BUS_EISA ? SA_SHIRQ : SA_INTERRUPT, | 1082 | HP100_BUS_EISA ? IRQF_SHARED : IRQF_DISABLED, |
1083 | "hp100", dev)) { | 1083 | "hp100", dev)) { |
1084 | printk("hp100: %s: unable to get IRQ %d\n", dev->name, dev->irq); | 1084 | printk("hp100: %s: unable to get IRQ %d\n", dev->name, dev->irq); |
1085 | return -EAGAIN; | 1085 | return -EAGAIN; |
diff --git a/drivers/net/hydra.c b/drivers/net/hydra.c index d9fb8e74e631..91326ea3e12b 100644 --- a/drivers/net/hydra.c +++ b/drivers/net/hydra.c | |||
@@ -117,7 +117,7 @@ static int __devinit hydra_init(struct zorro_dev *z) | |||
117 | dev->irq = IRQ_AMIGA_PORTS; | 117 | dev->irq = IRQ_AMIGA_PORTS; |
118 | 118 | ||
119 | /* Install the Interrupt handler */ | 119 | /* Install the Interrupt handler */ |
120 | if (request_irq(IRQ_AMIGA_PORTS, ei_interrupt, SA_SHIRQ, "Hydra Ethernet", | 120 | if (request_irq(IRQ_AMIGA_PORTS, ei_interrupt, IRQF_SHARED, "Hydra Ethernet", |
121 | dev)) { | 121 | dev)) { |
122 | free_netdev(dev); | 122 | free_netdev(dev); |
123 | return -EAGAIN; | 123 | return -EAGAIN; |
diff --git a/drivers/net/ibmlana.c b/drivers/net/ibmlana.c index 51fd51609ea9..2a95d72fa593 100644 --- a/drivers/net/ibmlana.c +++ b/drivers/net/ibmlana.c | |||
@@ -782,7 +782,7 @@ static int ibmlana_open(struct net_device *dev) | |||
782 | 782 | ||
783 | /* register resources - only necessary for IRQ */ | 783 | /* register resources - only necessary for IRQ */ |
784 | 784 | ||
785 | result = request_irq(priv->realirq, irq_handler, SA_SHIRQ | SA_SAMPLE_RANDOM, dev->name, dev); | 785 | result = request_irq(priv->realirq, irq_handler, IRQF_SHARED | IRQF_SAMPLE_RANDOM, dev->name, dev); |
786 | if (result != 0) { | 786 | if (result != 0) { |
787 | printk(KERN_ERR "%s: failed to register irq %d\n", dev->name, dev->irq); | 787 | printk(KERN_ERR "%s: failed to register irq %d\n", dev->name, dev->irq); |
788 | return result; | 788 | return result; |
diff --git a/drivers/net/ioc3-eth.c b/drivers/net/ioc3-eth.c index dbf67750d899..68d8af7df08e 100644 --- a/drivers/net/ioc3-eth.c +++ b/drivers/net/ioc3-eth.c | |||
@@ -1063,7 +1063,7 @@ static int ioc3_open(struct net_device *dev) | |||
1063 | { | 1063 | { |
1064 | struct ioc3_private *ip = netdev_priv(dev); | 1064 | struct ioc3_private *ip = netdev_priv(dev); |
1065 | 1065 | ||
1066 | if (request_irq(dev->irq, ioc3_interrupt, SA_SHIRQ, ioc3_str, dev)) { | 1066 | if (request_irq(dev->irq, ioc3_interrupt, IRQF_SHARED, ioc3_str, dev)) { |
1067 | printk(KERN_ERR "%s: Can't get irq %d\n", dev->name, dev->irq); | 1067 | printk(KERN_ERR "%s: Can't get irq %d\n", dev->name, dev->irq); |
1068 | 1068 | ||
1069 | return -EAGAIN; | 1069 | return -EAGAIN; |
diff --git a/drivers/net/irda/donauboe.c b/drivers/net/irda/donauboe.c index 910c0cab35b0..33c07d5275da 100644 --- a/drivers/net/irda/donauboe.c +++ b/drivers/net/irda/donauboe.c | |||
@@ -1372,7 +1372,7 @@ toshoboe_net_open (struct net_device *dev) | |||
1372 | return 0; | 1372 | return 0; |
1373 | 1373 | ||
1374 | if (request_irq (self->io.irq, toshoboe_interrupt, | 1374 | if (request_irq (self->io.irq, toshoboe_interrupt, |
1375 | SA_SHIRQ | SA_INTERRUPT, dev->name, (void *) self)) | 1375 | IRQF_SHARED | IRQF_DISABLED, dev->name, (void *) self)) |
1376 | { | 1376 | { |
1377 | return -EAGAIN; | 1377 | return -EAGAIN; |
1378 | } | 1378 | } |
@@ -1573,7 +1573,7 @@ toshoboe_open (struct pci_dev *pci_dev, const struct pci_device_id *pdid) | |||
1573 | self->io.fir_base = self->base; | 1573 | self->io.fir_base = self->base; |
1574 | self->io.fir_ext = OBOE_IO_EXTENT; | 1574 | self->io.fir_ext = OBOE_IO_EXTENT; |
1575 | self->io.irq = pci_dev->irq; | 1575 | self->io.irq = pci_dev->irq; |
1576 | self->io.irqflags = SA_SHIRQ | SA_INTERRUPT; | 1576 | self->io.irqflags = IRQF_SHARED | IRQF_DISABLED; |
1577 | 1577 | ||
1578 | self->speed = self->io.speed = 9600; | 1578 | self->speed = self->io.speed = 9600; |
1579 | self->async = 0; | 1579 | self->async = 0; |
diff --git a/drivers/net/irda/vlsi_ir.c b/drivers/net/irda/vlsi_ir.c index b9f28b14b3ae..92d646cc9edc 100644 --- a/drivers/net/irda/vlsi_ir.c +++ b/drivers/net/irda/vlsi_ir.c | |||
@@ -1517,7 +1517,7 @@ static int vlsi_open(struct net_device *ndev) | |||
1517 | 1517 | ||
1518 | outb(IRINTR_INT_MASK, ndev->base_addr+VLSI_PIO_IRINTR); | 1518 | outb(IRINTR_INT_MASK, ndev->base_addr+VLSI_PIO_IRINTR); |
1519 | 1519 | ||
1520 | if (request_irq(ndev->irq, vlsi_interrupt, SA_SHIRQ, | 1520 | if (request_irq(ndev->irq, vlsi_interrupt, IRQF_SHARED, |
1521 | drivername, ndev)) { | 1521 | drivername, ndev)) { |
1522 | IRDA_WARNING("%s: couldn't get IRQ: %d\n", | 1522 | IRDA_WARNING("%s: couldn't get IRQ: %d\n", |
1523 | __FUNCTION__, ndev->irq); | 1523 | __FUNCTION__, ndev->irq); |
diff --git a/drivers/net/ixgb/ixgb_main.c b/drivers/net/ixgb/ixgb_main.c index 8bb32f946993..b91e082483f6 100644 --- a/drivers/net/ixgb/ixgb_main.c +++ b/drivers/net/ixgb/ixgb_main.c | |||
@@ -253,7 +253,7 @@ ixgb_up(struct ixgb_adapter *adapter) | |||
253 | 253 | ||
254 | #endif | 254 | #endif |
255 | if((err = request_irq(adapter->pdev->irq, &ixgb_intr, | 255 | if((err = request_irq(adapter->pdev->irq, &ixgb_intr, |
256 | SA_SHIRQ | SA_SAMPLE_RANDOM, | 256 | IRQF_SHARED | IRQF_SAMPLE_RANDOM, |
257 | netdev->name, netdev))) { | 257 | netdev->name, netdev))) { |
258 | DPRINTK(PROBE, ERR, | 258 | DPRINTK(PROBE, ERR, |
259 | "Unable to allocate interrupt Error: %d\n", err); | 259 | "Unable to allocate interrupt Error: %d\n", err); |
diff --git a/drivers/net/ixp2000/ixpdev.c b/drivers/net/ixp2000/ixpdev.c index 99229a0456d9..6eeb965b4d72 100644 --- a/drivers/net/ixp2000/ixpdev.c +++ b/drivers/net/ixp2000/ixpdev.c | |||
@@ -235,7 +235,7 @@ static int ixpdev_open(struct net_device *dev) | |||
235 | 235 | ||
236 | if (!nds_open++) { | 236 | if (!nds_open++) { |
237 | err = request_irq(IRQ_IXP2000_THDA0, ixpdev_interrupt, | 237 | err = request_irq(IRQ_IXP2000_THDA0, ixpdev_interrupt, |
238 | SA_SHIRQ, "ixp2000_eth", nds); | 238 | IRQF_SHARED, "ixp2000_eth", nds); |
239 | if (err) { | 239 | if (err) { |
240 | nds_open--; | 240 | nds_open--; |
241 | return err; | 241 | return err; |
diff --git a/drivers/net/jazzsonic.c b/drivers/net/jazzsonic.c index 272d331d29cd..661d75b4cad2 100644 --- a/drivers/net/jazzsonic.c +++ b/drivers/net/jazzsonic.c | |||
@@ -260,7 +260,7 @@ MODULE_DESCRIPTION("Jazz SONIC ethernet driver"); | |||
260 | module_param(sonic_debug, int, 0); | 260 | module_param(sonic_debug, int, 0); |
261 | MODULE_PARM_DESC(sonic_debug, "jazzsonic debug level (1-4)"); | 261 | MODULE_PARM_DESC(sonic_debug, "jazzsonic debug level (1-4)"); |
262 | 262 | ||
263 | #define SONIC_IRQ_FLAG SA_INTERRUPT | 263 | #define SONIC_IRQ_FLAG IRQF_DISABLED |
264 | 264 | ||
265 | #include "sonic.c" | 265 | #include "sonic.c" |
266 | 266 | ||
diff --git a/drivers/net/lp486e.c b/drivers/net/lp486e.c index bf3f343ae715..b783a6984abc 100644 --- a/drivers/net/lp486e.c +++ b/drivers/net/lp486e.c | |||
@@ -851,7 +851,7 @@ static int i596_open(struct net_device *dev) | |||
851 | { | 851 | { |
852 | int i; | 852 | int i; |
853 | 853 | ||
854 | i = request_irq(dev->irq, &i596_interrupt, SA_SHIRQ, dev->name, dev); | 854 | i = request_irq(dev->irq, &i596_interrupt, IRQF_SHARED, dev->name, dev); |
855 | if (i) { | 855 | if (i) { |
856 | printk(KERN_ERR "%s: IRQ %d not free\n", dev->name, dev->irq); | 856 | printk(KERN_ERR "%s: IRQ %d not free\n", dev->name, dev->irq); |
857 | return i; | 857 | return i; |
diff --git a/drivers/net/mipsnet.c b/drivers/net/mipsnet.c index bbffb585b3b3..07e58f4a2916 100644 --- a/drivers/net/mipsnet.c +++ b/drivers/net/mipsnet.c | |||
@@ -179,7 +179,7 @@ static int mipsnet_open(struct net_device *dev) | |||
179 | pr_debug("%s: mipsnet_open\n", dev->name); | 179 | pr_debug("%s: mipsnet_open\n", dev->name); |
180 | 180 | ||
181 | err = request_irq(dev->irq, &mipsnet_interrupt, | 181 | err = request_irq(dev->irq, &mipsnet_interrupt, |
182 | SA_SHIRQ, dev->name, (void *) dev); | 182 | IRQF_SHARED, dev->name, (void *) dev); |
183 | 183 | ||
184 | if (err) { | 184 | if (err) { |
185 | pr_debug("%s: %s(): can't get irq %d\n", | 185 | pr_debug("%s: %s(): can't get irq %d\n", |
diff --git a/drivers/net/mv643xx_eth.c b/drivers/net/mv643xx_eth.c index 625ff61c9988..760c61b98867 100644 --- a/drivers/net/mv643xx_eth.c +++ b/drivers/net/mv643xx_eth.c | |||
@@ -778,7 +778,7 @@ static int mv643xx_eth_open(struct net_device *dev) | |||
778 | int err; | 778 | int err; |
779 | 779 | ||
780 | err = request_irq(dev->irq, mv643xx_eth_int_handler, | 780 | err = request_irq(dev->irq, mv643xx_eth_int_handler, |
781 | SA_SHIRQ | SA_SAMPLE_RANDOM, dev->name, dev); | 781 | IRQF_SHARED | IRQF_SAMPLE_RANDOM, dev->name, dev); |
782 | if (err) { | 782 | if (err) { |
783 | printk(KERN_ERR "Can not assign IRQ number to MV643XX_eth%d\n", | 783 | printk(KERN_ERR "Can not assign IRQ number to MV643XX_eth%d\n", |
784 | port_num); | 784 | port_num); |
diff --git a/drivers/net/myri10ge/myri10ge.c b/drivers/net/myri10ge/myri10ge.c index dbdf189436fa..72aad42db7b4 100644 --- a/drivers/net/myri10ge/myri10ge.c +++ b/drivers/net/myri10ge/myri10ge.c | |||
@@ -2413,7 +2413,7 @@ static int myri10ge_resume(struct pci_dev *pdev) | |||
2413 | pci_enable_device(pdev); | 2413 | pci_enable_device(pdev); |
2414 | pci_set_master(pdev); | 2414 | pci_set_master(pdev); |
2415 | 2415 | ||
2416 | status = request_irq(pdev->irq, myri10ge_intr, SA_SHIRQ, | 2416 | status = request_irq(pdev->irq, myri10ge_intr, IRQF_SHARED, |
2417 | netdev->name, mgp); | 2417 | netdev->name, mgp); |
2418 | if (status != 0) { | 2418 | if (status != 0) { |
2419 | dev_err(&pdev->dev, "failed to allocate IRQ\n"); | 2419 | dev_err(&pdev->dev, "failed to allocate IRQ\n"); |
@@ -2694,7 +2694,7 @@ static int myri10ge_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
2694 | mgp->msi_enabled = 1; | 2694 | mgp->msi_enabled = 1; |
2695 | } | 2695 | } |
2696 | 2696 | ||
2697 | status = request_irq(pdev->irq, myri10ge_intr, SA_SHIRQ, | 2697 | status = request_irq(pdev->irq, myri10ge_intr, IRQF_SHARED, |
2698 | netdev->name, mgp); | 2698 | netdev->name, mgp); |
2699 | if (status != 0) { | 2699 | if (status != 0) { |
2700 | dev_err(&pdev->dev, "failed to allocate IRQ\n"); | 2700 | dev_err(&pdev->dev, "failed to allocate IRQ\n"); |
diff --git a/drivers/net/myri_sbus.c b/drivers/net/myri_sbus.c index 19981065efb4..1b965a2b56e4 100644 --- a/drivers/net/myri_sbus.c +++ b/drivers/net/myri_sbus.c | |||
@@ -1069,7 +1069,7 @@ static int __init myri_ether_init(struct sbus_dev *sdev) | |||
1069 | /* Register interrupt handler now. */ | 1069 | /* Register interrupt handler now. */ |
1070 | DET(("Requesting MYRIcom IRQ line.\n")); | 1070 | DET(("Requesting MYRIcom IRQ line.\n")); |
1071 | if (request_irq(dev->irq, &myri_interrupt, | 1071 | if (request_irq(dev->irq, &myri_interrupt, |
1072 | SA_SHIRQ, "MyriCOM Ethernet", (void *) dev)) { | 1072 | IRQF_SHARED, "MyriCOM Ethernet", (void *) dev)) { |
1073 | printk("MyriCOM: Cannot register interrupt handler.\n"); | 1073 | printk("MyriCOM: Cannot register interrupt handler.\n"); |
1074 | goto err; | 1074 | goto err; |
1075 | } | 1075 | } |
diff --git a/drivers/net/natsemi.c b/drivers/net/natsemi.c index 438c63f940b9..9df2628be1e7 100644 --- a/drivers/net/natsemi.c +++ b/drivers/net/natsemi.c | |||
@@ -1574,7 +1574,7 @@ static int netdev_open(struct net_device *dev) | |||
1574 | /* Reset the chip, just in case. */ | 1574 | /* Reset the chip, just in case. */ |
1575 | natsemi_reset(dev); | 1575 | natsemi_reset(dev); |
1576 | 1576 | ||
1577 | i = request_irq(dev->irq, &intr_handler, SA_SHIRQ, dev->name, dev); | 1577 | i = request_irq(dev->irq, &intr_handler, IRQF_SHARED, dev->name, dev); |
1578 | if (i) return i; | 1578 | if (i) return i; |
1579 | 1579 | ||
1580 | if (netif_msg_ifup(np)) | 1580 | if (netif_msg_ifup(np)) |
diff --git a/drivers/net/ne2k-pci.c b/drivers/net/ne2k-pci.c index ced9fdb8335c..fa50eb889408 100644 --- a/drivers/net/ne2k-pci.c +++ b/drivers/net/ne2k-pci.c | |||
@@ -420,7 +420,7 @@ static int ne2k_pci_set_fdx(struct net_device *dev) | |||
420 | 420 | ||
421 | static int ne2k_pci_open(struct net_device *dev) | 421 | static int ne2k_pci_open(struct net_device *dev) |
422 | { | 422 | { |
423 | int ret = request_irq(dev->irq, ei_interrupt, SA_SHIRQ, dev->name, dev); | 423 | int ret = request_irq(dev->irq, ei_interrupt, IRQF_SHARED, dev->name, dev); |
424 | if (ret) | 424 | if (ret) |
425 | return ret; | 425 | return ret; |
426 | 426 | ||
diff --git a/drivers/net/netx-eth.c b/drivers/net/netx-eth.c index b92430c4e3ac..b1311ae82675 100644 --- a/drivers/net/netx-eth.c +++ b/drivers/net/netx-eth.c | |||
@@ -223,7 +223,7 @@ static int netx_eth_open(struct net_device *ndev) | |||
223 | struct netx_eth_priv *priv = netdev_priv(ndev); | 223 | struct netx_eth_priv *priv = netdev_priv(ndev); |
224 | 224 | ||
225 | if (request_irq | 225 | if (request_irq |
226 | (ndev->irq, &netx_eth_interrupt, SA_SHIRQ, ndev->name, ndev)) | 226 | (ndev->irq, &netx_eth_interrupt, IRQF_SHARED, ndev->name, ndev)) |
227 | return -EAGAIN; | 227 | return -EAGAIN; |
228 | 228 | ||
229 | writel(ndev->dev_addr[0] | | 229 | writel(ndev->dev_addr[0] | |
diff --git a/drivers/net/ns83820.c b/drivers/net/ns83820.c index deedd7b2af5d..70429108c40d 100644 --- a/drivers/net/ns83820.c +++ b/drivers/net/ns83820.c | |||
@@ -1881,7 +1881,7 @@ static int __devinit ns83820_init_one(struct pci_dev *pci_dev, const struct pci_ | |||
1881 | 1881 | ||
1882 | dev->IMR_cache = 0; | 1882 | dev->IMR_cache = 0; |
1883 | 1883 | ||
1884 | err = request_irq(pci_dev->irq, ns83820_irq, SA_SHIRQ, | 1884 | err = request_irq(pci_dev->irq, ns83820_irq, IRQF_SHARED, |
1885 | DRV_NAME, ndev); | 1885 | DRV_NAME, ndev); |
1886 | if (err) { | 1886 | if (err) { |
1887 | printk(KERN_INFO "ns83820: unable to register irq %d\n", | 1887 | printk(KERN_INFO "ns83820: unable to register irq %d\n", |
diff --git a/drivers/net/pci-skeleton.c b/drivers/net/pci-skeleton.c index 978b95afc721..3388ee1313ea 100644 --- a/drivers/net/pci-skeleton.c +++ b/drivers/net/pci-skeleton.c | |||
@@ -1075,7 +1075,7 @@ static int netdrv_open (struct net_device *dev) | |||
1075 | 1075 | ||
1076 | DPRINTK ("ENTER\n"); | 1076 | DPRINTK ("ENTER\n"); |
1077 | 1077 | ||
1078 | retval = request_irq (dev->irq, netdrv_interrupt, SA_SHIRQ, dev->name, dev); | 1078 | retval = request_irq (dev->irq, netdrv_interrupt, IRQF_SHARED, dev->name, dev); |
1079 | if (retval) { | 1079 | if (retval) { |
1080 | DPRINTK ("EXIT, returning %d\n", retval); | 1080 | DPRINTK ("EXIT, returning %d\n", retval); |
1081 | return retval; | 1081 | return retval; |
diff --git a/drivers/net/pcmcia/axnet_cs.c b/drivers/net/pcmcia/axnet_cs.c index 2ea66aca648b..297e9f805366 100644 --- a/drivers/net/pcmcia/axnet_cs.c +++ b/drivers/net/pcmcia/axnet_cs.c | |||
@@ -535,7 +535,7 @@ static int axnet_open(struct net_device *dev) | |||
535 | 535 | ||
536 | link->open++; | 536 | link->open++; |
537 | 537 | ||
538 | request_irq(dev->irq, ei_irq_wrapper, SA_SHIRQ, "axnet_cs", dev); | 538 | request_irq(dev->irq, ei_irq_wrapper, IRQF_SHARED, "axnet_cs", dev); |
539 | 539 | ||
540 | info->link_status = 0x00; | 540 | info->link_status = 0x00; |
541 | init_timer(&info->watchdog); | 541 | init_timer(&info->watchdog); |
diff --git a/drivers/net/pcmcia/pcnet_cs.c b/drivers/net/pcmcia/pcnet_cs.c index 661bfe54ff5d..0ecebfc31f07 100644 --- a/drivers/net/pcmcia/pcnet_cs.c +++ b/drivers/net/pcmcia/pcnet_cs.c | |||
@@ -998,7 +998,7 @@ static int pcnet_open(struct net_device *dev) | |||
998 | link->open++; | 998 | link->open++; |
999 | 999 | ||
1000 | set_misc_reg(dev); | 1000 | set_misc_reg(dev); |
1001 | request_irq(dev->irq, ei_irq_wrapper, SA_SHIRQ, dev_info, dev); | 1001 | request_irq(dev->irq, ei_irq_wrapper, IRQF_SHARED, dev_info, dev); |
1002 | 1002 | ||
1003 | info->phy_id = info->eth_phy; | 1003 | info->phy_id = info->eth_phy; |
1004 | info->link_status = 0x00; | 1004 | info->link_status = 0x00; |
diff --git a/drivers/net/pcnet32.c b/drivers/net/pcnet32.c index 0e01c75da429..d768f3d1ac28 100644 --- a/drivers/net/pcnet32.c +++ b/drivers/net/pcnet32.c | |||
@@ -1541,7 +1541,7 @@ static int pcnet32_open(struct net_device *dev) | |||
1541 | unsigned long flags; | 1541 | unsigned long flags; |
1542 | 1542 | ||
1543 | if (request_irq(dev->irq, &pcnet32_interrupt, | 1543 | if (request_irq(dev->irq, &pcnet32_interrupt, |
1544 | lp->shared_irq ? SA_SHIRQ : 0, dev->name, | 1544 | lp->shared_irq ? IRQF_SHARED : 0, dev->name, |
1545 | (void *)dev)) { | 1545 | (void *)dev)) { |
1546 | return -EAGAIN; | 1546 | return -EAGAIN; |
1547 | } | 1547 | } |
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index 44bcd3eb2b83..7d5c2233c252 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c | |||
@@ -556,7 +556,7 @@ int phy_start_interrupts(struct phy_device *phydev) | |||
556 | INIT_WORK(&phydev->phy_queue, phy_change, phydev); | 556 | INIT_WORK(&phydev->phy_queue, phy_change, phydev); |
557 | 557 | ||
558 | if (request_irq(phydev->irq, phy_interrupt, | 558 | if (request_irq(phydev->irq, phy_interrupt, |
559 | SA_SHIRQ, | 559 | IRQF_SHARED, |
560 | "phy_interrupt", | 560 | "phy_interrupt", |
561 | phydev) < 0) { | 561 | phydev) < 0) { |
562 | printk(KERN_WARNING "%s: Can't get IRQ %d (PHY)\n", | 562 | printk(KERN_WARNING "%s: Can't get IRQ %d (PHY)\n", |
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c index 12d1cb289bb0..16a0ef1b1369 100644 --- a/drivers/net/r8169.c +++ b/drivers/net/r8169.c | |||
@@ -1726,7 +1726,7 @@ static int rtl8169_open(struct net_device *dev) | |||
1726 | rtl8169_set_rxbufsize(tp, dev); | 1726 | rtl8169_set_rxbufsize(tp, dev); |
1727 | 1727 | ||
1728 | retval = | 1728 | retval = |
1729 | request_irq(dev->irq, rtl8169_interrupt, SA_SHIRQ, dev->name, dev); | 1729 | request_irq(dev->irq, rtl8169_interrupt, IRQF_SHARED, dev->name, dev); |
1730 | if (retval < 0) | 1730 | if (retval < 0) |
1731 | goto out; | 1731 | goto out; |
1732 | 1732 | ||
diff --git a/drivers/net/rrunner.c b/drivers/net/rrunner.c index 757c542ac40a..c3ed734cbe39 100644 --- a/drivers/net/rrunner.c +++ b/drivers/net/rrunner.c | |||
@@ -1252,7 +1252,7 @@ static int rr_open(struct net_device *dev) | |||
1252 | readl(®s->HostCtrl); | 1252 | readl(®s->HostCtrl); |
1253 | spin_unlock_irqrestore(&rrpriv->lock, flags); | 1253 | spin_unlock_irqrestore(&rrpriv->lock, flags); |
1254 | 1254 | ||
1255 | if (request_irq(dev->irq, rr_interrupt, SA_SHIRQ, dev->name, dev)) { | 1255 | if (request_irq(dev->irq, rr_interrupt, IRQF_SHARED, dev->name, dev)) { |
1256 | printk(KERN_WARNING "%s: Requested IRQ %d is busy\n", | 1256 | printk(KERN_WARNING "%s: Requested IRQ %d is busy\n", |
1257 | dev->name, dev->irq); | 1257 | dev->name, dev->irq); |
1258 | ecode = -EAGAIN; | 1258 | ecode = -EAGAIN; |
diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c index 001344c0763e..c6b77acb35ef 100644 --- a/drivers/net/s2io.c +++ b/drivers/net/s2io.c | |||
@@ -3761,7 +3761,7 @@ static int s2io_open(struct net_device *dev) | |||
3761 | /* After proper initialization of H/W, register ISR */ | 3761 | /* After proper initialization of H/W, register ISR */ |
3762 | if (sp->intr_type == MSI) { | 3762 | if (sp->intr_type == MSI) { |
3763 | err = request_irq((int) sp->pdev->irq, s2io_msi_handle, | 3763 | err = request_irq((int) sp->pdev->irq, s2io_msi_handle, |
3764 | SA_SHIRQ, sp->name, dev); | 3764 | IRQF_SHARED, sp->name, dev); |
3765 | if (err) { | 3765 | if (err) { |
3766 | DBG_PRINT(ERR_DBG, "%s: MSI registration \ | 3766 | DBG_PRINT(ERR_DBG, "%s: MSI registration \ |
3767 | failed\n", dev->name); | 3767 | failed\n", dev->name); |
@@ -3799,7 +3799,7 @@ failed\n", dev->name, i); | |||
3799 | } | 3799 | } |
3800 | } | 3800 | } |
3801 | if (sp->intr_type == INTA) { | 3801 | if (sp->intr_type == INTA) { |
3802 | err = request_irq((int) sp->pdev->irq, s2io_isr, SA_SHIRQ, | 3802 | err = request_irq((int) sp->pdev->irq, s2io_isr, IRQF_SHARED, |
3803 | sp->name, dev); | 3803 | sp->name, dev); |
3804 | if (err) { | 3804 | if (err) { |
3805 | DBG_PRINT(ERR_DBG, "%s: ISR registration failed\n", | 3805 | DBG_PRINT(ERR_DBG, "%s: ISR registration failed\n", |
diff --git a/drivers/net/sb1250-mac.c b/drivers/net/sb1250-mac.c index c7b5f0004e54..9ab1618e82a4 100644 --- a/drivers/net/sb1250-mac.c +++ b/drivers/net/sb1250-mac.c | |||
@@ -2450,7 +2450,7 @@ static int sbmac_open(struct net_device *dev) | |||
2450 | */ | 2450 | */ |
2451 | 2451 | ||
2452 | __raw_readq(sc->sbm_isr); | 2452 | __raw_readq(sc->sbm_isr); |
2453 | if (request_irq(dev->irq, &sbmac_intr, SA_SHIRQ, dev->name, dev)) | 2453 | if (request_irq(dev->irq, &sbmac_intr, IRQF_SHARED, dev->name, dev)) |
2454 | return -EBUSY; | 2454 | return -EBUSY; |
2455 | 2455 | ||
2456 | /* | 2456 | /* |
diff --git a/drivers/net/sis190.c b/drivers/net/sis190.c index df39f3447655..df0cbebb3277 100644 --- a/drivers/net/sis190.c +++ b/drivers/net/sis190.c | |||
@@ -1054,7 +1054,7 @@ static int sis190_open(struct net_device *dev) | |||
1054 | 1054 | ||
1055 | sis190_request_timer(dev); | 1055 | sis190_request_timer(dev); |
1056 | 1056 | ||
1057 | rc = request_irq(dev->irq, sis190_interrupt, SA_SHIRQ, dev->name, dev); | 1057 | rc = request_irq(dev->irq, sis190_interrupt, IRQF_SHARED, dev->name, dev); |
1058 | if (rc < 0) | 1058 | if (rc < 0) |
1059 | goto err_release_timer_2; | 1059 | goto err_release_timer_2; |
1060 | 1060 | ||
diff --git a/drivers/net/sis900.c b/drivers/net/sis900.c index d05874172209..29ee7ffedfff 100644 --- a/drivers/net/sis900.c +++ b/drivers/net/sis900.c | |||
@@ -1013,7 +1013,7 @@ sis900_open(struct net_device *net_dev) | |||
1013 | /* Equalizer workaround Rule */ | 1013 | /* Equalizer workaround Rule */ |
1014 | sis630_set_eq(net_dev, sis_priv->chipset_rev); | 1014 | sis630_set_eq(net_dev, sis_priv->chipset_rev); |
1015 | 1015 | ||
1016 | ret = request_irq(net_dev->irq, &sis900_interrupt, SA_SHIRQ, | 1016 | ret = request_irq(net_dev->irq, &sis900_interrupt, IRQF_SHARED, |
1017 | net_dev->name, net_dev); | 1017 | net_dev->name, net_dev); |
1018 | if (ret) | 1018 | if (ret) |
1019 | return ret; | 1019 | return ret; |
diff --git a/drivers/net/sk98lin/skge.c b/drivers/net/sk98lin/skge.c index f3efbd177ae7..ee62845d3ac9 100644 --- a/drivers/net/sk98lin/skge.c +++ b/drivers/net/sk98lin/skge.c | |||
@@ -570,9 +570,9 @@ SK_BOOL DualNet; | |||
570 | spin_unlock_irqrestore(&pAC->SlowPathLock, Flags); | 570 | spin_unlock_irqrestore(&pAC->SlowPathLock, Flags); |
571 | 571 | ||
572 | if (pAC->GIni.GIMacsFound == 2) { | 572 | if (pAC->GIni.GIMacsFound == 2) { |
573 | Ret = request_irq(dev->irq, SkGeIsr, SA_SHIRQ, "sk98lin", dev); | 573 | Ret = request_irq(dev->irq, SkGeIsr, IRQF_SHARED, "sk98lin", dev); |
574 | } else if (pAC->GIni.GIMacsFound == 1) { | 574 | } else if (pAC->GIni.GIMacsFound == 1) { |
575 | Ret = request_irq(dev->irq, SkGeIsrOnePort, SA_SHIRQ, | 575 | Ret = request_irq(dev->irq, SkGeIsrOnePort, IRQF_SHARED, |
576 | "sk98lin", dev); | 576 | "sk98lin", dev); |
577 | } else { | 577 | } else { |
578 | printk(KERN_WARNING "sk98lin: Illegal number of ports: %d\n", | 578 | printk(KERN_WARNING "sk98lin: Illegal number of ports: %d\n", |
@@ -5073,9 +5073,9 @@ static int skge_resume(struct pci_dev *pdev) | |||
5073 | pci_enable_device(pdev); | 5073 | pci_enable_device(pdev); |
5074 | pci_set_master(pdev); | 5074 | pci_set_master(pdev); |
5075 | if (pAC->GIni.GIMacsFound == 2) | 5075 | if (pAC->GIni.GIMacsFound == 2) |
5076 | ret = request_irq(dev->irq, SkGeIsr, SA_SHIRQ, "sk98lin", dev); | 5076 | ret = request_irq(dev->irq, SkGeIsr, IRQF_SHARED, "sk98lin", dev); |
5077 | else | 5077 | else |
5078 | ret = request_irq(dev->irq, SkGeIsrOnePort, SA_SHIRQ, "sk98lin", dev); | 5078 | ret = request_irq(dev->irq, SkGeIsrOnePort, IRQF_SHARED, "sk98lin", dev); |
5079 | if (ret) { | 5079 | if (ret) { |
5080 | printk(KERN_WARNING "sk98lin: unable to acquire IRQ %d\n", dev->irq); | 5080 | printk(KERN_WARNING "sk98lin: unable to acquire IRQ %d\n", dev->irq); |
5081 | pAC->AllocFlag &= ~SK_ALLOC_IRQ; | 5081 | pAC->AllocFlag &= ~SK_ALLOC_IRQ; |
diff --git a/drivers/net/sk_mca.c b/drivers/net/sk_mca.c index e5d6d95960c7..799e09801934 100644 --- a/drivers/net/sk_mca.c +++ b/drivers/net/sk_mca.c | |||
@@ -824,7 +824,7 @@ static int skmca_open(struct net_device *dev) | |||
824 | /* register resources - only necessary for IRQ */ | 824 | /* register resources - only necessary for IRQ */ |
825 | result = | 825 | result = |
826 | request_irq(priv->realirq, irq_handler, | 826 | request_irq(priv->realirq, irq_handler, |
827 | SA_SHIRQ | SA_SAMPLE_RANDOM, "sk_mca", dev); | 827 | IRQF_SHARED | IRQF_SAMPLE_RANDOM, "sk_mca", dev); |
828 | if (result != 0) { | 828 | if (result != 0) { |
829 | printk("%s: failed to register irq %d\n", dev->name, | 829 | printk("%s: failed to register irq %d\n", dev->name, |
830 | dev->irq); | 830 | dev->irq); |
diff --git a/drivers/net/skfp/skfddi.c b/drivers/net/skfp/skfddi.c index c7fb6133047e..b5714a60237d 100644 --- a/drivers/net/skfp/skfddi.c +++ b/drivers/net/skfp/skfddi.c | |||
@@ -497,7 +497,7 @@ static int skfp_open(struct net_device *dev) | |||
497 | 497 | ||
498 | PRINTK(KERN_INFO "entering skfp_open\n"); | 498 | PRINTK(KERN_INFO "entering skfp_open\n"); |
499 | /* Register IRQ - support shared interrupts by passing device ptr */ | 499 | /* Register IRQ - support shared interrupts by passing device ptr */ |
500 | err = request_irq(dev->irq, (void *) skfp_interrupt, SA_SHIRQ, | 500 | err = request_irq(dev->irq, (void *) skfp_interrupt, IRQF_SHARED, |
501 | dev->name, dev); | 501 | dev->name, dev); |
502 | if (err) | 502 | if (err) |
503 | return err; | 503 | return err; |
diff --git a/drivers/net/skge.c b/drivers/net/skge.c index 82df13be3d40..82200bfaa8ed 100644 --- a/drivers/net/skge.c +++ b/drivers/net/skge.c | |||
@@ -3341,7 +3341,7 @@ static int __devinit skge_probe(struct pci_dev *pdev, | |||
3341 | goto err_out_free_hw; | 3341 | goto err_out_free_hw; |
3342 | } | 3342 | } |
3343 | 3343 | ||
3344 | err = request_irq(pdev->irq, skge_intr, SA_SHIRQ, DRV_NAME, hw); | 3344 | err = request_irq(pdev->irq, skge_intr, IRQF_SHARED, DRV_NAME, hw); |
3345 | if (err) { | 3345 | if (err) { |
3346 | printk(KERN_ERR PFX "%s: cannot assign irq %d\n", | 3346 | printk(KERN_ERR PFX "%s: cannot assign irq %d\n", |
3347 | pci_name(pdev), pdev->irq); | 3347 | pci_name(pdev), pdev->irq); |
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c index 3f1b0fef13e7..418f169a6a31 100644 --- a/drivers/net/sky2.c +++ b/drivers/net/sky2.c | |||
@@ -3188,7 +3188,7 @@ static int __devinit sky2_test_msi(struct sky2_hw *hw) | |||
3188 | 3188 | ||
3189 | sky2_write32(hw, B0_IMSK, Y2_IS_IRQ_SW); | 3189 | sky2_write32(hw, B0_IMSK, Y2_IS_IRQ_SW); |
3190 | 3190 | ||
3191 | err = request_irq(pdev->irq, sky2_test_intr, SA_SHIRQ, DRV_NAME, hw); | 3191 | err = request_irq(pdev->irq, sky2_test_intr, IRQF_SHARED, DRV_NAME, hw); |
3192 | if (err) { | 3192 | if (err) { |
3193 | printk(KERN_ERR PFX "%s: cannot assign irq %d\n", | 3193 | printk(KERN_ERR PFX "%s: cannot assign irq %d\n", |
3194 | pci_name(pdev), pdev->irq); | 3194 | pci_name(pdev), pdev->irq); |
@@ -3348,7 +3348,7 @@ static int __devinit sky2_probe(struct pci_dev *pdev, | |||
3348 | goto err_out_unregister; | 3348 | goto err_out_unregister; |
3349 | } | 3349 | } |
3350 | 3350 | ||
3351 | err = request_irq(pdev->irq, sky2_intr, SA_SHIRQ, DRV_NAME, hw); | 3351 | err = request_irq(pdev->irq, sky2_intr, IRQF_SHARED, DRV_NAME, hw); |
3352 | if (err) { | 3352 | if (err) { |
3353 | printk(KERN_ERR PFX "%s: cannot assign irq %d\n", | 3353 | printk(KERN_ERR PFX "%s: cannot assign irq %d\n", |
3354 | pci_name(pdev), pdev->irq); | 3354 | pci_name(pdev), pdev->irq); |
diff --git a/drivers/net/smc-ultra32.c b/drivers/net/smc-ultra32.c index ff9bd97746dc..85be22a05973 100644 --- a/drivers/net/smc-ultra32.c +++ b/drivers/net/smc-ultra32.c | |||
@@ -290,7 +290,7 @@ out: | |||
290 | static int ultra32_open(struct net_device *dev) | 290 | static int ultra32_open(struct net_device *dev) |
291 | { | 291 | { |
292 | int ioaddr = dev->base_addr - ULTRA32_NIC_OFFSET; /* ASIC addr */ | 292 | int ioaddr = dev->base_addr - ULTRA32_NIC_OFFSET; /* ASIC addr */ |
293 | int irq_flags = (inb(ioaddr + ULTRA32_CFG5) & 0x08) ? 0 : SA_SHIRQ; | 293 | int irq_flags = (inb(ioaddr + ULTRA32_CFG5) & 0x08) ? 0 : IRQF_SHARED; |
294 | int retval; | 294 | int retval; |
295 | 295 | ||
296 | retval = request_irq(dev->irq, ei_interrupt, irq_flags, dev->name, dev); | 296 | retval = request_irq(dev->irq, ei_interrupt, irq_flags, dev->name, dev); |
diff --git a/drivers/net/smc911x.c b/drivers/net/smc911x.c index bdd8702ead54..d37bd860b336 100644 --- a/drivers/net/smc911x.c +++ b/drivers/net/smc911x.c | |||
@@ -2081,7 +2081,7 @@ static int __init smc911x_probe(struct net_device *dev, unsigned long ioaddr) | |||
2081 | lp->ctl_rspeed = 100; | 2081 | lp->ctl_rspeed = 100; |
2082 | 2082 | ||
2083 | /* Grab the IRQ */ | 2083 | /* Grab the IRQ */ |
2084 | retval = request_irq(dev->irq, &smc911x_interrupt, SA_SHIRQ, dev->name, dev); | 2084 | retval = request_irq(dev->irq, &smc911x_interrupt, IRQF_SHARED, dev->name, dev); |
2085 | if (retval) | 2085 | if (retval) |
2086 | goto err_out; | 2086 | goto err_out; |
2087 | 2087 | ||
diff --git a/drivers/net/smc91x.h b/drivers/net/smc91x.h index bf776125ca38..b4028049ed76 100644 --- a/drivers/net/smc91x.h +++ b/drivers/net/smc91x.h | |||
@@ -207,7 +207,7 @@ SMC_outw(u16 val, void __iomem *ioaddr, int reg) | |||
207 | machine_is_omap_h2() \ | 207 | machine_is_omap_h2() \ |
208 | || machine_is_omap_h3() \ | 208 | || machine_is_omap_h3() \ |
209 | || (machine_is_omap_innovator() && !cpu_is_omap1510()) \ | 209 | || (machine_is_omap_innovator() && !cpu_is_omap1510()) \ |
210 | ) ? SA_TRIGGER_FALLING : SA_TRIGGER_RISING) | 210 | ) ? IRQF_TRIGGER_FALLING : IRQF_TRIGGER_RISING) |
211 | 211 | ||
212 | 212 | ||
213 | #elif defined(CONFIG_SH_SH4202_MICRODEV) | 213 | #elif defined(CONFIG_SH_SH4202_MICRODEV) |
@@ -540,7 +540,7 @@ smc_pxa_dma_irq(int dma, void *dummy, struct pt_regs *regs) | |||
540 | #endif | 540 | #endif |
541 | 541 | ||
542 | #ifndef SMC_IRQ_FLAGS | 542 | #ifndef SMC_IRQ_FLAGS |
543 | #define SMC_IRQ_FLAGS SA_TRIGGER_RISING | 543 | #define SMC_IRQ_FLAGS IRQF_TRIGGER_RISING |
544 | #endif | 544 | #endif |
545 | 545 | ||
546 | #ifndef SMC_INTERRUPT_PREAMBLE | 546 | #ifndef SMC_INTERRUPT_PREAMBLE |
diff --git a/drivers/net/spider_net.c b/drivers/net/spider_net.c index e0b72676922c..fb1d5a8a45cf 100644 --- a/drivers/net/spider_net.c +++ b/drivers/net/spider_net.c | |||
@@ -1744,7 +1744,7 @@ spider_net_open(struct net_device *netdev) | |||
1744 | 1744 | ||
1745 | result = -EBUSY; | 1745 | result = -EBUSY; |
1746 | if (request_irq(netdev->irq, spider_net_interrupt, | 1746 | if (request_irq(netdev->irq, spider_net_interrupt, |
1747 | SA_SHIRQ, netdev->name, netdev)) | 1747 | IRQF_SHARED, netdev->name, netdev)) |
1748 | goto register_int_failed; | 1748 | goto register_int_failed; |
1749 | 1749 | ||
1750 | spider_net_enable_card(card); | 1750 | spider_net_enable_card(card); |
diff --git a/drivers/net/starfire.c b/drivers/net/starfire.c index f91be95356a4..ed1f59901ff4 100644 --- a/drivers/net/starfire.c +++ b/drivers/net/starfire.c | |||
@@ -1070,7 +1070,7 @@ static int netdev_open(struct net_device *dev) | |||
1070 | 1070 | ||
1071 | /* Do we ever need to reset the chip??? */ | 1071 | /* Do we ever need to reset the chip??? */ |
1072 | 1072 | ||
1073 | retval = request_irq(dev->irq, &intr_handler, SA_SHIRQ, dev->name, dev); | 1073 | retval = request_irq(dev->irq, &intr_handler, IRQF_SHARED, dev->name, dev); |
1074 | if (retval) | 1074 | if (retval) |
1075 | return retval; | 1075 | return retval; |
1076 | 1076 | ||
diff --git a/drivers/net/sun3lance.c b/drivers/net/sun3lance.c index a2fad50437e6..2dcadb169a22 100644 --- a/drivers/net/sun3lance.c +++ b/drivers/net/sun3lance.c | |||
@@ -341,7 +341,7 @@ static int __init lance_probe( struct net_device *dev) | |||
341 | 341 | ||
342 | REGA(CSR0) = CSR0_STOP; | 342 | REGA(CSR0) = CSR0_STOP; |
343 | 343 | ||
344 | request_irq(LANCE_IRQ, lance_interrupt, SA_INTERRUPT, "SUN3 Lance", dev); | 344 | request_irq(LANCE_IRQ, lance_interrupt, IRQF_DISABLED, "SUN3 Lance", dev); |
345 | dev->irq = (unsigned short)LANCE_IRQ; | 345 | dev->irq = (unsigned short)LANCE_IRQ; |
346 | 346 | ||
347 | 347 | ||
diff --git a/drivers/net/sunbmac.c b/drivers/net/sunbmac.c index 7127f0f36f0e..d46891510767 100644 --- a/drivers/net/sunbmac.c +++ b/drivers/net/sunbmac.c | |||
@@ -918,7 +918,7 @@ static int bigmac_open(struct net_device *dev) | |||
918 | struct bigmac *bp = (struct bigmac *) dev->priv; | 918 | struct bigmac *bp = (struct bigmac *) dev->priv; |
919 | int ret; | 919 | int ret; |
920 | 920 | ||
921 | ret = request_irq(dev->irq, &bigmac_interrupt, SA_SHIRQ, dev->name, bp); | 921 | ret = request_irq(dev->irq, &bigmac_interrupt, IRQF_SHARED, dev->name, bp); |
922 | if (ret) { | 922 | if (ret) { |
923 | printk(KERN_ERR "BIGMAC: Can't order irq %d to go.\n", dev->irq); | 923 | printk(KERN_ERR "BIGMAC: Can't order irq %d to go.\n", dev->irq); |
924 | return ret; | 924 | return ret; |
diff --git a/drivers/net/sundance.c b/drivers/net/sundance.c index f13b2a195c70..643fceae3db5 100644 --- a/drivers/net/sundance.c +++ b/drivers/net/sundance.c | |||
@@ -870,7 +870,7 @@ static int netdev_open(struct net_device *dev) | |||
870 | 870 | ||
871 | /* Do we need to reset the chip??? */ | 871 | /* Do we need to reset the chip??? */ |
872 | 872 | ||
873 | i = request_irq(dev->irq, &intr_handler, SA_SHIRQ, dev->name, dev); | 873 | i = request_irq(dev->irq, &intr_handler, IRQF_SHARED, dev->name, dev); |
874 | if (i) | 874 | if (i) |
875 | return i; | 875 | return i; |
876 | 876 | ||
diff --git a/drivers/net/sungem.c b/drivers/net/sungem.c index 5248670d29f7..b70bbd748978 100644 --- a/drivers/net/sungem.c +++ b/drivers/net/sungem.c | |||
@@ -2220,7 +2220,7 @@ static int gem_do_start(struct net_device *dev) | |||
2220 | spin_unlock_irqrestore(&gp->lock, flags); | 2220 | spin_unlock_irqrestore(&gp->lock, flags); |
2221 | 2221 | ||
2222 | if (request_irq(gp->pdev->irq, gem_interrupt, | 2222 | if (request_irq(gp->pdev->irq, gem_interrupt, |
2223 | SA_SHIRQ, dev->name, (void *)dev)) { | 2223 | IRQF_SHARED, dev->name, (void *)dev)) { |
2224 | printk(KERN_ERR "%s: failed to request irq !\n", gp->dev->name); | 2224 | printk(KERN_ERR "%s: failed to request irq !\n", gp->dev->name); |
2225 | 2225 | ||
2226 | spin_lock_irqsave(&gp->lock, flags); | 2226 | spin_lock_irqsave(&gp->lock, flags); |
diff --git a/drivers/net/sunhme.c b/drivers/net/sunhme.c index d85b83204f6b..8673fd4c08c7 100644 --- a/drivers/net/sunhme.c +++ b/drivers/net/sunhme.c | |||
@@ -2194,7 +2194,7 @@ static int happy_meal_open(struct net_device *dev) | |||
2194 | */ | 2194 | */ |
2195 | if ((hp->happy_flags & (HFLAG_QUATTRO|HFLAG_PCI)) != HFLAG_QUATTRO) { | 2195 | if ((hp->happy_flags & (HFLAG_QUATTRO|HFLAG_PCI)) != HFLAG_QUATTRO) { |
2196 | if (request_irq(dev->irq, &happy_meal_interrupt, | 2196 | if (request_irq(dev->irq, &happy_meal_interrupt, |
2197 | SA_SHIRQ, dev->name, (void *)dev)) { | 2197 | IRQF_SHARED, dev->name, (void *)dev)) { |
2198 | HMD(("EAGAIN\n")); | 2198 | HMD(("EAGAIN\n")); |
2199 | printk(KERN_ERR "happy_meal(SBUS): Can't order irq %d to go.\n", | 2199 | printk(KERN_ERR "happy_meal(SBUS): Can't order irq %d to go.\n", |
2200 | dev->irq); | 2200 | dev->irq); |
@@ -2608,7 +2608,7 @@ static void __init quattro_sbus_register_irqs(void) | |||
2608 | 2608 | ||
2609 | err = request_irq(sdev->irqs[0], | 2609 | err = request_irq(sdev->irqs[0], |
2610 | quattro_sbus_interrupt, | 2610 | quattro_sbus_interrupt, |
2611 | SA_SHIRQ, "Quattro", | 2611 | IRQF_SHARED, "Quattro", |
2612 | qp); | 2612 | qp); |
2613 | if (err != 0) { | 2613 | if (err != 0) { |
2614 | printk(KERN_ERR "Quattro: Fatal IRQ registery error %d.\n", err); | 2614 | printk(KERN_ERR "Quattro: Fatal IRQ registery error %d.\n", err); |
diff --git a/drivers/net/sunlance.c b/drivers/net/sunlance.c index 5b0b60f4d20e..1ef9fd39a79a 100644 --- a/drivers/net/sunlance.c +++ b/drivers/net/sunlance.c | |||
@@ -930,7 +930,7 @@ static int lance_open(struct net_device *dev) | |||
930 | 930 | ||
931 | STOP_LANCE(lp); | 931 | STOP_LANCE(lp); |
932 | 932 | ||
933 | if (request_irq(dev->irq, &lance_interrupt, SA_SHIRQ, | 933 | if (request_irq(dev->irq, &lance_interrupt, IRQF_SHARED, |
934 | lancestr, (void *) dev)) { | 934 | lancestr, (void *) dev)) { |
935 | printk(KERN_ERR "Lance: Can't get irq %d\n", dev->irq); | 935 | printk(KERN_ERR "Lance: Can't get irq %d\n", dev->irq); |
936 | return -EAGAIN; | 936 | return -EAGAIN; |
diff --git a/drivers/net/sunqe.c b/drivers/net/sunqe.c index 9da6d5b87173..817a40b66638 100644 --- a/drivers/net/sunqe.c +++ b/drivers/net/sunqe.c | |||
@@ -811,7 +811,7 @@ static struct sunqec * __init get_qec(struct sbus_dev *child_sdev) | |||
811 | qec_init_once(qecp, qec_sdev); | 811 | qec_init_once(qecp, qec_sdev); |
812 | 812 | ||
813 | if (request_irq(qec_sdev->irqs[0], &qec_interrupt, | 813 | if (request_irq(qec_sdev->irqs[0], &qec_interrupt, |
814 | SA_SHIRQ, "qec", (void *) qecp)) { | 814 | IRQF_SHARED, "qec", (void *) qecp)) { |
815 | printk(KERN_ERR "qec: Can't register irq.\n"); | 815 | printk(KERN_ERR "qec: Can't register irq.\n"); |
816 | goto fail; | 816 | goto fail; |
817 | } | 817 | } |
diff --git a/drivers/net/tc35815.c b/drivers/net/tc35815.c index c2ec9fd8c31d..8b53ded66d37 100644 --- a/drivers/net/tc35815.c +++ b/drivers/net/tc35815.c | |||
@@ -880,7 +880,7 @@ tc35815_open(struct net_device *dev) | |||
880 | */ | 880 | */ |
881 | 881 | ||
882 | if (dev->irq == 0 || | 882 | if (dev->irq == 0 || |
883 | request_irq(dev->irq, &tc35815_interrupt, SA_SHIRQ, cardname, dev)) { | 883 | request_irq(dev->irq, &tc35815_interrupt, IRQF_SHARED, cardname, dev)) { |
884 | return -EAGAIN; | 884 | return -EAGAIN; |
885 | } | 885 | } |
886 | 886 | ||
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index 953255e92633..e5e1b2962936 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c | |||
@@ -6702,12 +6702,12 @@ static int tg3_request_irq(struct tg3 *tp) | |||
6702 | fn = tg3_msi; | 6702 | fn = tg3_msi; |
6703 | if (tp->tg3_flags2 & TG3_FLG2_1SHOT_MSI) | 6703 | if (tp->tg3_flags2 & TG3_FLG2_1SHOT_MSI) |
6704 | fn = tg3_msi_1shot; | 6704 | fn = tg3_msi_1shot; |
6705 | flags = SA_SAMPLE_RANDOM; | 6705 | flags = IRQF_SAMPLE_RANDOM; |
6706 | } else { | 6706 | } else { |
6707 | fn = tg3_interrupt; | 6707 | fn = tg3_interrupt; |
6708 | if (tp->tg3_flags & TG3_FLAG_TAGGED_STATUS) | 6708 | if (tp->tg3_flags & TG3_FLAG_TAGGED_STATUS) |
6709 | fn = tg3_interrupt_tagged; | 6709 | fn = tg3_interrupt_tagged; |
6710 | flags = SA_SHIRQ | SA_SAMPLE_RANDOM; | 6710 | flags = IRQF_SHARED | IRQF_SAMPLE_RANDOM; |
6711 | } | 6711 | } |
6712 | return (request_irq(tp->pdev->irq, fn, flags, dev->name, dev)); | 6712 | return (request_irq(tp->pdev->irq, fn, flags, dev->name, dev)); |
6713 | } | 6713 | } |
@@ -6726,7 +6726,7 @@ static int tg3_test_interrupt(struct tg3 *tp) | |||
6726 | free_irq(tp->pdev->irq, dev); | 6726 | free_irq(tp->pdev->irq, dev); |
6727 | 6727 | ||
6728 | err = request_irq(tp->pdev->irq, tg3_test_isr, | 6728 | err = request_irq(tp->pdev->irq, tg3_test_isr, |
6729 | SA_SHIRQ | SA_SAMPLE_RANDOM, dev->name, dev); | 6729 | IRQF_SHARED | IRQF_SAMPLE_RANDOM, dev->name, dev); |
6730 | if (err) | 6730 | if (err) |
6731 | return err; | 6731 | return err; |
6732 | 6732 | ||
diff --git a/drivers/net/tlan.c b/drivers/net/tlan.c index 12076f8f942c..23c0017f25a9 100644 --- a/drivers/net/tlan.c +++ b/drivers/net/tlan.c | |||
@@ -943,7 +943,7 @@ static int TLan_Open( struct net_device *dev ) | |||
943 | int err; | 943 | int err; |
944 | 944 | ||
945 | priv->tlanRev = TLan_DioRead8( dev->base_addr, TLAN_DEF_REVISION ); | 945 | priv->tlanRev = TLan_DioRead8( dev->base_addr, TLAN_DEF_REVISION ); |
946 | err = request_irq( dev->irq, TLan_HandleInterrupt, SA_SHIRQ, TLanSignature, dev ); | 946 | err = request_irq( dev->irq, TLan_HandleInterrupt, IRQF_SHARED, TLanSignature, dev ); |
947 | 947 | ||
948 | if ( err ) { | 948 | if ( err ) { |
949 | printk(KERN_ERR "TLAN: Cannot open %s because IRQ %d is already in use.\n", dev->name, dev->irq ); | 949 | printk(KERN_ERR "TLAN: Cannot open %s because IRQ %d is already in use.\n", dev->name, dev->irq ); |
diff --git a/drivers/net/tokenring/3c359.c b/drivers/net/tokenring/3c359.c index 77bb298129d7..465921e3874c 100644 --- a/drivers/net/tokenring/3c359.c +++ b/drivers/net/tokenring/3c359.c | |||
@@ -576,7 +576,7 @@ static int xl_open(struct net_device *dev) | |||
576 | 576 | ||
577 | u16 switchsettings, switchsettings_eeprom ; | 577 | u16 switchsettings, switchsettings_eeprom ; |
578 | 578 | ||
579 | if(request_irq(dev->irq, &xl_interrupt, SA_SHIRQ , "3c359", dev)) { | 579 | if(request_irq(dev->irq, &xl_interrupt, IRQF_SHARED , "3c359", dev)) { |
580 | return -EAGAIN; | 580 | return -EAGAIN; |
581 | } | 581 | } |
582 | 582 | ||
diff --git a/drivers/net/tokenring/abyss.c b/drivers/net/tokenring/abyss.c index 649d8ea354f5..1bdd3beefbe5 100644 --- a/drivers/net/tokenring/abyss.c +++ b/drivers/net/tokenring/abyss.c | |||
@@ -123,7 +123,7 @@ static int __devinit abyss_attach(struct pci_dev *pdev, const struct pci_device_ | |||
123 | goto err_out_trdev; | 123 | goto err_out_trdev; |
124 | } | 124 | } |
125 | 125 | ||
126 | ret = request_irq(pdev->irq, tms380tr_interrupt, SA_SHIRQ, | 126 | ret = request_irq(pdev->irq, tms380tr_interrupt, IRQF_SHARED, |
127 | dev->name, dev); | 127 | dev->name, dev); |
128 | if (ret) | 128 | if (ret) |
129 | goto err_out_region; | 129 | goto err_out_region; |
diff --git a/drivers/net/tokenring/lanstreamer.c b/drivers/net/tokenring/lanstreamer.c index 30dcdaebf41a..28d968ffd5d0 100644 --- a/drivers/net/tokenring/lanstreamer.c +++ b/drivers/net/tokenring/lanstreamer.c | |||
@@ -601,7 +601,7 @@ static int streamer_open(struct net_device *dev) | |||
601 | rc=streamer_reset(dev); | 601 | rc=streamer_reset(dev); |
602 | } | 602 | } |
603 | 603 | ||
604 | if (request_irq(dev->irq, &streamer_interrupt, SA_SHIRQ, "lanstreamer", dev)) { | 604 | if (request_irq(dev->irq, &streamer_interrupt, IRQF_SHARED, "lanstreamer", dev)) { |
605 | return -EAGAIN; | 605 | return -EAGAIN; |
606 | } | 606 | } |
607 | #if STREAMER_DEBUG | 607 | #if STREAMER_DEBUG |
diff --git a/drivers/net/tokenring/madgemc.c b/drivers/net/tokenring/madgemc.c index 19e6f4dfd69c..666bbaaae82f 100644 --- a/drivers/net/tokenring/madgemc.c +++ b/drivers/net/tokenring/madgemc.c | |||
@@ -311,7 +311,7 @@ static int __devinit madgemc_probe(struct device *device) | |||
311 | */ | 311 | */ |
312 | outb(0, dev->base_addr + MC_CONTROL_REG0); /* sanity */ | 312 | outb(0, dev->base_addr + MC_CONTROL_REG0); /* sanity */ |
313 | madgemc_setsifsel(dev, 1); | 313 | madgemc_setsifsel(dev, 1); |
314 | if (request_irq(dev->irq, madgemc_interrupt, SA_SHIRQ, | 314 | if (request_irq(dev->irq, madgemc_interrupt, IRQF_SHARED, |
315 | "madgemc", dev)) { | 315 | "madgemc", dev)) { |
316 | ret = -EBUSY; | 316 | ret = -EBUSY; |
317 | goto getout3; | 317 | goto getout3; |
diff --git a/drivers/net/tokenring/olympic.c b/drivers/net/tokenring/olympic.c index d7a30d99ae8f..85831484bc40 100644 --- a/drivers/net/tokenring/olympic.c +++ b/drivers/net/tokenring/olympic.c | |||
@@ -445,7 +445,7 @@ static int olympic_open(struct net_device *dev) | |||
445 | 445 | ||
446 | olympic_init(dev); | 446 | olympic_init(dev); |
447 | 447 | ||
448 | if(request_irq(dev->irq, &olympic_interrupt, SA_SHIRQ , "olympic", dev)) { | 448 | if(request_irq(dev->irq, &olympic_interrupt, IRQF_SHARED , "olympic", dev)) { |
449 | return -EAGAIN; | 449 | return -EAGAIN; |
450 | } | 450 | } |
451 | 451 | ||
diff --git a/drivers/net/tokenring/smctr.c b/drivers/net/tokenring/smctr.c index f2807ab5a2be..cd2e0251e2bc 100644 --- a/drivers/net/tokenring/smctr.c +++ b/drivers/net/tokenring/smctr.c | |||
@@ -531,7 +531,7 @@ static int __init smctr_chk_mca(struct net_device *dev) | |||
531 | dev->irq = 15; | 531 | dev->irq = 15; |
532 | break; | 532 | break; |
533 | } | 533 | } |
534 | if (request_irq(dev->irq, smctr_interrupt, SA_SHIRQ, smctr_name, dev)) { | 534 | if (request_irq(dev->irq, smctr_interrupt, IRQF_SHARED, smctr_name, dev)) { |
535 | release_region(dev->base_addr, SMCTR_IO_EXTENT); | 535 | release_region(dev->base_addr, SMCTR_IO_EXTENT); |
536 | return -ENODEV; | 536 | return -ENODEV; |
537 | } | 537 | } |
@@ -1061,7 +1061,7 @@ static int __init smctr_chk_isa(struct net_device *dev) | |||
1061 | goto out2; | 1061 | goto out2; |
1062 | } | 1062 | } |
1063 | 1063 | ||
1064 | if (request_irq(dev->irq, smctr_interrupt, SA_SHIRQ, smctr_name, dev)) | 1064 | if (request_irq(dev->irq, smctr_interrupt, IRQF_SHARED, smctr_name, dev)) |
1065 | goto out2; | 1065 | goto out2; |
1066 | 1066 | ||
1067 | /* Get 58x Rom Base */ | 1067 | /* Get 58x Rom Base */ |
diff --git a/drivers/net/tokenring/tmspci.c b/drivers/net/tokenring/tmspci.c index ab47c0547a3b..7d3e270c4f45 100644 --- a/drivers/net/tokenring/tmspci.c +++ b/drivers/net/tokenring/tmspci.c | |||
@@ -122,7 +122,7 @@ static int __devinit tms_pci_attach(struct pci_dev *pdev, const struct pci_devic | |||
122 | goto err_out_trdev; | 122 | goto err_out_trdev; |
123 | } | 123 | } |
124 | 124 | ||
125 | ret = request_irq(pdev->irq, tms380tr_interrupt, SA_SHIRQ, | 125 | ret = request_irq(pdev->irq, tms380tr_interrupt, IRQF_SHARED, |
126 | dev->name, dev); | 126 | dev->name, dev); |
127 | if (ret) | 127 | if (ret) |
128 | goto err_out_region; | 128 | goto err_out_region; |
diff --git a/drivers/net/tulip/de2104x.c b/drivers/net/tulip/de2104x.c index 354294c6271e..d05c5aa254ee 100644 --- a/drivers/net/tulip/de2104x.c +++ b/drivers/net/tulip/de2104x.c | |||
@@ -1371,7 +1371,7 @@ static int de_open (struct net_device *dev) | |||
1371 | 1371 | ||
1372 | dw32(IntrMask, 0); | 1372 | dw32(IntrMask, 0); |
1373 | 1373 | ||
1374 | rc = request_irq(dev->irq, de_interrupt, SA_SHIRQ, dev->name, dev); | 1374 | rc = request_irq(dev->irq, de_interrupt, IRQF_SHARED, dev->name, dev); |
1375 | if (rc) { | 1375 | if (rc) { |
1376 | printk(KERN_ERR "%s: IRQ %d request failure, err=%d\n", | 1376 | printk(KERN_ERR "%s: IRQ %d request failure, err=%d\n", |
1377 | dev->name, dev->irq, rc); | 1377 | dev->name, dev->irq, rc); |
diff --git a/drivers/net/tulip/de4x5.c b/drivers/net/tulip/de4x5.c index 2647a5bc5211..75ff14a55239 100644 --- a/drivers/net/tulip/de4x5.c +++ b/drivers/net/tulip/de4x5.c | |||
@@ -292,7 +292,7 @@ | |||
292 | 0.41 21-Mar-96 Don't check for get_hw_addr checksum unless DEC card | 292 | 0.41 21-Mar-96 Don't check for get_hw_addr checksum unless DEC card |
293 | only <niles@axp745gsfc.nasa.gov> | 293 | only <niles@axp745gsfc.nasa.gov> |
294 | Fix for multiple PCI cards reported by <jos@xos.nl> | 294 | Fix for multiple PCI cards reported by <jos@xos.nl> |
295 | Duh, put the SA_SHIRQ flag into request_interrupt(). | 295 | Duh, put the IRQF_SHARED flag into request_interrupt(). |
296 | Fix SMC ethernet address in enet_det[]. | 296 | Fix SMC ethernet address in enet_det[]. |
297 | Print chip name instead of "UNKNOWN" during boot. | 297 | Print chip name instead of "UNKNOWN" during boot. |
298 | 0.42 26-Apr-96 Fix MII write TA bit error. | 298 | 0.42 26-Apr-96 Fix MII write TA bit error. |
@@ -353,7 +353,7 @@ | |||
353 | infoblocks. | 353 | infoblocks. |
354 | Added DC21142 and DC21143 functions. | 354 | Added DC21142 and DC21143 functions. |
355 | Added byte counters from <phil@tazenda.demon.co.uk> | 355 | Added byte counters from <phil@tazenda.demon.co.uk> |
356 | Added SA_INTERRUPT temporary fix from | 356 | Added IRQF_DISABLED temporary fix from |
357 | <mjacob@feral.com>. | 357 | <mjacob@feral.com>. |
358 | 0.53 12-Nov-97 Fix the *_probe() to include 'eth??' name during | 358 | 0.53 12-Nov-97 Fix the *_probe() to include 'eth??' name during |
359 | module load: bug reported by | 359 | module load: bug reported by |
@@ -1319,10 +1319,10 @@ de4x5_open(struct net_device *dev) | |||
1319 | lp->state = OPEN; | 1319 | lp->state = OPEN; |
1320 | de4x5_dbg_open(dev); | 1320 | de4x5_dbg_open(dev); |
1321 | 1321 | ||
1322 | if (request_irq(dev->irq, (void *)de4x5_interrupt, SA_SHIRQ, | 1322 | if (request_irq(dev->irq, (void *)de4x5_interrupt, IRQF_SHARED, |
1323 | lp->adapter_name, dev)) { | 1323 | lp->adapter_name, dev)) { |
1324 | printk("de4x5_open(): Requested IRQ%d is busy - attemping FAST/SHARE...", dev->irq); | 1324 | printk("de4x5_open(): Requested IRQ%d is busy - attemping FAST/SHARE...", dev->irq); |
1325 | if (request_irq(dev->irq, de4x5_interrupt, SA_INTERRUPT | SA_SHIRQ, | 1325 | if (request_irq(dev->irq, de4x5_interrupt, IRQF_DISABLED | IRQF_SHARED, |
1326 | lp->adapter_name, dev)) { | 1326 | lp->adapter_name, dev)) { |
1327 | printk("\n Cannot get IRQ- reconfigure your hardware.\n"); | 1327 | printk("\n Cannot get IRQ- reconfigure your hardware.\n"); |
1328 | disable_ast(dev); | 1328 | disable_ast(dev); |
diff --git a/drivers/net/tulip/dmfe.c b/drivers/net/tulip/dmfe.c index ba5b112093f4..4e5b0f2acc39 100644 --- a/drivers/net/tulip/dmfe.c +++ b/drivers/net/tulip/dmfe.c | |||
@@ -506,7 +506,7 @@ static int dmfe_open(struct DEVICE *dev) | |||
506 | 506 | ||
507 | DMFE_DBUG(0, "dmfe_open", 0); | 507 | DMFE_DBUG(0, "dmfe_open", 0); |
508 | 508 | ||
509 | ret = request_irq(dev->irq, &dmfe_interrupt, SA_SHIRQ, dev->name, dev); | 509 | ret = request_irq(dev->irq, &dmfe_interrupt, IRQF_SHARED, dev->name, dev); |
510 | if (ret) | 510 | if (ret) |
511 | return ret; | 511 | return ret; |
512 | 512 | ||
diff --git a/drivers/net/tulip/tulip_core.c b/drivers/net/tulip/tulip_core.c index 8f4f4840fc12..7351831f57ce 100644 --- a/drivers/net/tulip/tulip_core.c +++ b/drivers/net/tulip/tulip_core.c | |||
@@ -489,7 +489,7 @@ tulip_open(struct net_device *dev) | |||
489 | { | 489 | { |
490 | int retval; | 490 | int retval; |
491 | 491 | ||
492 | if ((retval = request_irq(dev->irq, &tulip_interrupt, SA_SHIRQ, dev->name, dev))) | 492 | if ((retval = request_irq(dev->irq, &tulip_interrupt, IRQF_SHARED, dev->name, dev))) |
493 | return retval; | 493 | return retval; |
494 | 494 | ||
495 | tulip_init_ring (dev); | 495 | tulip_init_ring (dev); |
@@ -1770,7 +1770,7 @@ static int tulip_resume(struct pci_dev *pdev) | |||
1770 | 1770 | ||
1771 | pci_enable_device(pdev); | 1771 | pci_enable_device(pdev); |
1772 | 1772 | ||
1773 | if ((retval = request_irq(dev->irq, &tulip_interrupt, SA_SHIRQ, dev->name, dev))) { | 1773 | if ((retval = request_irq(dev->irq, &tulip_interrupt, IRQF_SHARED, dev->name, dev))) { |
1774 | printk (KERN_ERR "tulip: request_irq failed in resume\n"); | 1774 | printk (KERN_ERR "tulip: request_irq failed in resume\n"); |
1775 | return retval; | 1775 | return retval; |
1776 | } | 1776 | } |
diff --git a/drivers/net/tulip/uli526x.c b/drivers/net/tulip/uli526x.c index 8b3a28f53c3d..fd64b2b3e99c 100644 --- a/drivers/net/tulip/uli526x.c +++ b/drivers/net/tulip/uli526x.c | |||
@@ -436,7 +436,7 @@ static int uli526x_open(struct net_device *dev) | |||
436 | 436 | ||
437 | ULI526X_DBUG(0, "uli526x_open", 0); | 437 | ULI526X_DBUG(0, "uli526x_open", 0); |
438 | 438 | ||
439 | ret = request_irq(dev->irq, &uli526x_interrupt, SA_SHIRQ, dev->name, dev); | 439 | ret = request_irq(dev->irq, &uli526x_interrupt, IRQF_SHARED, dev->name, dev); |
440 | if (ret) | 440 | if (ret) |
441 | return ret; | 441 | return ret; |
442 | 442 | ||
diff --git a/drivers/net/tulip/winbond-840.c b/drivers/net/tulip/winbond-840.c index 602a6e5002a0..b4c0d101a7d7 100644 --- a/drivers/net/tulip/winbond-840.c +++ b/drivers/net/tulip/winbond-840.c | |||
@@ -658,7 +658,7 @@ static int netdev_open(struct net_device *dev) | |||
658 | iowrite32(0x00000001, ioaddr + PCIBusCfg); /* Reset */ | 658 | iowrite32(0x00000001, ioaddr + PCIBusCfg); /* Reset */ |
659 | 659 | ||
660 | netif_device_detach(dev); | 660 | netif_device_detach(dev); |
661 | i = request_irq(dev->irq, &intr_handler, SA_SHIRQ, dev->name, dev); | 661 | i = request_irq(dev->irq, &intr_handler, IRQF_SHARED, dev->name, dev); |
662 | if (i) | 662 | if (i) |
663 | goto out_err; | 663 | goto out_err; |
664 | 664 | ||
diff --git a/drivers/net/tulip/xircom_cb.c b/drivers/net/tulip/xircom_cb.c index 63c2175ed138..f874e4f6ccf6 100644 --- a/drivers/net/tulip/xircom_cb.c +++ b/drivers/net/tulip/xircom_cb.c | |||
@@ -457,7 +457,7 @@ static int xircom_open(struct net_device *dev) | |||
457 | int retval; | 457 | int retval; |
458 | enter("xircom_open"); | 458 | enter("xircom_open"); |
459 | printk(KERN_INFO "xircom cardbus adaptor found, registering as %s, using irq %i \n",dev->name,dev->irq); | 459 | printk(KERN_INFO "xircom cardbus adaptor found, registering as %s, using irq %i \n",dev->name,dev->irq); |
460 | retval = request_irq(dev->irq, &xircom_interrupt, SA_SHIRQ, dev->name, dev); | 460 | retval = request_irq(dev->irq, &xircom_interrupt, IRQF_SHARED, dev->name, dev); |
461 | if (retval) { | 461 | if (retval) { |
462 | leave("xircom_open - No IRQ"); | 462 | leave("xircom_open - No IRQ"); |
463 | return retval; | 463 | return retval; |
diff --git a/drivers/net/tulip/xircom_tulip_cb.c b/drivers/net/tulip/xircom_tulip_cb.c index aecafdabbc91..091ebb7a62f6 100644 --- a/drivers/net/tulip/xircom_tulip_cb.c +++ b/drivers/net/tulip/xircom_tulip_cb.c | |||
@@ -807,7 +807,7 @@ xircom_open(struct net_device *dev) | |||
807 | { | 807 | { |
808 | struct xircom_private *tp = netdev_priv(dev); | 808 | struct xircom_private *tp = netdev_priv(dev); |
809 | 809 | ||
810 | if (request_irq(dev->irq, &xircom_interrupt, SA_SHIRQ, dev->name, dev)) | 810 | if (request_irq(dev->irq, &xircom_interrupt, IRQF_SHARED, dev->name, dev)) |
811 | return -EAGAIN; | 811 | return -EAGAIN; |
812 | 812 | ||
813 | xircom_up(dev); | 813 | xircom_up(dev); |
diff --git a/drivers/net/typhoon.c b/drivers/net/typhoon.c index e24d2dafcf6c..063816f2b11e 100644 --- a/drivers/net/typhoon.c +++ b/drivers/net/typhoon.c | |||
@@ -2131,7 +2131,7 @@ typhoon_open(struct net_device *dev) | |||
2131 | goto out_sleep; | 2131 | goto out_sleep; |
2132 | } | 2132 | } |
2133 | 2133 | ||
2134 | err = request_irq(dev->irq, &typhoon_interrupt, SA_SHIRQ, | 2134 | err = request_irq(dev->irq, &typhoon_interrupt, IRQF_SHARED, |
2135 | dev->name, dev); | 2135 | dev->name, dev); |
2136 | if(err < 0) | 2136 | if(err < 0) |
2137 | goto out_sleep; | 2137 | goto out_sleep; |
diff --git a/drivers/net/via-rhine.c b/drivers/net/via-rhine.c index c80a4f1d5f7a..98b6f3207d3d 100644 --- a/drivers/net/via-rhine.c +++ b/drivers/net/via-rhine.c | |||
@@ -1210,7 +1210,7 @@ static int rhine_open(struct net_device *dev) | |||
1210 | void __iomem *ioaddr = rp->base; | 1210 | void __iomem *ioaddr = rp->base; |
1211 | int rc; | 1211 | int rc; |
1212 | 1212 | ||
1213 | rc = request_irq(rp->pdev->irq, &rhine_interrupt, SA_SHIRQ, dev->name, | 1213 | rc = request_irq(rp->pdev->irq, &rhine_interrupt, IRQF_SHARED, dev->name, |
1214 | dev); | 1214 | dev); |
1215 | if (rc) | 1215 | if (rc) |
1216 | return rc; | 1216 | return rc; |
@@ -1999,7 +1999,7 @@ static int rhine_resume(struct pci_dev *pdev) | |||
1999 | if (!netif_running(dev)) | 1999 | if (!netif_running(dev)) |
2000 | return 0; | 2000 | return 0; |
2001 | 2001 | ||
2002 | if (request_irq(dev->irq, rhine_interrupt, SA_SHIRQ, dev->name, dev)) | 2002 | if (request_irq(dev->irq, rhine_interrupt, IRQF_SHARED, dev->name, dev)) |
2003 | printk(KERN_ERR "via-rhine %s: request_irq failed\n", dev->name); | 2003 | printk(KERN_ERR "via-rhine %s: request_irq failed\n", dev->name); |
2004 | 2004 | ||
2005 | ret = pci_set_power_state(pdev, PCI_D0); | 2005 | ret = pci_set_power_state(pdev, PCI_D0); |
diff --git a/drivers/net/via-velocity.c b/drivers/net/via-velocity.c index 857d71c3c017..ba2972ba3757 100644 --- a/drivers/net/via-velocity.c +++ b/drivers/net/via-velocity.c | |||
@@ -1750,7 +1750,7 @@ static int velocity_open(struct net_device *dev) | |||
1750 | 1750 | ||
1751 | velocity_init_registers(vptr, VELOCITY_INIT_COLD); | 1751 | velocity_init_registers(vptr, VELOCITY_INIT_COLD); |
1752 | 1752 | ||
1753 | ret = request_irq(vptr->pdev->irq, &velocity_intr, SA_SHIRQ, | 1753 | ret = request_irq(vptr->pdev->irq, &velocity_intr, IRQF_SHARED, |
1754 | dev->name, dev); | 1754 | dev->name, dev); |
1755 | if (ret < 0) { | 1755 | if (ret < 0) { |
1756 | /* Power down the chip */ | 1756 | /* Power down the chip */ |
diff --git a/drivers/net/wan/dscc4.c b/drivers/net/wan/dscc4.c index 04a376ec0ed8..684af4316ffd 100644 --- a/drivers/net/wan/dscc4.c +++ b/drivers/net/wan/dscc4.c | |||
@@ -752,7 +752,7 @@ static int __devinit dscc4_init_one(struct pci_dev *pdev, | |||
752 | 752 | ||
753 | priv = pci_get_drvdata(pdev); | 753 | priv = pci_get_drvdata(pdev); |
754 | 754 | ||
755 | rc = request_irq(pdev->irq, dscc4_irq, SA_SHIRQ, DRV_NAME, priv->root); | 755 | rc = request_irq(pdev->irq, dscc4_irq, IRQF_SHARED, DRV_NAME, priv->root); |
756 | if (rc < 0) { | 756 | if (rc < 0) { |
757 | printk(KERN_WARNING "%s: IRQ %d busy\n", DRV_NAME, pdev->irq); | 757 | printk(KERN_WARNING "%s: IRQ %d busy\n", DRV_NAME, pdev->irq); |
758 | goto err_release_4; | 758 | goto err_release_4; |
diff --git a/drivers/net/wan/farsync.c b/drivers/net/wan/farsync.c index 7981a2c7906e..3705db04a343 100644 --- a/drivers/net/wan/farsync.c +++ b/drivers/net/wan/farsync.c | |||
@@ -2519,7 +2519,7 @@ fst_add_one(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
2519 | dbg(DBG_PCI, "kernel mem %p, ctlmem %p\n", card->mem, card->ctlmem); | 2519 | dbg(DBG_PCI, "kernel mem %p, ctlmem %p\n", card->mem, card->ctlmem); |
2520 | 2520 | ||
2521 | /* Register the interrupt handler */ | 2521 | /* Register the interrupt handler */ |
2522 | if (request_irq(pdev->irq, fst_intr, SA_SHIRQ, FST_DEV_NAME, card)) { | 2522 | if (request_irq(pdev->irq, fst_intr, IRQF_SHARED, FST_DEV_NAME, card)) { |
2523 | printk_err("Unable to register interrupt %d\n", card->irq); | 2523 | printk_err("Unable to register interrupt %d\n", card->irq); |
2524 | pci_release_regions(pdev); | 2524 | pci_release_regions(pdev); |
2525 | pci_disable_device(pdev); | 2525 | pci_disable_device(pdev); |
diff --git a/drivers/net/wan/hostess_sv11.c b/drivers/net/wan/hostess_sv11.c index cf5c805452a3..a4f735723c41 100644 --- a/drivers/net/wan/hostess_sv11.c +++ b/drivers/net/wan/hostess_sv11.c | |||
@@ -264,7 +264,7 @@ static struct sv11_device *sv11_init(int iobase, int irq) | |||
264 | /* We want a fast IRQ for this device. Actually we'd like an even faster | 264 | /* We want a fast IRQ for this device. Actually we'd like an even faster |
265 | IRQ ;) - This is one driver RtLinux is made for */ | 265 | IRQ ;) - This is one driver RtLinux is made for */ |
266 | 266 | ||
267 | if(request_irq(irq, &z8530_interrupt, SA_INTERRUPT, "Hostess SV11", dev)<0) | 267 | if(request_irq(irq, &z8530_interrupt, IRQF_DISABLED, "Hostess SV11", dev)<0) |
268 | { | 268 | { |
269 | printk(KERN_WARNING "hostess: IRQ %d already in use.\n", irq); | 269 | printk(KERN_WARNING "hostess: IRQ %d already in use.\n", irq); |
270 | goto fail1; | 270 | goto fail1; |
diff --git a/drivers/net/wan/lmc/lmc_main.c b/drivers/net/wan/lmc/lmc_main.c index 40926d779161..39f44241a728 100644 --- a/drivers/net/wan/lmc/lmc_main.c +++ b/drivers/net/wan/lmc/lmc_main.c | |||
@@ -1058,7 +1058,7 @@ static int lmc_open (struct net_device *dev) /*fold00*/ | |||
1058 | lmc_softreset (sc); | 1058 | lmc_softreset (sc); |
1059 | 1059 | ||
1060 | /* Since we have to use PCI bus, this should work on x86,alpha,ppc */ | 1060 | /* Since we have to use PCI bus, this should work on x86,alpha,ppc */ |
1061 | if (request_irq (dev->irq, &lmc_interrupt, SA_SHIRQ, dev->name, dev)){ | 1061 | if (request_irq (dev->irq, &lmc_interrupt, IRQF_SHARED, dev->name, dev)){ |
1062 | printk(KERN_WARNING "%s: could not get irq: %d\n", dev->name, dev->irq); | 1062 | printk(KERN_WARNING "%s: could not get irq: %d\n", dev->name, dev->irq); |
1063 | lmc_trace(dev, "lmc_open irq failed out"); | 1063 | lmc_trace(dev, "lmc_open irq failed out"); |
1064 | return -EAGAIN; | 1064 | return -EAGAIN; |
diff --git a/drivers/net/wan/pc300_drv.c b/drivers/net/wan/pc300_drv.c index d7897ae89f90..567effff4a3e 100644 --- a/drivers/net/wan/pc300_drv.c +++ b/drivers/net/wan/pc300_drv.c | |||
@@ -3600,7 +3600,7 @@ cpc_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
3600 | } | 3600 | } |
3601 | 3601 | ||
3602 | /* Allocate IRQ */ | 3602 | /* Allocate IRQ */ |
3603 | if (request_irq(card->hw.irq, cpc_intr, SA_SHIRQ, "Cyclades-PC300", card)) { | 3603 | if (request_irq(card->hw.irq, cpc_intr, IRQF_SHARED, "Cyclades-PC300", card)) { |
3604 | printk ("PC300 found at RAM 0x%08x, but could not allocate IRQ%d.\n", | 3604 | printk ("PC300 found at RAM 0x%08x, but could not allocate IRQ%d.\n", |
3605 | card->hw.ramphys, card->hw.irq); | 3605 | card->hw.ramphys, card->hw.irq); |
3606 | goto err_io_unmap; | 3606 | goto err_io_unmap; |
diff --git a/drivers/net/wan/pci200syn.c b/drivers/net/wan/pci200syn.c index 24c3c57c13c9..4df61fa3214b 100644 --- a/drivers/net/wan/pci200syn.c +++ b/drivers/net/wan/pci200syn.c | |||
@@ -402,7 +402,7 @@ static int __devinit pci200_pci_init_one(struct pci_dev *pdev, | |||
402 | writew(readw(p) | 0x0040, p); | 402 | writew(readw(p) | 0x0040, p); |
403 | 403 | ||
404 | /* Allocate IRQ */ | 404 | /* Allocate IRQ */ |
405 | if (request_irq(pdev->irq, sca_intr, SA_SHIRQ, devname, card)) { | 405 | if (request_irq(pdev->irq, sca_intr, IRQF_SHARED, devname, card)) { |
406 | printk(KERN_WARNING "pci200syn: could not allocate IRQ%d.\n", | 406 | printk(KERN_WARNING "pci200syn: could not allocate IRQ%d.\n", |
407 | pdev->irq); | 407 | pdev->irq); |
408 | pci200_pci_remove_one(pdev); | 408 | pci200_pci_remove_one(pdev); |
diff --git a/drivers/net/wan/sbni.c b/drivers/net/wan/sbni.c index f2d071272cee..fc75bec19029 100644 --- a/drivers/net/wan/sbni.c +++ b/drivers/net/wan/sbni.c | |||
@@ -1192,7 +1192,7 @@ sbni_open( struct net_device *dev ) | |||
1192 | } | 1192 | } |
1193 | } | 1193 | } |
1194 | 1194 | ||
1195 | if( request_irq(dev->irq, sbni_interrupt, SA_SHIRQ, dev->name, dev) ) { | 1195 | if( request_irq(dev->irq, sbni_interrupt, IRQF_SHARED, dev->name, dev) ) { |
1196 | printk( KERN_ERR "%s: unable to get IRQ %d.\n", | 1196 | printk( KERN_ERR "%s: unable to get IRQ %d.\n", |
1197 | dev->name, dev->irq ); | 1197 | dev->name, dev->irq ); |
1198 | return -EAGAIN; | 1198 | return -EAGAIN; |
diff --git a/drivers/net/wan/sealevel.c b/drivers/net/wan/sealevel.c index 050e854e7774..70fb1b98b1dd 100644 --- a/drivers/net/wan/sealevel.c +++ b/drivers/net/wan/sealevel.c | |||
@@ -322,7 +322,7 @@ static __init struct slvl_board *slvl_init(int iobase, int irq, | |||
322 | /* We want a fast IRQ for this device. Actually we'd like an even faster | 322 | /* We want a fast IRQ for this device. Actually we'd like an even faster |
323 | IRQ ;) - This is one driver RtLinux is made for */ | 323 | IRQ ;) - This is one driver RtLinux is made for */ |
324 | 324 | ||
325 | if(request_irq(irq, &z8530_interrupt, SA_INTERRUPT, "SeaLevel", dev)<0) | 325 | if(request_irq(irq, &z8530_interrupt, IRQF_DISABLED, "SeaLevel", dev)<0) |
326 | { | 326 | { |
327 | printk(KERN_WARNING "sealevel: IRQ %d already in use.\n", irq); | 327 | printk(KERN_WARNING "sealevel: IRQ %d already in use.\n", irq); |
328 | goto fail1_1; | 328 | goto fail1_1; |
diff --git a/drivers/net/wan/wanxl.c b/drivers/net/wan/wanxl.c index 437e0e938e38..d564224cdca9 100644 --- a/drivers/net/wan/wanxl.c +++ b/drivers/net/wan/wanxl.c | |||
@@ -755,7 +755,7 @@ static int __devinit wanxl_pci_init_one(struct pci_dev *pdev, | |||
755 | pci_name(pdev), plx_phy, ramsize / 1024, mem_phy, pdev->irq); | 755 | pci_name(pdev), plx_phy, ramsize / 1024, mem_phy, pdev->irq); |
756 | 756 | ||
757 | /* Allocate IRQ */ | 757 | /* Allocate IRQ */ |
758 | if (request_irq(pdev->irq, wanxl_intr, SA_SHIRQ, "wanXL", card)) { | 758 | if (request_irq(pdev->irq, wanxl_intr, IRQF_SHARED, "wanXL", card)) { |
759 | printk(KERN_WARNING "wanXL %s: could not allocate IRQ%i.\n", | 759 | printk(KERN_WARNING "wanXL %s: could not allocate IRQ%i.\n", |
760 | pci_name(pdev), pdev->irq); | 760 | pci_name(pdev), pdev->irq); |
761 | wanxl_pci_remove_one(pdev); | 761 | wanxl_pci_remove_one(pdev); |
diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c index 89328d119efa..a4dd13942714 100644 --- a/drivers/net/wireless/airo.c +++ b/drivers/net/wireless/airo.c | |||
@@ -2848,7 +2848,7 @@ static struct net_device *_init_airo_card( unsigned short irq, int port, | |||
2848 | reset_card (dev, 1); | 2848 | reset_card (dev, 1); |
2849 | msleep(400); | 2849 | msleep(400); |
2850 | 2850 | ||
2851 | rc = request_irq( dev->irq, airo_interrupt, SA_SHIRQ, dev->name, dev ); | 2851 | rc = request_irq( dev->irq, airo_interrupt, IRQF_SHARED, dev->name, dev ); |
2852 | if (rc) { | 2852 | if (rc) { |
2853 | airo_print_err(dev->name, "register interrupt %d failed, rc %d", | 2853 | airo_print_err(dev->name, "register interrupt %d failed, rc %d", |
2854 | irq, rc); | 2854 | irq, rc); |
diff --git a/drivers/net/wireless/atmel.c b/drivers/net/wireless/atmel.c index 54e31fa2d402..995c7bea5897 100644 --- a/drivers/net/wireless/atmel.c +++ b/drivers/net/wireless/atmel.c | |||
@@ -1577,7 +1577,7 @@ struct net_device *init_atmel_card(unsigned short irq, unsigned long port, | |||
1577 | 1577 | ||
1578 | SET_NETDEV_DEV(dev, sys_dev); | 1578 | SET_NETDEV_DEV(dev, sys_dev); |
1579 | 1579 | ||
1580 | if ((rc = request_irq(dev->irq, service_interrupt, SA_SHIRQ, dev->name, dev))) { | 1580 | if ((rc = request_irq(dev->irq, service_interrupt, IRQF_SHARED, dev->name, dev))) { |
1581 | printk(KERN_ERR "%s: register interrupt %d failed, rc %d\n", dev->name, irq, rc); | 1581 | printk(KERN_ERR "%s: register interrupt %d failed, rc %d\n", dev->name, irq, rc); |
1582 | goto err_out_free; | 1582 | goto err_out_free; |
1583 | } | 1583 | } |
diff --git a/drivers/net/wireless/bcm43xx/bcm43xx_main.c b/drivers/net/wireless/bcm43xx/bcm43xx_main.c index 27bcf47228e2..d8f5600578b4 100644 --- a/drivers/net/wireless/bcm43xx/bcm43xx_main.c +++ b/drivers/net/wireless/bcm43xx/bcm43xx_main.c | |||
@@ -2175,7 +2175,7 @@ static int bcm43xx_initialize_irq(struct bcm43xx_private *bcm) | |||
2175 | } | 2175 | } |
2176 | #endif | 2176 | #endif |
2177 | res = request_irq(bcm->irq, bcm43xx_interrupt_handler, | 2177 | res = request_irq(bcm->irq, bcm43xx_interrupt_handler, |
2178 | SA_SHIRQ, KBUILD_MODNAME, bcm); | 2178 | IRQF_SHARED, KBUILD_MODNAME, bcm); |
2179 | if (res) { | 2179 | if (res) { |
2180 | printk(KERN_ERR PFX "Cannot register IRQ%d\n", bcm->irq); | 2180 | printk(KERN_ERR PFX "Cannot register IRQ%d\n", bcm->irq); |
2181 | return -ENODEV; | 2181 | return -ENODEV; |
diff --git a/drivers/net/wireless/hostap/hostap_pci.c b/drivers/net/wireless/hostap/hostap_pci.c index 5ea8ac835857..c2fa011be291 100644 --- a/drivers/net/wireless/hostap/hostap_pci.c +++ b/drivers/net/wireless/hostap/hostap_pci.c | |||
@@ -337,7 +337,7 @@ static int prism2_pci_probe(struct pci_dev *pdev, | |||
337 | 337 | ||
338 | pci_set_drvdata(pdev, dev); | 338 | pci_set_drvdata(pdev, dev); |
339 | 339 | ||
340 | if (request_irq(dev->irq, prism2_interrupt, SA_SHIRQ, dev->name, | 340 | if (request_irq(dev->irq, prism2_interrupt, IRQF_SHARED, dev->name, |
341 | dev)) { | 341 | dev)) { |
342 | printk(KERN_WARNING "%s: request_irq failed\n", dev->name); | 342 | printk(KERN_WARNING "%s: request_irq failed\n", dev->name); |
343 | goto fail; | 343 | goto fail; |
diff --git a/drivers/net/wireless/hostap/hostap_plx.c b/drivers/net/wireless/hostap/hostap_plx.c index 4ee6abbc65ec..49860fa61c30 100644 --- a/drivers/net/wireless/hostap/hostap_plx.c +++ b/drivers/net/wireless/hostap/hostap_plx.c | |||
@@ -550,7 +550,7 @@ static int prism2_plx_probe(struct pci_dev *pdev, | |||
550 | 550 | ||
551 | pci_set_drvdata(pdev, dev); | 551 | pci_set_drvdata(pdev, dev); |
552 | 552 | ||
553 | if (request_irq(dev->irq, prism2_interrupt, SA_SHIRQ, dev->name, | 553 | if (request_irq(dev->irq, prism2_interrupt, IRQF_SHARED, dev->name, |
554 | dev)) { | 554 | dev)) { |
555 | printk(KERN_WARNING "%s: request_irq failed\n", dev->name); | 555 | printk(KERN_WARNING "%s: request_irq failed\n", dev->name); |
556 | goto fail; | 556 | goto fail; |
diff --git a/drivers/net/wireless/ipw2100.c b/drivers/net/wireless/ipw2100.c index 27f744e43095..e955db435b30 100644 --- a/drivers/net/wireless/ipw2100.c +++ b/drivers/net/wireless/ipw2100.c | |||
@@ -6229,7 +6229,7 @@ static int ipw2100_pci_init_one(struct pci_dev *pci_dev, | |||
6229 | ipw2100_queues_initialize(priv); | 6229 | ipw2100_queues_initialize(priv); |
6230 | 6230 | ||
6231 | err = request_irq(pci_dev->irq, | 6231 | err = request_irq(pci_dev->irq, |
6232 | ipw2100_interrupt, SA_SHIRQ, dev->name, priv); | 6232 | ipw2100_interrupt, IRQF_SHARED, dev->name, priv); |
6233 | if (err) { | 6233 | if (err) { |
6234 | printk(KERN_WARNING DRV_NAME | 6234 | printk(KERN_WARNING DRV_NAME |
6235 | "Error calling request_irq: %d.\n", pci_dev->irq); | 6235 | "Error calling request_irq: %d.\n", pci_dev->irq); |
diff --git a/drivers/net/wireless/ipw2200.c b/drivers/net/wireless/ipw2200.c index a8a8f975432f..b3300ffe4eec 100644 --- a/drivers/net/wireless/ipw2200.c +++ b/drivers/net/wireless/ipw2200.c | |||
@@ -11545,7 +11545,7 @@ static int ipw_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
11545 | 11545 | ||
11546 | ipw_sw_reset(priv, 1); | 11546 | ipw_sw_reset(priv, 1); |
11547 | 11547 | ||
11548 | err = request_irq(pdev->irq, ipw_isr, SA_SHIRQ, DRV_NAME, priv); | 11548 | err = request_irq(pdev->irq, ipw_isr, IRQF_SHARED, DRV_NAME, priv); |
11549 | if (err) { | 11549 | if (err) { |
11550 | IPW_ERROR("Error allocating IRQ %d\n", pdev->irq); | 11550 | IPW_ERROR("Error allocating IRQ %d\n", pdev->irq); |
11551 | goto out_destroy_workqueue; | 11551 | goto out_destroy_workqueue; |
diff --git a/drivers/net/wireless/orinoco_nortel.c b/drivers/net/wireless/orinoco_nortel.c index 4597fe1d1979..bf05b907747e 100644 --- a/drivers/net/wireless/orinoco_nortel.c +++ b/drivers/net/wireless/orinoco_nortel.c | |||
@@ -198,7 +198,7 @@ static int orinoco_nortel_init_one(struct pci_dev *pdev, | |||
198 | 198 | ||
199 | hermes_struct_init(&priv->hw, hermes_io, HERMES_16BIT_REGSPACING); | 199 | hermes_struct_init(&priv->hw, hermes_io, HERMES_16BIT_REGSPACING); |
200 | 200 | ||
201 | err = request_irq(pdev->irq, orinoco_interrupt, SA_SHIRQ, | 201 | err = request_irq(pdev->irq, orinoco_interrupt, IRQF_SHARED, |
202 | dev->name, dev); | 202 | dev->name, dev); |
203 | if (err) { | 203 | if (err) { |
204 | printk(KERN_ERR PFX "Cannot allocate IRQ %d\n", pdev->irq); | 204 | printk(KERN_ERR PFX "Cannot allocate IRQ %d\n", pdev->irq); |
diff --git a/drivers/net/wireless/orinoco_pci.c b/drivers/net/wireless/orinoco_pci.c index de3eae082a0d..1759c543fbee 100644 --- a/drivers/net/wireless/orinoco_pci.c +++ b/drivers/net/wireless/orinoco_pci.c | |||
@@ -153,7 +153,7 @@ static int orinoco_pci_init_one(struct pci_dev *pdev, | |||
153 | 153 | ||
154 | hermes_struct_init(&priv->hw, hermes_io, HERMES_32BIT_REGSPACING); | 154 | hermes_struct_init(&priv->hw, hermes_io, HERMES_32BIT_REGSPACING); |
155 | 155 | ||
156 | err = request_irq(pdev->irq, orinoco_interrupt, SA_SHIRQ, | 156 | err = request_irq(pdev->irq, orinoco_interrupt, IRQF_SHARED, |
157 | dev->name, dev); | 157 | dev->name, dev); |
158 | if (err) { | 158 | if (err) { |
159 | printk(KERN_ERR PFX "Cannot allocate IRQ %d\n", pdev->irq); | 159 | printk(KERN_ERR PFX "Cannot allocate IRQ %d\n", pdev->irq); |
diff --git a/drivers/net/wireless/orinoco_pci.h b/drivers/net/wireless/orinoco_pci.h index 7eb1e08113e0..be1abea4b64f 100644 --- a/drivers/net/wireless/orinoco_pci.h +++ b/drivers/net/wireless/orinoco_pci.h | |||
@@ -63,7 +63,7 @@ static int orinoco_pci_resume(struct pci_dev *pdev) | |||
63 | pci_enable_device(pdev); | 63 | pci_enable_device(pdev); |
64 | pci_restore_state(pdev); | 64 | pci_restore_state(pdev); |
65 | 65 | ||
66 | err = request_irq(pdev->irq, orinoco_interrupt, SA_SHIRQ, | 66 | err = request_irq(pdev->irq, orinoco_interrupt, IRQF_SHARED, |
67 | dev->name, dev); | 67 | dev->name, dev); |
68 | if (err) { | 68 | if (err) { |
69 | printk(KERN_ERR "%s: cannot re-allocate IRQ on resume\n", | 69 | printk(KERN_ERR "%s: cannot re-allocate IRQ on resume\n", |
diff --git a/drivers/net/wireless/orinoco_plx.c b/drivers/net/wireless/orinoco_plx.c index 3f928b8939f0..7f006f624171 100644 --- a/drivers/net/wireless/orinoco_plx.c +++ b/drivers/net/wireless/orinoco_plx.c | |||
@@ -237,7 +237,7 @@ static int orinoco_plx_init_one(struct pci_dev *pdev, | |||
237 | 237 | ||
238 | hermes_struct_init(&priv->hw, hermes_io, HERMES_16BIT_REGSPACING); | 238 | hermes_struct_init(&priv->hw, hermes_io, HERMES_16BIT_REGSPACING); |
239 | 239 | ||
240 | err = request_irq(pdev->irq, orinoco_interrupt, SA_SHIRQ, | 240 | err = request_irq(pdev->irq, orinoco_interrupt, IRQF_SHARED, |
241 | dev->name, dev); | 241 | dev->name, dev); |
242 | if (err) { | 242 | if (err) { |
243 | printk(KERN_ERR PFX "Cannot allocate IRQ %d\n", pdev->irq); | 243 | printk(KERN_ERR PFX "Cannot allocate IRQ %d\n", pdev->irq); |
diff --git a/drivers/net/wireless/orinoco_tmd.c b/drivers/net/wireless/orinoco_tmd.c index 160a642185f0..0831721e4d6c 100644 --- a/drivers/net/wireless/orinoco_tmd.c +++ b/drivers/net/wireless/orinoco_tmd.c | |||
@@ -139,7 +139,7 @@ static int orinoco_tmd_init_one(struct pci_dev *pdev, | |||
139 | 139 | ||
140 | hermes_struct_init(&priv->hw, hermes_io, HERMES_16BIT_REGSPACING); | 140 | hermes_struct_init(&priv->hw, hermes_io, HERMES_16BIT_REGSPACING); |
141 | 141 | ||
142 | err = request_irq(pdev->irq, orinoco_interrupt, SA_SHIRQ, | 142 | err = request_irq(pdev->irq, orinoco_interrupt, IRQF_SHARED, |
143 | dev->name, dev); | 143 | dev->name, dev); |
144 | if (err) { | 144 | if (err) { |
145 | printk(KERN_ERR PFX "Cannot allocate IRQ %d\n", pdev->irq); | 145 | printk(KERN_ERR PFX "Cannot allocate IRQ %d\n", pdev->irq); |
diff --git a/drivers/net/wireless/prism54/islpci_hotplug.c b/drivers/net/wireless/prism54/islpci_hotplug.c index bfa0cc319a09..09fc17a0f029 100644 --- a/drivers/net/wireless/prism54/islpci_hotplug.c +++ b/drivers/net/wireless/prism54/islpci_hotplug.c | |||
@@ -189,7 +189,7 @@ prism54_probe(struct pci_dev *pdev, const struct pci_device_id *id) | |||
189 | 189 | ||
190 | /* request for the interrupt before uploading the firmware */ | 190 | /* request for the interrupt before uploading the firmware */ |
191 | rvalue = request_irq(pdev->irq, &islpci_interrupt, | 191 | rvalue = request_irq(pdev->irq, &islpci_interrupt, |
192 | SA_SHIRQ, ndev->name, priv); | 192 | IRQF_SHARED, ndev->name, priv); |
193 | 193 | ||
194 | if (rvalue) { | 194 | if (rvalue) { |
195 | /* error, could not hook the handler to the irq */ | 195 | /* error, could not hook the handler to the irq */ |
diff --git a/drivers/net/yellowfin.c b/drivers/net/yellowfin.c index 569305f57561..bbbf7e274a2a 100644 --- a/drivers/net/yellowfin.c +++ b/drivers/net/yellowfin.c | |||
@@ -602,7 +602,7 @@ static int yellowfin_open(struct net_device *dev) | |||
602 | /* Reset the chip. */ | 602 | /* Reset the chip. */ |
603 | iowrite32(0x80000000, ioaddr + DMACtrl); | 603 | iowrite32(0x80000000, ioaddr + DMACtrl); |
604 | 604 | ||
605 | i = request_irq(dev->irq, &yellowfin_interrupt, SA_SHIRQ, dev->name, dev); | 605 | i = request_irq(dev->irq, &yellowfin_interrupt, IRQF_SHARED, dev->name, dev); |
606 | if (i) return i; | 606 | if (i) return i; |
607 | 607 | ||
608 | if (yellowfin_debug > 1) | 608 | if (yellowfin_debug > 1) |
diff --git a/drivers/net/zorro8390.c b/drivers/net/zorro8390.c index 8037e5806d0a..df04e050c647 100644 --- a/drivers/net/zorro8390.c +++ b/drivers/net/zorro8390.c | |||
@@ -201,7 +201,7 @@ static int __devinit zorro8390_init(struct net_device *dev, | |||
201 | dev->irq = IRQ_AMIGA_PORTS; | 201 | dev->irq = IRQ_AMIGA_PORTS; |
202 | 202 | ||
203 | /* Install the Interrupt handler */ | 203 | /* Install the Interrupt handler */ |
204 | i = request_irq(IRQ_AMIGA_PORTS, ei_interrupt, SA_SHIRQ, DRV_NAME, dev); | 204 | i = request_irq(IRQ_AMIGA_PORTS, ei_interrupt, IRQF_SHARED, DRV_NAME, dev); |
205 | if (i) return i; | 205 | if (i) return i; |
206 | 206 | ||
207 | for(i = 0; i < ETHER_ADDR_LEN; i++) { | 207 | for(i = 0; i < ETHER_ADDR_LEN; i++) { |
diff --git a/drivers/parisc/eisa.c b/drivers/parisc/eisa.c index 58f0ce8d78e0..884965cedec9 100644 --- a/drivers/parisc/eisa.c +++ b/drivers/parisc/eisa.c | |||
@@ -340,7 +340,7 @@ static int __devinit eisa_probe(struct parisc_device *dev) | |||
340 | } | 340 | } |
341 | pcibios_register_hba(&eisa_dev.hba); | 341 | pcibios_register_hba(&eisa_dev.hba); |
342 | 342 | ||
343 | result = request_irq(dev->irq, eisa_irq, SA_SHIRQ, "EISA", &eisa_dev); | 343 | result = request_irq(dev->irq, eisa_irq, IRQF_SHARED, "EISA", &eisa_dev); |
344 | if (result) { | 344 | if (result) { |
345 | printk(KERN_ERR "EISA: request_irq failed!\n"); | 345 | printk(KERN_ERR "EISA: request_irq failed!\n"); |
346 | return result; | 346 | return result; |
diff --git a/drivers/parisc/superio.c b/drivers/parisc/superio.c index a988dc7a9abd..4ee26a6d9e25 100644 --- a/drivers/parisc/superio.c +++ b/drivers/parisc/superio.c | |||
@@ -271,7 +271,7 @@ superio_init(struct pci_dev *pcidev) | |||
271 | else | 271 | else |
272 | printk(KERN_ERR PFX "USB regulator not initialized!\n"); | 272 | printk(KERN_ERR PFX "USB regulator not initialized!\n"); |
273 | 273 | ||
274 | if (request_irq(pdev->irq, superio_interrupt, SA_INTERRUPT, | 274 | if (request_irq(pdev->irq, superio_interrupt, IRQF_DISABLED, |
275 | SUPERIO, (void *)sio)) { | 275 | SUPERIO, (void *)sio)) { |
276 | 276 | ||
277 | printk(KERN_ERR PFX "could not get irq\n"); | 277 | printk(KERN_ERR PFX "could not get irq\n"); |
diff --git a/drivers/parport/parport_ax88796.c b/drivers/parport/parport_ax88796.c index 4baa719439a2..1850632590fd 100644 --- a/drivers/parport/parport_ax88796.c +++ b/drivers/parport/parport_ax88796.c | |||
@@ -345,7 +345,7 @@ static int parport_ax88796_probe(struct platform_device *pdev) | |||
345 | if (irq >= 0) { | 345 | if (irq >= 0) { |
346 | /* request irq */ | 346 | /* request irq */ |
347 | ret = request_irq(irq, parport_ax88796_interrupt, | 347 | ret = request_irq(irq, parport_ax88796_interrupt, |
348 | SA_TRIGGER_FALLING, pdev->name, pp); | 348 | IRQF_TRIGGER_FALLING, pdev->name, pp); |
349 | 349 | ||
350 | if (ret < 0) | 350 | if (ret < 0) |
351 | goto exit_port; | 351 | goto exit_port; |
diff --git a/drivers/parport/parport_mfc3.c b/drivers/parport/parport_mfc3.c index c85364765ef8..b2b8092a2b39 100644 --- a/drivers/parport/parport_mfc3.c +++ b/drivers/parport/parport_mfc3.c | |||
@@ -353,7 +353,7 @@ static int __init parport_mfc3_init(void) | |||
353 | 353 | ||
354 | if (p->irq != PARPORT_IRQ_NONE) { | 354 | if (p->irq != PARPORT_IRQ_NONE) { |
355 | if (use_cnt++ == 0) | 355 | if (use_cnt++ == 0) |
356 | if (request_irq(IRQ_AMIGA_PORTS, mfc3_interrupt, SA_SHIRQ, p->name, &pp_mfc3_ops)) | 356 | if (request_irq(IRQ_AMIGA_PORTS, mfc3_interrupt, IRQF_SHARED, p->name, &pp_mfc3_ops)) |
357 | goto out_irq; | 357 | goto out_irq; |
358 | } | 358 | } |
359 | 359 | ||
diff --git a/drivers/parport/parport_sunbpp.c b/drivers/parport/parport_sunbpp.c index 7c43c5392bed..fac333b279bf 100644 --- a/drivers/parport/parport_sunbpp.c +++ b/drivers/parport/parport_sunbpp.c | |||
@@ -322,7 +322,7 @@ static int __devinit init_one_port(struct sbus_dev *sdev) | |||
322 | p->size = size; | 322 | p->size = size; |
323 | 323 | ||
324 | if ((err = request_irq(p->irq, parport_sunbpp_interrupt, | 324 | if ((err = request_irq(p->irq, parport_sunbpp_interrupt, |
325 | SA_SHIRQ, p->name, p)) != 0) { | 325 | IRQF_SHARED, p->name, p)) != 0) { |
326 | goto out_put_port; | 326 | goto out_put_port; |
327 | } | 327 | } |
328 | 328 | ||
diff --git a/drivers/pci/hotplug/cpci_hotplug_core.c b/drivers/pci/hotplug/cpci_hotplug_core.c index 30d87143b5d9..d5df5871cfa2 100644 --- a/drivers/pci/hotplug/cpci_hotplug_core.c +++ b/drivers/pci/hotplug/cpci_hotplug_core.c | |||
@@ -347,7 +347,7 @@ cpci_hp_intr(int irq, void *data, struct pt_regs *regs) | |||
347 | dbg("entered cpci_hp_intr"); | 347 | dbg("entered cpci_hp_intr"); |
348 | 348 | ||
349 | /* Check to see if it was our interrupt */ | 349 | /* Check to see if it was our interrupt */ |
350 | if ((controller->irq_flags & SA_SHIRQ) && | 350 | if ((controller->irq_flags & IRQF_SHARED) && |
351 | !controller->ops->check_irq(controller->dev_id)) { | 351 | !controller->ops->check_irq(controller->dev_id)) { |
352 | dbg("exited cpci_hp_intr, not our interrupt"); | 352 | dbg("exited cpci_hp_intr, not our interrupt"); |
353 | return IRQ_NONE; | 353 | return IRQ_NONE; |
diff --git a/drivers/pci/hotplug/cpcihp_zt5550.c b/drivers/pci/hotplug/cpcihp_zt5550.c index 584f8538da13..1c12e9171097 100644 --- a/drivers/pci/hotplug/cpcihp_zt5550.c +++ b/drivers/pci/hotplug/cpcihp_zt5550.c | |||
@@ -35,7 +35,8 @@ | |||
35 | #include <linux/init.h> | 35 | #include <linux/init.h> |
36 | #include <linux/errno.h> | 36 | #include <linux/errno.h> |
37 | #include <linux/pci.h> | 37 | #include <linux/pci.h> |
38 | #include <linux/signal.h> /* SA_SHIRQ */ | 38 | #include <linux/interrupt.h> |
39 | #include <linux/signal.h> /* IRQF_SHARED */ | ||
39 | #include "cpci_hotplug.h" | 40 | #include "cpci_hotplug.h" |
40 | #include "cpcihp_zt5550.h" | 41 | #include "cpcihp_zt5550.h" |
41 | 42 | ||
@@ -219,7 +220,7 @@ static int zt5550_hc_init_one (struct pci_dev *pdev, const struct pci_device_id | |||
219 | zt5550_hpc.ops = &zt5550_hpc_ops; | 220 | zt5550_hpc.ops = &zt5550_hpc_ops; |
220 | if(!poll) { | 221 | if(!poll) { |
221 | zt5550_hpc.irq = hc_dev->irq; | 222 | zt5550_hpc.irq = hc_dev->irq; |
222 | zt5550_hpc.irq_flags = SA_SHIRQ; | 223 | zt5550_hpc.irq_flags = IRQF_SHARED; |
223 | zt5550_hpc.dev_id = hc_dev; | 224 | zt5550_hpc.dev_id = hc_dev; |
224 | 225 | ||
225 | zt5550_hpc_ops.enable_irq = zt5550_hc_enable_irq; | 226 | zt5550_hpc_ops.enable_irq = zt5550_hc_enable_irq; |
diff --git a/drivers/pci/hotplug/cpqphp_core.c b/drivers/pci/hotplug/cpqphp_core.c index e6e171f77c34..1fc259913b68 100644 --- a/drivers/pci/hotplug/cpqphp_core.c +++ b/drivers/pci/hotplug/cpqphp_core.c | |||
@@ -1188,7 +1188,7 @@ static int cpqhpc_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
1188 | /* set up the interrupt */ | 1188 | /* set up the interrupt */ |
1189 | dbg("HPC interrupt = %d \n", ctrl->interrupt); | 1189 | dbg("HPC interrupt = %d \n", ctrl->interrupt); |
1190 | if (request_irq(ctrl->interrupt, cpqhp_ctrl_intr, | 1190 | if (request_irq(ctrl->interrupt, cpqhp_ctrl_intr, |
1191 | SA_SHIRQ, MY_NAME, ctrl)) { | 1191 | IRQF_SHARED, MY_NAME, ctrl)) { |
1192 | err("Can't get irq %d for the hotplug pci controller\n", | 1192 | err("Can't get irq %d for the hotplug pci controller\n", |
1193 | ctrl->interrupt); | 1193 | ctrl->interrupt); |
1194 | rc = -ENODEV; | 1194 | rc = -ENODEV; |
diff --git a/drivers/pci/hotplug/pciehp_hpc.c b/drivers/pci/hotplug/pciehp_hpc.c index 11f7858f0064..0d8fb6e607a1 100644 --- a/drivers/pci/hotplug/pciehp_hpc.c +++ b/drivers/pci/hotplug/pciehp_hpc.c | |||
@@ -1458,7 +1458,7 @@ int pcie_init(struct controller * ctrl, struct pcie_device *dev) | |||
1458 | start_int_poll_timer( php_ctlr, 10 ); /* start with 10 second delay */ | 1458 | start_int_poll_timer( php_ctlr, 10 ); /* start with 10 second delay */ |
1459 | } else { | 1459 | } else { |
1460 | /* Installs the interrupt handler */ | 1460 | /* Installs the interrupt handler */ |
1461 | rc = request_irq(php_ctlr->irq, pcie_isr, SA_SHIRQ, MY_NAME, (void *) ctrl); | 1461 | rc = request_irq(php_ctlr->irq, pcie_isr, IRQF_SHARED, MY_NAME, (void *) ctrl); |
1462 | dbg("%s: request_irq %d for hpc%d (returns %d)\n", __FUNCTION__, php_ctlr->irq, ctlr_seq_num, rc); | 1462 | dbg("%s: request_irq %d for hpc%d (returns %d)\n", __FUNCTION__, php_ctlr->irq, ctlr_seq_num, rc); |
1463 | if (rc) { | 1463 | if (rc) { |
1464 | err("Can't get irq %d for the hotplug controller\n", php_ctlr->irq); | 1464 | err("Can't get irq %d for the hotplug controller\n", php_ctlr->irq); |
diff --git a/drivers/pci/hotplug/shpchp_hpc.c b/drivers/pci/hotplug/shpchp_hpc.c index 45facaad39bd..0f9798df4704 100644 --- a/drivers/pci/hotplug/shpchp_hpc.c +++ b/drivers/pci/hotplug/shpchp_hpc.c | |||
@@ -1246,7 +1246,7 @@ int shpc_init(struct controller * ctrl, struct pci_dev * pdev) | |||
1246 | } else | 1246 | } else |
1247 | php_ctlr->irq = pdev->irq; | 1247 | php_ctlr->irq = pdev->irq; |
1248 | 1248 | ||
1249 | rc = request_irq(php_ctlr->irq, shpc_isr, SA_SHIRQ, MY_NAME, (void *) ctrl); | 1249 | rc = request_irq(php_ctlr->irq, shpc_isr, IRQF_SHARED, MY_NAME, (void *) ctrl); |
1250 | dbg("%s: request_irq %d for hpc%d (returns %d)\n", __FUNCTION__, php_ctlr->irq, ctlr_seq_num, rc); | 1250 | dbg("%s: request_irq %d for hpc%d (returns %d)\n", __FUNCTION__, php_ctlr->irq, ctlr_seq_num, rc); |
1251 | if (rc) { | 1251 | if (rc) { |
1252 | err("Can't get irq %d for the hotplug controller\n", php_ctlr->irq); | 1252 | err("Can't get irq %d for the hotplug controller\n", php_ctlr->irq); |
diff --git a/drivers/pcmcia/at91_cf.c b/drivers/pcmcia/at91_cf.c index 5256342e8532..40569f40e90e 100644 --- a/drivers/pcmcia/at91_cf.c +++ b/drivers/pcmcia/at91_cf.c | |||
@@ -267,7 +267,7 @@ static int __init at91_cf_probe(struct platform_device *pdev) | |||
267 | 267 | ||
268 | /* must be a GPIO; ergo must trigger on both edges */ | 268 | /* must be a GPIO; ergo must trigger on both edges */ |
269 | status = request_irq(board->det_pin, at91_cf_irq, | 269 | status = request_irq(board->det_pin, at91_cf_irq, |
270 | SA_SAMPLE_RANDOM, driver_name, cf); | 270 | IRQF_SAMPLE_RANDOM, driver_name, cf); |
271 | if (status < 0) | 271 | if (status < 0) |
272 | goto fail0; | 272 | goto fail0; |
273 | device_init_wakeup(&pdev->dev, 1); | 273 | device_init_wakeup(&pdev->dev, 1); |
@@ -280,7 +280,7 @@ static int __init at91_cf_probe(struct platform_device *pdev) | |||
280 | */ | 280 | */ |
281 | if (board->irq_pin) { | 281 | if (board->irq_pin) { |
282 | status = request_irq(board->irq_pin, at91_cf_irq, | 282 | status = request_irq(board->irq_pin, at91_cf_irq, |
283 | SA_SHIRQ, driver_name, cf); | 283 | IRQF_SHARED, driver_name, cf); |
284 | if (status < 0) | 284 | if (status < 0) |
285 | goto fail0a; | 285 | goto fail0a; |
286 | cf->socket.pci_irq = board->irq_pin; | 286 | cf->socket.pci_irq = board->irq_pin; |
diff --git a/drivers/pcmcia/hd64465_ss.c b/drivers/pcmcia/hd64465_ss.c index c662e4f89d46..ad02629c8be2 100644 --- a/drivers/pcmcia/hd64465_ss.c +++ b/drivers/pcmcia/hd64465_ss.c | |||
@@ -761,7 +761,7 @@ static int hs_init_socket(hs_socket_t *sp, int irq, unsigned long mem_base, | |||
761 | 761 | ||
762 | hd64465_register_irq_demux(sp->irq, hs_irq_demux, sp); | 762 | hd64465_register_irq_demux(sp->irq, hs_irq_demux, sp); |
763 | 763 | ||
764 | if ((err = request_irq(sp->irq, hs_interrupt, SA_INTERRUPT, MODNAME, sp)) < 0) | 764 | if ((err = request_irq(sp->irq, hs_interrupt, IRQF_DISABLED, MODNAME, sp)) < 0) |
765 | return err; | 765 | return err; |
766 | if (request_mem_region(sp->mem_base, sp->mem_length, MODNAME) == 0) { | 766 | if (request_mem_region(sp->mem_base, sp->mem_length, MODNAME) == 0) { |
767 | sp->mem_base = 0; | 767 | sp->mem_base = 0; |
diff --git a/drivers/pcmcia/i82092.c b/drivers/pcmcia/i82092.c index d5f03a338c6c..2163aa75a257 100644 --- a/drivers/pcmcia/i82092.c +++ b/drivers/pcmcia/i82092.c | |||
@@ -149,7 +149,7 @@ static int __devinit i82092aa_pci_probe(struct pci_dev *dev, const struct pci_de | |||
149 | 149 | ||
150 | /* Register the interrupt handler */ | 150 | /* Register the interrupt handler */ |
151 | dprintk(KERN_DEBUG "Requesting interrupt %i \n",dev->irq); | 151 | dprintk(KERN_DEBUG "Requesting interrupt %i \n",dev->irq); |
152 | if ((ret = request_irq(dev->irq, i82092aa_interrupt, SA_SHIRQ, "i82092aa", i82092aa_interrupt))) { | 152 | if ((ret = request_irq(dev->irq, i82092aa_interrupt, IRQF_SHARED, "i82092aa", i82092aa_interrupt))) { |
153 | printk(KERN_ERR "i82092aa: Failed to register IRQ %d, aborting\n", dev->irq); | 153 | printk(KERN_ERR "i82092aa: Failed to register IRQ %d, aborting\n", dev->irq); |
154 | goto err_out_free_res; | 154 | goto err_out_free_res; |
155 | } | 155 | } |
diff --git a/drivers/pcmcia/i82365.c b/drivers/pcmcia/i82365.c index ff51a65d9433..1cc2682394b1 100644 --- a/drivers/pcmcia/i82365.c +++ b/drivers/pcmcia/i82365.c | |||
@@ -509,7 +509,7 @@ static irqreturn_t i365_count_irq(int irq, void *dev, struct pt_regs *regs) | |||
509 | static u_int __init test_irq(u_short sock, int irq) | 509 | static u_int __init test_irq(u_short sock, int irq) |
510 | { | 510 | { |
511 | debug(2, " testing ISA irq %d\n", irq); | 511 | debug(2, " testing ISA irq %d\n", irq); |
512 | if (request_irq(irq, i365_count_irq, SA_PROBEIRQ, "scan", | 512 | if (request_irq(irq, i365_count_irq, IRQF_PROBE_SHARED, "scan", |
513 | i365_count_irq) != 0) | 513 | i365_count_irq) != 0) |
514 | return 1; | 514 | return 1; |
515 | irq_hits = 0; irq_sock = sock; | 515 | irq_hits = 0; irq_sock = sock; |
@@ -562,7 +562,7 @@ static u_int __init isa_scan(u_short sock, u_int mask0) | |||
562 | } else { | 562 | } else { |
563 | /* Fallback: just find interrupts that aren't in use */ | 563 | /* Fallback: just find interrupts that aren't in use */ |
564 | for (i = 0; i < 16; i++) | 564 | for (i = 0; i < 16; i++) |
565 | if ((mask0 & (1 << i)) && (_check_irq(i, SA_PROBEIRQ) == 0)) | 565 | if ((mask0 & (1 << i)) && (_check_irq(i, IRQF_PROBE_SHARED) == 0)) |
566 | mask1 |= (1 << i); | 566 | mask1 |= (1 << i); |
567 | printk("default"); | 567 | printk("default"); |
568 | /* If scan failed, default to polled status */ | 568 | /* If scan failed, default to polled status */ |
@@ -726,7 +726,7 @@ static void __init add_pcic(int ns, int type) | |||
726 | u_int cs_mask = mask & ((cs_irq) ? (1<<cs_irq) : ~(1<<12)); | 726 | u_int cs_mask = mask & ((cs_irq) ? (1<<cs_irq) : ~(1<<12)); |
727 | for (cs_irq = 15; cs_irq > 0; cs_irq--) | 727 | for (cs_irq = 15; cs_irq > 0; cs_irq--) |
728 | if ((cs_mask & (1 << cs_irq)) && | 728 | if ((cs_mask & (1 << cs_irq)) && |
729 | (_check_irq(cs_irq, SA_PROBEIRQ) == 0)) | 729 | (_check_irq(cs_irq, IRQF_PROBE_SHARED) == 0)) |
730 | break; | 730 | break; |
731 | if (cs_irq) { | 731 | if (cs_irq) { |
732 | grab_irq = 1; | 732 | grab_irq = 1; |
diff --git a/drivers/pcmcia/omap_cf.c b/drivers/pcmcia/omap_cf.c index 2c23d7584399..420e10aec0ae 100644 --- a/drivers/pcmcia/omap_cf.c +++ b/drivers/pcmcia/omap_cf.c | |||
@@ -232,7 +232,7 @@ static int __init omap_cf_probe(struct device *dev) | |||
232 | dev_set_drvdata(dev, cf); | 232 | dev_set_drvdata(dev, cf); |
233 | 233 | ||
234 | /* this primarily just shuts up irq handling noise */ | 234 | /* this primarily just shuts up irq handling noise */ |
235 | status = request_irq(irq, omap_cf_irq, SA_SHIRQ, | 235 | status = request_irq(irq, omap_cf_irq, IRQF_SHARED, |
236 | driver_name, cf); | 236 | driver_name, cf); |
237 | if (status < 0) | 237 | if (status < 0) |
238 | goto fail0; | 238 | goto fail0; |
diff --git a/drivers/pcmcia/pcmcia_resource.c b/drivers/pcmcia/pcmcia_resource.c index 3281e519e714..7bf25b88ea31 100644 --- a/drivers/pcmcia/pcmcia_resource.c +++ b/drivers/pcmcia/pcmcia_resource.c | |||
@@ -801,9 +801,9 @@ int pcmcia_request_irq(struct pcmcia_device *p_dev, irq_req_t *req) | |||
801 | /* Decide what type of interrupt we are registering */ | 801 | /* Decide what type of interrupt we are registering */ |
802 | type = 0; | 802 | type = 0; |
803 | if (s->functions > 1) /* All of this ought to be handled higher up */ | 803 | if (s->functions > 1) /* All of this ought to be handled higher up */ |
804 | type = SA_SHIRQ; | 804 | type = IRQF_SHARED; |
805 | if (req->Attributes & IRQ_TYPE_DYNAMIC_SHARING) | 805 | if (req->Attributes & IRQ_TYPE_DYNAMIC_SHARING) |
806 | type = SA_SHIRQ; | 806 | type = IRQF_SHARED; |
807 | 807 | ||
808 | #ifdef CONFIG_PCMCIA_PROBE | 808 | #ifdef CONFIG_PCMCIA_PROBE |
809 | if (s->irq.AssignedIRQ != 0) { | 809 | if (s->irq.AssignedIRQ != 0) { |
@@ -845,7 +845,7 @@ int pcmcia_request_irq(struct pcmcia_device *p_dev, irq_req_t *req) | |||
845 | if (ret && !s->irq.AssignedIRQ) { | 845 | if (ret && !s->irq.AssignedIRQ) { |
846 | if (!s->pci_irq) | 846 | if (!s->pci_irq) |
847 | return ret; | 847 | return ret; |
848 | type = SA_SHIRQ; | 848 | type = IRQF_SHARED; |
849 | irq = s->pci_irq; | 849 | irq = s->pci_irq; |
850 | } | 850 | } |
851 | 851 | ||
@@ -855,7 +855,7 @@ int pcmcia_request_irq(struct pcmcia_device *p_dev, irq_req_t *req) | |||
855 | } | 855 | } |
856 | 856 | ||
857 | /* Make sure the fact the request type was overridden is passed back */ | 857 | /* Make sure the fact the request type was overridden is passed back */ |
858 | if (type == SA_SHIRQ && !(req->Attributes & IRQ_TYPE_DYNAMIC_SHARING)) { | 858 | if (type == IRQF_SHARED && !(req->Attributes & IRQ_TYPE_DYNAMIC_SHARING)) { |
859 | req->Attributes |= IRQ_TYPE_DYNAMIC_SHARING; | 859 | req->Attributes |= IRQ_TYPE_DYNAMIC_SHARING; |
860 | printk(KERN_WARNING "pcmcia: request for exclusive IRQ could not be fulfilled.\n"); | 860 | printk(KERN_WARNING "pcmcia: request for exclusive IRQ could not be fulfilled.\n"); |
861 | printk(KERN_WARNING "pcmcia: the driver needs updating to supported shared IRQ lines.\n"); | 861 | printk(KERN_WARNING "pcmcia: the driver needs updating to supported shared IRQ lines.\n"); |
diff --git a/drivers/pcmcia/pd6729.c b/drivers/pcmcia/pd6729.c index 9ee26c1b8635..22c5e7427ddd 100644 --- a/drivers/pcmcia/pd6729.c +++ b/drivers/pcmcia/pd6729.c | |||
@@ -689,7 +689,7 @@ static int __devinit pd6729_pci_probe(struct pci_dev *dev, | |||
689 | pci_set_drvdata(dev, socket); | 689 | pci_set_drvdata(dev, socket); |
690 | if (irq_mode == 1) { | 690 | if (irq_mode == 1) { |
691 | /* Register the interrupt handler */ | 691 | /* Register the interrupt handler */ |
692 | if ((ret = request_irq(dev->irq, pd6729_interrupt, SA_SHIRQ, | 692 | if ((ret = request_irq(dev->irq, pd6729_interrupt, IRQF_SHARED, |
693 | "pd6729", socket))) { | 693 | "pd6729", socket))) { |
694 | printk(KERN_ERR "pd6729: Failed to register irq %d, " | 694 | printk(KERN_ERR "pd6729: Failed to register irq %d, " |
695 | "aborting\n", dev->irq); | 695 | "aborting\n", dev->irq); |
diff --git a/drivers/pcmcia/soc_common.c b/drivers/pcmcia/soc_common.c index 8ef3f91310d2..ecaa132fa592 100644 --- a/drivers/pcmcia/soc_common.c +++ b/drivers/pcmcia/soc_common.c | |||
@@ -523,7 +523,7 @@ int soc_pcmcia_request_irqs(struct soc_pcmcia_socket *skt, | |||
523 | if (irqs[i].sock != skt->nr) | 523 | if (irqs[i].sock != skt->nr) |
524 | continue; | 524 | continue; |
525 | res = request_irq(irqs[i].irq, soc_common_pcmcia_interrupt, | 525 | res = request_irq(irqs[i].irq, soc_common_pcmcia_interrupt, |
526 | SA_INTERRUPT, irqs[i].str, skt); | 526 | IRQF_DISABLED, irqs[i].str, skt); |
527 | if (res) | 527 | if (res) |
528 | break; | 528 | break; |
529 | set_irq_type(irqs[i].irq, IRQT_NOEDGE); | 529 | set_irq_type(irqs[i].irq, IRQT_NOEDGE); |
diff --git a/drivers/pcmcia/vrc4171_card.c b/drivers/pcmcia/vrc4171_card.c index 459e6e1946fd..e076a13db555 100644 --- a/drivers/pcmcia/vrc4171_card.c +++ b/drivers/pcmcia/vrc4171_card.c | |||
@@ -730,7 +730,7 @@ static int __devinit vrc4171_card_init(void) | |||
730 | 730 | ||
731 | retval = vrc4171_add_sockets(); | 731 | retval = vrc4171_add_sockets(); |
732 | if (retval == 0) | 732 | if (retval == 0) |
733 | retval = request_irq(vrc4171_irq, pccard_interrupt, SA_SHIRQ, | 733 | retval = request_irq(vrc4171_irq, pccard_interrupt, IRQF_SHARED, |
734 | vrc4171_card_name, vrc4171_sockets); | 734 | vrc4171_card_name, vrc4171_sockets); |
735 | 735 | ||
736 | if (retval < 0) { | 736 | if (retval < 0) { |
diff --git a/drivers/pcmcia/vrc4173_cardu.c b/drivers/pcmcia/vrc4173_cardu.c index 6004196f7cc1..d19a9138135f 100644 --- a/drivers/pcmcia/vrc4173_cardu.c +++ b/drivers/pcmcia/vrc4173_cardu.c | |||
@@ -500,7 +500,7 @@ static int __devinit vrc4173_cardu_probe(struct pci_dev *dev, | |||
500 | return -ENOMEM; | 500 | return -ENOMEM; |
501 | } | 501 | } |
502 | 502 | ||
503 | if (request_irq(dev->irq, cardu_interrupt, SA_SHIRQ, socket->name, socket) < 0) { | 503 | if (request_irq(dev->irq, cardu_interrupt, IRQF_SHARED, socket->name, socket) < 0) { |
504 | pcmcia_unregister_socket(socket->pcmcia_socket); | 504 | pcmcia_unregister_socket(socket->pcmcia_socket); |
505 | socket->pcmcia_socket = NULL; | 505 | socket->pcmcia_socket = NULL; |
506 | iounmap(socket->base); | 506 | iounmap(socket->base); |
diff --git a/drivers/pcmcia/yenta_socket.c b/drivers/pcmcia/yenta_socket.c index 47e57602d5ea..1344746381e8 100644 --- a/drivers/pcmcia/yenta_socket.c +++ b/drivers/pcmcia/yenta_socket.c | |||
@@ -923,7 +923,7 @@ static int yenta_probe_cb_irq(struct yenta_socket *socket) | |||
923 | 923 | ||
924 | socket->probe_status = 0; | 924 | socket->probe_status = 0; |
925 | 925 | ||
926 | if (request_irq(socket->cb_irq, yenta_probe_handler, SA_SHIRQ, "yenta", socket)) { | 926 | if (request_irq(socket->cb_irq, yenta_probe_handler, IRQF_SHARED, "yenta", socket)) { |
927 | printk(KERN_WARNING "Yenta: request_irq() in yenta_probe_cb_irq() failed!\n"); | 927 | printk(KERN_WARNING "Yenta: request_irq() in yenta_probe_cb_irq() failed!\n"); |
928 | return -1; | 928 | return -1; |
929 | } | 929 | } |
@@ -1172,7 +1172,7 @@ static int __devinit yenta_probe (struct pci_dev *dev, const struct pci_device_i | |||
1172 | 1172 | ||
1173 | /* We must finish initialization here */ | 1173 | /* We must finish initialization here */ |
1174 | 1174 | ||
1175 | if (!socket->cb_irq || request_irq(socket->cb_irq, yenta_interrupt, SA_SHIRQ, "yenta", socket)) { | 1175 | if (!socket->cb_irq || request_irq(socket->cb_irq, yenta_interrupt, IRQF_SHARED, "yenta", socket)) { |
1176 | /* No IRQ or request_irq failed. Poll */ | 1176 | /* No IRQ or request_irq failed. Poll */ |
1177 | socket->cb_irq = 0; /* But zero is a valid IRQ number. */ | 1177 | socket->cb_irq = 0; /* But zero is a valid IRQ number. */ |
1178 | init_timer(&socket->poll_timer); | 1178 | init_timer(&socket->poll_timer); |
diff --git a/drivers/pnp/resource.c b/drivers/pnp/resource.c index e7cf6bec737e..5c8ec21e1086 100644 --- a/drivers/pnp/resource.c +++ b/drivers/pnp/resource.c | |||
@@ -395,7 +395,8 @@ int pnp_check_irq(struct pnp_dev * dev, int idx) | |||
395 | /* check if the resource is already in use, skip if the | 395 | /* check if the resource is already in use, skip if the |
396 | * device is active because it itself may be in use */ | 396 | * device is active because it itself may be in use */ |
397 | if(!dev->active) { | 397 | if(!dev->active) { |
398 | if (request_irq(*irq, pnp_test_handler, SA_INTERRUPT, "pnp", NULL)) | 398 | if (request_irq(*irq, pnp_test_handler, |
399 | IRQF_DISABLED|IRQF_PROBE_SHARED, "pnp", NULL)) | ||
399 | return 0; | 400 | return 0; |
400 | free_irq(*irq, NULL); | 401 | free_irq(*irq, NULL); |
401 | } | 402 | } |
diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig index d51afbe014e5..f5b9f187a930 100644 --- a/drivers/rtc/Kconfig +++ b/drivers/rtc/Kconfig | |||
@@ -182,6 +182,22 @@ config RTC_DRV_RS5C372 | |||
182 | This driver can also be built as a module. If so, the module | 182 | This driver can also be built as a module. If so, the module |
183 | will be called rtc-rs5c372. | 183 | will be called rtc-rs5c372. |
184 | 184 | ||
185 | config RTC_DRV_S3C | ||
186 | tristate "Samsung S3C series SoC RTC" | ||
187 | depends on RTC_CLASS && ARCH_S3C2410 | ||
188 | help | ||
189 | RTC (Realtime Clock) driver for the clock inbuilt into the | ||
190 | Samsung S3C24XX series of SoCs. This can provide periodic | ||
191 | interrupt rates from 1Hz to 64Hz for user programs, and | ||
192 | wakeup from Alarm. | ||
193 | |||
194 | The driver currently supports the common features on all the | ||
195 | S3C24XX range, such as the S3C2410, S3C2412, S3C2413, S3C2440 | ||
196 | and S3C2442. | ||
197 | |||
198 | This driver can also be build as a module. If so, the module | ||
199 | will be called rtc-s3c. | ||
200 | |||
185 | config RTC_DRV_M48T86 | 201 | config RTC_DRV_M48T86 |
186 | tristate "ST M48T86/Dallas DS12887" | 202 | tristate "ST M48T86/Dallas DS12887" |
187 | depends on RTC_CLASS | 203 | depends on RTC_CLASS |
diff --git a/drivers/rtc/Makefile b/drivers/rtc/Makefile index da5e38774e13..54220714ff49 100644 --- a/drivers/rtc/Makefile +++ b/drivers/rtc/Makefile | |||
@@ -19,6 +19,7 @@ obj-$(CONFIG_RTC_DRV_DS1742) += rtc-ds1742.o | |||
19 | obj-$(CONFIG_RTC_DRV_PCF8563) += rtc-pcf8563.o | 19 | obj-$(CONFIG_RTC_DRV_PCF8563) += rtc-pcf8563.o |
20 | obj-$(CONFIG_RTC_DRV_PCF8583) += rtc-pcf8583.o | 20 | obj-$(CONFIG_RTC_DRV_PCF8583) += rtc-pcf8583.o |
21 | obj-$(CONFIG_RTC_DRV_RS5C372) += rtc-rs5c372.o | 21 | obj-$(CONFIG_RTC_DRV_RS5C372) += rtc-rs5c372.o |
22 | obj-$(CONFIG_RTC_DRV_S3C) += rtc-s3c.o | ||
22 | obj-$(CONFIG_RTC_DRV_RS5C348) += rtc-rs5c348.o | 23 | obj-$(CONFIG_RTC_DRV_RS5C348) += rtc-rs5c348.o |
23 | obj-$(CONFIG_RTC_DRV_M48T86) += rtc-m48t86.o | 24 | obj-$(CONFIG_RTC_DRV_M48T86) += rtc-m48t86.o |
24 | obj-$(CONFIG_RTC_DRV_DS1553) += rtc-ds1553.o | 25 | obj-$(CONFIG_RTC_DRV_DS1553) += rtc-ds1553.o |
diff --git a/drivers/rtc/rtc-at91.c b/drivers/rtc/rtc-at91.c index b676f443c17e..dfd0ce86f6a0 100644 --- a/drivers/rtc/rtc-at91.c +++ b/drivers/rtc/rtc-at91.c | |||
@@ -293,7 +293,7 @@ static int __init at91_rtc_probe(struct platform_device *pdev) | |||
293 | AT91_RTC_CALEV); | 293 | AT91_RTC_CALEV); |
294 | 294 | ||
295 | ret = request_irq(AT91_ID_SYS, at91_rtc_interrupt, | 295 | ret = request_irq(AT91_ID_SYS, at91_rtc_interrupt, |
296 | SA_SHIRQ, "at91_rtc", pdev); | 296 | IRQF_SHARED, "at91_rtc", pdev); |
297 | if (ret) { | 297 | if (ret) { |
298 | printk(KERN_ERR "at91_rtc: IRQ %d already in use.\n", | 298 | printk(KERN_ERR "at91_rtc: IRQ %d already in use.\n", |
299 | AT91_ID_SYS); | 299 | AT91_ID_SYS); |
diff --git a/drivers/rtc/rtc-ds1553.c b/drivers/rtc/rtc-ds1553.c index 762521a1419c..209001495474 100644 --- a/drivers/rtc/rtc-ds1553.c +++ b/drivers/rtc/rtc-ds1553.c | |||
@@ -341,7 +341,7 @@ static int __init ds1553_rtc_probe(struct platform_device *pdev) | |||
341 | 341 | ||
342 | if (pdata->irq >= 0) { | 342 | if (pdata->irq >= 0) { |
343 | writeb(0, ioaddr + RTC_INTERRUPTS); | 343 | writeb(0, ioaddr + RTC_INTERRUPTS); |
344 | if (request_irq(pdata->irq, ds1553_rtc_interrupt, SA_SHIRQ, | 344 | if (request_irq(pdata->irq, ds1553_rtc_interrupt, IRQF_SHARED, |
345 | pdev->name, pdev) < 0) { | 345 | pdev->name, pdev) < 0) { |
346 | dev_warn(&pdev->dev, "interrupt not available.\n"); | 346 | dev_warn(&pdev->dev, "interrupt not available.\n"); |
347 | pdata->irq = -1; | 347 | pdata->irq = -1; |
diff --git a/drivers/rtc/rtc-pl031.c b/drivers/rtc/rtc-pl031.c index ee538632660b..d6d1c5726b0e 100644 --- a/drivers/rtc/rtc-pl031.c +++ b/drivers/rtc/rtc-pl031.c | |||
@@ -173,7 +173,7 @@ static int pl031_probe(struct amba_device *adev, void *id) | |||
173 | goto out_no_remap; | 173 | goto out_no_remap; |
174 | } | 174 | } |
175 | 175 | ||
176 | if (request_irq(adev->irq[0], pl031_interrupt, SA_INTERRUPT, | 176 | if (request_irq(adev->irq[0], pl031_interrupt, IRQF_DISABLED, |
177 | "rtc-pl031", ldata->rtc)) { | 177 | "rtc-pl031", ldata->rtc)) { |
178 | ret = -EIO; | 178 | ret = -EIO; |
179 | goto out_no_irq; | 179 | goto out_no_irq; |
diff --git a/drivers/rtc/rtc-s3c.c b/drivers/rtc/rtc-s3c.c new file mode 100644 index 000000000000..d6d1bff52b8e --- /dev/null +++ b/drivers/rtc/rtc-s3c.c | |||
@@ -0,0 +1,607 @@ | |||
1 | /* drivers/rtc/rtc-s3c.c | ||
2 | * | ||
3 | * Copyright (c) 2004,2006 Simtec Electronics | ||
4 | * Ben Dooks, <ben@simtec.co.uk> | ||
5 | * http://armlinux.simtec.co.uk/ | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License version 2 as | ||
9 | * published by the Free Software Foundation. | ||
10 | * | ||
11 | * S3C2410/S3C2440/S3C24XX Internal RTC Driver | ||
12 | */ | ||
13 | |||
14 | #include <linux/module.h> | ||
15 | #include <linux/fs.h> | ||
16 | #include <linux/string.h> | ||
17 | #include <linux/init.h> | ||
18 | #include <linux/platform_device.h> | ||
19 | #include <linux/interrupt.h> | ||
20 | #include <linux/rtc.h> | ||
21 | #include <linux/bcd.h> | ||
22 | #include <linux/clk.h> | ||
23 | |||
24 | #include <asm/hardware.h> | ||
25 | #include <asm/uaccess.h> | ||
26 | #include <asm/io.h> | ||
27 | #include <asm/irq.h> | ||
28 | #include <asm/rtc.h> | ||
29 | |||
30 | #include <asm/mach/time.h> | ||
31 | |||
32 | #include <asm/arch/regs-rtc.h> | ||
33 | |||
34 | /* I have yet to find an S3C implementation with more than one | ||
35 | * of these rtc blocks in */ | ||
36 | |||
37 | static struct resource *s3c_rtc_mem; | ||
38 | |||
39 | static void __iomem *s3c_rtc_base; | ||
40 | static int s3c_rtc_alarmno = NO_IRQ; | ||
41 | static int s3c_rtc_tickno = NO_IRQ; | ||
42 | static int s3c_rtc_freq = 1; | ||
43 | |||
44 | static DEFINE_SPINLOCK(s3c_rtc_pie_lock); | ||
45 | static unsigned int tick_count; | ||
46 | |||
47 | /* IRQ Handlers */ | ||
48 | |||
49 | static irqreturn_t s3c_rtc_alarmirq(int irq, void *id, struct pt_regs *r) | ||
50 | { | ||
51 | struct rtc_device *rdev = id; | ||
52 | |||
53 | rtc_update_irq(&rdev->class_dev, 1, RTC_AF | RTC_IRQF); | ||
54 | return IRQ_HANDLED; | ||
55 | } | ||
56 | |||
57 | static irqreturn_t s3c_rtc_tickirq(int irq, void *id, struct pt_regs *r) | ||
58 | { | ||
59 | struct rtc_device *rdev = id; | ||
60 | |||
61 | rtc_update_irq(&rdev->class_dev, tick_count++, RTC_PF | RTC_IRQF); | ||
62 | return IRQ_HANDLED; | ||
63 | } | ||
64 | |||
65 | /* Update control registers */ | ||
66 | static void s3c_rtc_setaie(int to) | ||
67 | { | ||
68 | unsigned int tmp; | ||
69 | |||
70 | pr_debug("%s: aie=%d\n", __FUNCTION__, to); | ||
71 | |||
72 | tmp = readb(S3C2410_RTCALM) & ~S3C2410_RTCALM_ALMEN; | ||
73 | |||
74 | if (to) | ||
75 | tmp |= S3C2410_RTCALM_ALMEN; | ||
76 | |||
77 | writeb(tmp, S3C2410_RTCALM); | ||
78 | } | ||
79 | |||
80 | static void s3c_rtc_setpie(int to) | ||
81 | { | ||
82 | unsigned int tmp; | ||
83 | |||
84 | pr_debug("%s: pie=%d\n", __FUNCTION__, to); | ||
85 | |||
86 | spin_lock_irq(&s3c_rtc_pie_lock); | ||
87 | tmp = readb(S3C2410_TICNT) & ~S3C2410_TICNT_ENABLE; | ||
88 | |||
89 | if (to) | ||
90 | tmp |= S3C2410_TICNT_ENABLE; | ||
91 | |||
92 | writeb(tmp, S3C2410_TICNT); | ||
93 | spin_unlock_irq(&s3c_rtc_pie_lock); | ||
94 | } | ||
95 | |||
96 | static void s3c_rtc_setfreq(int freq) | ||
97 | { | ||
98 | unsigned int tmp; | ||
99 | |||
100 | spin_lock_irq(&s3c_rtc_pie_lock); | ||
101 | tmp = readb(S3C2410_TICNT) & S3C2410_TICNT_ENABLE; | ||
102 | |||
103 | s3c_rtc_freq = freq; | ||
104 | |||
105 | tmp |= (128 / freq)-1; | ||
106 | |||
107 | writeb(tmp, S3C2410_TICNT); | ||
108 | spin_unlock_irq(&s3c_rtc_pie_lock); | ||
109 | } | ||
110 | |||
111 | /* Time read/write */ | ||
112 | |||
113 | static int s3c_rtc_gettime(struct device *dev, struct rtc_time *rtc_tm) | ||
114 | { | ||
115 | unsigned int have_retried = 0; | ||
116 | |||
117 | retry_get_time: | ||
118 | rtc_tm->tm_min = readb(S3C2410_RTCMIN); | ||
119 | rtc_tm->tm_hour = readb(S3C2410_RTCHOUR); | ||
120 | rtc_tm->tm_mday = readb(S3C2410_RTCDATE); | ||
121 | rtc_tm->tm_mon = readb(S3C2410_RTCMON); | ||
122 | rtc_tm->tm_year = readb(S3C2410_RTCYEAR); | ||
123 | rtc_tm->tm_sec = readb(S3C2410_RTCSEC); | ||
124 | |||
125 | /* the only way to work out wether the system was mid-update | ||
126 | * when we read it is to check the second counter, and if it | ||
127 | * is zero, then we re-try the entire read | ||
128 | */ | ||
129 | |||
130 | if (rtc_tm->tm_sec == 0 && !have_retried) { | ||
131 | have_retried = 1; | ||
132 | goto retry_get_time; | ||
133 | } | ||
134 | |||
135 | pr_debug("read time %02x.%02x.%02x %02x/%02x/%02x\n", | ||
136 | rtc_tm->tm_year, rtc_tm->tm_mon, rtc_tm->tm_mday, | ||
137 | rtc_tm->tm_hour, rtc_tm->tm_min, rtc_tm->tm_sec); | ||
138 | |||
139 | BCD_TO_BIN(rtc_tm->tm_sec); | ||
140 | BCD_TO_BIN(rtc_tm->tm_min); | ||
141 | BCD_TO_BIN(rtc_tm->tm_hour); | ||
142 | BCD_TO_BIN(rtc_tm->tm_mday); | ||
143 | BCD_TO_BIN(rtc_tm->tm_mon); | ||
144 | BCD_TO_BIN(rtc_tm->tm_year); | ||
145 | |||
146 | rtc_tm->tm_year += 100; | ||
147 | rtc_tm->tm_mon -= 1; | ||
148 | |||
149 | return 0; | ||
150 | } | ||
151 | |||
152 | static int s3c_rtc_settime(struct device *dev, struct rtc_time *tm) | ||
153 | { | ||
154 | /* the rtc gets round the y2k problem by just not supporting it */ | ||
155 | |||
156 | if (tm->tm_year < 100) | ||
157 | return -EINVAL; | ||
158 | |||
159 | writeb(BIN2BCD(tm->tm_sec), S3C2410_RTCSEC); | ||
160 | writeb(BIN2BCD(tm->tm_min), S3C2410_RTCMIN); | ||
161 | writeb(BIN2BCD(tm->tm_hour), S3C2410_RTCHOUR); | ||
162 | writeb(BIN2BCD(tm->tm_mday), S3C2410_RTCDATE); | ||
163 | writeb(BIN2BCD(tm->tm_mon + 1), S3C2410_RTCMON); | ||
164 | writeb(BIN2BCD(tm->tm_year - 100), S3C2410_RTCYEAR); | ||
165 | |||
166 | return 0; | ||
167 | } | ||
168 | |||
169 | static int s3c_rtc_getalarm(struct device *dev, struct rtc_wkalrm *alrm) | ||
170 | { | ||
171 | struct rtc_time *alm_tm = &alrm->time; | ||
172 | unsigned int alm_en; | ||
173 | |||
174 | alm_tm->tm_sec = readb(S3C2410_ALMSEC); | ||
175 | alm_tm->tm_min = readb(S3C2410_ALMMIN); | ||
176 | alm_tm->tm_hour = readb(S3C2410_ALMHOUR); | ||
177 | alm_tm->tm_mon = readb(S3C2410_ALMMON); | ||
178 | alm_tm->tm_mday = readb(S3C2410_ALMDATE); | ||
179 | alm_tm->tm_year = readb(S3C2410_ALMYEAR); | ||
180 | |||
181 | alm_en = readb(S3C2410_RTCALM); | ||
182 | |||
183 | pr_debug("read alarm %02x %02x.%02x.%02x %02x/%02x/%02x\n", | ||
184 | alm_en, | ||
185 | alm_tm->tm_year, alm_tm->tm_mon, alm_tm->tm_mday, | ||
186 | alm_tm->tm_hour, alm_tm->tm_min, alm_tm->tm_sec); | ||
187 | |||
188 | |||
189 | /* decode the alarm enable field */ | ||
190 | |||
191 | if (alm_en & S3C2410_RTCALM_SECEN) | ||
192 | BCD_TO_BIN(alm_tm->tm_sec); | ||
193 | else | ||
194 | alm_tm->tm_sec = 0xff; | ||
195 | |||
196 | if (alm_en & S3C2410_RTCALM_MINEN) | ||
197 | BCD_TO_BIN(alm_tm->tm_min); | ||
198 | else | ||
199 | alm_tm->tm_min = 0xff; | ||
200 | |||
201 | if (alm_en & S3C2410_RTCALM_HOUREN) | ||
202 | BCD_TO_BIN(alm_tm->tm_hour); | ||
203 | else | ||
204 | alm_tm->tm_hour = 0xff; | ||
205 | |||
206 | if (alm_en & S3C2410_RTCALM_DAYEN) | ||
207 | BCD_TO_BIN(alm_tm->tm_mday); | ||
208 | else | ||
209 | alm_tm->tm_mday = 0xff; | ||
210 | |||
211 | if (alm_en & S3C2410_RTCALM_MONEN) { | ||
212 | BCD_TO_BIN(alm_tm->tm_mon); | ||
213 | alm_tm->tm_mon -= 1; | ||
214 | } else { | ||
215 | alm_tm->tm_mon = 0xff; | ||
216 | } | ||
217 | |||
218 | if (alm_en & S3C2410_RTCALM_YEAREN) | ||
219 | BCD_TO_BIN(alm_tm->tm_year); | ||
220 | else | ||
221 | alm_tm->tm_year = 0xffff; | ||
222 | |||
223 | return 0; | ||
224 | } | ||
225 | |||
226 | static int s3c_rtc_setalarm(struct device *dev, struct rtc_wkalrm *alrm) | ||
227 | { | ||
228 | struct rtc_time *tm = &alrm->time; | ||
229 | unsigned int alrm_en; | ||
230 | |||
231 | pr_debug("s3c_rtc_setalarm: %d, %02x/%02x/%02x %02x.%02x.%02x\n", | ||
232 | alrm->enabled, | ||
233 | tm->tm_mday & 0xff, tm->tm_mon & 0xff, tm->tm_year & 0xff, | ||
234 | tm->tm_hour & 0xff, tm->tm_min & 0xff, tm->tm_sec); | ||
235 | |||
236 | |||
237 | alrm_en = readb(S3C2410_RTCALM) & S3C2410_RTCALM_ALMEN; | ||
238 | writeb(0x00, S3C2410_RTCALM); | ||
239 | |||
240 | if (tm->tm_sec < 60 && tm->tm_sec >= 0) { | ||
241 | alrm_en |= S3C2410_RTCALM_SECEN; | ||
242 | writeb(BIN2BCD(tm->tm_sec), S3C2410_ALMSEC); | ||
243 | } | ||
244 | |||
245 | if (tm->tm_min < 60 && tm->tm_min >= 0) { | ||
246 | alrm_en |= S3C2410_RTCALM_MINEN; | ||
247 | writeb(BIN2BCD(tm->tm_min), S3C2410_ALMMIN); | ||
248 | } | ||
249 | |||
250 | if (tm->tm_hour < 24 && tm->tm_hour >= 0) { | ||
251 | alrm_en |= S3C2410_RTCALM_HOUREN; | ||
252 | writeb(BIN2BCD(tm->tm_hour), S3C2410_ALMHOUR); | ||
253 | } | ||
254 | |||
255 | pr_debug("setting S3C2410_RTCALM to %08x\n", alrm_en); | ||
256 | |||
257 | writeb(alrm_en, S3C2410_RTCALM); | ||
258 | |||
259 | if (0) { | ||
260 | alrm_en = readb(S3C2410_RTCALM); | ||
261 | alrm_en &= ~S3C2410_RTCALM_ALMEN; | ||
262 | writeb(alrm_en, S3C2410_RTCALM); | ||
263 | disable_irq_wake(s3c_rtc_alarmno); | ||
264 | } | ||
265 | |||
266 | if (alrm->enabled) | ||
267 | enable_irq_wake(s3c_rtc_alarmno); | ||
268 | else | ||
269 | disable_irq_wake(s3c_rtc_alarmno); | ||
270 | |||
271 | return 0; | ||
272 | } | ||
273 | |||
274 | static int s3c_rtc_ioctl(struct device *dev, | ||
275 | unsigned int cmd, unsigned long arg) | ||
276 | { | ||
277 | unsigned int ret = -ENOIOCTLCMD; | ||
278 | |||
279 | switch (cmd) { | ||
280 | case RTC_AIE_OFF: | ||
281 | case RTC_AIE_ON: | ||
282 | s3c_rtc_setaie((cmd == RTC_AIE_ON) ? 1 : 0); | ||
283 | ret = 0; | ||
284 | break; | ||
285 | |||
286 | case RTC_PIE_OFF: | ||
287 | case RTC_PIE_ON: | ||
288 | tick_count = 0; | ||
289 | s3c_rtc_setpie((cmd == RTC_PIE_ON) ? 1 : 0); | ||
290 | ret = 0; | ||
291 | break; | ||
292 | |||
293 | case RTC_IRQP_READ: | ||
294 | ret = put_user(s3c_rtc_freq, (unsigned long __user *)arg); | ||
295 | break; | ||
296 | |||
297 | case RTC_IRQP_SET: | ||
298 | /* check for power of 2 */ | ||
299 | |||
300 | if ((arg & (arg-1)) != 0 || arg < 1) { | ||
301 | ret = -EINVAL; | ||
302 | goto exit; | ||
303 | } | ||
304 | |||
305 | pr_debug("s3c2410_rtc: setting frequency %ld\n", arg); | ||
306 | |||
307 | s3c_rtc_setfreq(arg); | ||
308 | ret = 0; | ||
309 | break; | ||
310 | |||
311 | case RTC_UIE_ON: | ||
312 | case RTC_UIE_OFF: | ||
313 | ret = -EINVAL; | ||
314 | } | ||
315 | |||
316 | exit: | ||
317 | return ret; | ||
318 | } | ||
319 | |||
320 | static int s3c_rtc_proc(struct device *dev, struct seq_file *seq) | ||
321 | { | ||
322 | unsigned int rtcalm = readb(S3C2410_RTCALM); | ||
323 | unsigned int ticnt = readb (S3C2410_TICNT); | ||
324 | |||
325 | seq_printf(seq, "alarm_IRQ\t: %s\n", | ||
326 | (rtcalm & S3C2410_RTCALM_ALMEN) ? "yes" : "no" ); | ||
327 | |||
328 | seq_printf(seq, "periodic_IRQ\t: %s\n", | ||
329 | (ticnt & S3C2410_TICNT_ENABLE) ? "yes" : "no" ); | ||
330 | |||
331 | seq_printf(seq, "periodic_freq\t: %d\n", s3c_rtc_freq); | ||
332 | |||
333 | return 0; | ||
334 | } | ||
335 | |||
336 | static int s3c_rtc_open(struct device *dev) | ||
337 | { | ||
338 | struct platform_device *pdev = to_platform_device(dev); | ||
339 | struct rtc_device *rtc_dev = platform_get_drvdata(pdev); | ||
340 | int ret; | ||
341 | |||
342 | ret = request_irq(s3c_rtc_alarmno, s3c_rtc_alarmirq, | ||
343 | SA_INTERRUPT, "s3c2410-rtc alarm", rtc_dev); | ||
344 | |||
345 | if (ret) { | ||
346 | dev_err(dev, "IRQ%d error %d\n", s3c_rtc_alarmno, ret); | ||
347 | return ret; | ||
348 | } | ||
349 | |||
350 | ret = request_irq(s3c_rtc_tickno, s3c_rtc_tickirq, | ||
351 | SA_INTERRUPT, "s3c2410-rtc tick", rtc_dev); | ||
352 | |||
353 | if (ret) { | ||
354 | dev_err(dev, "IRQ%d error %d\n", s3c_rtc_tickno, ret); | ||
355 | goto tick_err; | ||
356 | } | ||
357 | |||
358 | return ret; | ||
359 | |||
360 | tick_err: | ||
361 | free_irq(s3c_rtc_alarmno, rtc_dev); | ||
362 | return ret; | ||
363 | } | ||
364 | |||
365 | static void s3c_rtc_release(struct device *dev) | ||
366 | { | ||
367 | struct platform_device *pdev = to_platform_device(dev); | ||
368 | struct rtc_device *rtc_dev = platform_get_drvdata(pdev); | ||
369 | |||
370 | /* do not clear AIE here, it may be needed for wake */ | ||
371 | |||
372 | s3c_rtc_setpie(0); | ||
373 | free_irq(s3c_rtc_alarmno, rtc_dev); | ||
374 | free_irq(s3c_rtc_tickno, rtc_dev); | ||
375 | } | ||
376 | |||
377 | static struct rtc_class_ops s3c_rtcops = { | ||
378 | .open = s3c_rtc_open, | ||
379 | .release = s3c_rtc_release, | ||
380 | .ioctl = s3c_rtc_ioctl, | ||
381 | .read_time = s3c_rtc_gettime, | ||
382 | .set_time = s3c_rtc_settime, | ||
383 | .read_alarm = s3c_rtc_getalarm, | ||
384 | .set_alarm = s3c_rtc_setalarm, | ||
385 | .proc = s3c_rtc_proc, | ||
386 | }; | ||
387 | |||
388 | static void s3c_rtc_enable(struct platform_device *pdev, int en) | ||
389 | { | ||
390 | unsigned int tmp; | ||
391 | |||
392 | if (s3c_rtc_base == NULL) | ||
393 | return; | ||
394 | |||
395 | if (!en) { | ||
396 | tmp = readb(S3C2410_RTCCON); | ||
397 | writeb(tmp & ~S3C2410_RTCCON_RTCEN, S3C2410_RTCCON); | ||
398 | |||
399 | tmp = readb(S3C2410_TICNT); | ||
400 | writeb(tmp & ~S3C2410_TICNT_ENABLE, S3C2410_TICNT); | ||
401 | } else { | ||
402 | /* re-enable the device, and check it is ok */ | ||
403 | |||
404 | if ((readb(S3C2410_RTCCON) & S3C2410_RTCCON_RTCEN) == 0){ | ||
405 | dev_info(&pdev->dev, "rtc disabled, re-enabling\n"); | ||
406 | |||
407 | tmp = readb(S3C2410_RTCCON); | ||
408 | writeb(tmp | S3C2410_RTCCON_RTCEN , S3C2410_RTCCON); | ||
409 | } | ||
410 | |||
411 | if ((readb(S3C2410_RTCCON) & S3C2410_RTCCON_CNTSEL)){ | ||
412 | dev_info(&pdev->dev, "removing RTCCON_CNTSEL\n"); | ||
413 | |||
414 | tmp = readb(S3C2410_RTCCON); | ||
415 | writeb(tmp& ~S3C2410_RTCCON_CNTSEL , S3C2410_RTCCON); | ||
416 | } | ||
417 | |||
418 | if ((readb(S3C2410_RTCCON) & S3C2410_RTCCON_CLKRST)){ | ||
419 | dev_info(&pdev->dev, "removing RTCCON_CLKRST\n"); | ||
420 | |||
421 | tmp = readb(S3C2410_RTCCON); | ||
422 | writeb(tmp & ~S3C2410_RTCCON_CLKRST, S3C2410_RTCCON); | ||
423 | } | ||
424 | } | ||
425 | } | ||
426 | |||
427 | static int s3c_rtc_remove(struct platform_device *dev) | ||
428 | { | ||
429 | struct rtc_device *rtc = platform_get_drvdata(dev); | ||
430 | |||
431 | platform_set_drvdata(dev, NULL); | ||
432 | rtc_device_unregister(rtc); | ||
433 | |||
434 | s3c_rtc_setpie(0); | ||
435 | s3c_rtc_setaie(0); | ||
436 | |||
437 | iounmap(s3c_rtc_base); | ||
438 | release_resource(s3c_rtc_mem); | ||
439 | kfree(s3c_rtc_mem); | ||
440 | |||
441 | return 0; | ||
442 | } | ||
443 | |||
444 | static int s3c_rtc_probe(struct platform_device *pdev) | ||
445 | { | ||
446 | struct rtc_device *rtc; | ||
447 | struct resource *res; | ||
448 | int ret; | ||
449 | |||
450 | pr_debug("%s: probe=%p\n", __FUNCTION__, pdev); | ||
451 | |||
452 | /* find the IRQs */ | ||
453 | |||
454 | s3c_rtc_tickno = platform_get_irq(pdev, 1); | ||
455 | if (s3c_rtc_tickno < 0) { | ||
456 | dev_err(&pdev->dev, "no irq for rtc tick\n"); | ||
457 | return -ENOENT; | ||
458 | } | ||
459 | |||
460 | s3c_rtc_alarmno = platform_get_irq(pdev, 0); | ||
461 | if (s3c_rtc_alarmno < 0) { | ||
462 | dev_err(&pdev->dev, "no irq for alarm\n"); | ||
463 | return -ENOENT; | ||
464 | } | ||
465 | |||
466 | pr_debug("s3c2410_rtc: tick irq %d, alarm irq %d\n", | ||
467 | s3c_rtc_tickno, s3c_rtc_alarmno); | ||
468 | |||
469 | /* get the memory region */ | ||
470 | |||
471 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | ||
472 | if (res == NULL) { | ||
473 | dev_err(&pdev->dev, "failed to get memory region resource\n"); | ||
474 | return -ENOENT; | ||
475 | } | ||
476 | |||
477 | s3c_rtc_mem = request_mem_region(res->start, | ||
478 | res->end-res->start+1, | ||
479 | pdev->name); | ||
480 | |||
481 | if (s3c_rtc_mem == NULL) { | ||
482 | dev_err(&pdev->dev, "failed to reserve memory region\n"); | ||
483 | ret = -ENOENT; | ||
484 | goto err_nores; | ||
485 | } | ||
486 | |||
487 | s3c_rtc_base = ioremap(res->start, res->end - res->start + 1); | ||
488 | if (s3c_rtc_base == NULL) { | ||
489 | dev_err(&pdev->dev, "failed ioremap()\n"); | ||
490 | ret = -EINVAL; | ||
491 | goto err_nomap; | ||
492 | } | ||
493 | |||
494 | /* check to see if everything is setup correctly */ | ||
495 | |||
496 | s3c_rtc_enable(pdev, 1); | ||
497 | |||
498 | pr_debug("s3c2410_rtc: RTCCON=%02x\n", readb(S3C2410_RTCCON)); | ||
499 | |||
500 | s3c_rtc_setfreq(s3c_rtc_freq); | ||
501 | |||
502 | /* register RTC and exit */ | ||
503 | |||
504 | rtc = rtc_device_register("s3c", &pdev->dev, &s3c_rtcops, | ||
505 | THIS_MODULE); | ||
506 | |||
507 | if (IS_ERR(rtc)) { | ||
508 | dev_err(&pdev->dev, "cannot attach rtc\n"); | ||
509 | ret = PTR_ERR(rtc); | ||
510 | goto err_nortc; | ||
511 | } | ||
512 | |||
513 | rtc->max_user_freq = 128; | ||
514 | |||
515 | platform_set_drvdata(pdev, rtc); | ||
516 | return 0; | ||
517 | |||
518 | err_nortc: | ||
519 | s3c_rtc_enable(pdev, 0); | ||
520 | iounmap(s3c_rtc_base); | ||
521 | |||
522 | err_nomap: | ||
523 | release_resource(s3c_rtc_mem); | ||
524 | |||
525 | err_nores: | ||
526 | return ret; | ||
527 | } | ||
528 | |||
529 | #ifdef CONFIG_PM | ||
530 | |||
531 | /* RTC Power management control */ | ||
532 | |||
533 | static struct timespec s3c_rtc_delta; | ||
534 | |||
535 | static int ticnt_save; | ||
536 | |||
537 | static int s3c_rtc_suspend(struct platform_device *pdev, pm_message_t state) | ||
538 | { | ||
539 | struct rtc_time tm; | ||
540 | struct timespec time; | ||
541 | |||
542 | time.tv_nsec = 0; | ||
543 | |||
544 | /* save TICNT for anyone using periodic interrupts */ | ||
545 | |||
546 | ticnt_save = readb(S3C2410_TICNT); | ||
547 | |||
548 | /* calculate time delta for suspend */ | ||
549 | |||
550 | s3c_rtc_gettime(&pdev->dev, &tm); | ||
551 | rtc_tm_to_time(&tm, &time.tv_sec); | ||
552 | save_time_delta(&s3c_rtc_delta, &time); | ||
553 | s3c_rtc_enable(pdev, 0); | ||
554 | |||
555 | return 0; | ||
556 | } | ||
557 | |||
558 | static int s3c_rtc_resume(struct platform_device *pdev) | ||
559 | { | ||
560 | struct rtc_time tm; | ||
561 | struct timespec time; | ||
562 | |||
563 | time.tv_nsec = 0; | ||
564 | |||
565 | s3c_rtc_enable(pdev, 1); | ||
566 | s3c_rtc_gettime(&pdev->dev, &tm); | ||
567 | rtc_tm_to_time(&tm, &time.tv_sec); | ||
568 | restore_time_delta(&s3c_rtc_delta, &time); | ||
569 | |||
570 | writeb(ticnt_save, S3C2410_TICNT); | ||
571 | return 0; | ||
572 | } | ||
573 | #else | ||
574 | #define s3c_rtc_suspend NULL | ||
575 | #define s3c_rtc_resume NULL | ||
576 | #endif | ||
577 | |||
578 | static struct platform_driver s3c2410_rtcdrv = { | ||
579 | .probe = s3c_rtc_probe, | ||
580 | .remove = s3c_rtc_remove, | ||
581 | .suspend = s3c_rtc_suspend, | ||
582 | .resume = s3c_rtc_resume, | ||
583 | .driver = { | ||
584 | .name = "s3c2410-rtc", | ||
585 | .owner = THIS_MODULE, | ||
586 | }, | ||
587 | }; | ||
588 | |||
589 | static char __initdata banner[] = "S3C24XX RTC, (c) 2004,2006 Simtec Electronics\n"; | ||
590 | |||
591 | static int __init s3c_rtc_init(void) | ||
592 | { | ||
593 | printk(banner); | ||
594 | return platform_driver_register(&s3c2410_rtcdrv); | ||
595 | } | ||
596 | |||
597 | static void __exit s3c_rtc_exit(void) | ||
598 | { | ||
599 | platform_driver_unregister(&s3c2410_rtcdrv); | ||
600 | } | ||
601 | |||
602 | module_init(s3c_rtc_init); | ||
603 | module_exit(s3c_rtc_exit); | ||
604 | |||
605 | MODULE_DESCRIPTION("Samsung S3C RTC Driver"); | ||
606 | MODULE_AUTHOR("Ben Dooks <ben@simtec.co.uk>"); | ||
607 | MODULE_LICENSE("GPL"); | ||
diff --git a/drivers/rtc/rtc-sa1100.c b/drivers/rtc/rtc-sa1100.c index 9cd1cb304bb2..ee4b61ee67b0 100644 --- a/drivers/rtc/rtc-sa1100.c +++ b/drivers/rtc/rtc-sa1100.c | |||
@@ -157,19 +157,19 @@ static int sa1100_rtc_open(struct device *dev) | |||
157 | { | 157 | { |
158 | int ret; | 158 | int ret; |
159 | 159 | ||
160 | ret = request_irq(IRQ_RTC1Hz, sa1100_rtc_interrupt, SA_INTERRUPT, | 160 | ret = request_irq(IRQ_RTC1Hz, sa1100_rtc_interrupt, IRQF_DISABLED, |
161 | "rtc 1Hz", dev); | 161 | "rtc 1Hz", dev); |
162 | if (ret) { | 162 | if (ret) { |
163 | dev_err(dev, "IRQ %d already in use.\n", IRQ_RTC1Hz); | 163 | dev_err(dev, "IRQ %d already in use.\n", IRQ_RTC1Hz); |
164 | goto fail_ui; | 164 | goto fail_ui; |
165 | } | 165 | } |
166 | ret = request_irq(IRQ_RTCAlrm, sa1100_rtc_interrupt, SA_INTERRUPT, | 166 | ret = request_irq(IRQ_RTCAlrm, sa1100_rtc_interrupt, IRQF_DISABLED, |
167 | "rtc Alrm", dev); | 167 | "rtc Alrm", dev); |
168 | if (ret) { | 168 | if (ret) { |
169 | dev_err(dev, "IRQ %d already in use.\n", IRQ_RTCAlrm); | 169 | dev_err(dev, "IRQ %d already in use.\n", IRQ_RTCAlrm); |
170 | goto fail_ai; | 170 | goto fail_ai; |
171 | } | 171 | } |
172 | ret = request_irq(IRQ_OST1, timer1_interrupt, SA_INTERRUPT, | 172 | ret = request_irq(IRQ_OST1, timer1_interrupt, IRQF_DISABLED, |
173 | "rtc timer", dev); | 173 | "rtc timer", dev); |
174 | if (ret) { | 174 | if (ret) { |
175 | dev_err(dev, "IRQ %d already in use.\n", IRQ_OST1); | 175 | dev_err(dev, "IRQ %d already in use.\n", IRQ_OST1); |
diff --git a/drivers/rtc/rtc-vr41xx.c b/drivers/rtc/rtc-vr41xx.c index 4b9291dd4443..bb6d5ff24fd0 100644 --- a/drivers/rtc/rtc-vr41xx.c +++ b/drivers/rtc/rtc-vr41xx.c | |||
@@ -345,11 +345,11 @@ static int __devinit rtc_probe(struct platform_device *pdev) | |||
345 | spin_unlock_irq(&rtc_lock); | 345 | spin_unlock_irq(&rtc_lock); |
346 | 346 | ||
347 | irq = ELAPSEDTIME_IRQ; | 347 | irq = ELAPSEDTIME_IRQ; |
348 | retval = request_irq(irq, elapsedtime_interrupt, SA_INTERRUPT, | 348 | retval = request_irq(irq, elapsedtime_interrupt, IRQF_DISABLED, |
349 | "elapsed_time", pdev); | 349 | "elapsed_time", pdev); |
350 | if (retval == 0) { | 350 | if (retval == 0) { |
351 | irq = RTCLONG1_IRQ; | 351 | irq = RTCLONG1_IRQ; |
352 | retval = request_irq(irq, rtclong1_interrupt, SA_INTERRUPT, | 352 | retval = request_irq(irq, rtclong1_interrupt, IRQF_DISABLED, |
353 | "rtclong1", pdev); | 353 | "rtclong1", pdev); |
354 | } | 354 | } |
355 | 355 | ||
diff --git a/drivers/sbus/char/aurora.c b/drivers/sbus/char/aurora.c index 015db40ad8a4..4fdb2c932210 100644 --- a/drivers/sbus/char/aurora.c +++ b/drivers/sbus/char/aurora.c | |||
@@ -337,19 +337,19 @@ static int aurora_probe(void) | |||
337 | printk("intr pri %d\n", grrr); | 337 | printk("intr pri %d\n", grrr); |
338 | #endif | 338 | #endif |
339 | if ((bp->irq=irqs[bn]) && valid_irq(bp->irq) && | 339 | if ((bp->irq=irqs[bn]) && valid_irq(bp->irq) && |
340 | !request_irq(bp->irq|0x30, aurora_interrupt, SA_SHIRQ, "sio16", bp)) { | 340 | !request_irq(bp->irq|0x30, aurora_interrupt, IRQF_SHARED, "sio16", bp)) { |
341 | free_irq(bp->irq|0x30, bp); | 341 | free_irq(bp->irq|0x30, bp); |
342 | } else | 342 | } else |
343 | if ((bp->irq=prom_getint(sdev->prom_node, "bintr")) && valid_irq(bp->irq) && | 343 | if ((bp->irq=prom_getint(sdev->prom_node, "bintr")) && valid_irq(bp->irq) && |
344 | !request_irq(bp->irq|0x30, aurora_interrupt, SA_SHIRQ, "sio16", bp)) { | 344 | !request_irq(bp->irq|0x30, aurora_interrupt, IRQF_SHARED, "sio16", bp)) { |
345 | free_irq(bp->irq|0x30, bp); | 345 | free_irq(bp->irq|0x30, bp); |
346 | } else | 346 | } else |
347 | if ((bp->irq=prom_getint(sdev->prom_node, "intr")) && valid_irq(bp->irq) && | 347 | if ((bp->irq=prom_getint(sdev->prom_node, "intr")) && valid_irq(bp->irq) && |
348 | !request_irq(bp->irq|0x30, aurora_interrupt, SA_SHIRQ, "sio16", bp)) { | 348 | !request_irq(bp->irq|0x30, aurora_interrupt, IRQF_SHARED, "sio16", bp)) { |
349 | free_irq(bp->irq|0x30, bp); | 349 | free_irq(bp->irq|0x30, bp); |
350 | } else | 350 | } else |
351 | for(grrr=0;grrr<TYPE_1_IRQS;grrr++) { | 351 | for(grrr=0;grrr<TYPE_1_IRQS;grrr++) { |
352 | if ((bp->irq=type_1_irq[grrr])&&!request_irq(bp->irq|0x30, aurora_interrupt, SA_SHIRQ, "sio16", bp)) { | 352 | if ((bp->irq=type_1_irq[grrr])&&!request_irq(bp->irq|0x30, aurora_interrupt, IRQF_SHARED, "sio16", bp)) { |
353 | free_irq(bp->irq|0x30, bp); | 353 | free_irq(bp->irq|0x30, bp); |
354 | break; | 354 | break; |
355 | } else { | 355 | } else { |
@@ -909,14 +909,14 @@ static int aurora_setup_board(struct Aurora_board * bp) | |||
909 | #ifdef AURORA_ALLIRQ | 909 | #ifdef AURORA_ALLIRQ |
910 | int i; | 910 | int i; |
911 | for (i = 0; i < AURORA_ALLIRQ; i++) { | 911 | for (i = 0; i < AURORA_ALLIRQ; i++) { |
912 | error = request_irq(allirq[i]|0x30, aurora_interrupt, SA_SHIRQ, | 912 | error = request_irq(allirq[i]|0x30, aurora_interrupt, IRQF_SHARED, |
913 | "sio16", bp); | 913 | "sio16", bp); |
914 | if (error) | 914 | if (error) |
915 | printk(KERN_ERR "IRQ%d request error %d\n", | 915 | printk(KERN_ERR "IRQ%d request error %d\n", |
916 | allirq[i], error); | 916 | allirq[i], error); |
917 | } | 917 | } |
918 | #else | 918 | #else |
919 | error = request_irq(bp->irq|0x30, aurora_interrupt, SA_SHIRQ, | 919 | error = request_irq(bp->irq|0x30, aurora_interrupt, IRQF_SHARED, |
920 | "sio16", bp); | 920 | "sio16", bp); |
921 | if (error) { | 921 | if (error) { |
922 | printk(KERN_ERR "IRQ request error %d\n", error); | 922 | printk(KERN_ERR "IRQ request error %d\n", error); |
diff --git a/drivers/sbus/char/bbc_i2c.c b/drivers/sbus/char/bbc_i2c.c index 73634371393b..7186235594f9 100644 --- a/drivers/sbus/char/bbc_i2c.c +++ b/drivers/sbus/char/bbc_i2c.c | |||
@@ -377,7 +377,7 @@ static int __init attach_one_i2c(struct linux_ebus_device *edev, int index) | |||
377 | bp->waiting = 0; | 377 | bp->waiting = 0; |
378 | init_waitqueue_head(&bp->wq); | 378 | init_waitqueue_head(&bp->wq); |
379 | if (request_irq(edev->irqs[0], bbc_i2c_interrupt, | 379 | if (request_irq(edev->irqs[0], bbc_i2c_interrupt, |
380 | SA_SHIRQ, "bbc_i2c", bp)) | 380 | IRQF_SHARED, "bbc_i2c", bp)) |
381 | goto fail; | 381 | goto fail; |
382 | 382 | ||
383 | bp->index = index; | 383 | bp->index = index; |
diff --git a/drivers/sbus/char/cpwatchdog.c b/drivers/sbus/char/cpwatchdog.c index 21737b7e86a1..836a58bb0305 100644 --- a/drivers/sbus/char/cpwatchdog.c +++ b/drivers/sbus/char/cpwatchdog.c | |||
@@ -301,7 +301,7 @@ static int wd_open(struct inode *inode, struct file *f) | |||
301 | { | 301 | { |
302 | if (request_irq(wd_dev.irq, | 302 | if (request_irq(wd_dev.irq, |
303 | &wd_interrupt, | 303 | &wd_interrupt, |
304 | SA_SHIRQ, | 304 | IRQF_SHARED, |
305 | WD_OBPNAME, | 305 | WD_OBPNAME, |
306 | (void *)wd_dev.regs)) { | 306 | (void *)wd_dev.regs)) { |
307 | printk("%s: Cannot register IRQ %d\n", | 307 | printk("%s: Cannot register IRQ %d\n", |
diff --git a/drivers/scsi/3w-9xxx.c b/drivers/scsi/3w-9xxx.c index b003baf8d404..5a9475e56d0e 100644 --- a/drivers/scsi/3w-9xxx.c +++ b/drivers/scsi/3w-9xxx.c | |||
@@ -2122,7 +2122,7 @@ static int __devinit twa_probe(struct pci_dev *pdev, const struct pci_device_id | |||
2122 | TW_PARAM_PORTCOUNT, TW_PARAM_PORTCOUNT_LENGTH))); | 2122 | TW_PARAM_PORTCOUNT, TW_PARAM_PORTCOUNT_LENGTH))); |
2123 | 2123 | ||
2124 | /* Now setup the interrupt handler */ | 2124 | /* Now setup the interrupt handler */ |
2125 | retval = request_irq(pdev->irq, twa_interrupt, SA_SHIRQ, "3w-9xxx", tw_dev); | 2125 | retval = request_irq(pdev->irq, twa_interrupt, IRQF_SHARED, "3w-9xxx", tw_dev); |
2126 | if (retval) { | 2126 | if (retval) { |
2127 | TW_PRINTK(tw_dev->host, TW_DRIVER, 0x30, "Error requesting IRQ"); | 2127 | TW_PRINTK(tw_dev->host, TW_DRIVER, 0x30, "Error requesting IRQ"); |
2128 | goto out_remove_host; | 2128 | goto out_remove_host; |
diff --git a/drivers/scsi/3w-xxxx.c b/drivers/scsi/3w-xxxx.c index 17dbd4ac8692..f3a5f422a8e4 100644 --- a/drivers/scsi/3w-xxxx.c +++ b/drivers/scsi/3w-xxxx.c | |||
@@ -2397,7 +2397,7 @@ static int __devinit tw_probe(struct pci_dev *pdev, const struct pci_device_id * | |||
2397 | printk(KERN_WARNING "3w-xxxx: scsi%d: Found a 3ware Storage Controller at 0x%x, IRQ: %d.\n", host->host_no, tw_dev->base_addr, pdev->irq); | 2397 | printk(KERN_WARNING "3w-xxxx: scsi%d: Found a 3ware Storage Controller at 0x%x, IRQ: %d.\n", host->host_no, tw_dev->base_addr, pdev->irq); |
2398 | 2398 | ||
2399 | /* Now setup the interrupt handler */ | 2399 | /* Now setup the interrupt handler */ |
2400 | retval = request_irq(pdev->irq, tw_interrupt, SA_SHIRQ, "3w-xxxx", tw_dev); | 2400 | retval = request_irq(pdev->irq, tw_interrupt, IRQF_SHARED, "3w-xxxx", tw_dev); |
2401 | if (retval) { | 2401 | if (retval) { |
2402 | printk(KERN_WARNING "3w-xxxx: Error requesting IRQ."); | 2402 | printk(KERN_WARNING "3w-xxxx: Error requesting IRQ."); |
2403 | goto out_remove_host; | 2403 | goto out_remove_host; |
diff --git a/drivers/scsi/53c7xx.c b/drivers/scsi/53c7xx.c index c9bd0335995d..c690c2b89e41 100644 --- a/drivers/scsi/53c7xx.c +++ b/drivers/scsi/53c7xx.c | |||
@@ -1070,7 +1070,7 @@ NCR53c7x0_init (struct Scsi_Host *host) { | |||
1070 | 1070 | ||
1071 | NCR53c7x0_driver_init (host); | 1071 | NCR53c7x0_driver_init (host); |
1072 | 1072 | ||
1073 | if (request_irq(host->irq, NCR53c7x0_intr, SA_SHIRQ, "53c7xx", host)) | 1073 | if (request_irq(host->irq, NCR53c7x0_intr, IRQF_SHARED, "53c7xx", host)) |
1074 | { | 1074 | { |
1075 | printk("scsi%d : IRQ%d not free, detaching\n", | 1075 | printk("scsi%d : IRQ%d not free, detaching\n", |
1076 | host->host_no, host->irq); | 1076 | host->host_no, host->irq); |
@@ -4232,7 +4232,7 @@ restart: | |||
4232 | * Purpose : handle NCR53c7x0 interrupts for all NCR devices sharing | 4232 | * Purpose : handle NCR53c7x0 interrupts for all NCR devices sharing |
4233 | * the same IRQ line. | 4233 | * the same IRQ line. |
4234 | * | 4234 | * |
4235 | * Inputs : Since we're using the SA_INTERRUPT interrupt handler | 4235 | * Inputs : Since we're using the IRQF_DISABLED interrupt handler |
4236 | * semantics, irq indicates the interrupt which invoked | 4236 | * semantics, irq indicates the interrupt which invoked |
4237 | * this handler. | 4237 | * this handler. |
4238 | * | 4238 | * |
diff --git a/drivers/scsi/BusLogic.c b/drivers/scsi/BusLogic.c index 259b47ec4f54..16a12a3b7b2b 100644 --- a/drivers/scsi/BusLogic.c +++ b/drivers/scsi/BusLogic.c | |||
@@ -1844,7 +1844,7 @@ static boolean __init BusLogic_AcquireResources(struct BusLogic_HostAdapter *Hos | |||
1844 | /* | 1844 | /* |
1845 | Acquire shared access to the IRQ Channel. | 1845 | Acquire shared access to the IRQ Channel. |
1846 | */ | 1846 | */ |
1847 | if (request_irq(HostAdapter->IRQ_Channel, BusLogic_InterruptHandler, SA_SHIRQ, HostAdapter->FullModelName, HostAdapter) < 0) { | 1847 | if (request_irq(HostAdapter->IRQ_Channel, BusLogic_InterruptHandler, IRQF_SHARED, HostAdapter->FullModelName, HostAdapter) < 0) { |
1848 | BusLogic_Error("UNABLE TO ACQUIRE IRQ CHANNEL %d - DETACHING\n", HostAdapter, HostAdapter->IRQ_Channel); | 1848 | BusLogic_Error("UNABLE TO ACQUIRE IRQ CHANNEL %d - DETACHING\n", HostAdapter, HostAdapter->IRQ_Channel); |
1849 | return false; | 1849 | return false; |
1850 | } | 1850 | } |
diff --git a/drivers/scsi/NCR5380.c b/drivers/scsi/NCR5380.c index 75f2f7ae2a8e..616810ad17d8 100644 --- a/drivers/scsi/NCR5380.c +++ b/drivers/scsi/NCR5380.c | |||
@@ -585,7 +585,7 @@ static int __init NCR5380_probe_irq(struct Scsi_Host *instance, int possible) | |||
585 | NCR5380_setup(instance); | 585 | NCR5380_setup(instance); |
586 | 586 | ||
587 | for (trying_irqs = i = 0, mask = 1; i < 16; ++i, mask <<= 1) | 587 | for (trying_irqs = i = 0, mask = 1; i < 16; ++i, mask <<= 1) |
588 | if ((mask & possible) && (request_irq(i, &probe_intr, SA_INTERRUPT, "NCR-probe", NULL) == 0)) | 588 | if ((mask & possible) && (request_irq(i, &probe_intr, IRQF_DISABLED, "NCR-probe", NULL) == 0)) |
589 | trying_irqs |= mask; | 589 | trying_irqs |= mask; |
590 | 590 | ||
591 | timeout = jiffies + (250 * HZ / 1000); | 591 | timeout = jiffies + (250 * HZ / 1000); |
diff --git a/drivers/scsi/NCR_D700.c b/drivers/scsi/NCR_D700.c index 577e63499778..a06f547e87f7 100644 --- a/drivers/scsi/NCR_D700.c +++ b/drivers/scsi/NCR_D700.c | |||
@@ -320,7 +320,7 @@ NCR_D700_probe(struct device *dev) | |||
320 | memset(p, '\0', sizeof(*p)); | 320 | memset(p, '\0', sizeof(*p)); |
321 | p->dev = dev; | 321 | p->dev = dev; |
322 | snprintf(p->name, sizeof(p->name), "D700(%s)", dev->bus_id); | 322 | snprintf(p->name, sizeof(p->name), "D700(%s)", dev->bus_id); |
323 | if (request_irq(irq, NCR_D700_intr, SA_SHIRQ, p->name, p)) { | 323 | if (request_irq(irq, NCR_D700_intr, IRQF_SHARED, p->name, p)) { |
324 | printk(KERN_ERR "D700: request_irq failed\n"); | 324 | printk(KERN_ERR "D700: request_irq failed\n"); |
325 | kfree(p); | 325 | kfree(p); |
326 | return -EBUSY; | 326 | return -EBUSY; |
diff --git a/drivers/scsi/NCR_Q720.c b/drivers/scsi/NCR_Q720.c index 9d18ec90510f..c39ffbb86e39 100644 --- a/drivers/scsi/NCR_Q720.c +++ b/drivers/scsi/NCR_Q720.c | |||
@@ -265,7 +265,7 @@ NCR_Q720_probe(struct device *dev) | |||
265 | p->irq = irq; | 265 | p->irq = irq; |
266 | p->siops = siops; | 266 | p->siops = siops; |
267 | 267 | ||
268 | if (request_irq(irq, NCR_Q720_intr, SA_SHIRQ, "NCR_Q720", p)) { | 268 | if (request_irq(irq, NCR_Q720_intr, IRQF_SHARED, "NCR_Q720", p)) { |
269 | printk(KERN_ERR "NCR_Q720: request irq %d failed\n", irq); | 269 | printk(KERN_ERR "NCR_Q720: request irq %d failed\n", irq); |
270 | goto out_release; | 270 | goto out_release; |
271 | } | 271 | } |
diff --git a/drivers/scsi/a100u2w.c b/drivers/scsi/a100u2w.c index 3dce21c78737..d7e9fab54c60 100644 --- a/drivers/scsi/a100u2w.c +++ b/drivers/scsi/a100u2w.c | |||
@@ -1120,7 +1120,7 @@ static int __devinit inia100_probe_one(struct pci_dev *pdev, | |||
1120 | shost->sg_tablesize = TOTAL_SG_ENTRY; | 1120 | shost->sg_tablesize = TOTAL_SG_ENTRY; |
1121 | 1121 | ||
1122 | /* Initial orc chip */ | 1122 | /* Initial orc chip */ |
1123 | error = request_irq(pdev->irq, inia100_intr, SA_SHIRQ, | 1123 | error = request_irq(pdev->irq, inia100_intr, IRQF_SHARED, |
1124 | "inia100", shost); | 1124 | "inia100", shost); |
1125 | if (error < 0) { | 1125 | if (error < 0) { |
1126 | printk(KERN_WARNING "inia100: unable to get irq %d\n", | 1126 | printk(KERN_WARNING "inia100: unable to get irq %d\n", |
diff --git a/drivers/scsi/a2091.c b/drivers/scsi/a2091.c index 54996eaae979..fddfa2ebcd70 100644 --- a/drivers/scsi/a2091.c +++ b/drivers/scsi/a2091.c | |||
@@ -208,7 +208,7 @@ int __init a2091_detect(struct scsi_host_template *tpnt) | |||
208 | regs.SASR = &(DMA(instance)->SASR); | 208 | regs.SASR = &(DMA(instance)->SASR); |
209 | regs.SCMD = &(DMA(instance)->SCMD); | 209 | regs.SCMD = &(DMA(instance)->SCMD); |
210 | wd33c93_init(instance, regs, dma_setup, dma_stop, WD33C93_FS_8_10); | 210 | wd33c93_init(instance, regs, dma_setup, dma_stop, WD33C93_FS_8_10); |
211 | request_irq(IRQ_AMIGA_PORTS, a2091_intr, SA_SHIRQ, "A2091 SCSI", | 211 | request_irq(IRQ_AMIGA_PORTS, a2091_intr, IRQF_SHARED, "A2091 SCSI", |
212 | instance); | 212 | instance); |
213 | DMA(instance)->CNTR = CNTR_PDMD | CNTR_INTEN; | 213 | DMA(instance)->CNTR = CNTR_PDMD | CNTR_INTEN; |
214 | num_a2091++; | 214 | num_a2091++; |
diff --git a/drivers/scsi/a3000.c b/drivers/scsi/a3000.c index f425d424bf08..ae9ab4b136ac 100644 --- a/drivers/scsi/a3000.c +++ b/drivers/scsi/a3000.c | |||
@@ -190,7 +190,7 @@ int __init a3000_detect(struct scsi_host_template *tpnt) | |||
190 | regs.SASR = &(DMA(a3000_host)->SASR); | 190 | regs.SASR = &(DMA(a3000_host)->SASR); |
191 | regs.SCMD = &(DMA(a3000_host)->SCMD); | 191 | regs.SCMD = &(DMA(a3000_host)->SCMD); |
192 | wd33c93_init(a3000_host, regs, dma_setup, dma_stop, WD33C93_FS_12_15); | 192 | wd33c93_init(a3000_host, regs, dma_setup, dma_stop, WD33C93_FS_12_15); |
193 | if (request_irq(IRQ_AMIGA_PORTS, a3000_intr, SA_SHIRQ, "A3000 SCSI", | 193 | if (request_irq(IRQ_AMIGA_PORTS, a3000_intr, IRQF_SHARED, "A3000 SCSI", |
194 | a3000_intr)) | 194 | a3000_intr)) |
195 | goto fail_irq; | 195 | goto fail_irq; |
196 | DMA(a3000_host)->CNTR = CNTR_PDMD | CNTR_INTEN; | 196 | DMA(a3000_host)->CNTR = CNTR_PDMD | CNTR_INTEN; |
diff --git a/drivers/scsi/aacraid/rkt.c b/drivers/scsi/aacraid/rkt.c index 5b52966bbbf3..458ea897fd72 100644 --- a/drivers/scsi/aacraid/rkt.c +++ b/drivers/scsi/aacraid/rkt.c | |||
@@ -453,7 +453,7 @@ int aac_rkt_init(struct aac_dev *dev) | |||
453 | } | 453 | } |
454 | msleep(1); | 454 | msleep(1); |
455 | } | 455 | } |
456 | if (request_irq(dev->scsi_host_ptr->irq, aac_rkt_intr, SA_SHIRQ|SA_INTERRUPT, "aacraid", (void *)dev)<0) | 456 | if (request_irq(dev->scsi_host_ptr->irq, aac_rkt_intr, IRQF_SHARED|IRQF_DISABLED, "aacraid", (void *)dev)<0) |
457 | { | 457 | { |
458 | printk(KERN_ERR "%s%d: Interrupt unavailable.\n", name, instance); | 458 | printk(KERN_ERR "%s%d: Interrupt unavailable.\n", name, instance); |
459 | goto error_iounmap; | 459 | goto error_iounmap; |
diff --git a/drivers/scsi/aacraid/rx.c b/drivers/scsi/aacraid/rx.c index 9dadfb28b3f1..035018db69b1 100644 --- a/drivers/scsi/aacraid/rx.c +++ b/drivers/scsi/aacraid/rx.c | |||
@@ -453,7 +453,7 @@ int aac_rx_init(struct aac_dev *dev) | |||
453 | } | 453 | } |
454 | msleep(1); | 454 | msleep(1); |
455 | } | 455 | } |
456 | if (request_irq(dev->scsi_host_ptr->irq, aac_rx_intr, SA_SHIRQ|SA_INTERRUPT, "aacraid", (void *)dev)<0) | 456 | if (request_irq(dev->scsi_host_ptr->irq, aac_rx_intr, IRQF_SHARED|IRQF_DISABLED, "aacraid", (void *)dev)<0) |
457 | { | 457 | { |
458 | printk(KERN_ERR "%s%d: Interrupt unavailable.\n", name, instance); | 458 | printk(KERN_ERR "%s%d: Interrupt unavailable.\n", name, instance); |
459 | goto error_iounmap; | 459 | goto error_iounmap; |
diff --git a/drivers/scsi/aacraid/sa.c b/drivers/scsi/aacraid/sa.c index 88d400fccc94..cd586cc8f9be 100644 --- a/drivers/scsi/aacraid/sa.c +++ b/drivers/scsi/aacraid/sa.c | |||
@@ -327,7 +327,7 @@ int aac_sa_init(struct aac_dev *dev) | |||
327 | msleep(1); | 327 | msleep(1); |
328 | } | 328 | } |
329 | 329 | ||
330 | if (request_irq(dev->scsi_host_ptr->irq, aac_sa_intr, SA_SHIRQ|SA_INTERRUPT, "aacraid", (void *)dev ) < 0) { | 330 | if (request_irq(dev->scsi_host_ptr->irq, aac_sa_intr, IRQF_SHARED|IRQF_DISABLED, "aacraid", (void *)dev ) < 0) { |
331 | printk(KERN_WARNING "%s%d: Interrupt unavailable.\n", name, instance); | 331 | printk(KERN_WARNING "%s%d: Interrupt unavailable.\n", name, instance); |
332 | goto error_iounmap; | 332 | goto error_iounmap; |
333 | } | 333 | } |
diff --git a/drivers/scsi/advansys.c b/drivers/scsi/advansys.c index 537136457ea0..e32b4ab2f8fb 100644 --- a/drivers/scsi/advansys.c +++ b/drivers/scsi/advansys.c | |||
@@ -371,7 +371,7 @@ | |||
371 | 371 | ||
372 | 1.5 (8/8/96): | 372 | 1.5 (8/8/96): |
373 | 1. Add support for ABP-940U (PCI Ultra) adapter. | 373 | 1. Add support for ABP-940U (PCI Ultra) adapter. |
374 | 2. Add support for IRQ sharing by setting the SA_SHIRQ flag for | 374 | 2. Add support for IRQ sharing by setting the IRQF_SHARED flag for |
375 | request_irq and supplying a dev_id pointer to both request_irq() | 375 | request_irq and supplying a dev_id pointer to both request_irq() |
376 | and free_irq(). | 376 | and free_irq(). |
377 | 3. In AscSearchIOPortAddr11() restore a call to check_region() which | 377 | 3. In AscSearchIOPortAddr11() restore a call to check_region() which |
@@ -504,9 +504,9 @@ | |||
504 | 3. For v2.1.93 and newer kernels use CONFIG_PCI and new PCI BIOS | 504 | 3. For v2.1.93 and newer kernels use CONFIG_PCI and new PCI BIOS |
505 | access functions. | 505 | access functions. |
506 | 4. Update board serial number printing. | 506 | 4. Update board serial number printing. |
507 | 5. Try allocating an IRQ both with and without the SA_INTERRUPT | 507 | 5. Try allocating an IRQ both with and without the IRQF_DISABLED |
508 | flag set to allow IRQ sharing with drivers that do not set | 508 | flag set to allow IRQ sharing with drivers that do not set |
509 | the SA_INTERRUPT flag. Also display a more descriptive error | 509 | the IRQF_DISABLED flag. Also display a more descriptive error |
510 | message if request_irq() fails. | 510 | message if request_irq() fails. |
511 | 6. Update to latest Asc and Adv Libraries. | 511 | 6. Update to latest Asc and Adv Libraries. |
512 | 512 | ||
@@ -5202,19 +5202,19 @@ advansys_detect(struct scsi_host_template *tpnt) | |||
5202 | /* Register IRQ Number. */ | 5202 | /* Register IRQ Number. */ |
5203 | ASC_DBG1(2, "advansys_detect: request_irq() %d\n", shp->irq); | 5203 | ASC_DBG1(2, "advansys_detect: request_irq() %d\n", shp->irq); |
5204 | /* | 5204 | /* |
5205 | * If request_irq() fails with the SA_INTERRUPT flag set, | 5205 | * If request_irq() fails with the IRQF_DISABLED flag set, |
5206 | * then try again without the SA_INTERRUPT flag set. This | 5206 | * then try again without the IRQF_DISABLED flag set. This |
5207 | * allows IRQ sharing to work even with other drivers that | 5207 | * allows IRQ sharing to work even with other drivers that |
5208 | * do not set the SA_INTERRUPT flag. | 5208 | * do not set the IRQF_DISABLED flag. |
5209 | * | 5209 | * |
5210 | * If SA_INTERRUPT is not set, then interrupts are enabled | 5210 | * If IRQF_DISABLED is not set, then interrupts are enabled |
5211 | * before the driver interrupt function is called. | 5211 | * before the driver interrupt function is called. |
5212 | */ | 5212 | */ |
5213 | if (((ret = request_irq(shp->irq, advansys_interrupt, | 5213 | if (((ret = request_irq(shp->irq, advansys_interrupt, |
5214 | SA_INTERRUPT | (share_irq == TRUE ? SA_SHIRQ : 0), | 5214 | IRQF_DISABLED | (share_irq == TRUE ? IRQF_SHARED : 0), |
5215 | "advansys", boardp)) != 0) && | 5215 | "advansys", boardp)) != 0) && |
5216 | ((ret = request_irq(shp->irq, advansys_interrupt, | 5216 | ((ret = request_irq(shp->irq, advansys_interrupt, |
5217 | (share_irq == TRUE ? SA_SHIRQ : 0), | 5217 | (share_irq == TRUE ? IRQF_SHARED : 0), |
5218 | "advansys", boardp)) != 0)) | 5218 | "advansys", boardp)) != 0)) |
5219 | { | 5219 | { |
5220 | if (ret == -EBUSY) { | 5220 | if (ret == -EBUSY) { |
diff --git a/drivers/scsi/aha152x.c b/drivers/scsi/aha152x.c index de80cdfb5b9d..36e63f82d9f8 100644 --- a/drivers/scsi/aha152x.c +++ b/drivers/scsi/aha152x.c | |||
@@ -855,7 +855,7 @@ struct Scsi_Host *aha152x_probe_one(struct aha152x_setup *setup) | |||
855 | SETPORT(SIMODE0, 0); | 855 | SETPORT(SIMODE0, 0); |
856 | SETPORT(SIMODE1, 0); | 856 | SETPORT(SIMODE1, 0); |
857 | 857 | ||
858 | if( request_irq(shpnt->irq, swintr, SA_INTERRUPT|SA_SHIRQ, "aha152x", shpnt) ) { | 858 | if( request_irq(shpnt->irq, swintr, IRQF_DISABLED|IRQF_SHARED, "aha152x", shpnt) ) { |
859 | printk(KERN_ERR "aha152x%d: irq %d busy.\n", shpnt->host_no, shpnt->irq); | 859 | printk(KERN_ERR "aha152x%d: irq %d busy.\n", shpnt->host_no, shpnt->irq); |
860 | goto out_host_put; | 860 | goto out_host_put; |
861 | } | 861 | } |
@@ -889,7 +889,7 @@ struct Scsi_Host *aha152x_probe_one(struct aha152x_setup *setup) | |||
889 | SETPORT(SSTAT0, 0x7f); | 889 | SETPORT(SSTAT0, 0x7f); |
890 | SETPORT(SSTAT1, 0xef); | 890 | SETPORT(SSTAT1, 0xef); |
891 | 891 | ||
892 | if ( request_irq(shpnt->irq, intr, SA_INTERRUPT|SA_SHIRQ, "aha152x", shpnt) ) { | 892 | if ( request_irq(shpnt->irq, intr, IRQF_DISABLED|IRQF_SHARED, "aha152x", shpnt) ) { |
893 | printk(KERN_ERR "aha152x%d: failed to reassign irq %d.\n", shpnt->host_no, shpnt->irq); | 893 | printk(KERN_ERR "aha152x%d: failed to reassign irq %d.\n", shpnt->host_no, shpnt->irq); |
894 | goto out_host_put; | 894 | goto out_host_put; |
895 | } | 895 | } |
diff --git a/drivers/scsi/aha1740.c b/drivers/scsi/aha1740.c index 4b8c6a543925..0e4a7ebe300a 100644 --- a/drivers/scsi/aha1740.c +++ b/drivers/scsi/aha1740.c | |||
@@ -634,7 +634,7 @@ static int aha1740_probe (struct device *dev) | |||
634 | } | 634 | } |
635 | 635 | ||
636 | DEB(printk("aha1740_probe: enable interrupt channel %d\n",irq_level)); | 636 | DEB(printk("aha1740_probe: enable interrupt channel %d\n",irq_level)); |
637 | if (request_irq(irq_level,aha1740_intr_handle,irq_type ? 0 : SA_SHIRQ, | 637 | if (request_irq(irq_level,aha1740_intr_handle,irq_type ? 0 : IRQF_SHARED, |
638 | "aha1740",shpnt)) { | 638 | "aha1740",shpnt)) { |
639 | printk(KERN_ERR "aha1740_probe: Unable to allocate IRQ %d.\n", | 639 | printk(KERN_ERR "aha1740_probe: Unable to allocate IRQ %d.\n", |
640 | irq_level); | 640 | irq_level); |
diff --git a/drivers/scsi/ahci.c b/drivers/scsi/ahci.c index f05946777718..15f6cd4279b7 100644 --- a/drivers/scsi/ahci.c +++ b/drivers/scsi/ahci.c | |||
@@ -1371,7 +1371,7 @@ static int ahci_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) | |||
1371 | probe_ent->port_ops = ahci_port_info[board_idx].port_ops; | 1371 | probe_ent->port_ops = ahci_port_info[board_idx].port_ops; |
1372 | 1372 | ||
1373 | probe_ent->irq = pdev->irq; | 1373 | probe_ent->irq = pdev->irq; |
1374 | probe_ent->irq_flags = SA_SHIRQ; | 1374 | probe_ent->irq_flags = IRQF_SHARED; |
1375 | probe_ent->mmio_base = mmio_base; | 1375 | probe_ent->mmio_base = mmio_base; |
1376 | probe_ent->private_data = hpriv; | 1376 | probe_ent->private_data = hpriv; |
1377 | 1377 | ||
diff --git a/drivers/scsi/aic7xxx/aic7770_osm.c b/drivers/scsi/aic7xxx/aic7770_osm.c index d754b3267863..867cbe23579b 100644 --- a/drivers/scsi/aic7xxx/aic7770_osm.c +++ b/drivers/scsi/aic7xxx/aic7770_osm.c | |||
@@ -65,7 +65,7 @@ aic7770_map_int(struct ahc_softc *ahc, u_int irq) | |||
65 | 65 | ||
66 | shared = 0; | 66 | shared = 0; |
67 | if ((ahc->flags & AHC_EDGE_INTERRUPT) == 0) | 67 | if ((ahc->flags & AHC_EDGE_INTERRUPT) == 0) |
68 | shared = SA_SHIRQ; | 68 | shared = IRQF_SHARED; |
69 | 69 | ||
70 | error = request_irq(irq, ahc_linux_isr, shared, "aic7xxx", ahc); | 70 | error = request_irq(irq, ahc_linux_isr, shared, "aic7xxx", ahc); |
71 | if (error == 0) | 71 | if (error == 0) |
diff --git a/drivers/scsi/aic7xxx/aic79xx_osm_pci.c b/drivers/scsi/aic7xxx/aic79xx_osm_pci.c index ebbf7e4ff4cc..50a41eda580e 100644 --- a/drivers/scsi/aic7xxx/aic79xx_osm_pci.c +++ b/drivers/scsi/aic7xxx/aic79xx_osm_pci.c | |||
@@ -342,7 +342,7 @@ ahd_pci_map_int(struct ahd_softc *ahd) | |||
342 | int error; | 342 | int error; |
343 | 343 | ||
344 | error = request_irq(ahd->dev_softc->irq, ahd_linux_isr, | 344 | error = request_irq(ahd->dev_softc->irq, ahd_linux_isr, |
345 | SA_SHIRQ, "aic79xx", ahd); | 345 | IRQF_SHARED, "aic79xx", ahd); |
346 | if (!error) | 346 | if (!error) |
347 | ahd->platform_data->irq = ahd->dev_softc->irq; | 347 | ahd->platform_data->irq = ahd->dev_softc->irq; |
348 | 348 | ||
diff --git a/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c b/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c index 0c9c2f400bf6..7e42f07a27f3 100644 --- a/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c +++ b/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c | |||
@@ -375,7 +375,7 @@ ahc_pci_map_int(struct ahc_softc *ahc) | |||
375 | int error; | 375 | int error; |
376 | 376 | ||
377 | error = request_irq(ahc->dev_softc->irq, ahc_linux_isr, | 377 | error = request_irq(ahc->dev_softc->irq, ahc_linux_isr, |
378 | SA_SHIRQ, "aic7xxx", ahc); | 378 | IRQF_SHARED, "aic7xxx", ahc); |
379 | if (error == 0) | 379 | if (error == 0) |
380 | ahc->platform_data->irq = ahc->dev_softc->irq; | 380 | ahc->platform_data->irq = ahc->dev_softc->irq; |
381 | 381 | ||
diff --git a/drivers/scsi/aic7xxx_old.c b/drivers/scsi/aic7xxx_old.c index 5dba1c63122e..3f85b5e978f1 100644 --- a/drivers/scsi/aic7xxx_old.c +++ b/drivers/scsi/aic7xxx_old.c | |||
@@ -8322,11 +8322,11 @@ aic7xxx_register(struct scsi_host_template *template, struct aic7xxx_host *p, | |||
8322 | } | 8322 | } |
8323 | else | 8323 | else |
8324 | { | 8324 | { |
8325 | result = (request_irq(p->irq, do_aic7xxx_isr, SA_SHIRQ, | 8325 | result = (request_irq(p->irq, do_aic7xxx_isr, IRQF_SHARED, |
8326 | "aic7xxx", p)); | 8326 | "aic7xxx", p)); |
8327 | if (result < 0) | 8327 | if (result < 0) |
8328 | { | 8328 | { |
8329 | result = (request_irq(p->irq, do_aic7xxx_isr, SA_INTERRUPT | SA_SHIRQ, | 8329 | result = (request_irq(p->irq, do_aic7xxx_isr, IRQF_DISABLED | IRQF_SHARED, |
8330 | "aic7xxx", p)); | 8330 | "aic7xxx", p)); |
8331 | } | 8331 | } |
8332 | } | 8332 | } |
diff --git a/drivers/scsi/arm/acornscsi.c b/drivers/scsi/arm/acornscsi.c index 1b9900b58956..7621e3fa37b1 100644 --- a/drivers/scsi/arm/acornscsi.c +++ b/drivers/scsi/arm/acornscsi.c | |||
@@ -3030,7 +3030,7 @@ acornscsi_probe(struct expansion_card *ec, const struct ecard_id *id) | |||
3030 | if (!request_region(host->io_port, 2048, "acornscsi(ram)")) | 3030 | if (!request_region(host->io_port, 2048, "acornscsi(ram)")) |
3031 | goto err_5; | 3031 | goto err_5; |
3032 | 3032 | ||
3033 | ret = request_irq(host->irq, acornscsi_intr, SA_INTERRUPT, "acornscsi", ashost); | 3033 | ret = request_irq(host->irq, acornscsi_intr, IRQF_DISABLED, "acornscsi", ashost); |
3034 | if (ret) { | 3034 | if (ret) { |
3035 | printk(KERN_CRIT "scsi%d: IRQ%d not free: %d\n", | 3035 | printk(KERN_CRIT "scsi%d: IRQ%d not free: %d\n", |
3036 | host->host_no, ashost->scsi.irq, ret); | 3036 | host->host_no, ashost->scsi.irq, ret); |
diff --git a/drivers/scsi/arm/cumana_1.c b/drivers/scsi/arm/cumana_1.c index e6c9491dc5c0..3bdfc36481ae 100644 --- a/drivers/scsi/arm/cumana_1.c +++ b/drivers/scsi/arm/cumana_1.c | |||
@@ -277,7 +277,7 @@ cumanascsi1_probe(struct expansion_card *ec, const struct ecard_id *id) | |||
277 | ((struct NCR5380_hostdata *)host->hostdata)->ctrl = 0; | 277 | ((struct NCR5380_hostdata *)host->hostdata)->ctrl = 0; |
278 | outb(0x00, host->io_port - 577); | 278 | outb(0x00, host->io_port - 577); |
279 | 279 | ||
280 | ret = request_irq(host->irq, cumanascsi_intr, SA_INTERRUPT, | 280 | ret = request_irq(host->irq, cumanascsi_intr, IRQF_DISABLED, |
281 | "CumanaSCSI-1", host); | 281 | "CumanaSCSI-1", host); |
282 | if (ret) { | 282 | if (ret) { |
283 | printk("scsi%d: IRQ%d not free: %d\n", | 283 | printk("scsi%d: IRQ%d not free: %d\n", |
diff --git a/drivers/scsi/arm/cumana_2.c b/drivers/scsi/arm/cumana_2.c index fad2109268bb..719af0dcc0e5 100644 --- a/drivers/scsi/arm/cumana_2.c +++ b/drivers/scsi/arm/cumana_2.c | |||
@@ -460,7 +460,7 @@ cumanascsi2_probe(struct expansion_card *ec, const struct ecard_id *id) | |||
460 | goto out_free; | 460 | goto out_free; |
461 | 461 | ||
462 | ret = request_irq(ec->irq, cumanascsi_2_intr, | 462 | ret = request_irq(ec->irq, cumanascsi_2_intr, |
463 | SA_INTERRUPT, "cumanascsi2", info); | 463 | IRQF_DISABLED, "cumanascsi2", info); |
464 | if (ret) { | 464 | if (ret) { |
465 | printk("scsi%d: IRQ%d not free: %d\n", | 465 | printk("scsi%d: IRQ%d not free: %d\n", |
466 | host->host_no, ec->irq, ret); | 466 | host->host_no, ec->irq, ret); |
diff --git a/drivers/scsi/arm/powertec.c b/drivers/scsi/arm/powertec.c index 3d69f6c45a6b..b2c346a47052 100644 --- a/drivers/scsi/arm/powertec.c +++ b/drivers/scsi/arm/powertec.c | |||
@@ -373,7 +373,7 @@ powertecscsi_probe(struct expansion_card *ec, const struct ecard_id *id) | |||
373 | goto out_free; | 373 | goto out_free; |
374 | 374 | ||
375 | ret = request_irq(ec->irq, powertecscsi_intr, | 375 | ret = request_irq(ec->irq, powertecscsi_intr, |
376 | SA_INTERRUPT, "powertec", info); | 376 | IRQF_DISABLED, "powertec", info); |
377 | if (ret) { | 377 | if (ret) { |
378 | printk("scsi%d: IRQ%d not free: %d\n", | 378 | printk("scsi%d: IRQ%d not free: %d\n", |
379 | host->host_no, ec->irq, ret); | 379 | host->host_no, ec->irq, ret); |
diff --git a/drivers/scsi/atp870u.c b/drivers/scsi/atp870u.c index 3ee4d4d3f445..412f8301b757 100644 --- a/drivers/scsi/atp870u.c +++ b/drivers/scsi/atp870u.c | |||
@@ -2751,7 +2751,7 @@ flash_ok_880: | |||
2751 | goto unregister; | 2751 | goto unregister; |
2752 | } | 2752 | } |
2753 | 2753 | ||
2754 | if (request_irq(pdev->irq, atp870u_intr_handle, SA_SHIRQ, "atp880i", shpnt)) { | 2754 | if (request_irq(pdev->irq, atp870u_intr_handle, IRQF_SHARED, "atp880i", shpnt)) { |
2755 | printk(KERN_ERR "Unable to allocate IRQ%d for Acard controller.\n", pdev->irq); | 2755 | printk(KERN_ERR "Unable to allocate IRQ%d for Acard controller.\n", pdev->irq); |
2756 | goto free_tables; | 2756 | goto free_tables; |
2757 | } | 2757 | } |
@@ -2822,7 +2822,7 @@ flash_ok_880: | |||
2822 | #ifdef ED_DBGP | 2822 | #ifdef ED_DBGP |
2823 | printk("request_irq() shpnt %p hostdata %p\n", shpnt, p); | 2823 | printk("request_irq() shpnt %p hostdata %p\n", shpnt, p); |
2824 | #endif | 2824 | #endif |
2825 | if (request_irq(pdev->irq, atp870u_intr_handle, SA_SHIRQ, "atp870u", shpnt)) { | 2825 | if (request_irq(pdev->irq, atp870u_intr_handle, IRQF_SHARED, "atp870u", shpnt)) { |
2826 | printk(KERN_ERR "Unable to allocate IRQ for Acard controller.\n"); | 2826 | printk(KERN_ERR "Unable to allocate IRQ for Acard controller.\n"); |
2827 | goto free_tables; | 2827 | goto free_tables; |
2828 | } | 2828 | } |
@@ -3004,7 +3004,7 @@ flash_ok_885: | |||
3004 | if (atp870u_init_tables(shpnt) < 0) | 3004 | if (atp870u_init_tables(shpnt) < 0) |
3005 | goto unregister; | 3005 | goto unregister; |
3006 | 3006 | ||
3007 | if (request_irq(pdev->irq, atp870u_intr_handle, SA_SHIRQ, "atp870i", shpnt)) { | 3007 | if (request_irq(pdev->irq, atp870u_intr_handle, IRQF_SHARED, "atp870i", shpnt)) { |
3008 | printk(KERN_ERR "Unable to allocate IRQ%d for Acard controller.\n", pdev->irq); | 3008 | printk(KERN_ERR "Unable to allocate IRQ%d for Acard controller.\n", pdev->irq); |
3009 | goto free_tables; | 3009 | goto free_tables; |
3010 | } | 3010 | } |
diff --git a/drivers/scsi/blz1230.c b/drivers/scsi/blz1230.c index 3867ac2de4c2..329a8f297b31 100644 --- a/drivers/scsi/blz1230.c +++ b/drivers/scsi/blz1230.c | |||
@@ -172,7 +172,7 @@ int __init blz1230_esp_detect(struct scsi_host_template *tpnt) | |||
172 | 172 | ||
173 | esp->irq = IRQ_AMIGA_PORTS; | 173 | esp->irq = IRQ_AMIGA_PORTS; |
174 | esp->slot = board+REAL_BLZ1230_ESP_ADDR; | 174 | esp->slot = board+REAL_BLZ1230_ESP_ADDR; |
175 | if (request_irq(IRQ_AMIGA_PORTS, esp_intr, SA_SHIRQ, | 175 | if (request_irq(IRQ_AMIGA_PORTS, esp_intr, IRQF_SHARED, |
176 | "Blizzard 1230 SCSI IV", esp->ehost)) | 176 | "Blizzard 1230 SCSI IV", esp->ehost)) |
177 | goto err_out; | 177 | goto err_out; |
178 | 178 | ||
diff --git a/drivers/scsi/blz2060.c b/drivers/scsi/blz2060.c index 4ebe69e32756..b6c137b97350 100644 --- a/drivers/scsi/blz2060.c +++ b/drivers/scsi/blz2060.c | |||
@@ -146,7 +146,7 @@ int __init blz2060_esp_detect(struct scsi_host_template *tpnt) | |||
146 | esp->esp_command_dvma = virt_to_bus((void *)cmd_buffer); | 146 | esp->esp_command_dvma = virt_to_bus((void *)cmd_buffer); |
147 | 147 | ||
148 | esp->irq = IRQ_AMIGA_PORTS; | 148 | esp->irq = IRQ_AMIGA_PORTS; |
149 | request_irq(IRQ_AMIGA_PORTS, esp_intr, SA_SHIRQ, | 149 | request_irq(IRQ_AMIGA_PORTS, esp_intr, IRQF_SHARED, |
150 | "Blizzard 2060 SCSI", esp->ehost); | 150 | "Blizzard 2060 SCSI", esp->ehost); |
151 | 151 | ||
152 | /* Figure out our scsi ID on the bus */ | 152 | /* Figure out our scsi ID on the bus */ |
diff --git a/drivers/scsi/cyberstorm.c b/drivers/scsi/cyberstorm.c index a4a4fac5c0a1..7c7cfb54e897 100644 --- a/drivers/scsi/cyberstorm.c +++ b/drivers/scsi/cyberstorm.c | |||
@@ -172,7 +172,7 @@ int __init cyber_esp_detect(struct scsi_host_template *tpnt) | |||
172 | esp->esp_command_dvma = virt_to_bus((void *)cmd_buffer); | 172 | esp->esp_command_dvma = virt_to_bus((void *)cmd_buffer); |
173 | 173 | ||
174 | esp->irq = IRQ_AMIGA_PORTS; | 174 | esp->irq = IRQ_AMIGA_PORTS; |
175 | request_irq(IRQ_AMIGA_PORTS, esp_intr, SA_SHIRQ, | 175 | request_irq(IRQ_AMIGA_PORTS, esp_intr, IRQF_SHARED, |
176 | "CyberStorm SCSI", esp->ehost); | 176 | "CyberStorm SCSI", esp->ehost); |
177 | /* Figure out our scsi ID on the bus */ | 177 | /* Figure out our scsi ID on the bus */ |
178 | /* The DMA cond flag contains a hardcoded jumper bit | 178 | /* The DMA cond flag contains a hardcoded jumper bit |
diff --git a/drivers/scsi/cyberstormII.c b/drivers/scsi/cyberstormII.c index 3a803d73bc5f..d88cb9cf091e 100644 --- a/drivers/scsi/cyberstormII.c +++ b/drivers/scsi/cyberstormII.c | |||
@@ -153,7 +153,7 @@ int __init cyberII_esp_detect(struct scsi_host_template *tpnt) | |||
153 | esp->esp_command_dvma = virt_to_bus((void *)cmd_buffer); | 153 | esp->esp_command_dvma = virt_to_bus((void *)cmd_buffer); |
154 | 154 | ||
155 | esp->irq = IRQ_AMIGA_PORTS; | 155 | esp->irq = IRQ_AMIGA_PORTS; |
156 | request_irq(IRQ_AMIGA_PORTS, esp_intr, SA_SHIRQ, | 156 | request_irq(IRQ_AMIGA_PORTS, esp_intr, IRQF_SHARED, |
157 | "CyberStorm SCSI Mk II", esp->ehost); | 157 | "CyberStorm SCSI Mk II", esp->ehost); |
158 | 158 | ||
159 | /* Figure out our scsi ID on the bus */ | 159 | /* Figure out our scsi ID on the bus */ |
diff --git a/drivers/scsi/dc395x.c b/drivers/scsi/dc395x.c index 58b0748045ee..ff2b1796fa34 100644 --- a/drivers/scsi/dc395x.c +++ b/drivers/scsi/dc395x.c | |||
@@ -4562,7 +4562,7 @@ static int __devinit adapter_init(struct AdapterCtlBlk *acb, | |||
4562 | acb->io_port_base = io_port; | 4562 | acb->io_port_base = io_port; |
4563 | acb->io_port_len = io_port_len; | 4563 | acb->io_port_len = io_port_len; |
4564 | 4564 | ||
4565 | if (request_irq(irq, dc395x_interrupt, SA_SHIRQ, DC395X_NAME, acb)) { | 4565 | if (request_irq(irq, dc395x_interrupt, IRQF_SHARED, DC395X_NAME, acb)) { |
4566 | /* release the region we just claimed */ | 4566 | /* release the region we just claimed */ |
4567 | dprintkl(KERN_INFO, "Failed to register IRQ\n"); | 4567 | dprintkl(KERN_INFO, "Failed to register IRQ\n"); |
4568 | goto failed; | 4568 | goto failed; |
diff --git a/drivers/scsi/dec_esp.c b/drivers/scsi/dec_esp.c index a35ee43a48df..eb32062f7e68 100644 --- a/drivers/scsi/dec_esp.c +++ b/drivers/scsi/dec_esp.c | |||
@@ -202,19 +202,19 @@ static int dec_esp_detect(struct scsi_host_template * tpnt) | |||
202 | 202 | ||
203 | esp_initialize(esp); | 203 | esp_initialize(esp); |
204 | 204 | ||
205 | if (request_irq(esp->irq, esp_intr, SA_INTERRUPT, | 205 | if (request_irq(esp->irq, esp_intr, IRQF_DISABLED, |
206 | "ncr53c94", esp->ehost)) | 206 | "ncr53c94", esp->ehost)) |
207 | goto err_dealloc; | 207 | goto err_dealloc; |
208 | if (request_irq(dec_interrupt[DEC_IRQ_ASC_MERR], | 208 | if (request_irq(dec_interrupt[DEC_IRQ_ASC_MERR], |
209 | scsi_dma_merr_int, SA_INTERRUPT, | 209 | scsi_dma_merr_int, IRQF_DISABLED, |
210 | "ncr53c94 error", esp->ehost)) | 210 | "ncr53c94 error", esp->ehost)) |
211 | goto err_free_irq; | 211 | goto err_free_irq; |
212 | if (request_irq(dec_interrupt[DEC_IRQ_ASC_ERR], | 212 | if (request_irq(dec_interrupt[DEC_IRQ_ASC_ERR], |
213 | scsi_dma_err_int, SA_INTERRUPT, | 213 | scsi_dma_err_int, IRQF_DISABLED, |
214 | "ncr53c94 overrun", esp->ehost)) | 214 | "ncr53c94 overrun", esp->ehost)) |
215 | goto err_free_irq_merr; | 215 | goto err_free_irq_merr; |
216 | if (request_irq(dec_interrupt[DEC_IRQ_ASC_DMA], | 216 | if (request_irq(dec_interrupt[DEC_IRQ_ASC_DMA], |
217 | scsi_dma_int, SA_INTERRUPT, | 217 | scsi_dma_int, IRQF_DISABLED, |
218 | "ncr53c94 dma", esp->ehost)) | 218 | "ncr53c94 dma", esp->ehost)) |
219 | goto err_free_irq_err; | 219 | goto err_free_irq_err; |
220 | 220 | ||
@@ -276,7 +276,7 @@ static int dec_esp_detect(struct scsi_host_template * tpnt) | |||
276 | esp->dma_mmu_release_scsi_sgl = 0; | 276 | esp->dma_mmu_release_scsi_sgl = 0; |
277 | esp->dma_advance_sg = 0; | 277 | esp->dma_advance_sg = 0; |
278 | 278 | ||
279 | if (request_irq(esp->irq, esp_intr, SA_INTERRUPT, | 279 | if (request_irq(esp->irq, esp_intr, IRQF_DISABLED, |
280 | "PMAZ_AA", esp->ehost)) { | 280 | "PMAZ_AA", esp->ehost)) { |
281 | esp_deallocate(esp); | 281 | esp_deallocate(esp); |
282 | release_tc_card(slot); | 282 | release_tc_card(slot); |
diff --git a/drivers/scsi/dmx3191d.c b/drivers/scsi/dmx3191d.c index 38e4010eff96..879a26657676 100644 --- a/drivers/scsi/dmx3191d.c +++ b/drivers/scsi/dmx3191d.c | |||
@@ -94,7 +94,7 @@ static int __devinit dmx3191d_probe_one(struct pci_dev *pdev, | |||
94 | 94 | ||
95 | NCR5380_init(shost, FLAG_NO_PSEUDO_DMA | FLAG_DTC3181E); | 95 | NCR5380_init(shost, FLAG_NO_PSEUDO_DMA | FLAG_DTC3181E); |
96 | 96 | ||
97 | if (request_irq(pdev->irq, NCR5380_intr, SA_SHIRQ, | 97 | if (request_irq(pdev->irq, NCR5380_intr, IRQF_SHARED, |
98 | DMX3191D_DRIVER_NAME, shost)) { | 98 | DMX3191D_DRIVER_NAME, shost)) { |
99 | /* | 99 | /* |
100 | * Steam powered scsi controllers run without an IRQ anyway | 100 | * Steam powered scsi controllers run without an IRQ anyway |
diff --git a/drivers/scsi/dpt_i2o.c b/drivers/scsi/dpt_i2o.c index b1b704a42efd..e1337339cacc 100644 --- a/drivers/scsi/dpt_i2o.c +++ b/drivers/scsi/dpt_i2o.c | |||
@@ -1009,7 +1009,7 @@ static int adpt_install_hba(struct scsi_host_template* sht, struct pci_dev* pDev | |||
1009 | printk(KERN_INFO" BAR1 %p - size= %x\n",msg_addr_virt,hba_map1_area_size); | 1009 | printk(KERN_INFO" BAR1 %p - size= %x\n",msg_addr_virt,hba_map1_area_size); |
1010 | } | 1010 | } |
1011 | 1011 | ||
1012 | if (request_irq (pDev->irq, adpt_isr, SA_SHIRQ, pHba->name, pHba)) { | 1012 | if (request_irq (pDev->irq, adpt_isr, IRQF_SHARED, pHba->name, pHba)) { |
1013 | printk(KERN_ERR"%s: Couldn't register IRQ %d\n", pHba->name, pDev->irq); | 1013 | printk(KERN_ERR"%s: Couldn't register IRQ %d\n", pHba->name, pDev->irq); |
1014 | adpt_i2o_delete_hba(pHba); | 1014 | adpt_i2o_delete_hba(pHba); |
1015 | return -EINVAL; | 1015 | return -EINVAL; |
diff --git a/drivers/scsi/dtc.c b/drivers/scsi/dtc.c index c5108c8c887b..0d5713dfa204 100644 --- a/drivers/scsi/dtc.c +++ b/drivers/scsi/dtc.c | |||
@@ -280,7 +280,7 @@ found: | |||
280 | /* With interrupts enabled, it will sometimes hang when doing heavy | 280 | /* With interrupts enabled, it will sometimes hang when doing heavy |
281 | * reads. So better not enable them until I finger it out. */ | 281 | * reads. So better not enable them until I finger it out. */ |
282 | if (instance->irq != SCSI_IRQ_NONE) | 282 | if (instance->irq != SCSI_IRQ_NONE) |
283 | if (request_irq(instance->irq, dtc_intr, SA_INTERRUPT, "dtc", instance)) { | 283 | if (request_irq(instance->irq, dtc_intr, IRQF_DISABLED, "dtc", instance)) { |
284 | printk(KERN_ERR "scsi%d : IRQ%d not free, interrupts disabled\n", instance->host_no, instance->irq); | 284 | printk(KERN_ERR "scsi%d : IRQ%d not free, interrupts disabled\n", instance->host_no, instance->irq); |
285 | instance->irq = SCSI_IRQ_NONE; | 285 | instance->irq = SCSI_IRQ_NONE; |
286 | } | 286 | } |
diff --git a/drivers/scsi/eata.c b/drivers/scsi/eata.c index 67c419402d8a..a5ff43b1b263 100644 --- a/drivers/scsi/eata.c +++ b/drivers/scsi/eata.c | |||
@@ -1221,7 +1221,7 @@ static int port_detect(unsigned long port_base, unsigned int j, | |||
1221 | 1221 | ||
1222 | /* Board detected, allocate its IRQ */ | 1222 | /* Board detected, allocate its IRQ */ |
1223 | if (request_irq(irq, do_interrupt_handler, | 1223 | if (request_irq(irq, do_interrupt_handler, |
1224 | SA_INTERRUPT | ((subversion == ESA) ? SA_SHIRQ : 0), | 1224 | IRQF_DISABLED | ((subversion == ESA) ? IRQF_SHARED : 0), |
1225 | driver_name, (void *)&sha[j])) { | 1225 | driver_name, (void *)&sha[j])) { |
1226 | printk("%s: unable to allocate IRQ %u, detaching.\n", name, | 1226 | printk("%s: unable to allocate IRQ %u, detaching.\n", name, |
1227 | irq); | 1227 | irq); |
diff --git a/drivers/scsi/eata_pio.c b/drivers/scsi/eata_pio.c index d8c9ec21e0ef..771b01984cbc 100644 --- a/drivers/scsi/eata_pio.c +++ b/drivers/scsi/eata_pio.c | |||
@@ -731,7 +731,7 @@ static int register_pio_HBA(long base, struct get_conf *gc) | |||
731 | return 0; | 731 | return 0; |
732 | 732 | ||
733 | if (!reg_IRQ[gc->IRQ]) { /* Interrupt already registered ? */ | 733 | if (!reg_IRQ[gc->IRQ]) { /* Interrupt already registered ? */ |
734 | if (!request_irq(gc->IRQ, do_eata_pio_int_handler, SA_INTERRUPT, "EATA-PIO", sh)) { | 734 | if (!request_irq(gc->IRQ, do_eata_pio_int_handler, IRQF_DISABLED, "EATA-PIO", sh)) { |
735 | reg_IRQ[gc->IRQ]++; | 735 | reg_IRQ[gc->IRQ]++; |
736 | if (!gc->IRQ_TR) | 736 | if (!gc->IRQ_TR) |
737 | reg_IRQL[gc->IRQ] = 1; /* IRQ is edge triggered */ | 737 | reg_IRQL[gc->IRQ] = 1; /* IRQ is edge triggered */ |
@@ -965,7 +965,7 @@ static int eata_pio_detect(struct scsi_host_template *tpnt) | |||
965 | 965 | ||
966 | for (i = 0; i <= MAXIRQ; i++) | 966 | for (i = 0; i <= MAXIRQ; i++) |
967 | if (reg_IRQ[i]) | 967 | if (reg_IRQ[i]) |
968 | request_irq(i, do_eata_pio_int_handler, SA_INTERRUPT, "EATA-PIO", NULL); | 968 | request_irq(i, do_eata_pio_int_handler, IRQF_DISABLED, "EATA-PIO", NULL); |
969 | 969 | ||
970 | HBA_ptr = first_HBA; | 970 | HBA_ptr = first_HBA; |
971 | 971 | ||
diff --git a/drivers/scsi/esp.c b/drivers/scsi/esp.c index 36c50b61f94d..10573c24a50b 100644 --- a/drivers/scsi/esp.c +++ b/drivers/scsi/esp.c | |||
@@ -778,7 +778,7 @@ static int __init esp_register_irq(struct esp *esp) | |||
778 | * sanely maintain. | 778 | * sanely maintain. |
779 | */ | 779 | */ |
780 | if (request_irq(esp->ehost->irq, esp_intr, | 780 | if (request_irq(esp->ehost->irq, esp_intr, |
781 | SA_SHIRQ, "ESP SCSI", esp)) { | 781 | IRQF_SHARED, "ESP SCSI", esp)) { |
782 | printk("esp%d: Cannot acquire irq line\n", | 782 | printk("esp%d: Cannot acquire irq line\n", |
783 | esp->esp_id); | 783 | esp->esp_id); |
784 | return -1; | 784 | return -1; |
diff --git a/drivers/scsi/fastlane.c b/drivers/scsi/fastlane.c index 8ae9c406a83b..2a1c5c22b9e0 100644 --- a/drivers/scsi/fastlane.c +++ b/drivers/scsi/fastlane.c | |||
@@ -210,7 +210,7 @@ int __init fastlane_esp_detect(struct scsi_host_template *tpnt) | |||
210 | 210 | ||
211 | esp->irq = IRQ_AMIGA_PORTS; | 211 | esp->irq = IRQ_AMIGA_PORTS; |
212 | esp->slot = board+FASTLANE_ESP_ADDR; | 212 | esp->slot = board+FASTLANE_ESP_ADDR; |
213 | if (request_irq(IRQ_AMIGA_PORTS, esp_intr, SA_SHIRQ, | 213 | if (request_irq(IRQ_AMIGA_PORTS, esp_intr, IRQF_SHARED, |
214 | "Fastlane SCSI", esp->ehost)) { | 214 | "Fastlane SCSI", esp->ehost)) { |
215 | printk(KERN_WARNING "Fastlane: Could not get IRQ%d, aborting.\n", IRQ_AMIGA_PORTS); | 215 | printk(KERN_WARNING "Fastlane: Could not get IRQ%d, aborting.\n", IRQ_AMIGA_PORTS); |
216 | goto err_unmap; | 216 | goto err_unmap; |
diff --git a/drivers/scsi/fd_mcs.c b/drivers/scsi/fd_mcs.c index 70a1606bd580..dde3edf35c03 100644 --- a/drivers/scsi/fd_mcs.c +++ b/drivers/scsi/fd_mcs.c | |||
@@ -400,7 +400,7 @@ static int fd_mcs_detect(struct scsi_host_template * tpnt) | |||
400 | mca_set_adapter_name(slot - 1, fd_mcs_adapters[loop].name); | 400 | mca_set_adapter_name(slot - 1, fd_mcs_adapters[loop].name); |
401 | 401 | ||
402 | /* check irq/region */ | 402 | /* check irq/region */ |
403 | if (request_irq(irq, fd_mcs_intr, SA_SHIRQ, "fd_mcs", hosts)) { | 403 | if (request_irq(irq, fd_mcs_intr, IRQF_SHARED, "fd_mcs", hosts)) { |
404 | printk(KERN_ERR "fd_mcs: interrupt is not available, skipping...\n"); | 404 | printk(KERN_ERR "fd_mcs: interrupt is not available, skipping...\n"); |
405 | continue; | 405 | continue; |
406 | } | 406 | } |
diff --git a/drivers/scsi/fdomain.c b/drivers/scsi/fdomain.c index 03356887202d..b0694dcce246 100644 --- a/drivers/scsi/fdomain.c +++ b/drivers/scsi/fdomain.c | |||
@@ -949,7 +949,7 @@ struct Scsi_Host *__fdomain_16x0_detect(struct scsi_host_template *tpnt ) | |||
949 | /* Register the IRQ with the kernel */ | 949 | /* Register the IRQ with the kernel */ |
950 | 950 | ||
951 | retcode = request_irq( interrupt_level, | 951 | retcode = request_irq( interrupt_level, |
952 | do_fdomain_16x0_intr, pdev?SA_SHIRQ:0, "fdomain", shpnt); | 952 | do_fdomain_16x0_intr, pdev?IRQF_SHARED:0, "fdomain", shpnt); |
953 | 953 | ||
954 | if (retcode < 0) { | 954 | if (retcode < 0) { |
955 | if (retcode == -EINVAL) { | 955 | if (retcode == -EINVAL) { |
diff --git a/drivers/scsi/g_NCR5380.c b/drivers/scsi/g_NCR5380.c index fbc8e16c8d15..67f1100f3103 100644 --- a/drivers/scsi/g_NCR5380.c +++ b/drivers/scsi/g_NCR5380.c | |||
@@ -461,7 +461,7 @@ int __init generic_NCR5380_detect(struct scsi_host_template * tpnt) | |||
461 | instance->irq = NCR5380_probe_irq(instance, 0xffff); | 461 | instance->irq = NCR5380_probe_irq(instance, 0xffff); |
462 | 462 | ||
463 | if (instance->irq != SCSI_IRQ_NONE) | 463 | if (instance->irq != SCSI_IRQ_NONE) |
464 | if (request_irq(instance->irq, generic_NCR5380_intr, SA_INTERRUPT, "NCR5380", instance)) { | 464 | if (request_irq(instance->irq, generic_NCR5380_intr, IRQF_DISABLED, "NCR5380", instance)) { |
465 | printk(KERN_WARNING "scsi%d : IRQ%d not free, interrupts disabled\n", instance->host_no, instance->irq); | 465 | printk(KERN_WARNING "scsi%d : IRQ%d not free, interrupts disabled\n", instance->host_no, instance->irq); |
466 | instance->irq = SCSI_IRQ_NONE; | 466 | instance->irq = SCSI_IRQ_NONE; |
467 | } | 467 | } |
diff --git a/drivers/scsi/gdth.c b/drivers/scsi/gdth.c index 76071a158306..43afd476e606 100644 --- a/drivers/scsi/gdth.c +++ b/drivers/scsi/gdth.c | |||
@@ -4350,7 +4350,7 @@ static int __init gdth_detect(Scsi_Host_Template *shtp) | |||
4350 | printk("Configuring GDT-ISA HA at BIOS 0x%05X IRQ %u DRQ %u\n", | 4350 | printk("Configuring GDT-ISA HA at BIOS 0x%05X IRQ %u DRQ %u\n", |
4351 | isa_bios,ha->irq,ha->drq); | 4351 | isa_bios,ha->irq,ha->drq); |
4352 | 4352 | ||
4353 | if (request_irq(ha->irq,gdth_interrupt,SA_INTERRUPT,"gdth",ha)) { | 4353 | if (request_irq(ha->irq,gdth_interrupt,IRQF_DISABLED,"gdth",ha)) { |
4354 | printk("GDT-ISA: Unable to allocate IRQ\n"); | 4354 | printk("GDT-ISA: Unable to allocate IRQ\n"); |
4355 | scsi_unregister(shp); | 4355 | scsi_unregister(shp); |
4356 | continue; | 4356 | continue; |
@@ -4476,7 +4476,7 @@ static int __init gdth_detect(Scsi_Host_Template *shtp) | |||
4476 | printk("Configuring GDT-EISA HA at Slot %d IRQ %u\n", | 4476 | printk("Configuring GDT-EISA HA at Slot %d IRQ %u\n", |
4477 | eisa_slot>>12,ha->irq); | 4477 | eisa_slot>>12,ha->irq); |
4478 | 4478 | ||
4479 | if (request_irq(ha->irq,gdth_interrupt,SA_INTERRUPT,"gdth",ha)) { | 4479 | if (request_irq(ha->irq,gdth_interrupt,IRQF_DISABLED,"gdth",ha)) { |
4480 | printk("GDT-EISA: Unable to allocate IRQ\n"); | 4480 | printk("GDT-EISA: Unable to allocate IRQ\n"); |
4481 | scsi_unregister(shp); | 4481 | scsi_unregister(shp); |
4482 | continue; | 4482 | continue; |
@@ -4603,7 +4603,7 @@ static int __init gdth_detect(Scsi_Host_Template *shtp) | |||
4603 | pcistr[ctr].bus,PCI_SLOT(pcistr[ctr].device_fn),ha->irq); | 4603 | pcistr[ctr].bus,PCI_SLOT(pcistr[ctr].device_fn),ha->irq); |
4604 | 4604 | ||
4605 | if (request_irq(ha->irq, gdth_interrupt, | 4605 | if (request_irq(ha->irq, gdth_interrupt, |
4606 | SA_INTERRUPT|SA_SHIRQ, "gdth", ha)) | 4606 | IRQF_DISABLED|IRQF_SHARED, "gdth", ha)) |
4607 | { | 4607 | { |
4608 | printk("GDT-PCI: Unable to allocate IRQ\n"); | 4608 | printk("GDT-PCI: Unable to allocate IRQ\n"); |
4609 | scsi_unregister(shp); | 4609 | scsi_unregister(shp); |
diff --git a/drivers/scsi/gvp11.c b/drivers/scsi/gvp11.c index 5b154498056d..a0d831b1bada 100644 --- a/drivers/scsi/gvp11.c +++ b/drivers/scsi/gvp11.c | |||
@@ -328,7 +328,7 @@ int __init gvp11_detect(struct scsi_host_template *tpnt) | |||
328 | (epc & GVP_SCSICLKMASK) ? WD33C93_FS_8_10 | 328 | (epc & GVP_SCSICLKMASK) ? WD33C93_FS_8_10 |
329 | : WD33C93_FS_12_15); | 329 | : WD33C93_FS_12_15); |
330 | 330 | ||
331 | request_irq(IRQ_AMIGA_PORTS, gvp11_intr, SA_SHIRQ, "GVP11 SCSI", | 331 | request_irq(IRQ_AMIGA_PORTS, gvp11_intr, IRQF_SHARED, "GVP11 SCSI", |
332 | instance); | 332 | instance); |
333 | DMA(instance)->CNTR = GVP11_DMAC_INT_ENABLE; | 333 | DMA(instance)->CNTR = GVP11_DMAC_INT_ENABLE; |
334 | num_gvp11++; | 334 | num_gvp11++; |
diff --git a/drivers/scsi/hptiop.c b/drivers/scsi/hptiop.c index f77808329e7c..ab2f8b267908 100644 --- a/drivers/scsi/hptiop.c +++ b/drivers/scsi/hptiop.c | |||
@@ -1304,7 +1304,7 @@ static int __devinit hptiop_probe(struct pci_dev *pcidev, | |||
1304 | 1304 | ||
1305 | pci_set_drvdata(pcidev, host); | 1305 | pci_set_drvdata(pcidev, host); |
1306 | 1306 | ||
1307 | if (request_irq(pcidev->irq, hptiop_intr, SA_SHIRQ, | 1307 | if (request_irq(pcidev->irq, hptiop_intr, IRQF_SHARED, |
1308 | driver_name, hba)) { | 1308 | driver_name, hba)) { |
1309 | printk(KERN_ERR "scsi%d: request irq %d failed\n", | 1309 | printk(KERN_ERR "scsi%d: request irq %d failed\n", |
1310 | hba->host->host_no, pcidev->irq); | 1310 | hba->host->host_no, pcidev->irq); |
diff --git a/drivers/scsi/ibmmca.c b/drivers/scsi/ibmmca.c index 1cbc94842cc6..2be1dc5d852a 100644 --- a/drivers/scsi/ibmmca.c +++ b/drivers/scsi/ibmmca.c | |||
@@ -1510,7 +1510,7 @@ int ibmmca_detect(struct scsi_host_template * scsi_template) | |||
1510 | #endif | 1510 | #endif |
1511 | 1511 | ||
1512 | /* get interrupt request level */ | 1512 | /* get interrupt request level */ |
1513 | if (request_irq(IM_IRQ, interrupt_handler, SA_SHIRQ, "ibmmcascsi", hosts)) { | 1513 | if (request_irq(IM_IRQ, interrupt_handler, IRQF_SHARED, "ibmmcascsi", hosts)) { |
1514 | printk(KERN_ERR "IBM MCA SCSI: Unable to get shared IRQ %d.\n", IM_IRQ); | 1514 | printk(KERN_ERR "IBM MCA SCSI: Unable to get shared IRQ %d.\n", IM_IRQ); |
1515 | return 0; | 1515 | return 0; |
1516 | } else | 1516 | } else |
@@ -1635,7 +1635,7 @@ int ibmmca_detect(struct scsi_host_template * scsi_template) | |||
1635 | /* IRQ11 is used by SCSI-2 F/W Adapter/A */ | 1635 | /* IRQ11 is used by SCSI-2 F/W Adapter/A */ |
1636 | printk(KERN_DEBUG "IBM MCA SCSI: SCSI-2 F/W adapter needs IRQ 11.\n"); | 1636 | printk(KERN_DEBUG "IBM MCA SCSI: SCSI-2 F/W adapter needs IRQ 11.\n"); |
1637 | /* get interrupt request level */ | 1637 | /* get interrupt request level */ |
1638 | if (request_irq(IM_IRQ_FW, interrupt_handler, SA_SHIRQ, "ibmmcascsi", hosts)) { | 1638 | if (request_irq(IM_IRQ_FW, interrupt_handler, IRQF_SHARED, "ibmmcascsi", hosts)) { |
1639 | printk(KERN_ERR "IBM MCA SCSI: Unable to get shared IRQ %d.\n", IM_IRQ_FW); | 1639 | printk(KERN_ERR "IBM MCA SCSI: Unable to get shared IRQ %d.\n", IM_IRQ_FW); |
1640 | } else | 1640 | } else |
1641 | IRQ11_registered++; | 1641 | IRQ11_registered++; |
@@ -1696,7 +1696,7 @@ int ibmmca_detect(struct scsi_host_template * scsi_template) | |||
1696 | /* IRQ11 is used by SCSI-2 F/W Adapter/A */ | 1696 | /* IRQ11 is used by SCSI-2 F/W Adapter/A */ |
1697 | printk(KERN_DEBUG "IBM MCA SCSI: SCSI-2 F/W adapter needs IRQ 11.\n"); | 1697 | printk(KERN_DEBUG "IBM MCA SCSI: SCSI-2 F/W adapter needs IRQ 11.\n"); |
1698 | /* get interrupt request level */ | 1698 | /* get interrupt request level */ |
1699 | if (request_irq(IM_IRQ_FW, interrupt_handler, SA_SHIRQ, "ibmmcascsi", hosts)) | 1699 | if (request_irq(IM_IRQ_FW, interrupt_handler, IRQF_SHARED, "ibmmcascsi", hosts)) |
1700 | printk(KERN_ERR "IBM MCA SCSI: Unable to get shared IRQ %d.\n", IM_IRQ_FW); | 1700 | printk(KERN_ERR "IBM MCA SCSI: Unable to get shared IRQ %d.\n", IM_IRQ_FW); |
1701 | else | 1701 | else |
1702 | IRQ11_registered++; | 1702 | IRQ11_registered++; |
diff --git a/drivers/scsi/in2000.c b/drivers/scsi/in2000.c index 883bc92b4d9a..59a4097f1254 100644 --- a/drivers/scsi/in2000.c +++ b/drivers/scsi/in2000.c | |||
@@ -2015,7 +2015,7 @@ static int __init in2000_detect(struct scsi_host_template * tpnt) | |||
2015 | write1_io(0, IO_FIFO_READ); /* start fifo out in read mode */ | 2015 | write1_io(0, IO_FIFO_READ); /* start fifo out in read mode */ |
2016 | write1_io(0, IO_INTR_MASK); /* allow all ints */ | 2016 | write1_io(0, IO_INTR_MASK); /* allow all ints */ |
2017 | x = int_tab[(switches & (SW_INT0 | SW_INT1)) >> SW_INT_SHIFT]; | 2017 | x = int_tab[(switches & (SW_INT0 | SW_INT1)) >> SW_INT_SHIFT]; |
2018 | if (request_irq(x, in2000_intr, SA_INTERRUPT, "in2000", instance)) { | 2018 | if (request_irq(x, in2000_intr, IRQF_DISABLED, "in2000", instance)) { |
2019 | printk("in2000_detect: Unable to allocate IRQ.\n"); | 2019 | printk("in2000_detect: Unable to allocate IRQ.\n"); |
2020 | detect_count--; | 2020 | detect_count--; |
2021 | continue; | 2021 | continue; |
diff --git a/drivers/scsi/initio.c b/drivers/scsi/initio.c index 43acb1fe90b4..9e10dac61cfd 100644 --- a/drivers/scsi/initio.c +++ b/drivers/scsi/initio.c | |||
@@ -2867,7 +2867,7 @@ static int i91u_detect(struct scsi_host_template * tpnt) | |||
2867 | hreg->sg_tablesize = TOTAL_SG_ENTRY; /* Maximun support is 32 */ | 2867 | hreg->sg_tablesize = TOTAL_SG_ENTRY; /* Maximun support is 32 */ |
2868 | 2868 | ||
2869 | /* Initial tulip chip */ | 2869 | /* Initial tulip chip */ |
2870 | ok = request_irq(pHCB->HCS_Intr, i91u_intr, SA_INTERRUPT | SA_SHIRQ, "i91u", hreg); | 2870 | ok = request_irq(pHCB->HCS_Intr, i91u_intr, IRQF_DISABLED | IRQF_SHARED, "i91u", hreg); |
2871 | if (ok < 0) { | 2871 | if (ok < 0) { |
2872 | printk(KERN_WARNING "i91u: unable to request IRQ %d\n\n", pHCB->HCS_Intr); | 2872 | printk(KERN_WARNING "i91u: unable to request IRQ %d\n\n", pHCB->HCS_Intr); |
2873 | return 0; | 2873 | return 0; |
diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c index e19bf690cdf1..01080b3acf5e 100644 --- a/drivers/scsi/ipr.c +++ b/drivers/scsi/ipr.c | |||
@@ -6428,7 +6428,7 @@ static int __devinit ipr_probe_ioa(struct pci_dev *pdev, | |||
6428 | ioa_cfg->needs_hard_reset = 1; | 6428 | ioa_cfg->needs_hard_reset = 1; |
6429 | 6429 | ||
6430 | ipr_mask_and_clear_interrupts(ioa_cfg, ~IPR_PCII_IOA_TRANS_TO_OPER); | 6430 | ipr_mask_and_clear_interrupts(ioa_cfg, ~IPR_PCII_IOA_TRANS_TO_OPER); |
6431 | rc = request_irq(pdev->irq, ipr_isr, SA_SHIRQ, IPR_NAME, ioa_cfg); | 6431 | rc = request_irq(pdev->irq, ipr_isr, IRQF_SHARED, IPR_NAME, ioa_cfg); |
6432 | 6432 | ||
6433 | if (rc) { | 6433 | if (rc) { |
6434 | dev_err(&pdev->dev, "Couldn't register IRQ %d! rc=%d\n", | 6434 | dev_err(&pdev->dev, "Couldn't register IRQ %d! rc=%d\n", |
diff --git a/drivers/scsi/ips.c b/drivers/scsi/ips.c index 7436793c3ad3..3c639286ec1e 100644 --- a/drivers/scsi/ips.c +++ b/drivers/scsi/ips.c | |||
@@ -7007,7 +7007,7 @@ ips_register_scsi(int index) | |||
7007 | memcpy(ha, oldha, sizeof (ips_ha_t)); | 7007 | memcpy(ha, oldha, sizeof (ips_ha_t)); |
7008 | free_irq(oldha->irq, oldha); | 7008 | free_irq(oldha->irq, oldha); |
7009 | /* Install the interrupt handler with the new ha */ | 7009 | /* Install the interrupt handler with the new ha */ |
7010 | if (request_irq(ha->irq, do_ipsintr, SA_SHIRQ, ips_name, ha)) { | 7010 | if (request_irq(ha->irq, do_ipsintr, IRQF_SHARED, ips_name, ha)) { |
7011 | IPS_PRINTK(KERN_WARNING, ha->pcidev, | 7011 | IPS_PRINTK(KERN_WARNING, ha->pcidev, |
7012 | "Unable to install interrupt handler\n"); | 7012 | "Unable to install interrupt handler\n"); |
7013 | scsi_host_put(sh); | 7013 | scsi_host_put(sh); |
@@ -7419,7 +7419,7 @@ ips_init_phase2(int index) | |||
7419 | } | 7419 | } |
7420 | 7420 | ||
7421 | /* Install the interrupt handler */ | 7421 | /* Install the interrupt handler */ |
7422 | if (request_irq(ha->irq, do_ipsintr, SA_SHIRQ, ips_name, ha)) { | 7422 | if (request_irq(ha->irq, do_ipsintr, IRQF_SHARED, ips_name, ha)) { |
7423 | IPS_PRINTK(KERN_WARNING, ha->pcidev, | 7423 | IPS_PRINTK(KERN_WARNING, ha->pcidev, |
7424 | "Unable to install interrupt handler\n"); | 7424 | "Unable to install interrupt handler\n"); |
7425 | return ips_abort_init(ha, index); | 7425 | return ips_abort_init(ha, index); |
diff --git a/drivers/scsi/jazz_esp.c b/drivers/scsi/jazz_esp.c index fc031c76dade..3fd8a96f2af3 100644 --- a/drivers/scsi/jazz_esp.c +++ b/drivers/scsi/jazz_esp.c | |||
@@ -131,7 +131,7 @@ static int jazz_esp_detect(struct scsi_host_template *tpnt) | |||
131 | esp->esp_command_dvma = vdma_alloc(CPHYSADDR(cmd_buffer), sizeof (cmd_buffer)); | 131 | esp->esp_command_dvma = vdma_alloc(CPHYSADDR(cmd_buffer), sizeof (cmd_buffer)); |
132 | 132 | ||
133 | esp->irq = JAZZ_SCSI_IRQ; | 133 | esp->irq = JAZZ_SCSI_IRQ; |
134 | request_irq(JAZZ_SCSI_IRQ, esp_intr, SA_INTERRUPT, "JAZZ SCSI", | 134 | request_irq(JAZZ_SCSI_IRQ, esp_intr, IRQF_DISABLED, "JAZZ SCSI", |
135 | esp->ehost); | 135 | esp->ehost); |
136 | 136 | ||
137 | /* | 137 | /* |
diff --git a/drivers/scsi/lasi700.c b/drivers/scsi/lasi700.c index eb7bd310cc82..f0871c3ac3d9 100644 --- a/drivers/scsi/lasi700.c +++ b/drivers/scsi/lasi700.c | |||
@@ -131,7 +131,7 @@ lasi700_probe(struct parisc_device *dev) | |||
131 | host->this_id = 7; | 131 | host->this_id = 7; |
132 | host->base = base; | 132 | host->base = base; |
133 | host->irq = dev->irq; | 133 | host->irq = dev->irq; |
134 | if(request_irq(dev->irq, NCR_700_intr, SA_SHIRQ, "lasi700", host)) { | 134 | if(request_irq(dev->irq, NCR_700_intr, IRQF_SHARED, "lasi700", host)) { |
135 | printk(KERN_ERR "lasi700: request_irq failed!\n"); | 135 | printk(KERN_ERR "lasi700: request_irq failed!\n"); |
136 | goto out_put_host; | 136 | goto out_put_host; |
137 | } | 137 | } |
diff --git a/drivers/scsi/libata-bmdma.c b/drivers/scsi/libata-bmdma.c index 38bfebf4fe8f..9ce221f25954 100644 --- a/drivers/scsi/libata-bmdma.c +++ b/drivers/scsi/libata-bmdma.c | |||
@@ -853,7 +853,7 @@ ata_pci_init_native_mode(struct pci_dev *pdev, struct ata_port_info **port, int | |||
853 | return NULL; | 853 | return NULL; |
854 | 854 | ||
855 | probe_ent->irq = pdev->irq; | 855 | probe_ent->irq = pdev->irq; |
856 | probe_ent->irq_flags = SA_SHIRQ; | 856 | probe_ent->irq_flags = IRQF_SHARED; |
857 | probe_ent->private_data = port[0]->private_data; | 857 | probe_ent->private_data = port[0]->private_data; |
858 | 858 | ||
859 | if (ports & ATA_PORT_PRIMARY) { | 859 | if (ports & ATA_PORT_PRIMARY) { |
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c index 908d0f27706f..5a28d9bf8e4d 100644 --- a/drivers/scsi/lpfc/lpfc_init.c +++ b/drivers/scsi/lpfc/lpfc_init.c | |||
@@ -1620,7 +1620,7 @@ lpfc_pci_probe_one(struct pci_dev *pdev, const struct pci_device_id *pid) | |||
1620 | if (error) | 1620 | if (error) |
1621 | goto out_remove_host; | 1621 | goto out_remove_host; |
1622 | 1622 | ||
1623 | error = request_irq(phba->pcidev->irq, lpfc_intr_handler, SA_SHIRQ, | 1623 | error = request_irq(phba->pcidev->irq, lpfc_intr_handler, IRQF_SHARED, |
1624 | LPFC_DRIVER_NAME, phba); | 1624 | LPFC_DRIVER_NAME, phba); |
1625 | if (error) { | 1625 | if (error) { |
1626 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 1626 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, |
diff --git a/drivers/scsi/megaraid.c b/drivers/scsi/megaraid.c index 5d2cefb5e52d..76edbb639d37 100644 --- a/drivers/scsi/megaraid.c +++ b/drivers/scsi/megaraid.c | |||
@@ -4714,7 +4714,7 @@ megaraid_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) | |||
4714 | 4714 | ||
4715 | if (request_irq(irq, (adapter->flag & BOARD_MEMMAP) ? | 4715 | if (request_irq(irq, (adapter->flag & BOARD_MEMMAP) ? |
4716 | megaraid_isr_memmapped : megaraid_isr_iomapped, | 4716 | megaraid_isr_memmapped : megaraid_isr_iomapped, |
4717 | SA_SHIRQ, "megaraid", adapter)) { | 4717 | IRQF_SHARED, "megaraid", adapter)) { |
4718 | printk(KERN_WARNING | 4718 | printk(KERN_WARNING |
4719 | "megaraid: Couldn't register IRQ %d!\n", irq); | 4719 | "megaraid: Couldn't register IRQ %d!\n", irq); |
4720 | goto out_free_scb_list; | 4720 | goto out_free_scb_list; |
diff --git a/drivers/scsi/megaraid/megaraid_mbox.c b/drivers/scsi/megaraid/megaraid_mbox.c index b7caf60638e8..92715130ac09 100644 --- a/drivers/scsi/megaraid/megaraid_mbox.c +++ b/drivers/scsi/megaraid/megaraid_mbox.c | |||
@@ -767,7 +767,7 @@ megaraid_init_mbox(adapter_t *adapter) | |||
767 | // | 767 | // |
768 | 768 | ||
769 | // request IRQ and register the interrupt service routine | 769 | // request IRQ and register the interrupt service routine |
770 | if (request_irq(adapter->irq, megaraid_isr, SA_SHIRQ, "megaraid", | 770 | if (request_irq(adapter->irq, megaraid_isr, IRQF_SHARED, "megaraid", |
771 | adapter)) { | 771 | adapter)) { |
772 | 772 | ||
773 | con_log(CL_ANN, (KERN_WARNING | 773 | con_log(CL_ANN, (KERN_WARNING |
diff --git a/drivers/scsi/megaraid/megaraid_sas.c b/drivers/scsi/megaraid/megaraid_sas.c index 0c9516ff636f..e5c017ccda59 100644 --- a/drivers/scsi/megaraid/megaraid_sas.c +++ b/drivers/scsi/megaraid/megaraid_sas.c | |||
@@ -2191,7 +2191,7 @@ megasas_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) | |||
2191 | /* | 2191 | /* |
2192 | * Register IRQ | 2192 | * Register IRQ |
2193 | */ | 2193 | */ |
2194 | if (request_irq(pdev->irq, megasas_isr, SA_SHIRQ, "megasas", instance)) { | 2194 | if (request_irq(pdev->irq, megasas_isr, IRQF_SHARED, "megasas", instance)) { |
2195 | printk(KERN_DEBUG "megasas: Failed to register IRQ\n"); | 2195 | printk(KERN_DEBUG "megasas: Failed to register IRQ\n"); |
2196 | goto fail_irq; | 2196 | goto fail_irq; |
2197 | } | 2197 | } |
diff --git a/drivers/scsi/nsp32.c b/drivers/scsi/nsp32.c index 5c55e152e718..bd337a914298 100644 --- a/drivers/scsi/nsp32.c +++ b/drivers/scsi/nsp32.c | |||
@@ -2867,7 +2867,7 @@ static int nsp32_detect(struct scsi_host_template *sht) | |||
2867 | nsp32_do_bus_reset(data); | 2867 | nsp32_do_bus_reset(data); |
2868 | 2868 | ||
2869 | ret = request_irq(host->irq, do_nsp32_isr, | 2869 | ret = request_irq(host->irq, do_nsp32_isr, |
2870 | SA_SHIRQ | SA_SAMPLE_RANDOM, "nsp32", data); | 2870 | IRQF_SHARED | IRQF_SAMPLE_RANDOM, "nsp32", data); |
2871 | if (ret < 0) { | 2871 | if (ret < 0) { |
2872 | nsp32_msg(KERN_ERR, "Unable to allocate IRQ for NinjaSCSI32 " | 2872 | nsp32_msg(KERN_ERR, "Unable to allocate IRQ for NinjaSCSI32 " |
2873 | "SCSI PCI controller. Interrupt: %d", host->irq); | 2873 | "SCSI PCI controller. Interrupt: %d", host->irq); |
diff --git a/drivers/scsi/oktagon_esp.c b/drivers/scsi/oktagon_esp.c index d7a0bcc6c670..dd67a68c5c23 100644 --- a/drivers/scsi/oktagon_esp.c +++ b/drivers/scsi/oktagon_esp.c | |||
@@ -197,7 +197,7 @@ int oktagon_esp_detect(struct scsi_host_template *tpnt) | |||
197 | esp->esp_command_dvma = (__u32) cmd_buffer; | 197 | esp->esp_command_dvma = (__u32) cmd_buffer; |
198 | 198 | ||
199 | esp->irq = IRQ_AMIGA_PORTS; | 199 | esp->irq = IRQ_AMIGA_PORTS; |
200 | request_irq(IRQ_AMIGA_PORTS, esp_intr, SA_SHIRQ, | 200 | request_irq(IRQ_AMIGA_PORTS, esp_intr, IRQF_SHARED, |
201 | "BSC Oktagon SCSI", esp->ehost); | 201 | "BSC Oktagon SCSI", esp->ehost); |
202 | 202 | ||
203 | /* Figure out our scsi ID on the bus */ | 203 | /* Figure out our scsi ID on the bus */ |
diff --git a/drivers/scsi/pas16.c b/drivers/scsi/pas16.c index 1bf96ed8f935..1434209a8ac5 100644 --- a/drivers/scsi/pas16.c +++ b/drivers/scsi/pas16.c | |||
@@ -454,7 +454,7 @@ int __init pas16_detect(struct scsi_host_template * tpnt) | |||
454 | instance->irq = NCR5380_probe_irq(instance, PAS16_IRQS); | 454 | instance->irq = NCR5380_probe_irq(instance, PAS16_IRQS); |
455 | 455 | ||
456 | if (instance->irq != SCSI_IRQ_NONE) | 456 | if (instance->irq != SCSI_IRQ_NONE) |
457 | if (request_irq(instance->irq, pas16_intr, SA_INTERRUPT, "pas16", instance)) { | 457 | if (request_irq(instance->irq, pas16_intr, IRQF_DISABLED, "pas16", instance)) { |
458 | printk("scsi%d : IRQ%d not free, interrupts disabled\n", | 458 | printk("scsi%d : IRQ%d not free, interrupts disabled\n", |
459 | instance->host_no, instance->irq); | 459 | instance->host_no, instance->irq); |
460 | instance->irq = SCSI_IRQ_NONE; | 460 | instance->irq = SCSI_IRQ_NONE; |
diff --git a/drivers/scsi/pcmcia/nsp_cs.c b/drivers/scsi/pcmcia/nsp_cs.c index 231f9c311c69..7ff5851c040b 100644 --- a/drivers/scsi/pcmcia/nsp_cs.c +++ b/drivers/scsi/pcmcia/nsp_cs.c | |||
@@ -1623,7 +1623,7 @@ static int nsp_cs_probe(struct pcmcia_device *link) | |||
1623 | /* Interrupt handler */ | 1623 | /* Interrupt handler */ |
1624 | link->irq.Handler = &nspintr; | 1624 | link->irq.Handler = &nspintr; |
1625 | link->irq.Instance = info; | 1625 | link->irq.Instance = info; |
1626 | link->irq.Attributes |= (SA_SHIRQ | SA_SAMPLE_RANDOM); | 1626 | link->irq.Attributes |= (IRQF_SHARED | IRQF_SAMPLE_RANDOM); |
1627 | 1627 | ||
1628 | /* General socket configuration */ | 1628 | /* General socket configuration */ |
1629 | link->conf.Attributes = CONF_ENABLE_IRQ; | 1629 | link->conf.Attributes = CONF_ENABLE_IRQ; |
diff --git a/drivers/scsi/pcmcia/sym53c500_cs.c b/drivers/scsi/pcmcia/sym53c500_cs.c index 9f59827707f0..0b65099acb1a 100644 --- a/drivers/scsi/pcmcia/sym53c500_cs.c +++ b/drivers/scsi/pcmcia/sym53c500_cs.c | |||
@@ -799,7 +799,7 @@ next_entry: | |||
799 | data = (struct sym53c500_data *)host->hostdata; | 799 | data = (struct sym53c500_data *)host->hostdata; |
800 | 800 | ||
801 | if (irq_level > 0) { | 801 | if (irq_level > 0) { |
802 | if (request_irq(irq_level, SYM53C500_intr, SA_SHIRQ, "SYM53C500", host)) { | 802 | if (request_irq(irq_level, SYM53C500_intr, IRQF_SHARED, "SYM53C500", host)) { |
803 | printk("SYM53C500: unable to allocate IRQ %d\n", irq_level); | 803 | printk("SYM53C500: unable to allocate IRQ %d\n", irq_level); |
804 | goto err_free_scsi; | 804 | goto err_free_scsi; |
805 | } | 805 | } |
diff --git a/drivers/scsi/pdc_adma.c b/drivers/scsi/pdc_adma.c index 7ebe8e03aa96..d1f38c32aa15 100644 --- a/drivers/scsi/pdc_adma.c +++ b/drivers/scsi/pdc_adma.c | |||
@@ -690,7 +690,7 @@ static int adma_ata_init_one(struct pci_dev *pdev, | |||
690 | probe_ent->port_ops = adma_port_info[board_idx].port_ops; | 690 | probe_ent->port_ops = adma_port_info[board_idx].port_ops; |
691 | 691 | ||
692 | probe_ent->irq = pdev->irq; | 692 | probe_ent->irq = pdev->irq; |
693 | probe_ent->irq_flags = SA_SHIRQ; | 693 | probe_ent->irq_flags = IRQF_SHARED; |
694 | probe_ent->mmio_base = mmio_base; | 694 | probe_ent->mmio_base = mmio_base; |
695 | probe_ent->n_ports = ADMA_PORTS; | 695 | probe_ent->n_ports = ADMA_PORTS; |
696 | 696 | ||
diff --git a/drivers/scsi/qla1280.c b/drivers/scsi/qla1280.c index a7e4183462b8..b818b9bfe678 100644 --- a/drivers/scsi/qla1280.c +++ b/drivers/scsi/qla1280.c | |||
@@ -192,7 +192,7 @@ | |||
192 | - Don't walk the entire list in qla1280_putq_t() just to directly | 192 | - Don't walk the entire list in qla1280_putq_t() just to directly |
193 | grab the pointer to the last element afterwards | 193 | grab the pointer to the last element afterwards |
194 | Rev 3.23.5 Beta August 9, 2001, Jes Sorensen | 194 | Rev 3.23.5 Beta August 9, 2001, Jes Sorensen |
195 | - Don't use SA_INTERRUPT, it's use is deprecated for this kinda driver | 195 | - Don't use IRQF_DISABLED, it's use is deprecated for this kinda driver |
196 | Rev 3.23.4 Beta August 8, 2001, Jes Sorensen | 196 | Rev 3.23.4 Beta August 8, 2001, Jes Sorensen |
197 | - Set dev->max_sectors to 1024 | 197 | - Set dev->max_sectors to 1024 |
198 | Rev 3.23.3 Beta August 6, 2001, Jes Sorensen | 198 | Rev 3.23.3 Beta August 6, 2001, Jes Sorensen |
@@ -4369,7 +4369,7 @@ qla1280_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) | |||
4369 | /* Disable ISP interrupts. */ | 4369 | /* Disable ISP interrupts. */ |
4370 | qla1280_disable_intrs(ha); | 4370 | qla1280_disable_intrs(ha); |
4371 | 4371 | ||
4372 | if (request_irq(pdev->irq, qla1280_intr_handler, SA_SHIRQ, | 4372 | if (request_irq(pdev->irq, qla1280_intr_handler, IRQF_SHARED, |
4373 | "qla1280", ha)) { | 4373 | "qla1280", ha)) { |
4374 | printk("qla1280 : Failed to reserve interrupt %d already " | 4374 | printk("qla1280 : Failed to reserve interrupt %d already " |
4375 | "in use\n", pdev->irq); | 4375 | "in use\n", pdev->irq); |
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index ccaad0b08d35..93062593ebe7 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c | |||
@@ -1541,7 +1541,7 @@ static int qla2x00_probe_one(struct pci_dev *pdev) | |||
1541 | host->transportt = qla2xxx_transport_template; | 1541 | host->transportt = qla2xxx_transport_template; |
1542 | 1542 | ||
1543 | ret = request_irq(pdev->irq, ha->isp_ops.intr_handler, | 1543 | ret = request_irq(pdev->irq, ha->isp_ops.intr_handler, |
1544 | SA_INTERRUPT|SA_SHIRQ, QLA2XXX_DRIVER_NAME, ha); | 1544 | IRQF_DISABLED|IRQF_SHARED, QLA2XXX_DRIVER_NAME, ha); |
1545 | if (ret) { | 1545 | if (ret) { |
1546 | qla_printk(KERN_WARNING, ha, | 1546 | qla_printk(KERN_WARNING, ha, |
1547 | "Failed to reserve interrupt %d already in use.\n", | 1547 | "Failed to reserve interrupt %d already in use.\n", |
diff --git a/drivers/scsi/qlogicpti.c b/drivers/scsi/qlogicpti.c index 329ead263714..69e0551a81d2 100644 --- a/drivers/scsi/qlogicpti.c +++ b/drivers/scsi/qlogicpti.c | |||
@@ -718,7 +718,7 @@ static int __init qpti_register_irq(struct qlogicpti *qpti) | |||
718 | * sanely maintain. | 718 | * sanely maintain. |
719 | */ | 719 | */ |
720 | if (request_irq(qpti->irq, qpti_intr, | 720 | if (request_irq(qpti->irq, qpti_intr, |
721 | SA_SHIRQ, "Qlogic/PTI", qpti)) | 721 | IRQF_SHARED, "Qlogic/PTI", qpti)) |
722 | goto fail; | 722 | goto fail; |
723 | 723 | ||
724 | printk("qpti%d: IRQ %d ", qpti->qpti_id, qpti->irq); | 724 | printk("qpti%d: IRQ %d ", qpti->qpti_id, qpti->irq); |
diff --git a/drivers/scsi/sata_mv.c b/drivers/scsi/sata_mv.c index 4a71578df3c1..1053c7c76b7d 100644 --- a/drivers/scsi/sata_mv.c +++ b/drivers/scsi/sata_mv.c | |||
@@ -2395,7 +2395,7 @@ static int mv_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
2395 | probe_ent->port_ops = mv_port_info[board_idx].port_ops; | 2395 | probe_ent->port_ops = mv_port_info[board_idx].port_ops; |
2396 | 2396 | ||
2397 | probe_ent->irq = pdev->irq; | 2397 | probe_ent->irq = pdev->irq; |
2398 | probe_ent->irq_flags = SA_SHIRQ; | 2398 | probe_ent->irq_flags = IRQF_SHARED; |
2399 | probe_ent->mmio_base = mmio_base; | 2399 | probe_ent->mmio_base = mmio_base; |
2400 | probe_ent->private_data = hpriv; | 2400 | probe_ent->private_data = hpriv; |
2401 | 2401 | ||
diff --git a/drivers/scsi/sata_promise.c b/drivers/scsi/sata_promise.c index b2b6ed5216e0..64631bd38952 100644 --- a/drivers/scsi/sata_promise.c +++ b/drivers/scsi/sata_promise.c | |||
@@ -743,7 +743,7 @@ static int pdc_ata_init_one (struct pci_dev *pdev, const struct pci_device_id *e | |||
743 | probe_ent->port_ops = pdc_port_info[board_idx].port_ops; | 743 | probe_ent->port_ops = pdc_port_info[board_idx].port_ops; |
744 | 744 | ||
745 | probe_ent->irq = pdev->irq; | 745 | probe_ent->irq = pdev->irq; |
746 | probe_ent->irq_flags = SA_SHIRQ; | 746 | probe_ent->irq_flags = IRQF_SHARED; |
747 | probe_ent->mmio_base = mmio_base; | 747 | probe_ent->mmio_base = mmio_base; |
748 | 748 | ||
749 | pdc_ata_setup_port(&probe_ent->port[0], base + 0x200); | 749 | pdc_ata_setup_port(&probe_ent->port[0], base + 0x200); |
diff --git a/drivers/scsi/sata_qstor.c b/drivers/scsi/sata_qstor.c index 98ddc25655f0..d374c1db0cf3 100644 --- a/drivers/scsi/sata_qstor.c +++ b/drivers/scsi/sata_qstor.c | |||
@@ -680,7 +680,7 @@ static int qs_ata_init_one(struct pci_dev *pdev, | |||
680 | probe_ent->port_ops = qs_port_info[board_idx].port_ops; | 680 | probe_ent->port_ops = qs_port_info[board_idx].port_ops; |
681 | 681 | ||
682 | probe_ent->irq = pdev->irq; | 682 | probe_ent->irq = pdev->irq; |
683 | probe_ent->irq_flags = SA_SHIRQ; | 683 | probe_ent->irq_flags = IRQF_SHARED; |
684 | probe_ent->mmio_base = mmio_base; | 684 | probe_ent->mmio_base = mmio_base; |
685 | probe_ent->n_ports = QS_PORTS; | 685 | probe_ent->n_ports = QS_PORTS; |
686 | 686 | ||
diff --git a/drivers/scsi/sata_sil.c b/drivers/scsi/sata_sil.c index 51d86d750e84..7aabb45c35e5 100644 --- a/drivers/scsi/sata_sil.c +++ b/drivers/scsi/sata_sil.c | |||
@@ -608,7 +608,7 @@ static int sil_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) | |||
608 | probe_ent->mwdma_mask = sil_port_info[ent->driver_data].mwdma_mask; | 608 | probe_ent->mwdma_mask = sil_port_info[ent->driver_data].mwdma_mask; |
609 | probe_ent->udma_mask = sil_port_info[ent->driver_data].udma_mask; | 609 | probe_ent->udma_mask = sil_port_info[ent->driver_data].udma_mask; |
610 | probe_ent->irq = pdev->irq; | 610 | probe_ent->irq = pdev->irq; |
611 | probe_ent->irq_flags = SA_SHIRQ; | 611 | probe_ent->irq_flags = IRQF_SHARED; |
612 | probe_ent->host_flags = sil_port_info[ent->driver_data].host_flags; | 612 | probe_ent->host_flags = sil_port_info[ent->driver_data].host_flags; |
613 | 613 | ||
614 | mmio_base = pci_iomap(pdev, 5, 0); | 614 | mmio_base = pci_iomap(pdev, 5, 0); |
diff --git a/drivers/scsi/sata_sil24.c b/drivers/scsi/sata_sil24.c index b5f8fa955679..07a1c6a8a414 100644 --- a/drivers/scsi/sata_sil24.c +++ b/drivers/scsi/sata_sil24.c | |||
@@ -1041,7 +1041,7 @@ static int sil24_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
1041 | probe_ent->n_ports = SIL24_FLAG2NPORTS(pinfo->host_flags); | 1041 | probe_ent->n_ports = SIL24_FLAG2NPORTS(pinfo->host_flags); |
1042 | 1042 | ||
1043 | probe_ent->irq = pdev->irq; | 1043 | probe_ent->irq = pdev->irq; |
1044 | probe_ent->irq_flags = SA_SHIRQ; | 1044 | probe_ent->irq_flags = IRQF_SHARED; |
1045 | probe_ent->mmio_base = port_base; | 1045 | probe_ent->mmio_base = port_base; |
1046 | probe_ent->private_data = hpriv; | 1046 | probe_ent->private_data = hpriv; |
1047 | 1047 | ||
diff --git a/drivers/scsi/sata_svw.c b/drivers/scsi/sata_svw.c index a958b45e597c..7d0858095e1f 100644 --- a/drivers/scsi/sata_svw.c +++ b/drivers/scsi/sata_svw.c | |||
@@ -428,7 +428,7 @@ static int k2_sata_init_one (struct pci_dev *pdev, const struct pci_device_id *e | |||
428 | probe_ent->port_ops = &k2_sata_ops; | 428 | probe_ent->port_ops = &k2_sata_ops; |
429 | probe_ent->n_ports = 4; | 429 | probe_ent->n_ports = 4; |
430 | probe_ent->irq = pdev->irq; | 430 | probe_ent->irq = pdev->irq; |
431 | probe_ent->irq_flags = SA_SHIRQ; | 431 | probe_ent->irq_flags = IRQF_SHARED; |
432 | probe_ent->mmio_base = mmio_base; | 432 | probe_ent->mmio_base = mmio_base; |
433 | 433 | ||
434 | /* We don't care much about the PIO/UDMA masks, but the core won't like us | 434 | /* We don't care much about the PIO/UDMA masks, but the core won't like us |
diff --git a/drivers/scsi/sata_sx4.c b/drivers/scsi/sata_sx4.c index 7f864410f7c2..ccc8cad24f7d 100644 --- a/drivers/scsi/sata_sx4.c +++ b/drivers/scsi/sata_sx4.c | |||
@@ -1436,7 +1436,7 @@ static int pdc_sata_init_one (struct pci_dev *pdev, const struct pci_device_id * | |||
1436 | probe_ent->port_ops = pdc_port_info[board_idx].port_ops; | 1436 | probe_ent->port_ops = pdc_port_info[board_idx].port_ops; |
1437 | 1437 | ||
1438 | probe_ent->irq = pdev->irq; | 1438 | probe_ent->irq = pdev->irq; |
1439 | probe_ent->irq_flags = SA_SHIRQ; | 1439 | probe_ent->irq_flags = IRQF_SHARED; |
1440 | probe_ent->mmio_base = mmio_base; | 1440 | probe_ent->mmio_base = mmio_base; |
1441 | 1441 | ||
1442 | probe_ent->private_data = hpriv; | 1442 | probe_ent->private_data = hpriv; |
diff --git a/drivers/scsi/sata_via.c b/drivers/scsi/sata_via.c index 501ce1791782..03baec2191bf 100644 --- a/drivers/scsi/sata_via.c +++ b/drivers/scsi/sata_via.c | |||
@@ -242,7 +242,7 @@ static struct ata_probe_ent *vt6421_init_probe_ent(struct pci_dev *pdev) | |||
242 | probe_ent->port_ops = &svia_sata_ops; | 242 | probe_ent->port_ops = &svia_sata_ops; |
243 | probe_ent->n_ports = N_PORTS; | 243 | probe_ent->n_ports = N_PORTS; |
244 | probe_ent->irq = pdev->irq; | 244 | probe_ent->irq = pdev->irq; |
245 | probe_ent->irq_flags = SA_SHIRQ; | 245 | probe_ent->irq_flags = IRQF_SHARED; |
246 | probe_ent->pio_mask = 0x1f; | 246 | probe_ent->pio_mask = 0x1f; |
247 | probe_ent->mwdma_mask = 0x07; | 247 | probe_ent->mwdma_mask = 0x07; |
248 | probe_ent->udma_mask = 0x7f; | 248 | probe_ent->udma_mask = 0x7f; |
diff --git a/drivers/scsi/sata_vsc.c b/drivers/scsi/sata_vsc.c index 616fd9634b4b..916fe6fba756 100644 --- a/drivers/scsi/sata_vsc.c +++ b/drivers/scsi/sata_vsc.c | |||
@@ -400,7 +400,7 @@ static int __devinit vsc_sata_init_one (struct pci_dev *pdev, const struct pci_d | |||
400 | probe_ent->port_ops = &vsc_sata_ops; | 400 | probe_ent->port_ops = &vsc_sata_ops; |
401 | probe_ent->n_ports = 4; | 401 | probe_ent->n_ports = 4; |
402 | probe_ent->irq = pdev->irq; | 402 | probe_ent->irq = pdev->irq; |
403 | probe_ent->irq_flags = SA_SHIRQ; | 403 | probe_ent->irq_flags = IRQF_SHARED; |
404 | probe_ent->mmio_base = mmio_base; | 404 | probe_ent->mmio_base = mmio_base; |
405 | 405 | ||
406 | /* We don't care much about the PIO/UDMA masks, but the core won't like us | 406 | /* We don't care much about the PIO/UDMA masks, but the core won't like us |
diff --git a/drivers/scsi/seagate.c b/drivers/scsi/seagate.c index 7fa4da4ea64f..3f312a84c6a7 100644 --- a/drivers/scsi/seagate.c +++ b/drivers/scsi/seagate.c | |||
@@ -497,7 +497,7 @@ int __init seagate_st0x_detect (struct scsi_host_template * tpnt) | |||
497 | return 0; | 497 | return 0; |
498 | 498 | ||
499 | hostno = instance->host_no; | 499 | hostno = instance->host_no; |
500 | if (request_irq (irq, do_seagate_reconnect_intr, SA_INTERRUPT, (controller_type == SEAGATE) ? "seagate" : "tmc-8xx", instance)) { | 500 | if (request_irq (irq, do_seagate_reconnect_intr, IRQF_DISABLED, (controller_type == SEAGATE) ? "seagate" : "tmc-8xx", instance)) { |
501 | printk(KERN_ERR "scsi%d : unable to allocate IRQ%d\n", hostno, irq); | 501 | printk(KERN_ERR "scsi%d : unable to allocate IRQ%d\n", hostno, irq); |
502 | return 0; | 502 | return 0; |
503 | } | 503 | } |
diff --git a/drivers/scsi/sim710.c b/drivers/scsi/sim710.c index 2b2789345c13..b27e85428daa 100644 --- a/drivers/scsi/sim710.c +++ b/drivers/scsi/sim710.c | |||
@@ -133,7 +133,7 @@ sim710_probe_common(struct device *dev, unsigned long base_addr, | |||
133 | host->this_id = scsi_id; | 133 | host->this_id = scsi_id; |
134 | host->base = base_addr; | 134 | host->base = base_addr; |
135 | host->irq = irq; | 135 | host->irq = irq; |
136 | if (request_irq(irq, NCR_700_intr, SA_SHIRQ, "sim710", host)) { | 136 | if (request_irq(irq, NCR_700_intr, IRQF_SHARED, "sim710", host)) { |
137 | printk(KERN_ERR "sim710: request_irq failed\n"); | 137 | printk(KERN_ERR "sim710: request_irq failed\n"); |
138 | goto out_put_host; | 138 | goto out_put_host; |
139 | } | 139 | } |
diff --git a/drivers/scsi/sun3x_esp.c b/drivers/scsi/sun3x_esp.c index 2e2c1eb15636..1f328cae5c05 100644 --- a/drivers/scsi/sun3x_esp.c +++ b/drivers/scsi/sun3x_esp.c | |||
@@ -97,7 +97,7 @@ int sun3x_esp_detect(struct scsi_host_template *tpnt) | |||
97 | esp->esp_command_dvma = dvma_vtob((unsigned long)esp->esp_command); | 97 | esp->esp_command_dvma = dvma_vtob((unsigned long)esp->esp_command); |
98 | 98 | ||
99 | esp->irq = 2; | 99 | esp->irq = 2; |
100 | if (request_irq(esp->irq, esp_intr, SA_INTERRUPT, | 100 | if (request_irq(esp->irq, esp_intr, IRQF_DISABLED, |
101 | "SUN3X SCSI", esp->ehost)) { | 101 | "SUN3X SCSI", esp->ehost)) { |
102 | esp_deallocate(esp); | 102 | esp_deallocate(esp); |
103 | return 0; | 103 | return 0; |
diff --git a/drivers/scsi/sym53c8xx_2/sym_glue.c b/drivers/scsi/sym53c8xx_2/sym_glue.c index ea82d3df63af..8c505076c0eb 100644 --- a/drivers/scsi/sym53c8xx_2/sym_glue.c +++ b/drivers/scsi/sym53c8xx_2/sym_glue.c | |||
@@ -1547,7 +1547,7 @@ static struct Scsi_Host * __devinit sym_attach(struct scsi_host_template *tpnt, | |||
1547 | * If we synchonize the C code with SCRIPTS on interrupt, | 1547 | * If we synchonize the C code with SCRIPTS on interrupt, |
1548 | * we do not want to share the INTR line at all. | 1548 | * we do not want to share the INTR line at all. |
1549 | */ | 1549 | */ |
1550 | if (request_irq(pdev->irq, sym53c8xx_intr, SA_SHIRQ, NAME53C8XX, np)) { | 1550 | if (request_irq(pdev->irq, sym53c8xx_intr, IRQF_SHARED, NAME53C8XX, np)) { |
1551 | printf_err("%s: request irq %d failure\n", | 1551 | printf_err("%s: request irq %d failure\n", |
1552 | sym_name(np), pdev->irq); | 1552 | sym_name(np), pdev->irq); |
1553 | goto attach_failed; | 1553 | goto attach_failed; |
diff --git a/drivers/scsi/t128.c b/drivers/scsi/t128.c index a24f661b0270..2df6747cb76f 100644 --- a/drivers/scsi/t128.c +++ b/drivers/scsi/t128.c | |||
@@ -260,7 +260,7 @@ found: | |||
260 | instance->irq = NCR5380_probe_irq(instance, T128_IRQS); | 260 | instance->irq = NCR5380_probe_irq(instance, T128_IRQS); |
261 | 261 | ||
262 | if (instance->irq != SCSI_IRQ_NONE) | 262 | if (instance->irq != SCSI_IRQ_NONE) |
263 | if (request_irq(instance->irq, t128_intr, SA_INTERRUPT, "t128", instance)) { | 263 | if (request_irq(instance->irq, t128_intr, IRQF_DISABLED, "t128", instance)) { |
264 | printk("scsi%d : IRQ%d not free, interrupts disabled\n", | 264 | printk("scsi%d : IRQ%d not free, interrupts disabled\n", |
265 | instance->host_no, instance->irq); | 265 | instance->host_no, instance->irq); |
266 | instance->irq = SCSI_IRQ_NONE; | 266 | instance->irq = SCSI_IRQ_NONE; |
diff --git a/drivers/scsi/tmscsim.c b/drivers/scsi/tmscsim.c index 7540f6a7529f..9404ff3d4c79 100644 --- a/drivers/scsi/tmscsim.c +++ b/drivers/scsi/tmscsim.c | |||
@@ -2584,7 +2584,7 @@ static int __devinit dc390_probe_one(struct pci_dev *pdev, | |||
2584 | /* Reset Pending INT */ | 2584 | /* Reset Pending INT */ |
2585 | DC390_read8_(INT_Status, io_port); | 2585 | DC390_read8_(INT_Status, io_port); |
2586 | 2586 | ||
2587 | if (request_irq(pdev->irq, do_DC390_Interrupt, SA_SHIRQ, | 2587 | if (request_irq(pdev->irq, do_DC390_Interrupt, IRQF_SHARED, |
2588 | "tmscsim", pACB)) { | 2588 | "tmscsim", pACB)) { |
2589 | printk(KERN_ERR "DC390: register IRQ error!\n"); | 2589 | printk(KERN_ERR "DC390: register IRQ error!\n"); |
2590 | goto out_release_region; | 2590 | goto out_release_region; |
diff --git a/drivers/scsi/u14-34f.c b/drivers/scsi/u14-34f.c index 35c043e38ed4..57449611e714 100644 --- a/drivers/scsi/u14-34f.c +++ b/drivers/scsi/u14-34f.c | |||
@@ -872,7 +872,7 @@ static int port_detect \ | |||
872 | 872 | ||
873 | /* Board detected, allocate its IRQ */ | 873 | /* Board detected, allocate its IRQ */ |
874 | if (request_irq(irq, do_interrupt_handler, | 874 | if (request_irq(irq, do_interrupt_handler, |
875 | SA_INTERRUPT | ((subversion == ESA) ? SA_SHIRQ : 0), | 875 | IRQF_DISABLED | ((subversion == ESA) ? IRQF_SHARED : 0), |
876 | driver_name, (void *) &sha[j])) { | 876 | driver_name, (void *) &sha[j])) { |
877 | printk("%s: unable to allocate IRQ %u, detaching.\n", name, irq); | 877 | printk("%s: unable to allocate IRQ %u, detaching.\n", name, irq); |
878 | goto freelock; | 878 | goto freelock; |
diff --git a/drivers/scsi/wd7000.c b/drivers/scsi/wd7000.c index 574955b78a24..a0b61af48f1c 100644 --- a/drivers/scsi/wd7000.c +++ b/drivers/scsi/wd7000.c | |||
@@ -1250,7 +1250,7 @@ static int wd7000_init(Adapter * host) | |||
1250 | return 0; | 1250 | return 0; |
1251 | 1251 | ||
1252 | 1252 | ||
1253 | if (request_irq(host->irq, wd7000_intr, SA_INTERRUPT, "wd7000", host)) { | 1253 | if (request_irq(host->irq, wd7000_intr, IRQF_DISABLED, "wd7000", host)) { |
1254 | printk("wd7000_init: can't get IRQ %d.\n", host->irq); | 1254 | printk("wd7000_init: can't get IRQ %d.\n", host->irq); |
1255 | return (0); | 1255 | return (0); |
1256 | } | 1256 | } |
diff --git a/drivers/scsi/zalon.c b/drivers/scsi/zalon.c index a6cfbb3b361c..4b5f908d35c3 100644 --- a/drivers/scsi/zalon.c +++ b/drivers/scsi/zalon.c | |||
@@ -136,7 +136,7 @@ zalon_probe(struct parisc_device *dev) | |||
136 | if (!host) | 136 | if (!host) |
137 | goto fail; | 137 | goto fail; |
138 | 138 | ||
139 | if (request_irq(dev->irq, ncr53c8xx_intr, SA_SHIRQ, "zalon", host)) { | 139 | if (request_irq(dev->irq, ncr53c8xx_intr, IRQF_SHARED, "zalon", host)) { |
140 | printk(KERN_ERR "%s: irq problem with %d, detaching\n ", | 140 | printk(KERN_ERR "%s: irq problem with %d, detaching\n ", |
141 | dev->dev.bus_id, dev->irq); | 141 | dev->dev.bus_id, dev->irq); |
142 | goto fail; | 142 | goto fail; |
diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c index 9c5d36f50140..0995430e4cf1 100644 --- a/drivers/serial/8250.c +++ b/drivers/serial/8250.c | |||
@@ -48,7 +48,7 @@ | |||
48 | 48 | ||
49 | /* | 49 | /* |
50 | * Configuration: | 50 | * Configuration: |
51 | * share_irqs - whether we pass SA_SHIRQ to request_irq(). This option | 51 | * share_irqs - whether we pass IRQF_SHARED to request_irq(). This option |
52 | * is unsafe when used on edge-triggered interrupts. | 52 | * is unsafe when used on edge-triggered interrupts. |
53 | */ | 53 | */ |
54 | static unsigned int share_irqs = SERIAL8250_SHARE_IRQS; | 54 | static unsigned int share_irqs = SERIAL8250_SHARE_IRQS; |
@@ -1400,7 +1400,7 @@ static void serial_do_unlink(struct irq_info *i, struct uart_8250_port *up) | |||
1400 | static int serial_link_irq_chain(struct uart_8250_port *up) | 1400 | static int serial_link_irq_chain(struct uart_8250_port *up) |
1401 | { | 1401 | { |
1402 | struct irq_info *i = irq_lists + up->port.irq; | 1402 | struct irq_info *i = irq_lists + up->port.irq; |
1403 | int ret, irq_flags = up->port.flags & UPF_SHARE_IRQ ? SA_SHIRQ : 0; | 1403 | int ret, irq_flags = up->port.flags & UPF_SHARE_IRQ ? IRQF_SHARED : 0; |
1404 | 1404 | ||
1405 | spin_lock_irq(&i->lock); | 1405 | spin_lock_irq(&i->lock); |
1406 | 1406 | ||
diff --git a/drivers/serial/at91_serial.c b/drivers/serial/at91_serial.c index 7b3b3f3d5101..a7d664383dae 100644 --- a/drivers/serial/at91_serial.c +++ b/drivers/serial/at91_serial.c | |||
@@ -387,7 +387,7 @@ static int at91_startup(struct uart_port *port) | |||
387 | /* | 387 | /* |
388 | * Allocate the IRQ | 388 | * Allocate the IRQ |
389 | */ | 389 | */ |
390 | retval = request_irq(port->irq, at91_interrupt, SA_SHIRQ, "at91_serial", port); | 390 | retval = request_irq(port->irq, at91_interrupt, IRQF_SHARED, "at91_serial", port); |
391 | if (retval) { | 391 | if (retval) { |
392 | printk("at91_serial: at91_startup - Can't get irq\n"); | 392 | printk("at91_serial: at91_startup - Can't get irq\n"); |
393 | return retval; | 393 | return retval; |
diff --git a/drivers/serial/crisv10.c b/drivers/serial/crisv10.c index 901be3483455..cabd048c8636 100644 --- a/drivers/serial/crisv10.c +++ b/drivers/serial/crisv10.c | |||
@@ -415,7 +415,7 @@ | |||
415 | * Fixed DEF_TX value that caused the serial transmitter pin (txd) to go to 0 when | 415 | * Fixed DEF_TX value that caused the serial transmitter pin (txd) to go to 0 when |
416 | * closing the last filehandle, NASTY!. | 416 | * closing the last filehandle, NASTY!. |
417 | * Added break generation, not tested though! | 417 | * Added break generation, not tested though! |
418 | * Use SA_SHIRQ when request_irq() for ser2 and ser3 (shared with) par0 and par1. | 418 | * Use IRQF_SHARED when request_irq() for ser2 and ser3 (shared with) par0 and par1. |
419 | * You can't use them at the same time (yet..), but you can hopefully switch | 419 | * You can't use them at the same time (yet..), but you can hopefully switch |
420 | * between ser2/par0, ser3/par1 with the same kernel config. | 420 | * between ser2/par0, ser3/par1 with the same kernel config. |
421 | * Replaced some magic constants with defines | 421 | * Replaced some magic constants with defines |
@@ -4942,55 +4942,55 @@ rs_init(void) | |||
4942 | /* Not needed in simulator. May only complicate stuff. */ | 4942 | /* Not needed in simulator. May only complicate stuff. */ |
4943 | /* hook the irq's for DMA channel 6 and 7, serial output and input, and some more... */ | 4943 | /* hook the irq's for DMA channel 6 and 7, serial output and input, and some more... */ |
4944 | 4944 | ||
4945 | if (request_irq(SERIAL_IRQ_NBR, ser_interrupt, SA_SHIRQ | SA_INTERRUPT, "serial ", NULL)) | 4945 | if (request_irq(SERIAL_IRQ_NBR, ser_interrupt, IRQF_SHARED | IRQF_DISABLED, "serial ", NULL)) |
4946 | panic("irq8"); | 4946 | panic("irq8"); |
4947 | 4947 | ||
4948 | #ifdef CONFIG_ETRAX_SERIAL_PORT0 | 4948 | #ifdef CONFIG_ETRAX_SERIAL_PORT0 |
4949 | #ifdef CONFIG_ETRAX_SERIAL_PORT0_DMA6_OUT | 4949 | #ifdef CONFIG_ETRAX_SERIAL_PORT0_DMA6_OUT |
4950 | if (request_irq(SER0_DMA_TX_IRQ_NBR, tr_interrupt, SA_INTERRUPT, "serial 0 dma tr", NULL)) | 4950 | if (request_irq(SER0_DMA_TX_IRQ_NBR, tr_interrupt, IRQF_DISABLED, "serial 0 dma tr", NULL)) |
4951 | panic("irq22"); | 4951 | panic("irq22"); |
4952 | #endif | 4952 | #endif |
4953 | #ifdef CONFIG_ETRAX_SERIAL_PORT0_DMA7_IN | 4953 | #ifdef CONFIG_ETRAX_SERIAL_PORT0_DMA7_IN |
4954 | if (request_irq(SER0_DMA_RX_IRQ_NBR, rec_interrupt, SA_INTERRUPT, "serial 0 dma rec", NULL)) | 4954 | if (request_irq(SER0_DMA_RX_IRQ_NBR, rec_interrupt, IRQF_DISABLED, "serial 0 dma rec", NULL)) |
4955 | panic("irq23"); | 4955 | panic("irq23"); |
4956 | #endif | 4956 | #endif |
4957 | #endif | 4957 | #endif |
4958 | 4958 | ||
4959 | #ifdef CONFIG_ETRAX_SERIAL_PORT1 | 4959 | #ifdef CONFIG_ETRAX_SERIAL_PORT1 |
4960 | #ifdef CONFIG_ETRAX_SERIAL_PORT1_DMA8_OUT | 4960 | #ifdef CONFIG_ETRAX_SERIAL_PORT1_DMA8_OUT |
4961 | if (request_irq(SER1_DMA_TX_IRQ_NBR, tr_interrupt, SA_INTERRUPT, "serial 1 dma tr", NULL)) | 4961 | if (request_irq(SER1_DMA_TX_IRQ_NBR, tr_interrupt, IRQF_DISABLED, "serial 1 dma tr", NULL)) |
4962 | panic("irq24"); | 4962 | panic("irq24"); |
4963 | #endif | 4963 | #endif |
4964 | #ifdef CONFIG_ETRAX_SERIAL_PORT1_DMA9_IN | 4964 | #ifdef CONFIG_ETRAX_SERIAL_PORT1_DMA9_IN |
4965 | if (request_irq(SER1_DMA_RX_IRQ_NBR, rec_interrupt, SA_INTERRUPT, "serial 1 dma rec", NULL)) | 4965 | if (request_irq(SER1_DMA_RX_IRQ_NBR, rec_interrupt, IRQF_DISABLED, "serial 1 dma rec", NULL)) |
4966 | panic("irq25"); | 4966 | panic("irq25"); |
4967 | #endif | 4967 | #endif |
4968 | #endif | 4968 | #endif |
4969 | #ifdef CONFIG_ETRAX_SERIAL_PORT2 | 4969 | #ifdef CONFIG_ETRAX_SERIAL_PORT2 |
4970 | /* DMA Shared with par0 (and SCSI0 and ATA) */ | 4970 | /* DMA Shared with par0 (and SCSI0 and ATA) */ |
4971 | #ifdef CONFIG_ETRAX_SERIAL_PORT2_DMA2_OUT | 4971 | #ifdef CONFIG_ETRAX_SERIAL_PORT2_DMA2_OUT |
4972 | if (request_irq(SER2_DMA_TX_IRQ_NBR, tr_interrupt, SA_SHIRQ | SA_INTERRUPT, "serial 2 dma tr", NULL)) | 4972 | if (request_irq(SER2_DMA_TX_IRQ_NBR, tr_interrupt, IRQF_SHARED | IRQF_DISABLED, "serial 2 dma tr", NULL)) |
4973 | panic("irq18"); | 4973 | panic("irq18"); |
4974 | #endif | 4974 | #endif |
4975 | #ifdef CONFIG_ETRAX_SERIAL_PORT2_DMA3_IN | 4975 | #ifdef CONFIG_ETRAX_SERIAL_PORT2_DMA3_IN |
4976 | if (request_irq(SER2_DMA_RX_IRQ_NBR, rec_interrupt, SA_SHIRQ | SA_INTERRUPT, "serial 2 dma rec", NULL)) | 4976 | if (request_irq(SER2_DMA_RX_IRQ_NBR, rec_interrupt, IRQF_SHARED | IRQF_DISABLED, "serial 2 dma rec", NULL)) |
4977 | panic("irq19"); | 4977 | panic("irq19"); |
4978 | #endif | 4978 | #endif |
4979 | #endif | 4979 | #endif |
4980 | #ifdef CONFIG_ETRAX_SERIAL_PORT3 | 4980 | #ifdef CONFIG_ETRAX_SERIAL_PORT3 |
4981 | /* DMA Shared with par1 (and SCSI1 and Extern DMA 0) */ | 4981 | /* DMA Shared with par1 (and SCSI1 and Extern DMA 0) */ |
4982 | #ifdef CONFIG_ETRAX_SERIAL_PORT3_DMA4_OUT | 4982 | #ifdef CONFIG_ETRAX_SERIAL_PORT3_DMA4_OUT |
4983 | if (request_irq(SER3_DMA_TX_IRQ_NBR, tr_interrupt, SA_SHIRQ | SA_INTERRUPT, "serial 3 dma tr", NULL)) | 4983 | if (request_irq(SER3_DMA_TX_IRQ_NBR, tr_interrupt, IRQF_SHARED | IRQF_DISABLED, "serial 3 dma tr", NULL)) |
4984 | panic("irq20"); | 4984 | panic("irq20"); |
4985 | #endif | 4985 | #endif |
4986 | #ifdef CONFIG_ETRAX_SERIAL_PORT3_DMA5_IN | 4986 | #ifdef CONFIG_ETRAX_SERIAL_PORT3_DMA5_IN |
4987 | if (request_irq(SER3_DMA_RX_IRQ_NBR, rec_interrupt, SA_SHIRQ | SA_INTERRUPT, "serial 3 dma rec", NULL)) | 4987 | if (request_irq(SER3_DMA_RX_IRQ_NBR, rec_interrupt, IRQF_SHARED | IRQF_DISABLED, "serial 3 dma rec", NULL)) |
4988 | panic("irq21"); | 4988 | panic("irq21"); |
4989 | #endif | 4989 | #endif |
4990 | #endif | 4990 | #endif |
4991 | 4991 | ||
4992 | #ifdef CONFIG_ETRAX_SERIAL_FLUSH_DMA_FAST | 4992 | #ifdef CONFIG_ETRAX_SERIAL_FLUSH_DMA_FAST |
4993 | if (request_irq(TIMER1_IRQ_NBR, timeout_interrupt, SA_SHIRQ | SA_INTERRUPT, | 4993 | if (request_irq(TIMER1_IRQ_NBR, timeout_interrupt, IRQF_SHARED | IRQF_DISABLED, |
4994 | "fast serial dma timeout", NULL)) { | 4994 | "fast serial dma timeout", NULL)) { |
4995 | printk(KERN_CRIT "err: timer1 irq\n"); | 4995 | printk(KERN_CRIT "err: timer1 irq\n"); |
4996 | } | 4996 | } |
diff --git a/drivers/serial/dz.c b/drivers/serial/dz.c index ecf824bd2d4e..d119c8296a78 100644 --- a/drivers/serial/dz.c +++ b/drivers/serial/dz.c | |||
@@ -797,7 +797,7 @@ int __init dz_init(void) | |||
797 | restore_flags(flags); | 797 | restore_flags(flags); |
798 | 798 | ||
799 | if (request_irq(dz_ports[0].port.irq, dz_interrupt, | 799 | if (request_irq(dz_ports[0].port.irq, dz_interrupt, |
800 | SA_INTERRUPT, "DZ", &dz_ports[0])) | 800 | IRQF_DISABLED, "DZ", &dz_ports[0])) |
801 | panic("Unable to register DZ interrupt"); | 801 | panic("Unable to register DZ interrupt"); |
802 | 802 | ||
803 | ret = uart_register_driver(&dz_reg); | 803 | ret = uart_register_driver(&dz_reg); |
diff --git a/drivers/serial/icom.c b/drivers/serial/icom.c index ad1e753cbc53..a3c00a252149 100644 --- a/drivers/serial/icom.c +++ b/drivers/serial/icom.c | |||
@@ -1563,7 +1563,7 @@ static int __devinit icom_probe(struct pci_dev *dev, | |||
1563 | 1563 | ||
1564 | /* save off irq and request irq line */ | 1564 | /* save off irq and request irq line */ |
1565 | if ( (retval = request_irq(dev->irq, icom_interrupt, | 1565 | if ( (retval = request_irq(dev->irq, icom_interrupt, |
1566 | SA_INTERRUPT | SA_SHIRQ, ICOM_DRIVER_NAME, | 1566 | IRQF_DISABLED | IRQF_SHARED, ICOM_DRIVER_NAME, |
1567 | (void *) icom_adapter))) { | 1567 | (void *) icom_adapter))) { |
1568 | goto probe_exit2; | 1568 | goto probe_exit2; |
1569 | } | 1569 | } |
diff --git a/drivers/serial/imx.c b/drivers/serial/imx.c index 0b5f39d038b9..4a142d6b8f38 100644 --- a/drivers/serial/imx.c +++ b/drivers/serial/imx.c | |||
@@ -404,7 +404,7 @@ static int imx_startup(struct uart_port *port) | |||
404 | if (retval) goto error_out2; | 404 | if (retval) goto error_out2; |
405 | 405 | ||
406 | retval = request_irq(sport->rtsirq, imx_rtsint, | 406 | retval = request_irq(sport->rtsirq, imx_rtsint, |
407 | SA_TRIGGER_FALLING | SA_TRIGGER_RISING, | 407 | IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING, |
408 | DRIVER_NAME, sport); | 408 | DRIVER_NAME, sport); |
409 | if (retval) goto error_out3; | 409 | if (retval) goto error_out3; |
410 | 410 | ||
diff --git a/drivers/serial/ioc4_serial.c b/drivers/serial/ioc4_serial.c index 717e47bbd784..576ca1eaa2b6 100644 --- a/drivers/serial/ioc4_serial.c +++ b/drivers/serial/ioc4_serial.c | |||
@@ -2855,7 +2855,7 @@ ioc4_serial_attach_one(struct ioc4_driver_data *idd) | |||
2855 | control->ic_soft = soft; | 2855 | control->ic_soft = soft; |
2856 | 2856 | ||
2857 | /* Hook up interrupt handler */ | 2857 | /* Hook up interrupt handler */ |
2858 | if (!request_irq(idd->idd_pdev->irq, ioc4_intr, SA_SHIRQ, | 2858 | if (!request_irq(idd->idd_pdev->irq, ioc4_intr, IRQF_SHARED, |
2859 | "sgi-ioc4serial", soft)) { | 2859 | "sgi-ioc4serial", soft)) { |
2860 | control->ic_irq = idd->idd_pdev->irq; | 2860 | control->ic_irq = idd->idd_pdev->irq; |
2861 | } else { | 2861 | } else { |
diff --git a/drivers/serial/jsm/jsm_driver.c b/drivers/serial/jsm/jsm_driver.c index b3e1f71be4da..244f63be3a03 100644 --- a/drivers/serial/jsm/jsm_driver.c +++ b/drivers/serial/jsm/jsm_driver.c | |||
@@ -121,7 +121,7 @@ static int jsm_probe_one(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
121 | } | 121 | } |
122 | 122 | ||
123 | rc = request_irq(brd->irq, brd->bd_ops->intr, | 123 | rc = request_irq(brd->irq, brd->bd_ops->intr, |
124 | SA_INTERRUPT|SA_SHIRQ, "JSM", brd); | 124 | IRQF_DISABLED|IRQF_SHARED, "JSM", brd); |
125 | if (rc) { | 125 | if (rc) { |
126 | printk(KERN_WARNING "Failed to hook IRQ %d\n",brd->irq); | 126 | printk(KERN_WARNING "Failed to hook IRQ %d\n",brd->irq); |
127 | goto out_iounmap; | 127 | goto out_iounmap; |
diff --git a/drivers/serial/m32r_sio.c b/drivers/serial/m32r_sio.c index fbaae96f4c93..e7fe4bb46eca 100644 --- a/drivers/serial/m32r_sio.c +++ b/drivers/serial/m32r_sio.c | |||
@@ -542,7 +542,7 @@ static void serial_do_unlink(struct irq_info *i, struct uart_sio_port *up) | |||
542 | static int serial_link_irq_chain(struct uart_sio_port *up) | 542 | static int serial_link_irq_chain(struct uart_sio_port *up) |
543 | { | 543 | { |
544 | struct irq_info *i = irq_lists + up->port.irq; | 544 | struct irq_info *i = irq_lists + up->port.irq; |
545 | int ret, irq_flags = up->port.flags & UPF_SHARE_IRQ ? SA_SHIRQ : 0; | 545 | int ret, irq_flags = up->port.flags & UPF_SHARE_IRQ ? IRQF_SHARED : 0; |
546 | 546 | ||
547 | spin_lock_irq(&i->lock); | 547 | spin_lock_irq(&i->lock); |
548 | 548 | ||
diff --git a/drivers/serial/mcfserial.c b/drivers/serial/mcfserial.c index 29c0630e3e64..832abd3c4706 100644 --- a/drivers/serial/mcfserial.c +++ b/drivers/serial/mcfserial.c | |||
@@ -1596,7 +1596,7 @@ static void mcfrs_irqinit(struct mcf_serial *info) | |||
1596 | /* Clear mask, so no surprise interrupts. */ | 1596 | /* Clear mask, so no surprise interrupts. */ |
1597 | uartp[MCFUART_UIMR] = 0; | 1597 | uartp[MCFUART_UIMR] = 0; |
1598 | 1598 | ||
1599 | if (request_irq(info->irq, mcfrs_interrupt, SA_INTERRUPT, | 1599 | if (request_irq(info->irq, mcfrs_interrupt, IRQF_DISABLED, |
1600 | "ColdFire UART", NULL)) { | 1600 | "ColdFire UART", NULL)) { |
1601 | printk("MCFRS: Unable to attach ColdFire UART %d interrupt " | 1601 | printk("MCFRS: Unable to attach ColdFire UART %d interrupt " |
1602 | "vector=%d\n", info->line, info->irq); | 1602 | "vector=%d\n", info->line, info->irq); |
diff --git a/drivers/serial/mpc52xx_uart.c b/drivers/serial/mpc52xx_uart.c index 1b8e554f674f..48eb22d3a63e 100644 --- a/drivers/serial/mpc52xx_uart.c +++ b/drivers/serial/mpc52xx_uart.c | |||
@@ -190,7 +190,7 @@ mpc52xx_uart_startup(struct uart_port *port) | |||
190 | 190 | ||
191 | /* Request IRQ */ | 191 | /* Request IRQ */ |
192 | ret = request_irq(port->irq, mpc52xx_uart_int, | 192 | ret = request_irq(port->irq, mpc52xx_uart_int, |
193 | SA_INTERRUPT | SA_SAMPLE_RANDOM, "mpc52xx_psc_uart", port); | 193 | IRQF_DISABLED | IRQF_SAMPLE_RANDOM, "mpc52xx_psc_uart", port); |
194 | if (ret) | 194 | if (ret) |
195 | return ret; | 195 | return ret; |
196 | 196 | ||
diff --git a/drivers/serial/mpsc.c b/drivers/serial/mpsc.c index 8c498f785e21..63d2a66e563b 100644 --- a/drivers/serial/mpsc.c +++ b/drivers/serial/mpsc.c | |||
@@ -1412,7 +1412,7 @@ mpsc_startup(struct uart_port *port) | |||
1412 | 1412 | ||
1413 | /* If irq's are shared, need to set flag */ | 1413 | /* If irq's are shared, need to set flag */ |
1414 | if (mpsc_ports[0].port.irq == mpsc_ports[1].port.irq) | 1414 | if (mpsc_ports[0].port.irq == mpsc_ports[1].port.irq) |
1415 | flag = SA_SHIRQ; | 1415 | flag = IRQF_SHARED; |
1416 | 1416 | ||
1417 | if (request_irq(pi->port.irq, mpsc_sdma_intr, flag, | 1417 | if (request_irq(pi->port.irq, mpsc_sdma_intr, flag, |
1418 | "mpsc-sdma", pi)) | 1418 | "mpsc-sdma", pi)) |
diff --git a/drivers/serial/pmac_zilog.c b/drivers/serial/pmac_zilog.c index 4d9435451f4a..459c0231aef3 100644 --- a/drivers/serial/pmac_zilog.c +++ b/drivers/serial/pmac_zilog.c | |||
@@ -934,7 +934,7 @@ static int pmz_startup(struct uart_port *port) | |||
934 | } | 934 | } |
935 | 935 | ||
936 | pmz_get_port_A(uap)->flags |= PMACZILOG_FLAG_IS_IRQ_ON; | 936 | pmz_get_port_A(uap)->flags |= PMACZILOG_FLAG_IS_IRQ_ON; |
937 | if (request_irq(uap->port.irq, pmz_interrupt, SA_SHIRQ, "PowerMac Zilog", uap)) { | 937 | if (request_irq(uap->port.irq, pmz_interrupt, IRQF_SHARED, "PowerMac Zilog", uap)) { |
938 | dev_err(&uap->dev->ofdev.dev, | 938 | dev_err(&uap->dev->ofdev.dev, |
939 | "Unable to register zs interrupt handler.\n"); | 939 | "Unable to register zs interrupt handler.\n"); |
940 | pmz_set_scc_power(uap, 0); | 940 | pmz_set_scc_power(uap, 0); |
diff --git a/drivers/serial/serial_txx9.c b/drivers/serial/serial_txx9.c index 28c1881a6691..b361669f85a1 100644 --- a/drivers/serial/serial_txx9.c +++ b/drivers/serial/serial_txx9.c | |||
@@ -495,7 +495,7 @@ static int serial_txx9_startup(struct uart_port *port) | |||
495 | sio_out(up, TXX9_SIDISR, 0); | 495 | sio_out(up, TXX9_SIDISR, 0); |
496 | 496 | ||
497 | retval = request_irq(up->port.irq, serial_txx9_interrupt, | 497 | retval = request_irq(up->port.irq, serial_txx9_interrupt, |
498 | SA_SHIRQ, "serial_txx9", up); | 498 | IRQF_SHARED, "serial_txx9", up); |
499 | if (retval) | 499 | if (retval) |
500 | return retval; | 500 | return retval; |
501 | 501 | ||
diff --git a/drivers/serial/sh-sci.c b/drivers/serial/sh-sci.c index 2509c3237e87..301573373c30 100644 --- a/drivers/serial/sh-sci.c +++ b/drivers/serial/sh-sci.c | |||
@@ -841,7 +841,7 @@ static int sci_request_irq(struct sci_port *port) | |||
841 | printk(KERN_ERR "sci: Cannot allocate irq.(IRQ=0)\n"); | 841 | printk(KERN_ERR "sci: Cannot allocate irq.(IRQ=0)\n"); |
842 | return -ENODEV; | 842 | return -ENODEV; |
843 | } | 843 | } |
844 | if (request_irq(port->irqs[0], sci_mpxed_interrupt, SA_INTERRUPT, | 844 | if (request_irq(port->irqs[0], sci_mpxed_interrupt, IRQF_DISABLED, |
845 | "sci", port)) { | 845 | "sci", port)) { |
846 | printk(KERN_ERR "sci: Cannot allocate irq.\n"); | 846 | printk(KERN_ERR "sci: Cannot allocate irq.\n"); |
847 | return -ENODEV; | 847 | return -ENODEV; |
@@ -850,7 +850,7 @@ static int sci_request_irq(struct sci_port *port) | |||
850 | for (i = 0; i < ARRAY_SIZE(handlers); i++) { | 850 | for (i = 0; i < ARRAY_SIZE(handlers); i++) { |
851 | if (!port->irqs[i]) | 851 | if (!port->irqs[i]) |
852 | continue; | 852 | continue; |
853 | if (request_irq(port->irqs[i], handlers[i], SA_INTERRUPT, | 853 | if (request_irq(port->irqs[i], handlers[i], IRQF_DISABLED, |
854 | desc[i], port)) { | 854 | desc[i], port)) { |
855 | printk(KERN_ERR "sci: Cannot allocate irq.\n"); | 855 | printk(KERN_ERR "sci: Cannot allocate irq.\n"); |
856 | return -ENODEV; | 856 | return -ENODEV; |
diff --git a/drivers/serial/sn_console.c b/drivers/serial/sn_console.c index 4b0afc8f12b9..2f148e5b9255 100644 --- a/drivers/serial/sn_console.c +++ b/drivers/serial/sn_console.c | |||
@@ -648,7 +648,7 @@ static irqreturn_t sn_sal_interrupt(int irq, void *dev_id, struct pt_regs *regs) | |||
648 | static int sn_sal_connect_interrupt(struct sn_cons_port *port) | 648 | static int sn_sal_connect_interrupt(struct sn_cons_port *port) |
649 | { | 649 | { |
650 | if (request_irq(SGI_UART_VECTOR, sn_sal_interrupt, | 650 | if (request_irq(SGI_UART_VECTOR, sn_sal_interrupt, |
651 | SA_INTERRUPT | SA_SHIRQ, | 651 | IRQF_DISABLED | IRQF_SHARED, |
652 | "SAL console driver", port) >= 0) { | 652 | "SAL console driver", port) >= 0) { |
653 | return SGI_UART_VECTOR; | 653 | return SGI_UART_VECTOR; |
654 | } | 654 | } |
diff --git a/drivers/serial/sunsab.c b/drivers/serial/sunsab.c index 20a48697727c..0dbd4df44c05 100644 --- a/drivers/serial/sunsab.c +++ b/drivers/serial/sunsab.c | |||
@@ -1027,7 +1027,7 @@ static int __devinit sunsab_init_one(struct uart_sunsab_port *up, | |||
1027 | int err; | 1027 | int err; |
1028 | 1028 | ||
1029 | err = request_irq(up->port.irq, sunsab_interrupt, | 1029 | err = request_irq(up->port.irq, sunsab_interrupt, |
1030 | SA_SHIRQ, "sab", up); | 1030 | IRQF_SHARED, "sab", up); |
1031 | if (err) { | 1031 | if (err) { |
1032 | of_iounmap(up->port.membase, | 1032 | of_iounmap(up->port.membase, |
1033 | sizeof(union sab82532_async_regs)); | 1033 | sizeof(union sab82532_async_regs)); |
diff --git a/drivers/serial/sunsu.c b/drivers/serial/sunsu.c index eabf477fee95..f9013baba05b 100644 --- a/drivers/serial/sunsu.c +++ b/drivers/serial/sunsu.c | |||
@@ -667,10 +667,10 @@ static int sunsu_startup(struct uart_port *port) | |||
667 | 667 | ||
668 | if (up->su_type != SU_PORT_PORT) { | 668 | if (up->su_type != SU_PORT_PORT) { |
669 | retval = request_irq(up->port.irq, sunsu_kbd_ms_interrupt, | 669 | retval = request_irq(up->port.irq, sunsu_kbd_ms_interrupt, |
670 | SA_SHIRQ, su_typev[up->su_type], up); | 670 | IRQF_SHARED, su_typev[up->su_type], up); |
671 | } else { | 671 | } else { |
672 | retval = request_irq(up->port.irq, sunsu_serial_interrupt, | 672 | retval = request_irq(up->port.irq, sunsu_serial_interrupt, |
673 | SA_SHIRQ, su_typev[up->su_type], up); | 673 | IRQF_SHARED, su_typev[up->su_type], up); |
674 | } | 674 | } |
675 | if (retval) { | 675 | if (retval) { |
676 | printk("su: Cannot register IRQ %d\n", up->port.irq); | 676 | printk("su: Cannot register IRQ %d\n", up->port.irq); |
diff --git a/drivers/serial/sunzilog.c b/drivers/serial/sunzilog.c index 9ee7f3af9ae2..a1456d9352cb 100644 --- a/drivers/serial/sunzilog.c +++ b/drivers/serial/sunzilog.c | |||
@@ -1354,7 +1354,7 @@ static int __devinit zs_probe(struct of_device *dev, const struct of_device_id * | |||
1354 | 1354 | ||
1355 | if (zilog_irq == -1) { | 1355 | if (zilog_irq == -1) { |
1356 | zilog_irq = op->irqs[0]; | 1356 | zilog_irq = op->irqs[0]; |
1357 | err = request_irq(zilog_irq, sunzilog_interrupt, SA_SHIRQ, | 1357 | err = request_irq(zilog_irq, sunzilog_interrupt, IRQF_SHARED, |
1358 | "zs", sunzilog_irq_chain); | 1358 | "zs", sunzilog_irq_chain); |
1359 | if (err) { | 1359 | if (err) { |
1360 | of_iounmap(rp, sizeof(struct zilog_layout)); | 1360 | of_iounmap(rp, sizeof(struct zilog_layout)); |
diff --git a/drivers/serial/v850e_uart.c b/drivers/serial/v850e_uart.c index a0da2aaf71c4..f802867c95c5 100644 --- a/drivers/serial/v850e_uart.c +++ b/drivers/serial/v850e_uart.c | |||
@@ -372,13 +372,13 @@ static int v850e_uart_startup (struct uart_port *port) | |||
372 | 372 | ||
373 | /* Alloc RX irq. */ | 373 | /* Alloc RX irq. */ |
374 | err = request_irq (V850E_UART_RX_IRQ (port->line), v850e_uart_rx_irq, | 374 | err = request_irq (V850E_UART_RX_IRQ (port->line), v850e_uart_rx_irq, |
375 | SA_INTERRUPT, "v850e_uart", port); | 375 | IRQF_DISABLED, "v850e_uart", port); |
376 | if (err) | 376 | if (err) |
377 | return err; | 377 | return err; |
378 | 378 | ||
379 | /* Alloc TX irq. */ | 379 | /* Alloc TX irq. */ |
380 | err = request_irq (V850E_UART_TX_IRQ (port->line), v850e_uart_tx_irq, | 380 | err = request_irq (V850E_UART_TX_IRQ (port->line), v850e_uart_tx_irq, |
381 | SA_INTERRUPT, "v850e_uart", port); | 381 | IRQF_DISABLED, "v850e_uart", port); |
382 | if (err) { | 382 | if (err) { |
383 | free_irq (V850E_UART_RX_IRQ (port->line), port); | 383 | free_irq (V850E_UART_RX_IRQ (port->line), port); |
384 | return err; | 384 | return err; |
diff --git a/drivers/sn/ioc3.c b/drivers/sn/ioc3.c index 0040f10c9e39..6c7e0352d561 100644 --- a/drivers/sn/ioc3.c +++ b/drivers/sn/ioc3.c | |||
@@ -706,7 +706,7 @@ static int ioc3_probe(struct pci_dev *pdev, const struct pci_device_id *pci_id) | |||
706 | writel(~0, &idd->vma->eisr); | 706 | writel(~0, &idd->vma->eisr); |
707 | 707 | ||
708 | idd->dual_irq = 1; | 708 | idd->dual_irq = 1; |
709 | if (!request_irq(pdev->irq, ioc3_intr_eth, SA_SHIRQ, | 709 | if (!request_irq(pdev->irq, ioc3_intr_eth, IRQF_SHARED, |
710 | "ioc3-eth", (void *)idd)) { | 710 | "ioc3-eth", (void *)idd)) { |
711 | idd->irq_eth = pdev->irq; | 711 | idd->irq_eth = pdev->irq; |
712 | } else { | 712 | } else { |
@@ -714,7 +714,7 @@ static int ioc3_probe(struct pci_dev *pdev, const struct pci_device_id *pci_id) | |||
714 | "%s : request_irq fails for IRQ 0x%x\n ", | 714 | "%s : request_irq fails for IRQ 0x%x\n ", |
715 | __FUNCTION__, pdev->irq); | 715 | __FUNCTION__, pdev->irq); |
716 | } | 716 | } |
717 | if (!request_irq(pdev->irq+2, ioc3_intr_io, SA_SHIRQ, | 717 | if (!request_irq(pdev->irq+2, ioc3_intr_io, IRQF_SHARED, |
718 | "ioc3-io", (void *)idd)) { | 718 | "ioc3-io", (void *)idd)) { |
719 | idd->irq_io = pdev->irq+2; | 719 | idd->irq_io = pdev->irq+2; |
720 | } else { | 720 | } else { |
@@ -723,7 +723,7 @@ static int ioc3_probe(struct pci_dev *pdev, const struct pci_device_id *pci_id) | |||
723 | __FUNCTION__, pdev->irq+2); | 723 | __FUNCTION__, pdev->irq+2); |
724 | } | 724 | } |
725 | } else { | 725 | } else { |
726 | if (!request_irq(pdev->irq, ioc3_intr_io, SA_SHIRQ, | 726 | if (!request_irq(pdev->irq, ioc3_intr_io, IRQF_SHARED, |
727 | "ioc3", (void *)idd)) { | 727 | "ioc3", (void *)idd)) { |
728 | idd->irq_io = pdev->irq; | 728 | idd->irq_io = pdev->irq; |
729 | } else { | 729 | } else { |
diff --git a/drivers/tc/zs.c b/drivers/tc/zs.c index 93bc90b8ff92..5e8a27620f6f 100644 --- a/drivers/tc/zs.c +++ b/drivers/tc/zs.c | |||
@@ -1791,7 +1791,7 @@ int __init zs_init(void) | |||
1791 | zs_soft[channel].clk_divisor = 16; | 1791 | zs_soft[channel].clk_divisor = 16; |
1792 | zs_soft[channel].zs_baud = get_zsbaud(&zs_soft[channel]); | 1792 | zs_soft[channel].zs_baud = get_zsbaud(&zs_soft[channel]); |
1793 | 1793 | ||
1794 | if (request_irq(zs_soft[channel].irq, rs_interrupt, SA_SHIRQ, | 1794 | if (request_irq(zs_soft[channel].irq, rs_interrupt, IRQF_SHARED, |
1795 | "scc", &zs_soft[channel])) | 1795 | "scc", &zs_soft[channel])) |
1796 | printk(KERN_ERR "decserial: can't get irq %d\n", | 1796 | printk(KERN_ERR "decserial: can't get irq %d\n", |
1797 | zs_soft[channel].irq); | 1797 | zs_soft[channel].irq); |
diff --git a/drivers/usb/core/hcd-pci.c b/drivers/usb/core/hcd-pci.c index 9d16716d166e..5078fb3375e3 100644 --- a/drivers/usb/core/hcd-pci.c +++ b/drivers/usb/core/hcd-pci.c | |||
@@ -125,7 +125,7 @@ int usb_hcd_pci_probe (struct pci_dev *dev, const struct pci_device_id *id) | |||
125 | 125 | ||
126 | pci_set_master (dev); | 126 | pci_set_master (dev); |
127 | 127 | ||
128 | retval = usb_add_hcd (hcd, dev->irq, SA_SHIRQ); | 128 | retval = usb_add_hcd (hcd, dev->irq, IRQF_SHARED); |
129 | if (retval != 0) | 129 | if (retval != 0) |
130 | goto err4; | 130 | goto err4; |
131 | return retval; | 131 | return retval; |
diff --git a/drivers/usb/gadget/at91_udc.c b/drivers/usb/gadget/at91_udc.c index acb3c3d2e888..1c459ff037ce 100644 --- a/drivers/usb/gadget/at91_udc.c +++ b/drivers/usb/gadget/at91_udc.c | |||
@@ -1653,13 +1653,13 @@ static int __devinit at91udc_probe(struct platform_device *pdev) | |||
1653 | pullup(udc, 0); | 1653 | pullup(udc, 0); |
1654 | 1654 | ||
1655 | /* request UDC and maybe VBUS irqs */ | 1655 | /* request UDC and maybe VBUS irqs */ |
1656 | if (request_irq(AT91_ID_UDP, at91_udc_irq, SA_INTERRUPT, driver_name, udc)) { | 1656 | if (request_irq(AT91_ID_UDP, at91_udc_irq, IRQF_DISABLED, driver_name, udc)) { |
1657 | DBG("request irq %d failed\n", AT91_ID_UDP); | 1657 | DBG("request irq %d failed\n", AT91_ID_UDP); |
1658 | retval = -EBUSY; | 1658 | retval = -EBUSY; |
1659 | goto fail1; | 1659 | goto fail1; |
1660 | } | 1660 | } |
1661 | if (udc->board.vbus_pin > 0) { | 1661 | if (udc->board.vbus_pin > 0) { |
1662 | if (request_irq(udc->board.vbus_pin, at91_vbus_irq, SA_INTERRUPT, driver_name, udc)) { | 1662 | if (request_irq(udc->board.vbus_pin, at91_vbus_irq, IRQF_DISABLED, driver_name, udc)) { |
1663 | DBG("request vbus irq %d failed\n", udc->board.vbus_pin); | 1663 | DBG("request vbus irq %d failed\n", udc->board.vbus_pin); |
1664 | free_irq(AT91_ID_UDP, udc); | 1664 | free_irq(AT91_ID_UDP, udc); |
1665 | retval = -EBUSY; | 1665 | retval = -EBUSY; |
diff --git a/drivers/usb/gadget/goku_udc.c b/drivers/usb/gadget/goku_udc.c index 3f827ded8cdf..7cf2999e8616 100644 --- a/drivers/usb/gadget/goku_udc.c +++ b/drivers/usb/gadget/goku_udc.c | |||
@@ -1916,7 +1916,7 @@ static int goku_probe(struct pci_dev *pdev, const struct pci_device_id *id) | |||
1916 | /* init to known state, then setup irqs */ | 1916 | /* init to known state, then setup irqs */ |
1917 | udc_reset(dev); | 1917 | udc_reset(dev); |
1918 | udc_reinit (dev); | 1918 | udc_reinit (dev); |
1919 | if (request_irq(pdev->irq, goku_irq, SA_SHIRQ/*|SA_SAMPLE_RANDOM*/, | 1919 | if (request_irq(pdev->irq, goku_irq, IRQF_SHARED/*|IRQF_SAMPLE_RANDOM*/, |
1920 | driver_name, dev) != 0) { | 1920 | driver_name, dev) != 0) { |
1921 | DBG(dev, "request interrupt %d failed\n", pdev->irq); | 1921 | DBG(dev, "request interrupt %d failed\n", pdev->irq); |
1922 | retval = -EBUSY; | 1922 | retval = -EBUSY; |
diff --git a/drivers/usb/gadget/lh7a40x_udc.c b/drivers/usb/gadget/lh7a40x_udc.c index 0d3424eda038..bb22b7e82877 100644 --- a/drivers/usb/gadget/lh7a40x_udc.c +++ b/drivers/usb/gadget/lh7a40x_udc.c | |||
@@ -2107,7 +2107,7 @@ static int lh7a40x_udc_probe(struct platform_device *pdev) | |||
2107 | 2107 | ||
2108 | /* irq setup after old hardware state is cleaned up */ | 2108 | /* irq setup after old hardware state is cleaned up */ |
2109 | retval = | 2109 | retval = |
2110 | request_irq(IRQ_USBINTR, lh7a40x_udc_irq, SA_INTERRUPT, driver_name, | 2110 | request_irq(IRQ_USBINTR, lh7a40x_udc_irq, IRQF_DISABLED, driver_name, |
2111 | dev); | 2111 | dev); |
2112 | if (retval != 0) { | 2112 | if (retval != 0) { |
2113 | DEBUG(KERN_ERR "%s: can't get irq %i, err %d\n", driver_name, | 2113 | DEBUG(KERN_ERR "%s: can't get irq %i, err %d\n", driver_name, |
diff --git a/drivers/usb/gadget/net2280.c b/drivers/usb/gadget/net2280.c index 570996d7eb34..09243239d948 100644 --- a/drivers/usb/gadget/net2280.c +++ b/drivers/usb/gadget/net2280.c | |||
@@ -2895,7 +2895,7 @@ static int net2280_probe (struct pci_dev *pdev, const struct pci_device_id *id) | |||
2895 | goto done; | 2895 | goto done; |
2896 | } | 2896 | } |
2897 | 2897 | ||
2898 | if (request_irq (pdev->irq, net2280_irq, SA_SHIRQ, driver_name, dev) | 2898 | if (request_irq (pdev->irq, net2280_irq, IRQF_SHARED, driver_name, dev) |
2899 | != 0) { | 2899 | != 0) { |
2900 | ERROR (dev, "request interrupt %d failed\n", pdev->irq); | 2900 | ERROR (dev, "request interrupt %d failed\n", pdev->irq); |
2901 | retval = -EBUSY; | 2901 | retval = -EBUSY; |
diff --git a/drivers/usb/gadget/omap_udc.c b/drivers/usb/gadget/omap_udc.c index 0d642ac70055..2de9748ee673 100644 --- a/drivers/usb/gadget/omap_udc.c +++ b/drivers/usb/gadget/omap_udc.c | |||
@@ -772,7 +772,7 @@ static void dma_error(int lch, u16 ch_status, void *data) | |||
772 | struct omap_ep *ep = data; | 772 | struct omap_ep *ep = data; |
773 | 773 | ||
774 | /* if ch_status & OMAP_DMA_DROP_IRQ ... */ | 774 | /* if ch_status & OMAP_DMA_DROP_IRQ ... */ |
775 | /* if ch_status & OMAP_DMA_TOUT_IRQ ... */ | 775 | /* if ch_status & OMAP1_DMA_TOUT_IRQ ... */ |
776 | ERR("%s dma error, lch %d status %02x\n", ep->ep.name, lch, ch_status); | 776 | ERR("%s dma error, lch %d status %02x\n", ep->ep.name, lch, ch_status); |
777 | 777 | ||
778 | /* complete current transfer ... */ | 778 | /* complete current transfer ... */ |
@@ -2818,7 +2818,7 @@ bad_on_1710: | |||
2818 | 2818 | ||
2819 | /* USB general purpose IRQ: ep0, state changes, dma, etc */ | 2819 | /* USB general purpose IRQ: ep0, state changes, dma, etc */ |
2820 | status = request_irq(pdev->resource[1].start, omap_udc_irq, | 2820 | status = request_irq(pdev->resource[1].start, omap_udc_irq, |
2821 | SA_SAMPLE_RANDOM, driver_name, udc); | 2821 | IRQF_SAMPLE_RANDOM, driver_name, udc); |
2822 | if (status != 0) { | 2822 | if (status != 0) { |
2823 | ERR( "can't get irq %ld, err %d\n", | 2823 | ERR( "can't get irq %ld, err %d\n", |
2824 | pdev->resource[1].start, status); | 2824 | pdev->resource[1].start, status); |
@@ -2827,7 +2827,7 @@ bad_on_1710: | |||
2827 | 2827 | ||
2828 | /* USB "non-iso" IRQ (PIO for all but ep0) */ | 2828 | /* USB "non-iso" IRQ (PIO for all but ep0) */ |
2829 | status = request_irq(pdev->resource[2].start, omap_udc_pio_irq, | 2829 | status = request_irq(pdev->resource[2].start, omap_udc_pio_irq, |
2830 | SA_SAMPLE_RANDOM, "omap_udc pio", udc); | 2830 | IRQF_SAMPLE_RANDOM, "omap_udc pio", udc); |
2831 | if (status != 0) { | 2831 | if (status != 0) { |
2832 | ERR( "can't get irq %ld, err %d\n", | 2832 | ERR( "can't get irq %ld, err %d\n", |
2833 | pdev->resource[2].start, status); | 2833 | pdev->resource[2].start, status); |
@@ -2835,7 +2835,7 @@ bad_on_1710: | |||
2835 | } | 2835 | } |
2836 | #ifdef USE_ISO | 2836 | #ifdef USE_ISO |
2837 | status = request_irq(pdev->resource[3].start, omap_udc_iso_irq, | 2837 | status = request_irq(pdev->resource[3].start, omap_udc_iso_irq, |
2838 | SA_INTERRUPT, "omap_udc iso", udc); | 2838 | IRQF_DISABLED, "omap_udc iso", udc); |
2839 | if (status != 0) { | 2839 | if (status != 0) { |
2840 | ERR("can't get irq %ld, err %d\n", | 2840 | ERR("can't get irq %ld, err %d\n", |
2841 | pdev->resource[3].start, status); | 2841 | pdev->resource[3].start, status); |
diff --git a/drivers/usb/gadget/pxa2xx_udc.c b/drivers/usb/gadget/pxa2xx_udc.c index c88650dffdeb..fff027d30a09 100644 --- a/drivers/usb/gadget/pxa2xx_udc.c +++ b/drivers/usb/gadget/pxa2xx_udc.c | |||
@@ -2521,7 +2521,7 @@ static int __init pxa2xx_udc_probe(struct platform_device *pdev) | |||
2521 | 2521 | ||
2522 | /* irq setup after old hardware state is cleaned up */ | 2522 | /* irq setup after old hardware state is cleaned up */ |
2523 | retval = request_irq(IRQ_USB, pxa2xx_udc_irq, | 2523 | retval = request_irq(IRQ_USB, pxa2xx_udc_irq, |
2524 | SA_INTERRUPT, driver_name, dev); | 2524 | IRQF_DISABLED, driver_name, dev); |
2525 | if (retval != 0) { | 2525 | if (retval != 0) { |
2526 | printk(KERN_ERR "%s: can't get irq %i, err %d\n", | 2526 | printk(KERN_ERR "%s: can't get irq %i, err %d\n", |
2527 | driver_name, IRQ_USB, retval); | 2527 | driver_name, IRQ_USB, retval); |
@@ -2533,7 +2533,7 @@ static int __init pxa2xx_udc_probe(struct platform_device *pdev) | |||
2533 | if (machine_is_lubbock()) { | 2533 | if (machine_is_lubbock()) { |
2534 | retval = request_irq(LUBBOCK_USB_DISC_IRQ, | 2534 | retval = request_irq(LUBBOCK_USB_DISC_IRQ, |
2535 | lubbock_vbus_irq, | 2535 | lubbock_vbus_irq, |
2536 | SA_INTERRUPT | SA_SAMPLE_RANDOM, | 2536 | IRQF_DISABLED | IRQF_SAMPLE_RANDOM, |
2537 | driver_name, dev); | 2537 | driver_name, dev); |
2538 | if (retval != 0) { | 2538 | if (retval != 0) { |
2539 | printk(KERN_ERR "%s: can't get irq %i, err %d\n", | 2539 | printk(KERN_ERR "%s: can't get irq %i, err %d\n", |
@@ -2544,7 +2544,7 @@ lubbock_fail0: | |||
2544 | } | 2544 | } |
2545 | retval = request_irq(LUBBOCK_USB_IRQ, | 2545 | retval = request_irq(LUBBOCK_USB_IRQ, |
2546 | lubbock_vbus_irq, | 2546 | lubbock_vbus_irq, |
2547 | SA_INTERRUPT | SA_SAMPLE_RANDOM, | 2547 | IRQF_DISABLED | IRQF_SAMPLE_RANDOM, |
2548 | driver_name, dev); | 2548 | driver_name, dev); |
2549 | if (retval != 0) { | 2549 | if (retval != 0) { |
2550 | printk(KERN_ERR "%s: can't get irq %i, err %d\n", | 2550 | printk(KERN_ERR "%s: can't get irq %i, err %d\n", |
diff --git a/drivers/usb/host/ehci-au1xxx.c b/drivers/usb/host/ehci-au1xxx.c index 9b4697add313..d66867aa527e 100644 --- a/drivers/usb/host/ehci-au1xxx.c +++ b/drivers/usb/host/ehci-au1xxx.c | |||
@@ -148,7 +148,7 @@ int usb_ehci_au1xxx_probe(const struct hc_driver *driver, | |||
148 | /* ehci_hcd_init(hcd_to_ehci(hcd)); */ | 148 | /* ehci_hcd_init(hcd_to_ehci(hcd)); */ |
149 | 149 | ||
150 | retval = | 150 | retval = |
151 | usb_add_hcd(hcd, dev->resource[1].start, SA_INTERRUPT | SA_SHIRQ); | 151 | usb_add_hcd(hcd, dev->resource[1].start, IRQF_DISABLED | IRQF_SHARED); |
152 | if (retval == 0) | 152 | if (retval == 0) |
153 | return retval; | 153 | return retval; |
154 | 154 | ||
diff --git a/drivers/usb/host/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c index a49a689bf423..d030516edfb9 100644 --- a/drivers/usb/host/ehci-fsl.c +++ b/drivers/usb/host/ehci-fsl.c | |||
@@ -121,7 +121,7 @@ int usb_hcd_fsl_probe(const struct hc_driver *driver, | |||
121 | temp = in_le32(hcd->regs + 0x1a8); | 121 | temp = in_le32(hcd->regs + 0x1a8); |
122 | out_le32(hcd->regs + 0x1a8, temp | 0x3); | 122 | out_le32(hcd->regs + 0x1a8, temp | 0x3); |
123 | 123 | ||
124 | retval = usb_add_hcd(hcd, irq, SA_SHIRQ); | 124 | retval = usb_add_hcd(hcd, irq, IRQF_SHARED); |
125 | if (retval != 0) | 125 | if (retval != 0) |
126 | goto err4; | 126 | goto err4; |
127 | return retval; | 127 | return retval; |
diff --git a/drivers/usb/host/isp116x-hcd.c b/drivers/usb/host/isp116x-hcd.c index 14386254c870..5147ed4a6662 100644 --- a/drivers/usb/host/isp116x-hcd.c +++ b/drivers/usb/host/isp116x-hcd.c | |||
@@ -1653,7 +1653,7 @@ static int __init isp116x_probe(struct platform_device *pdev) | |||
1653 | goto err6; | 1653 | goto err6; |
1654 | } | 1654 | } |
1655 | 1655 | ||
1656 | ret = usb_add_hcd(hcd, irq, SA_INTERRUPT); | 1656 | ret = usb_add_hcd(hcd, irq, IRQF_DISABLED); |
1657 | if (ret) | 1657 | if (ret) |
1658 | goto err6; | 1658 | goto err6; |
1659 | 1659 | ||
diff --git a/drivers/usb/host/ohci-at91.c b/drivers/usb/host/ohci-at91.c index 6b7350b52419..cdbafb710000 100644 --- a/drivers/usb/host/ohci-at91.c +++ b/drivers/usb/host/ohci-at91.c | |||
@@ -125,7 +125,7 @@ int usb_hcd_at91_probe (const struct hc_driver *driver, struct platform_device * | |||
125 | at91_start_hc(pdev); | 125 | at91_start_hc(pdev); |
126 | ohci_hcd_init(hcd_to_ohci(hcd)); | 126 | ohci_hcd_init(hcd_to_ohci(hcd)); |
127 | 127 | ||
128 | retval = usb_add_hcd(hcd, pdev->resource[1].start, SA_INTERRUPT); | 128 | retval = usb_add_hcd(hcd, pdev->resource[1].start, IRQF_DISABLED); |
129 | if (retval == 0) | 129 | if (retval == 0) |
130 | return retval; | 130 | return retval; |
131 | 131 | ||
diff --git a/drivers/usb/host/ohci-au1xxx.c b/drivers/usb/host/ohci-au1xxx.c index a1c8b3b2fcc7..689261e44018 100644 --- a/drivers/usb/host/ohci-au1xxx.c +++ b/drivers/usb/host/ohci-au1xxx.c | |||
@@ -191,7 +191,7 @@ static int usb_ohci_au1xxx_probe(const struct hc_driver *driver, | |||
191 | au1xxx_start_ohc(dev); | 191 | au1xxx_start_ohc(dev); |
192 | ohci_hcd_init(hcd_to_ohci(hcd)); | 192 | ohci_hcd_init(hcd_to_ohci(hcd)); |
193 | 193 | ||
194 | retval = usb_add_hcd(hcd, dev->resource[1].start, SA_INTERRUPT | SA_SHIRQ); | 194 | retval = usb_add_hcd(hcd, dev->resource[1].start, IRQF_DISABLED | IRQF_SHARED); |
195 | if (retval == 0) | 195 | if (retval == 0) |
196 | return retval; | 196 | return retval; |
197 | 197 | ||
diff --git a/drivers/usb/host/ohci-lh7a404.c b/drivers/usb/host/ohci-lh7a404.c index 0020ed7a39d0..5602da9bd52c 100644 --- a/drivers/usb/host/ohci-lh7a404.c +++ b/drivers/usb/host/ohci-lh7a404.c | |||
@@ -100,7 +100,7 @@ int usb_hcd_lh7a404_probe (const struct hc_driver *driver, | |||
100 | lh7a404_start_hc(dev); | 100 | lh7a404_start_hc(dev); |
101 | ohci_hcd_init(hcd_to_ohci(hcd)); | 101 | ohci_hcd_init(hcd_to_ohci(hcd)); |
102 | 102 | ||
103 | retval = usb_add_hcd(hcd, dev->resource[1].start, SA_INTERRUPT); | 103 | retval = usb_add_hcd(hcd, dev->resource[1].start, IRQF_DISABLED); |
104 | if (retval == 0) | 104 | if (retval == 0) |
105 | return retval; | 105 | return retval; |
106 | 106 | ||
diff --git a/drivers/usb/host/ohci-omap.c b/drivers/usb/host/ohci-omap.c index ca19abe01c53..c4c4babd4767 100644 --- a/drivers/usb/host/ohci-omap.c +++ b/drivers/usb/host/ohci-omap.c | |||
@@ -14,7 +14,7 @@ | |||
14 | * This file is licenced under the GPL. | 14 | * This file is licenced under the GPL. |
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include <linux/signal.h> /* SA_INTERRUPT */ | 17 | #include <linux/signal.h> /* IRQF_DISABLED */ |
18 | #include <linux/jiffies.h> | 18 | #include <linux/jiffies.h> |
19 | #include <linux/platform_device.h> | 19 | #include <linux/platform_device.h> |
20 | #include <linux/clk.h> | 20 | #include <linux/clk.h> |
@@ -334,7 +334,7 @@ int usb_hcd_omap_probe (const struct hc_driver *driver, | |||
334 | retval = -ENXIO; | 334 | retval = -ENXIO; |
335 | goto err2; | 335 | goto err2; |
336 | } | 336 | } |
337 | retval = usb_add_hcd(hcd, irq, SA_INTERRUPT); | 337 | retval = usb_add_hcd(hcd, irq, IRQF_DISABLED); |
338 | if (retval == 0) | 338 | if (retval == 0) |
339 | return retval; | 339 | return retval; |
340 | 340 | ||
diff --git a/drivers/usb/host/ohci-ppc-soc.c b/drivers/usb/host/ohci-ppc-soc.c index b2a8dfa48870..9fe56ff1615d 100644 --- a/drivers/usb/host/ohci-ppc-soc.c +++ b/drivers/usb/host/ohci-ppc-soc.c | |||
@@ -75,7 +75,7 @@ static int usb_hcd_ppc_soc_probe(const struct hc_driver *driver, | |||
75 | ohci->flags |= OHCI_BIG_ENDIAN; | 75 | ohci->flags |= OHCI_BIG_ENDIAN; |
76 | ohci_hcd_init(ohci); | 76 | ohci_hcd_init(ohci); |
77 | 77 | ||
78 | retval = usb_add_hcd(hcd, irq, SA_INTERRUPT); | 78 | retval = usb_add_hcd(hcd, irq, IRQF_DISABLED); |
79 | if (retval == 0) | 79 | if (retval == 0) |
80 | return retval; | 80 | return retval; |
81 | 81 | ||
diff --git a/drivers/usb/host/ohci-pxa27x.c b/drivers/usb/host/ohci-pxa27x.c index fafe7c1265b3..6f559e102789 100644 --- a/drivers/usb/host/ohci-pxa27x.c +++ b/drivers/usb/host/ohci-pxa27x.c | |||
@@ -190,7 +190,7 @@ int usb_hcd_pxa27x_probe (const struct hc_driver *driver, struct platform_device | |||
190 | 190 | ||
191 | ohci_hcd_init(hcd_to_ohci(hcd)); | 191 | ohci_hcd_init(hcd_to_ohci(hcd)); |
192 | 192 | ||
193 | retval = usb_add_hcd(hcd, pdev->resource[1].start, SA_INTERRUPT); | 193 | retval = usb_add_hcd(hcd, pdev->resource[1].start, IRQF_DISABLED); |
194 | if (retval == 0) | 194 | if (retval == 0) |
195 | return retval; | 195 | return retval; |
196 | 196 | ||
diff --git a/drivers/usb/host/ohci-s3c2410.c b/drivers/usb/host/ohci-s3c2410.c index 1da5de573a6f..d2fc6969a9f7 100644 --- a/drivers/usb/host/ohci-s3c2410.c +++ b/drivers/usb/host/ohci-s3c2410.c | |||
@@ -388,7 +388,7 @@ static int usb_hcd_s3c2410_probe (const struct hc_driver *driver, | |||
388 | 388 | ||
389 | ohci_hcd_init(hcd_to_ohci(hcd)); | 389 | ohci_hcd_init(hcd_to_ohci(hcd)); |
390 | 390 | ||
391 | retval = usb_add_hcd(hcd, dev->resource[1].start, SA_INTERRUPT); | 391 | retval = usb_add_hcd(hcd, dev->resource[1].start, IRQF_DISABLED); |
392 | if (retval != 0) | 392 | if (retval != 0) |
393 | goto err_ioremap; | 393 | goto err_ioremap; |
394 | 394 | ||
diff --git a/drivers/usb/host/ohci-sa1111.c b/drivers/usb/host/ohci-sa1111.c index fb3221ebbb29..ce3de106cadc 100644 --- a/drivers/usb/host/ohci-sa1111.c +++ b/drivers/usb/host/ohci-sa1111.c | |||
@@ -143,7 +143,7 @@ int usb_hcd_sa1111_probe (const struct hc_driver *driver, | |||
143 | sa1111_start_hc(dev); | 143 | sa1111_start_hc(dev); |
144 | ohci_hcd_init(hcd_to_ohci(hcd)); | 144 | ohci_hcd_init(hcd_to_ohci(hcd)); |
145 | 145 | ||
146 | retval = usb_add_hcd(hcd, dev->irq[1], SA_INTERRUPT); | 146 | retval = usb_add_hcd(hcd, dev->irq[1], IRQF_DISABLED); |
147 | if (retval == 0) | 147 | if (retval == 0) |
148 | return retval; | 148 | return retval; |
149 | 149 | ||
diff --git a/drivers/usb/host/sl811-hcd.c b/drivers/usb/host/sl811-hcd.c index c327168255cd..fa34092bbcde 100644 --- a/drivers/usb/host/sl811-hcd.c +++ b/drivers/usb/host/sl811-hcd.c | |||
@@ -1749,7 +1749,7 @@ sl811h_probe(struct platform_device *dev) | |||
1749 | * was on a system with single edge triggering, so most sorts of | 1749 | * was on a system with single edge triggering, so most sorts of |
1750 | * triggering arrangement should work. | 1750 | * triggering arrangement should work. |
1751 | */ | 1751 | */ |
1752 | retval = usb_add_hcd(hcd, irq, SA_INTERRUPT | SA_SHIRQ); | 1752 | retval = usb_add_hcd(hcd, irq, IRQF_DISABLED | IRQF_SHARED); |
1753 | if (retval != 0) | 1753 | if (retval != 0) |
1754 | goto err6; | 1754 | goto err6; |
1755 | 1755 | ||
diff --git a/drivers/video/arcfb.c b/drivers/video/arcfb.c index 466042808daf..fd95c2dbd4f7 100644 --- a/drivers/video/arcfb.c +++ b/drivers/video/arcfb.c | |||
@@ -561,7 +561,7 @@ static int __init arcfb_probe(struct platform_device *dev) | |||
561 | platform_set_drvdata(dev, info); | 561 | platform_set_drvdata(dev, info); |
562 | if (irq) { | 562 | if (irq) { |
563 | par->irq = irq; | 563 | par->irq = irq; |
564 | if (request_irq(par->irq, &arcfb_interrupt, SA_SHIRQ, | 564 | if (request_irq(par->irq, &arcfb_interrupt, IRQF_SHARED, |
565 | "arcfb", info)) { | 565 | "arcfb", info)) { |
566 | printk(KERN_INFO | 566 | printk(KERN_INFO |
567 | "arcfb: Failed req IRQ %d\n", par->irq); | 567 | "arcfb: Failed req IRQ %d\n", par->irq); |
diff --git a/drivers/video/aty/atyfb_base.c b/drivers/video/aty/atyfb_base.c index 85fcd22e6ed5..0c9706746d79 100644 --- a/drivers/video/aty/atyfb_base.c +++ b/drivers/video/aty/atyfb_base.c | |||
@@ -1567,7 +1567,7 @@ static int aty_enable_irq(struct atyfb_par *par, int reenable) | |||
1567 | u32 int_cntl; | 1567 | u32 int_cntl; |
1568 | 1568 | ||
1569 | if (!test_and_set_bit(0, &par->irq_flags)) { | 1569 | if (!test_and_set_bit(0, &par->irq_flags)) { |
1570 | if (request_irq(par->irq, aty_irq, SA_SHIRQ, "atyfb", par)) { | 1570 | if (request_irq(par->irq, aty_irq, IRQF_SHARED, "atyfb", par)) { |
1571 | clear_bit(0, &par->irq_flags); | 1571 | clear_bit(0, &par->irq_flags); |
1572 | return -EINVAL; | 1572 | return -EINVAL; |
1573 | } | 1573 | } |
diff --git a/drivers/video/au1200fb.c b/drivers/video/au1200fb.c index 600d3e0e08b7..c6a5f0ccc107 100644 --- a/drivers/video/au1200fb.c +++ b/drivers/video/au1200fb.c | |||
@@ -1694,7 +1694,7 @@ static int au1200fb_drv_probe(struct device *dev) | |||
1694 | 1694 | ||
1695 | /* Now hook interrupt too */ | 1695 | /* Now hook interrupt too */ |
1696 | if ((ret = request_irq(AU1200_LCD_INT, au1200fb_handle_irq, | 1696 | if ((ret = request_irq(AU1200_LCD_INT, au1200fb_handle_irq, |
1697 | SA_INTERRUPT | SA_SHIRQ, "lcd", (void *)dev)) < 0) { | 1697 | IRQF_DISABLED | IRQF_SHARED, "lcd", (void *)dev)) < 0) { |
1698 | print_err("fail to request interrupt line %d (err: %d)", | 1698 | print_err("fail to request interrupt line %d (err: %d)", |
1699 | AU1200_LCD_INT, ret); | 1699 | AU1200_LCD_INT, ret); |
1700 | goto failed; | 1700 | goto failed; |
diff --git a/drivers/video/matrox/matroxfb_base.c b/drivers/video/matrox/matroxfb_base.c index 8b5bf7972ee3..4a57dabb77d4 100644 --- a/drivers/video/matrox/matroxfb_base.c +++ b/drivers/video/matrox/matroxfb_base.c | |||
@@ -233,7 +233,7 @@ int matroxfb_enable_irq(WPMINFO int reenable) { | |||
233 | 233 | ||
234 | if (!test_and_set_bit(0, &ACCESS_FBINFO(irq_flags))) { | 234 | if (!test_and_set_bit(0, &ACCESS_FBINFO(irq_flags))) { |
235 | if (request_irq(ACCESS_FBINFO(pcidev)->irq, matrox_irq, | 235 | if (request_irq(ACCESS_FBINFO(pcidev)->irq, matrox_irq, |
236 | SA_SHIRQ, "matroxfb", MINFO)) { | 236 | IRQF_SHARED, "matroxfb", MINFO)) { |
237 | clear_bit(0, &ACCESS_FBINFO(irq_flags)); | 237 | clear_bit(0, &ACCESS_FBINFO(irq_flags)); |
238 | return -EINVAL; | 238 | return -EINVAL; |
239 | } | 239 | } |
diff --git a/drivers/video/pxafb.c b/drivers/video/pxafb.c index 54663a9baf43..bbb07106cd54 100644 --- a/drivers/video/pxafb.c +++ b/drivers/video/pxafb.c | |||
@@ -1334,7 +1334,7 @@ int __init pxafb_probe(struct platform_device *dev) | |||
1334 | goto failed; | 1334 | goto failed; |
1335 | } | 1335 | } |
1336 | 1336 | ||
1337 | ret = request_irq(IRQ_LCD, pxafb_handle_irq, SA_INTERRUPT, "LCD", fbi); | 1337 | ret = request_irq(IRQ_LCD, pxafb_handle_irq, IRQF_DISABLED, "LCD", fbi); |
1338 | if (ret) { | 1338 | if (ret) { |
1339 | dev_err(&dev->dev, "request_irq failed: %d\n", ret); | 1339 | dev_err(&dev->dev, "request_irq failed: %d\n", ret); |
1340 | ret = -EBUSY; | 1340 | ret = -EBUSY; |
diff --git a/drivers/video/s3c2410fb.c b/drivers/video/s3c2410fb.c index fbc411850686..f461eb10cc79 100644 --- a/drivers/video/s3c2410fb.c +++ b/drivers/video/s3c2410fb.c | |||
@@ -735,7 +735,7 @@ static int __init s3c2410fb_probe(struct platform_device *pdev) | |||
735 | 735 | ||
736 | dprintk("got LCD region\n"); | 736 | dprintk("got LCD region\n"); |
737 | 737 | ||
738 | ret = request_irq(irq, s3c2410fb_irq, SA_INTERRUPT, pdev->name, info); | 738 | ret = request_irq(irq, s3c2410fb_irq, IRQF_DISABLED, pdev->name, info); |
739 | if (ret) { | 739 | if (ret) { |
740 | dev_err(&pdev->dev, "cannot get irq %d - err %d\n", irq, ret); | 740 | dev_err(&pdev->dev, "cannot get irq %d - err %d\n", irq, ret); |
741 | ret = -EBUSY; | 741 | ret = -EBUSY; |
diff --git a/drivers/video/sa1100fb.c b/drivers/video/sa1100fb.c index 553fd84af44f..a2e6e7205d7e 100644 --- a/drivers/video/sa1100fb.c +++ b/drivers/video/sa1100fb.c | |||
@@ -1472,7 +1472,7 @@ static int __init sa1100fb_probe(struct platform_device *pdev) | |||
1472 | if (ret) | 1472 | if (ret) |
1473 | goto failed; | 1473 | goto failed; |
1474 | 1474 | ||
1475 | ret = request_irq(irq, sa1100fb_handle_irq, SA_INTERRUPT, | 1475 | ret = request_irq(irq, sa1100fb_handle_irq, IRQF_DISABLED, |
1476 | "LCD", fbi); | 1476 | "LCD", fbi); |
1477 | if (ret) { | 1477 | if (ret) { |
1478 | printk(KERN_ERR "sa1100fb: request_irq failed: %d\n", ret); | 1478 | printk(KERN_ERR "sa1100fb: request_irq failed: %d\n", ret); |
diff --git a/fs/reiserfs/inode.c b/fs/reiserfs/inode.c index 477eaa2fcf6a..12dfdcfbee3d 100644 --- a/fs/reiserfs/inode.c +++ b/fs/reiserfs/inode.c | |||
@@ -2932,6 +2932,11 @@ int reiserfs_setattr(struct dentry *dentry, struct iattr *attr) | |||
2932 | } | 2932 | } |
2933 | if (error) | 2933 | if (error) |
2934 | goto out; | 2934 | goto out; |
2935 | /* | ||
2936 | * file size is changed, ctime and mtime are | ||
2937 | * to be updated | ||
2938 | */ | ||
2939 | attr->ia_valid |= (ATTR_MTIME | ATTR_CTIME); | ||
2935 | } | 2940 | } |
2936 | } | 2941 | } |
2937 | 2942 | ||
diff --git a/fs/ufs/balloc.c b/fs/ufs/balloc.c index 95b878e5c7a0..b01804baa120 100644 --- a/fs/ufs/balloc.c +++ b/fs/ufs/balloc.c | |||
@@ -217,48 +217,6 @@ failed: | |||
217 | return; | 217 | return; |
218 | } | 218 | } |
219 | 219 | ||
220 | static struct page *ufs_get_locked_page(struct address_space *mapping, | ||
221 | unsigned long index) | ||
222 | { | ||
223 | struct page *page; | ||
224 | |||
225 | try_again: | ||
226 | page = find_lock_page(mapping, index); | ||
227 | if (!page) { | ||
228 | page = read_cache_page(mapping, index, | ||
229 | (filler_t*)mapping->a_ops->readpage, | ||
230 | NULL); | ||
231 | if (IS_ERR(page)) { | ||
232 | printk(KERN_ERR "ufs_change_blocknr: " | ||
233 | "read_cache_page error: ino %lu, index: %lu\n", | ||
234 | mapping->host->i_ino, index); | ||
235 | goto out; | ||
236 | } | ||
237 | |||
238 | lock_page(page); | ||
239 | |||
240 | if (!PageUptodate(page) || PageError(page)) { | ||
241 | unlock_page(page); | ||
242 | page_cache_release(page); | ||
243 | |||
244 | printk(KERN_ERR "ufs_change_blocknr: " | ||
245 | "can not read page: ino %lu, index: %lu\n", | ||
246 | mapping->host->i_ino, index); | ||
247 | |||
248 | page = ERR_PTR(-EIO); | ||
249 | goto out; | ||
250 | } | ||
251 | } | ||
252 | |||
253 | if (unlikely(!page->mapping || !page_has_buffers(page))) { | ||
254 | unlock_page(page); | ||
255 | page_cache_release(page); | ||
256 | goto try_again;/*we really need these buffers*/ | ||
257 | } | ||
258 | out: | ||
259 | return page; | ||
260 | } | ||
261 | |||
262 | /* | 220 | /* |
263 | * Modify inode page cache in such way: | 221 | * Modify inode page cache in such way: |
264 | * have - blocks with b_blocknr equal to oldb...oldb+count-1 | 222 | * have - blocks with b_blocknr equal to oldb...oldb+count-1 |
@@ -311,10 +269,8 @@ static void ufs_change_blocknr(struct inode *inode, unsigned int baseblk, | |||
311 | 269 | ||
312 | set_page_dirty(page); | 270 | set_page_dirty(page); |
313 | 271 | ||
314 | if (likely(cur_index != index)) { | 272 | if (likely(cur_index != index)) |
315 | unlock_page(page); | 273 | ufs_put_locked_page(page); |
316 | page_cache_release(page); | ||
317 | } | ||
318 | } | 274 | } |
319 | UFSD("EXIT\n"); | 275 | UFSD("EXIT\n"); |
320 | } | 276 | } |
diff --git a/fs/ufs/file.c b/fs/ufs/file.c index 0e5001512a9d..a9c6e5f04fae 100644 --- a/fs/ufs/file.c +++ b/fs/ufs/file.c | |||
@@ -60,7 +60,3 @@ const struct file_operations ufs_file_operations = { | |||
60 | .fsync = ufs_sync_file, | 60 | .fsync = ufs_sync_file, |
61 | .sendfile = generic_file_sendfile, | 61 | .sendfile = generic_file_sendfile, |
62 | }; | 62 | }; |
63 | |||
64 | struct inode_operations ufs_file_inode_operations = { | ||
65 | .truncate = ufs_truncate, | ||
66 | }; | ||
diff --git a/fs/ufs/inode.c b/fs/ufs/inode.c index 488b5ff48afb..e7c8615beb65 100644 --- a/fs/ufs/inode.c +++ b/fs/ufs/inode.c | |||
@@ -843,14 +843,17 @@ int ufs_sync_inode (struct inode *inode) | |||
843 | 843 | ||
844 | void ufs_delete_inode (struct inode * inode) | 844 | void ufs_delete_inode (struct inode * inode) |
845 | { | 845 | { |
846 | loff_t old_i_size; | ||
847 | |||
846 | truncate_inode_pages(&inode->i_data, 0); | 848 | truncate_inode_pages(&inode->i_data, 0); |
847 | /*UFS_I(inode)->i_dtime = CURRENT_TIME;*/ | 849 | /*UFS_I(inode)->i_dtime = CURRENT_TIME;*/ |
848 | lock_kernel(); | 850 | lock_kernel(); |
849 | mark_inode_dirty(inode); | 851 | mark_inode_dirty(inode); |
850 | ufs_update_inode(inode, IS_SYNC(inode)); | 852 | ufs_update_inode(inode, IS_SYNC(inode)); |
853 | old_i_size = inode->i_size; | ||
851 | inode->i_size = 0; | 854 | inode->i_size = 0; |
852 | if (inode->i_blocks) | 855 | if (inode->i_blocks && ufs_truncate(inode, old_i_size)) |
853 | ufs_truncate (inode); | 856 | ufs_warning(inode->i_sb, __FUNCTION__, "ufs_truncate failed\n"); |
854 | ufs_free_inode (inode); | 857 | ufs_free_inode (inode); |
855 | unlock_kernel(); | 858 | unlock_kernel(); |
856 | } | 859 | } |
diff --git a/fs/ufs/truncate.c b/fs/ufs/truncate.c index 3c3b301f8701..c9b55872079b 100644 --- a/fs/ufs/truncate.c +++ b/fs/ufs/truncate.c | |||
@@ -369,24 +369,97 @@ static int ufs_trunc_tindirect (struct inode * inode) | |||
369 | UFSD("EXIT\n"); | 369 | UFSD("EXIT\n"); |
370 | return retry; | 370 | return retry; |
371 | } | 371 | } |
372 | 372 | ||
373 | void ufs_truncate (struct inode * inode) | 373 | static int ufs_alloc_lastblock(struct inode *inode) |
374 | { | 374 | { |
375 | int err = 0; | ||
376 | struct address_space *mapping = inode->i_mapping; | ||
377 | struct ufs_sb_private_info *uspi = UFS_SB(inode->i_sb)->s_uspi; | ||
375 | struct ufs_inode_info *ufsi = UFS_I(inode); | 378 | struct ufs_inode_info *ufsi = UFS_I(inode); |
376 | struct super_block * sb; | 379 | unsigned lastfrag, i, end; |
377 | struct ufs_sb_private_info * uspi; | 380 | struct page *lastpage; |
378 | int retry; | 381 | struct buffer_head *bh; |
382 | |||
383 | lastfrag = (i_size_read(inode) + uspi->s_fsize - 1) >> uspi->s_fshift; | ||
384 | |||
385 | if (!lastfrag) { | ||
386 | ufsi->i_lastfrag = 0; | ||
387 | goto out; | ||
388 | } | ||
389 | lastfrag--; | ||
390 | |||
391 | lastpage = ufs_get_locked_page(mapping, lastfrag >> | ||
392 | (PAGE_CACHE_SHIFT - inode->i_blkbits)); | ||
393 | if (IS_ERR(lastpage)) { | ||
394 | err = -EIO; | ||
395 | goto out; | ||
396 | } | ||
397 | |||
398 | end = lastfrag & ((1 << (PAGE_CACHE_SHIFT - inode->i_blkbits)) - 1); | ||
399 | bh = page_buffers(lastpage); | ||
400 | for (i = 0; i < end; ++i) | ||
401 | bh = bh->b_this_page; | ||
402 | |||
403 | if (!buffer_mapped(bh)) { | ||
404 | err = ufs_getfrag_block(inode, lastfrag, bh, 1); | ||
405 | |||
406 | if (unlikely(err)) | ||
407 | goto out_unlock; | ||
408 | |||
409 | if (buffer_new(bh)) { | ||
410 | clear_buffer_new(bh); | ||
411 | unmap_underlying_metadata(bh->b_bdev, | ||
412 | bh->b_blocknr); | ||
413 | /* | ||
414 | * we do not zeroize fragment, because of | ||
415 | * if it maped to hole, it already contains zeroes | ||
416 | */ | ||
417 | set_buffer_uptodate(bh); | ||
418 | mark_buffer_dirty(bh); | ||
419 | set_page_dirty(lastpage); | ||
420 | } | ||
421 | } | ||
422 | out_unlock: | ||
423 | ufs_put_locked_page(lastpage); | ||
424 | out: | ||
425 | return err; | ||
426 | } | ||
427 | |||
428 | int ufs_truncate(struct inode *inode, loff_t old_i_size) | ||
429 | { | ||
430 | struct ufs_inode_info *ufsi = UFS_I(inode); | ||
431 | struct super_block *sb = inode->i_sb; | ||
432 | struct ufs_sb_private_info *uspi = UFS_SB(sb)->s_uspi; | ||
433 | int retry, err = 0; | ||
379 | 434 | ||
380 | UFSD("ENTER\n"); | 435 | UFSD("ENTER\n"); |
381 | sb = inode->i_sb; | ||
382 | uspi = UFS_SB(sb)->s_uspi; | ||
383 | 436 | ||
384 | if (!(S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode) || S_ISLNK(inode->i_mode))) | 437 | if (!(S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode) || |
385 | return; | 438 | S_ISLNK(inode->i_mode))) |
439 | return -EINVAL; | ||
386 | if (IS_APPEND(inode) || IS_IMMUTABLE(inode)) | 440 | if (IS_APPEND(inode) || IS_IMMUTABLE(inode)) |
387 | return; | 441 | return -EPERM; |
442 | |||
443 | if (inode->i_size > old_i_size) { | ||
444 | /* | ||
445 | * if we expand file we should care about | ||
446 | * allocation of block for last byte first of all | ||
447 | */ | ||
448 | err = ufs_alloc_lastblock(inode); | ||
449 | |||
450 | if (err) { | ||
451 | i_size_write(inode, old_i_size); | ||
452 | goto out; | ||
453 | } | ||
454 | /* | ||
455 | * go away, because of we expand file, and we do not | ||
456 | * need free blocks, and zeroizes page | ||
457 | */ | ||
458 | lock_kernel(); | ||
459 | goto almost_end; | ||
460 | } | ||
388 | 461 | ||
389 | block_truncate_page(inode->i_mapping, inode->i_size, ufs_getfrag_block); | 462 | block_truncate_page(inode->i_mapping, inode->i_size, ufs_getfrag_block); |
390 | 463 | ||
391 | lock_kernel(); | 464 | lock_kernel(); |
392 | while (1) { | 465 | while (1) { |
@@ -404,9 +477,58 @@ void ufs_truncate (struct inode * inode) | |||
404 | yield(); | 477 | yield(); |
405 | } | 478 | } |
406 | 479 | ||
480 | if (inode->i_size < old_i_size) { | ||
481 | /* | ||
482 | * now we should have enough space | ||
483 | * to allocate block for last byte | ||
484 | */ | ||
485 | err = ufs_alloc_lastblock(inode); | ||
486 | if (err) | ||
487 | /* | ||
488 | * looks like all the same - we have no space, | ||
489 | * but we truncate file already | ||
490 | */ | ||
491 | inode->i_size = (ufsi->i_lastfrag - 1) * uspi->s_fsize; | ||
492 | } | ||
493 | almost_end: | ||
407 | inode->i_mtime = inode->i_ctime = CURRENT_TIME_SEC; | 494 | inode->i_mtime = inode->i_ctime = CURRENT_TIME_SEC; |
408 | ufsi->i_lastfrag = DIRECT_FRAGMENT; | ||
409 | unlock_kernel(); | 495 | unlock_kernel(); |
410 | mark_inode_dirty(inode); | 496 | mark_inode_dirty(inode); |
411 | UFSD("EXIT\n"); | 497 | out: |
498 | UFSD("EXIT: err %d\n", err); | ||
499 | return err; | ||
412 | } | 500 | } |
501 | |||
502 | |||
503 | /* | ||
504 | * We don't define our `inode->i_op->truncate', and call it here, | ||
505 | * because of: | ||
506 | * - there is no way to know old size | ||
507 | * - there is no way inform user about error, if it happens in `truncate' | ||
508 | */ | ||
509 | static int ufs_setattr(struct dentry *dentry, struct iattr *attr) | ||
510 | { | ||
511 | struct inode *inode = dentry->d_inode; | ||
512 | unsigned int ia_valid = attr->ia_valid; | ||
513 | int error; | ||
514 | |||
515 | error = inode_change_ok(inode, attr); | ||
516 | if (error) | ||
517 | return error; | ||
518 | |||
519 | if (ia_valid & ATTR_SIZE && | ||
520 | attr->ia_size != i_size_read(inode)) { | ||
521 | loff_t old_i_size = inode->i_size; | ||
522 | error = vmtruncate(inode, attr->ia_size); | ||
523 | if (error) | ||
524 | return error; | ||
525 | error = ufs_truncate(inode, old_i_size); | ||
526 | if (error) | ||
527 | return error; | ||
528 | } | ||
529 | return inode_setattr(inode, attr); | ||
530 | } | ||
531 | |||
532 | struct inode_operations ufs_file_inode_operations = { | ||
533 | .setattr = ufs_setattr, | ||
534 | }; | ||
diff --git a/fs/ufs/util.c b/fs/ufs/util.c index a2f13f45708b..337cf2c46d10 100644 --- a/fs/ufs/util.c +++ b/fs/ufs/util.c | |||
@@ -233,3 +233,57 @@ ufs_set_inode_dev(struct super_block *sb, struct ufs_inode_info *ufsi, dev_t dev | |||
233 | else | 233 | else |
234 | ufsi->i_u1.i_data[0] = fs32; | 234 | ufsi->i_u1.i_data[0] = fs32; |
235 | } | 235 | } |
236 | |||
237 | /** | ||
238 | * ufs_get_locked_page() - locate, pin and lock a pagecache page, if not exist | ||
239 | * read it from disk. | ||
240 | * @mapping: the address_space to search | ||
241 | * @index: the page index | ||
242 | * | ||
243 | * Locates the desired pagecache page, if not exist we'll read it, | ||
244 | * locks it, increments its reference | ||
245 | * count and returns its address. | ||
246 | * | ||
247 | */ | ||
248 | |||
249 | struct page *ufs_get_locked_page(struct address_space *mapping, | ||
250 | pgoff_t index) | ||
251 | { | ||
252 | struct page *page; | ||
253 | |||
254 | try_again: | ||
255 | page = find_lock_page(mapping, index); | ||
256 | if (!page) { | ||
257 | page = read_cache_page(mapping, index, | ||
258 | (filler_t*)mapping->a_ops->readpage, | ||
259 | NULL); | ||
260 | if (IS_ERR(page)) { | ||
261 | printk(KERN_ERR "ufs_change_blocknr: " | ||
262 | "read_cache_page error: ino %lu, index: %lu\n", | ||
263 | mapping->host->i_ino, index); | ||
264 | goto out; | ||
265 | } | ||
266 | |||
267 | lock_page(page); | ||
268 | |||
269 | if (!PageUptodate(page) || PageError(page)) { | ||
270 | unlock_page(page); | ||
271 | page_cache_release(page); | ||
272 | |||
273 | printk(KERN_ERR "ufs_change_blocknr: " | ||
274 | "can not read page: ino %lu, index: %lu\n", | ||
275 | mapping->host->i_ino, index); | ||
276 | |||
277 | page = ERR_PTR(-EIO); | ||
278 | goto out; | ||
279 | } | ||
280 | } | ||
281 | |||
282 | if (unlikely(!page->mapping || !page_has_buffers(page))) { | ||
283 | unlock_page(page); | ||
284 | page_cache_release(page); | ||
285 | goto try_again;/*we really need these buffers*/ | ||
286 | } | ||
287 | out: | ||
288 | return page; | ||
289 | } | ||
diff --git a/fs/ufs/util.h b/fs/ufs/util.h index 406981fff5e7..28fce6c239b5 100644 --- a/fs/ufs/util.h +++ b/fs/ufs/util.h | |||
@@ -251,6 +251,14 @@ extern void _ubh_ubhcpymem_(struct ufs_sb_private_info *, unsigned char *, struc | |||
251 | #define ubh_memcpyubh(ubh,mem,size) _ubh_memcpyubh_(uspi,ubh,mem,size) | 251 | #define ubh_memcpyubh(ubh,mem,size) _ubh_memcpyubh_(uspi,ubh,mem,size) |
252 | extern void _ubh_memcpyubh_(struct ufs_sb_private_info *, struct ufs_buffer_head *, unsigned char *, unsigned); | 252 | extern void _ubh_memcpyubh_(struct ufs_sb_private_info *, struct ufs_buffer_head *, unsigned char *, unsigned); |
253 | 253 | ||
254 | /* This functions works with cache pages*/ | ||
255 | extern struct page *ufs_get_locked_page(struct address_space *mapping, | ||
256 | pgoff_t index); | ||
257 | static inline void ufs_put_locked_page(struct page *page) | ||
258 | { | ||
259 | unlock_page(page); | ||
260 | page_cache_release(page); | ||
261 | } | ||
254 | 262 | ||
255 | 263 | ||
256 | /* | 264 | /* |
diff --git a/include/asm-alpha/floppy.h b/include/asm-alpha/floppy.h index 21816d35ef89..6a9f02af9529 100644 --- a/include/asm-alpha/floppy.h +++ b/include/asm-alpha/floppy.h | |||
@@ -26,7 +26,7 @@ | |||
26 | #define fd_disable_irq() disable_irq(FLOPPY_IRQ) | 26 | #define fd_disable_irq() disable_irq(FLOPPY_IRQ) |
27 | #define fd_cacheflush(addr,size) /* nothing */ | 27 | #define fd_cacheflush(addr,size) /* nothing */ |
28 | #define fd_request_irq() request_irq(FLOPPY_IRQ, floppy_interrupt,\ | 28 | #define fd_request_irq() request_irq(FLOPPY_IRQ, floppy_interrupt,\ |
29 | SA_INTERRUPT, "floppy", NULL) | 29 | IRQF_DISABLED, "floppy", NULL) |
30 | #define fd_free_irq() free_irq(FLOPPY_IRQ, NULL); | 30 | #define fd_free_irq() free_irq(FLOPPY_IRQ, NULL); |
31 | 31 | ||
32 | #ifdef CONFIG_PCI | 32 | #ifdef CONFIG_PCI |
diff --git a/include/asm-alpha/signal.h b/include/asm-alpha/signal.h index 1a2c52a056fb..13c2305d35ef 100644 --- a/include/asm-alpha/signal.h +++ b/include/asm-alpha/signal.h | |||
@@ -77,7 +77,6 @@ typedef unsigned long sigset_t; | |||
77 | * SA_FLAGS values: | 77 | * SA_FLAGS values: |
78 | * | 78 | * |
79 | * SA_ONSTACK indicates that a registered stack_t will be used. | 79 | * SA_ONSTACK indicates that a registered stack_t will be used. |
80 | * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the | ||
81 | * SA_RESTART flag to get restarting signals (which were the default long ago) | 80 | * SA_RESTART flag to get restarting signals (which were the default long ago) |
82 | * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. | 81 | * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. |
83 | * SA_RESETHAND clears the handler when the signal is delivered. | 82 | * SA_RESETHAND clears the handler when the signal is delivered. |
@@ -98,7 +97,6 @@ typedef unsigned long sigset_t; | |||
98 | 97 | ||
99 | #define SA_ONESHOT SA_RESETHAND | 98 | #define SA_ONESHOT SA_RESETHAND |
100 | #define SA_NOMASK SA_NODEFER | 99 | #define SA_NOMASK SA_NODEFER |
101 | #define SA_INTERRUPT 0x20000000 /* dummy -- ignored */ | ||
102 | 100 | ||
103 | /* | 101 | /* |
104 | * sigaltstack controls | 102 | * sigaltstack controls |
diff --git a/include/asm-arm/arch-omap/board-fsample.h b/include/asm-arm/arch-omap/board-fsample.h new file mode 100644 index 000000000000..89a1e529fb6f --- /dev/null +++ b/include/asm-arm/arch-omap/board-fsample.h | |||
@@ -0,0 +1,51 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-omap/board-fsample.h | ||
3 | * | ||
4 | * Board-specific goodies for TI F-Sample. | ||
5 | * | ||
6 | * Copyright (C) 2006 Google, Inc. | ||
7 | * Author: Brian Swetland <swetland@google.com> | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify | ||
10 | * it under the terms of the GNU General Public License version 2 as | ||
11 | * published by the Free Software Foundation. | ||
12 | */ | ||
13 | |||
14 | #ifndef __ASM_ARCH_OMAP_FSAMPLE_H | ||
15 | #define __ASM_ARCH_OMAP_FSAMPLE_H | ||
16 | |||
17 | /* fsample is pretty close to p2-sample */ | ||
18 | #include <asm/arch/board-perseus2.h> | ||
19 | |||
20 | #define fsample_cpld_read(reg) __raw_readb(reg) | ||
21 | #define fsample_cpld_write(val, reg) __raw_writeb(val, reg) | ||
22 | |||
23 | #define FSAMPLE_CPLD_BASE 0xE8100000 | ||
24 | #define FSAMPLE_CPLD_SIZE SZ_4K | ||
25 | #define FSAMPLE_CPLD_START 0x05080000 | ||
26 | |||
27 | #define FSAMPLE_CPLD_REG_A (FSAMPLE_CPLD_BASE + 0x00) | ||
28 | #define FSAMPLE_CPLD_SWITCH (FSAMPLE_CPLD_BASE + 0x02) | ||
29 | #define FSAMPLE_CPLD_UART (FSAMPLE_CPLD_BASE + 0x02) | ||
30 | #define FSAMPLE_CPLD_REG_B (FSAMPLE_CPLD_BASE + 0x04) | ||
31 | #define FSAMPLE_CPLD_VERSION (FSAMPLE_CPLD_BASE + 0x06) | ||
32 | #define FSAMPLE_CPLD_SET_CLR (FSAMPLE_CPLD_BASE + 0x06) | ||
33 | |||
34 | #define FSAMPLE_CPLD_BIT_BT_RESET 0 | ||
35 | #define FSAMPLE_CPLD_BIT_LCD_RESET 1 | ||
36 | #define FSAMPLE_CPLD_BIT_CAM_PWDN 2 | ||
37 | #define FSAMPLE_CPLD_BIT_CHARGER_ENABLE 3 | ||
38 | #define FSAMPLE_CPLD_BIT_SD_MMC_EN 4 | ||
39 | #define FSAMPLE_CPLD_BIT_aGPS_PWREN 5 | ||
40 | #define FSAMPLE_CPLD_BIT_BACKLIGHT 6 | ||
41 | #define FSAMPLE_CPLD_BIT_aGPS_EN_RESET 7 | ||
42 | #define FSAMPLE_CPLD_BIT_aGPS_SLEEPx_N 8 | ||
43 | #define FSAMPLE_CPLD_BIT_OTG_RESET 9 | ||
44 | |||
45 | #define fsample_cpld_set(bit) \ | ||
46 | fsample_cpld_write((((bit) & 15) << 4) | 0x0f, FSAMPLE_CPLD_SET_CLR) | ||
47 | |||
48 | #define fsample_cpld_clear(bit) \ | ||
49 | fsample_cpld_write(0xf0 | ((bit) & 15), FSAMPLE_CPLD_SET_CLR) | ||
50 | |||
51 | #endif | ||
diff --git a/include/asm-arm/arch-omap/board.h b/include/asm-arm/arch-omap/board.h index dfdbf06fd646..edf1dc6ad919 100644 --- a/include/asm-arm/arch-omap/board.h +++ b/include/asm-arm/arch-omap/board.h | |||
@@ -22,6 +22,7 @@ | |||
22 | #define OMAP_TAG_UART 0x4f07 | 22 | #define OMAP_TAG_UART 0x4f07 |
23 | #define OMAP_TAG_FBMEM 0x4f08 | 23 | #define OMAP_TAG_FBMEM 0x4f08 |
24 | #define OMAP_TAG_STI_CONSOLE 0x4f09 | 24 | #define OMAP_TAG_STI_CONSOLE 0x4f09 |
25 | #define OMAP_TAG_CAMERA_SENSOR 0x4f0a | ||
25 | 26 | ||
26 | #define OMAP_TAG_BOOT_REASON 0x4f80 | 27 | #define OMAP_TAG_BOOT_REASON 0x4f80 |
27 | #define OMAP_TAG_FLASH_PART 0x4f81 | 28 | #define OMAP_TAG_FLASH_PART 0x4f81 |
@@ -61,6 +62,12 @@ struct omap_sti_console_config { | |||
61 | u8 channel; | 62 | u8 channel; |
62 | }; | 63 | }; |
63 | 64 | ||
65 | struct omap_camera_sensor_config { | ||
66 | u16 reset_gpio; | ||
67 | int (*power_on)(void * data); | ||
68 | int (*power_off)(void * data); | ||
69 | }; | ||
70 | |||
64 | struct omap_usb_config { | 71 | struct omap_usb_config { |
65 | /* Configure drivers according to the connectors on your board: | 72 | /* Configure drivers according to the connectors on your board: |
66 | * - "A" connector (rectagular) | 73 | * - "A" connector (rectagular) |
diff --git a/include/asm-arm/arch-omap/dma.h b/include/asm-arm/arch-omap/dma.h index ca1202312a45..1b1b02307e77 100644 --- a/include/asm-arm/arch-omap/dma.h +++ b/include/asm-arm/arch-omap/dma.h | |||
@@ -185,8 +185,8 @@ | |||
185 | /* DMA channels for 24xx */ | 185 | /* DMA channels for 24xx */ |
186 | #define OMAP24XX_DMA_NO_DEVICE 0 | 186 | #define OMAP24XX_DMA_NO_DEVICE 0 |
187 | #define OMAP24XX_DMA_XTI_DMA 1 /* S_DMA_0 */ | 187 | #define OMAP24XX_DMA_XTI_DMA 1 /* S_DMA_0 */ |
188 | #define OMAP24XX_DMA_EXT_NDMA_REQ0 2 /* S_DMA_1 */ | 188 | #define OMAP24XX_DMA_EXT_DMAREQ0 2 /* S_DMA_1 */ |
189 | #define OMAP24XX_DMA_EXT_NDMA_REQ1 3 /* S_DMA_2 */ | 189 | #define OMAP24XX_DMA_EXT_DMAREQ1 3 /* S_DMA_2 */ |
190 | #define OMAP24XX_DMA_GPMC 4 /* S_DMA_3 */ | 190 | #define OMAP24XX_DMA_GPMC 4 /* S_DMA_3 */ |
191 | #define OMAP24XX_DMA_GFX 5 /* S_DMA_4 */ | 191 | #define OMAP24XX_DMA_GFX 5 /* S_DMA_4 */ |
192 | #define OMAP24XX_DMA_DSS 6 /* S_DMA_5 */ | 192 | #define OMAP24XX_DMA_DSS 6 /* S_DMA_5 */ |
@@ -197,7 +197,9 @@ | |||
197 | #define OMAP24XX_DMA_DES_TX 11 /* S_DMA_10 */ | 197 | #define OMAP24XX_DMA_DES_TX 11 /* S_DMA_10 */ |
198 | #define OMAP24XX_DMA_DES_RX 12 /* S_DMA_11 */ | 198 | #define OMAP24XX_DMA_DES_RX 12 /* S_DMA_11 */ |
199 | #define OMAP24XX_DMA_SHA1MD5_RX 13 /* S_DMA_12 */ | 199 | #define OMAP24XX_DMA_SHA1MD5_RX 13 /* S_DMA_12 */ |
200 | 200 | #define OMAP24XX_DMA_EXT_DMAREQ2 14 /* S_DMA_13 */ | |
201 | #define OMAP24XX_DMA_EXT_DMAREQ3 15 /* S_DMA_14 */ | ||
202 | #define OMAP24XX_DMA_EXT_DMAREQ4 16 /* S_DMA_15 */ | ||
201 | #define OMAP24XX_DMA_EAC_AC_RD 17 /* S_DMA_16 */ | 203 | #define OMAP24XX_DMA_EAC_AC_RD 17 /* S_DMA_16 */ |
202 | #define OMAP24XX_DMA_EAC_AC_WR 18 /* S_DMA_17 */ | 204 | #define OMAP24XX_DMA_EAC_AC_WR 18 /* S_DMA_17 */ |
203 | #define OMAP24XX_DMA_EAC_MD_UL_RD 19 /* S_DMA_18 */ | 205 | #define OMAP24XX_DMA_EAC_MD_UL_RD 19 /* S_DMA_18 */ |
@@ -244,6 +246,7 @@ | |||
244 | #define OMAP24XX_DMA_MMC1_TX 61 /* SDMA_60 */ | 246 | #define OMAP24XX_DMA_MMC1_TX 61 /* SDMA_60 */ |
245 | #define OMAP24XX_DMA_MMC1_RX 62 /* SDMA_61 */ | 247 | #define OMAP24XX_DMA_MMC1_RX 62 /* SDMA_61 */ |
246 | #define OMAP24XX_DMA_MS 63 /* SDMA_62 */ | 248 | #define OMAP24XX_DMA_MS 63 /* SDMA_62 */ |
249 | #define OMAP24XX_DMA_EXT_DMAREQ5 64 /* S_DMA_63 */ | ||
247 | 250 | ||
248 | /*----------------------------------------------------------------------------*/ | 251 | /*----------------------------------------------------------------------------*/ |
249 | 252 | ||
@@ -274,7 +277,7 @@ | |||
274 | #define OMAP1610_DMA_LCD_LCH_CTRL (OMAP1610_DMA_LCD_BASE + 0xea) | 277 | #define OMAP1610_DMA_LCD_LCH_CTRL (OMAP1610_DMA_LCD_BASE + 0xea) |
275 | #define OMAP1610_DMA_LCD_SRC_FI_B1_U (OMAP1610_DMA_LCD_BASE + 0xf4) | 278 | #define OMAP1610_DMA_LCD_SRC_FI_B1_U (OMAP1610_DMA_LCD_BASE + 0xf4) |
276 | 279 | ||
277 | #define OMAP_DMA_TOUT_IRQ (1 << 0) /* Only on omap1 */ | 280 | #define OMAP1_DMA_TOUT_IRQ (1 << 0) |
278 | #define OMAP_DMA_DROP_IRQ (1 << 1) | 281 | #define OMAP_DMA_DROP_IRQ (1 << 1) |
279 | #define OMAP_DMA_HALF_IRQ (1 << 2) | 282 | #define OMAP_DMA_HALF_IRQ (1 << 2) |
280 | #define OMAP_DMA_FRAME_IRQ (1 << 3) | 283 | #define OMAP_DMA_FRAME_IRQ (1 << 3) |
@@ -315,11 +318,11 @@ enum { | |||
315 | OMAP_LCD_DMA_B2_BOTTOM | 318 | OMAP_LCD_DMA_B2_BOTTOM |
316 | }; | 319 | }; |
317 | 320 | ||
318 | /* REVISIT: Check if BURST_4 is really 1 (or 2) */ | ||
319 | enum omap_dma_burst_mode { | 321 | enum omap_dma_burst_mode { |
320 | OMAP_DMA_DATA_BURST_DIS = 0, | 322 | OMAP_DMA_DATA_BURST_DIS = 0, |
321 | OMAP_DMA_DATA_BURST_4, | 323 | OMAP_DMA_DATA_BURST_4, |
322 | OMAP_DMA_DATA_BURST_8 | 324 | OMAP_DMA_DATA_BURST_8, |
325 | OMAP_DMA_DATA_BURST_16, | ||
323 | }; | 326 | }; |
324 | 327 | ||
325 | enum omap_dma_color_mode { | 328 | enum omap_dma_color_mode { |
diff --git a/include/asm-arm/arch-omap/dmtimer.h b/include/asm-arm/arch-omap/dmtimer.h index e6522e6a3834..7a289ff07404 100644 --- a/include/asm-arm/arch-omap/dmtimer.h +++ b/include/asm-arm/arch-omap/dmtimer.h | |||
@@ -5,6 +5,7 @@ | |||
5 | * | 5 | * |
6 | * Copyright (C) 2005 Nokia Corporation | 6 | * Copyright (C) 2005 Nokia Corporation |
7 | * Author: Lauri Leukkunen <lauri.leukkunen@nokia.com> | 7 | * Author: Lauri Leukkunen <lauri.leukkunen@nokia.com> |
8 | * PWM and clock framwork support by Timo Teras. | ||
8 | * | 9 | * |
9 | * This program is free software; you can redistribute it and/or modify it | 10 | * This program is free software; you can redistribute it and/or modify it |
10 | * under the terms of the GNU General Public License as published by the | 11 | * under the terms of the GNU General Public License as published by the |
@@ -25,69 +26,56 @@ | |||
25 | * 675 Mass Ave, Cambridge, MA 02139, USA. | 26 | * 675 Mass Ave, Cambridge, MA 02139, USA. |
26 | */ | 27 | */ |
27 | 28 | ||
28 | #ifndef __ASM_ARCH_TIMER_H | 29 | #ifndef __ASM_ARCH_DMTIMER_H |
29 | #define __ASM_ARCH_TIMER_H | 30 | #define __ASM_ARCH_DMTIMER_H |
30 | |||
31 | #include <linux/list.h> | ||
32 | |||
33 | #define OMAP_TIMER_SRC_ARMXOR 0x00 | ||
34 | #define OMAP_TIMER_SRC_32_KHZ 0x01 | ||
35 | #define OMAP_TIMER_SRC_EXT_CLK 0x02 | ||
36 | |||
37 | /* timer control reg bits */ | ||
38 | #define OMAP_TIMER_CTRL_CAPTMODE (1 << 13) | ||
39 | #define OMAP_TIMER_CTRL_PT (1 << 12) | ||
40 | #define OMAP_TIMER_CTRL_TRG_OVERFLOW (0x1 << 10) | ||
41 | #define OMAP_TIMER_CTRL_TRG_OFANDMATCH (0x2 << 10) | ||
42 | #define OMAP_TIMER_CTRL_TCM_LOWTOHIGH (0x1 << 8) | ||
43 | #define OMAP_TIMER_CTRL_TCM_HIGHTOLOW (0x2 << 8) | ||
44 | #define OMAP_TIMER_CTRL_TCM_BOTHEDGES (0x3 << 8) | ||
45 | #define OMAP_TIMER_CTRL_SCPWM (1 << 7) | ||
46 | #define OMAP_TIMER_CTRL_CE (1 << 6) /* compare enable */ | ||
47 | #define OMAP_TIMER_CTRL_PRE (1 << 5) /* prescaler enable */ | ||
48 | #define OMAP_TIMER_CTRL_PTV_SHIFT 2 /* how much to shift the prescaler value */ | ||
49 | #define OMAP_TIMER_CTRL_AR (1 << 1) /* auto-reload enable */ | ||
50 | #define OMAP_TIMER_CTRL_ST (1 << 0) /* start timer */ | ||
51 | 31 | ||
52 | /* timer interrupt enable bits */ | 32 | /* clock sources */ |
53 | #define OMAP_TIMER_INT_CAPTURE (1 << 2) | 33 | #define OMAP_TIMER_SRC_SYS_CLK 0x00 |
54 | #define OMAP_TIMER_INT_OVERFLOW (1 << 1) | 34 | #define OMAP_TIMER_SRC_32_KHZ 0x01 |
55 | #define OMAP_TIMER_INT_MATCH (1 << 0) | 35 | #define OMAP_TIMER_SRC_EXT_CLK 0x02 |
56 | 36 | ||
37 | /* timer interrupt enable bits */ | ||
38 | #define OMAP_TIMER_INT_CAPTURE (1 << 2) | ||
39 | #define OMAP_TIMER_INT_OVERFLOW (1 << 1) | ||
40 | #define OMAP_TIMER_INT_MATCH (1 << 0) | ||
57 | 41 | ||
58 | struct omap_dm_timer { | 42 | /* trigger types */ |
59 | struct list_head timer_list; | 43 | #define OMAP_TIMER_TRIGGER_NONE 0x00 |
44 | #define OMAP_TIMER_TRIGGER_OVERFLOW 0x01 | ||
45 | #define OMAP_TIMER_TRIGGER_OVERFLOW_AND_COMPARE 0x02 | ||
60 | 46 | ||
61 | u32 base; | 47 | struct omap_dm_timer; |
62 | unsigned int irq; | 48 | struct clk; |
63 | }; | ||
64 | 49 | ||
65 | u32 omap_dm_timer_read_reg(struct omap_dm_timer *timer, int reg); | 50 | int omap_dm_timer_init(void); |
66 | void omap_dm_timer_write_reg(struct omap_dm_timer *timer, int reg, u32 value); | ||
67 | 51 | ||
68 | struct omap_dm_timer * omap_dm_timer_request(void); | 52 | struct omap_dm_timer *omap_dm_timer_request(void); |
53 | struct omap_dm_timer *omap_dm_timer_request_specific(int timer_id); | ||
69 | void omap_dm_timer_free(struct omap_dm_timer *timer); | 54 | void omap_dm_timer_free(struct omap_dm_timer *timer); |
70 | void omap_dm_timer_set_source(struct omap_dm_timer *timer, int source); | ||
71 | 55 | ||
72 | void omap_dm_timer_set_int_enable(struct omap_dm_timer *timer, unsigned int value); | 56 | int omap_dm_timer_get_irq(struct omap_dm_timer *timer); |
73 | void omap_dm_timer_set_trigger(struct omap_dm_timer *timer, unsigned int value); | 57 | |
74 | void omap_dm_timer_enable_compare(struct omap_dm_timer *timer); | 58 | u32 omap_dm_timer_modify_idlect_mask(u32 inputmask); |
75 | void omap_dm_timer_enable_autoreload(struct omap_dm_timer *timer); | 59 | struct clk *omap_dm_timer_get_fclk(struct omap_dm_timer *timer); |
76 | 60 | ||
77 | void omap_dm_timer_trigger(struct omap_dm_timer *timer); | 61 | void omap_dm_timer_trigger(struct omap_dm_timer *timer); |
78 | void omap_dm_timer_start(struct omap_dm_timer *timer); | 62 | void omap_dm_timer_start(struct omap_dm_timer *timer); |
79 | void omap_dm_timer_stop(struct omap_dm_timer *timer); | 63 | void omap_dm_timer_stop(struct omap_dm_timer *timer); |
80 | 64 | ||
81 | void omap_dm_timer_set_load(struct omap_dm_timer *timer, unsigned int load); | 65 | void omap_dm_timer_set_source(struct omap_dm_timer *timer, int source); |
82 | void omap_dm_timer_set_match(struct omap_dm_timer *timer, unsigned int match); | 66 | void omap_dm_timer_set_load(struct omap_dm_timer *timer, int autoreload, unsigned int value); |
67 | void omap_dm_timer_set_match(struct omap_dm_timer *timer, int enable, unsigned int match); | ||
68 | void omap_dm_timer_set_pwm(struct omap_dm_timer *timer, int def_on, int toggle, int trigger); | ||
69 | void omap_dm_timer_set_prescaler(struct omap_dm_timer *timer, int prescaler); | ||
70 | |||
71 | void omap_dm_timer_set_int_enable(struct omap_dm_timer *timer, unsigned int value); | ||
83 | 72 | ||
84 | unsigned int omap_dm_timer_read_status(struct omap_dm_timer *timer); | 73 | unsigned int omap_dm_timer_read_status(struct omap_dm_timer *timer); |
85 | void omap_dm_timer_write_status(struct omap_dm_timer *timer, unsigned int value); | 74 | void omap_dm_timer_write_status(struct omap_dm_timer *timer, unsigned int value); |
86 | |||
87 | unsigned int omap_dm_timer_read_counter(struct omap_dm_timer *timer); | 75 | unsigned int omap_dm_timer_read_counter(struct omap_dm_timer *timer); |
88 | void omap_dm_timer_reset_counter(struct omap_dm_timer *timer); | 76 | void omap_dm_timer_write_counter(struct omap_dm_timer *timer, unsigned int value); |
89 | 77 | ||
90 | int omap_dm_timers_active(void); | 78 | int omap_dm_timers_active(void); |
91 | u32 omap_dm_timer_modify_idlect_mask(u32 inputmask); | ||
92 | 79 | ||
93 | #endif /* __ASM_ARCH_TIMER_H */ | 80 | |
81 | #endif /* __ASM_ARCH_DMTIMER_H */ | ||
diff --git a/include/asm-arm/arch-omap/gpmc.h b/include/asm-arm/arch-omap/gpmc.h new file mode 100644 index 000000000000..1a0a5207822d --- /dev/null +++ b/include/asm-arm/arch-omap/gpmc.h | |||
@@ -0,0 +1,91 @@ | |||
1 | /* | ||
2 | * General-Purpose Memory Controller for OMAP2 | ||
3 | * | ||
4 | * Copyright (C) 2005-2006 Nokia Corporation | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | |||
11 | #ifndef __OMAP2_GPMC_H | ||
12 | #define __OMAP2_GPMC_H | ||
13 | |||
14 | #define GPMC_CS_CONFIG1 0x00 | ||
15 | #define GPMC_CS_CONFIG2 0x04 | ||
16 | #define GPMC_CS_CONFIG3 0x08 | ||
17 | #define GPMC_CS_CONFIG4 0x0c | ||
18 | #define GPMC_CS_CONFIG5 0x10 | ||
19 | #define GPMC_CS_CONFIG6 0x14 | ||
20 | #define GPMC_CS_CONFIG7 0x18 | ||
21 | #define GPMC_CS_NAND_COMMAND 0x1c | ||
22 | #define GPMC_CS_NAND_ADDRESS 0x20 | ||
23 | #define GPMC_CS_NAND_DATA 0x24 | ||
24 | |||
25 | #define GPMC_CONFIG1_WRAPBURST_SUPP (1 << 31) | ||
26 | #define GPMC_CONFIG1_READMULTIPLE_SUPP (1 << 20) | ||
27 | #define GPMC_CONFIG1_READTYPE_ASYNC (0 << 29) | ||
28 | #define GPMC_CONFIG1_READTYPE_SYNC (1 << 29) | ||
29 | #define GPMC_CONFIG1_WRITETYPE_ASYNC (0 << 27) | ||
30 | #define GPMC_CONFIG1_WRITETYPE_SYNC (1 << 27) | ||
31 | #define GPMC_CONFIG1_CLKACTIVATIONTIME(val) ((val & 3) << 25) | ||
32 | #define GPMC_CONFIG1_PAGE_LEN(val) ((val & 3) << 23) | ||
33 | #define GPMC_CONFIG1_WAIT_READ_MON (1 << 22) | ||
34 | #define GPMC_CONFIG1_WAIT_WRITE_MON (1 << 21) | ||
35 | #define GPMC_CONFIG1_WAIT_MON_IIME(val) ((val & 3) << 18) | ||
36 | #define GPMC_CONFIG1_WAIT_PIN_SEL(val) ((val & 3) << 16) | ||
37 | #define GPMC_CONFIG1_DEVICESIZE(val) ((val & 3) << 12) | ||
38 | #define GPMC_CONFIG1_DEVICESIZE_16 GPMC_CONFIG1_DEVICESIZE(1) | ||
39 | #define GPMC_CONFIG1_DEVICETYPE(val) ((val & 3) << 10) | ||
40 | #define GPMC_CONFIG1_DEVICETYPE_NOR GPMC_CONFIG1_DEVICETYPE(0) | ||
41 | #define GPMC_CONFIG1_DEVICETYPE_NAND GPMC_CONFIG1_DEVICETYPE(1) | ||
42 | #define GPMC_CONFIG1_MUXADDDATA (1 << 9) | ||
43 | #define GPMC_CONFIG1_TIME_PARA_GRAN (1 << 4) | ||
44 | #define GPMC_CONFIG1_FCLK_DIV(val) (val & 3) | ||
45 | #define GPMC_CONFIG1_FCLK_DIV2 (GPMC_CONFIG1_FCLK_DIV(1)) | ||
46 | #define GPMC_CONFIG1_FCLK_DIV3 (GPMC_CONFIG1_FCLK_DIV(2)) | ||
47 | #define GPMC_CONFIG1_FCLK_DIV4 (GPMC_CONFIG1_FCLK_DIV(3)) | ||
48 | |||
49 | /* | ||
50 | * Note that all values in this struct are in nanoseconds, while | ||
51 | * the register values are in gpmc_fck cycles. | ||
52 | */ | ||
53 | struct gpmc_timings { | ||
54 | /* Minimum clock period for synchronous mode */ | ||
55 | u16 sync_clk; | ||
56 | |||
57 | /* Chip-select signal timings corresponding to GPMC_CS_CONFIG2 */ | ||
58 | u16 cs_on; /* Assertion time */ | ||
59 | u16 cs_rd_off; /* Read deassertion time */ | ||
60 | u16 cs_wr_off; /* Write deassertion time */ | ||
61 | |||
62 | /* ADV signal timings corresponding to GPMC_CONFIG3 */ | ||
63 | u16 adv_on; /* Assertion time */ | ||
64 | u16 adv_rd_off; /* Read deassertion time */ | ||
65 | u16 adv_wr_off; /* Write deassertion time */ | ||
66 | |||
67 | /* WE signals timings corresponding to GPMC_CONFIG4 */ | ||
68 | u16 we_on; /* WE assertion time */ | ||
69 | u16 we_off; /* WE deassertion time */ | ||
70 | |||
71 | /* OE signals timings corresponding to GPMC_CONFIG4 */ | ||
72 | u16 oe_on; /* OE assertion time */ | ||
73 | u16 oe_off; /* OE deassertion time */ | ||
74 | |||
75 | /* Access time and cycle time timings corresponding to GPMC_CONFIG5 */ | ||
76 | u16 page_burst_access; /* Multiple access word delay */ | ||
77 | u16 access; /* Start-cycle to first data valid delay */ | ||
78 | u16 rd_cycle; /* Total read cycle time */ | ||
79 | u16 wr_cycle; /* Total write cycle time */ | ||
80 | }; | ||
81 | |||
82 | extern unsigned int gpmc_ns_to_ticks(unsigned int time_ns); | ||
83 | |||
84 | extern void gpmc_cs_write_reg(int cs, int idx, u32 val); | ||
85 | extern u32 gpmc_cs_read_reg(int cs, int idx); | ||
86 | extern int gpmc_cs_calc_divider(int cs, unsigned int sync_clk); | ||
87 | extern int gpmc_cs_set_timings(int cs, const struct gpmc_timings *t); | ||
88 | extern unsigned long gpmc_cs_get_base_addr(int cs); | ||
89 | |||
90 | |||
91 | #endif | ||
diff --git a/include/asm-arm/arch-omap/hardware.h b/include/asm-arm/arch-omap/hardware.h index c7d9e857795d..481048d65214 100644 --- a/include/asm-arm/arch-omap/hardware.h +++ b/include/asm-arm/arch-omap/hardware.h | |||
@@ -297,6 +297,10 @@ | |||
297 | #include "board-perseus2.h" | 297 | #include "board-perseus2.h" |
298 | #endif | 298 | #endif |
299 | 299 | ||
300 | #ifdef CONFIG_MACH_OMAP_FSAMPLE | ||
301 | #include "board-fsample.h" | ||
302 | #endif | ||
303 | |||
300 | #ifdef CONFIG_MACH_OMAP_H3 | 304 | #ifdef CONFIG_MACH_OMAP_H3 |
301 | #include "board-h3.h" | 305 | #include "board-h3.h" |
302 | #endif | 306 | #endif |
diff --git a/include/asm-arm/arch-omap/irqs.h b/include/asm-arm/arch-omap/irqs.h index 42098d99f302..2542495d8a43 100644 --- a/include/asm-arm/arch-omap/irqs.h +++ b/include/asm-arm/arch-omap/irqs.h | |||
@@ -242,10 +242,24 @@ | |||
242 | #define INT_24XX_GPIO_BANK2 30 | 242 | #define INT_24XX_GPIO_BANK2 30 |
243 | #define INT_24XX_GPIO_BANK3 31 | 243 | #define INT_24XX_GPIO_BANK3 31 |
244 | #define INT_24XX_GPIO_BANK4 32 | 244 | #define INT_24XX_GPIO_BANK4 32 |
245 | #define INT_24XX_GPTIMER1 37 | ||
246 | #define INT_24XX_GPTIMER2 38 | ||
247 | #define INT_24XX_GPTIMER3 39 | ||
248 | #define INT_24XX_GPTIMER4 40 | ||
249 | #define INT_24XX_GPTIMER5 41 | ||
250 | #define INT_24XX_GPTIMER6 42 | ||
251 | #define INT_24XX_GPTIMER7 43 | ||
252 | #define INT_24XX_GPTIMER8 44 | ||
253 | #define INT_24XX_GPTIMER9 45 | ||
254 | #define INT_24XX_GPTIMER10 46 | ||
255 | #define INT_24XX_GPTIMER11 47 | ||
256 | #define INT_24XX_GPTIMER12 48 | ||
245 | #define INT_24XX_MCBSP1_IRQ_TX 59 | 257 | #define INT_24XX_MCBSP1_IRQ_TX 59 |
246 | #define INT_24XX_MCBSP1_IRQ_RX 60 | 258 | #define INT_24XX_MCBSP1_IRQ_RX 60 |
247 | #define INT_24XX_MCBSP2_IRQ_TX 62 | 259 | #define INT_24XX_MCBSP2_IRQ_TX 62 |
248 | #define INT_24XX_MCBSP2_IRQ_RX 63 | 260 | #define INT_24XX_MCBSP2_IRQ_RX 63 |
261 | #define INT_24XX_UART1_IRQ 72 | ||
262 | #define INT_24XX_UART2_IRQ 73 | ||
249 | #define INT_24XX_UART3_IRQ 74 | 263 | #define INT_24XX_UART3_IRQ 74 |
250 | 264 | ||
251 | /* Max. 128 level 2 IRQs (OMAP1610), 192 GPIOs (OMAP730) and | 265 | /* Max. 128 level 2 IRQs (OMAP1610), 192 GPIOs (OMAP730) and |
diff --git a/include/asm-arm/arch-omap/mux.h b/include/asm-arm/arch-omap/mux.h index 0dc24d4ba59c..679869c5e68f 100644 --- a/include/asm-arm/arch-omap/mux.h +++ b/include/asm-arm/arch-omap/mux.h | |||
@@ -410,6 +410,12 @@ enum omap24xx_index { | |||
410 | /* 24xx clock */ | 410 | /* 24xx clock */ |
411 | W14_24XX_SYS_CLKOUT, | 411 | W14_24XX_SYS_CLKOUT, |
412 | 412 | ||
413 | /* 24xx GPMC wait pin monitoring */ | ||
414 | L3_GPMC_WAIT0, | ||
415 | N7_GPMC_WAIT1, | ||
416 | M1_GPMC_WAIT2, | ||
417 | P1_GPMC_WAIT3, | ||
418 | |||
413 | /* 242X McBSP */ | 419 | /* 242X McBSP */ |
414 | Y15_24XX_MCBSP2_CLKX, | 420 | Y15_24XX_MCBSP2_CLKX, |
415 | R14_24XX_MCBSP2_FSX, | 421 | R14_24XX_MCBSP2_FSX, |
@@ -429,6 +435,26 @@ enum omap24xx_index { | |||
429 | M15_24XX_GPIO92, | 435 | M15_24XX_GPIO92, |
430 | V14_24XX_GPIO117, | 436 | V14_24XX_GPIO117, |
431 | 437 | ||
438 | /* 242x DBG GPIO */ | ||
439 | V4_242X_GPIO49, | ||
440 | W2_242X_GPIO50, | ||
441 | U4_242X_GPIO51, | ||
442 | V3_242X_GPIO52, | ||
443 | V2_242X_GPIO53, | ||
444 | V6_242X_GPIO53, | ||
445 | T4_242X_GPIO54, | ||
446 | Y4_242X_GPIO54, | ||
447 | T3_242X_GPIO55, | ||
448 | U2_242X_GPIO56, | ||
449 | |||
450 | /* 24xx external DMA requests */ | ||
451 | AA10_242X_DMAREQ0, | ||
452 | AA6_242X_DMAREQ1, | ||
453 | E4_242X_DMAREQ2, | ||
454 | G4_242X_DMAREQ3, | ||
455 | D3_242X_DMAREQ4, | ||
456 | E3_242X_DMAREQ5, | ||
457 | |||
432 | P20_24XX_TSC_IRQ, | 458 | P20_24XX_TSC_IRQ, |
433 | 459 | ||
434 | /* UART3 */ | 460 | /* UART3 */ |
diff --git a/include/asm-arm/arch-omap/pm.h b/include/asm-arm/arch-omap/pm.h index 05b003f3a94c..e46623c61a72 100644 --- a/include/asm-arm/arch-omap/pm.h +++ b/include/asm-arm/arch-omap/pm.h | |||
@@ -299,10 +299,43 @@ enum omap24xx_save_state { | |||
299 | OMAP24XX_SLEEP_SAVE_INTC_MIR0, | 299 | OMAP24XX_SLEEP_SAVE_INTC_MIR0, |
300 | OMAP24XX_SLEEP_SAVE_INTC_MIR1, | 300 | OMAP24XX_SLEEP_SAVE_INTC_MIR1, |
301 | OMAP24XX_SLEEP_SAVE_INTC_MIR2, | 301 | OMAP24XX_SLEEP_SAVE_INTC_MIR2, |
302 | |||
303 | OMAP24XX_SLEEP_SAVE_CM_CLKSTCTRL_MPU, | ||
304 | OMAP24XX_SLEEP_SAVE_CM_CLKSTCTRL_CORE, | ||
305 | OMAP24XX_SLEEP_SAVE_CM_CLKSTCTRL_GFX, | ||
306 | OMAP24XX_SLEEP_SAVE_CM_CLKSTCTRL_DSP, | ||
307 | OMAP24XX_SLEEP_SAVE_CM_CLKSTCTRL_MDM, | ||
308 | |||
309 | OMAP24XX_SLEEP_SAVE_PM_PWSTCTRL_MPU, | ||
310 | OMAP24XX_SLEEP_SAVE_PM_PWSTCTRL_CORE, | ||
311 | OMAP24XX_SLEEP_SAVE_PM_PWSTCTRL_GFX, | ||
312 | OMAP24XX_SLEEP_SAVE_PM_PWSTCTRL_DSP, | ||
313 | OMAP24XX_SLEEP_SAVE_PM_PWSTCTRL_MDM, | ||
314 | |||
315 | OMAP24XX_SLEEP_SAVE_CM_IDLEST1_CORE, | ||
316 | OMAP24XX_SLEEP_SAVE_CM_IDLEST2_CORE, | ||
317 | OMAP24XX_SLEEP_SAVE_CM_IDLEST3_CORE, | ||
318 | OMAP24XX_SLEEP_SAVE_CM_IDLEST4_CORE, | ||
319 | OMAP24XX_SLEEP_SAVE_CM_IDLEST_GFX, | ||
320 | OMAP24XX_SLEEP_SAVE_CM_IDLEST_WKUP, | ||
321 | OMAP24XX_SLEEP_SAVE_CM_IDLEST_CKGEN, | ||
322 | OMAP24XX_SLEEP_SAVE_CM_IDLEST_DSP, | ||
323 | OMAP24XX_SLEEP_SAVE_CM_IDLEST_MDM, | ||
324 | |||
325 | OMAP24XX_SLEEP_SAVE_CM_AUTOIDLE1_CORE, | ||
326 | OMAP24XX_SLEEP_SAVE_CM_AUTOIDLE2_CORE, | ||
327 | OMAP24XX_SLEEP_SAVE_CM_AUTOIDLE3_CORE, | ||
328 | OMAP24XX_SLEEP_SAVE_CM_AUTOIDLE4_CORE, | ||
329 | OMAP24XX_SLEEP_SAVE_CM_AUTOIDLE_WKUP, | ||
330 | OMAP24XX_SLEEP_SAVE_CM_AUTOIDLE_PLL, | ||
331 | OMAP24XX_SLEEP_SAVE_CM_AUTOIDLE_DSP, | ||
332 | OMAP24XX_SLEEP_SAVE_CM_AUTOIDLE_MDM, | ||
333 | |||
302 | OMAP24XX_SLEEP_SAVE_CM_FCLKEN1_CORE, | 334 | OMAP24XX_SLEEP_SAVE_CM_FCLKEN1_CORE, |
303 | OMAP24XX_SLEEP_SAVE_CM_FCLKEN2_CORE, | 335 | OMAP24XX_SLEEP_SAVE_CM_FCLKEN2_CORE, |
304 | OMAP24XX_SLEEP_SAVE_CM_ICLKEN1_CORE, | 336 | OMAP24XX_SLEEP_SAVE_CM_ICLKEN1_CORE, |
305 | OMAP24XX_SLEEP_SAVE_CM_ICLKEN2_CORE, | 337 | OMAP24XX_SLEEP_SAVE_CM_ICLKEN2_CORE, |
338 | OMAP24XX_SLEEP_SAVE_CM_ICLKEN3_CORE, | ||
306 | OMAP24XX_SLEEP_SAVE_CM_ICLKEN4_CORE, | 339 | OMAP24XX_SLEEP_SAVE_CM_ICLKEN4_CORE, |
307 | OMAP24XX_SLEEP_SAVE_GPIO1_IRQENABLE1, | 340 | OMAP24XX_SLEEP_SAVE_GPIO1_IRQENABLE1, |
308 | OMAP24XX_SLEEP_SAVE_GPIO2_IRQENABLE1, | 341 | OMAP24XX_SLEEP_SAVE_GPIO2_IRQENABLE1, |
diff --git a/include/asm-arm/arch-pxa/pxa-regs.h b/include/asm-arm/arch-pxa/pxa-regs.h index 9f83f4adfbf3..f5cc65dd7d0d 100644 --- a/include/asm-arm/arch-pxa/pxa-regs.h +++ b/include/asm-arm/arch-pxa/pxa-regs.h | |||
@@ -1329,6 +1329,7 @@ | |||
1329 | #define GPIO84_NSRXD 84 /* NSSP receive */ | 1329 | #define GPIO84_NSRXD 84 /* NSSP receive */ |
1330 | #define GPIO85_nPCE_1 85 /* Card Enable for Card Space (PXA27x) */ | 1330 | #define GPIO85_nPCE_1 85 /* Card Enable for Card Space (PXA27x) */ |
1331 | #define GPIO92_MMCDAT0 92 /* MMC DAT0 (PXA27x) */ | 1331 | #define GPIO92_MMCDAT0 92 /* MMC DAT0 (PXA27x) */ |
1332 | #define GPIO102_nPCE_1 102 /* PCMCIA (PXA27x) */ | ||
1332 | #define GPIO109_MMCDAT1 109 /* MMC DAT1 (PXA27x) */ | 1333 | #define GPIO109_MMCDAT1 109 /* MMC DAT1 (PXA27x) */ |
1333 | #define GPIO110_MMCDAT2 110 /* MMC DAT2 (PXA27x) */ | 1334 | #define GPIO110_MMCDAT2 110 /* MMC DAT2 (PXA27x) */ |
1334 | #define GPIO110_MMCCS0 110 /* MMC Chip Select 0 (PXA27x) */ | 1335 | #define GPIO110_MMCCS0 110 /* MMC Chip Select 0 (PXA27x) */ |
@@ -1471,6 +1472,7 @@ | |||
1471 | #define GPIO84_NSSP_RX (84 | GPIO_ALT_FN_2_IN) | 1472 | #define GPIO84_NSSP_RX (84 | GPIO_ALT_FN_2_IN) |
1472 | #define GPIO85_nPCE_1_MD (85 | GPIO_ALT_FN_1_OUT) | 1473 | #define GPIO85_nPCE_1_MD (85 | GPIO_ALT_FN_1_OUT) |
1473 | #define GPIO92_MMCDAT0_MD (92 | GPIO_ALT_FN_1_OUT) | 1474 | #define GPIO92_MMCDAT0_MD (92 | GPIO_ALT_FN_1_OUT) |
1475 | #define GPIO102_nPCE_1_MD (102 | GPIO_ALT_FN_1_OUT) | ||
1474 | #define GPIO104_pSKTSEL_MD (104 | GPIO_ALT_FN_1_OUT) | 1476 | #define GPIO104_pSKTSEL_MD (104 | GPIO_ALT_FN_1_OUT) |
1475 | #define GPIO109_MMCDAT1_MD (109 | GPIO_ALT_FN_1_OUT) | 1477 | #define GPIO109_MMCDAT1_MD (109 | GPIO_ALT_FN_1_OUT) |
1476 | #define GPIO110_MMCDAT2_MD (110 | GPIO_ALT_FN_1_OUT) | 1478 | #define GPIO110_MMCDAT2_MD (110 | GPIO_ALT_FN_1_OUT) |
diff --git a/include/asm-arm/arch-pxa/trizeps4.h b/include/asm-arm/arch-pxa/trizeps4.h new file mode 100644 index 000000000000..641d0ec110bb --- /dev/null +++ b/include/asm-arm/arch-pxa/trizeps4.h | |||
@@ -0,0 +1,106 @@ | |||
1 | /************************************************************************ | ||
2 | * Include file for TRIZEPS4 SoM and ConXS eval-board | ||
3 | * Copyright (c) Jürgen Schindele | ||
4 | * 2006 | ||
5 | ************************************************************************/ | ||
6 | |||
7 | /* | ||
8 | * Includes/Defines | ||
9 | */ | ||
10 | #ifndef _TRIPEPS4_H_ | ||
11 | #define _TRIPEPS4_H_ | ||
12 | |||
13 | /* physical memory regions */ | ||
14 | #define TRIZEPS4_FLASH_PHYS (PXA_CS0_PHYS) /* Flash region */ | ||
15 | #define TRIZEPS4_DISK_PHYS (PXA_CS1_PHYS) /* Disk On Chip region */ | ||
16 | #define TRIZEPS4_ETH_PHYS (PXA_CS2_PHYS) /* Ethernet DM9000 region */ | ||
17 | #define TRIZEPS4_PIC_PHYS (PXA_CS3_PHYS) /* Logic chip on ConXS-Board */ | ||
18 | #define TRIZEPS4_SDRAM_BASE 0xa0000000 /* SDRAM region */ | ||
19 | |||
20 | #define TRIZEPS4_CFSR_PHYS (PXA_CS3_PHYS) /* Logic chip on ConXS-Board CSFR register */ | ||
21 | #define TRIZEPS4_BOCR_PHYS (PXA_CS3_PHYS+0x02000000) /* Logic chip on ConXS-Board BOCR register */ | ||
22 | #define TRIZEPS4_IRCR_PHYS (PXA_CS3_PHYS+0x02400000) /* Logic chip on ConXS-Board IRCR register*/ | ||
23 | #define TRIZEPS4_UPSR_PHYS (PXA_CS3_PHYS+0x02800000) /* Logic chip on ConXS-Board UPSR register*/ | ||
24 | #define TRIZEPS4_DICR_PHYS (PXA_CS3_PHYS+0x03800000) /* Logic chip on ConXS-Board DICR register*/ | ||
25 | |||
26 | /* virtual memory regions */ | ||
27 | #define TRIZEPS4_DISK_VIRT 0xF0000000 /* Disk On Chip region */ | ||
28 | |||
29 | #define TRIZEPS4_PIC_VIRT 0xF0100000 /* not used */ | ||
30 | #define TRIZEPS4_CFSR_VIRT 0xF0100000 | ||
31 | #define TRIZEPS4_BOCR_VIRT 0xF0200000 | ||
32 | #define TRIZEPS4_DICR_VIRT 0xF0300000 | ||
33 | #define TRIZEPS4_IRCR_VIRT 0xF0400000 | ||
34 | #define TRIZEPS4_UPSR_VIRT 0xF0500000 | ||
35 | |||
36 | /* size of flash */ | ||
37 | #define TRIZEPS4_FLASH_SIZE 0x02000000 /* Flash size 32 MB */ | ||
38 | |||
39 | /* Ethernet Controller Davicom DM9000 */ | ||
40 | #define GPIO_DM9000 101 | ||
41 | #define TRIZEPS4_ETH_IRQ IRQ_GPIO(GPIO_DM9000) | ||
42 | |||
43 | /* UCB1400 audio / TS-controller */ | ||
44 | #define GPIO_UCB1400 1 | ||
45 | #define TRIZEPS4_UCB1400_IRQ IRQ_GPIO(GPIO_UCB1400) | ||
46 | |||
47 | /* PCMCIA socket Compact Flash */ | ||
48 | #define GPIO_PCD 11 /* PCMCIA Card Detect */ | ||
49 | #define TRIZEPS4_CD_IRQ IRQ_GPIO(GPIO_PCD) | ||
50 | #define GPIO_PRDY 13 /* READY / nINT */ | ||
51 | #define TRIZEPS4_READY_NINT IRQ_GPIO(GPIO_PRDY) | ||
52 | |||
53 | /* MMC socket */ | ||
54 | #define GPIO_MMC_DET 12 | ||
55 | #define TRIZEPS4_MMC_IRQ IRQ_GPIO(GPIO_MMC_DET) | ||
56 | |||
57 | /* LEDS using tx2 / rx2 */ | ||
58 | #define GPIO_SYS_BUSY_LED 46 | ||
59 | #define GPIO_HEARTBEAT_LED 47 | ||
60 | |||
61 | /* Off-module PIC on ConXS board */ | ||
62 | #define GPIO_PIC 0 | ||
63 | #define TRIZEPS4_PIC_IRQ IRQ_GPIO(GPIO_PIC) | ||
64 | |||
65 | #define CFSR_P2V(x) ((x) - TRIZEPS4_CFSR_PHYS + TRIZEPS4_CFSR_VIRT) | ||
66 | #define CFSR_V2P(x) ((x) - TRIZEPS4_CFSR_VIRT + TRIZEPS4_CFSR_PHYS) | ||
67 | |||
68 | #define BCR_P2V(x) ((x) - TRIZEPS4_BOCR_PHYS + TRIZEPS4_BOCR_VIRT) | ||
69 | #define BCR_V2P(x) ((x) - TRIZEPS4_BOCR_VIRT + TRIZEPS4_BOCR_PHYS) | ||
70 | |||
71 | #define DCR_P2V(x) ((x) - TRIZEPS4_DICR_PHYS + TRIZEPS4_DICR_VIRT) | ||
72 | #define DCR_V2P(x) ((x) - TRIZEPS4_DICR_VIRT + TRIZEPS4_DICR_PHYS) | ||
73 | |||
74 | #ifndef __ASSEMBLY__ | ||
75 | #define ConXS_CFSR (*((volatile unsigned short *)CFSR_P2V(0x0C000000))) | ||
76 | #define ConXS_BCR (*((volatile unsigned short *)BCR_P2V(0x0E000000))) | ||
77 | #define ConXS_DCR (*((volatile unsigned short *)DCR_P2V(0x0F800000))) | ||
78 | #else | ||
79 | #define ConXS_CFSR CFSR_P2V(0x0C000000) | ||
80 | #define ConXS_BCR BCR_P2V(0x0E000000) | ||
81 | #define ConXS_DCR DCR_P2V(0x0F800000) | ||
82 | #endif | ||
83 | |||
84 | #define ConXS_CFSR_BVD_MASK 0x0003 | ||
85 | #define ConXS_CFSR_BVD1 (1 << 0) | ||
86 | #define ConXS_CFSR_BVD2 (1 << 1) | ||
87 | #define ConXS_CFSR_VS_MASK 0x000C | ||
88 | #define ConXS_CFSR_VS1 (1 << 2) | ||
89 | #define ConXS_CFSR_VS2 (1 << 3) | ||
90 | #define ConXS_CFSR_VS_5V (0x3 << 2) | ||
91 | #define ConXS_CFSR_VS_3V3 0x0 | ||
92 | |||
93 | #define ConXS_BCR_S0_POW_EN0 (1 << 0) | ||
94 | #define ConXS_BCR_S0_POW_EN1 (1 << 1) | ||
95 | #define ConXS_BCR_L_DISP (1 << 4) | ||
96 | #define ConXS_BCR_CF_BUF_EN (1 << 5) | ||
97 | #define ConXS_BCR_CF_RESET (1 << 7) | ||
98 | #define ConXS_BCR_S0_VCC_3V3 0x1 | ||
99 | #define ConXS_BCR_S0_VCC_5V0 0x2 | ||
100 | #define ConXS_BCR_S0_VPP_12V 0x4 | ||
101 | #define ConXS_BCR_S0_VPP_3V3 0x8 | ||
102 | |||
103 | #define ConXS_IRCR_MODE (1 << 0) | ||
104 | #define ConXS_IRCR_SD (1 << 1) | ||
105 | |||
106 | #endif /* _TRIPEPS4_H_ */ | ||
diff --git a/include/asm-arm/memory.h b/include/asm-arm/memory.h index 94f973b704f1..91d536c215d7 100644 --- a/include/asm-arm/memory.h +++ b/include/asm-arm/memory.h | |||
@@ -68,6 +68,11 @@ | |||
68 | */ | 68 | */ |
69 | #define XIP_VIRT_ADDR(physaddr) (MODULE_START + ((physaddr) & 0x000fffff)) | 69 | #define XIP_VIRT_ADDR(physaddr) (MODULE_START + ((physaddr) & 0x000fffff)) |
70 | 70 | ||
71 | /* | ||
72 | * Allow 16MB-aligned ioremap pages | ||
73 | */ | ||
74 | #define IOREMAP_MAX_ORDER 24 | ||
75 | |||
71 | #else /* CONFIG_MMU */ | 76 | #else /* CONFIG_MMU */ |
72 | 77 | ||
73 | /* | 78 | /* |
diff --git a/include/asm-arm/mmu.h b/include/asm-arm/mmu.h index 23dde52e0945..fe2a23b5627b 100644 --- a/include/asm-arm/mmu.h +++ b/include/asm-arm/mmu.h | |||
@@ -7,6 +7,7 @@ typedef struct { | |||
7 | #if __LINUX_ARM_ARCH__ >= 6 | 7 | #if __LINUX_ARM_ARCH__ >= 6 |
8 | unsigned int id; | 8 | unsigned int id; |
9 | #endif | 9 | #endif |
10 | unsigned int kvm_seq; | ||
10 | } mm_context_t; | 11 | } mm_context_t; |
11 | 12 | ||
12 | #if __LINUX_ARM_ARCH__ >= 6 | 13 | #if __LINUX_ARM_ARCH__ >= 6 |
diff --git a/include/asm-arm/mmu_context.h b/include/asm-arm/mmu_context.h index 9fadb01e030d..d1a65b1edcaa 100644 --- a/include/asm-arm/mmu_context.h +++ b/include/asm-arm/mmu_context.h | |||
@@ -17,6 +17,8 @@ | |||
17 | #include <asm/cacheflush.h> | 17 | #include <asm/cacheflush.h> |
18 | #include <asm/proc-fns.h> | 18 | #include <asm/proc-fns.h> |
19 | 19 | ||
20 | void __check_kvm_seq(struct mm_struct *mm); | ||
21 | |||
20 | #if __LINUX_ARM_ARCH__ >= 6 | 22 | #if __LINUX_ARM_ARCH__ >= 6 |
21 | 23 | ||
22 | /* | 24 | /* |
@@ -45,13 +47,21 @@ static inline void check_context(struct mm_struct *mm) | |||
45 | { | 47 | { |
46 | if (unlikely((mm->context.id ^ cpu_last_asid) >> ASID_BITS)) | 48 | if (unlikely((mm->context.id ^ cpu_last_asid) >> ASID_BITS)) |
47 | __new_context(mm); | 49 | __new_context(mm); |
50 | |||
51 | if (unlikely(mm->context.kvm_seq != init_mm.context.kvm_seq)) | ||
52 | __check_kvm_seq(mm); | ||
48 | } | 53 | } |
49 | 54 | ||
50 | #define init_new_context(tsk,mm) (__init_new_context(tsk,mm),0) | 55 | #define init_new_context(tsk,mm) (__init_new_context(tsk,mm),0) |
51 | 56 | ||
52 | #else | 57 | #else |
53 | 58 | ||
54 | #define check_context(mm) do { } while (0) | 59 | static inline void check_context(struct mm_struct *mm) |
60 | { | ||
61 | if (unlikely(mm->context.kvm_seq != init_mm.context.kvm_seq)) | ||
62 | __check_kvm_seq(mm); | ||
63 | } | ||
64 | |||
55 | #define init_new_context(tsk,mm) 0 | 65 | #define init_new_context(tsk,mm) 0 |
56 | 66 | ||
57 | #endif | 67 | #endif |
diff --git a/include/asm-arm/pgtable-hwdef.h b/include/asm-arm/pgtable-hwdef.h index 1bc1f997bda2..f3b5120c99fe 100644 --- a/include/asm-arm/pgtable-hwdef.h +++ b/include/asm-arm/pgtable-hwdef.h | |||
@@ -28,6 +28,7 @@ | |||
28 | */ | 28 | */ |
29 | #define PMD_SECT_BUFFERABLE (1 << 2) | 29 | #define PMD_SECT_BUFFERABLE (1 << 2) |
30 | #define PMD_SECT_CACHEABLE (1 << 3) | 30 | #define PMD_SECT_CACHEABLE (1 << 3) |
31 | #define PMD_SECT_XN (1 << 4) /* v6 */ | ||
31 | #define PMD_SECT_AP_WRITE (1 << 10) | 32 | #define PMD_SECT_AP_WRITE (1 << 10) |
32 | #define PMD_SECT_AP_READ (1 << 11) | 33 | #define PMD_SECT_AP_READ (1 << 11) |
33 | #define PMD_SECT_TEX(x) ((x) << 12) /* v5 */ | 34 | #define PMD_SECT_TEX(x) ((x) << 12) /* v5 */ |
diff --git a/include/asm-arm/procinfo.h b/include/asm-arm/procinfo.h index 842526055225..edb7b6502fcf 100644 --- a/include/asm-arm/procinfo.h +++ b/include/asm-arm/procinfo.h | |||
@@ -29,7 +29,8 @@ struct processor; | |||
29 | struct proc_info_list { | 29 | struct proc_info_list { |
30 | unsigned int cpu_val; | 30 | unsigned int cpu_val; |
31 | unsigned int cpu_mask; | 31 | unsigned int cpu_mask; |
32 | unsigned long __cpu_mmu_flags; /* used by head.S */ | 32 | unsigned long __cpu_mm_mmu_flags; /* used by head.S */ |
33 | unsigned long __cpu_io_mmu_flags; /* used by head.S */ | ||
33 | unsigned long __cpu_flush; /* used by head.S */ | 34 | unsigned long __cpu_flush; /* used by head.S */ |
34 | const char *arch_name; | 35 | const char *arch_name; |
35 | const char *elf_name; | 36 | const char *elf_name; |
diff --git a/include/asm-arm/thread_info.h b/include/asm-arm/thread_info.h index 8a7554f03984..f28b236139ed 100644 --- a/include/asm-arm/thread_info.h +++ b/include/asm-arm/thread_info.h | |||
@@ -111,6 +111,7 @@ extern void iwmmxt_task_disable(struct thread_info *); | |||
111 | extern void iwmmxt_task_copy(struct thread_info *, void *); | 111 | extern void iwmmxt_task_copy(struct thread_info *, void *); |
112 | extern void iwmmxt_task_restore(struct thread_info *, void *); | 112 | extern void iwmmxt_task_restore(struct thread_info *, void *); |
113 | extern void iwmmxt_task_release(struct thread_info *); | 113 | extern void iwmmxt_task_release(struct thread_info *); |
114 | extern void iwmmxt_task_switch(struct thread_info *); | ||
114 | 115 | ||
115 | #endif | 116 | #endif |
116 | 117 | ||
diff --git a/include/asm-arm26/floppy.h b/include/asm-arm26/floppy.h index a18af069ca28..efb732165a4f 100644 --- a/include/asm-arm26/floppy.h +++ b/include/asm-arm26/floppy.h | |||
@@ -22,7 +22,7 @@ | |||
22 | 22 | ||
23 | #define fd_inb(port) inb((port)) | 23 | #define fd_inb(port) inb((port)) |
24 | #define fd_request_irq() request_irq(IRQ_FLOPPYDISK,floppy_interrupt,\ | 24 | #define fd_request_irq() request_irq(IRQ_FLOPPYDISK,floppy_interrupt,\ |
25 | SA_INTERRUPT,"floppy",NULL) | 25 | IRQF_DISABLED,"floppy",NULL) |
26 | #define fd_free_irq() free_irq(IRQ_FLOPPYDISK,NULL) | 26 | #define fd_free_irq() free_irq(IRQ_FLOPPYDISK,NULL) |
27 | #define fd_disable_irq() disable_irq(IRQ_FLOPPYDISK) | 27 | #define fd_disable_irq() disable_irq(IRQ_FLOPPYDISK) |
28 | #define fd_enable_irq() enable_irq(IRQ_FLOPPYDISK) | 28 | #define fd_enable_irq() enable_irq(IRQ_FLOPPYDISK) |
diff --git a/include/asm-arm26/signal.h b/include/asm-arm26/signal.h index 37ad25355591..967ba4947e40 100644 --- a/include/asm-arm26/signal.h +++ b/include/asm-arm26/signal.h | |||
@@ -82,7 +82,6 @@ typedef unsigned long sigset_t; | |||
82 | * is running in 26-bit. | 82 | * is running in 26-bit. |
83 | * SA_ONSTACK allows alternate signal stacks (see sigaltstack(2)). | 83 | * SA_ONSTACK allows alternate signal stacks (see sigaltstack(2)). |
84 | * SA_RESTART flag to get restarting signals (which were the default long ago) | 84 | * SA_RESTART flag to get restarting signals (which were the default long ago) |
85 | * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the | ||
86 | * SA_NODEFER prevents the current signal from being masked in the handler. | 85 | * SA_NODEFER prevents the current signal from being masked in the handler. |
87 | * SA_RESETHAND clears the handler when the signal is delivered. | 86 | * SA_RESETHAND clears the handler when the signal is delivered. |
88 | * | 87 | * |
@@ -101,7 +100,6 @@ typedef unsigned long sigset_t; | |||
101 | 100 | ||
102 | #define SA_NOMASK SA_NODEFER | 101 | #define SA_NOMASK SA_NODEFER |
103 | #define SA_ONESHOT SA_RESETHAND | 102 | #define SA_ONESHOT SA_RESETHAND |
104 | #define SA_INTERRUPT 0x20000000 /* dummy -- ignored */ | ||
105 | 103 | ||
106 | 104 | ||
107 | /* | 105 | /* |
diff --git a/include/asm-cris/arch-v10/irq.h b/include/asm-cris/arch-v10/irq.h index 4fa8945b0263..b1128a9984ae 100644 --- a/include/asm-cris/arch-v10/irq.h +++ b/include/asm-cris/arch-v10/irq.h | |||
@@ -141,7 +141,7 @@ __asm__ ( \ | |||
141 | * it here, we would not get the multiple_irq at all. | 141 | * it here, we would not get the multiple_irq at all. |
142 | * | 142 | * |
143 | * The non-blocking here is based on the knowledge that the timer interrupt is | 143 | * The non-blocking here is based on the knowledge that the timer interrupt is |
144 | * registred as a fast interrupt (SA_INTERRUPT) so that we _know_ there will not | 144 | * registred as a fast interrupt (IRQF_DISABLED) so that we _know_ there will not |
145 | * be an sti() before the timer irq handler is run to acknowledge the interrupt. | 145 | * be an sti() before the timer irq handler is run to acknowledge the interrupt. |
146 | */ | 146 | */ |
147 | 147 | ||
diff --git a/include/asm-cris/arch-v32/irq.h b/include/asm-cris/arch-v32/irq.h index eeb0a80262c8..bac94ee6bc90 100644 --- a/include/asm-cris/arch-v32/irq.h +++ b/include/asm-cris/arch-v32/irq.h | |||
@@ -98,7 +98,7 @@ __asm__ ( \ | |||
98 | * if we had BLOCK'edit here, we would not get the multiple_irq at all. | 98 | * if we had BLOCK'edit here, we would not get the multiple_irq at all. |
99 | * | 99 | * |
100 | * The non-blocking here is based on the knowledge that the timer interrupt is | 100 | * The non-blocking here is based on the knowledge that the timer interrupt is |
101 | * registred as a fast interrupt (SA_INTERRUPT) so that we _know_ there will not | 101 | * registred as a fast interrupt (IRQF_DISABLED) so that we _know_ there will not |
102 | * be an sti() before the timer irq handler is run to acknowledge the interrupt. | 102 | * be an sti() before the timer irq handler is run to acknowledge the interrupt. |
103 | */ | 103 | */ |
104 | #define BUILD_TIMER_IRQ(nr, mask) \ | 104 | #define BUILD_TIMER_IRQ(nr, mask) \ |
diff --git a/include/asm-cris/signal.h b/include/asm-cris/signal.h index dfe039593a78..349ae682b568 100644 --- a/include/asm-cris/signal.h +++ b/include/asm-cris/signal.h | |||
@@ -74,7 +74,6 @@ typedef unsigned long sigset_t; | |||
74 | * SA_FLAGS values: | 74 | * SA_FLAGS values: |
75 | * | 75 | * |
76 | * SA_ONSTACK indicates that a registered stack_t will be used. | 76 | * SA_ONSTACK indicates that a registered stack_t will be used. |
77 | * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the | ||
78 | * SA_RESTART flag to get restarting signals (which were the default long ago) | 77 | * SA_RESTART flag to get restarting signals (which were the default long ago) |
79 | * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. | 78 | * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. |
80 | * SA_RESETHAND clears the handler when the signal is delivered. | 79 | * SA_RESETHAND clears the handler when the signal is delivered. |
@@ -95,7 +94,6 @@ typedef unsigned long sigset_t; | |||
95 | 94 | ||
96 | #define SA_NOMASK SA_NODEFER | 95 | #define SA_NOMASK SA_NODEFER |
97 | #define SA_ONESHOT SA_RESETHAND | 96 | #define SA_ONESHOT SA_RESETHAND |
98 | #define SA_INTERRUPT 0x20000000 /* dummy -- ignored */ | ||
99 | 97 | ||
100 | #define SA_RESTORER 0x04000000 | 98 | #define SA_RESTORER 0x04000000 |
101 | 99 | ||
diff --git a/include/asm-frv/irq-routing.h b/include/asm-frv/irq-routing.h index 686fb2b39d6a..ac3ab900a1dc 100644 --- a/include/asm-frv/irq-routing.h +++ b/include/asm-frv/irq-routing.h | |||
@@ -51,7 +51,7 @@ struct irq_source { | |||
51 | struct irq_level { | 51 | struct irq_level { |
52 | int usage; | 52 | int usage; |
53 | int disable_count; | 53 | int disable_count; |
54 | unsigned long flags; /* current SA_INTERRUPT and SA_SHIRQ settings */ | 54 | unsigned long flags; /* current IRQF_DISABLED and IRQF_SHARED settings */ |
55 | spinlock_t lock; | 55 | spinlock_t lock; |
56 | struct irq_source *sources; | 56 | struct irq_source *sources; |
57 | }; | 57 | }; |
diff --git a/include/asm-frv/signal.h b/include/asm-frv/signal.h index dcc1b3592918..2079197d483d 100644 --- a/include/asm-frv/signal.h +++ b/include/asm-frv/signal.h | |||
@@ -74,7 +74,6 @@ typedef unsigned long sigset_t; | |||
74 | * SA_FLAGS values: | 74 | * SA_FLAGS values: |
75 | * | 75 | * |
76 | * SA_ONSTACK indicates that a registered stack_t will be used. | 76 | * SA_ONSTACK indicates that a registered stack_t will be used. |
77 | * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the | ||
78 | * SA_RESTART flag to get restarting signals (which were the default long ago) | 77 | * SA_RESTART flag to get restarting signals (which were the default long ago) |
79 | * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. | 78 | * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. |
80 | * SA_RESETHAND clears the handler when the signal is delivered. | 79 | * SA_RESETHAND clears the handler when the signal is delivered. |
@@ -94,7 +93,6 @@ typedef unsigned long sigset_t; | |||
94 | 93 | ||
95 | #define SA_NOMASK SA_NODEFER | 94 | #define SA_NOMASK SA_NODEFER |
96 | #define SA_ONESHOT SA_RESETHAND | 95 | #define SA_ONESHOT SA_RESETHAND |
97 | #define SA_INTERRUPT 0x20000000 /* dummy -- ignored */ | ||
98 | 96 | ||
99 | #define SA_RESTORER 0x04000000 | 97 | #define SA_RESTORER 0x04000000 |
100 | 98 | ||
diff --git a/include/asm-generic/audit_change_attr.h b/include/asm-generic/audit_change_attr.h new file mode 100644 index 000000000000..cb05bf69745a --- /dev/null +++ b/include/asm-generic/audit_change_attr.h | |||
@@ -0,0 +1,18 @@ | |||
1 | __NR_chmod, | ||
2 | __NR_fchmod, | ||
3 | __NR_chown, | ||
4 | __NR_fchown, | ||
5 | __NR_lchown, | ||
6 | __NR_setxattr, | ||
7 | __NR_lsetxattr, | ||
8 | __NR_fsetxattr, | ||
9 | __NR_removexattr, | ||
10 | __NR_lremovexattr, | ||
11 | __NR_fremovexattr, | ||
12 | __NR_fchownat, | ||
13 | __NR_fchmodat, | ||
14 | #ifdef __NR_chown32 | ||
15 | __NR_chown32, | ||
16 | __NR_fchown32, | ||
17 | __NR_lchown32, | ||
18 | #endif | ||
diff --git a/include/asm-generic/audit_dir_write.h b/include/asm-generic/audit_dir_write.h new file mode 100644 index 000000000000..161a7a58fbab --- /dev/null +++ b/include/asm-generic/audit_dir_write.h | |||
@@ -0,0 +1,14 @@ | |||
1 | __NR_rename, | ||
2 | __NR_mkdir, | ||
3 | __NR_rmdir, | ||
4 | __NR_creat, | ||
5 | __NR_link, | ||
6 | __NR_unlink, | ||
7 | __NR_symlink, | ||
8 | __NR_mknod, | ||
9 | __NR_mkdirat, | ||
10 | __NR_mknodat, | ||
11 | __NR_unlinkat, | ||
12 | __NR_renameat, | ||
13 | __NR_linkat, | ||
14 | __NR_symlinkat, | ||
diff --git a/include/asm-generic/sections.h b/include/asm-generic/sections.h index 0b49f9e070f1..962cad7cfbbd 100644 --- a/include/asm-generic/sections.h +++ b/include/asm-generic/sections.h | |||
@@ -14,5 +14,6 @@ extern char _end[]; | |||
14 | extern char __per_cpu_start[], __per_cpu_end[]; | 14 | extern char __per_cpu_start[], __per_cpu_end[]; |
15 | extern char __kprobes_text_start[], __kprobes_text_end[]; | 15 | extern char __kprobes_text_start[], __kprobes_text_end[]; |
16 | extern char __initdata_begin[], __initdata_end[]; | 16 | extern char __initdata_begin[], __initdata_end[]; |
17 | extern char __start_rodata[], __end_rodata[]; | ||
17 | 18 | ||
18 | #endif /* _ASM_GENERIC_SECTIONS_H_ */ | 19 | #endif /* _ASM_GENERIC_SECTIONS_H_ */ |
diff --git a/include/asm-h8300/signal.h b/include/asm-h8300/signal.h index 8eccdc176163..7bc15048a64f 100644 --- a/include/asm-h8300/signal.h +++ b/include/asm-h8300/signal.h | |||
@@ -74,7 +74,6 @@ typedef unsigned long sigset_t; | |||
74 | * SA_FLAGS values: | 74 | * SA_FLAGS values: |
75 | * | 75 | * |
76 | * SA_ONSTACK indicates that a registered stack_t will be used. | 76 | * SA_ONSTACK indicates that a registered stack_t will be used. |
77 | * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the | ||
78 | * SA_RESTART flag to get restarting signals (which were the default long ago) | 77 | * SA_RESTART flag to get restarting signals (which were the default long ago) |
79 | * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. | 78 | * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. |
80 | * SA_RESETHAND clears the handler when the signal is delivered. | 79 | * SA_RESETHAND clears the handler when the signal is delivered. |
@@ -94,7 +93,6 @@ typedef unsigned long sigset_t; | |||
94 | 93 | ||
95 | #define SA_NOMASK SA_NODEFER | 94 | #define SA_NOMASK SA_NODEFER |
96 | #define SA_ONESHOT SA_RESETHAND | 95 | #define SA_ONESHOT SA_RESETHAND |
97 | #define SA_INTERRUPT 0x20000000 /* dummy -- ignored */ | ||
98 | 96 | ||
99 | #define SA_RESTORER 0x04000000 | 97 | #define SA_RESTORER 0x04000000 |
100 | 98 | ||
diff --git a/include/asm-i386/alternative.h b/include/asm-i386/alternative.h index c61bd1a17f37..96adbabec740 100644 --- a/include/asm-i386/alternative.h +++ b/include/asm-i386/alternative.h | |||
@@ -19,11 +19,19 @@ struct alt_instr { | |||
19 | extern void apply_alternatives(struct alt_instr *start, struct alt_instr *end); | 19 | extern void apply_alternatives(struct alt_instr *start, struct alt_instr *end); |
20 | 20 | ||
21 | struct module; | 21 | struct module; |
22 | #ifdef CONFIG_SMP | ||
22 | extern void alternatives_smp_module_add(struct module *mod, char *name, | 23 | extern void alternatives_smp_module_add(struct module *mod, char *name, |
23 | void *locks, void *locks_end, | 24 | void *locks, void *locks_end, |
24 | void *text, void *text_end); | 25 | void *text, void *text_end); |
25 | extern void alternatives_smp_module_del(struct module *mod); | 26 | extern void alternatives_smp_module_del(struct module *mod); |
26 | extern void alternatives_smp_switch(int smp); | 27 | extern void alternatives_smp_switch(int smp); |
28 | #else | ||
29 | static inline void alternatives_smp_module_add(struct module *mod, char *name, | ||
30 | void *locks, void *locks_end, | ||
31 | void *text, void *text_end) {} | ||
32 | static inline void alternatives_smp_module_del(struct module *mod) {} | ||
33 | static inline void alternatives_smp_switch(int smp) {} | ||
34 | #endif | ||
27 | 35 | ||
28 | #endif | 36 | #endif |
29 | 37 | ||
diff --git a/include/asm-i386/floppy.h b/include/asm-i386/floppy.h index 9cb2793eb211..359ead60b718 100644 --- a/include/asm-i386/floppy.h +++ b/include/asm-i386/floppy.h | |||
@@ -144,11 +144,11 @@ static int vdma_get_dma_residue(unsigned int dummy) | |||
144 | static int fd_request_irq(void) | 144 | static int fd_request_irq(void) |
145 | { | 145 | { |
146 | if(can_use_virtual_dma) | 146 | if(can_use_virtual_dma) |
147 | return request_irq(FLOPPY_IRQ, floppy_hardint,SA_INTERRUPT, | 147 | return request_irq(FLOPPY_IRQ, floppy_hardint, |
148 | "floppy", NULL); | 148 | IRQF_DISABLED, "floppy", NULL); |
149 | else | 149 | else |
150 | return request_irq(FLOPPY_IRQ, floppy_interrupt, SA_INTERRUPT, | 150 | return request_irq(FLOPPY_IRQ, floppy_interrupt, |
151 | "floppy", NULL); | 151 | IRQF_DISABLED, "floppy", NULL); |
152 | 152 | ||
153 | } | 153 | } |
154 | 154 | ||
diff --git a/include/asm-i386/signal.h b/include/asm-i386/signal.h index 026fd231488d..3824a502351f 100644 --- a/include/asm-i386/signal.h +++ b/include/asm-i386/signal.h | |||
@@ -77,7 +77,6 @@ typedef unsigned long sigset_t; | |||
77 | * SA_FLAGS values: | 77 | * SA_FLAGS values: |
78 | * | 78 | * |
79 | * SA_ONSTACK indicates that a registered stack_t will be used. | 79 | * SA_ONSTACK indicates that a registered stack_t will be used. |
80 | * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the | ||
81 | * SA_RESTART flag to get restarting signals (which were the default long ago) | 80 | * SA_RESTART flag to get restarting signals (which were the default long ago) |
82 | * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. | 81 | * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. |
83 | * SA_RESETHAND clears the handler when the signal is delivered. | 82 | * SA_RESETHAND clears the handler when the signal is delivered. |
@@ -97,7 +96,6 @@ typedef unsigned long sigset_t; | |||
97 | 96 | ||
98 | #define SA_NOMASK SA_NODEFER | 97 | #define SA_NOMASK SA_NODEFER |
99 | #define SA_ONESHOT SA_RESETHAND | 98 | #define SA_ONESHOT SA_RESETHAND |
100 | #define SA_INTERRUPT 0x20000000 /* dummy -- ignored */ | ||
101 | 99 | ||
102 | #define SA_RESTORER 0x04000000 | 100 | #define SA_RESTORER 0x04000000 |
103 | 101 | ||
diff --git a/include/asm-ia64/irq.h b/include/asm-ia64/irq.h index 79479e2c6966..8acb00190d5a 100644 --- a/include/asm-ia64/irq.h +++ b/include/asm-ia64/irq.h | |||
@@ -14,6 +14,8 @@ | |||
14 | #define NR_IRQS 256 | 14 | #define NR_IRQS 256 |
15 | #define NR_IRQ_VECTORS NR_IRQS | 15 | #define NR_IRQ_VECTORS NR_IRQS |
16 | 16 | ||
17 | #define IRQF_PERCPU 0x02000000 | ||
18 | |||
17 | static __inline__ int | 19 | static __inline__ int |
18 | irq_canonicalize (int irq) | 20 | irq_canonicalize (int irq) |
19 | { | 21 | { |
diff --git a/include/asm-ia64/signal.h b/include/asm-ia64/signal.h index 5e328ed5d01d..4f5ca5643cb1 100644 --- a/include/asm-ia64/signal.h +++ b/include/asm-ia64/signal.h | |||
@@ -56,7 +56,6 @@ | |||
56 | * SA_FLAGS values: | 56 | * SA_FLAGS values: |
57 | * | 57 | * |
58 | * SA_ONSTACK indicates that a registered stack_t will be used. | 58 | * SA_ONSTACK indicates that a registered stack_t will be used. |
59 | * SA_INTERRUPT is a no-op, but left due to historical reasons. | ||
60 | * SA_RESTART flag to get restarting signals (which were the default long ago) | 59 | * SA_RESTART flag to get restarting signals (which were the default long ago) |
61 | * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. | 60 | * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. |
62 | * SA_RESETHAND clears the handler when the signal is delivered. | 61 | * SA_RESETHAND clears the handler when the signal is delivered. |
@@ -76,7 +75,6 @@ | |||
76 | 75 | ||
77 | #define SA_NOMASK SA_NODEFER | 76 | #define SA_NOMASK SA_NODEFER |
78 | #define SA_ONESHOT SA_RESETHAND | 77 | #define SA_ONESHOT SA_RESETHAND |
79 | #define SA_INTERRUPT 0x20000000 /* dummy -- ignored */ | ||
80 | 78 | ||
81 | #define SA_RESTORER 0x04000000 | 79 | #define SA_RESTORER 0x04000000 |
82 | 80 | ||
@@ -114,8 +112,6 @@ | |||
114 | #define _NSIG_BPW 64 | 112 | #define _NSIG_BPW 64 |
115 | #define _NSIG_WORDS (_NSIG / _NSIG_BPW) | 113 | #define _NSIG_WORDS (_NSIG / _NSIG_BPW) |
116 | 114 | ||
117 | #define SA_PERCPU_IRQ 0x02000000 | ||
118 | |||
119 | #endif /* __KERNEL__ */ | 115 | #endif /* __KERNEL__ */ |
120 | 116 | ||
121 | #include <asm-generic/signal.h> | 117 | #include <asm-generic/signal.h> |
diff --git a/include/asm-m32r/signal.h b/include/asm-m32r/signal.h index 95f69b191953..e750045164d4 100644 --- a/include/asm-m32r/signal.h +++ b/include/asm-m32r/signal.h | |||
@@ -81,7 +81,6 @@ typedef unsigned long sigset_t; | |||
81 | * SA_FLAGS values: | 81 | * SA_FLAGS values: |
82 | * | 82 | * |
83 | * SA_ONSTACK indicates that a registered stack_t will be used. | 83 | * SA_ONSTACK indicates that a registered stack_t will be used. |
84 | * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the | ||
85 | * SA_RESTART flag to get restarting signals (which were the default long ago) | 84 | * SA_RESTART flag to get restarting signals (which were the default long ago) |
86 | * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. | 85 | * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. |
87 | * SA_RESETHAND clears the handler when the signal is delivered. | 86 | * SA_RESETHAND clears the handler when the signal is delivered. |
@@ -101,7 +100,6 @@ typedef unsigned long sigset_t; | |||
101 | 100 | ||
102 | #define SA_NOMASK SA_NODEFER | 101 | #define SA_NOMASK SA_NODEFER |
103 | #define SA_ONESHOT SA_RESETHAND | 102 | #define SA_ONESHOT SA_RESETHAND |
104 | #define SA_INTERRUPT 0x20000000 /* dummy -- ignored */ | ||
105 | 103 | ||
106 | #define SA_RESTORER 0x04000000 | 104 | #define SA_RESTORER 0x04000000 |
107 | 105 | ||
diff --git a/include/asm-m68k/floppy.h b/include/asm-m68k/floppy.h index 63a05ed95c17..57f4fdda65ab 100644 --- a/include/asm-m68k/floppy.h +++ b/include/asm-m68k/floppy.h | |||
@@ -88,8 +88,8 @@ static __inline__ void fd_outb(unsigned char value, int port) | |||
88 | static int fd_request_irq(void) | 88 | static int fd_request_irq(void) |
89 | { | 89 | { |
90 | if(MACH_IS_Q40) | 90 | if(MACH_IS_Q40) |
91 | return request_irq(FLOPPY_IRQ, floppy_hardint,SA_INTERRUPT, | 91 | return request_irq(FLOPPY_IRQ, floppy_hardint, |
92 | "floppy", floppy_hardint); | 92 | IRQF_DISABLED, "floppy", floppy_hardint); |
93 | else if(MACH_IS_SUN3X) | 93 | else if(MACH_IS_SUN3X) |
94 | return sun3xflop_request_irq(); | 94 | return sun3xflop_request_irq(); |
95 | return -ENXIO; | 95 | return -ENXIO; |
diff --git a/include/asm-m68k/irq.h b/include/asm-m68k/irq.h index f4ae7d8feac6..3257f9881002 100644 --- a/include/asm-m68k/irq.h +++ b/include/asm-m68k/irq.h | |||
@@ -67,8 +67,8 @@ struct pt_regs; | |||
67 | 67 | ||
68 | /* | 68 | /* |
69 | * various flags for request_irq() - the Amiga now uses the standard | 69 | * various flags for request_irq() - the Amiga now uses the standard |
70 | * mechanism like all other architectures - SA_INTERRUPT and SA_SHIRQ | 70 | * mechanism like all other architectures - IRQF_DISABLED and |
71 | * are your friends. | 71 | * IRQF_SHARED are your friends. |
72 | */ | 72 | */ |
73 | #ifndef MACH_AMIGA_ONLY | 73 | #ifndef MACH_AMIGA_ONLY |
74 | #define IRQ_FLG_LOCK (0x0001) /* handler is not replaceable */ | 74 | #define IRQ_FLG_LOCK (0x0001) /* handler is not replaceable */ |
diff --git a/include/asm-m68k/signal.h b/include/asm-m68k/signal.h index 85037a3d3e8e..de1ba6ead3b4 100644 --- a/include/asm-m68k/signal.h +++ b/include/asm-m68k/signal.h | |||
@@ -74,7 +74,6 @@ typedef unsigned long sigset_t; | |||
74 | * SA_FLAGS values: | 74 | * SA_FLAGS values: |
75 | * | 75 | * |
76 | * SA_ONSTACK indicates that a registered stack_t will be used. | 76 | * SA_ONSTACK indicates that a registered stack_t will be used. |
77 | * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the | ||
78 | * SA_RESTART flag to get restarting signals (which were the default long ago) | 77 | * SA_RESTART flag to get restarting signals (which were the default long ago) |
79 | * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. | 78 | * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. |
80 | * SA_RESETHAND clears the handler when the signal is delivered. | 79 | * SA_RESETHAND clears the handler when the signal is delivered. |
@@ -94,7 +93,6 @@ typedef unsigned long sigset_t; | |||
94 | 93 | ||
95 | #define SA_NOMASK SA_NODEFER | 94 | #define SA_NOMASK SA_NODEFER |
96 | #define SA_ONESHOT SA_RESETHAND | 95 | #define SA_ONESHOT SA_RESETHAND |
97 | #define SA_INTERRUPT 0x20000000 /* dummy -- ignored */ | ||
98 | 96 | ||
99 | /* | 97 | /* |
100 | * sigaltstack controls | 98 | * sigaltstack controls |
diff --git a/include/asm-m68k/sun3xflop.h b/include/asm-m68k/sun3xflop.h index 98a9f79dab29..ca8cc4113843 100644 --- a/include/asm-m68k/sun3xflop.h +++ b/include/asm-m68k/sun3xflop.h | |||
@@ -208,7 +208,8 @@ static int sun3xflop_request_irq(void) | |||
208 | 208 | ||
209 | if(!once) { | 209 | if(!once) { |
210 | once = 1; | 210 | once = 1; |
211 | error = request_irq(FLOPPY_IRQ, sun3xflop_hardint, SA_INTERRUPT, "floppy", NULL); | 211 | error = request_irq(FLOPPY_IRQ, sun3xflop_hardint, |
212 | IRQF_DISABLED, "floppy", NULL); | ||
212 | return ((error == 0) ? 0 : -1); | 213 | return ((error == 0) ? 0 : -1); |
213 | } else return 0; | 214 | } else return 0; |
214 | } | 215 | } |
diff --git a/include/asm-m68knommu/irq.h b/include/asm-m68knommu/irq.h index 53557274eef8..45e7a2fd1689 100644 --- a/include/asm-m68knommu/irq.h +++ b/include/asm-m68knommu/irq.h | |||
@@ -62,8 +62,8 @@ extern void (*mach_disable_irq)(unsigned int); | |||
62 | 62 | ||
63 | /* | 63 | /* |
64 | * various flags for request_irq() - the Amiga now uses the standard | 64 | * various flags for request_irq() - the Amiga now uses the standard |
65 | * mechanism like all other architectures - SA_INTERRUPT and SA_SHIRQ | 65 | * mechanism like all other architectures - IRQF_DISABLED and |
66 | * are your friends. | 66 | * IRQF_SHARED are your friends. |
67 | */ | 67 | */ |
68 | #define IRQ_FLG_LOCK (0x0001) /* handler is not replaceable */ | 68 | #define IRQ_FLG_LOCK (0x0001) /* handler is not replaceable */ |
69 | #define IRQ_FLG_REPLACE (0x0002) /* replace existing handler */ | 69 | #define IRQ_FLG_REPLACE (0x0002) /* replace existing handler */ |
diff --git a/include/asm-m68knommu/signal.h b/include/asm-m68knommu/signal.h index 1d13187f6062..216c08be54a0 100644 --- a/include/asm-m68knommu/signal.h +++ b/include/asm-m68knommu/signal.h | |||
@@ -74,7 +74,6 @@ typedef unsigned long sigset_t; | |||
74 | * SA_FLAGS values: | 74 | * SA_FLAGS values: |
75 | * | 75 | * |
76 | * SA_ONSTACK indicates that a registered stack_t will be used. | 76 | * SA_ONSTACK indicates that a registered stack_t will be used. |
77 | * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the | ||
78 | * SA_RESTART flag to get restarting signals (which were the default long ago) | 77 | * SA_RESTART flag to get restarting signals (which were the default long ago) |
79 | * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. | 78 | * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. |
80 | * SA_RESETHAND clears the handler when the signal is delivered. | 79 | * SA_RESETHAND clears the handler when the signal is delivered. |
@@ -94,7 +93,6 @@ typedef unsigned long sigset_t; | |||
94 | 93 | ||
95 | #define SA_NOMASK SA_NODEFER | 94 | #define SA_NOMASK SA_NODEFER |
96 | #define SA_ONESHOT SA_RESETHAND | 95 | #define SA_ONESHOT SA_RESETHAND |
97 | #define SA_INTERRUPT 0x20000000 /* dummy -- ignored */ | ||
98 | 96 | ||
99 | /* | 97 | /* |
100 | * sigaltstack controls | 98 | * sigaltstack controls |
diff --git a/include/asm-mips/mach-generic/floppy.h b/include/asm-mips/mach-generic/floppy.h index 83cd69e30ec3..001a8ce17c17 100644 --- a/include/asm-mips/mach-generic/floppy.h +++ b/include/asm-mips/mach-generic/floppy.h | |||
@@ -98,7 +98,7 @@ static inline void fd_disable_irq(void) | |||
98 | static inline int fd_request_irq(void) | 98 | static inline int fd_request_irq(void) |
99 | { | 99 | { |
100 | return request_irq(FLOPPY_IRQ, floppy_interrupt, | 100 | return request_irq(FLOPPY_IRQ, floppy_interrupt, |
101 | SA_INTERRUPT, "floppy", NULL); | 101 | IRQF_DISABLED, "floppy", NULL); |
102 | } | 102 | } |
103 | 103 | ||
104 | static inline void fd_free_irq(void) | 104 | static inline void fd_free_irq(void) |
diff --git a/include/asm-mips/mach-jazz/floppy.h b/include/asm-mips/mach-jazz/floppy.h index 9413117915f4..56e9ca6ae426 100644 --- a/include/asm-mips/mach-jazz/floppy.h +++ b/include/asm-mips/mach-jazz/floppy.h | |||
@@ -90,7 +90,7 @@ static inline void fd_disable_irq(void) | |||
90 | static inline int fd_request_irq(void) | 90 | static inline int fd_request_irq(void) |
91 | { | 91 | { |
92 | return request_irq(FLOPPY_IRQ, floppy_interrupt, | 92 | return request_irq(FLOPPY_IRQ, floppy_interrupt, |
93 | SA_INTERRUPT, "floppy", NULL); | 93 | IRQF_DISABLED, "floppy", NULL); |
94 | } | 94 | } |
95 | 95 | ||
96 | static inline void fd_free_irq(void) | 96 | static inline void fd_free_irq(void) |
diff --git a/include/asm-mips/signal.h b/include/asm-mips/signal.h index a1f3a3fa9bd6..87a1dff95199 100644 --- a/include/asm-mips/signal.h +++ b/include/asm-mips/signal.h | |||
@@ -64,7 +64,6 @@ typedef unsigned long old_sigset_t; /* at least 32 bits */ | |||
64 | * SA_FLAGS values: | 64 | * SA_FLAGS values: |
65 | * | 65 | * |
66 | * SA_ONSTACK indicates that a registered stack_t will be used. | 66 | * SA_ONSTACK indicates that a registered stack_t will be used. |
67 | * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the | ||
68 | * SA_RESTART flag to get restarting signals (which were the default long ago) | 67 | * SA_RESTART flag to get restarting signals (which were the default long ago) |
69 | * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. | 68 | * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. |
70 | * SA_RESETHAND clears the handler when the signal is delivered. | 69 | * SA_RESETHAND clears the handler when the signal is delivered. |
@@ -84,7 +83,6 @@ typedef unsigned long old_sigset_t; /* at least 32 bits */ | |||
84 | 83 | ||
85 | #define SA_NOMASK SA_NODEFER | 84 | #define SA_NOMASK SA_NODEFER |
86 | #define SA_ONESHOT SA_RESETHAND | 85 | #define SA_ONESHOT SA_RESETHAND |
87 | #define SA_INTERRUPT 0x20000000 /* dummy -- ignored */ | ||
88 | 86 | ||
89 | #define SA_RESTORER 0x04000000 /* Only for o32 */ | 87 | #define SA_RESTORER 0x04000000 /* Only for o32 */ |
90 | 88 | ||
@@ -99,15 +97,6 @@ typedef unsigned long old_sigset_t; /* at least 32 bits */ | |||
99 | 97 | ||
100 | #ifdef __KERNEL__ | 98 | #ifdef __KERNEL__ |
101 | 99 | ||
102 | /* | ||
103 | * These values of sa_flags are used only by the kernel as part of the | ||
104 | * irq handling routines. | ||
105 | * | ||
106 | * SA_INTERRUPT is also used by the irq handling routines. | ||
107 | * SA_SHIRQ flag is for shared interrupt support on PCI and EISA. | ||
108 | */ | ||
109 | #define SA_SAMPLE_RANDOM SA_RESTART | ||
110 | |||
111 | #ifdef CONFIG_TRAD_SIGNALS | 100 | #ifdef CONFIG_TRAD_SIGNALS |
112 | #define sig_uses_siginfo(ka) ((ka)->sa.sa_flags & SA_SIGINFO) | 101 | #define sig_uses_siginfo(ka) ((ka)->sa.sa_flags & SA_SIGINFO) |
113 | #else | 102 | #else |
diff --git a/include/asm-parisc/floppy.h b/include/asm-parisc/floppy.h index 458cdb2a7530..da2f9c157143 100644 --- a/include/asm-parisc/floppy.h +++ b/include/asm-parisc/floppy.h | |||
@@ -156,11 +156,11 @@ static int vdma_get_dma_residue(unsigned int dummy) | |||
156 | static int fd_request_irq(void) | 156 | static int fd_request_irq(void) |
157 | { | 157 | { |
158 | if(can_use_virtual_dma) | 158 | if(can_use_virtual_dma) |
159 | return request_irq(FLOPPY_IRQ, floppy_hardint,SA_INTERRUPT, | 159 | return request_irq(FLOPPY_IRQ, floppy_hardint, |
160 | "floppy", NULL); | 160 | IRQF_DISABLED, "floppy", NULL); |
161 | else | 161 | else |
162 | return request_irq(FLOPPY_IRQ, floppy_interrupt, SA_INTERRUPT, | 162 | return request_irq(FLOPPY_IRQ, floppy_interrupt, |
163 | "floppy", NULL); | 163 | IRQF_DISABLED, "floppy", NULL); |
164 | } | 164 | } |
165 | 165 | ||
166 | static unsigned long dma_mem_alloc(unsigned long size) | 166 | static unsigned long dma_mem_alloc(unsigned long size) |
diff --git a/include/asm-parisc/signal.h b/include/asm-parisc/signal.h index 25cb23ef7dd1..98a82fa0cfdb 100644 --- a/include/asm-parisc/signal.h +++ b/include/asm-parisc/signal.h | |||
@@ -48,7 +48,6 @@ | |||
48 | * SA_FLAGS values: | 48 | * SA_FLAGS values: |
49 | * | 49 | * |
50 | * SA_ONSTACK indicates that a registered stack_t will be used. | 50 | * SA_ONSTACK indicates that a registered stack_t will be used. |
51 | * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the | ||
52 | * SA_RESTART flag to get restarting signals (which were the default long ago) | 51 | * SA_RESTART flag to get restarting signals (which were the default long ago) |
53 | * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. | 52 | * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. |
54 | * SA_RESETHAND clears the handler when the signal is delivered. | 53 | * SA_RESETHAND clears the handler when the signal is delivered. |
@@ -69,7 +68,6 @@ | |||
69 | 68 | ||
70 | #define SA_NOMASK SA_NODEFER | 69 | #define SA_NOMASK SA_NODEFER |
71 | #define SA_ONESHOT SA_RESETHAND | 70 | #define SA_ONESHOT SA_RESETHAND |
72 | #define SA_INTERRUPT 0x20000000 /* dummy -- ignored */ | ||
73 | 71 | ||
74 | #define SA_RESTORER 0x04000000 /* obsolete -- ignored */ | 72 | #define SA_RESTORER 0x04000000 /* obsolete -- ignored */ |
75 | 73 | ||
diff --git a/include/asm-powerpc/floppy.h b/include/asm-powerpc/floppy.h index 9c8d91bf5a0d..fd242a22331c 100644 --- a/include/asm-powerpc/floppy.h +++ b/include/asm-powerpc/floppy.h | |||
@@ -27,7 +27,7 @@ | |||
27 | #define fd_disable_irq() disable_irq(FLOPPY_IRQ) | 27 | #define fd_disable_irq() disable_irq(FLOPPY_IRQ) |
28 | #define fd_cacheflush(addr,size) /* nothing */ | 28 | #define fd_cacheflush(addr,size) /* nothing */ |
29 | #define fd_request_irq() request_irq(FLOPPY_IRQ, floppy_interrupt, \ | 29 | #define fd_request_irq() request_irq(FLOPPY_IRQ, floppy_interrupt, \ |
30 | SA_INTERRUPT, "floppy", NULL) | 30 | IRQF_DISABLED, "floppy", NULL) |
31 | #define fd_free_irq() free_irq(FLOPPY_IRQ, NULL); | 31 | #define fd_free_irq() free_irq(FLOPPY_IRQ, NULL); |
32 | 32 | ||
33 | #ifdef CONFIG_PCI | 33 | #ifdef CONFIG_PCI |
diff --git a/include/asm-powerpc/signal.h b/include/asm-powerpc/signal.h index a4d8f8648541..a8c7babf4950 100644 --- a/include/asm-powerpc/signal.h +++ b/include/asm-powerpc/signal.h | |||
@@ -63,7 +63,6 @@ typedef struct { | |||
63 | * SA_FLAGS values: | 63 | * SA_FLAGS values: |
64 | * | 64 | * |
65 | * SA_ONSTACK is not currently supported, but will allow sigaltstack(2). | 65 | * SA_ONSTACK is not currently supported, but will allow sigaltstack(2). |
66 | * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the | ||
67 | * SA_RESTART flag to get restarting signals (which were the default long ago) | 66 | * SA_RESTART flag to get restarting signals (which were the default long ago) |
68 | * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. | 67 | * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. |
69 | * SA_RESETHAND clears the handler when the signal is delivered. | 68 | * SA_RESETHAND clears the handler when the signal is delivered. |
@@ -83,7 +82,6 @@ typedef struct { | |||
83 | 82 | ||
84 | #define SA_NOMASK SA_NODEFER | 83 | #define SA_NOMASK SA_NODEFER |
85 | #define SA_ONESHOT SA_RESETHAND | 84 | #define SA_ONESHOT SA_RESETHAND |
86 | #define SA_INTERRUPT 0x20000000u /* dummy -- ignored */ | ||
87 | 85 | ||
88 | #define SA_RESTORER 0x04000000U | 86 | #define SA_RESTORER 0x04000000U |
89 | 87 | ||
diff --git a/include/asm-ppc/floppy.h b/include/asm-ppc/floppy.h index 2ba191eba448..d3963ca79ad8 100644 --- a/include/asm-ppc/floppy.h +++ b/include/asm-ppc/floppy.h | |||
@@ -96,11 +96,11 @@ static int vdma_get_dma_residue(unsigned int dummy) | |||
96 | static int fd_request_irq(void) | 96 | static int fd_request_irq(void) |
97 | { | 97 | { |
98 | if (can_use_virtual_dma) | 98 | if (can_use_virtual_dma) |
99 | return request_irq(FLOPPY_IRQ, floppy_hardint,SA_INTERRUPT, | 99 | return request_irq(FLOPPY_IRQ, floppy_hardint, |
100 | "floppy", NULL); | 100 | IRQF_DISABLED, "floppy", NULL); |
101 | else | 101 | else |
102 | return request_irq(FLOPPY_IRQ, floppy_interrupt, SA_INTERRUPT, | 102 | return request_irq(FLOPPY_IRQ, floppy_interrupt, |
103 | "floppy", NULL); | 103 | IRQF_DISABLED, "floppy", NULL); |
104 | } | 104 | } |
105 | 105 | ||
106 | static int vdma_dma_setup(char *addr, unsigned long size, int mode, int io) | 106 | static int vdma_dma_setup(char *addr, unsigned long size, int mode, int io) |
diff --git a/include/asm-s390/signal.h b/include/asm-s390/signal.h index 7084626de215..f6cfddb278cb 100644 --- a/include/asm-s390/signal.h +++ b/include/asm-s390/signal.h | |||
@@ -84,7 +84,6 @@ typedef unsigned long sigset_t; | |||
84 | * SA_FLAGS values: | 84 | * SA_FLAGS values: |
85 | * | 85 | * |
86 | * SA_ONSTACK indicates that a registered stack_t will be used. | 86 | * SA_ONSTACK indicates that a registered stack_t will be used. |
87 | * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the | ||
88 | * SA_RESTART flag to get restarting signals (which were the default long ago) | 87 | * SA_RESTART flag to get restarting signals (which were the default long ago) |
89 | * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. | 88 | * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. |
90 | * SA_RESETHAND clears the handler when the signal is delivered. | 89 | * SA_RESETHAND clears the handler when the signal is delivered. |
@@ -104,7 +103,6 @@ typedef unsigned long sigset_t; | |||
104 | 103 | ||
105 | #define SA_NOMASK SA_NODEFER | 104 | #define SA_NOMASK SA_NODEFER |
106 | #define SA_ONESHOT SA_RESETHAND | 105 | #define SA_ONESHOT SA_RESETHAND |
107 | #define SA_INTERRUPT 0x20000000 /* dummy -- ignored */ | ||
108 | 106 | ||
109 | #define SA_RESTORER 0x04000000 | 107 | #define SA_RESTORER 0x04000000 |
110 | 108 | ||
diff --git a/include/asm-sh/floppy.h b/include/asm-sh/floppy.h index 307d9ce9f9ed..dc1ad464fa32 100644 --- a/include/asm-sh/floppy.h +++ b/include/asm-sh/floppy.h | |||
@@ -146,12 +146,11 @@ static int vdma_get_dma_residue(unsigned int dummy) | |||
146 | static int fd_request_irq(void) | 146 | static int fd_request_irq(void) |
147 | { | 147 | { |
148 | if(can_use_virtual_dma) | 148 | if(can_use_virtual_dma) |
149 | return request_irq(FLOPPY_IRQ, floppy_hardint,SA_INTERRUPT, | 149 | return request_irq(FLOPPY_IRQ, floppy_hardint, |
150 | "floppy", NULL); | 150 | IRQF_DISABLED, "floppy", NULL); |
151 | else | 151 | else |
152 | return request_irq(FLOPPY_IRQ, floppy_interrupt, SA_INTERRUPT, | 152 | return request_irq(FLOPPY_IRQ, floppy_interrupt, |
153 | "floppy", NULL); | 153 | IRQF_DISABLED, "floppy", NULL); |
154 | |||
155 | } | 154 | } |
156 | 155 | ||
157 | static unsigned long dma_mem_alloc(unsigned long size) | 156 | static unsigned long dma_mem_alloc(unsigned long size) |
diff --git a/include/asm-sh/mpc1211/keyboard.h b/include/asm-sh/mpc1211/keyboard.h index 5f0b9088c796..71ef4cf4242d 100644 --- a/include/asm-sh/mpc1211/keyboard.h +++ b/include/asm-sh/mpc1211/keyboard.h | |||
@@ -57,7 +57,7 @@ extern unsigned char pckbd_sysrq_xlate[128]; | |||
57 | #define AUX_IRQ 12 | 57 | #define AUX_IRQ 12 |
58 | 58 | ||
59 | #define aux_request_irq(hand, dev_id) \ | 59 | #define aux_request_irq(hand, dev_id) \ |
60 | request_irq(AUX_IRQ, hand, SA_SHIRQ, "PS2 Mouse", dev_id) | 60 | request_irq(AUX_IRQ, hand, IRQF_SHARED, "PS2 Mouse", dev_id) |
61 | 61 | ||
62 | #define aux_free_irq(dev_id) free_irq(AUX_IRQ, dev_id) | 62 | #define aux_free_irq(dev_id) free_irq(AUX_IRQ, dev_id) |
63 | 63 | ||
diff --git a/include/asm-sh/signal.h b/include/asm-sh/signal.h index d6e8eb0e65c7..5c5c1e852089 100644 --- a/include/asm-sh/signal.h +++ b/include/asm-sh/signal.h | |||
@@ -75,7 +75,6 @@ typedef unsigned long sigset_t; | |||
75 | * SA_FLAGS values: | 75 | * SA_FLAGS values: |
76 | * | 76 | * |
77 | * SA_ONSTACK indicates that a registered stack_t will be used. | 77 | * SA_ONSTACK indicates that a registered stack_t will be used. |
78 | * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the | ||
79 | * SA_RESTART flag to get restarting signals (which were the default long ago) | 78 | * SA_RESTART flag to get restarting signals (which were the default long ago) |
80 | * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. | 79 | * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. |
81 | * SA_RESETHAND clears the handler when the signal is delivered. | 80 | * SA_RESETHAND clears the handler when the signal is delivered. |
@@ -95,7 +94,6 @@ typedef unsigned long sigset_t; | |||
95 | 94 | ||
96 | #define SA_NOMASK SA_NODEFER | 95 | #define SA_NOMASK SA_NODEFER |
97 | #define SA_ONESHOT SA_RESETHAND | 96 | #define SA_ONESHOT SA_RESETHAND |
98 | #define SA_INTERRUPT 0x20000000 /* dummy -- ignored */ | ||
99 | 97 | ||
100 | #define SA_RESTORER 0x04000000 | 98 | #define SA_RESTORER 0x04000000 |
101 | 99 | ||
diff --git a/include/asm-sh64/keyboard.h b/include/asm-sh64/keyboard.h index 733e2bbe7b8c..1fab96d792bf 100644 --- a/include/asm-sh64/keyboard.h +++ b/include/asm-sh64/keyboard.h | |||
@@ -65,7 +65,7 @@ extern unsigned char pckbd_sysrq_xlate[128]; | |||
65 | #endif | 65 | #endif |
66 | 66 | ||
67 | #define aux_request_irq(hand, dev_id) \ | 67 | #define aux_request_irq(hand, dev_id) \ |
68 | request_irq(AUX_IRQ, hand, SA_SHIRQ, "PS2 Mouse", dev_id) | 68 | request_irq(AUX_IRQ, hand, IRQF_SHARED, "PS2 Mouse", dev_id) |
69 | 69 | ||
70 | #define aux_free_irq(dev_id) free_irq(AUX_IRQ, dev_id) | 70 | #define aux_free_irq(dev_id) free_irq(AUX_IRQ, dev_id) |
71 | 71 | ||
diff --git a/include/asm-sh64/signal.h b/include/asm-sh64/signal.h index 2400dc688a65..a5a28203cb3b 100644 --- a/include/asm-sh64/signal.h +++ b/include/asm-sh64/signal.h | |||
@@ -74,7 +74,6 @@ typedef struct { | |||
74 | * SA_FLAGS values: | 74 | * SA_FLAGS values: |
75 | * | 75 | * |
76 | * SA_ONSTACK indicates that a registered stack_t will be used. | 76 | * SA_ONSTACK indicates that a registered stack_t will be used. |
77 | * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the | ||
78 | * SA_RESTART flag to get restarting signals (which were the default long ago) | 77 | * SA_RESTART flag to get restarting signals (which were the default long ago) |
79 | * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. | 78 | * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. |
80 | * SA_RESETHAND clears the handler when the signal is delivered. | 79 | * SA_RESETHAND clears the handler when the signal is delivered. |
@@ -94,7 +93,6 @@ typedef struct { | |||
94 | 93 | ||
95 | #define SA_NOMASK SA_NODEFER | 94 | #define SA_NOMASK SA_NODEFER |
96 | #define SA_ONESHOT SA_RESETHAND | 95 | #define SA_ONESHOT SA_RESETHAND |
97 | #define SA_INTERRUPT 0x20000000 /* dummy -- ignored */ | ||
98 | 96 | ||
99 | #define SA_RESTORER 0x04000000 | 97 | #define SA_RESTORER 0x04000000 |
100 | 98 | ||
diff --git a/include/asm-sparc/floppy.h b/include/asm-sparc/floppy.h index 7a941b800b6b..c53b332c850a 100644 --- a/include/asm-sparc/floppy.h +++ b/include/asm-sparc/floppy.h | |||
@@ -271,7 +271,8 @@ static int sun_fd_request_irq(void) | |||
271 | 271 | ||
272 | if(!once) { | 272 | if(!once) { |
273 | once = 1; | 273 | once = 1; |
274 | error = request_fast_irq(FLOPPY_IRQ, floppy_hardint, SA_INTERRUPT, "floppy"); | 274 | error = request_fast_irq(FLOPPY_IRQ, floppy_hardint, |
275 | IRQF_DISABLED, "floppy"); | ||
275 | return ((error == 0) ? 0 : -1); | 276 | return ((error == 0) ? 0 : -1); |
276 | } else return 0; | 277 | } else return 0; |
277 | } | 278 | } |
diff --git a/include/asm-sparc/signal.h b/include/asm-sparc/signal.h index aa9960ad0ca9..0ae5084c427b 100644 --- a/include/asm-sparc/signal.h +++ b/include/asm-sparc/signal.h | |||
@@ -132,16 +132,13 @@ struct sigstack { | |||
132 | * usage of signal stacks by using the (now obsolete) sa_restorer field in | 132 | * usage of signal stacks by using the (now obsolete) sa_restorer field in |
133 | * the sigaction structure as a stack pointer. This is now possible due to | 133 | * the sigaction structure as a stack pointer. This is now possible due to |
134 | * the changes in signal handling. LBT 010493. | 134 | * the changes in signal handling. LBT 010493. |
135 | * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the | ||
136 | * SA_RESTART flag to get restarting signals (which were the default long ago) | 135 | * SA_RESTART flag to get restarting signals (which were the default long ago) |
137 | * SA_SHIRQ flag is for shared interrupt support on PCI and EISA. | ||
138 | */ | 136 | */ |
139 | #define SA_NOCLDSTOP _SV_IGNCHILD | 137 | #define SA_NOCLDSTOP _SV_IGNCHILD |
140 | #define SA_STACK _SV_SSTACK | 138 | #define SA_STACK _SV_SSTACK |
141 | #define SA_ONSTACK _SV_SSTACK | 139 | #define SA_ONSTACK _SV_SSTACK |
142 | #define SA_RESTART _SV_INTR | 140 | #define SA_RESTART _SV_INTR |
143 | #define SA_ONESHOT _SV_RESET | 141 | #define SA_ONESHOT _SV_RESET |
144 | #define SA_INTERRUPT 0x10u | ||
145 | #define SA_NOMASK 0x20u | 142 | #define SA_NOMASK 0x20u |
146 | #define SA_NOCLDWAIT 0x100u | 143 | #define SA_NOCLDWAIT 0x100u |
147 | #define SA_SIGINFO 0x200u | 144 | #define SA_SIGINFO 0x200u |
diff --git a/include/asm-sparc64/floppy.h b/include/asm-sparc64/floppy.h index b591d0e8d8f0..abf150038019 100644 --- a/include/asm-sparc64/floppy.h +++ b/include/asm-sparc64/floppy.h | |||
@@ -267,7 +267,7 @@ static int sun_fd_request_irq(void) | |||
267 | once = 1; | 267 | once = 1; |
268 | 268 | ||
269 | error = request_irq(FLOPPY_IRQ, sparc_floppy_irq, | 269 | error = request_irq(FLOPPY_IRQ, sparc_floppy_irq, |
270 | SA_INTERRUPT, "floppy", NULL); | 270 | IRQF_DISABLED, "floppy", NULL); |
271 | 271 | ||
272 | return ((error == 0) ? 0 : -1); | 272 | return ((error == 0) ? 0 : -1); |
273 | } | 273 | } |
diff --git a/include/asm-sparc64/signal.h b/include/asm-sparc64/signal.h index fdc42a14d4e6..9968871103bc 100644 --- a/include/asm-sparc64/signal.h +++ b/include/asm-sparc64/signal.h | |||
@@ -133,16 +133,13 @@ struct sigstack { | |||
133 | * usage of signal stacks by using the (now obsolete) sa_restorer field in | 133 | * usage of signal stacks by using the (now obsolete) sa_restorer field in |
134 | * the sigaction structure as a stack pointer. This is now possible due to | 134 | * the sigaction structure as a stack pointer. This is now possible due to |
135 | * the changes in signal handling. LBT 010493. | 135 | * the changes in signal handling. LBT 010493. |
136 | * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the | ||
137 | * SA_RESTART flag to get restarting signals (which were the default long ago) | 136 | * SA_RESTART flag to get restarting signals (which were the default long ago) |
138 | * SA_SHIRQ flag is for shared interrupt support on PCI and EISA. | ||
139 | */ | 137 | */ |
140 | #define SA_NOCLDSTOP _SV_IGNCHILD | 138 | #define SA_NOCLDSTOP _SV_IGNCHILD |
141 | #define SA_STACK _SV_SSTACK | 139 | #define SA_STACK _SV_SSTACK |
142 | #define SA_ONSTACK _SV_SSTACK | 140 | #define SA_ONSTACK _SV_SSTACK |
143 | #define SA_RESTART _SV_INTR | 141 | #define SA_RESTART _SV_INTR |
144 | #define SA_ONESHOT _SV_RESET | 142 | #define SA_ONESHOT _SV_RESET |
145 | #define SA_INTERRUPT 0x10u | ||
146 | #define SA_NOMASK 0x20u | 143 | #define SA_NOMASK 0x20u |
147 | #define SA_NOCLDWAIT 0x100u | 144 | #define SA_NOCLDWAIT 0x100u |
148 | #define SA_SIGINFO 0x200u | 145 | #define SA_SIGINFO 0x200u |
diff --git a/include/asm-um/kmap_types.h b/include/asm-um/kmap_types.h index 0b22ad776e76..6c03acdb4405 100644 --- a/include/asm-um/kmap_types.h +++ b/include/asm-um/kmap_types.h | |||
@@ -6,6 +6,24 @@ | |||
6 | #ifndef __UM_KMAP_TYPES_H | 6 | #ifndef __UM_KMAP_TYPES_H |
7 | #define __UM_KMAP_TYPES_H | 7 | #define __UM_KMAP_TYPES_H |
8 | 8 | ||
9 | #include "asm/arch/kmap_types.h" | 9 | /* No more #include "asm/arch/kmap_types.h" ! */ |
10 | |||
11 | enum km_type { | ||
12 | KM_BOUNCE_READ, | ||
13 | KM_SKB_SUNRPC_DATA, | ||
14 | KM_SKB_DATA_SOFTIRQ, | ||
15 | KM_USER0, | ||
16 | KM_USER1, | ||
17 | KM_UML_USERCOPY, /* UML specific, for copy_*_user - used in do_op_one_page */ | ||
18 | KM_BIO_SRC_IRQ, | ||
19 | KM_BIO_DST_IRQ, | ||
20 | KM_PTE0, | ||
21 | KM_PTE1, | ||
22 | KM_IRQ0, | ||
23 | KM_IRQ1, | ||
24 | KM_SOFTIRQ0, | ||
25 | KM_SOFTIRQ1, | ||
26 | KM_TYPE_NR | ||
27 | }; | ||
10 | 28 | ||
11 | #endif | 29 | #endif |
diff --git a/include/asm-v850/signal.h b/include/asm-v850/signal.h index cb52caa69925..a38df0834bbf 100644 --- a/include/asm-v850/signal.h +++ b/include/asm-v850/signal.h | |||
@@ -77,7 +77,6 @@ typedef unsigned long sigset_t; | |||
77 | * SA_FLAGS values: | 77 | * SA_FLAGS values: |
78 | * | 78 | * |
79 | * SA_ONSTACK indicates that a registered stack_t will be used. | 79 | * SA_ONSTACK indicates that a registered stack_t will be used. |
80 | * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the | ||
81 | * SA_RESTART flag to get restarting signals (which were the default long ago) | 80 | * SA_RESTART flag to get restarting signals (which were the default long ago) |
82 | * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. | 81 | * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. |
83 | * SA_RESETHAND clears the handler when the signal is delivered. | 82 | * SA_RESETHAND clears the handler when the signal is delivered. |
@@ -97,7 +96,6 @@ typedef unsigned long sigset_t; | |||
97 | 96 | ||
98 | #define SA_NOMASK SA_NODEFER | 97 | #define SA_NOMASK SA_NODEFER |
99 | #define SA_ONESHOT SA_RESETHAND | 98 | #define SA_ONESHOT SA_RESETHAND |
100 | #define SA_INTERRUPT 0x20000000 /* dummy -- ignored */ | ||
101 | 99 | ||
102 | #define SA_RESTORER 0x04000000 | 100 | #define SA_RESTORER 0x04000000 |
103 | 101 | ||
diff --git a/include/asm-x86_64/alternative.h b/include/asm-x86_64/alternative.h index 387c8f66af7d..aa67bfd1b3ce 100644 --- a/include/asm-x86_64/alternative.h +++ b/include/asm-x86_64/alternative.h | |||
@@ -17,11 +17,20 @@ struct alt_instr { | |||
17 | extern void apply_alternatives(struct alt_instr *start, struct alt_instr *end); | 17 | extern void apply_alternatives(struct alt_instr *start, struct alt_instr *end); |
18 | 18 | ||
19 | struct module; | 19 | struct module; |
20 | |||
21 | #ifdef CONFIG_SMP | ||
20 | extern void alternatives_smp_module_add(struct module *mod, char *name, | 22 | extern void alternatives_smp_module_add(struct module *mod, char *name, |
21 | void *locks, void *locks_end, | 23 | void *locks, void *locks_end, |
22 | void *text, void *text_end); | 24 | void *text, void *text_end); |
23 | extern void alternatives_smp_module_del(struct module *mod); | 25 | extern void alternatives_smp_module_del(struct module *mod); |
24 | extern void alternatives_smp_switch(int smp); | 26 | extern void alternatives_smp_switch(int smp); |
27 | #else | ||
28 | static inline void alternatives_smp_module_add(struct module *mod, char *name, | ||
29 | void *locks, void *locks_end, | ||
30 | void *text, void *text_end) {} | ||
31 | static inline void alternatives_smp_module_del(struct module *mod) {} | ||
32 | static inline void alternatives_smp_switch(int smp) {} | ||
33 | #endif | ||
25 | 34 | ||
26 | #endif | 35 | #endif |
27 | 36 | ||
diff --git a/include/asm-x86_64/floppy.h b/include/asm-x86_64/floppy.h index 006291e89b4a..32ff5d132714 100644 --- a/include/asm-x86_64/floppy.h +++ b/include/asm-x86_64/floppy.h | |||
@@ -144,11 +144,11 @@ static int vdma_get_dma_residue(unsigned int dummy) | |||
144 | static int fd_request_irq(void) | 144 | static int fd_request_irq(void) |
145 | { | 145 | { |
146 | if(can_use_virtual_dma) | 146 | if(can_use_virtual_dma) |
147 | return request_irq(FLOPPY_IRQ, floppy_hardint,SA_INTERRUPT, | 147 | return request_irq(FLOPPY_IRQ, floppy_hardint, |
148 | "floppy", NULL); | 148 | IRQF_DISABLED, "floppy", NULL); |
149 | else | 149 | else |
150 | return request_irq(FLOPPY_IRQ, floppy_interrupt, SA_INTERRUPT, | 150 | return request_irq(FLOPPY_IRQ, floppy_interrupt, |
151 | "floppy", NULL); | 151 | IRQF_DISABLED, "floppy", NULL); |
152 | } | 152 | } |
153 | 153 | ||
154 | static unsigned long dma_mem_alloc(unsigned long size) | 154 | static unsigned long dma_mem_alloc(unsigned long size) |
diff --git a/include/asm-x86_64/signal.h b/include/asm-x86_64/signal.h index f8d55798535a..cef7a7d51b7e 100644 --- a/include/asm-x86_64/signal.h +++ b/include/asm-x86_64/signal.h | |||
@@ -83,7 +83,6 @@ typedef unsigned long sigset_t; | |||
83 | * SA_FLAGS values: | 83 | * SA_FLAGS values: |
84 | * | 84 | * |
85 | * SA_ONSTACK indicates that a registered stack_t will be used. | 85 | * SA_ONSTACK indicates that a registered stack_t will be used. |
86 | * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the | ||
87 | * SA_RESTART flag to get restarting signals (which were the default long ago) | 86 | * SA_RESTART flag to get restarting signals (which were the default long ago) |
88 | * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. | 87 | * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. |
89 | * SA_RESETHAND clears the handler when the signal is delivered. | 88 | * SA_RESETHAND clears the handler when the signal is delivered. |
@@ -103,7 +102,6 @@ typedef unsigned long sigset_t; | |||
103 | 102 | ||
104 | #define SA_NOMASK SA_NODEFER | 103 | #define SA_NOMASK SA_NODEFER |
105 | #define SA_ONESHOT SA_RESETHAND | 104 | #define SA_ONESHOT SA_RESETHAND |
106 | #define SA_INTERRUPT 0x20000000 /* dummy -- ignored */ | ||
107 | 105 | ||
108 | #define SA_RESTORER 0x04000000 | 106 | #define SA_RESTORER 0x04000000 |
109 | 107 | ||
diff --git a/include/asm-xtensa/signal.h b/include/asm-xtensa/signal.h index a99c9aec64ec..633ba73bc4d2 100644 --- a/include/asm-xtensa/signal.h +++ b/include/asm-xtensa/signal.h | |||
@@ -75,7 +75,6 @@ typedef struct { | |||
75 | * SA_FLAGS values: | 75 | * SA_FLAGS values: |
76 | * | 76 | * |
77 | * SA_ONSTACK indicates that a registered stack_t will be used. | 77 | * SA_ONSTACK indicates that a registered stack_t will be used. |
78 | * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the | ||
79 | * SA_RESTART flag to get restarting signals (which were the default long ago) | 78 | * SA_RESTART flag to get restarting signals (which were the default long ago) |
80 | * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. | 79 | * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. |
81 | * SA_RESETHAND clears the handler when the signal is delivered. | 80 | * SA_RESETHAND clears the handler when the signal is delivered. |
@@ -95,7 +94,6 @@ typedef struct { | |||
95 | 94 | ||
96 | #define SA_NOMASK SA_NODEFER | 95 | #define SA_NOMASK SA_NODEFER |
97 | #define SA_ONESHOT SA_RESETHAND | 96 | #define SA_ONESHOT SA_RESETHAND |
98 | #define SA_INTERRUPT 0x20000000 /* dummy -- ignored */ | ||
99 | 97 | ||
100 | #define SA_RESTORER 0x04000000 | 98 | #define SA_RESTORER 0x04000000 |
101 | 99 | ||
@@ -109,19 +107,6 @@ typedef struct { | |||
109 | #define SIGSTKSZ 8192 | 107 | #define SIGSTKSZ 8192 |
110 | 108 | ||
111 | #ifndef __ASSEMBLY__ | 109 | #ifndef __ASSEMBLY__ |
112 | #ifdef __KERNEL__ | ||
113 | |||
114 | /* | ||
115 | * These values of sa_flags are used only by the kernel as part of the | ||
116 | * irq handling routines. | ||
117 | * | ||
118 | * SA_INTERRUPT is also used by the irq handling routines. | ||
119 | * SA_SHIRQ is for shared interrupt support on PCI and EISA. | ||
120 | */ | ||
121 | #define SA_SAMPLE_RANDOM SA_RESTART | ||
122 | #define SA_SHIRQ 0x04000000 | ||
123 | #define SA_PROBEIRQ 0x08000000 | ||
124 | #endif | ||
125 | 110 | ||
126 | #define SIG_BLOCK 0 /* for blocking signals */ | 111 | #define SIG_BLOCK 0 /* for blocking signals */ |
127 | #define SIG_UNBLOCK 1 /* for unblocking signals */ | 112 | #define SIG_UNBLOCK 1 /* for unblocking signals */ |
diff --git a/include/linux/audit.h b/include/linux/audit.h index e051ff9c5b50..b27d7debc5a1 100644 --- a/include/linux/audit.h +++ b/include/linux/audit.h | |||
@@ -122,10 +122,17 @@ | |||
122 | /* Rule structure sizes -- if these change, different AUDIT_ADD and | 122 | /* Rule structure sizes -- if these change, different AUDIT_ADD and |
123 | * AUDIT_LIST commands must be implemented. */ | 123 | * AUDIT_LIST commands must be implemented. */ |
124 | #define AUDIT_MAX_FIELDS 64 | 124 | #define AUDIT_MAX_FIELDS 64 |
125 | #define AUDIT_MAX_KEY_LEN 32 | ||
125 | #define AUDIT_BITMASK_SIZE 64 | 126 | #define AUDIT_BITMASK_SIZE 64 |
126 | #define AUDIT_WORD(nr) ((__u32)((nr)/32)) | 127 | #define AUDIT_WORD(nr) ((__u32)((nr)/32)) |
127 | #define AUDIT_BIT(nr) (1 << ((nr) - AUDIT_WORD(nr)*32)) | 128 | #define AUDIT_BIT(nr) (1 << ((nr) - AUDIT_WORD(nr)*32)) |
128 | 129 | ||
130 | #define AUDIT_SYSCALL_CLASSES 16 | ||
131 | #define AUDIT_CLASS_DIR_WRITE 0 | ||
132 | #define AUDIT_CLASS_DIR_WRITE_32 1 | ||
133 | #define AUDIT_CLASS_CHATTR 2 | ||
134 | #define AUDIT_CLASS_CHATTR_32 3 | ||
135 | |||
129 | /* This bitmask is used to validate user input. It represents all bits that | 136 | /* This bitmask is used to validate user input. It represents all bits that |
130 | * are currently used in an audit field constant understood by the kernel. | 137 | * are currently used in an audit field constant understood by the kernel. |
131 | * If you are adding a new #define AUDIT_<whatever>, please ensure that | 138 | * If you are adding a new #define AUDIT_<whatever>, please ensure that |
@@ -150,12 +157,17 @@ | |||
150 | #define AUDIT_PERS 10 | 157 | #define AUDIT_PERS 10 |
151 | #define AUDIT_ARCH 11 | 158 | #define AUDIT_ARCH 11 |
152 | #define AUDIT_MSGTYPE 12 | 159 | #define AUDIT_MSGTYPE 12 |
153 | #define AUDIT_SE_USER 13 /* security label user */ | 160 | #define AUDIT_SUBJ_USER 13 /* security label user */ |
154 | #define AUDIT_SE_ROLE 14 /* security label role */ | 161 | #define AUDIT_SUBJ_ROLE 14 /* security label role */ |
155 | #define AUDIT_SE_TYPE 15 /* security label type */ | 162 | #define AUDIT_SUBJ_TYPE 15 /* security label type */ |
156 | #define AUDIT_SE_SEN 16 /* security label sensitivity label */ | 163 | #define AUDIT_SUBJ_SEN 16 /* security label sensitivity label */ |
157 | #define AUDIT_SE_CLR 17 /* security label clearance label */ | 164 | #define AUDIT_SUBJ_CLR 17 /* security label clearance label */ |
158 | #define AUDIT_PPID 18 | 165 | #define AUDIT_PPID 18 |
166 | #define AUDIT_OBJ_USER 19 | ||
167 | #define AUDIT_OBJ_ROLE 20 | ||
168 | #define AUDIT_OBJ_TYPE 21 | ||
169 | #define AUDIT_OBJ_LEV_LOW 22 | ||
170 | #define AUDIT_OBJ_LEV_HIGH 23 | ||
159 | 171 | ||
160 | /* These are ONLY useful when checking | 172 | /* These are ONLY useful when checking |
161 | * at syscall exit time (AUDIT_AT_EXIT). */ | 173 | * at syscall exit time (AUDIT_AT_EXIT). */ |
@@ -171,6 +183,8 @@ | |||
171 | #define AUDIT_ARG2 (AUDIT_ARG0+2) | 183 | #define AUDIT_ARG2 (AUDIT_ARG0+2) |
172 | #define AUDIT_ARG3 (AUDIT_ARG0+3) | 184 | #define AUDIT_ARG3 (AUDIT_ARG0+3) |
173 | 185 | ||
186 | #define AUDIT_FILTERKEY 210 | ||
187 | |||
174 | #define AUDIT_NEGATE 0x80000000 | 188 | #define AUDIT_NEGATE 0x80000000 |
175 | 189 | ||
176 | /* These are the supported operators. | 190 | /* These are the supported operators. |
@@ -299,6 +313,7 @@ struct mqstat; | |||
299 | #define AUDITSC_SUCCESS 1 | 313 | #define AUDITSC_SUCCESS 1 |
300 | #define AUDITSC_FAILURE 2 | 314 | #define AUDITSC_FAILURE 2 |
301 | #define AUDITSC_RESULT(x) ( ((long)(x))<0?AUDITSC_FAILURE:AUDITSC_SUCCESS ) | 315 | #define AUDITSC_RESULT(x) ( ((long)(x))<0?AUDITSC_FAILURE:AUDITSC_SUCCESS ) |
316 | extern int __init audit_register_class(int class, unsigned *list); | ||
302 | #ifdef CONFIG_AUDITSYSCALL | 317 | #ifdef CONFIG_AUDITSYSCALL |
303 | /* These are defined in auditsc.c */ | 318 | /* These are defined in auditsc.c */ |
304 | /* Public API */ | 319 | /* Public API */ |
diff --git a/include/linux/cpu.h b/include/linux/cpu.h index a3caf6866bae..44a11f1ccaf2 100644 --- a/include/linux/cpu.h +++ b/include/linux/cpu.h | |||
@@ -87,9 +87,9 @@ int cpu_down(unsigned int cpu); | |||
87 | #define lock_cpu_hotplug() do { } while (0) | 87 | #define lock_cpu_hotplug() do { } while (0) |
88 | #define unlock_cpu_hotplug() do { } while (0) | 88 | #define unlock_cpu_hotplug() do { } while (0) |
89 | #define lock_cpu_hotplug_interruptible() 0 | 89 | #define lock_cpu_hotplug_interruptible() 0 |
90 | #define hotcpu_notifier(fn, pri) | 90 | #define hotcpu_notifier(fn, pri) do { } while (0) |
91 | #define register_hotcpu_notifier(nb) | 91 | #define register_hotcpu_notifier(nb) do { } while (0) |
92 | #define unregister_hotcpu_notifier(nb) | 92 | #define unregister_hotcpu_notifier(nb) do { } while (0) |
93 | 93 | ||
94 | /* CPUs don't go offline once they're online w/o CONFIG_HOTPLUG_CPU */ | 94 | /* CPUs don't go offline once they're online w/o CONFIG_HOTPLUG_CPU */ |
95 | static inline int cpu_is_offline(int cpu) { return 0; } | 95 | static inline int cpu_is_offline(int cpu) { return 0; } |
diff --git a/include/linux/err.h b/include/linux/err.h index ff71d2af5da3..cd3b367f7445 100644 --- a/include/linux/err.h +++ b/include/linux/err.h | |||
@@ -13,7 +13,9 @@ | |||
13 | * This should be a per-architecture thing, to allow different | 13 | * This should be a per-architecture thing, to allow different |
14 | * error and pointer decisions. | 14 | * error and pointer decisions. |
15 | */ | 15 | */ |
16 | #define IS_ERR_VALUE(x) unlikely((x) > (unsigned long)-1000L) | 16 | #define MAX_ERRNO 4095 |
17 | |||
18 | #define IS_ERR_VALUE(x) unlikely((x) >= (unsigned long)-MAX_ERRNO) | ||
17 | 19 | ||
18 | static inline void *ERR_PTR(long error) | 20 | static inline void *ERR_PTR(long error) |
19 | { | 21 | { |
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h index db2a63a11633..cf682a73a6f9 100644 --- a/include/linux/interrupt.h +++ b/include/linux/interrupt.h | |||
@@ -14,6 +14,53 @@ | |||
14 | #include <asm/ptrace.h> | 14 | #include <asm/ptrace.h> |
15 | #include <asm/system.h> | 15 | #include <asm/system.h> |
16 | 16 | ||
17 | /* | ||
18 | * These correspond to the IORESOURCE_IRQ_* defines in | ||
19 | * linux/ioport.h to select the interrupt line behaviour. When | ||
20 | * requesting an interrupt without specifying a IRQF_TRIGGER, the | ||
21 | * setting should be assumed to be "as already configured", which | ||
22 | * may be as per machine or firmware initialisation. | ||
23 | */ | ||
24 | #define IRQF_TRIGGER_NONE 0x00000000 | ||
25 | #define IRQF_TRIGGER_RISING 0x00000001 | ||
26 | #define IRQF_TRIGGER_FALLING 0x00000002 | ||
27 | #define IRQF_TRIGGER_HIGH 0x00000004 | ||
28 | #define IRQF_TRIGGER_LOW 0x00000008 | ||
29 | #define IRQF_TRIGGER_MASK (IRQF_TRIGGER_HIGH | IRQF_TRIGGER_LOW | \ | ||
30 | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING) | ||
31 | #define IRQF_TRIGGER_PROBE 0x00000010 | ||
32 | |||
33 | /* | ||
34 | * These flags used only by the kernel as part of the | ||
35 | * irq handling routines. | ||
36 | * | ||
37 | * IRQF_DISABLED - keep irqs disabled when calling the action handler | ||
38 | * IRQF_SAMPLE_RANDOM - irq is used to feed the random generator | ||
39 | * IRQF_SHARED - allow sharing the irq among several devices | ||
40 | * IRQF_PROBE_SHARED - set by callers when they expect sharing mismatches to occur | ||
41 | * IRQF_TIMER - Flag to mark this interrupt as timer interrupt | ||
42 | */ | ||
43 | #define IRQF_DISABLED 0x00000020 | ||
44 | #define IRQF_SAMPLE_RANDOM 0x00000040 | ||
45 | #define IRQF_SHARED 0x00000080 | ||
46 | #define IRQF_PROBE_SHARED 0x00000100 | ||
47 | #define IRQF_TIMER 0x00000200 | ||
48 | |||
49 | /* | ||
50 | * Migration helpers. Scheduled for removal in 1/2007 | ||
51 | * Do not use for new code ! | ||
52 | */ | ||
53 | #define SA_INTERRUPT IRQF_DISABLED | ||
54 | #define SA_SAMPLE_RANDOM IRQF_SAMPLE_RANDOM | ||
55 | #define SA_SHIRQ IRQF_SHARED | ||
56 | #define SA_PROBEIRQ IRQF_PROBE_SHARED | ||
57 | |||
58 | #define SA_TRIGGER_LOW IRQF_TRIGGER_LOW | ||
59 | #define SA_TRIGGER_HIGH IRQF_TRIGGER_HIGH | ||
60 | #define SA_TRIGGER_FALLING IRQF_TRIGGER_FALLING | ||
61 | #define SA_TRIGGER_RISING IRQF_TRIGGER_RISING | ||
62 | #define SA_TRIGGER_MASK IRQF_TRIGGER_MASK | ||
63 | |||
17 | struct irqaction { | 64 | struct irqaction { |
18 | irqreturn_t (*handler)(int, void *, struct pt_regs *); | 65 | irqreturn_t (*handler)(int, void *, struct pt_regs *); |
19 | unsigned long flags; | 66 | unsigned long flags; |
diff --git a/include/linux/irq.h b/include/linux/irq.h index 00b6ef8b2f93..95d7aa7954d2 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h | |||
@@ -24,41 +24,40 @@ | |||
24 | 24 | ||
25 | /* | 25 | /* |
26 | * IRQ line status. | 26 | * IRQ line status. |
27 | * | ||
28 | * Bits 0-16 are reserved for the IRQF_* bits in linux/interrupt.h | ||
29 | * | ||
30 | * IRQ types | ||
27 | */ | 31 | */ |
28 | #define IRQ_INPROGRESS 1 /* IRQ handler active - do not enter! */ | 32 | #define IRQ_TYPE_NONE 0x00000000 /* Default, unspecified type */ |
29 | #define IRQ_DISABLED 2 /* IRQ disabled - do not enter! */ | 33 | #define IRQ_TYPE_EDGE_RISING 0x00000001 /* Edge rising type */ |
30 | #define IRQ_PENDING 4 /* IRQ pending - replay on enable */ | 34 | #define IRQ_TYPE_EDGE_FALLING 0x00000002 /* Edge falling type */ |
31 | #define IRQ_REPLAY 8 /* IRQ has been replayed but not acked yet */ | 35 | #define IRQ_TYPE_EDGE_BOTH (IRQ_TYPE_EDGE_FALLING | IRQ_TYPE_EDGE_RISING) |
32 | #define IRQ_AUTODETECT 16 /* IRQ is being autodetected */ | 36 | #define IRQ_TYPE_LEVEL_HIGH 0x00000004 /* Level high type */ |
33 | #define IRQ_WAITING 32 /* IRQ not yet seen - for autodetection */ | 37 | #define IRQ_TYPE_LEVEL_LOW 0x00000008 /* Level low type */ |
34 | #define IRQ_LEVEL 64 /* IRQ level triggered */ | 38 | #define IRQ_TYPE_SENSE_MASK 0x0000000f /* Mask of the above */ |
35 | #define IRQ_MASKED 128 /* IRQ masked - shouldn't be seen again */ | 39 | #define IRQ_TYPE_PROBE 0x00000010 /* Probing in progress */ |
40 | |||
41 | /* Internal flags */ | ||
42 | #define IRQ_INPROGRESS 0x00010000 /* IRQ handler active - do not enter! */ | ||
43 | #define IRQ_DISABLED 0x00020000 /* IRQ disabled - do not enter! */ | ||
44 | #define IRQ_PENDING 0x00040000 /* IRQ pending - replay on enable */ | ||
45 | #define IRQ_REPLAY 0x00080000 /* IRQ has been replayed but not acked yet */ | ||
46 | #define IRQ_AUTODETECT 0x00100000 /* IRQ is being autodetected */ | ||
47 | #define IRQ_WAITING 0x00200000 /* IRQ not yet seen - for autodetection */ | ||
48 | #define IRQ_LEVEL 0x00400000 /* IRQ level triggered */ | ||
49 | #define IRQ_MASKED 0x00800000 /* IRQ masked - shouldn't be seen again */ | ||
36 | #ifdef CONFIG_IRQ_PER_CPU | 50 | #ifdef CONFIG_IRQ_PER_CPU |
37 | # define IRQ_PER_CPU 256 /* IRQ is per CPU */ | 51 | # define IRQ_PER_CPU 0x01000000 /* IRQ is per CPU */ |
38 | # define CHECK_IRQ_PER_CPU(var) ((var) & IRQ_PER_CPU) | 52 | # define CHECK_IRQ_PER_CPU(var) ((var) & IRQ_PER_CPU) |
39 | #else | 53 | #else |
40 | # define CHECK_IRQ_PER_CPU(var) 0 | 54 | # define CHECK_IRQ_PER_CPU(var) 0 |
41 | #endif | 55 | #endif |
42 | 56 | ||
43 | #define IRQ_NOPROBE 512 /* IRQ is not valid for probing */ | 57 | #define IRQ_NOPROBE 0x02000000 /* IRQ is not valid for probing */ |
44 | #define IRQ_NOREQUEST 1024 /* IRQ cannot be requested */ | 58 | #define IRQ_NOREQUEST 0x04000000 /* IRQ cannot be requested */ |
45 | #define IRQ_NOAUTOEN 2048 /* IRQ will not be enabled on request irq */ | 59 | #define IRQ_NOAUTOEN 0x08000000 /* IRQ will not be enabled on request irq */ |
46 | #define IRQ_DELAYED_DISABLE \ | 60 | #define IRQ_DELAYED_DISABLE 0x10000000 /* IRQ disable (masking) happens delayed. */ |
47 | 4096 /* IRQ disable (masking) happens delayed. */ | ||
48 | |||
49 | /* | ||
50 | * IRQ types, see also include/linux/interrupt.h | ||
51 | */ | ||
52 | #define IRQ_TYPE_NONE 0x0000 /* Default, unspecified type */ | ||
53 | #define IRQ_TYPE_EDGE_RISING 0x0001 /* Edge rising type */ | ||
54 | #define IRQ_TYPE_EDGE_FALLING 0x0002 /* Edge falling type */ | ||
55 | #define IRQ_TYPE_EDGE_BOTH (IRQ_TYPE_EDGE_FALLING | IRQ_TYPE_EDGE_RISING) | ||
56 | #define IRQ_TYPE_LEVEL_HIGH 0x0004 /* Level high type */ | ||
57 | #define IRQ_TYPE_LEVEL_LOW 0x0008 /* Level low type */ | ||
58 | #define IRQ_TYPE_SENSE_MASK 0x000f /* Mask of the above */ | ||
59 | #define IRQ_TYPE_SIMPLE 0x0010 /* Simple type */ | ||
60 | #define IRQ_TYPE_PERCPU 0x0020 /* Per CPU type */ | ||
61 | #define IRQ_TYPE_PROBE 0x0040 /* Probing in progress */ | ||
62 | 61 | ||
63 | struct proc_dir_entry; | 62 | struct proc_dir_entry; |
64 | 63 | ||
diff --git a/include/linux/signal.h b/include/linux/signal.h index 1e4ce7225eee..117135e33d67 100644 --- a/include/linux/signal.h +++ b/include/linux/signal.h | |||
@@ -9,32 +9,6 @@ | |||
9 | #include <linux/spinlock.h> | 9 | #include <linux/spinlock.h> |
10 | 10 | ||
11 | /* | 11 | /* |
12 | * These values of sa_flags are used only by the kernel as part of the | ||
13 | * irq handling routines. | ||
14 | * | ||
15 | * SA_INTERRUPT is also used by the irq handling routines. | ||
16 | * SA_SHIRQ is for shared interrupt support on PCI and EISA. | ||
17 | * SA_PROBEIRQ is set by callers when they expect sharing mismatches to occur | ||
18 | */ | ||
19 | #define SA_SAMPLE_RANDOM SA_RESTART | ||
20 | #define SA_SHIRQ 0x04000000 | ||
21 | #define SA_PROBEIRQ 0x08000000 | ||
22 | |||
23 | /* | ||
24 | * As above, these correspond to the IORESOURCE_IRQ_* defines in | ||
25 | * linux/ioport.h to select the interrupt line behaviour. When | ||
26 | * requesting an interrupt without specifying a SA_TRIGGER, the | ||
27 | * setting should be assumed to be "as already configured", which | ||
28 | * may be as per machine or firmware initialisation. | ||
29 | */ | ||
30 | #define SA_TRIGGER_LOW 0x00000008 | ||
31 | #define SA_TRIGGER_HIGH 0x00000004 | ||
32 | #define SA_TRIGGER_FALLING 0x00000002 | ||
33 | #define SA_TRIGGER_RISING 0x00000001 | ||
34 | #define SA_TRIGGER_MASK (SA_TRIGGER_HIGH|SA_TRIGGER_LOW|\ | ||
35 | SA_TRIGGER_RISING|SA_TRIGGER_FALLING) | ||
36 | |||
37 | /* | ||
38 | * Real Time signals may be queued. | 12 | * Real Time signals may be queued. |
39 | */ | 13 | */ |
40 | 14 | ||
diff --git a/include/linux/ufs_fs.h b/include/linux/ufs_fs.h index e39b7cc43390..fc62887c5206 100644 --- a/include/linux/ufs_fs.h +++ b/include/linux/ufs_fs.h | |||
@@ -993,7 +993,7 @@ extern void ufs_panic (struct super_block *, const char *, const char *, ...) __ | |||
993 | extern struct inode_operations ufs_fast_symlink_inode_operations; | 993 | extern struct inode_operations ufs_fast_symlink_inode_operations; |
994 | 994 | ||
995 | /* truncate.c */ | 995 | /* truncate.c */ |
996 | extern void ufs_truncate (struct inode *); | 996 | extern int ufs_truncate (struct inode *, loff_t); |
997 | 997 | ||
998 | static inline struct ufs_sb_info *UFS_SB(struct super_block *sb) | 998 | static inline struct ufs_sb_info *UFS_SB(struct super_block *sb) |
999 | { | 999 | { |
diff --git a/include/net/irda/irda_device.h b/include/net/irda/irda_device.h index 0575c59a5c96..bca19ca7bdd4 100644 --- a/include/net/irda/irda_device.h +++ b/include/net/irda/irda_device.h | |||
@@ -160,7 +160,7 @@ typedef struct { | |||
160 | int irq, irq2; /* Interrupts used */ | 160 | int irq, irq2; /* Interrupts used */ |
161 | int dma, dma2; /* DMA channel(s) used */ | 161 | int dma, dma2; /* DMA channel(s) used */ |
162 | int fifo_size; /* FIFO size */ | 162 | int fifo_size; /* FIFO size */ |
163 | int irqflags; /* interrupt flags (ie, SA_SHIRQ|SA_INTERRUPT) */ | 163 | int irqflags; /* interrupt flags (ie, IRQF_SHARED|IRQF_DISABLED) */ |
164 | int direction; /* Link direction, used by some FIR drivers */ | 164 | int direction; /* Link direction, used by some FIR drivers */ |
165 | int enabled; /* Powered on? */ | 165 | int enabled; /* Powered on? */ |
166 | int suspended; /* Suspended by APM */ | 166 | int suspended; /* Suspended by APM */ |
diff --git a/include/sound/initval.h b/include/sound/initval.h index d45170b9e0b7..2ae76efc696f 100644 --- a/include/sound/initval.h +++ b/include/sound/initval.h | |||
@@ -62,7 +62,7 @@ static int snd_legacy_find_free_irq(int *irq_table) | |||
62 | { | 62 | { |
63 | while (*irq_table != -1) { | 63 | while (*irq_table != -1) { |
64 | if (!request_irq(*irq_table, snd_legacy_empty_irq_handler, | 64 | if (!request_irq(*irq_table, snd_legacy_empty_irq_handler, |
65 | SA_INTERRUPT | SA_PROBEIRQ, "ALSA Test IRQ", | 65 | IRQF_DISABLED | IRQF_PROBE_SHARED, "ALSA Test IRQ", |
66 | (void *) irq_table)) { | 66 | (void *) irq_table)) { |
67 | free_irq(*irq_table, (void *) irq_table); | 67 | free_irq(*irq_table, (void *) irq_table); |
68 | return *irq_table; | 68 | return *irq_table; |
diff --git a/kernel/audit.h b/kernel/audit.h index 8323e4132a33..6aa33b848cf2 100644 --- a/kernel/audit.h +++ b/kernel/audit.h | |||
@@ -81,6 +81,7 @@ struct audit_krule { | |||
81 | u32 mask[AUDIT_BITMASK_SIZE]; | 81 | u32 mask[AUDIT_BITMASK_SIZE]; |
82 | u32 buflen; /* for data alloc on list rules */ | 82 | u32 buflen; /* for data alloc on list rules */ |
83 | u32 field_count; | 83 | u32 field_count; |
84 | char *filterkey; /* ties events to rules */ | ||
84 | struct audit_field *fields; | 85 | struct audit_field *fields; |
85 | struct audit_field *inode_f; /* quick access to an inode field */ | 86 | struct audit_field *inode_f; /* quick access to an inode field */ |
86 | struct audit_watch *watch; /* associated watch */ | 87 | struct audit_watch *watch; /* associated watch */ |
diff --git a/kernel/auditfilter.c b/kernel/auditfilter.c index 4c99d2c586ed..5b4e16276ca0 100644 --- a/kernel/auditfilter.c +++ b/kernel/auditfilter.c | |||
@@ -141,6 +141,7 @@ static inline void audit_free_rule(struct audit_entry *e) | |||
141 | selinux_audit_rule_free(f->se_rule); | 141 | selinux_audit_rule_free(f->se_rule); |
142 | } | 142 | } |
143 | kfree(e->rule.fields); | 143 | kfree(e->rule.fields); |
144 | kfree(e->rule.filterkey); | ||
144 | kfree(e); | 145 | kfree(e); |
145 | } | 146 | } |
146 | 147 | ||
@@ -278,6 +279,29 @@ static int audit_to_watch(struct audit_krule *krule, char *path, int len, | |||
278 | return 0; | 279 | return 0; |
279 | } | 280 | } |
280 | 281 | ||
282 | static __u32 *classes[AUDIT_SYSCALL_CLASSES]; | ||
283 | |||
284 | int __init audit_register_class(int class, unsigned *list) | ||
285 | { | ||
286 | __u32 *p = kzalloc(AUDIT_BITMASK_SIZE * sizeof(__u32), GFP_KERNEL); | ||
287 | if (!p) | ||
288 | return -ENOMEM; | ||
289 | while (*list != ~0U) { | ||
290 | unsigned n = *list++; | ||
291 | if (n >= AUDIT_BITMASK_SIZE * 32 - AUDIT_SYSCALL_CLASSES) { | ||
292 | kfree(p); | ||
293 | return -EINVAL; | ||
294 | } | ||
295 | p[AUDIT_WORD(n)] |= AUDIT_BIT(n); | ||
296 | } | ||
297 | if (class >= AUDIT_SYSCALL_CLASSES || classes[class]) { | ||
298 | kfree(p); | ||
299 | return -EINVAL; | ||
300 | } | ||
301 | classes[class] = p; | ||
302 | return 0; | ||
303 | } | ||
304 | |||
281 | /* Common user-space to kernel rule translation. */ | 305 | /* Common user-space to kernel rule translation. */ |
282 | static inline struct audit_entry *audit_to_entry_common(struct audit_rule *rule) | 306 | static inline struct audit_entry *audit_to_entry_common(struct audit_rule *rule) |
283 | { | 307 | { |
@@ -321,6 +345,22 @@ static inline struct audit_entry *audit_to_entry_common(struct audit_rule *rule) | |||
321 | for (i = 0; i < AUDIT_BITMASK_SIZE; i++) | 345 | for (i = 0; i < AUDIT_BITMASK_SIZE; i++) |
322 | entry->rule.mask[i] = rule->mask[i]; | 346 | entry->rule.mask[i] = rule->mask[i]; |
323 | 347 | ||
348 | for (i = 0; i < AUDIT_SYSCALL_CLASSES; i++) { | ||
349 | int bit = AUDIT_BITMASK_SIZE * 32 - i - 1; | ||
350 | __u32 *p = &entry->rule.mask[AUDIT_WORD(bit)]; | ||
351 | __u32 *class; | ||
352 | |||
353 | if (!(*p & AUDIT_BIT(bit))) | ||
354 | continue; | ||
355 | *p &= ~AUDIT_BIT(bit); | ||
356 | class = classes[i]; | ||
357 | if (class) { | ||
358 | int j; | ||
359 | for (j = 0; j < AUDIT_BITMASK_SIZE; j++) | ||
360 | entry->rule.mask[j] |= class[j]; | ||
361 | } | ||
362 | } | ||
363 | |||
324 | return entry; | 364 | return entry; |
325 | 365 | ||
326 | exit_err: | 366 | exit_err: |
@@ -469,11 +509,16 @@ static struct audit_entry *audit_data_to_entry(struct audit_rule_data *data, | |||
469 | case AUDIT_ARG2: | 509 | case AUDIT_ARG2: |
470 | case AUDIT_ARG3: | 510 | case AUDIT_ARG3: |
471 | break; | 511 | break; |
472 | case AUDIT_SE_USER: | 512 | case AUDIT_SUBJ_USER: |
473 | case AUDIT_SE_ROLE: | 513 | case AUDIT_SUBJ_ROLE: |
474 | case AUDIT_SE_TYPE: | 514 | case AUDIT_SUBJ_TYPE: |
475 | case AUDIT_SE_SEN: | 515 | case AUDIT_SUBJ_SEN: |
476 | case AUDIT_SE_CLR: | 516 | case AUDIT_SUBJ_CLR: |
517 | case AUDIT_OBJ_USER: | ||
518 | case AUDIT_OBJ_ROLE: | ||
519 | case AUDIT_OBJ_TYPE: | ||
520 | case AUDIT_OBJ_LEV_LOW: | ||
521 | case AUDIT_OBJ_LEV_HIGH: | ||
477 | str = audit_unpack_string(&bufp, &remain, f->val); | 522 | str = audit_unpack_string(&bufp, &remain, f->val); |
478 | if (IS_ERR(str)) | 523 | if (IS_ERR(str)) |
479 | goto exit_free; | 524 | goto exit_free; |
@@ -511,6 +556,16 @@ static struct audit_entry *audit_data_to_entry(struct audit_rule_data *data, | |||
511 | if (err) | 556 | if (err) |
512 | goto exit_free; | 557 | goto exit_free; |
513 | break; | 558 | break; |
559 | case AUDIT_FILTERKEY: | ||
560 | err = -EINVAL; | ||
561 | if (entry->rule.filterkey || f->val > AUDIT_MAX_KEY_LEN) | ||
562 | goto exit_free; | ||
563 | str = audit_unpack_string(&bufp, &remain, f->val); | ||
564 | if (IS_ERR(str)) | ||
565 | goto exit_free; | ||
566 | entry->rule.buflen += f->val; | ||
567 | entry->rule.filterkey = str; | ||
568 | break; | ||
514 | default: | 569 | default: |
515 | goto exit_free; | 570 | goto exit_free; |
516 | } | 571 | } |
@@ -600,11 +655,16 @@ static struct audit_rule_data *audit_krule_to_data(struct audit_krule *krule) | |||
600 | data->fields[i] = f->type; | 655 | data->fields[i] = f->type; |
601 | data->fieldflags[i] = f->op; | 656 | data->fieldflags[i] = f->op; |
602 | switch(f->type) { | 657 | switch(f->type) { |
603 | case AUDIT_SE_USER: | 658 | case AUDIT_SUBJ_USER: |
604 | case AUDIT_SE_ROLE: | 659 | case AUDIT_SUBJ_ROLE: |
605 | case AUDIT_SE_TYPE: | 660 | case AUDIT_SUBJ_TYPE: |
606 | case AUDIT_SE_SEN: | 661 | case AUDIT_SUBJ_SEN: |
607 | case AUDIT_SE_CLR: | 662 | case AUDIT_SUBJ_CLR: |
663 | case AUDIT_OBJ_USER: | ||
664 | case AUDIT_OBJ_ROLE: | ||
665 | case AUDIT_OBJ_TYPE: | ||
666 | case AUDIT_OBJ_LEV_LOW: | ||
667 | case AUDIT_OBJ_LEV_HIGH: | ||
608 | data->buflen += data->values[i] = | 668 | data->buflen += data->values[i] = |
609 | audit_pack_string(&bufp, f->se_str); | 669 | audit_pack_string(&bufp, f->se_str); |
610 | break; | 670 | break; |
@@ -612,6 +672,10 @@ static struct audit_rule_data *audit_krule_to_data(struct audit_krule *krule) | |||
612 | data->buflen += data->values[i] = | 672 | data->buflen += data->values[i] = |
613 | audit_pack_string(&bufp, krule->watch->path); | 673 | audit_pack_string(&bufp, krule->watch->path); |
614 | break; | 674 | break; |
675 | case AUDIT_FILTERKEY: | ||
676 | data->buflen += data->values[i] = | ||
677 | audit_pack_string(&bufp, krule->filterkey); | ||
678 | break; | ||
615 | default: | 679 | default: |
616 | data->values[i] = f->val; | 680 | data->values[i] = f->val; |
617 | } | 681 | } |
@@ -639,11 +703,16 @@ static int audit_compare_rule(struct audit_krule *a, struct audit_krule *b) | |||
639 | return 1; | 703 | return 1; |
640 | 704 | ||
641 | switch(a->fields[i].type) { | 705 | switch(a->fields[i].type) { |
642 | case AUDIT_SE_USER: | 706 | case AUDIT_SUBJ_USER: |
643 | case AUDIT_SE_ROLE: | 707 | case AUDIT_SUBJ_ROLE: |
644 | case AUDIT_SE_TYPE: | 708 | case AUDIT_SUBJ_TYPE: |
645 | case AUDIT_SE_SEN: | 709 | case AUDIT_SUBJ_SEN: |
646 | case AUDIT_SE_CLR: | 710 | case AUDIT_SUBJ_CLR: |
711 | case AUDIT_OBJ_USER: | ||
712 | case AUDIT_OBJ_ROLE: | ||
713 | case AUDIT_OBJ_TYPE: | ||
714 | case AUDIT_OBJ_LEV_LOW: | ||
715 | case AUDIT_OBJ_LEV_HIGH: | ||
647 | if (strcmp(a->fields[i].se_str, b->fields[i].se_str)) | 716 | if (strcmp(a->fields[i].se_str, b->fields[i].se_str)) |
648 | return 1; | 717 | return 1; |
649 | break; | 718 | break; |
@@ -651,6 +720,11 @@ static int audit_compare_rule(struct audit_krule *a, struct audit_krule *b) | |||
651 | if (strcmp(a->watch->path, b->watch->path)) | 720 | if (strcmp(a->watch->path, b->watch->path)) |
652 | return 1; | 721 | return 1; |
653 | break; | 722 | break; |
723 | case AUDIT_FILTERKEY: | ||
724 | /* both filterkeys exist based on above type compare */ | ||
725 | if (strcmp(a->filterkey, b->filterkey)) | ||
726 | return 1; | ||
727 | break; | ||
654 | default: | 728 | default: |
655 | if (a->fields[i].val != b->fields[i].val) | 729 | if (a->fields[i].val != b->fields[i].val) |
656 | return 1; | 730 | return 1; |
@@ -730,6 +804,7 @@ static struct audit_entry *audit_dupe_rule(struct audit_krule *old, | |||
730 | u32 fcount = old->field_count; | 804 | u32 fcount = old->field_count; |
731 | struct audit_entry *entry; | 805 | struct audit_entry *entry; |
732 | struct audit_krule *new; | 806 | struct audit_krule *new; |
807 | char *fk; | ||
733 | int i, err = 0; | 808 | int i, err = 0; |
734 | 809 | ||
735 | entry = audit_init_entry(fcount); | 810 | entry = audit_init_entry(fcount); |
@@ -753,13 +828,25 @@ static struct audit_entry *audit_dupe_rule(struct audit_krule *old, | |||
753 | * the originals will all be freed when the old rule is freed. */ | 828 | * the originals will all be freed when the old rule is freed. */ |
754 | for (i = 0; i < fcount; i++) { | 829 | for (i = 0; i < fcount; i++) { |
755 | switch (new->fields[i].type) { | 830 | switch (new->fields[i].type) { |
756 | case AUDIT_SE_USER: | 831 | case AUDIT_SUBJ_USER: |
757 | case AUDIT_SE_ROLE: | 832 | case AUDIT_SUBJ_ROLE: |
758 | case AUDIT_SE_TYPE: | 833 | case AUDIT_SUBJ_TYPE: |
759 | case AUDIT_SE_SEN: | 834 | case AUDIT_SUBJ_SEN: |
760 | case AUDIT_SE_CLR: | 835 | case AUDIT_SUBJ_CLR: |
836 | case AUDIT_OBJ_USER: | ||
837 | case AUDIT_OBJ_ROLE: | ||
838 | case AUDIT_OBJ_TYPE: | ||
839 | case AUDIT_OBJ_LEV_LOW: | ||
840 | case AUDIT_OBJ_LEV_HIGH: | ||
761 | err = audit_dupe_selinux_field(&new->fields[i], | 841 | err = audit_dupe_selinux_field(&new->fields[i], |
762 | &old->fields[i]); | 842 | &old->fields[i]); |
843 | break; | ||
844 | case AUDIT_FILTERKEY: | ||
845 | fk = kstrdup(old->filterkey, GFP_KERNEL); | ||
846 | if (unlikely(!fk)) | ||
847 | err = -ENOMEM; | ||
848 | else | ||
849 | new->filterkey = fk; | ||
763 | } | 850 | } |
764 | if (err) { | 851 | if (err) { |
765 | audit_free_rule(entry); | 852 | audit_free_rule(entry); |
@@ -1245,6 +1332,34 @@ static void audit_list_rules(int pid, int seq, struct sk_buff_head *q) | |||
1245 | skb_queue_tail(q, skb); | 1332 | skb_queue_tail(q, skb); |
1246 | } | 1333 | } |
1247 | 1334 | ||
1335 | /* Log rule additions and removals */ | ||
1336 | static void audit_log_rule_change(uid_t loginuid, u32 sid, char *action, | ||
1337 | struct audit_krule *rule, int res) | ||
1338 | { | ||
1339 | struct audit_buffer *ab; | ||
1340 | |||
1341 | ab = audit_log_start(NULL, GFP_KERNEL, AUDIT_CONFIG_CHANGE); | ||
1342 | if (!ab) | ||
1343 | return; | ||
1344 | audit_log_format(ab, "auid=%u", loginuid); | ||
1345 | if (sid) { | ||
1346 | char *ctx = NULL; | ||
1347 | u32 len; | ||
1348 | if (selinux_ctxid_to_string(sid, &ctx, &len)) | ||
1349 | audit_log_format(ab, " ssid=%u", sid); | ||
1350 | else | ||
1351 | audit_log_format(ab, " subj=%s", ctx); | ||
1352 | kfree(ctx); | ||
1353 | } | ||
1354 | audit_log_format(ab, " %s rule key=", action); | ||
1355 | if (rule->filterkey) | ||
1356 | audit_log_untrustedstring(ab, rule->filterkey); | ||
1357 | else | ||
1358 | audit_log_format(ab, "(null)"); | ||
1359 | audit_log_format(ab, " list=%d res=%d", rule->listnr, res); | ||
1360 | audit_log_end(ab); | ||
1361 | } | ||
1362 | |||
1248 | /** | 1363 | /** |
1249 | * audit_receive_filter - apply all rules to the specified message type | 1364 | * audit_receive_filter - apply all rules to the specified message type |
1250 | * @type: audit message type | 1365 | * @type: audit message type |
@@ -1304,24 +1419,7 @@ int audit_receive_filter(int type, int pid, int uid, int seq, void *data, | |||
1304 | 1419 | ||
1305 | err = audit_add_rule(entry, | 1420 | err = audit_add_rule(entry, |
1306 | &audit_filter_list[entry->rule.listnr]); | 1421 | &audit_filter_list[entry->rule.listnr]); |
1307 | 1422 | audit_log_rule_change(loginuid, sid, "add", &entry->rule, !err); | |
1308 | if (sid) { | ||
1309 | char *ctx = NULL; | ||
1310 | u32 len; | ||
1311 | if (selinux_ctxid_to_string(sid, &ctx, &len)) { | ||
1312 | /* Maybe call audit_panic? */ | ||
1313 | audit_log(NULL, GFP_KERNEL, AUDIT_CONFIG_CHANGE, | ||
1314 | "auid=%u ssid=%u add rule to list=%d res=%d", | ||
1315 | loginuid, sid, entry->rule.listnr, !err); | ||
1316 | } else | ||
1317 | audit_log(NULL, GFP_KERNEL, AUDIT_CONFIG_CHANGE, | ||
1318 | "auid=%u subj=%s add rule to list=%d res=%d", | ||
1319 | loginuid, ctx, entry->rule.listnr, !err); | ||
1320 | kfree(ctx); | ||
1321 | } else | ||
1322 | audit_log(NULL, GFP_KERNEL, AUDIT_CONFIG_CHANGE, | ||
1323 | "auid=%u add rule to list=%d res=%d", | ||
1324 | loginuid, entry->rule.listnr, !err); | ||
1325 | 1423 | ||
1326 | if (err) | 1424 | if (err) |
1327 | audit_free_rule(entry); | 1425 | audit_free_rule(entry); |
@@ -1337,24 +1435,8 @@ int audit_receive_filter(int type, int pid, int uid, int seq, void *data, | |||
1337 | 1435 | ||
1338 | err = audit_del_rule(entry, | 1436 | err = audit_del_rule(entry, |
1339 | &audit_filter_list[entry->rule.listnr]); | 1437 | &audit_filter_list[entry->rule.listnr]); |
1340 | 1438 | audit_log_rule_change(loginuid, sid, "remove", &entry->rule, | |
1341 | if (sid) { | 1439 | !err); |
1342 | char *ctx = NULL; | ||
1343 | u32 len; | ||
1344 | if (selinux_ctxid_to_string(sid, &ctx, &len)) { | ||
1345 | /* Maybe call audit_panic? */ | ||
1346 | audit_log(NULL, GFP_KERNEL, AUDIT_CONFIG_CHANGE, | ||
1347 | "auid=%u ssid=%u remove rule from list=%d res=%d", | ||
1348 | loginuid, sid, entry->rule.listnr, !err); | ||
1349 | } else | ||
1350 | audit_log(NULL, GFP_KERNEL, AUDIT_CONFIG_CHANGE, | ||
1351 | "auid=%u subj=%s remove rule from list=%d res=%d", | ||
1352 | loginuid, ctx, entry->rule.listnr, !err); | ||
1353 | kfree(ctx); | ||
1354 | } else | ||
1355 | audit_log(NULL, GFP_KERNEL, AUDIT_CONFIG_CHANGE, | ||
1356 | "auid=%u remove rule from list=%d res=%d", | ||
1357 | loginuid, entry->rule.listnr, !err); | ||
1358 | 1440 | ||
1359 | audit_free_rule(entry); | 1441 | audit_free_rule(entry); |
1360 | break; | 1442 | break; |
@@ -1514,11 +1596,16 @@ static inline int audit_rule_has_selinux(struct audit_krule *rule) | |||
1514 | for (i = 0; i < rule->field_count; i++) { | 1596 | for (i = 0; i < rule->field_count; i++) { |
1515 | struct audit_field *f = &rule->fields[i]; | 1597 | struct audit_field *f = &rule->fields[i]; |
1516 | switch (f->type) { | 1598 | switch (f->type) { |
1517 | case AUDIT_SE_USER: | 1599 | case AUDIT_SUBJ_USER: |
1518 | case AUDIT_SE_ROLE: | 1600 | case AUDIT_SUBJ_ROLE: |
1519 | case AUDIT_SE_TYPE: | 1601 | case AUDIT_SUBJ_TYPE: |
1520 | case AUDIT_SE_SEN: | 1602 | case AUDIT_SUBJ_SEN: |
1521 | case AUDIT_SE_CLR: | 1603 | case AUDIT_SUBJ_CLR: |
1604 | case AUDIT_OBJ_USER: | ||
1605 | case AUDIT_OBJ_ROLE: | ||
1606 | case AUDIT_OBJ_TYPE: | ||
1607 | case AUDIT_OBJ_LEV_LOW: | ||
1608 | case AUDIT_OBJ_LEV_HIGH: | ||
1522 | return 1; | 1609 | return 1; |
1523 | } | 1610 | } |
1524 | } | 1611 | } |
diff --git a/kernel/auditsc.c b/kernel/auditsc.c index dc5e3f01efe7..ae40ac8c39e7 100644 --- a/kernel/auditsc.c +++ b/kernel/auditsc.c | |||
@@ -186,6 +186,7 @@ struct audit_context { | |||
186 | int auditable; /* 1 if record should be written */ | 186 | int auditable; /* 1 if record should be written */ |
187 | int name_count; | 187 | int name_count; |
188 | struct audit_names names[AUDIT_NAMES]; | 188 | struct audit_names names[AUDIT_NAMES]; |
189 | char * filterkey; /* key for rule that triggered record */ | ||
189 | struct dentry * pwd; | 190 | struct dentry * pwd; |
190 | struct vfsmount * pwdmnt; | 191 | struct vfsmount * pwdmnt; |
191 | struct audit_context *previous; /* For nested syscalls */ | 192 | struct audit_context *previous; /* For nested syscalls */ |
@@ -320,11 +321,11 @@ static int audit_filter_rules(struct task_struct *tsk, | |||
320 | if (ctx) | 321 | if (ctx) |
321 | result = audit_comparator(ctx->loginuid, f->op, f->val); | 322 | result = audit_comparator(ctx->loginuid, f->op, f->val); |
322 | break; | 323 | break; |
323 | case AUDIT_SE_USER: | 324 | case AUDIT_SUBJ_USER: |
324 | case AUDIT_SE_ROLE: | 325 | case AUDIT_SUBJ_ROLE: |
325 | case AUDIT_SE_TYPE: | 326 | case AUDIT_SUBJ_TYPE: |
326 | case AUDIT_SE_SEN: | 327 | case AUDIT_SUBJ_SEN: |
327 | case AUDIT_SE_CLR: | 328 | case AUDIT_SUBJ_CLR: |
328 | /* NOTE: this may return negative values indicating | 329 | /* NOTE: this may return negative values indicating |
329 | a temporary error. We simply treat this as a | 330 | a temporary error. We simply treat this as a |
330 | match for now to avoid losing information that | 331 | match for now to avoid losing information that |
@@ -341,6 +342,46 @@ static int audit_filter_rules(struct task_struct *tsk, | |||
341 | ctx); | 342 | ctx); |
342 | } | 343 | } |
343 | break; | 344 | break; |
345 | case AUDIT_OBJ_USER: | ||
346 | case AUDIT_OBJ_ROLE: | ||
347 | case AUDIT_OBJ_TYPE: | ||
348 | case AUDIT_OBJ_LEV_LOW: | ||
349 | case AUDIT_OBJ_LEV_HIGH: | ||
350 | /* The above note for AUDIT_SUBJ_USER...AUDIT_SUBJ_CLR | ||
351 | also applies here */ | ||
352 | if (f->se_rule) { | ||
353 | /* Find files that match */ | ||
354 | if (name) { | ||
355 | result = selinux_audit_rule_match( | ||
356 | name->osid, f->type, f->op, | ||
357 | f->se_rule, ctx); | ||
358 | } else if (ctx) { | ||
359 | for (j = 0; j < ctx->name_count; j++) { | ||
360 | if (selinux_audit_rule_match( | ||
361 | ctx->names[j].osid, | ||
362 | f->type, f->op, | ||
363 | f->se_rule, ctx)) { | ||
364 | ++result; | ||
365 | break; | ||
366 | } | ||
367 | } | ||
368 | } | ||
369 | /* Find ipc objects that match */ | ||
370 | if (ctx) { | ||
371 | struct audit_aux_data *aux; | ||
372 | for (aux = ctx->aux; aux; | ||
373 | aux = aux->next) { | ||
374 | if (aux->type == AUDIT_IPC) { | ||
375 | struct audit_aux_data_ipcctl *axi = (void *)aux; | ||
376 | if (selinux_audit_rule_match(axi->osid, f->type, f->op, f->se_rule, ctx)) { | ||
377 | ++result; | ||
378 | break; | ||
379 | } | ||
380 | } | ||
381 | } | ||
382 | } | ||
383 | } | ||
384 | break; | ||
344 | case AUDIT_ARG0: | 385 | case AUDIT_ARG0: |
345 | case AUDIT_ARG1: | 386 | case AUDIT_ARG1: |
346 | case AUDIT_ARG2: | 387 | case AUDIT_ARG2: |
@@ -348,11 +389,17 @@ static int audit_filter_rules(struct task_struct *tsk, | |||
348 | if (ctx) | 389 | if (ctx) |
349 | result = audit_comparator(ctx->argv[f->type-AUDIT_ARG0], f->op, f->val); | 390 | result = audit_comparator(ctx->argv[f->type-AUDIT_ARG0], f->op, f->val); |
350 | break; | 391 | break; |
392 | case AUDIT_FILTERKEY: | ||
393 | /* ignore this field for filtering */ | ||
394 | result = 1; | ||
395 | break; | ||
351 | } | 396 | } |
352 | 397 | ||
353 | if (!result) | 398 | if (!result) |
354 | return 0; | 399 | return 0; |
355 | } | 400 | } |
401 | if (rule->filterkey) | ||
402 | ctx->filterkey = kstrdup(rule->filterkey, GFP_ATOMIC); | ||
356 | switch (rule->action) { | 403 | switch (rule->action) { |
357 | case AUDIT_NEVER: *state = AUDIT_DISABLED; break; | 404 | case AUDIT_NEVER: *state = AUDIT_DISABLED; break; |
358 | case AUDIT_ALWAYS: *state = AUDIT_RECORD_CONTEXT; break; | 405 | case AUDIT_ALWAYS: *state = AUDIT_RECORD_CONTEXT; break; |
@@ -627,6 +674,7 @@ static inline void audit_free_context(struct audit_context *context) | |||
627 | } | 674 | } |
628 | audit_free_names(context); | 675 | audit_free_names(context); |
629 | audit_free_aux(context); | 676 | audit_free_aux(context); |
677 | kfree(context->filterkey); | ||
630 | kfree(context); | 678 | kfree(context); |
631 | context = previous; | 679 | context = previous; |
632 | } while (context); | 680 | } while (context); |
@@ -735,6 +783,11 @@ static void audit_log_exit(struct audit_context *context, struct task_struct *ts | |||
735 | context->euid, context->suid, context->fsuid, | 783 | context->euid, context->suid, context->fsuid, |
736 | context->egid, context->sgid, context->fsgid, tty); | 784 | context->egid, context->sgid, context->fsgid, tty); |
737 | audit_log_task_info(ab, tsk); | 785 | audit_log_task_info(ab, tsk); |
786 | if (context->filterkey) { | ||
787 | audit_log_format(ab, " key="); | ||
788 | audit_log_untrustedstring(ab, context->filterkey); | ||
789 | } else | ||
790 | audit_log_format(ab, " key=(null)"); | ||
738 | audit_log_end(ab); | 791 | audit_log_end(ab); |
739 | 792 | ||
740 | for (aux = context->aux; aux; aux = aux->next) { | 793 | for (aux = context->aux; aux; aux = aux->next) { |
@@ -1060,6 +1113,8 @@ void audit_syscall_exit(int valid, long return_code) | |||
1060 | } else { | 1113 | } else { |
1061 | audit_free_names(context); | 1114 | audit_free_names(context); |
1062 | audit_free_aux(context); | 1115 | audit_free_aux(context); |
1116 | kfree(context->filterkey); | ||
1117 | context->filterkey = NULL; | ||
1063 | tsk->audit_context = context; | 1118 | tsk->audit_context = context; |
1064 | } | 1119 | } |
1065 | } | 1120 | } |
diff --git a/kernel/futex.c b/kernel/futex.c index 6c91f938005d..15caf93e4a43 100644 --- a/kernel/futex.c +++ b/kernel/futex.c | |||
@@ -630,8 +630,10 @@ static int futex_wake(u32 __user *uaddr, int nr_wake) | |||
630 | 630 | ||
631 | list_for_each_entry_safe(this, next, head, list) { | 631 | list_for_each_entry_safe(this, next, head, list) { |
632 | if (match_futex (&this->key, &key)) { | 632 | if (match_futex (&this->key, &key)) { |
633 | if (this->pi_state) | 633 | if (this->pi_state) { |
634 | return -EINVAL; | 634 | ret = -EINVAL; |
635 | break; | ||
636 | } | ||
635 | wake_futex(this); | 637 | wake_futex(this); |
636 | if (++ret >= nr_wake) | 638 | if (++ret >= nr_wake) |
637 | break; | 639 | break; |
@@ -1208,7 +1210,7 @@ static int do_futex_lock_pi(u32 __user *uaddr, int detect, int trylock, | |||
1208 | } | 1210 | } |
1209 | 1211 | ||
1210 | down_read(&curr->mm->mmap_sem); | 1212 | down_read(&curr->mm->mmap_sem); |
1211 | hb = queue_lock(&q, -1, NULL); | 1213 | spin_lock(q.lock_ptr); |
1212 | 1214 | ||
1213 | /* | 1215 | /* |
1214 | * Got the lock. We might not be the anticipated owner if we | 1216 | * Got the lock. We might not be the anticipated owner if we |
diff --git a/kernel/irq/handle.c b/kernel/irq/handle.c index e71266c3803e..6d8b30114961 100644 --- a/kernel/irq/handle.c +++ b/kernel/irq/handle.c | |||
@@ -142,7 +142,7 @@ irqreturn_t handle_IRQ_event(unsigned int irq, struct pt_regs *regs, | |||
142 | } | 142 | } |
143 | #endif | 143 | #endif |
144 | 144 | ||
145 | if (!(action->flags & SA_INTERRUPT)) | 145 | if (!(action->flags & IRQF_DISABLED)) |
146 | local_irq_enable(); | 146 | local_irq_enable(); |
147 | 147 | ||
148 | do { | 148 | do { |
@@ -153,7 +153,7 @@ irqreturn_t handle_IRQ_event(unsigned int irq, struct pt_regs *regs, | |||
153 | action = action->next; | 153 | action = action->next; |
154 | } while (action); | 154 | } while (action); |
155 | 155 | ||
156 | if (status & SA_SAMPLE_RANDOM) | 156 | if (status & IRQF_SAMPLE_RANDOM) |
157 | add_interrupt_randomness(irq); | 157 | add_interrupt_randomness(irq); |
158 | local_irq_disable(); | 158 | local_irq_disable(); |
159 | 159 | ||
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c index b7117e81ac56..fede5fa351df 100644 --- a/kernel/irq/manage.c +++ b/kernel/irq/manage.c | |||
@@ -114,7 +114,7 @@ void enable_irq(unsigned int irq) | |||
114 | spin_lock_irqsave(&desc->lock, flags); | 114 | spin_lock_irqsave(&desc->lock, flags); |
115 | switch (desc->depth) { | 115 | switch (desc->depth) { |
116 | case 0: | 116 | case 0: |
117 | printk(KERN_WARNING "Unablanced enable_irq(%d)\n", irq); | 117 | printk(KERN_WARNING "Unbalanced enable for IRQ %d\n", irq); |
118 | WARN_ON(1); | 118 | WARN_ON(1); |
119 | break; | 119 | break; |
120 | case 1: { | 120 | case 1: { |
@@ -167,7 +167,7 @@ int can_request_irq(unsigned int irq, unsigned long irqflags) | |||
167 | 167 | ||
168 | action = irq_desc[irq].action; | 168 | action = irq_desc[irq].action; |
169 | if (action) | 169 | if (action) |
170 | if (irqflags & action->flags & SA_SHIRQ) | 170 | if (irqflags & action->flags & IRQF_SHARED) |
171 | action = NULL; | 171 | action = NULL; |
172 | 172 | ||
173 | return !action; | 173 | return !action; |
@@ -205,7 +205,7 @@ int setup_irq(unsigned int irq, struct irqaction *new) | |||
205 | * so we have to be careful not to interfere with a | 205 | * so we have to be careful not to interfere with a |
206 | * running system. | 206 | * running system. |
207 | */ | 207 | */ |
208 | if (new->flags & SA_SAMPLE_RANDOM) { | 208 | if (new->flags & IRQF_SAMPLE_RANDOM) { |
209 | /* | 209 | /* |
210 | * This function might sleep, we want to call it first, | 210 | * This function might sleep, we want to call it first, |
211 | * outside of the atomic block. | 211 | * outside of the atomic block. |
@@ -227,16 +227,17 @@ int setup_irq(unsigned int irq, struct irqaction *new) | |||
227 | /* | 227 | /* |
228 | * Can't share interrupts unless both agree to and are | 228 | * Can't share interrupts unless both agree to and are |
229 | * the same type (level, edge, polarity). So both flag | 229 | * the same type (level, edge, polarity). So both flag |
230 | * fields must have SA_SHIRQ set and the bits which | 230 | * fields must have IRQF_SHARED set and the bits which |
231 | * set the trigger type must match. | 231 | * set the trigger type must match. |
232 | */ | 232 | */ |
233 | if (!((old->flags & new->flags) & SA_SHIRQ) || | 233 | if (!((old->flags & new->flags) & IRQF_SHARED) || |
234 | ((old->flags ^ new->flags) & SA_TRIGGER_MASK)) | 234 | ((old->flags ^ new->flags) & IRQF_TRIGGER_MASK)) |
235 | goto mismatch; | 235 | goto mismatch; |
236 | 236 | ||
237 | #if defined(CONFIG_IRQ_PER_CPU) && defined(SA_PERCPU_IRQ) | 237 | #if defined(CONFIG_IRQ_PER_CPU) && defined(IRQF_PERCPU) |
238 | /* All handlers must agree on per-cpuness */ | 238 | /* All handlers must agree on per-cpuness */ |
239 | if ((old->flags & IRQ_PER_CPU) != (new->flags & IRQ_PER_CPU)) | 239 | if ((old->flags & IRQF_PERCPU) != |
240 | (new->flags & IRQF_PERCPU)) | ||
240 | goto mismatch; | 241 | goto mismatch; |
241 | #endif | 242 | #endif |
242 | 243 | ||
@@ -249,26 +250,27 @@ int setup_irq(unsigned int irq, struct irqaction *new) | |||
249 | } | 250 | } |
250 | 251 | ||
251 | *p = new; | 252 | *p = new; |
252 | #if defined(CONFIG_IRQ_PER_CPU) && defined(SA_PERCPU_IRQ) | 253 | #if defined(CONFIG_IRQ_PER_CPU) && defined(IRQF_PERCPU) |
253 | if (new->flags & SA_PERCPU_IRQ) | 254 | if (new->flags & IRQF_PERCPU) |
254 | desc->status |= IRQ_PER_CPU; | 255 | desc->status |= IRQ_PER_CPU; |
255 | #endif | 256 | #endif |
256 | if (!shared) { | 257 | if (!shared) { |
257 | irq_chip_set_defaults(desc->chip); | 258 | irq_chip_set_defaults(desc->chip); |
258 | 259 | ||
259 | /* Setup the type (level, edge polarity) if configured: */ | 260 | /* Setup the type (level, edge polarity) if configured: */ |
260 | if (new->flags & SA_TRIGGER_MASK) { | 261 | if (new->flags & IRQF_TRIGGER_MASK) { |
261 | if (desc->chip && desc->chip->set_type) | 262 | if (desc->chip && desc->chip->set_type) |
262 | desc->chip->set_type(irq, | 263 | desc->chip->set_type(irq, |
263 | new->flags & SA_TRIGGER_MASK); | 264 | new->flags & IRQF_TRIGGER_MASK); |
264 | else | 265 | else |
265 | /* | 266 | /* |
266 | * SA_TRIGGER_* but the PIC does not support | 267 | * IRQF_TRIGGER_* but the PIC does not support |
267 | * multiple flow-types? | 268 | * multiple flow-types? |
268 | */ | 269 | */ |
269 | printk(KERN_WARNING "setup_irq(%d) SA_TRIGGER" | 270 | printk(KERN_WARNING "No IRQF_TRIGGER set_type " |
270 | "set. No set_type function available\n", | 271 | "function for IRQ %d (%s)\n", irq, |
271 | irq); | 272 | desc->chip ? desc->chip->name : |
273 | "unknown"); | ||
272 | } else | 274 | } else |
273 | compat_irq_chip_set_default_handler(desc); | 275 | compat_irq_chip_set_default_handler(desc); |
274 | 276 | ||
@@ -297,8 +299,8 @@ int setup_irq(unsigned int irq, struct irqaction *new) | |||
297 | 299 | ||
298 | mismatch: | 300 | mismatch: |
299 | spin_unlock_irqrestore(&desc->lock, flags); | 301 | spin_unlock_irqrestore(&desc->lock, flags); |
300 | if (!(new->flags & SA_PROBEIRQ)) { | 302 | if (!(new->flags & IRQF_PROBE_SHARED)) { |
301 | printk(KERN_ERR "%s: irq handler mismatch\n", __FUNCTION__); | 303 | printk(KERN_ERR "IRQ handler type mismatch for IRQ %d\n", irq); |
302 | dump_stack(); | 304 | dump_stack(); |
303 | } | 305 | } |
304 | return -EBUSY; | 306 | return -EBUSY; |
@@ -365,7 +367,7 @@ void free_irq(unsigned int irq, void *dev_id) | |||
365 | kfree(action); | 367 | kfree(action); |
366 | return; | 368 | return; |
367 | } | 369 | } |
368 | printk(KERN_ERR "Trying to free free IRQ%d\n", irq); | 370 | printk(KERN_ERR "Trying to free already-free IRQ %d\n", irq); |
369 | spin_unlock_irqrestore(&desc->lock, flags); | 371 | spin_unlock_irqrestore(&desc->lock, flags); |
370 | return; | 372 | return; |
371 | } | 373 | } |
@@ -396,9 +398,9 @@ EXPORT_SYMBOL(free_irq); | |||
396 | * | 398 | * |
397 | * Flags: | 399 | * Flags: |
398 | * | 400 | * |
399 | * SA_SHIRQ Interrupt is shared | 401 | * IRQF_SHARED Interrupt is shared |
400 | * SA_INTERRUPT Disable local interrupts while processing | 402 | * IRQF_DISABLED Disable local interrupts while processing |
401 | * SA_SAMPLE_RANDOM The interrupt can be used for entropy | 403 | * IRQF_SAMPLE_RANDOM The interrupt can be used for entropy |
402 | * | 404 | * |
403 | */ | 405 | */ |
404 | int request_irq(unsigned int irq, | 406 | int request_irq(unsigned int irq, |
@@ -414,7 +416,7 @@ int request_irq(unsigned int irq, | |||
414 | * which interrupt is which (messes up the interrupt freeing | 416 | * which interrupt is which (messes up the interrupt freeing |
415 | * logic etc). | 417 | * logic etc). |
416 | */ | 418 | */ |
417 | if ((irqflags & SA_SHIRQ) && !dev_id) | 419 | if ((irqflags & IRQF_SHARED) && !dev_id) |
418 | return -EINVAL; | 420 | return -EINVAL; |
419 | if (irq >= NR_IRQS) | 421 | if (irq >= NR_IRQS) |
420 | return -EINVAL; | 422 | return -EINVAL; |
diff --git a/kernel/irq/spurious.c b/kernel/irq/spurious.c index b483deed311c..417e98092cf2 100644 --- a/kernel/irq/spurious.c +++ b/kernel/irq/spurious.c | |||
@@ -36,7 +36,7 @@ static int misrouted_irq(int irq, struct pt_regs *regs) | |||
36 | * Already running: If it is shared get the other | 36 | * Already running: If it is shared get the other |
37 | * CPU to go looking for our mystery interrupt too | 37 | * CPU to go looking for our mystery interrupt too |
38 | */ | 38 | */ |
39 | if (desc->action && (desc->action->flags & SA_SHIRQ)) | 39 | if (desc->action && (desc->action->flags & IRQF_SHARED)) |
40 | desc->status |= IRQ_PENDING; | 40 | desc->status |= IRQ_PENDING; |
41 | spin_unlock(&desc->lock); | 41 | spin_unlock(&desc->lock); |
42 | continue; | 42 | continue; |
@@ -48,7 +48,7 @@ static int misrouted_irq(int irq, struct pt_regs *regs) | |||
48 | 48 | ||
49 | while (action) { | 49 | while (action) { |
50 | /* Only shared IRQ handlers are safe to call */ | 50 | /* Only shared IRQ handlers are safe to call */ |
51 | if (action->flags & SA_SHIRQ) { | 51 | if (action->flags & IRQF_SHARED) { |
52 | if (action->handler(i, action->dev_id, regs) == | 52 | if (action->handler(i, action->dev_id, regs) == |
53 | IRQ_HANDLED) | 53 | IRQ_HANDLED) |
54 | ok = 1; | 54 | ok = 1; |
diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include index b0d067be7390..2180c88cfe89 100644 --- a/scripts/Kbuild.include +++ b/scripts/Kbuild.include | |||
@@ -13,6 +13,10 @@ space := $(empty) $(empty) | |||
13 | depfile = $(subst $(comma),_,$(@D)/.$(@F).d) | 13 | depfile = $(subst $(comma),_,$(@D)/.$(@F).d) |
14 | 14 | ||
15 | ### | 15 | ### |
16 | # filename of target with directory and extension stripped | ||
17 | basetarget = $(basename $(notdir $@)) | ||
18 | |||
19 | ### | ||
16 | # Escape single quote for use in echo statements | 20 | # Escape single quote for use in echo statements |
17 | escsq = $(subst $(squote),'\$(squote)',$1) | 21 | escsq = $(subst $(squote),'\$(squote)',$1) |
18 | 22 | ||
diff --git a/scripts/Makefile.build b/scripts/Makefile.build index 02a7eea5fdbc..3cb445cc7432 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build | |||
@@ -117,7 +117,7 @@ $(real-objs-m:.o=.lst): quiet_modtag := [M] | |||
117 | $(obj-m) : quiet_modtag := [M] | 117 | $(obj-m) : quiet_modtag := [M] |
118 | 118 | ||
119 | # Default for not multi-part modules | 119 | # Default for not multi-part modules |
120 | modname = $(*F) | 120 | modname = $(basetarget) |
121 | 121 | ||
122 | $(multi-objs-m) : modname = $(modname-multi) | 122 | $(multi-objs-m) : modname = $(modname-multi) |
123 | $(multi-objs-m:.o=.i) : modname = $(modname-multi) | 123 | $(multi-objs-m:.o=.i) : modname = $(modname-multi) |
diff --git a/scripts/Makefile.host b/scripts/Makefile.host index 2b066d12af2c..18ecd4d5df7f 100644 --- a/scripts/Makefile.host +++ b/scripts/Makefile.host | |||
@@ -80,8 +80,10 @@ obj-dirs += $(host-objdirs) | |||
80 | ##### | 80 | ##### |
81 | # Handle options to gcc. Support building with separate output directory | 81 | # Handle options to gcc. Support building with separate output directory |
82 | 82 | ||
83 | _hostc_flags = $(HOSTCFLAGS) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS_$(*F).o) | 83 | _hostc_flags = $(HOSTCFLAGS) $(HOST_EXTRACFLAGS) \ |
84 | _hostcxx_flags = $(HOSTCXXFLAGS) $(HOST_EXTRACXXFLAGS) $(HOSTCXXFLAGS_$(*F).o) | 84 | $(HOSTCFLAGS_$(basetarget).o) |
85 | _hostcxx_flags = $(HOSTCXXFLAGS) $(HOST_EXTRACXXFLAGS) \ | ||
86 | $(HOSTCXXFLAGS_$(basetarget).o) | ||
85 | 87 | ||
86 | ifeq ($(KBUILD_SRC),) | 88 | ifeq ($(KBUILD_SRC),) |
87 | __hostc_flags = $(_hostc_flags) | 89 | __hostc_flags = $(_hostc_flags) |
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 2cb4935e85d1..fc498fee68ed 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib | |||
@@ -82,12 +82,12 @@ obj-dirs := $(addprefix $(obj)/,$(obj-dirs)) | |||
82 | # than one module. In that case KBUILD_MODNAME will be set to foo_bar, | 82 | # than one module. In that case KBUILD_MODNAME will be set to foo_bar, |
83 | # where foo and bar are the name of the modules. | 83 | # where foo and bar are the name of the modules. |
84 | name-fix = $(subst $(comma),_,$(subst -,_,$1)) | 84 | name-fix = $(subst $(comma),_,$(subst -,_,$1)) |
85 | basename_flags = -D"KBUILD_BASENAME=KBUILD_STR($(call name-fix,$(*F)))" | 85 | basename_flags = -D"KBUILD_BASENAME=KBUILD_STR($(call name-fix,$(basetarget)))" |
86 | modname_flags = $(if $(filter 1,$(words $(modname))),\ | 86 | modname_flags = $(if $(filter 1,$(words $(modname))),\ |
87 | -D"KBUILD_MODNAME=KBUILD_STR($(call name-fix,$(modname)))") | 87 | -D"KBUILD_MODNAME=KBUILD_STR($(call name-fix,$(modname)))") |
88 | 88 | ||
89 | _c_flags = $(CFLAGS) $(EXTRA_CFLAGS) $(CFLAGS_$(*F).o) | 89 | _c_flags = $(CFLAGS) $(EXTRA_CFLAGS) $(CFLAGS_$(basetarget).o) |
90 | _a_flags = $(AFLAGS) $(EXTRA_AFLAGS) $(AFLAGS_$(*F).o) | 90 | _a_flags = $(AFLAGS) $(EXTRA_AFLAGS) $(AFLAGS_$(basetarget).o) |
91 | _cpp_flags = $(CPPFLAGS) $(EXTRA_CPPFLAGS) $(CPPFLAGS_$(@F)) | 91 | _cpp_flags = $(CPPFLAGS) $(EXTRA_CPPFLAGS) $(CPPFLAGS_$(@F)) |
92 | 92 | ||
93 | # If building the kernel in a separate objtree expand all occurrences | 93 | # If building the kernel in a separate objtree expand all occurrences |
diff --git a/scripts/Makefile.modpost b/scripts/Makefile.modpost index 576cce5e387f..a49550205dcc 100644 --- a/scripts/Makefile.modpost +++ b/scripts/Makefile.modpost | |||
@@ -72,7 +72,7 @@ $(modules:.ko=.mod.c): __modpost ; | |||
72 | # Step 5), compile all *.mod.c files | 72 | # Step 5), compile all *.mod.c files |
73 | 73 | ||
74 | # modname is set to make c_flags define KBUILD_MODNAME | 74 | # modname is set to make c_flags define KBUILD_MODNAME |
75 | modname = $(*F) | 75 | modname = $(notdir $(@:.mod.o=)) |
76 | 76 | ||
77 | quiet_cmd_cc_o_c = CC $@ | 77 | quiet_cmd_cc_o_c = CC $@ |
78 | cmd_cc_o_c = $(CC) $(c_flags) $(CFLAGS_MODULE) \ | 78 | cmd_cc_o_c = $(CC) $(c_flags) $(CFLAGS_MODULE) \ |
diff --git a/scripts/kconfig/lxdialog/checklist.c b/scripts/kconfig/lxdialog/checklist.c index be0200e9cdaf..79886413b6d5 100644 --- a/scripts/kconfig/lxdialog/checklist.c +++ b/scripts/kconfig/lxdialog/checklist.c | |||
@@ -187,9 +187,12 @@ int dialog_checklist(const char *title, const char *prompt, int height, | |||
187 | 187 | ||
188 | /* Print the list */ | 188 | /* Print the list */ |
189 | for (i = 0; i < max_choice; i++) { | 189 | for (i = 0; i < max_choice; i++) { |
190 | print_item(list, items[(scroll + i) * 3 + 1], | 190 | if (i != choice) |
191 | status[i + scroll], i, i == choice); | 191 | print_item(list, items[(scroll + i) * 3 + 1], |
192 | status[i + scroll], i, 0); | ||
192 | } | 193 | } |
194 | print_item(list, items[(scroll + choice) * 3 + 1], | ||
195 | status[choice + scroll], choice, 1); | ||
193 | 196 | ||
194 | print_arrows(dialog, choice, item_no, scroll, | 197 | print_arrows(dialog, choice, item_no, scroll, |
195 | box_y, box_x + check_x + 5, list_height); | 198 | box_y, box_x + check_x + 5, list_height); |
diff --git a/scripts/kernel-doc b/scripts/kernel-doc index 00e21297aefe..f9460a6218de 100755 --- a/scripts/kernel-doc +++ b/scripts/kernel-doc | |||
@@ -1056,7 +1056,8 @@ sub output_struct_man(%) { | |||
1056 | # pointer-to-function | 1056 | # pointer-to-function |
1057 | print ".BI \" ".$1."\" ".$parameter." \") (".$2.")"."\"\n;\n"; | 1057 | print ".BI \" ".$1."\" ".$parameter." \") (".$2.")"."\"\n;\n"; |
1058 | } elsif ($type =~ m/^(.*?)\s*(:.*)/) { | 1058 | } elsif ($type =~ m/^(.*?)\s*(:.*)/) { |
1059 | print ".BI \" ".$1."\" ".$parameter.$2." \""."\"\n;\n"; | 1059 | # bitfield |
1060 | print ".BI \" ".$1."\ \" ".$parameter.$2." \""."\"\n;\n"; | ||
1060 | } else { | 1061 | } else { |
1061 | $type =~ s/([^\*])$/$1 /; | 1062 | $type =~ s/([^\*])$/$1 /; |
1062 | print ".BI \" ".$type."\" ".$parameter." \""."\"\n;\n"; | 1063 | print ".BI \" ".$type."\" ".$parameter." \""."\"\n;\n"; |
@@ -1118,7 +1119,10 @@ sub output_function_text(%) { | |||
1118 | my %args = %{$_[0]}; | 1119 | my %args = %{$_[0]}; |
1119 | my ($parameter, $section); | 1120 | my ($parameter, $section); |
1120 | 1121 | ||
1121 | print "Function:\n\n"; | 1122 | print "Name:\n\n"; |
1123 | print $args{'function'}." - ".$args{'purpose'}."\n"; | ||
1124 | |||
1125 | print "\nSynopsis:\n\n"; | ||
1122 | my $start=$args{'functiontype'}." ".$args{'function'}." ("; | 1126 | my $start=$args{'functiontype'}." ".$args{'function'}." ("; |
1123 | print $start; | 1127 | print $start; |
1124 | my $count = 0; | 1128 | my $count = 0; |
@@ -1169,6 +1173,7 @@ sub output_enum_text(%) { | |||
1169 | my $count; | 1173 | my $count; |
1170 | print "Enum:\n\n"; | 1174 | print "Enum:\n\n"; |
1171 | 1175 | ||
1176 | print "enum ".$args{'enum'}." - ".$args{'purpose'}."\n\n"; | ||
1172 | print "enum ".$args{'enum'}." {\n"; | 1177 | print "enum ".$args{'enum'}." {\n"; |
1173 | $count = 0; | 1178 | $count = 0; |
1174 | foreach $parameter (@{$args{'parameterlist'}}) { | 1179 | foreach $parameter (@{$args{'parameterlist'}}) { |
@@ -1197,7 +1202,7 @@ sub output_typedef_text(%) { | |||
1197 | my $count; | 1202 | my $count; |
1198 | print "Typedef:\n\n"; | 1203 | print "Typedef:\n\n"; |
1199 | 1204 | ||
1200 | print "typedef ".$args{'typedef'}."\n"; | 1205 | print "typedef ".$args{'typedef'}." - ".$args{'purpose'}."\n"; |
1201 | output_section_text(@_); | 1206 | output_section_text(@_); |
1202 | } | 1207 | } |
1203 | 1208 | ||
@@ -1206,7 +1211,7 @@ sub output_struct_text(%) { | |||
1206 | my %args = %{$_[0]}; | 1211 | my %args = %{$_[0]}; |
1207 | my ($parameter); | 1212 | my ($parameter); |
1208 | 1213 | ||
1209 | print $args{'type'}." ".$args{'struct'}.":\n\n"; | 1214 | print $args{'type'}." ".$args{'struct'}." - ".$args{'purpose'}."\n\n"; |
1210 | print $args{'type'}." ".$args{'struct'}." {\n"; | 1215 | print $args{'type'}." ".$args{'struct'}." {\n"; |
1211 | foreach $parameter (@{$args{'parameterlist'}}) { | 1216 | foreach $parameter (@{$args{'parameterlist'}}) { |
1212 | if ($parameter =~ /^#/) { | 1217 | if ($parameter =~ /^#/) { |
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index 0dd16177642d..dfde0e87a765 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c | |||
@@ -24,7 +24,10 @@ static int all_versions = 0; | |||
24 | /* If we are modposting external module set to 1 */ | 24 | /* If we are modposting external module set to 1 */ |
25 | static int external_module = 0; | 25 | static int external_module = 0; |
26 | /* How a symbol is exported */ | 26 | /* How a symbol is exported */ |
27 | enum export {export_plain, export_gpl, export_gpl_future, export_unknown}; | 27 | enum export { |
28 | export_plain, export_unused, export_gpl, | ||
29 | export_unused_gpl, export_gpl_future, export_unknown | ||
30 | }; | ||
28 | 31 | ||
29 | void fatal(const char *fmt, ...) | 32 | void fatal(const char *fmt, ...) |
30 | { | 33 | { |
@@ -191,7 +194,9 @@ static struct { | |||
191 | enum export export; | 194 | enum export export; |
192 | } export_list[] = { | 195 | } export_list[] = { |
193 | { .str = "EXPORT_SYMBOL", .export = export_plain }, | 196 | { .str = "EXPORT_SYMBOL", .export = export_plain }, |
197 | { .str = "EXPORT_UNUSED_SYMBOL", .export = export_unused }, | ||
194 | { .str = "EXPORT_SYMBOL_GPL", .export = export_gpl }, | 198 | { .str = "EXPORT_SYMBOL_GPL", .export = export_gpl }, |
199 | { .str = "EXPORT_UNUSED_SYMBOL_GPL", .export = export_unused_gpl }, | ||
195 | { .str = "EXPORT_SYMBOL_GPL_FUTURE", .export = export_gpl_future }, | 200 | { .str = "EXPORT_SYMBOL_GPL_FUTURE", .export = export_gpl_future }, |
196 | { .str = "(unknown)", .export = export_unknown }, | 201 | { .str = "(unknown)", .export = export_unknown }, |
197 | }; | 202 | }; |
@@ -205,6 +210,8 @@ static const char *export_str(enum export ex) | |||
205 | static enum export export_no(const char * s) | 210 | static enum export export_no(const char * s) |
206 | { | 211 | { |
207 | int i; | 212 | int i; |
213 | if (!s) | ||
214 | return export_unknown; | ||
208 | for (i = 0; export_list[i].export != export_unknown; i++) { | 215 | for (i = 0; export_list[i].export != export_unknown; i++) { |
209 | if (strcmp(export_list[i].str, s) == 0) | 216 | if (strcmp(export_list[i].str, s) == 0) |
210 | return export_list[i].export; | 217 | return export_list[i].export; |
@@ -216,8 +223,12 @@ static enum export export_from_sec(struct elf_info *elf, Elf_Section sec) | |||
216 | { | 223 | { |
217 | if (sec == elf->export_sec) | 224 | if (sec == elf->export_sec) |
218 | return export_plain; | 225 | return export_plain; |
226 | else if (sec == elf->export_unused_sec) | ||
227 | return export_unused; | ||
219 | else if (sec == elf->export_gpl_sec) | 228 | else if (sec == elf->export_gpl_sec) |
220 | return export_gpl; | 229 | return export_gpl; |
230 | else if (sec == elf->export_unused_gpl_sec) | ||
231 | return export_unused_gpl; | ||
221 | else if (sec == elf->export_gpl_future_sec) | 232 | else if (sec == elf->export_gpl_future_sec) |
222 | return export_gpl_future; | 233 | return export_gpl_future; |
223 | else | 234 | else |
@@ -366,8 +377,12 @@ static void parse_elf(struct elf_info *info, const char *filename) | |||
366 | info->modinfo_len = sechdrs[i].sh_size; | 377 | info->modinfo_len = sechdrs[i].sh_size; |
367 | } else if (strcmp(secname, "__ksymtab") == 0) | 378 | } else if (strcmp(secname, "__ksymtab") == 0) |
368 | info->export_sec = i; | 379 | info->export_sec = i; |
380 | else if (strcmp(secname, "__ksymtab_unused") == 0) | ||
381 | info->export_unused_sec = i; | ||
369 | else if (strcmp(secname, "__ksymtab_gpl") == 0) | 382 | else if (strcmp(secname, "__ksymtab_gpl") == 0) |
370 | info->export_gpl_sec = i; | 383 | info->export_gpl_sec = i; |
384 | else if (strcmp(secname, "__ksymtab_unused_gpl") == 0) | ||
385 | info->export_unused_gpl_sec = i; | ||
371 | else if (strcmp(secname, "__ksymtab_gpl_future") == 0) | 386 | else if (strcmp(secname, "__ksymtab_gpl_future") == 0) |
372 | info->export_gpl_future_sec = i; | 387 | info->export_gpl_future_sec = i; |
373 | 388 | ||
@@ -1085,38 +1100,64 @@ void buf_write(struct buffer *buf, const char *s, int len) | |||
1085 | buf->pos += len; | 1100 | buf->pos += len; |
1086 | } | 1101 | } |
1087 | 1102 | ||
1088 | void check_license(struct module *mod) | 1103 | static void check_for_gpl_usage(enum export exp, const char *m, const char *s) |
1104 | { | ||
1105 | const char *e = is_vmlinux(m) ?"":".ko"; | ||
1106 | |||
1107 | switch (exp) { | ||
1108 | case export_gpl: | ||
1109 | fatal("modpost: GPL-incompatible module %s%s " | ||
1110 | "uses GPL-only symbol '%s'\n", m, e, s); | ||
1111 | break; | ||
1112 | case export_unused_gpl: | ||
1113 | fatal("modpost: GPL-incompatible module %s%s " | ||
1114 | "uses GPL-only symbol marked UNUSED '%s'\n", m, e, s); | ||
1115 | break; | ||
1116 | case export_gpl_future: | ||
1117 | warn("modpost: GPL-incompatible module %s%s " | ||
1118 | "uses future GPL-only symbol '%s'\n", m, e, s); | ||
1119 | break; | ||
1120 | case export_plain: | ||
1121 | case export_unused: | ||
1122 | case export_unknown: | ||
1123 | /* ignore */ | ||
1124 | break; | ||
1125 | } | ||
1126 | } | ||
1127 | |||
1128 | static void check_for_unused(enum export exp, const char* m, const char* s) | ||
1129 | { | ||
1130 | const char *e = is_vmlinux(m) ?"":".ko"; | ||
1131 | |||
1132 | switch (exp) { | ||
1133 | case export_unused: | ||
1134 | case export_unused_gpl: | ||
1135 | warn("modpost: module %s%s " | ||
1136 | "uses symbol '%s' marked UNUSED\n", m, e, s); | ||
1137 | break; | ||
1138 | default: | ||
1139 | /* ignore */ | ||
1140 | break; | ||
1141 | } | ||
1142 | } | ||
1143 | |||
1144 | static void check_exports(struct module *mod) | ||
1089 | { | 1145 | { |
1090 | struct symbol *s, *exp; | 1146 | struct symbol *s, *exp; |
1091 | 1147 | ||
1092 | for (s = mod->unres; s; s = s->next) { | 1148 | for (s = mod->unres; s; s = s->next) { |
1093 | const char *basename; | 1149 | const char *basename; |
1094 | if (mod->gpl_compatible == 1) { | ||
1095 | /* GPL-compatible modules may use all symbols */ | ||
1096 | continue; | ||
1097 | } | ||
1098 | exp = find_symbol(s->name); | 1150 | exp = find_symbol(s->name); |
1099 | if (!exp || exp->module == mod) | 1151 | if (!exp || exp->module == mod) |
1100 | continue; | 1152 | continue; |
1101 | basename = strrchr(mod->name, '/'); | 1153 | basename = strrchr(mod->name, '/'); |
1102 | if (basename) | 1154 | if (basename) |
1103 | basename++; | 1155 | basename++; |
1104 | switch (exp->export) { | 1156 | else |
1105 | case export_gpl: | 1157 | basename = mod->name; |
1106 | fatal("modpost: GPL-incompatible module %s " | 1158 | if (!mod->gpl_compatible) |
1107 | "uses GPL-only symbol '%s'\n", | 1159 | check_for_gpl_usage(exp->export, basename, exp->name); |
1108 | basename ? basename : mod->name, | 1160 | check_for_unused(exp->export, basename, exp->name); |
1109 | exp->name); | ||
1110 | break; | ||
1111 | case export_gpl_future: | ||
1112 | warn("modpost: GPL-incompatible module %s " | ||
1113 | "uses future GPL-only symbol '%s'\n", | ||
1114 | basename ? basename : mod->name, | ||
1115 | exp->name); | ||
1116 | break; | ||
1117 | case export_plain: /* ignore */ break; | ||
1118 | case export_unknown: /* ignore */ break; | ||
1119 | } | ||
1120 | } | 1161 | } |
1121 | } | 1162 | } |
1122 | 1163 | ||
@@ -1271,7 +1312,7 @@ static void write_if_changed(struct buffer *b, const char *fname) | |||
1271 | } | 1312 | } |
1272 | 1313 | ||
1273 | /* parse Module.symvers file. line format: | 1314 | /* parse Module.symvers file. line format: |
1274 | * 0x12345678<tab>symbol<tab>module[<tab>export] | 1315 | * 0x12345678<tab>symbol<tab>module[[<tab>export]<tab>something] |
1275 | **/ | 1316 | **/ |
1276 | static void read_dump(const char *fname, unsigned int kernel) | 1317 | static void read_dump(const char *fname, unsigned int kernel) |
1277 | { | 1318 | { |
@@ -1284,7 +1325,7 @@ static void read_dump(const char *fname, unsigned int kernel) | |||
1284 | return; | 1325 | return; |
1285 | 1326 | ||
1286 | while ((line = get_next_line(&pos, file, size))) { | 1327 | while ((line = get_next_line(&pos, file, size))) { |
1287 | char *symname, *modname, *d, *export; | 1328 | char *symname, *modname, *d, *export, *end; |
1288 | unsigned int crc; | 1329 | unsigned int crc; |
1289 | struct module *mod; | 1330 | struct module *mod; |
1290 | struct symbol *s; | 1331 | struct symbol *s; |
@@ -1297,7 +1338,8 @@ static void read_dump(const char *fname, unsigned int kernel) | |||
1297 | *modname++ = '\0'; | 1338 | *modname++ = '\0'; |
1298 | if ((export = strchr(modname, '\t')) != NULL) | 1339 | if ((export = strchr(modname, '\t')) != NULL) |
1299 | *export++ = '\0'; | 1340 | *export++ = '\0'; |
1300 | 1341 | if (export && ((end = strchr(export, '\t')) != NULL)) | |
1342 | *end = '\0'; | ||
1301 | crc = strtoul(line, &d, 16); | 1343 | crc = strtoul(line, &d, 16); |
1302 | if (*symname == '\0' || *modname == '\0' || *d != '\0') | 1344 | if (*symname == '\0' || *modname == '\0' || *d != '\0') |
1303 | goto fail; | 1345 | goto fail; |
@@ -1396,7 +1438,7 @@ int main(int argc, char **argv) | |||
1396 | for (mod = modules; mod; mod = mod->next) { | 1438 | for (mod = modules; mod; mod = mod->next) { |
1397 | if (mod->skip) | 1439 | if (mod->skip) |
1398 | continue; | 1440 | continue; |
1399 | check_license(mod); | 1441 | check_exports(mod); |
1400 | } | 1442 | } |
1401 | 1443 | ||
1402 | for (mod = modules; mod; mod = mod->next) { | 1444 | for (mod = modules; mod; mod = mod->next) { |
diff --git a/scripts/mod/modpost.h b/scripts/mod/modpost.h index 2b00c6062844..d398c61e55ef 100644 --- a/scripts/mod/modpost.h +++ b/scripts/mod/modpost.h | |||
@@ -117,7 +117,9 @@ struct elf_info { | |||
117 | Elf_Sym *symtab_start; | 117 | Elf_Sym *symtab_start; |
118 | Elf_Sym *symtab_stop; | 118 | Elf_Sym *symtab_stop; |
119 | Elf_Section export_sec; | 119 | Elf_Section export_sec; |
120 | Elf_Section export_unused_sec; | ||
120 | Elf_Section export_gpl_sec; | 121 | Elf_Section export_gpl_sec; |
122 | Elf_Section export_unused_gpl_sec; | ||
121 | Elf_Section export_gpl_future_sec; | 123 | Elf_Section export_gpl_future_sec; |
122 | const char *strtab; | 124 | const char *strtab; |
123 | char *modinfo; | 125 | char *modinfo; |
diff --git a/security/selinux/ss/services.c b/security/selinux/ss/services.c index e9548bc049e1..d2e80e62ff0c 100644 --- a/security/selinux/ss/services.c +++ b/security/selinux/ss/services.c | |||
@@ -1845,15 +1845,20 @@ int selinux_audit_rule_init(u32 field, u32 op, char *rulestr, | |||
1845 | return -ENOTSUPP; | 1845 | return -ENOTSUPP; |
1846 | 1846 | ||
1847 | switch (field) { | 1847 | switch (field) { |
1848 | case AUDIT_SE_USER: | 1848 | case AUDIT_SUBJ_USER: |
1849 | case AUDIT_SE_ROLE: | 1849 | case AUDIT_SUBJ_ROLE: |
1850 | case AUDIT_SE_TYPE: | 1850 | case AUDIT_SUBJ_TYPE: |
1851 | case AUDIT_OBJ_USER: | ||
1852 | case AUDIT_OBJ_ROLE: | ||
1853 | case AUDIT_OBJ_TYPE: | ||
1851 | /* only 'equals' and 'not equals' fit user, role, and type */ | 1854 | /* only 'equals' and 'not equals' fit user, role, and type */ |
1852 | if (op != AUDIT_EQUAL && op != AUDIT_NOT_EQUAL) | 1855 | if (op != AUDIT_EQUAL && op != AUDIT_NOT_EQUAL) |
1853 | return -EINVAL; | 1856 | return -EINVAL; |
1854 | break; | 1857 | break; |
1855 | case AUDIT_SE_SEN: | 1858 | case AUDIT_SUBJ_SEN: |
1856 | case AUDIT_SE_CLR: | 1859 | case AUDIT_SUBJ_CLR: |
1860 | case AUDIT_OBJ_LEV_LOW: | ||
1861 | case AUDIT_OBJ_LEV_HIGH: | ||
1857 | /* we do not allow a range, indicated by the presense of '-' */ | 1862 | /* we do not allow a range, indicated by the presense of '-' */ |
1858 | if (strchr(rulestr, '-')) | 1863 | if (strchr(rulestr, '-')) |
1859 | return -EINVAL; | 1864 | return -EINVAL; |
@@ -1874,29 +1879,34 @@ int selinux_audit_rule_init(u32 field, u32 op, char *rulestr, | |||
1874 | tmprule->au_seqno = latest_granting; | 1879 | tmprule->au_seqno = latest_granting; |
1875 | 1880 | ||
1876 | switch (field) { | 1881 | switch (field) { |
1877 | case AUDIT_SE_USER: | 1882 | case AUDIT_SUBJ_USER: |
1883 | case AUDIT_OBJ_USER: | ||
1878 | userdatum = hashtab_search(policydb.p_users.table, rulestr); | 1884 | userdatum = hashtab_search(policydb.p_users.table, rulestr); |
1879 | if (!userdatum) | 1885 | if (!userdatum) |
1880 | rc = -EINVAL; | 1886 | rc = -EINVAL; |
1881 | else | 1887 | else |
1882 | tmprule->au_ctxt.user = userdatum->value; | 1888 | tmprule->au_ctxt.user = userdatum->value; |
1883 | break; | 1889 | break; |
1884 | case AUDIT_SE_ROLE: | 1890 | case AUDIT_SUBJ_ROLE: |
1891 | case AUDIT_OBJ_ROLE: | ||
1885 | roledatum = hashtab_search(policydb.p_roles.table, rulestr); | 1892 | roledatum = hashtab_search(policydb.p_roles.table, rulestr); |
1886 | if (!roledatum) | 1893 | if (!roledatum) |
1887 | rc = -EINVAL; | 1894 | rc = -EINVAL; |
1888 | else | 1895 | else |
1889 | tmprule->au_ctxt.role = roledatum->value; | 1896 | tmprule->au_ctxt.role = roledatum->value; |
1890 | break; | 1897 | break; |
1891 | case AUDIT_SE_TYPE: | 1898 | case AUDIT_SUBJ_TYPE: |
1899 | case AUDIT_OBJ_TYPE: | ||
1892 | typedatum = hashtab_search(policydb.p_types.table, rulestr); | 1900 | typedatum = hashtab_search(policydb.p_types.table, rulestr); |
1893 | if (!typedatum) | 1901 | if (!typedatum) |
1894 | rc = -EINVAL; | 1902 | rc = -EINVAL; |
1895 | else | 1903 | else |
1896 | tmprule->au_ctxt.type = typedatum->value; | 1904 | tmprule->au_ctxt.type = typedatum->value; |
1897 | break; | 1905 | break; |
1898 | case AUDIT_SE_SEN: | 1906 | case AUDIT_SUBJ_SEN: |
1899 | case AUDIT_SE_CLR: | 1907 | case AUDIT_SUBJ_CLR: |
1908 | case AUDIT_OBJ_LEV_LOW: | ||
1909 | case AUDIT_OBJ_LEV_HIGH: | ||
1900 | rc = mls_from_string(rulestr, &tmprule->au_ctxt, GFP_ATOMIC); | 1910 | rc = mls_from_string(rulestr, &tmprule->au_ctxt, GFP_ATOMIC); |
1901 | break; | 1911 | break; |
1902 | } | 1912 | } |
@@ -1948,7 +1958,8 @@ int selinux_audit_rule_match(u32 ctxid, u32 field, u32 op, | |||
1948 | /* a field/op pair that is not caught here will simply fall through | 1958 | /* a field/op pair that is not caught here will simply fall through |
1949 | without a match */ | 1959 | without a match */ |
1950 | switch (field) { | 1960 | switch (field) { |
1951 | case AUDIT_SE_USER: | 1961 | case AUDIT_SUBJ_USER: |
1962 | case AUDIT_OBJ_USER: | ||
1952 | switch (op) { | 1963 | switch (op) { |
1953 | case AUDIT_EQUAL: | 1964 | case AUDIT_EQUAL: |
1954 | match = (ctxt->user == rule->au_ctxt.user); | 1965 | match = (ctxt->user == rule->au_ctxt.user); |
@@ -1958,7 +1969,8 @@ int selinux_audit_rule_match(u32 ctxid, u32 field, u32 op, | |||
1958 | break; | 1969 | break; |
1959 | } | 1970 | } |
1960 | break; | 1971 | break; |
1961 | case AUDIT_SE_ROLE: | 1972 | case AUDIT_SUBJ_ROLE: |
1973 | case AUDIT_OBJ_ROLE: | ||
1962 | switch (op) { | 1974 | switch (op) { |
1963 | case AUDIT_EQUAL: | 1975 | case AUDIT_EQUAL: |
1964 | match = (ctxt->role == rule->au_ctxt.role); | 1976 | match = (ctxt->role == rule->au_ctxt.role); |
@@ -1968,7 +1980,8 @@ int selinux_audit_rule_match(u32 ctxid, u32 field, u32 op, | |||
1968 | break; | 1980 | break; |
1969 | } | 1981 | } |
1970 | break; | 1982 | break; |
1971 | case AUDIT_SE_TYPE: | 1983 | case AUDIT_SUBJ_TYPE: |
1984 | case AUDIT_OBJ_TYPE: | ||
1972 | switch (op) { | 1985 | switch (op) { |
1973 | case AUDIT_EQUAL: | 1986 | case AUDIT_EQUAL: |
1974 | match = (ctxt->type == rule->au_ctxt.type); | 1987 | match = (ctxt->type == rule->au_ctxt.type); |
@@ -1978,9 +1991,12 @@ int selinux_audit_rule_match(u32 ctxid, u32 field, u32 op, | |||
1978 | break; | 1991 | break; |
1979 | } | 1992 | } |
1980 | break; | 1993 | break; |
1981 | case AUDIT_SE_SEN: | 1994 | case AUDIT_SUBJ_SEN: |
1982 | case AUDIT_SE_CLR: | 1995 | case AUDIT_SUBJ_CLR: |
1983 | level = (field == AUDIT_SE_SEN ? | 1996 | case AUDIT_OBJ_LEV_LOW: |
1997 | case AUDIT_OBJ_LEV_HIGH: | ||
1998 | level = ((field == AUDIT_SUBJ_SEN || | ||
1999 | field == AUDIT_OBJ_LEV_LOW) ? | ||
1984 | &ctxt->range.level[0] : &ctxt->range.level[1]); | 2000 | &ctxt->range.level[0] : &ctxt->range.level[1]); |
1985 | switch (op) { | 2001 | switch (op) { |
1986 | case AUDIT_EQUAL: | 2002 | case AUDIT_EQUAL: |
diff --git a/sound/arm/aaci.c b/sound/arm/aaci.c index 6b18225672c7..8435fdd1c87c 100644 --- a/sound/arm/aaci.c +++ b/sound/arm/aaci.c | |||
@@ -360,7 +360,7 @@ static int aaci_pcm_open(struct aaci *aaci, struct snd_pcm_substream *substream, | |||
360 | if (ret) | 360 | if (ret) |
361 | goto out; | 361 | goto out; |
362 | 362 | ||
363 | ret = request_irq(aaci->dev->irq[0], aaci_irq, SA_SHIRQ|SA_INTERRUPT, | 363 | ret = request_irq(aaci->dev->irq[0], aaci_irq, IRQF_SHARED|IRQF_DISABLED, |
364 | DRIVER_NAME, aaci); | 364 | DRIVER_NAME, aaci); |
365 | if (ret) | 365 | if (ret) |
366 | goto out; | 366 | goto out; |
diff --git a/sound/drivers/mpu401/mpu401.c b/sound/drivers/mpu401/mpu401.c index 8b80024968be..17cc105b26fc 100644 --- a/sound/drivers/mpu401/mpu401.c +++ b/sound/drivers/mpu401/mpu401.c | |||
@@ -83,7 +83,7 @@ static int snd_mpu401_create(int dev, struct snd_card **rcard) | |||
83 | if ((err = snd_mpu401_uart_new(card, 0, | 83 | if ((err = snd_mpu401_uart_new(card, 0, |
84 | MPU401_HW_MPU401, | 84 | MPU401_HW_MPU401, |
85 | port[dev], 0, | 85 | port[dev], 0, |
86 | irq[dev], irq[dev] >= 0 ? SA_INTERRUPT : 0, NULL)) < 0) { | 86 | irq[dev], irq[dev] >= 0 ? IRQF_DISABLED : 0, NULL)) < 0) { |
87 | printk(KERN_ERR "MPU401 not detected at 0x%lx\n", port[dev]); | 87 | printk(KERN_ERR "MPU401 not detected at 0x%lx\n", port[dev]); |
88 | goto _err; | 88 | goto _err; |
89 | } | 89 | } |
diff --git a/sound/drivers/mtpav.c b/sound/drivers/mtpav.c index 474eed06e70f..e064d6c5685b 100644 --- a/sound/drivers/mtpav.c +++ b/sound/drivers/mtpav.c | |||
@@ -590,7 +590,7 @@ static int __init snd_mtpav_get_ISA(struct mtpav * mcard) | |||
590 | return -EBUSY; | 590 | return -EBUSY; |
591 | } | 591 | } |
592 | mcard->port = port; | 592 | mcard->port = port; |
593 | if (request_irq(irq, snd_mtpav_irqh, SA_INTERRUPT, "MOTU MTPAV", mcard)) { | 593 | if (request_irq(irq, snd_mtpav_irqh, IRQF_DISABLED, "MOTU MTPAV", mcard)) { |
594 | snd_printk("MTVAP IRQ %d busy\n", irq); | 594 | snd_printk("MTVAP IRQ %d busy\n", irq); |
595 | return -EBUSY; | 595 | return -EBUSY; |
596 | } | 596 | } |
diff --git a/sound/drivers/serial-u16550.c b/sound/drivers/serial-u16550.c index 2330fec505da..52afb4bd2079 100644 --- a/sound/drivers/serial-u16550.c +++ b/sound/drivers/serial-u16550.c | |||
@@ -795,7 +795,7 @@ static int __init snd_uart16550_create(struct snd_card *card, | |||
795 | 795 | ||
796 | if (irq >= 0 && irq != SNDRV_AUTO_IRQ) { | 796 | if (irq >= 0 && irq != SNDRV_AUTO_IRQ) { |
797 | if (request_irq(irq, snd_uart16550_interrupt, | 797 | if (request_irq(irq, snd_uart16550_interrupt, |
798 | SA_INTERRUPT, "Serial MIDI", (void *) uart)) { | 798 | IRQF_DISABLED, "Serial MIDI", (void *) uart)) { |
799 | snd_printk("irq %d busy. Using Polling.\n", irq); | 799 | snd_printk("irq %d busy. Using Polling.\n", irq); |
800 | } else { | 800 | } else { |
801 | uart->irq = irq; | 801 | uart->irq = irq; |
diff --git a/sound/isa/ad1816a/ad1816a.c b/sound/isa/ad1816a/ad1816a.c index 31f299aed281..b33a5fb59ec2 100644 --- a/sound/isa/ad1816a/ad1816a.c +++ b/sound/isa/ad1816a/ad1816a.c | |||
@@ -232,7 +232,7 @@ static int __devinit snd_card_ad1816a_probe(int dev, struct pnp_card_link *pcard | |||
232 | 232 | ||
233 | if (mpu_port[dev] > 0) { | 233 | if (mpu_port[dev] > 0) { |
234 | if (snd_mpu401_uart_new(card, 0, MPU401_HW_MPU401, | 234 | if (snd_mpu401_uart_new(card, 0, MPU401_HW_MPU401, |
235 | mpu_port[dev], 0, mpu_irq[dev], SA_INTERRUPT, | 235 | mpu_port[dev], 0, mpu_irq[dev], IRQF_DISABLED, |
236 | NULL) < 0) | 236 | NULL) < 0) |
237 | printk(KERN_ERR PFX "no MPU-401 device at 0x%lx.\n", mpu_port[dev]); | 237 | printk(KERN_ERR PFX "no MPU-401 device at 0x%lx.\n", mpu_port[dev]); |
238 | } | 238 | } |
diff --git a/sound/isa/ad1816a/ad1816a_lib.c b/sound/isa/ad1816a/ad1816a_lib.c index fd8fe16c09ee..8fcf2c151823 100644 --- a/sound/isa/ad1816a/ad1816a_lib.c +++ b/sound/isa/ad1816a/ad1816a_lib.c | |||
@@ -599,7 +599,7 @@ int __devinit snd_ad1816a_create(struct snd_card *card, | |||
599 | snd_ad1816a_free(chip); | 599 | snd_ad1816a_free(chip); |
600 | return -EBUSY; | 600 | return -EBUSY; |
601 | } | 601 | } |
602 | if (request_irq(irq, snd_ad1816a_interrupt, SA_INTERRUPT, "AD1816A", (void *) chip)) { | 602 | if (request_irq(irq, snd_ad1816a_interrupt, IRQF_DISABLED, "AD1816A", (void *) chip)) { |
603 | snd_printk(KERN_ERR "ad1816a: can't grab IRQ %d\n", irq); | 603 | snd_printk(KERN_ERR "ad1816a: can't grab IRQ %d\n", irq); |
604 | snd_ad1816a_free(chip); | 604 | snd_ad1816a_free(chip); |
605 | return -EBUSY; | 605 | return -EBUSY; |
diff --git a/sound/isa/ad1848/ad1848_lib.c b/sound/isa/ad1848/ad1848_lib.c index e0f8baa843b9..e711f87d5fd1 100644 --- a/sound/isa/ad1848/ad1848_lib.c +++ b/sound/isa/ad1848/ad1848_lib.c | |||
@@ -902,7 +902,7 @@ int snd_ad1848_create(struct snd_card *card, | |||
902 | snd_ad1848_free(chip); | 902 | snd_ad1848_free(chip); |
903 | return -EBUSY; | 903 | return -EBUSY; |
904 | } | 904 | } |
905 | if (request_irq(irq, snd_ad1848_interrupt, SA_INTERRUPT, "AD1848", (void *) chip)) { | 905 | if (request_irq(irq, snd_ad1848_interrupt, IRQF_DISABLED, "AD1848", (void *) chip)) { |
906 | snd_printk(KERN_ERR "ad1848: can't grab IRQ %d\n", irq); | 906 | snd_printk(KERN_ERR "ad1848: can't grab IRQ %d\n", irq); |
907 | snd_ad1848_free(chip); | 907 | snd_ad1848_free(chip); |
908 | return -EBUSY; | 908 | return -EBUSY; |
diff --git a/sound/isa/als100.c b/sound/isa/als100.c index a52bd8a14c9b..f2bcfb2cf5f5 100644 --- a/sound/isa/als100.c +++ b/sound/isa/als100.c | |||
@@ -250,7 +250,7 @@ static int __devinit snd_card_als100_probe(int dev, | |||
250 | if (mpu_port[dev] > 0 && mpu_port[dev] != SNDRV_AUTO_PORT) { | 250 | if (mpu_port[dev] > 0 && mpu_port[dev] != SNDRV_AUTO_PORT) { |
251 | if (snd_mpu401_uart_new(card, 0, MPU401_HW_ALS100, | 251 | if (snd_mpu401_uart_new(card, 0, MPU401_HW_ALS100, |
252 | mpu_port[dev], 0, | 252 | mpu_port[dev], 0, |
253 | mpu_irq[dev], SA_INTERRUPT, | 253 | mpu_irq[dev], IRQF_DISABLED, |
254 | NULL) < 0) | 254 | NULL) < 0) |
255 | snd_printk(KERN_ERR PFX "no MPU-401 device at 0x%lx\n", mpu_port[dev]); | 255 | snd_printk(KERN_ERR PFX "no MPU-401 device at 0x%lx\n", mpu_port[dev]); |
256 | } | 256 | } |
diff --git a/sound/isa/azt2320.c b/sound/isa/azt2320.c index 15e59283aac6..b615538a928d 100644 --- a/sound/isa/azt2320.c +++ b/sound/isa/azt2320.c | |||
@@ -279,7 +279,7 @@ static int __devinit snd_card_azt2320_probe(int dev, | |||
279 | if (mpu_port[dev] > 0 && mpu_port[dev] != SNDRV_AUTO_PORT) { | 279 | if (mpu_port[dev] > 0 && mpu_port[dev] != SNDRV_AUTO_PORT) { |
280 | if (snd_mpu401_uart_new(card, 0, MPU401_HW_AZT2320, | 280 | if (snd_mpu401_uart_new(card, 0, MPU401_HW_AZT2320, |
281 | mpu_port[dev], 0, | 281 | mpu_port[dev], 0, |
282 | mpu_irq[dev], SA_INTERRUPT, | 282 | mpu_irq[dev], IRQF_DISABLED, |
283 | NULL) < 0) | 283 | NULL) < 0) |
284 | snd_printk(KERN_ERR PFX "no MPU-401 device at 0x%lx\n", mpu_port[dev]); | 284 | snd_printk(KERN_ERR PFX "no MPU-401 device at 0x%lx\n", mpu_port[dev]); |
285 | } | 285 | } |
diff --git a/sound/isa/cs423x/cs4231.c b/sound/isa/cs423x/cs4231.c index 397310f358b7..696a5c86bcfa 100644 --- a/sound/isa/cs423x/cs4231.c +++ b/sound/isa/cs423x/cs4231.c | |||
@@ -122,7 +122,7 @@ static int __init snd_cs4231_probe(struct platform_device *pdev) | |||
122 | if (snd_mpu401_uart_new(card, 0, MPU401_HW_CS4232, | 122 | if (snd_mpu401_uart_new(card, 0, MPU401_HW_CS4232, |
123 | mpu_port[dev], 0, | 123 | mpu_port[dev], 0, |
124 | mpu_irq[dev], | 124 | mpu_irq[dev], |
125 | mpu_irq[dev] >= 0 ? SA_INTERRUPT : 0, | 125 | mpu_irq[dev] >= 0 ? IRQF_DISABLED : 0, |
126 | NULL) < 0) | 126 | NULL) < 0) |
127 | printk(KERN_WARNING "cs4231: MPU401 not detected\n"); | 127 | printk(KERN_WARNING "cs4231: MPU401 not detected\n"); |
128 | } | 128 | } |
diff --git a/sound/isa/cs423x/cs4231_lib.c b/sound/isa/cs423x/cs4231_lib.c index 823db8246701..fbb20176cca4 100644 --- a/sound/isa/cs423x/cs4231_lib.c +++ b/sound/isa/cs423x/cs4231_lib.c | |||
@@ -1454,7 +1454,7 @@ int snd_cs4231_create(struct snd_card *card, | |||
1454 | return -ENODEV; | 1454 | return -ENODEV; |
1455 | } | 1455 | } |
1456 | chip->cport = cport; | 1456 | chip->cport = cport; |
1457 | if (!(hwshare & CS4231_HWSHARE_IRQ) && request_irq(irq, snd_cs4231_interrupt, SA_INTERRUPT, "CS4231", (void *) chip)) { | 1457 | if (!(hwshare & CS4231_HWSHARE_IRQ) && request_irq(irq, snd_cs4231_interrupt, IRQF_DISABLED, "CS4231", (void *) chip)) { |
1458 | snd_printk(KERN_ERR "cs4231: can't grab IRQ %d\n", irq); | 1458 | snd_printk(KERN_ERR "cs4231: can't grab IRQ %d\n", irq); |
1459 | snd_cs4231_free(chip); | 1459 | snd_cs4231_free(chip); |
1460 | return -EBUSY; | 1460 | return -EBUSY; |
diff --git a/sound/isa/cs423x/cs4236.c b/sound/isa/cs423x/cs4236.c index f7fa779347ff..07ffd5c22e81 100644 --- a/sound/isa/cs423x/cs4236.c +++ b/sound/isa/cs423x/cs4236.c | |||
@@ -535,7 +535,7 @@ static int __devinit snd_cs423x_probe(struct snd_card *card, int dev) | |||
535 | if (snd_mpu401_uart_new(card, 0, MPU401_HW_CS4232, | 535 | if (snd_mpu401_uart_new(card, 0, MPU401_HW_CS4232, |
536 | mpu_port[dev], 0, | 536 | mpu_port[dev], 0, |
537 | mpu_irq[dev], | 537 | mpu_irq[dev], |
538 | mpu_irq[dev] >= 0 ? SA_INTERRUPT : 0, NULL) < 0) | 538 | mpu_irq[dev] >= 0 ? IRQF_DISABLED : 0, NULL) < 0) |
539 | printk(KERN_WARNING IDENT ": MPU401 not detected\n"); | 539 | printk(KERN_WARNING IDENT ": MPU401 not detected\n"); |
540 | } | 540 | } |
541 | 541 | ||
diff --git a/sound/isa/dt019x.c b/sound/isa/dt019x.c index 0acb4e5da47f..c20a4b1b1536 100644 --- a/sound/isa/dt019x.c +++ b/sound/isa/dt019x.c | |||
@@ -240,7 +240,7 @@ static int __devinit snd_card_dt019x_probe(int dev, struct pnp_card_link *pcard, | |||
240 | MPU401_HW_MPU401, | 240 | MPU401_HW_MPU401, |
241 | mpu_port[dev], 0, | 241 | mpu_port[dev], 0, |
242 | mpu_irq[dev], | 242 | mpu_irq[dev], |
243 | mpu_irq[dev] >= 0 ? SA_INTERRUPT : 0, | 243 | mpu_irq[dev] >= 0 ? IRQF_DISABLED : 0, |
244 | NULL) < 0) | 244 | NULL) < 0) |
245 | snd_printk(KERN_ERR PFX "no MPU-401 device at 0x%lx ?\n", mpu_port[dev]); | 245 | snd_printk(KERN_ERR PFX "no MPU-401 device at 0x%lx ?\n", mpu_port[dev]); |
246 | } | 246 | } |
diff --git a/sound/isa/es1688/es1688.c b/sound/isa/es1688/es1688.c index e90689ee162f..7f29f56e405b 100644 --- a/sound/isa/es1688/es1688.c +++ b/sound/isa/es1688/es1688.c | |||
@@ -153,7 +153,7 @@ static int __init snd_es1688_probe(struct platform_device *pdev) | |||
153 | if ((err = snd_mpu401_uart_new(card, 0, MPU401_HW_ES1688, | 153 | if ((err = snd_mpu401_uart_new(card, 0, MPU401_HW_ES1688, |
154 | chip->mpu_port, 0, | 154 | chip->mpu_port, 0, |
155 | xmpu_irq, | 155 | xmpu_irq, |
156 | SA_INTERRUPT, | 156 | IRQF_DISABLED, |
157 | NULL)) < 0) | 157 | NULL)) < 0) |
158 | goto _err; | 158 | goto _err; |
159 | } | 159 | } |
diff --git a/sound/isa/es1688/es1688_lib.c b/sound/isa/es1688/es1688_lib.c index 702ad51ee9d5..7e985d3bc510 100644 --- a/sound/isa/es1688/es1688_lib.c +++ b/sound/isa/es1688/es1688_lib.c | |||
@@ -659,7 +659,7 @@ int snd_es1688_create(struct snd_card *card, | |||
659 | snd_es1688_free(chip); | 659 | snd_es1688_free(chip); |
660 | return -EBUSY; | 660 | return -EBUSY; |
661 | } | 661 | } |
662 | if (request_irq(irq, snd_es1688_interrupt, SA_INTERRUPT, "ES1688", (void *) chip)) { | 662 | if (request_irq(irq, snd_es1688_interrupt, IRQF_DISABLED, "ES1688", (void *) chip)) { |
663 | snd_printk(KERN_ERR "es1688: can't grab IRQ %d\n", irq); | 663 | snd_printk(KERN_ERR "es1688: can't grab IRQ %d\n", irq); |
664 | snd_es1688_free(chip); | 664 | snd_es1688_free(chip); |
665 | return -EBUSY; | 665 | return -EBUSY; |
diff --git a/sound/isa/es18xx.c b/sound/isa/es18xx.c index af60b0bc8115..34998de9968c 100644 --- a/sound/isa/es18xx.c +++ b/sound/isa/es18xx.c | |||
@@ -1837,7 +1837,7 @@ static int __devinit snd_es18xx_new_device(struct snd_card *card, | |||
1837 | return -EBUSY; | 1837 | return -EBUSY; |
1838 | } | 1838 | } |
1839 | 1839 | ||
1840 | if (request_irq(irq, snd_es18xx_interrupt, SA_INTERRUPT, "ES18xx", (void *) chip)) { | 1840 | if (request_irq(irq, snd_es18xx_interrupt, IRQF_DISABLED, "ES18xx", (void *) chip)) { |
1841 | snd_es18xx_free(chip); | 1841 | snd_es18xx_free(chip); |
1842 | snd_printk(KERN_ERR PFX "unable to grap IRQ %d\n", irq); | 1842 | snd_printk(KERN_ERR PFX "unable to grap IRQ %d\n", irq); |
1843 | return -EBUSY; | 1843 | return -EBUSY; |
diff --git a/sound/isa/gus/gus_main.c b/sound/isa/gus/gus_main.c index 53eeaf37007d..b680fddf0d74 100644 --- a/sound/isa/gus/gus_main.c +++ b/sound/isa/gus/gus_main.c | |||
@@ -179,7 +179,7 @@ int snd_gus_create(struct snd_card *card, | |||
179 | snd_gus_free(gus); | 179 | snd_gus_free(gus); |
180 | return -EBUSY; | 180 | return -EBUSY; |
181 | } | 181 | } |
182 | if (irq >= 0 && request_irq(irq, snd_gus_interrupt, SA_INTERRUPT, "GUS GF1", (void *) gus)) { | 182 | if (irq >= 0 && request_irq(irq, snd_gus_interrupt, IRQF_DISABLED, "GUS GF1", (void *) gus)) { |
183 | snd_printk(KERN_ERR "gus: can't grab irq %d\n", irq); | 183 | snd_printk(KERN_ERR "gus: can't grab irq %d\n", irq); |
184 | snd_gus_free(gus); | 184 | snd_gus_free(gus); |
185 | return -EBUSY; | 185 | return -EBUSY; |
diff --git a/sound/isa/gus/gusextreme.c b/sound/isa/gus/gusextreme.c index 05852fcc613b..22cdddbfd824 100644 --- a/sound/isa/gus/gusextreme.c +++ b/sound/isa/gus/gusextreme.c | |||
@@ -301,7 +301,7 @@ static int __init snd_gusextreme_probe(struct platform_device *pdev) | |||
301 | (err = snd_mpu401_uart_new(card, 0, MPU401_HW_ES1688, | 301 | (err = snd_mpu401_uart_new(card, 0, MPU401_HW_ES1688, |
302 | es1688->mpu_port, 0, | 302 | es1688->mpu_port, 0, |
303 | xmpu_irq, | 303 | xmpu_irq, |
304 | SA_INTERRUPT, | 304 | IRQF_DISABLED, |
305 | NULL)) < 0) | 305 | NULL)) < 0) |
306 | goto out; | 306 | goto out; |
307 | 307 | ||
diff --git a/sound/isa/gus/gusmax.c b/sound/isa/gus/gusmax.c index fcf2c8fe6f94..ac11cae8589a 100644 --- a/sound/isa/gus/gusmax.c +++ b/sound/isa/gus/gusmax.c | |||
@@ -292,7 +292,7 @@ static int __init snd_gusmax_probe(struct platform_device *pdev) | |||
292 | goto _err; | 292 | goto _err; |
293 | } | 293 | } |
294 | 294 | ||
295 | if (request_irq(xirq, snd_gusmax_interrupt, SA_INTERRUPT, "GUS MAX", (void *)maxcard)) { | 295 | if (request_irq(xirq, snd_gusmax_interrupt, IRQF_DISABLED, "GUS MAX", (void *)maxcard)) { |
296 | snd_printk(KERN_ERR PFX "unable to grab IRQ %d\n", xirq); | 296 | snd_printk(KERN_ERR PFX "unable to grab IRQ %d\n", xirq); |
297 | err = -EBUSY; | 297 | err = -EBUSY; |
298 | goto _err; | 298 | goto _err; |
diff --git a/sound/isa/gus/interwave.c b/sound/isa/gus/interwave.c index c1c86e0fa56d..ea69f25506fb 100644 --- a/sound/isa/gus/interwave.c +++ b/sound/isa/gus/interwave.c | |||
@@ -706,7 +706,7 @@ static int __devinit snd_interwave_probe(struct snd_card *card, int dev) | |||
706 | if ((err = snd_gus_initialize(gus)) < 0) | 706 | if ((err = snd_gus_initialize(gus)) < 0) |
707 | return err; | 707 | return err; |
708 | 708 | ||
709 | if (request_irq(xirq, snd_interwave_interrupt, SA_INTERRUPT, | 709 | if (request_irq(xirq, snd_interwave_interrupt, IRQF_DISABLED, |
710 | "InterWave", iwcard)) { | 710 | "InterWave", iwcard)) { |
711 | snd_printk(KERN_ERR PFX "unable to grab IRQ %d\n", xirq); | 711 | snd_printk(KERN_ERR PFX "unable to grab IRQ %d\n", xirq); |
712 | return -EBUSY; | 712 | return -EBUSY; |
diff --git a/sound/isa/opl3sa2.c b/sound/isa/opl3sa2.c index 647a996791e9..4031b61b797f 100644 --- a/sound/isa/opl3sa2.c +++ b/sound/isa/opl3sa2.c | |||
@@ -683,7 +683,7 @@ static int __devinit snd_opl3sa2_probe(struct snd_card *card, int dev) | |||
683 | chip->single_dma = 1; | 683 | chip->single_dma = 1; |
684 | if ((err = snd_opl3sa2_detect(chip)) < 0) | 684 | if ((err = snd_opl3sa2_detect(chip)) < 0) |
685 | return err; | 685 | return err; |
686 | if (request_irq(xirq, snd_opl3sa2_interrupt, SA_INTERRUPT, "OPL3-SA2", chip)) { | 686 | if (request_irq(xirq, snd_opl3sa2_interrupt, IRQF_DISABLED, "OPL3-SA2", chip)) { |
687 | snd_printk(KERN_ERR PFX "can't grab IRQ %d\n", xirq); | 687 | snd_printk(KERN_ERR PFX "can't grab IRQ %d\n", xirq); |
688 | return -ENODEV; | 688 | return -ENODEV; |
689 | } | 689 | } |
diff --git a/sound/isa/opti9xx/miro.c b/sound/isa/opti9xx/miro.c index 283817f2de75..1dd98375ac85 100644 --- a/sound/isa/opti9xx/miro.c +++ b/sound/isa/opti9xx/miro.c | |||
@@ -1382,7 +1382,7 @@ static int __init snd_miro_probe(struct platform_device *devptr) | |||
1382 | rmidi = NULL; | 1382 | rmidi = NULL; |
1383 | else | 1383 | else |
1384 | if ((error = snd_mpu401_uart_new(card, 0, MPU401_HW_MPU401, | 1384 | if ((error = snd_mpu401_uart_new(card, 0, MPU401_HW_MPU401, |
1385 | miro->mpu_port, 0, miro->mpu_irq, SA_INTERRUPT, | 1385 | miro->mpu_port, 0, miro->mpu_irq, IRQF_DISABLED, |
1386 | &rmidi))) | 1386 | &rmidi))) |
1387 | snd_printk(KERN_WARNING "no MPU-401 device at 0x%lx?\n", miro->mpu_port); | 1387 | snd_printk(KERN_WARNING "no MPU-401 device at 0x%lx?\n", miro->mpu_port); |
1388 | 1388 | ||
diff --git a/sound/isa/opti9xx/opti92x-ad1848.c b/sound/isa/opti9xx/opti92x-ad1848.c index 8ee0d70536f9..9d528ae00bff 100644 --- a/sound/isa/opti9xx/opti92x-ad1848.c +++ b/sound/isa/opti9xx/opti92x-ad1848.c | |||
@@ -1291,7 +1291,7 @@ static int snd_opti93x_create(struct snd_card *card, struct snd_opti9xx *chip, | |||
1291 | } | 1291 | } |
1292 | codec->dma2 = chip->dma2; | 1292 | codec->dma2 = chip->dma2; |
1293 | 1293 | ||
1294 | if (request_irq(chip->irq, snd_opti93x_interrupt, SA_INTERRUPT, DRIVER_NAME" - WSS", codec)) { | 1294 | if (request_irq(chip->irq, snd_opti93x_interrupt, IRQF_DISABLED, DRIVER_NAME" - WSS", codec)) { |
1295 | snd_printk(KERN_ERR "opti9xx: can't grab IRQ %d\n", chip->irq); | 1295 | snd_printk(KERN_ERR "opti9xx: can't grab IRQ %d\n", chip->irq); |
1296 | snd_opti93x_free(codec); | 1296 | snd_opti93x_free(codec); |
1297 | return -EBUSY; | 1297 | return -EBUSY; |
@@ -1863,7 +1863,7 @@ static int __init snd_opti9xx_probe(struct snd_card *card) | |||
1863 | rmidi = NULL; | 1863 | rmidi = NULL; |
1864 | else | 1864 | else |
1865 | if ((error = snd_mpu401_uart_new(card, 0, MPU401_HW_MPU401, | 1865 | if ((error = snd_mpu401_uart_new(card, 0, MPU401_HW_MPU401, |
1866 | chip->mpu_port, 0, chip->mpu_irq, SA_INTERRUPT, | 1866 | chip->mpu_port, 0, chip->mpu_irq, IRQF_DISABLED, |
1867 | &rmidi))) | 1867 | &rmidi))) |
1868 | snd_printk(KERN_WARNING "no MPU-401 device at 0x%lx?\n", | 1868 | snd_printk(KERN_WARNING "no MPU-401 device at 0x%lx?\n", |
1869 | chip->mpu_port); | 1869 | chip->mpu_port); |
diff --git a/sound/isa/sb/sb_common.c b/sound/isa/sb/sb_common.c index f343a8211d2d..f17de2bdd9e0 100644 --- a/sound/isa/sb/sb_common.c +++ b/sound/isa/sb/sb_common.c | |||
@@ -232,7 +232,7 @@ int snd_sbdsp_create(struct snd_card *card, | |||
232 | chip->port = port; | 232 | chip->port = port; |
233 | 233 | ||
234 | if (request_irq(irq, irq_handler, hardware == SB_HW_ALS4000 ? | 234 | if (request_irq(irq, irq_handler, hardware == SB_HW_ALS4000 ? |
235 | SA_INTERRUPT | SA_SHIRQ : SA_INTERRUPT, | 235 | IRQF_DISABLED | IRQF_SHARED : IRQF_DISABLED, |
236 | "SoundBlaster", (void *) chip)) { | 236 | "SoundBlaster", (void *) chip)) { |
237 | snd_printk(KERN_ERR "sb: can't grab irq %d\n", irq); | 237 | snd_printk(KERN_ERR "sb: can't grab irq %d\n", irq); |
238 | snd_sbdsp_free(chip); | 238 | snd_sbdsp_free(chip); |
diff --git a/sound/isa/sgalaxy.c b/sound/isa/sgalaxy.c index 09c8e8c6b5e3..8742fa517491 100644 --- a/sound/isa/sgalaxy.c +++ b/sound/isa/sgalaxy.c | |||
@@ -147,7 +147,7 @@ static int __init snd_sgalaxy_setup_wss(unsigned long port, int irq, int dma) | |||
147 | if (tmp < 0) | 147 | if (tmp < 0) |
148 | return -EINVAL; | 148 | return -EINVAL; |
149 | 149 | ||
150 | if (request_irq(irq, snd_sgalaxy_dummy_interrupt, SA_INTERRUPT, "sgalaxy", NULL)) { | 150 | if (request_irq(irq, snd_sgalaxy_dummy_interrupt, IRQF_DISABLED, "sgalaxy", NULL)) { |
151 | snd_printk(KERN_ERR "sgalaxy: can't grab irq %d\n", irq); | 151 | snd_printk(KERN_ERR "sgalaxy: can't grab irq %d\n", irq); |
152 | return -EIO; | 152 | return -EIO; |
153 | } | 153 | } |
diff --git a/sound/isa/sscape.c b/sound/isa/sscape.c index 27271c9446dc..b1f25823c652 100644 --- a/sound/isa/sscape.c +++ b/sound/isa/sscape.c | |||
@@ -900,7 +900,7 @@ static int __devinit create_mpu401(struct snd_card *card, int devnum, unsigned l | |||
900 | if ((err = snd_mpu401_uart_new(card, devnum, | 900 | if ((err = snd_mpu401_uart_new(card, devnum, |
901 | MPU401_HW_MPU401, | 901 | MPU401_HW_MPU401, |
902 | port, MPU401_INFO_INTEGRATED, | 902 | port, MPU401_INFO_INTEGRATED, |
903 | irq, SA_INTERRUPT, | 903 | irq, IRQF_DISABLED, |
904 | &rawmidi)) == 0) { | 904 | &rawmidi)) == 0) { |
905 | struct snd_mpu401 *mpu = (struct snd_mpu401 *) rawmidi->private_data; | 905 | struct snd_mpu401 *mpu = (struct snd_mpu401 *) rawmidi->private_data; |
906 | mpu->open_input = mpu401_open; | 906 | mpu->open_input = mpu401_open; |
diff --git a/sound/isa/wavefront/wavefront.c b/sound/isa/wavefront/wavefront.c index 9eb27082c659..a8f8d2fa9d76 100644 --- a/sound/isa/wavefront/wavefront.c +++ b/sound/isa/wavefront/wavefront.c | |||
@@ -467,7 +467,7 @@ snd_wavefront_probe (struct snd_card *card, int dev) | |||
467 | return -EBUSY; | 467 | return -EBUSY; |
468 | } | 468 | } |
469 | if (request_irq(ics2115_irq[dev], snd_wavefront_ics2115_interrupt, | 469 | if (request_irq(ics2115_irq[dev], snd_wavefront_ics2115_interrupt, |
470 | SA_INTERRUPT, "ICS2115", acard)) { | 470 | IRQF_DISABLED, "ICS2115", acard)) { |
471 | snd_printk(KERN_ERR "unable to use ICS2115 IRQ %d\n", ics2115_irq[dev]); | 471 | snd_printk(KERN_ERR "unable to use ICS2115 IRQ %d\n", ics2115_irq[dev]); |
472 | return -EBUSY; | 472 | return -EBUSY; |
473 | } | 473 | } |
@@ -497,7 +497,7 @@ snd_wavefront_probe (struct snd_card *card, int dev) | |||
497 | if ((err = snd_mpu401_uart_new(card, midi_dev, MPU401_HW_CS4232, | 497 | if ((err = snd_mpu401_uart_new(card, midi_dev, MPU401_HW_CS4232, |
498 | cs4232_mpu_port[dev], 0, | 498 | cs4232_mpu_port[dev], 0, |
499 | cs4232_mpu_irq[dev], | 499 | cs4232_mpu_irq[dev], |
500 | SA_INTERRUPT, | 500 | IRQF_DISABLED, |
501 | NULL)) < 0) { | 501 | NULL)) < 0) { |
502 | snd_printk (KERN_ERR "can't allocate CS4232 MPU-401 device\n"); | 502 | snd_printk (KERN_ERR "can't allocate CS4232 MPU-401 device\n"); |
503 | return err; | 503 | return err; |
diff --git a/sound/mips/au1x00.c b/sound/mips/au1x00.c index cf476fe1ac56..c31b38659221 100644 --- a/sound/mips/au1x00.c +++ b/sound/mips/au1x00.c | |||
@@ -465,13 +465,13 @@ snd_au1000_pcm_new(struct snd_au1000 *au1000) | |||
465 | 465 | ||
466 | flags = claim_dma_lock(); | 466 | flags = claim_dma_lock(); |
467 | if ((au1000->stream[PLAYBACK]->dma = request_au1000_dma(DMA_ID_AC97C_TX, | 467 | if ((au1000->stream[PLAYBACK]->dma = request_au1000_dma(DMA_ID_AC97C_TX, |
468 | "AC97 TX", au1000_dma_interrupt, SA_INTERRUPT, | 468 | "AC97 TX", au1000_dma_interrupt, IRQF_DISABLED, |
469 | au1000->stream[PLAYBACK])) < 0) { | 469 | au1000->stream[PLAYBACK])) < 0) { |
470 | release_dma_lock(flags); | 470 | release_dma_lock(flags); |
471 | return -EBUSY; | 471 | return -EBUSY; |
472 | } | 472 | } |
473 | if ((au1000->stream[CAPTURE]->dma = request_au1000_dma(DMA_ID_AC97C_RX, | 473 | if ((au1000->stream[CAPTURE]->dma = request_au1000_dma(DMA_ID_AC97C_RX, |
474 | "AC97 RX", au1000_dma_interrupt, SA_INTERRUPT, | 474 | "AC97 RX", au1000_dma_interrupt, IRQF_DISABLED, |
475 | au1000->stream[CAPTURE])) < 0){ | 475 | au1000->stream[CAPTURE])) < 0){ |
476 | release_dma_lock(flags); | 476 | release_dma_lock(flags); |
477 | return -EBUSY; | 477 | return -EBUSY; |
diff --git a/sound/oss/ad1889.c b/sound/oss/ad1889.c index 0b09b8b4ec7d..f56f870b4840 100644 --- a/sound/oss/ad1889.c +++ b/sound/oss/ad1889.c | |||
@@ -1010,7 +1010,7 @@ static int __devinit ad1889_probe(struct pci_dev *pcidev, const struct pci_devic | |||
1010 | goto out2; | 1010 | goto out2; |
1011 | } | 1011 | } |
1012 | 1012 | ||
1013 | if (request_irq(pcidev->irq, ad1889_interrupt, SA_SHIRQ, DEVNAME, dev) != 0) { | 1013 | if (request_irq(pcidev->irq, ad1889_interrupt, IRQF_SHARED, DEVNAME, dev) != 0) { |
1014 | printk(KERN_ERR DEVNAME ": unable to request interrupt\n"); | 1014 | printk(KERN_ERR DEVNAME ": unable to request interrupt\n"); |
1015 | goto out3; | 1015 | goto out3; |
1016 | } | 1016 | } |
diff --git a/sound/oss/ali5455.c b/sound/oss/ali5455.c index 62bb936b1f3d..70dcd703a66f 100644 --- a/sound/oss/ali5455.c +++ b/sound/oss/ali5455.c | |||
@@ -3460,7 +3460,7 @@ static int __devinit ali_probe(struct pci_dev *pci_dev, | |||
3460 | card->channel[4].num = 4; | 3460 | card->channel[4].num = 4; |
3461 | /* claim our iospace and irq */ | 3461 | /* claim our iospace and irq */ |
3462 | request_region(card->iobase, 256, card_names[pci_id->driver_data]); | 3462 | request_region(card->iobase, 256, card_names[pci_id->driver_data]); |
3463 | if (request_irq(card->irq, &ali_interrupt, SA_SHIRQ, | 3463 | if (request_irq(card->irq, &ali_interrupt, IRQF_SHARED, |
3464 | card_names[pci_id->driver_data], card)) { | 3464 | card_names[pci_id->driver_data], card)) { |
3465 | printk(KERN_ERR "ali_audio: unable to allocate irq %d\n", | 3465 | printk(KERN_ERR "ali_audio: unable to allocate irq %d\n", |
3466 | card->irq); | 3466 | card->irq); |
diff --git a/sound/oss/au1000.c b/sound/oss/au1000.c index eacb0aef21e1..e3796231452a 100644 --- a/sound/oss/au1000.c +++ b/sound/oss/au1000.c | |||
@@ -2015,14 +2015,14 @@ static int __devinit au1000_probe(void) | |||
2015 | if ((s->dma_dac.dmanr = request_au1000_dma(DMA_ID_AC97C_TX, | 2015 | if ((s->dma_dac.dmanr = request_au1000_dma(DMA_ID_AC97C_TX, |
2016 | "audio DAC", | 2016 | "audio DAC", |
2017 | dac_dma_interrupt, | 2017 | dac_dma_interrupt, |
2018 | SA_INTERRUPT, s)) < 0) { | 2018 | IRQF_DISABLED, s)) < 0) { |
2019 | err("Can't get DAC DMA"); | 2019 | err("Can't get DAC DMA"); |
2020 | goto err_dma1; | 2020 | goto err_dma1; |
2021 | } | 2021 | } |
2022 | if ((s->dma_adc.dmanr = request_au1000_dma(DMA_ID_AC97C_RX, | 2022 | if ((s->dma_adc.dmanr = request_au1000_dma(DMA_ID_AC97C_RX, |
2023 | "audio ADC", | 2023 | "audio ADC", |
2024 | adc_dma_interrupt, | 2024 | adc_dma_interrupt, |
2025 | SA_INTERRUPT, s)) < 0) { | 2025 | IRQF_DISABLED, s)) < 0) { |
2026 | err("Can't get ADC DMA"); | 2026 | err("Can't get ADC DMA"); |
2027 | goto err_dma2; | 2027 | goto err_dma2; |
2028 | } | 2028 | } |
diff --git a/sound/oss/btaudio.c b/sound/oss/btaudio.c index bfe3b534ef30..324a81fd3a3b 100644 --- a/sound/oss/btaudio.c +++ b/sound/oss/btaudio.c | |||
@@ -966,7 +966,7 @@ static int __devinit btaudio_probe(struct pci_dev *pci_dev, | |||
966 | btwrite(~0U, REG_INT_STAT); | 966 | btwrite(~0U, REG_INT_STAT); |
967 | pci_set_master(pci_dev); | 967 | pci_set_master(pci_dev); |
968 | 968 | ||
969 | if ((rc = request_irq(bta->irq, btaudio_irq, SA_SHIRQ|SA_INTERRUPT, | 969 | if ((rc = request_irq(bta->irq, btaudio_irq, IRQF_SHARED|IRQF_DISABLED, |
970 | "btaudio",(void *)bta)) < 0) { | 970 | "btaudio",(void *)bta)) < 0) { |
971 | printk(KERN_WARNING | 971 | printk(KERN_WARNING |
972 | "btaudio: can't request irq (rc=%d)\n",rc); | 972 | "btaudio: can't request irq (rc=%d)\n",rc); |
diff --git a/sound/oss/cmpci.c b/sound/oss/cmpci.c index de60a059ff5f..ea51aafaf401 100644 --- a/sound/oss/cmpci.c +++ b/sound/oss/cmpci.c | |||
@@ -3122,7 +3122,7 @@ static int __devinit cm_probe(struct pci_dev *pcidev, const struct pci_device_id | |||
3122 | wrmixer(s, DSP_MIX_DATARESETIDX, 0); | 3122 | wrmixer(s, DSP_MIX_DATARESETIDX, 0); |
3123 | 3123 | ||
3124 | /* request irq */ | 3124 | /* request irq */ |
3125 | if ((ret = request_irq(s->irq, cm_interrupt, SA_SHIRQ, "cmpci", s))) { | 3125 | if ((ret = request_irq(s->irq, cm_interrupt, IRQF_SHARED, "cmpci", s))) { |
3126 | printk(KERN_ERR "cmpci: irq %u in use\n", s->irq); | 3126 | printk(KERN_ERR "cmpci: irq %u in use\n", s->irq); |
3127 | goto err_irq; | 3127 | goto err_irq; |
3128 | } | 3128 | } |
diff --git a/sound/oss/cs4281/cs4281m.c b/sound/oss/cs4281/cs4281m.c index 0004442f9b7e..0400a416dc93 100644 --- a/sound/oss/cs4281/cs4281m.c +++ b/sound/oss/cs4281/cs4281m.c | |||
@@ -4346,7 +4346,7 @@ static int __devinit cs4281_probe(struct pci_dev *pcidev, | |||
4346 | s->pcidev = pcidev; | 4346 | s->pcidev = pcidev; |
4347 | s->irq = pcidev->irq; | 4347 | s->irq = pcidev->irq; |
4348 | if (request_irq | 4348 | if (request_irq |
4349 | (s->irq, cs4281_interrupt, SA_SHIRQ, "Crystal CS4281", s)) { | 4349 | (s->irq, cs4281_interrupt, IRQF_SHARED, "Crystal CS4281", s)) { |
4350 | CS_DBGOUT(CS_INIT | CS_ERROR, 1, | 4350 | CS_DBGOUT(CS_INIT | CS_ERROR, 1, |
4351 | printk(KERN_ERR "cs4281: irq %u in use\n", s->irq)); | 4351 | printk(KERN_ERR "cs4281: irq %u in use\n", s->irq)); |
4352 | goto err_irq; | 4352 | goto err_irq; |
diff --git a/sound/oss/cs46xx.c b/sound/oss/cs46xx.c index 994c71e986e4..5195bf933cb8 100644 --- a/sound/oss/cs46xx.c +++ b/sound/oss/cs46xx.c | |||
@@ -5177,7 +5177,7 @@ static int __devinit cs46xx_probe(struct pci_dev *pci_dev, | |||
5177 | card->ba1.name.reg == 0) | 5177 | card->ba1.name.reg == 0) |
5178 | goto fail2; | 5178 | goto fail2; |
5179 | 5179 | ||
5180 | if (request_irq(card->irq, &cs_interrupt, SA_SHIRQ, "cs46xx", card)) { | 5180 | if (request_irq(card->irq, &cs_interrupt, IRQF_SHARED, "cs46xx", card)) { |
5181 | printk(KERN_ERR "cs46xx: unable to allocate irq %d\n", card->irq); | 5181 | printk(KERN_ERR "cs46xx: unable to allocate irq %d\n", card->irq); |
5182 | goto fail2; | 5182 | goto fail2; |
5183 | } | 5183 | } |
diff --git a/sound/oss/emu10k1/main.c b/sound/oss/emu10k1/main.c index 3721c5857b90..c4ce94d6e10c 100644 --- a/sound/oss/emu10k1/main.c +++ b/sound/oss/emu10k1/main.c | |||
@@ -1301,7 +1301,7 @@ static int __devinit emu10k1_probe(struct pci_dev *pci_dev, const struct pci_dev | |||
1301 | card->pci_dev = pci_dev; | 1301 | card->pci_dev = pci_dev; |
1302 | 1302 | ||
1303 | /* Reserve IRQ Line */ | 1303 | /* Reserve IRQ Line */ |
1304 | if (request_irq(card->irq, emu10k1_interrupt, SA_SHIRQ, card_names[pci_id->driver_data], card)) { | 1304 | if (request_irq(card->irq, emu10k1_interrupt, IRQF_SHARED, card_names[pci_id->driver_data], card)) { |
1305 | printk(KERN_ERR "emu10k1: IRQ in use\n"); | 1305 | printk(KERN_ERR "emu10k1: IRQ in use\n"); |
1306 | ret = -EBUSY; | 1306 | ret = -EBUSY; |
1307 | goto err_irq; | 1307 | goto err_irq; |
diff --git a/sound/oss/es1370.c b/sound/oss/es1370.c index 094f569cc6e0..13f483149737 100644 --- a/sound/oss/es1370.c +++ b/sound/oss/es1370.c | |||
@@ -2650,7 +2650,7 @@ static int __devinit es1370_probe(struct pci_dev *pcidev, const struct pci_devic | |||
2650 | ret = -EBUSY; | 2650 | ret = -EBUSY; |
2651 | goto err_region; | 2651 | goto err_region; |
2652 | } | 2652 | } |
2653 | if ((ret=request_irq(s->irq, es1370_interrupt, SA_SHIRQ, "es1370",s))) { | 2653 | if ((ret=request_irq(s->irq, es1370_interrupt, IRQF_SHARED, "es1370",s))) { |
2654 | printk(KERN_ERR "es1370: irq %u in use\n", s->irq); | 2654 | printk(KERN_ERR "es1370: irq %u in use\n", s->irq); |
2655 | goto err_irq; | 2655 | goto err_irq; |
2656 | } | 2656 | } |
diff --git a/sound/oss/es1371.c b/sound/oss/es1371.c index 4400c8538686..a2ffe723dad5 100644 --- a/sound/oss/es1371.c +++ b/sound/oss/es1371.c | |||
@@ -2905,7 +2905,7 @@ static int __devinit es1371_probe(struct pci_dev *pcidev, const struct pci_devic | |||
2905 | res = -EBUSY; | 2905 | res = -EBUSY; |
2906 | goto err_region; | 2906 | goto err_region; |
2907 | } | 2907 | } |
2908 | if ((res=request_irq(s->irq, es1371_interrupt, SA_SHIRQ, "es1371",s))) { | 2908 | if ((res=request_irq(s->irq, es1371_interrupt, IRQF_SHARED, "es1371",s))) { |
2909 | printk(KERN_ERR PFX "irq %u in use\n", s->irq); | 2909 | printk(KERN_ERR PFX "irq %u in use\n", s->irq); |
2910 | goto err_irq; | 2910 | goto err_irq; |
2911 | } | 2911 | } |
diff --git a/sound/oss/esssolo1.c b/sound/oss/esssolo1.c index 6861563d7525..82f40a0a5c9c 100644 --- a/sound/oss/esssolo1.c +++ b/sound/oss/esssolo1.c | |||
@@ -2392,7 +2392,7 @@ static int __devinit solo1_probe(struct pci_dev *pcidev, const struct pci_device | |||
2392 | printk(KERN_ERR "solo1: io ports in use\n"); | 2392 | printk(KERN_ERR "solo1: io ports in use\n"); |
2393 | goto err_region4; | 2393 | goto err_region4; |
2394 | } | 2394 | } |
2395 | if ((ret=request_irq(s->irq,solo1_interrupt,SA_SHIRQ,"ESS Solo1",s))) { | 2395 | if ((ret=request_irq(s->irq,solo1_interrupt,IRQF_SHARED,"ESS Solo1",s))) { |
2396 | printk(KERN_ERR "solo1: irq %u in use\n", s->irq); | 2396 | printk(KERN_ERR "solo1: irq %u in use\n", s->irq); |
2397 | goto err_irq; | 2397 | goto err_irq; |
2398 | } | 2398 | } |
diff --git a/sound/oss/forte.c b/sound/oss/forte.c index 44e578098d76..ea1c0207aef2 100644 --- a/sound/oss/forte.c +++ b/sound/oss/forte.c | |||
@@ -2026,7 +2026,7 @@ forte_probe (struct pci_dev *pci_dev, const struct pci_device_id *pci_id) | |||
2026 | chip->iobase = pci_resource_start (pci_dev, 0); | 2026 | chip->iobase = pci_resource_start (pci_dev, 0); |
2027 | chip->irq = pci_dev->irq; | 2027 | chip->irq = pci_dev->irq; |
2028 | 2028 | ||
2029 | if (request_irq (chip->irq, forte_interrupt, SA_SHIRQ, DRIVER_NAME, | 2029 | if (request_irq (chip->irq, forte_interrupt, IRQF_SHARED, DRIVER_NAME, |
2030 | chip)) { | 2030 | chip)) { |
2031 | printk (KERN_WARNING PFX "Unable to reserve IRQ"); | 2031 | printk (KERN_WARNING PFX "Unable to reserve IRQ"); |
2032 | ret = -EIO; | 2032 | ret = -EIO; |
diff --git a/sound/oss/hal2.c b/sound/oss/hal2.c index dd4f59d30a3a..80ab402dae9a 100644 --- a/sound/oss/hal2.c +++ b/sound/oss/hal2.c | |||
@@ -1479,7 +1479,7 @@ static int hal2_init_card(struct hal2_card **phal2, struct hpc3_regs *hpc3) | |||
1479 | hpc3->pbus_dmacfg[hal2->dac.pbus.pbusnr][0] = 0x8208844; | 1479 | hpc3->pbus_dmacfg[hal2->dac.pbus.pbusnr][0] = 0x8208844; |
1480 | hpc3->pbus_dmacfg[hal2->adc.pbus.pbusnr][0] = 0x8208844; | 1480 | hpc3->pbus_dmacfg[hal2->adc.pbus.pbusnr][0] = 0x8208844; |
1481 | 1481 | ||
1482 | if (request_irq(SGI_HPCDMA_IRQ, hal2_interrupt, SA_SHIRQ, | 1482 | if (request_irq(SGI_HPCDMA_IRQ, hal2_interrupt, IRQF_SHARED, |
1483 | hal2str, hal2)) { | 1483 | hal2str, hal2)) { |
1484 | printk(KERN_ERR "HAL2: Can't get irq %d\n", SGI_HPCDMA_IRQ); | 1484 | printk(KERN_ERR "HAL2: Can't get irq %d\n", SGI_HPCDMA_IRQ); |
1485 | ret = -EAGAIN; | 1485 | ret = -EAGAIN; |
diff --git a/sound/oss/i810_audio.c b/sound/oss/i810_audio.c index dd2b871cdac5..ddcddc2347f7 100644 --- a/sound/oss/i810_audio.c +++ b/sound/oss/i810_audio.c | |||
@@ -3413,7 +3413,7 @@ static int __devinit i810_probe(struct pci_dev *pci_dev, const struct pci_device | |||
3413 | goto out_iospace; | 3413 | goto out_iospace; |
3414 | } | 3414 | } |
3415 | 3415 | ||
3416 | if (request_irq(card->irq, &i810_interrupt, SA_SHIRQ, | 3416 | if (request_irq(card->irq, &i810_interrupt, IRQF_SHARED, |
3417 | card_names[pci_id->driver_data], card)) { | 3417 | card_names[pci_id->driver_data], card)) { |
3418 | printk(KERN_ERR "i810_audio: unable to allocate irq %d\n", card->irq); | 3418 | printk(KERN_ERR "i810_audio: unable to allocate irq %d\n", card->irq); |
3419 | goto out_iospace; | 3419 | goto out_iospace; |
diff --git a/sound/oss/ite8172.c b/sound/oss/ite8172.c index 00ac1c95a429..68aab3605d74 100644 --- a/sound/oss/ite8172.c +++ b/sound/oss/ite8172.c | |||
@@ -2019,7 +2019,7 @@ static int __devinit it8172_probe(struct pci_dev *pcidev, | |||
2019 | s->io, s->io + pci_resource_len(pcidev,0)-1); | 2019 | s->io, s->io + pci_resource_len(pcidev,0)-1); |
2020 | goto err_region; | 2020 | goto err_region; |
2021 | } | 2021 | } |
2022 | if (request_irq(s->irq, it8172_interrupt, SA_INTERRUPT, | 2022 | if (request_irq(s->irq, it8172_interrupt, IRQF_DISABLED, |
2023 | IT8172_MODULE_NAME, s)) { | 2023 | IT8172_MODULE_NAME, s)) { |
2024 | err("irq %u in use", s->irq); | 2024 | err("irq %u in use", s->irq); |
2025 | goto err_irq; | 2025 | goto err_irq; |
diff --git a/sound/oss/maestro.c b/sound/oss/maestro.c index e647f2f86279..1d98d100d739 100644 --- a/sound/oss/maestro.c +++ b/sound/oss/maestro.c | |||
@@ -3545,7 +3545,7 @@ maestro_probe(struct pci_dev *pcidev,const struct pci_device_id *pdid) | |||
3545 | mixer_push_state(card); | 3545 | mixer_push_state(card); |
3546 | } | 3546 | } |
3547 | 3547 | ||
3548 | if((ret=request_irq(card->irq, ess_interrupt, SA_SHIRQ, card_names[card_type], card))) | 3548 | if((ret=request_irq(card->irq, ess_interrupt, IRQF_SHARED, card_names[card_type], card))) |
3549 | { | 3549 | { |
3550 | printk(KERN_ERR "maestro: unable to allocate irq %d,\n", card->irq); | 3550 | printk(KERN_ERR "maestro: unable to allocate irq %d,\n", card->irq); |
3551 | unregister_sound_mixer(card->dev_mixer); | 3551 | unregister_sound_mixer(card->dev_mixer); |
diff --git a/sound/oss/maestro3.c b/sound/oss/maestro3.c index 4a5e4237a110..5548e3cff7ce 100644 --- a/sound/oss/maestro3.c +++ b/sound/oss/maestro3.c | |||
@@ -2694,7 +2694,7 @@ static int __devinit m3_probe(struct pci_dev *pci_dev, const struct pci_device_i | |||
2694 | } | 2694 | } |
2695 | } | 2695 | } |
2696 | 2696 | ||
2697 | if(request_irq(card->irq, m3_interrupt, SA_SHIRQ, card_names[card->card_type], card)) { | 2697 | if(request_irq(card->irq, m3_interrupt, IRQF_SHARED, card_names[card->card_type], card)) { |
2698 | 2698 | ||
2699 | printk(KERN_ERR PFX "unable to allocate irq %d,\n", card->irq); | 2699 | printk(KERN_ERR PFX "unable to allocate irq %d,\n", card->irq); |
2700 | 2700 | ||
diff --git a/sound/oss/nec_vrc5477.c b/sound/oss/nec_vrc5477.c index 21c1954d9108..6f7f2f0423e4 100644 --- a/sound/oss/nec_vrc5477.c +++ b/sound/oss/nec_vrc5477.c | |||
@@ -1909,7 +1909,7 @@ static int __devinit vrc5477_ac97_probe(struct pci_dev *pcidev, | |||
1909 | s->io, s->io + pci_resource_len(pcidev,0)-1); | 1909 | s->io, s->io + pci_resource_len(pcidev,0)-1); |
1910 | goto err_region; | 1910 | goto err_region; |
1911 | } | 1911 | } |
1912 | if (request_irq(s->irq, vrc5477_ac97_interrupt, SA_INTERRUPT, | 1912 | if (request_irq(s->irq, vrc5477_ac97_interrupt, IRQF_DISABLED, |
1913 | VRC5477_AC97_MODULE_NAME, s)) { | 1913 | VRC5477_AC97_MODULE_NAME, s)) { |
1914 | printk(KERN_ERR PFX "irq %u in use\n", s->irq); | 1914 | printk(KERN_ERR PFX "irq %u in use\n", s->irq); |
1915 | goto err_irq; | 1915 | goto err_irq; |
diff --git a/sound/oss/nm256_audio.c b/sound/oss/nm256_audio.c index 6e662ac009ae..7760dddf2b32 100644 --- a/sound/oss/nm256_audio.c +++ b/sound/oss/nm256_audio.c | |||
@@ -733,7 +733,7 @@ static int | |||
733 | nm256_grabInterrupt (struct nm256_info *card) | 733 | nm256_grabInterrupt (struct nm256_info *card) |
734 | { | 734 | { |
735 | if (card->has_irq++ == 0) { | 735 | if (card->has_irq++ == 0) { |
736 | if (request_irq (card->irq, card->introutine, SA_SHIRQ, | 736 | if (request_irq (card->irq, card->introutine, IRQF_SHARED, |
737 | "NM256_audio", card) < 0) { | 737 | "NM256_audio", card) < 0) { |
738 | printk (KERN_ERR "NM256: can't obtain IRQ %d\n", card->irq); | 738 | printk (KERN_ERR "NM256: can't obtain IRQ %d\n", card->irq); |
739 | return -1; | 739 | return -1; |
diff --git a/sound/oss/rme96xx.c b/sound/oss/rme96xx.c index a1ec9d131ab3..f17d25b6f836 100644 --- a/sound/oss/rme96xx.c +++ b/sound/oss/rme96xx.c | |||
@@ -994,7 +994,7 @@ static int __devinit rme96xx_probe(struct pci_dev *pcidev, const struct pci_devi | |||
994 | 994 | ||
995 | if (pci_enable_device(pcidev)) | 995 | if (pci_enable_device(pcidev)) |
996 | goto err_irq; | 996 | goto err_irq; |
997 | if (request_irq(s->irq, rme96xx_interrupt, SA_SHIRQ, "rme96xx", s)) { | 997 | if (request_irq(s->irq, rme96xx_interrupt, IRQF_SHARED, "rme96xx", s)) { |
998 | printk(KERN_ERR RME_MESS" irq %u in use\n", s->irq); | 998 | printk(KERN_ERR RME_MESS" irq %u in use\n", s->irq); |
999 | goto err_irq; | 999 | goto err_irq; |
1000 | } | 1000 | } |
diff --git a/sound/oss/sb_common.c b/sound/oss/sb_common.c index 3e8ecac86a89..35bab6e2f998 100644 --- a/sound/oss/sb_common.c +++ b/sound/oss/sb_common.c | |||
@@ -677,7 +677,7 @@ int sb_dsp_init(struct address_info *hw_config, struct module *owner) | |||
677 | * will get shared PCI irq lines we must cope. | 677 | * will get shared PCI irq lines we must cope. |
678 | */ | 678 | */ |
679 | 679 | ||
680 | int i=(devc->caps&SB_PCI_IRQ)?SA_SHIRQ:0; | 680 | int i=(devc->caps&SB_PCI_IRQ)?IRQF_SHARED:0; |
681 | 681 | ||
682 | if (request_irq(hw_config->irq, sbintr, i, "soundblaster", devc) < 0) | 682 | if (request_irq(hw_config->irq, sbintr, i, "soundblaster", devc) < 0) |
683 | { | 683 | { |
diff --git a/sound/oss/sh_dac_audio.c b/sound/oss/sh_dac_audio.c index cbf745db4b10..7b168d85f4ab 100644 --- a/sound/oss/sh_dac_audio.c +++ b/sound/oss/sh_dac_audio.c | |||
@@ -297,7 +297,7 @@ static int __init dac_audio_init(void) | |||
297 | dac_audio_set_rate(); | 297 | dac_audio_set_rate(); |
298 | 298 | ||
299 | retval = | 299 | retval = |
300 | request_irq(TIMER1_IRQ, timer1_interrupt, SA_INTERRUPT, MODNAME, 0); | 300 | request_irq(TIMER1_IRQ, timer1_interrupt, IRQF_DISABLED, MODNAME, 0); |
301 | if (retval < 0) { | 301 | if (retval < 0) { |
302 | printk(KERN_ERR "sh_dac_audio: IRQ %d request failed\n", | 302 | printk(KERN_ERR "sh_dac_audio: IRQ %d request failed\n", |
303 | TIMER1_IRQ); | 303 | TIMER1_IRQ); |
diff --git a/sound/oss/sonicvibes.c b/sound/oss/sonicvibes.c index 42bd276cfc39..8ea532d40198 100644 --- a/sound/oss/sonicvibes.c +++ b/sound/oss/sonicvibes.c | |||
@@ -2632,7 +2632,7 @@ static int __devinit sv_probe(struct pci_dev *pcidev, const struct pci_device_id | |||
2632 | wrindir(s, SV_CIPCMSR1, ((8000 * 65536 / FULLRATE) >> 8) & 0xff); | 2632 | wrindir(s, SV_CIPCMSR1, ((8000 * 65536 / FULLRATE) >> 8) & 0xff); |
2633 | wrindir(s, SV_CIADCOUTPUT, 0); | 2633 | wrindir(s, SV_CIADCOUTPUT, 0); |
2634 | /* request irq */ | 2634 | /* request irq */ |
2635 | if ((ret=request_irq(s->irq,sv_interrupt,SA_SHIRQ,"S3 SonicVibes",s))) { | 2635 | if ((ret=request_irq(s->irq,sv_interrupt,IRQF_SHARED,"S3 SonicVibes",s))) { |
2636 | printk(KERN_ERR "sv: irq %u in use\n", s->irq); | 2636 | printk(KERN_ERR "sv: irq %u in use\n", s->irq); |
2637 | goto err_irq; | 2637 | goto err_irq; |
2638 | } | 2638 | } |
diff --git a/sound/oss/trident.c b/sound/oss/trident.c index 420a866fb933..2813e4c8e365 100644 --- a/sound/oss/trident.c +++ b/sound/oss/trident.c | |||
@@ -4472,7 +4472,7 @@ trident_probe(struct pci_dev *pci_dev, const struct pci_device_id *pci_id) | |||
4472 | 4472 | ||
4473 | /* claim our irq */ | 4473 | /* claim our irq */ |
4474 | rc = -ENODEV; | 4474 | rc = -ENODEV; |
4475 | if (request_irq(card->irq, &trident_interrupt, SA_SHIRQ, | 4475 | if (request_irq(card->irq, &trident_interrupt, IRQF_SHARED, |
4476 | card_names[pci_id->driver_data], card)) { | 4476 | card_names[pci_id->driver_data], card)) { |
4477 | printk(KERN_ERR "trident: unable to allocate irq %d\n", | 4477 | printk(KERN_ERR "trident: unable to allocate irq %d\n", |
4478 | card->irq); | 4478 | card->irq); |
diff --git a/sound/oss/via82cxxx_audio.c b/sound/oss/via82cxxx_audio.c index 3ada26b3fc7e..08d8c94d01b2 100644 --- a/sound/oss/via82cxxx_audio.c +++ b/sound/oss/via82cxxx_audio.c | |||
@@ -2013,7 +2013,7 @@ static int via_interrupt_init (struct via_info *card) | |||
2013 | tmp8 |= VIA_CR48_FM_TRAP_TO_NMI; | 2013 | tmp8 |= VIA_CR48_FM_TRAP_TO_NMI; |
2014 | pci_write_config_byte (card->pdev, VIA_FM_NMI_CTRL, tmp8); | 2014 | pci_write_config_byte (card->pdev, VIA_FM_NMI_CTRL, tmp8); |
2015 | } | 2015 | } |
2016 | if (request_irq (card->pdev->irq, via_interrupt, SA_SHIRQ, VIA_MODULE_NAME, card)) { | 2016 | if (request_irq (card->pdev->irq, via_interrupt, IRQF_SHARED, VIA_MODULE_NAME, card)) { |
2017 | printk (KERN_ERR PFX "unable to obtain IRQ %d, aborting\n", | 2017 | printk (KERN_ERR PFX "unable to obtain IRQ %d, aborting\n", |
2018 | card->pdev->irq); | 2018 | card->pdev->irq); |
2019 | DPRINTK ("EXIT, returning -EBUSY\n"); | 2019 | DPRINTK ("EXIT, returning -EBUSY\n"); |
@@ -2022,7 +2022,7 @@ static int via_interrupt_init (struct via_info *card) | |||
2022 | } | 2022 | } |
2023 | else | 2023 | else |
2024 | { | 2024 | { |
2025 | if (request_irq (card->pdev->irq, via_new_interrupt, SA_SHIRQ, VIA_MODULE_NAME, card)) { | 2025 | if (request_irq (card->pdev->irq, via_new_interrupt, IRQF_SHARED, VIA_MODULE_NAME, card)) { |
2026 | printk (KERN_ERR PFX "unable to obtain IRQ %d, aborting\n", | 2026 | printk (KERN_ERR PFX "unable to obtain IRQ %d, aborting\n", |
2027 | card->pdev->irq); | 2027 | card->pdev->irq); |
2028 | DPRINTK ("EXIT, returning -EBUSY\n"); | 2028 | DPRINTK ("EXIT, returning -EBUSY\n"); |
diff --git a/sound/oss/wavfront.c b/sound/oss/wavfront.c index b1a4eeb9dc08..1dec3958cc7b 100644 --- a/sound/oss/wavfront.c +++ b/sound/oss/wavfront.c | |||
@@ -2268,7 +2268,7 @@ static int __init wavefront_hw_reset (void) | |||
2268 | } | 2268 | } |
2269 | 2269 | ||
2270 | if (request_irq (dev.irq, wavefrontintr, | 2270 | if (request_irq (dev.irq, wavefrontintr, |
2271 | SA_INTERRUPT|SA_SHIRQ, | 2271 | IRQF_DISABLED|IRQF_SHARED, |
2272 | "wavefront synth", &dev) < 0) { | 2272 | "wavefront synth", &dev) < 0) { |
2273 | printk (KERN_WARNING LOGNAME "IRQ %d not available!\n", | 2273 | printk (KERN_WARNING LOGNAME "IRQ %d not available!\n", |
2274 | dev.irq); | 2274 | dev.irq); |
diff --git a/sound/oss/wf_midi.c b/sound/oss/wf_midi.c index 7b167b74375b..3f3a390014ca 100644 --- a/sound/oss/wf_midi.c +++ b/sound/oss/wf_midi.c | |||
@@ -820,7 +820,7 @@ int __init install_wf_mpu (void) | |||
820 | 820 | ||
821 | /* OK, now we're configured to handle an interrupt ... */ | 821 | /* OK, now we're configured to handle an interrupt ... */ |
822 | 822 | ||
823 | if (request_irq (phys_dev->irq, wf_mpuintr, SA_INTERRUPT|SA_SHIRQ, | 823 | if (request_irq (phys_dev->irq, wf_mpuintr, IRQF_DISABLED|IRQF_SHARED, |
824 | "wavefront midi", phys_dev) < 0) { | 824 | "wavefront midi", phys_dev) < 0) { |
825 | 825 | ||
826 | printk (KERN_ERR "WF-MPU: Failed to allocate IRQ%d\n", | 826 | printk (KERN_ERR "WF-MPU: Failed to allocate IRQ%d\n", |
diff --git a/sound/oss/ymfpci.c b/sound/oss/ymfpci.c index bf90c124a7e6..6e22472df952 100644 --- a/sound/oss/ymfpci.c +++ b/sound/oss/ymfpci.c | |||
@@ -2573,7 +2573,7 @@ static int __devinit ymf_probe_one(struct pci_dev *pcidev, const struct pci_devi | |||
2573 | goto out_disable_dsp; | 2573 | goto out_disable_dsp; |
2574 | ymf_memload(codec); | 2574 | ymf_memload(codec); |
2575 | 2575 | ||
2576 | if (request_irq(pcidev->irq, ymf_interrupt, SA_SHIRQ, "ymfpci", codec) != 0) { | 2576 | if (request_irq(pcidev->irq, ymf_interrupt, IRQF_SHARED, "ymfpci", codec) != 0) { |
2577 | printk(KERN_ERR "ymfpci: unable to request IRQ %d\n", | 2577 | printk(KERN_ERR "ymfpci: unable to request IRQ %d\n", |
2578 | pcidev->irq); | 2578 | pcidev->irq); |
2579 | goto out_memfree; | 2579 | goto out_memfree; |
diff --git a/sound/pci/ad1889.c b/sound/pci/ad1889.c index d42bf4570367..f7aef8c9cf43 100644 --- a/sound/pci/ad1889.c +++ b/sound/pci/ad1889.c | |||
@@ -947,7 +947,7 @@ snd_ad1889_create(struct snd_card *card, | |||
947 | spin_lock_init(&chip->lock); /* only now can we call ad1889_free */ | 947 | spin_lock_init(&chip->lock); /* only now can we call ad1889_free */ |
948 | 948 | ||
949 | if (request_irq(pci->irq, snd_ad1889_interrupt, | 949 | if (request_irq(pci->irq, snd_ad1889_interrupt, |
950 | SA_INTERRUPT|SA_SHIRQ, card->driver, (void*)chip)) { | 950 | IRQF_DISABLED|IRQF_SHARED, card->driver, (void*)chip)) { |
951 | printk(KERN_ERR PFX "cannot obtain IRQ %d\n", pci->irq); | 951 | printk(KERN_ERR PFX "cannot obtain IRQ %d\n", pci->irq); |
952 | snd_ad1889_free(chip); | 952 | snd_ad1889_free(chip); |
953 | return -EBUSY; | 953 | return -EBUSY; |
diff --git a/sound/pci/ali5451/ali5451.c b/sound/pci/ali5451/ali5451.c index 5dfdbf6657f2..e0a815e53d1c 100644 --- a/sound/pci/ali5451/ali5451.c +++ b/sound/pci/ali5451/ali5451.c | |||
@@ -2185,7 +2185,7 @@ static int __devinit snd_ali_resources(struct snd_ali *codec) | |||
2185 | return err; | 2185 | return err; |
2186 | codec->port = pci_resource_start(codec->pci, 0); | 2186 | codec->port = pci_resource_start(codec->pci, 0); |
2187 | 2187 | ||
2188 | if (request_irq(codec->pci->irq, snd_ali_card_interrupt, SA_INTERRUPT|SA_SHIRQ, "ALI 5451", (void *)codec)) { | 2188 | if (request_irq(codec->pci->irq, snd_ali_card_interrupt, IRQF_DISABLED|IRQF_SHARED, "ALI 5451", (void *)codec)) { |
2189 | snd_printk(KERN_ERR "Unable to request irq.\n"); | 2189 | snd_printk(KERN_ERR "Unable to request irq.\n"); |
2190 | return -EBUSY; | 2190 | return -EBUSY; |
2191 | } | 2191 | } |
diff --git a/sound/pci/als300.c b/sound/pci/als300.c index 901b08ae9174..a9c38963188a 100644 --- a/sound/pci/als300.c +++ b/sound/pci/als300.c | |||
@@ -724,7 +724,7 @@ static int __devinit snd_als300_create(snd_card_t *card, | |||
724 | else | 724 | else |
725 | irq_handler = snd_als300_interrupt; | 725 | irq_handler = snd_als300_interrupt; |
726 | 726 | ||
727 | if (request_irq(pci->irq, irq_handler, SA_INTERRUPT|SA_SHIRQ, | 727 | if (request_irq(pci->irq, irq_handler, IRQF_DISABLED|IRQF_SHARED, |
728 | card->shortname, (void *)chip)) { | 728 | card->shortname, (void *)chip)) { |
729 | snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); | 729 | snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); |
730 | snd_als300_free(chip); | 730 | snd_als300_free(chip); |
diff --git a/sound/pci/atiixp.c b/sound/pci/atiixp.c index f18a8c0e4688..9fbb065a810b 100644 --- a/sound/pci/atiixp.c +++ b/sound/pci/atiixp.c | |||
@@ -1578,7 +1578,7 @@ static int __devinit snd_atiixp_create(struct snd_card *card, | |||
1578 | return -EIO; | 1578 | return -EIO; |
1579 | } | 1579 | } |
1580 | 1580 | ||
1581 | if (request_irq(pci->irq, snd_atiixp_interrupt, SA_INTERRUPT|SA_SHIRQ, | 1581 | if (request_irq(pci->irq, snd_atiixp_interrupt, IRQF_DISABLED|IRQF_SHARED, |
1582 | card->shortname, chip)) { | 1582 | card->shortname, chip)) { |
1583 | snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); | 1583 | snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); |
1584 | snd_atiixp_free(chip); | 1584 | snd_atiixp_free(chip); |
diff --git a/sound/pci/atiixp_modem.c b/sound/pci/atiixp_modem.c index 40739057076b..7dcf4941dce2 100644 --- a/sound/pci/atiixp_modem.c +++ b/sound/pci/atiixp_modem.c | |||
@@ -1251,7 +1251,7 @@ static int __devinit snd_atiixp_create(struct snd_card *card, | |||
1251 | return -EIO; | 1251 | return -EIO; |
1252 | } | 1252 | } |
1253 | 1253 | ||
1254 | if (request_irq(pci->irq, snd_atiixp_interrupt, SA_INTERRUPT|SA_SHIRQ, | 1254 | if (request_irq(pci->irq, snd_atiixp_interrupt, IRQF_DISABLED|IRQF_SHARED, |
1255 | card->shortname, chip)) { | 1255 | card->shortname, chip)) { |
1256 | snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); | 1256 | snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); |
1257 | snd_atiixp_free(chip); | 1257 | snd_atiixp_free(chip); |
diff --git a/sound/pci/au88x0/au88x0.c b/sound/pci/au88x0/au88x0.c index 8a3b118989bf..ef189d7f09d3 100644 --- a/sound/pci/au88x0/au88x0.c +++ b/sound/pci/au88x0/au88x0.c | |||
@@ -197,7 +197,7 @@ snd_vortex_create(struct snd_card *card, struct pci_dev *pci, vortex_t ** rchip) | |||
197 | } | 197 | } |
198 | 198 | ||
199 | if ((err = request_irq(pci->irq, vortex_interrupt, | 199 | if ((err = request_irq(pci->irq, vortex_interrupt, |
200 | SA_INTERRUPT | SA_SHIRQ, CARD_NAME_SHORT, | 200 | IRQF_DISABLED | IRQF_SHARED, CARD_NAME_SHORT, |
201 | chip)) != 0) { | 201 | chip)) != 0) { |
202 | printk(KERN_ERR "cannot grab irq\n"); | 202 | printk(KERN_ERR "cannot grab irq\n"); |
203 | goto irq_out; | 203 | goto irq_out; |
diff --git a/sound/pci/azt3328.c b/sound/pci/azt3328.c index 6e62dafb66cd..15447a3216dd 100644 --- a/sound/pci/azt3328.c +++ b/sound/pci/azt3328.c | |||
@@ -1724,7 +1724,7 @@ snd_azf3328_create(struct snd_card *card, | |||
1724 | chip->synth_port = pci_resource_start(pci, 3); | 1724 | chip->synth_port = pci_resource_start(pci, 3); |
1725 | chip->mixer_port = pci_resource_start(pci, 4); | 1725 | chip->mixer_port = pci_resource_start(pci, 4); |
1726 | 1726 | ||
1727 | if (request_irq(pci->irq, snd_azf3328_interrupt, SA_INTERRUPT|SA_SHIRQ, card->shortname, (void *)chip)) { | 1727 | if (request_irq(pci->irq, snd_azf3328_interrupt, IRQF_DISABLED|IRQF_SHARED, card->shortname, (void *)chip)) { |
1728 | snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); | 1728 | snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); |
1729 | err = -EBUSY; | 1729 | err = -EBUSY; |
1730 | goto out_err; | 1730 | goto out_err; |
diff --git a/sound/pci/bt87x.c b/sound/pci/bt87x.c index 497ed6b20060..4d4277d045aa 100644 --- a/sound/pci/bt87x.c +++ b/sound/pci/bt87x.c | |||
@@ -747,7 +747,7 @@ static int __devinit snd_bt87x_create(struct snd_card *card, | |||
747 | snd_bt87x_writel(chip, REG_INT_MASK, 0); | 747 | snd_bt87x_writel(chip, REG_INT_MASK, 0); |
748 | snd_bt87x_writel(chip, REG_INT_STAT, MY_INTERRUPTS); | 748 | snd_bt87x_writel(chip, REG_INT_STAT, MY_INTERRUPTS); |
749 | 749 | ||
750 | if (request_irq(pci->irq, snd_bt87x_interrupt, SA_INTERRUPT | SA_SHIRQ, | 750 | if (request_irq(pci->irq, snd_bt87x_interrupt, IRQF_DISABLED | IRQF_SHARED, |
751 | "Bt87x audio", chip)) { | 751 | "Bt87x audio", chip)) { |
752 | snd_bt87x_free(chip); | 752 | snd_bt87x_free(chip); |
753 | snd_printk(KERN_ERR "cannot grab irq\n"); | 753 | snd_printk(KERN_ERR "cannot grab irq\n"); |
diff --git a/sound/pci/ca0106/ca0106_main.c b/sound/pci/ca0106/ca0106_main.c index 59bf9bd02534..a30c019bab64 100644 --- a/sound/pci/ca0106/ca0106_main.c +++ b/sound/pci/ca0106/ca0106_main.c | |||
@@ -1268,7 +1268,7 @@ static int __devinit snd_ca0106_create(struct snd_card *card, | |||
1268 | } | 1268 | } |
1269 | 1269 | ||
1270 | if (request_irq(pci->irq, snd_ca0106_interrupt, | 1270 | if (request_irq(pci->irq, snd_ca0106_interrupt, |
1271 | SA_INTERRUPT|SA_SHIRQ, "snd_ca0106", | 1271 | IRQF_DISABLED|IRQF_SHARED, "snd_ca0106", |
1272 | (void *)chip)) { | 1272 | (void *)chip)) { |
1273 | snd_ca0106_free(chip); | 1273 | snd_ca0106_free(chip); |
1274 | printk(KERN_ERR "cannot grab irq\n"); | 1274 | printk(KERN_ERR "cannot grab irq\n"); |
diff --git a/sound/pci/cmipci.c b/sound/pci/cmipci.c index 0938c158b5c9..03766ad74998 100644 --- a/sound/pci/cmipci.c +++ b/sound/pci/cmipci.c | |||
@@ -2862,7 +2862,7 @@ static int __devinit snd_cmipci_create(struct snd_card *card, struct pci_dev *pc | |||
2862 | cm->iobase = pci_resource_start(pci, 0); | 2862 | cm->iobase = pci_resource_start(pci, 0); |
2863 | 2863 | ||
2864 | if (request_irq(pci->irq, snd_cmipci_interrupt, | 2864 | if (request_irq(pci->irq, snd_cmipci_interrupt, |
2865 | SA_INTERRUPT|SA_SHIRQ, card->driver, cm)) { | 2865 | IRQF_DISABLED|IRQF_SHARED, card->driver, cm)) { |
2866 | snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); | 2866 | snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); |
2867 | snd_cmipci_free(cm); | 2867 | snd_cmipci_free(cm); |
2868 | return -EBUSY; | 2868 | return -EBUSY; |
diff --git a/sound/pci/cs4281.c b/sound/pci/cs4281.c index e77a4ce314b7..d1802487f5be 100644 --- a/sound/pci/cs4281.c +++ b/sound/pci/cs4281.c | |||
@@ -1386,7 +1386,7 @@ static int __devinit snd_cs4281_create(struct snd_card *card, | |||
1386 | return -ENOMEM; | 1386 | return -ENOMEM; |
1387 | } | 1387 | } |
1388 | 1388 | ||
1389 | if (request_irq(pci->irq, snd_cs4281_interrupt, SA_INTERRUPT|SA_SHIRQ, | 1389 | if (request_irq(pci->irq, snd_cs4281_interrupt, IRQF_DISABLED|IRQF_SHARED, |
1390 | "CS4281", chip)) { | 1390 | "CS4281", chip)) { |
1391 | snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); | 1391 | snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); |
1392 | snd_cs4281_free(chip); | 1392 | snd_cs4281_free(chip); |
diff --git a/sound/pci/cs46xx/cs46xx_lib.c b/sound/pci/cs46xx/cs46xx_lib.c index 5c2114439204..894545ea41fd 100644 --- a/sound/pci/cs46xx/cs46xx_lib.c +++ b/sound/pci/cs46xx/cs46xx_lib.c | |||
@@ -3853,7 +3853,7 @@ int __devinit snd_cs46xx_create(struct snd_card *card, | |||
3853 | } | 3853 | } |
3854 | } | 3854 | } |
3855 | 3855 | ||
3856 | if (request_irq(pci->irq, snd_cs46xx_interrupt, SA_INTERRUPT|SA_SHIRQ, | 3856 | if (request_irq(pci->irq, snd_cs46xx_interrupt, IRQF_DISABLED|IRQF_SHARED, |
3857 | "CS46XX", chip)) { | 3857 | "CS46XX", chip)) { |
3858 | snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); | 3858 | snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); |
3859 | snd_cs46xx_free(chip); | 3859 | snd_cs46xx_free(chip); |
diff --git a/sound/pci/cs5535audio/cs5535audio.c b/sound/pci/cs5535audio/cs5535audio.c index 91c18a11fe87..c12b24c679f2 100644 --- a/sound/pci/cs5535audio/cs5535audio.c +++ b/sound/pci/cs5535audio/cs5535audio.c | |||
@@ -321,7 +321,7 @@ static int __devinit snd_cs5535audio_create(struct snd_card *card, | |||
321 | cs5535au->port = pci_resource_start(pci, 0); | 321 | cs5535au->port = pci_resource_start(pci, 0); |
322 | 322 | ||
323 | if (request_irq(pci->irq, snd_cs5535audio_interrupt, | 323 | if (request_irq(pci->irq, snd_cs5535audio_interrupt, |
324 | SA_INTERRUPT|SA_SHIRQ, "CS5535 Audio", cs5535au)) { | 324 | IRQF_DISABLED|IRQF_SHARED, "CS5535 Audio", cs5535au)) { |
325 | snd_printk("unable to grab IRQ %d\n", pci->irq); | 325 | snd_printk("unable to grab IRQ %d\n", pci->irq); |
326 | err = -EBUSY; | 326 | err = -EBUSY; |
327 | goto sndfail; | 327 | goto sndfail; |
diff --git a/sound/pci/echoaudio/echoaudio.c b/sound/pci/echoaudio/echoaudio.c index 43b408ada1da..27a8dbe6f6a8 100644 --- a/sound/pci/echoaudio/echoaudio.c +++ b/sound/pci/echoaudio/echoaudio.c | |||
@@ -1951,7 +1951,7 @@ static __devinit int snd_echo_create(struct snd_card *card, | |||
1951 | chip->dsp_registers = (volatile u32 __iomem *) | 1951 | chip->dsp_registers = (volatile u32 __iomem *) |
1952 | ioremap_nocache(chip->dsp_registers_phys, sz); | 1952 | ioremap_nocache(chip->dsp_registers_phys, sz); |
1953 | 1953 | ||
1954 | if (request_irq(pci->irq, snd_echo_interrupt, SA_INTERRUPT | SA_SHIRQ, | 1954 | if (request_irq(pci->irq, snd_echo_interrupt, IRQF_DISABLED | IRQF_SHARED, |
1955 | ECHOCARD_NAME, (void *)chip)) { | 1955 | ECHOCARD_NAME, (void *)chip)) { |
1956 | snd_echo_free(chip); | 1956 | snd_echo_free(chip); |
1957 | snd_printk(KERN_ERR "cannot grab irq\n"); | 1957 | snd_printk(KERN_ERR "cannot grab irq\n"); |
diff --git a/sound/pci/emu10k1/emu10k1_main.c b/sound/pci/emu10k1/emu10k1_main.c index 42a358f989c3..d6f135fe2958 100644 --- a/sound/pci/emu10k1/emu10k1_main.c +++ b/sound/pci/emu10k1/emu10k1_main.c | |||
@@ -1233,7 +1233,7 @@ int __devinit snd_emu10k1_create(struct snd_card *card, | |||
1233 | } | 1233 | } |
1234 | emu->port = pci_resource_start(pci, 0); | 1234 | emu->port = pci_resource_start(pci, 0); |
1235 | 1235 | ||
1236 | if (request_irq(pci->irq, snd_emu10k1_interrupt, SA_INTERRUPT|SA_SHIRQ, "EMU10K1", (void *)emu)) { | 1236 | if (request_irq(pci->irq, snd_emu10k1_interrupt, IRQF_DISABLED|IRQF_SHARED, "EMU10K1", (void *)emu)) { |
1237 | err = -EBUSY; | 1237 | err = -EBUSY; |
1238 | goto error; | 1238 | goto error; |
1239 | } | 1239 | } |
diff --git a/sound/pci/emu10k1/emu10k1x.c b/sound/pci/emu10k1/emu10k1x.c index 0fb27e4be07b..2167279429b8 100644 --- a/sound/pci/emu10k1/emu10k1x.c +++ b/sound/pci/emu10k1/emu10k1x.c | |||
@@ -928,7 +928,7 @@ static int __devinit snd_emu10k1x_create(struct snd_card *card, | |||
928 | } | 928 | } |
929 | 929 | ||
930 | if (request_irq(pci->irq, snd_emu10k1x_interrupt, | 930 | if (request_irq(pci->irq, snd_emu10k1x_interrupt, |
931 | SA_INTERRUPT|SA_SHIRQ, "EMU10K1X", | 931 | IRQF_DISABLED|IRQF_SHARED, "EMU10K1X", |
932 | (void *)chip)) { | 932 | (void *)chip)) { |
933 | snd_printk(KERN_ERR "emu10k1x: cannot grab irq %d\n", pci->irq); | 933 | snd_printk(KERN_ERR "emu10k1x: cannot grab irq %d\n", pci->irq); |
934 | snd_emu10k1x_free(chip); | 934 | snd_emu10k1x_free(chip); |
diff --git a/sound/pci/ens1370.c b/sound/pci/ens1370.c index 9d46bbee2a40..7a985c868007 100644 --- a/sound/pci/ens1370.c +++ b/sound/pci/ens1370.c | |||
@@ -2135,7 +2135,7 @@ static int __devinit snd_ensoniq_create(struct snd_card *card, | |||
2135 | return err; | 2135 | return err; |
2136 | } | 2136 | } |
2137 | ensoniq->port = pci_resource_start(pci, 0); | 2137 | ensoniq->port = pci_resource_start(pci, 0); |
2138 | if (request_irq(pci->irq, snd_audiopci_interrupt, SA_INTERRUPT|SA_SHIRQ, | 2138 | if (request_irq(pci->irq, snd_audiopci_interrupt, IRQF_DISABLED|IRQF_SHARED, |
2139 | "Ensoniq AudioPCI", ensoniq)) { | 2139 | "Ensoniq AudioPCI", ensoniq)) { |
2140 | snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); | 2140 | snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); |
2141 | snd_ensoniq_free(ensoniq); | 2141 | snd_ensoniq_free(ensoniq); |
diff --git a/sound/pci/es1938.c b/sound/pci/es1938.c index ca6603fe0b11..1113b10259cf 100644 --- a/sound/pci/es1938.c +++ b/sound/pci/es1938.c | |||
@@ -1429,7 +1429,7 @@ static int es1938_resume(struct pci_dev *pci) | |||
1429 | pci_restore_state(pci); | 1429 | pci_restore_state(pci); |
1430 | pci_enable_device(pci); | 1430 | pci_enable_device(pci); |
1431 | request_irq(pci->irq, snd_es1938_interrupt, | 1431 | request_irq(pci->irq, snd_es1938_interrupt, |
1432 | SA_INTERRUPT|SA_SHIRQ, "ES1938", chip); | 1432 | IRQF_DISABLED|IRQF_SHARED, "ES1938", chip); |
1433 | chip->irq = pci->irq; | 1433 | chip->irq = pci->irq; |
1434 | snd_es1938_chip_init(chip); | 1434 | snd_es1938_chip_init(chip); |
1435 | 1435 | ||
@@ -1544,7 +1544,7 @@ static int __devinit snd_es1938_create(struct snd_card *card, | |||
1544 | chip->vc_port = pci_resource_start(pci, 2); | 1544 | chip->vc_port = pci_resource_start(pci, 2); |
1545 | chip->mpu_port = pci_resource_start(pci, 3); | 1545 | chip->mpu_port = pci_resource_start(pci, 3); |
1546 | chip->game_port = pci_resource_start(pci, 4); | 1546 | chip->game_port = pci_resource_start(pci, 4); |
1547 | if (request_irq(pci->irq, snd_es1938_interrupt, SA_INTERRUPT|SA_SHIRQ, | 1547 | if (request_irq(pci->irq, snd_es1938_interrupt, IRQF_DISABLED|IRQF_SHARED, |
1548 | "ES1938", chip)) { | 1548 | "ES1938", chip)) { |
1549 | snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); | 1549 | snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); |
1550 | snd_es1938_free(chip); | 1550 | snd_es1938_free(chip); |
diff --git a/sound/pci/es1968.c b/sound/pci/es1968.c index bfa0876e715e..a491c8f8a6a8 100644 --- a/sound/pci/es1968.c +++ b/sound/pci/es1968.c | |||
@@ -2597,7 +2597,7 @@ static int __devinit snd_es1968_create(struct snd_card *card, | |||
2597 | return err; | 2597 | return err; |
2598 | } | 2598 | } |
2599 | chip->io_port = pci_resource_start(pci, 0); | 2599 | chip->io_port = pci_resource_start(pci, 0); |
2600 | if (request_irq(pci->irq, snd_es1968_interrupt, SA_INTERRUPT|SA_SHIRQ, | 2600 | if (request_irq(pci->irq, snd_es1968_interrupt, IRQF_DISABLED|IRQF_SHARED, |
2601 | "ESS Maestro", (void*)chip)) { | 2601 | "ESS Maestro", (void*)chip)) { |
2602 | snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); | 2602 | snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); |
2603 | snd_es1968_free(chip); | 2603 | snd_es1968_free(chip); |
diff --git a/sound/pci/fm801.c b/sound/pci/fm801.c index 0afa573dd244..3aed27eace2c 100644 --- a/sound/pci/fm801.c +++ b/sound/pci/fm801.c | |||
@@ -1371,7 +1371,7 @@ static int __devinit snd_fm801_create(struct snd_card *card, | |||
1371 | return err; | 1371 | return err; |
1372 | } | 1372 | } |
1373 | chip->port = pci_resource_start(pci, 0); | 1373 | chip->port = pci_resource_start(pci, 0); |
1374 | if (request_irq(pci->irq, snd_fm801_interrupt, SA_INTERRUPT|SA_SHIRQ, | 1374 | if (request_irq(pci->irq, snd_fm801_interrupt, IRQF_DISABLED|IRQF_SHARED, |
1375 | "FM801", chip)) { | 1375 | "FM801", chip)) { |
1376 | snd_printk(KERN_ERR "unable to grab IRQ %d\n", chip->irq); | 1376 | snd_printk(KERN_ERR "unable to grab IRQ %d\n", chip->irq); |
1377 | snd_fm801_free(chip); | 1377 | snd_fm801_free(chip); |
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 4070b5cd9b6b..025af7c0c6e1 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c | |||
@@ -1486,7 +1486,7 @@ static int __devinit azx_create(struct snd_card *card, struct pci_dev *pci, | |||
1486 | goto errout; | 1486 | goto errout; |
1487 | } | 1487 | } |
1488 | 1488 | ||
1489 | if (request_irq(pci->irq, azx_interrupt, SA_INTERRUPT|SA_SHIRQ, | 1489 | if (request_irq(pci->irq, azx_interrupt, IRQF_DISABLED|IRQF_SHARED, |
1490 | "HDA Intel", (void*)chip)) { | 1490 | "HDA Intel", (void*)chip)) { |
1491 | snd_printk(KERN_ERR SFX "unable to grab IRQ %d\n", pci->irq); | 1491 | snd_printk(KERN_ERR SFX "unable to grab IRQ %d\n", pci->irq); |
1492 | err = -EBUSY; | 1492 | err = -EBUSY; |
diff --git a/sound/pci/ice1712/ice1712.c b/sound/pci/ice1712/ice1712.c index 845907159b74..89a06dec4365 100644 --- a/sound/pci/ice1712/ice1712.c +++ b/sound/pci/ice1712/ice1712.c | |||
@@ -2606,7 +2606,7 @@ static int __devinit snd_ice1712_create(struct snd_card *card, | |||
2606 | ice->dmapath_port = pci_resource_start(pci, 2); | 2606 | ice->dmapath_port = pci_resource_start(pci, 2); |
2607 | ice->profi_port = pci_resource_start(pci, 3); | 2607 | ice->profi_port = pci_resource_start(pci, 3); |
2608 | 2608 | ||
2609 | if (request_irq(pci->irq, snd_ice1712_interrupt, SA_INTERRUPT|SA_SHIRQ, | 2609 | if (request_irq(pci->irq, snd_ice1712_interrupt, IRQF_DISABLED|IRQF_SHARED, |
2610 | "ICE1712", ice)) { | 2610 | "ICE1712", ice)) { |
2611 | snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); | 2611 | snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); |
2612 | snd_ice1712_free(ice); | 2612 | snd_ice1712_free(ice); |
diff --git a/sound/pci/ice1712/ice1724.c b/sound/pci/ice1712/ice1724.c index 34a58c629f47..ad69ed7c1b81 100644 --- a/sound/pci/ice1712/ice1724.c +++ b/sound/pci/ice1712/ice1724.c | |||
@@ -2253,7 +2253,7 @@ static int __devinit snd_vt1724_create(struct snd_card *card, | |||
2253 | ice->profi_port = pci_resource_start(pci, 1); | 2253 | ice->profi_port = pci_resource_start(pci, 1); |
2254 | 2254 | ||
2255 | if (request_irq(pci->irq, snd_vt1724_interrupt, | 2255 | if (request_irq(pci->irq, snd_vt1724_interrupt, |
2256 | SA_INTERRUPT|SA_SHIRQ, "ICE1724", ice)) { | 2256 | IRQF_DISABLED|IRQF_SHARED, "ICE1724", ice)) { |
2257 | snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); | 2257 | snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); |
2258 | snd_vt1724_free(ice); | 2258 | snd_vt1724_free(ice); |
2259 | return -EIO; | 2259 | return -EIO; |
diff --git a/sound/pci/intel8x0.c b/sound/pci/intel8x0.c index edc14475ef82..5634bc349257 100644 --- a/sound/pci/intel8x0.c +++ b/sound/pci/intel8x0.c | |||
@@ -2475,7 +2475,7 @@ static int intel8x0_resume(struct pci_dev *pci) | |||
2475 | pci_restore_state(pci); | 2475 | pci_restore_state(pci); |
2476 | pci_enable_device(pci); | 2476 | pci_enable_device(pci); |
2477 | pci_set_master(pci); | 2477 | pci_set_master(pci); |
2478 | request_irq(pci->irq, snd_intel8x0_interrupt, SA_INTERRUPT|SA_SHIRQ, | 2478 | request_irq(pci->irq, snd_intel8x0_interrupt, IRQF_DISABLED|IRQF_SHARED, |
2479 | card->shortname, chip); | 2479 | card->shortname, chip); |
2480 | chip->irq = pci->irq; | 2480 | chip->irq = pci->irq; |
2481 | synchronize_irq(chip->irq); | 2481 | synchronize_irq(chip->irq); |
@@ -2848,7 +2848,7 @@ static int __devinit snd_intel8x0_create(struct snd_card *card, | |||
2848 | 2848 | ||
2849 | /* request irq after initializaing int_sta_mask, etc */ | 2849 | /* request irq after initializaing int_sta_mask, etc */ |
2850 | if (request_irq(pci->irq, snd_intel8x0_interrupt, | 2850 | if (request_irq(pci->irq, snd_intel8x0_interrupt, |
2851 | SA_INTERRUPT|SA_SHIRQ, card->shortname, chip)) { | 2851 | IRQF_DISABLED|IRQF_SHARED, card->shortname, chip)) { |
2852 | snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); | 2852 | snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); |
2853 | snd_intel8x0_free(chip); | 2853 | snd_intel8x0_free(chip); |
2854 | return -EBUSY; | 2854 | return -EBUSY; |
diff --git a/sound/pci/intel8x0m.c b/sound/pci/intel8x0m.c index 24703d75b65a..f28e273ae276 100644 --- a/sound/pci/intel8x0m.c +++ b/sound/pci/intel8x0m.c | |||
@@ -1185,7 +1185,7 @@ static int __devinit snd_intel8x0m_create(struct snd_card *card, | |||
1185 | } | 1185 | } |
1186 | 1186 | ||
1187 | port_inited: | 1187 | port_inited: |
1188 | if (request_irq(pci->irq, snd_intel8x0_interrupt, SA_INTERRUPT|SA_SHIRQ, | 1188 | if (request_irq(pci->irq, snd_intel8x0_interrupt, IRQF_DISABLED|IRQF_SHARED, |
1189 | card->shortname, chip)) { | 1189 | card->shortname, chip)) { |
1190 | snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); | 1190 | snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); |
1191 | snd_intel8x0_free(chip); | 1191 | snd_intel8x0_free(chip); |
diff --git a/sound/pci/korg1212/korg1212.c b/sound/pci/korg1212/korg1212.c index 6e97932de34f..2b4ce002794a 100644 --- a/sound/pci/korg1212/korg1212.c +++ b/sound/pci/korg1212/korg1212.c | |||
@@ -2237,7 +2237,7 @@ static int __devinit snd_korg1212_create(struct snd_card *card, struct pci_dev * | |||
2237 | } | 2237 | } |
2238 | 2238 | ||
2239 | err = request_irq(pci->irq, snd_korg1212_interrupt, | 2239 | err = request_irq(pci->irq, snd_korg1212_interrupt, |
2240 | SA_INTERRUPT|SA_SHIRQ, | 2240 | IRQF_DISABLED|IRQF_SHARED, |
2241 | "korg1212", korg1212); | 2241 | "korg1212", korg1212); |
2242 | 2242 | ||
2243 | if (err) { | 2243 | if (err) { |
diff --git a/sound/pci/maestro3.c b/sound/pci/maestro3.c index 1c344fbd964d..828eab59253a 100644 --- a/sound/pci/maestro3.c +++ b/sound/pci/maestro3.c | |||
@@ -2760,7 +2760,7 @@ snd_m3_create(struct snd_card *card, struct pci_dev *pci, | |||
2760 | 2760 | ||
2761 | tasklet_init(&chip->hwvol_tq, snd_m3_update_hw_volume, (unsigned long)chip); | 2761 | tasklet_init(&chip->hwvol_tq, snd_m3_update_hw_volume, (unsigned long)chip); |
2762 | 2762 | ||
2763 | if (request_irq(pci->irq, snd_m3_interrupt, SA_INTERRUPT|SA_SHIRQ, | 2763 | if (request_irq(pci->irq, snd_m3_interrupt, IRQF_DISABLED|IRQF_SHARED, |
2764 | card->driver, chip)) { | 2764 | card->driver, chip)) { |
2765 | snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); | 2765 | snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); |
2766 | snd_m3_free(chip); | 2766 | snd_m3_free(chip); |
diff --git a/sound/pci/mixart/mixart.c b/sound/pci/mixart/mixart.c index 366c4a7e65c6..a4aaa7b9a231 100644 --- a/sound/pci/mixart/mixart.c +++ b/sound/pci/mixart/mixart.c | |||
@@ -1319,7 +1319,7 @@ static int __devinit snd_mixart_probe(struct pci_dev *pci, | |||
1319 | pci_resource_len(pci, i)); | 1319 | pci_resource_len(pci, i)); |
1320 | } | 1320 | } |
1321 | 1321 | ||
1322 | if (request_irq(pci->irq, snd_mixart_interrupt, SA_INTERRUPT|SA_SHIRQ, CARD_NAME, (void *)mgr)) { | 1322 | if (request_irq(pci->irq, snd_mixart_interrupt, IRQF_DISABLED|IRQF_SHARED, CARD_NAME, (void *)mgr)) { |
1323 | snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); | 1323 | snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); |
1324 | snd_mixart_free(mgr); | 1324 | snd_mixart_free(mgr); |
1325 | return -EBUSY; | 1325 | return -EBUSY; |
diff --git a/sound/pci/nm256/nm256.c b/sound/pci/nm256/nm256.c index b92d6600deb9..56d7282e6651 100644 --- a/sound/pci/nm256/nm256.c +++ b/sound/pci/nm256/nm256.c | |||
@@ -465,7 +465,7 @@ static int snd_nm256_acquire_irq(struct nm256 *chip) | |||
465 | { | 465 | { |
466 | mutex_lock(&chip->irq_mutex); | 466 | mutex_lock(&chip->irq_mutex); |
467 | if (chip->irq < 0) { | 467 | if (chip->irq < 0) { |
468 | if (request_irq(chip->pci->irq, chip->interrupt, SA_INTERRUPT|SA_SHIRQ, | 468 | if (request_irq(chip->pci->irq, chip->interrupt, IRQF_DISABLED|IRQF_SHARED, |
469 | chip->card->driver, chip)) { | 469 | chip->card->driver, chip)) { |
470 | snd_printk(KERN_ERR "unable to grab IRQ %d\n", chip->pci->irq); | 470 | snd_printk(KERN_ERR "unable to grab IRQ %d\n", chip->pci->irq); |
471 | mutex_unlock(&chip->irq_mutex); | 471 | mutex_unlock(&chip->irq_mutex); |
diff --git a/sound/pci/pcxhr/pcxhr.c b/sound/pci/pcxhr/pcxhr.c index 8198884b51ee..ae980e11827f 100644 --- a/sound/pci/pcxhr/pcxhr.c +++ b/sound/pci/pcxhr/pcxhr.c | |||
@@ -1250,7 +1250,7 @@ static int __devinit pcxhr_probe(struct pci_dev *pci, const struct pci_device_id | |||
1250 | mgr->pci = pci; | 1250 | mgr->pci = pci; |
1251 | mgr->irq = -1; | 1251 | mgr->irq = -1; |
1252 | 1252 | ||
1253 | if (request_irq(pci->irq, pcxhr_interrupt, SA_INTERRUPT|SA_SHIRQ, | 1253 | if (request_irq(pci->irq, pcxhr_interrupt, IRQF_DISABLED|IRQF_SHARED, |
1254 | card_name, mgr)) { | 1254 | card_name, mgr)) { |
1255 | snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); | 1255 | snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); |
1256 | pcxhr_free(mgr); | 1256 | pcxhr_free(mgr); |
diff --git a/sound/pci/riptide/riptide.c b/sound/pci/riptide/riptide.c index 5618ec9740bd..5501a08ca23a 100644 --- a/sound/pci/riptide/riptide.c +++ b/sound/pci/riptide/riptide.c | |||
@@ -1892,7 +1892,7 @@ snd_riptide_create(struct snd_card *card, struct pci_dev *pci, | |||
1892 | UNSET_AIE(hwport); | 1892 | UNSET_AIE(hwport); |
1893 | 1893 | ||
1894 | if (request_irq | 1894 | if (request_irq |
1895 | (pci->irq, snd_riptide_interrupt, SA_INTERRUPT | SA_SHIRQ, | 1895 | (pci->irq, snd_riptide_interrupt, IRQF_DISABLED | IRQF_SHARED, |
1896 | "RIPTIDE", chip)) { | 1896 | "RIPTIDE", chip)) { |
1897 | snd_printk(KERN_ERR "Riptide: unable to grab IRQ %d\n", | 1897 | snd_printk(KERN_ERR "Riptide: unable to grab IRQ %d\n", |
1898 | pci->irq); | 1898 | pci->irq); |
diff --git a/sound/pci/rme32.c b/sound/pci/rme32.c index 2cb9fe98db2f..2e24b68d07aa 100644 --- a/sound/pci/rme32.c +++ b/sound/pci/rme32.c | |||
@@ -1374,7 +1374,7 @@ static int __devinit snd_rme32_create(struct rme32 * rme32) | |||
1374 | return -ENOMEM; | 1374 | return -ENOMEM; |
1375 | } | 1375 | } |
1376 | 1376 | ||
1377 | if (request_irq(pci->irq, snd_rme32_interrupt, SA_INTERRUPT | SA_SHIRQ, "RME32", (void *) rme32)) { | 1377 | if (request_irq(pci->irq, snd_rme32_interrupt, IRQF_DISABLED | IRQF_SHARED, "RME32", (void *) rme32)) { |
1378 | snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); | 1378 | snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); |
1379 | return -EBUSY; | 1379 | return -EBUSY; |
1380 | } | 1380 | } |
diff --git a/sound/pci/rme96.c b/sound/pci/rme96.c index 991cb18c14f3..fde0f3e20530 100644 --- a/sound/pci/rme96.c +++ b/sound/pci/rme96.c | |||
@@ -1588,7 +1588,7 @@ snd_rme96_create(struct rme96 *rme96) | |||
1588 | return -ENOMEM; | 1588 | return -ENOMEM; |
1589 | } | 1589 | } |
1590 | 1590 | ||
1591 | if (request_irq(pci->irq, snd_rme96_interrupt, SA_INTERRUPT|SA_SHIRQ, "RME96", (void *)rme96)) { | 1591 | if (request_irq(pci->irq, snd_rme96_interrupt, IRQF_DISABLED|IRQF_SHARED, "RME96", (void *)rme96)) { |
1592 | snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); | 1592 | snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); |
1593 | return -EBUSY; | 1593 | return -EBUSY; |
1594 | } | 1594 | } |
diff --git a/sound/pci/rme9652/hdsp.c b/sound/pci/rme9652/hdsp.c index eaf3c22449ad..99cf86244acb 100644 --- a/sound/pci/rme9652/hdsp.c +++ b/sound/pci/rme9652/hdsp.c | |||
@@ -4912,7 +4912,7 @@ static int __devinit snd_hdsp_create(struct snd_card *card, | |||
4912 | return -EBUSY; | 4912 | return -EBUSY; |
4913 | } | 4913 | } |
4914 | 4914 | ||
4915 | if (request_irq(pci->irq, snd_hdsp_interrupt, SA_INTERRUPT|SA_SHIRQ, "hdsp", (void *)hdsp)) { | 4915 | if (request_irq(pci->irq, snd_hdsp_interrupt, IRQF_DISABLED|IRQF_SHARED, "hdsp", (void *)hdsp)) { |
4916 | snd_printk(KERN_ERR "Hammerfall-DSP: unable to use IRQ %d\n", pci->irq); | 4916 | snd_printk(KERN_ERR "Hammerfall-DSP: unable to use IRQ %d\n", pci->irq); |
4917 | return -EBUSY; | 4917 | return -EBUSY; |
4918 | } | 4918 | } |
diff --git a/sound/pci/rme9652/hdspm.c b/sound/pci/rme9652/hdspm.c index bba1615504d3..7d03ae066d53 100644 --- a/sound/pci/rme9652/hdspm.c +++ b/sound/pci/rme9652/hdspm.c | |||
@@ -3497,7 +3497,7 @@ static int __devinit snd_hdspm_create(struct snd_card *card, struct hdspm * hdsp | |||
3497 | hdspm->port + io_extent - 1); | 3497 | hdspm->port + io_extent - 1); |
3498 | 3498 | ||
3499 | if (request_irq(pci->irq, snd_hdspm_interrupt, | 3499 | if (request_irq(pci->irq, snd_hdspm_interrupt, |
3500 | SA_INTERRUPT | SA_SHIRQ, "hdspm", | 3500 | IRQF_DISABLED | IRQF_SHARED, "hdspm", |
3501 | (void *) hdspm)) { | 3501 | (void *) hdspm)) { |
3502 | snd_printk(KERN_ERR "HDSPM: unable to use IRQ %d\n", pci->irq); | 3502 | snd_printk(KERN_ERR "HDSPM: unable to use IRQ %d\n", pci->irq); |
3503 | return -EBUSY; | 3503 | return -EBUSY; |
diff --git a/sound/pci/rme9652/rme9652.c b/sound/pci/rme9652/rme9652.c index 3b945e8c1b15..9534e1834138 100644 --- a/sound/pci/rme9652/rme9652.c +++ b/sound/pci/rme9652/rme9652.c | |||
@@ -2500,7 +2500,7 @@ static int __devinit snd_rme9652_create(struct snd_card *card, | |||
2500 | return -EBUSY; | 2500 | return -EBUSY; |
2501 | } | 2501 | } |
2502 | 2502 | ||
2503 | if (request_irq(pci->irq, snd_rme9652_interrupt, SA_INTERRUPT|SA_SHIRQ, "rme9652", (void *)rme9652)) { | 2503 | if (request_irq(pci->irq, snd_rme9652_interrupt, IRQF_DISABLED|IRQF_SHARED, "rme9652", (void *)rme9652)) { |
2504 | snd_printk(KERN_ERR "unable to request IRQ %d\n", pci->irq); | 2504 | snd_printk(KERN_ERR "unable to request IRQ %d\n", pci->irq); |
2505 | return -EBUSY; | 2505 | return -EBUSY; |
2506 | } | 2506 | } |
diff --git a/sound/pci/sonicvibes.c b/sound/pci/sonicvibes.c index e5511606af04..c4303418668b 100644 --- a/sound/pci/sonicvibes.c +++ b/sound/pci/sonicvibes.c | |||
@@ -1257,7 +1257,7 @@ static int __devinit snd_sonicvibes_create(struct snd_card *card, | |||
1257 | sonic->midi_port = pci_resource_start(pci, 3); | 1257 | sonic->midi_port = pci_resource_start(pci, 3); |
1258 | sonic->game_port = pci_resource_start(pci, 4); | 1258 | sonic->game_port = pci_resource_start(pci, 4); |
1259 | 1259 | ||
1260 | if (request_irq(pci->irq, snd_sonicvibes_interrupt, SA_INTERRUPT|SA_SHIRQ, "S3 SonicVibes", (void *)sonic)) { | 1260 | if (request_irq(pci->irq, snd_sonicvibes_interrupt, IRQF_DISABLED|IRQF_SHARED, "S3 SonicVibes", (void *)sonic)) { |
1261 | snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); | 1261 | snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); |
1262 | snd_sonicvibes_free(sonic); | 1262 | snd_sonicvibes_free(sonic); |
1263 | return -EBUSY; | 1263 | return -EBUSY; |
diff --git a/sound/pci/trident/trident_main.c b/sound/pci/trident/trident_main.c index d99ed7237750..4930cc6b054d 100644 --- a/sound/pci/trident/trident_main.c +++ b/sound/pci/trident/trident_main.c | |||
@@ -3599,7 +3599,7 @@ int __devinit snd_trident_create(struct snd_card *card, | |||
3599 | } | 3599 | } |
3600 | trident->port = pci_resource_start(pci, 0); | 3600 | trident->port = pci_resource_start(pci, 0); |
3601 | 3601 | ||
3602 | if (request_irq(pci->irq, snd_trident_interrupt, SA_INTERRUPT|SA_SHIRQ, | 3602 | if (request_irq(pci->irq, snd_trident_interrupt, IRQF_DISABLED|IRQF_SHARED, |
3603 | "Trident Audio", trident)) { | 3603 | "Trident Audio", trident)) { |
3604 | snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); | 3604 | snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); |
3605 | snd_trident_free(trident); | 3605 | snd_trident_free(trident); |
diff --git a/sound/pci/via82xx.c b/sound/pci/via82xx.c index 2527bbd958c5..37bd5eb7a380 100644 --- a/sound/pci/via82xx.c +++ b/sound/pci/via82xx.c | |||
@@ -2281,7 +2281,7 @@ static int __devinit snd_via82xx_create(struct snd_card *card, | |||
2281 | if (request_irq(pci->irq, | 2281 | if (request_irq(pci->irq, |
2282 | chip_type == TYPE_VIA8233 ? | 2282 | chip_type == TYPE_VIA8233 ? |
2283 | snd_via8233_interrupt : snd_via686_interrupt, | 2283 | snd_via8233_interrupt : snd_via686_interrupt, |
2284 | SA_INTERRUPT|SA_SHIRQ, | 2284 | IRQF_DISABLED|IRQF_SHARED, |
2285 | card->driver, chip)) { | 2285 | card->driver, chip)) { |
2286 | snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); | 2286 | snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); |
2287 | snd_via82xx_free(chip); | 2287 | snd_via82xx_free(chip); |
diff --git a/sound/pci/via82xx_modem.c b/sound/pci/via82xx_modem.c index 577a2b03759f..c1ede6c2a6d4 100644 --- a/sound/pci/via82xx_modem.c +++ b/sound/pci/via82xx_modem.c | |||
@@ -1118,7 +1118,7 @@ static int __devinit snd_via82xx_create(struct snd_card *card, | |||
1118 | return err; | 1118 | return err; |
1119 | } | 1119 | } |
1120 | chip->port = pci_resource_start(pci, 0); | 1120 | chip->port = pci_resource_start(pci, 0); |
1121 | if (request_irq(pci->irq, snd_via82xx_interrupt, SA_INTERRUPT|SA_SHIRQ, | 1121 | if (request_irq(pci->irq, snd_via82xx_interrupt, IRQF_DISABLED|IRQF_SHARED, |
1122 | card->driver, chip)) { | 1122 | card->driver, chip)) { |
1123 | snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); | 1123 | snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); |
1124 | snd_via82xx_free(chip); | 1124 | snd_via82xx_free(chip); |
diff --git a/sound/pci/vx222/vx222.c b/sound/pci/vx222/vx222.c index 0f1ebb010a5e..7deda25f7adc 100644 --- a/sound/pci/vx222/vx222.c +++ b/sound/pci/vx222/vx222.c | |||
@@ -162,7 +162,7 @@ static int __devinit snd_vx222_create(struct snd_card *card, struct pci_dev *pci | |||
162 | for (i = 0; i < 2; i++) | 162 | for (i = 0; i < 2; i++) |
163 | vx->port[i] = pci_resource_start(pci, i + 1); | 163 | vx->port[i] = pci_resource_start(pci, i + 1); |
164 | 164 | ||
165 | if (request_irq(pci->irq, snd_vx_irq_handler, SA_INTERRUPT|SA_SHIRQ, | 165 | if (request_irq(pci->irq, snd_vx_irq_handler, IRQF_DISABLED|IRQF_SHARED, |
166 | CARD_NAME, (void *) chip)) { | 166 | CARD_NAME, (void *) chip)) { |
167 | snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); | 167 | snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); |
168 | snd_vx222_free(chip); | 168 | snd_vx222_free(chip); |
diff --git a/sound/pci/ymfpci/ymfpci_main.c b/sound/pci/ymfpci/ymfpci_main.c index f894752523bb..a55b5fd7da64 100644 --- a/sound/pci/ymfpci/ymfpci_main.c +++ b/sound/pci/ymfpci/ymfpci_main.c | |||
@@ -2288,7 +2288,7 @@ int __devinit snd_ymfpci_create(struct snd_card *card, | |||
2288 | snd_ymfpci_free(chip); | 2288 | snd_ymfpci_free(chip); |
2289 | return -EBUSY; | 2289 | return -EBUSY; |
2290 | } | 2290 | } |
2291 | if (request_irq(pci->irq, snd_ymfpci_interrupt, SA_INTERRUPT|SA_SHIRQ, "YMFPCI", (void *) chip)) { | 2291 | if (request_irq(pci->irq, snd_ymfpci_interrupt, IRQF_DISABLED|IRQF_SHARED, "YMFPCI", (void *) chip)) { |
2292 | snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); | 2292 | snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); |
2293 | snd_ymfpci_free(chip); | 2293 | snd_ymfpci_free(chip); |
2294 | return -EBUSY; | 2294 | return -EBUSY; |
diff --git a/sound/ppc/pmac.c b/sound/ppc/pmac.c index be98f6377339..90db9a1d1e0a 100644 --- a/sound/ppc/pmac.c +++ b/sound/ppc/pmac.c | |||
@@ -1170,7 +1170,7 @@ int __init snd_pmac_new(struct snd_card *card, struct snd_pmac **chip_return) | |||
1170 | chip->rsrc[i].start + 1, | 1170 | chip->rsrc[i].start + 1, |
1171 | rnames[i]) == NULL) { | 1171 | rnames[i]) == NULL) { |
1172 | printk(KERN_ERR "snd: can't request rsrc " | 1172 | printk(KERN_ERR "snd: can't request rsrc " |
1173 | " %d (%s: 0x%016lx:%016lx)\n", | 1173 | " %d (%s: 0x%016llx:%016llx)\n", |
1174 | i, rnames[i], | 1174 | i, rnames[i], |
1175 | (unsigned long long)chip->rsrc[i].start, | 1175 | (unsigned long long)chip->rsrc[i].start, |
1176 | (unsigned long long)chip->rsrc[i].end); | 1176 | (unsigned long long)chip->rsrc[i].end); |
diff --git a/sound/sparc/amd7930.c b/sound/sparc/amd7930.c index ba1b2a3443d3..db3e22efd02e 100644 --- a/sound/sparc/amd7930.c +++ b/sound/sparc/amd7930.c | |||
@@ -973,7 +973,7 @@ static int __init snd_amd7930_create(struct snd_card *card, | |||
973 | amd7930_idle(amd); | 973 | amd7930_idle(amd); |
974 | 974 | ||
975 | if (request_irq(irq, snd_amd7930_interrupt, | 975 | if (request_irq(irq, snd_amd7930_interrupt, |
976 | SA_INTERRUPT | SA_SHIRQ, "amd7930", amd)) { | 976 | IRQF_DISABLED | IRQF_SHARED, "amd7930", amd)) { |
977 | snd_printk("amd7930-%d: Unable to grab IRQ %d\n", | 977 | snd_printk("amd7930-%d: Unable to grab IRQ %d\n", |
978 | dev, irq); | 978 | dev, irq); |
979 | snd_amd7930_free(amd); | 979 | snd_amd7930_free(amd); |
diff --git a/sound/sparc/cs4231.c b/sound/sparc/cs4231.c index 44ad9616bf63..5018fcf41df5 100644 --- a/sound/sparc/cs4231.c +++ b/sound/sparc/cs4231.c | |||
@@ -2001,7 +2001,7 @@ static int __init snd_cs4231_sbus_create(struct snd_card *card, | |||
2001 | chip->c_dma.preallocate = sbus_dma_preallocate; | 2001 | chip->c_dma.preallocate = sbus_dma_preallocate; |
2002 | 2002 | ||
2003 | if (request_irq(sdev->irqs[0], snd_cs4231_sbus_interrupt, | 2003 | if (request_irq(sdev->irqs[0], snd_cs4231_sbus_interrupt, |
2004 | SA_SHIRQ, "cs4231", chip)) { | 2004 | IRQF_SHARED, "cs4231", chip)) { |
2005 | snd_printdd("cs4231-%d: Unable to grab SBUS IRQ %d\n", | 2005 | snd_printdd("cs4231-%d: Unable to grab SBUS IRQ %d\n", |
2006 | dev, sdev->irqs[0]); | 2006 | dev, sdev->irqs[0]); |
2007 | snd_cs4231_sbus_free(chip); | 2007 | snd_cs4231_sbus_free(chip); |
diff --git a/sound/sparc/dbri.c b/sound/sparc/dbri.c index 63bef0aadf1e..59a02a0d9afc 100644 --- a/sound/sparc/dbri.c +++ b/sound/sparc/dbri.c | |||
@@ -2569,7 +2569,7 @@ static int __init snd_dbri_create(struct snd_card *card, | |||
2569 | return -EIO; | 2569 | return -EIO; |
2570 | } | 2570 | } |
2571 | 2571 | ||
2572 | err = request_irq(dbri->irq, snd_dbri_interrupt, SA_SHIRQ, | 2572 | err = request_irq(dbri->irq, snd_dbri_interrupt, IRQF_SHARED, |
2573 | "DBRI audio", dbri); | 2573 | "DBRI audio", dbri); |
2574 | if (err) { | 2574 | if (err) { |
2575 | printk(KERN_ERR "DBRI: Can't get irq %d\n", dbri->irq); | 2575 | printk(KERN_ERR "DBRI: Can't get irq %d\n", dbri->irq); |