diff options
166 files changed, 1010 insertions, 562 deletions
diff --git a/.gitignore b/.gitignore index e1d5c17c12c2..9eb4b7711499 100644 --- a/.gitignore +++ b/.gitignore | |||
@@ -20,6 +20,7 @@ | |||
20 | # Top-level generic files | 20 | # Top-level generic files |
21 | # | 21 | # |
22 | tags | 22 | tags |
23 | TAGS | ||
23 | vmlinux* | 24 | vmlinux* |
24 | System.map | 25 | System.map |
25 | Module.symvers | 26 | Module.symvers |
diff --git a/Documentation/filesystems/udf.txt b/Documentation/filesystems/udf.txt index 511b4230c053..fde829a756e6 100644 --- a/Documentation/filesystems/udf.txt +++ b/Documentation/filesystems/udf.txt | |||
@@ -7,8 +7,17 @@ If you encounter problems with reading UDF discs using this driver, | |||
7 | please report them to linux_udf@hpesjro.fc.hp.com, which is the | 7 | please report them to linux_udf@hpesjro.fc.hp.com, which is the |
8 | developer's list. | 8 | developer's list. |
9 | 9 | ||
10 | Write support requires a block driver which supports writing. The current | 10 | Write support requires a block driver which supports writing. Currently |
11 | scsi and ide cdrom drivers do not support writing. | 11 | dvd+rw drives and media support true random sector writes, and so a udf |
12 | filesystem on such devices can be directly mounted read/write. CD-RW | ||
13 | media however, does not support this. Instead the media can be formatted | ||
14 | for packet mode using the utility cdrwtool, then the pktcdvd driver can | ||
15 | be bound to the underlying cd device to provide the required buffering | ||
16 | and read-modify-write cycles to allow the filesystem random sector writes | ||
17 | while providing the hardware with only full packet writes. While not | ||
18 | required for dvd+rw media, use of the pktcdvd driver often enhances | ||
19 | performance due to very poor read-modify-write support supplied internally | ||
20 | by drive firmware. | ||
12 | 21 | ||
13 | ------------------------------------------------------------------------------- | 22 | ------------------------------------------------------------------------------- |
14 | The following mount options are supported: | 23 | The following mount options are supported: |
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index dd00fd556a60..67473849f20e 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt | |||
@@ -164,6 +164,10 @@ and is between 256 and 4096 characters. It is defined in the file | |||
164 | acpi_skip_timer_override [HW,ACPI] | 164 | acpi_skip_timer_override [HW,ACPI] |
165 | Recognize and ignore IRQ0/pin2 Interrupt Override. | 165 | Recognize and ignore IRQ0/pin2 Interrupt Override. |
166 | For broken nForce2 BIOS resulting in XT-PIC timer. | 166 | For broken nForce2 BIOS resulting in XT-PIC timer. |
167 | acpi_use_timer_override [HW,ACPI} | ||
168 | Use timer override. For some broken Nvidia NF5 boards | ||
169 | that require a timer override, but don't have | ||
170 | HPET | ||
167 | 171 | ||
168 | acpi_dbg_layer= [HW,ACPI] | 172 | acpi_dbg_layer= [HW,ACPI] |
169 | Format: <int> | 173 | Format: <int> |
diff --git a/Documentation/kprobes.txt b/Documentation/kprobes.txt index ba26201d5023..d71fafffce90 100644 --- a/Documentation/kprobes.txt +++ b/Documentation/kprobes.txt | |||
@@ -442,9 +442,10 @@ static int __init kprobe_init(void) | |||
442 | kp.fault_handler = handler_fault; | 442 | kp.fault_handler = handler_fault; |
443 | kp.symbol_name = "do_fork"; | 443 | kp.symbol_name = "do_fork"; |
444 | 444 | ||
445 | if ((ret = register_kprobe(&kp) < 0)) { | 445 | ret = register_kprobe(&kp); |
446 | if (ret < 0) { | ||
446 | printk("register_kprobe failed, returned %d\n", ret); | 447 | printk("register_kprobe failed, returned %d\n", ret); |
447 | return -1; | 448 | return ret; |
448 | } | 449 | } |
449 | printk("kprobe registered\n"); | 450 | printk("kprobe registered\n"); |
450 | return 0; | 451 | return 0; |
diff --git a/Documentation/sound/alsa/ALSA-Configuration.txt b/Documentation/sound/alsa/ALSA-Configuration.txt index 138673a907f5..3472d9c4ef1b 100644 --- a/Documentation/sound/alsa/ALSA-Configuration.txt +++ b/Documentation/sound/alsa/ALSA-Configuration.txt | |||
@@ -753,7 +753,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. | |||
753 | position_fix - Fix DMA pointer (0 = auto, 1 = none, 2 = POSBUF, 3 = FIFO size) | 753 | position_fix - Fix DMA pointer (0 = auto, 1 = none, 2 = POSBUF, 3 = FIFO size) |
754 | single_cmd - Use single immediate commands to communicate with | 754 | single_cmd - Use single immediate commands to communicate with |
755 | codecs (for debugging only) | 755 | codecs (for debugging only) |
756 | disable_msi - Disable Message Signaled Interrupt (MSI) | 756 | enable_msi - Enable Message Signaled Interrupt (MSI) (default = off) |
757 | 757 | ||
758 | This module supports one card and autoprobe. | 758 | This module supports one card and autoprobe. |
759 | 759 | ||
diff --git a/MAINTAINERS b/MAINTAINERS index 8732daeae303..a5508f930ed9 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
@@ -3072,6 +3072,13 @@ L: video4linux-list@redhat.com | |||
3072 | W: http://www.linux-projects.org | 3072 | W: http://www.linux-projects.org |
3073 | S: Maintained | 3073 | S: Maintained |
3074 | 3074 | ||
3075 | USB GADGET/PERIPHERAL SUBSYSTEM | ||
3076 | P: David Brownell | ||
3077 | M: dbrownell@users.sourceforge.net | ||
3078 | L: linux-usb-devel@lists.sourceforge.net | ||
3079 | W: http://www.linux-usb.org/gadget | ||
3080 | S: Maintained | ||
3081 | |||
3075 | USB HID/HIDBP DRIVERS | 3082 | USB HID/HIDBP DRIVERS |
3076 | P: Vojtech Pavlik | 3083 | P: Vojtech Pavlik |
3077 | M: vojtech@suse.cz | 3084 | M: vojtech@suse.cz |
@@ -3255,10 +3262,11 @@ L: linux-usb-users@lists.sourceforge.net | |||
3255 | L: linux-usb-devel@lists.sourceforge.net | 3262 | L: linux-usb-devel@lists.sourceforge.net |
3256 | S: Maintained | 3263 | S: Maintained |
3257 | 3264 | ||
3258 | USB "USBNET" DRIVER | 3265 | USB "USBNET" DRIVER FRAMEWORK |
3259 | P: David Brownell | 3266 | P: David Brownell |
3260 | M: dbrownell@users.sourceforge.net | 3267 | M: dbrownell@users.sourceforge.net |
3261 | L: linux-usb-devel@lists.sourceforge.net | 3268 | L: linux-usb-devel@lists.sourceforge.net |
3269 | W: http://www.linux-usb.org/usbnet | ||
3262 | S: Maintained | 3270 | S: Maintained |
3263 | 3271 | ||
3264 | USB W996[87]CF DRIVER | 3272 | USB W996[87]CF DRIVER |
@@ -1,7 +1,7 @@ | |||
1 | VERSION = 2 | 1 | VERSION = 2 |
2 | PATCHLEVEL = 6 | 2 | PATCHLEVEL = 6 |
3 | SUBLEVEL = 19 | 3 | SUBLEVEL = 19 |
4 | EXTRAVERSION =-rc5 | 4 | EXTRAVERSION =-rc6 |
5 | NAME=Avast! A bilge rat! | 5 | NAME=Avast! A bilge rat! |
6 | 6 | ||
7 | # *DOCUMENTATION* | 7 | # *DOCUMENTATION* |
diff --git a/arch/i386/kernel/acpi/boot.c b/arch/i386/kernel/acpi/boot.c index 22e4c466e5a3..d12fb97a5337 100644 --- a/arch/i386/kernel/acpi/boot.c +++ b/arch/i386/kernel/acpi/boot.c | |||
@@ -82,6 +82,7 @@ EXPORT_SYMBOL(acpi_strict); | |||
82 | acpi_interrupt_flags acpi_sci_flags __initdata; | 82 | acpi_interrupt_flags acpi_sci_flags __initdata; |
83 | int acpi_sci_override_gsi __initdata; | 83 | int acpi_sci_override_gsi __initdata; |
84 | int acpi_skip_timer_override __initdata; | 84 | int acpi_skip_timer_override __initdata; |
85 | int acpi_use_timer_override __initdata; | ||
85 | 86 | ||
86 | #ifdef CONFIG_X86_LOCAL_APIC | 87 | #ifdef CONFIG_X86_LOCAL_APIC |
87 | static u64 acpi_lapic_addr __initdata = APIC_DEFAULT_PHYS_BASE; | 88 | static u64 acpi_lapic_addr __initdata = APIC_DEFAULT_PHYS_BASE; |
@@ -1300,6 +1301,13 @@ static int __init parse_acpi_skip_timer_override(char *arg) | |||
1300 | return 0; | 1301 | return 0; |
1301 | } | 1302 | } |
1302 | early_param("acpi_skip_timer_override", parse_acpi_skip_timer_override); | 1303 | early_param("acpi_skip_timer_override", parse_acpi_skip_timer_override); |
1304 | |||
1305 | static int __init parse_acpi_use_timer_override(char *arg) | ||
1306 | { | ||
1307 | acpi_use_timer_override = 1; | ||
1308 | return 0; | ||
1309 | } | ||
1310 | early_param("acpi_use_timer_override", parse_acpi_use_timer_override); | ||
1303 | #endif /* CONFIG_X86_IO_APIC */ | 1311 | #endif /* CONFIG_X86_IO_APIC */ |
1304 | 1312 | ||
1305 | static int __init setup_acpi_sci(char *s) | 1313 | static int __init setup_acpi_sci(char *s) |
diff --git a/arch/i386/kernel/acpi/earlyquirk.c b/arch/i386/kernel/acpi/earlyquirk.c index fe799b11ac0a..c9841692bb7c 100644 --- a/arch/i386/kernel/acpi/earlyquirk.c +++ b/arch/i386/kernel/acpi/earlyquirk.c | |||
@@ -27,11 +27,17 @@ static int __init check_bridge(int vendor, int device) | |||
27 | #ifdef CONFIG_ACPI | 27 | #ifdef CONFIG_ACPI |
28 | /* According to Nvidia all timer overrides are bogus unless HPET | 28 | /* According to Nvidia all timer overrides are bogus unless HPET |
29 | is enabled. */ | 29 | is enabled. */ |
30 | if (vendor == PCI_VENDOR_ID_NVIDIA) { | 30 | if (!acpi_use_timer_override && vendor == PCI_VENDOR_ID_NVIDIA) { |
31 | nvidia_hpet_detected = 0; | 31 | nvidia_hpet_detected = 0; |
32 | acpi_table_parse(ACPI_HPET, nvidia_hpet_check); | 32 | acpi_table_parse(ACPI_HPET, nvidia_hpet_check); |
33 | if (nvidia_hpet_detected == 0) { | 33 | if (nvidia_hpet_detected == 0) { |
34 | acpi_skip_timer_override = 1; | 34 | acpi_skip_timer_override = 1; |
35 | printk(KERN_INFO "Nvidia board " | ||
36 | "detected. Ignoring ACPI " | ||
37 | "timer override.\n"); | ||
38 | printk(KERN_INFO "If you got timer trouble " | ||
39 | "try acpi_use_timer_override\n"); | ||
40 | |||
35 | } | 41 | } |
36 | } | 42 | } |
37 | #endif | 43 | #endif |
diff --git a/arch/i386/kernel/io_apic.c b/arch/i386/kernel/io_apic.c index ad84bc2802a6..3b7a63e0ed1a 100644 --- a/arch/i386/kernel/io_apic.c +++ b/arch/i386/kernel/io_apic.c | |||
@@ -1287,9 +1287,11 @@ static void ioapic_register_intr(int irq, int vector, unsigned long trigger) | |||
1287 | trigger == IOAPIC_LEVEL) | 1287 | trigger == IOAPIC_LEVEL) |
1288 | set_irq_chip_and_handler_name(irq, &ioapic_chip, | 1288 | set_irq_chip_and_handler_name(irq, &ioapic_chip, |
1289 | handle_fasteoi_irq, "fasteoi"); | 1289 | handle_fasteoi_irq, "fasteoi"); |
1290 | else | 1290 | else { |
1291 | irq_desc[irq].status |= IRQ_DELAYED_DISABLE; | ||
1291 | set_irq_chip_and_handler_name(irq, &ioapic_chip, | 1292 | set_irq_chip_and_handler_name(irq, &ioapic_chip, |
1292 | handle_edge_irq, "edge"); | 1293 | handle_edge_irq, "edge"); |
1294 | } | ||
1293 | set_intr_gate(vector, interrupt[irq]); | 1295 | set_intr_gate(vector, interrupt[irq]); |
1294 | } | 1296 | } |
1295 | 1297 | ||
diff --git a/arch/i386/pci/irq.c b/arch/i386/pci/irq.c index dbc4aae91959..69163998adeb 100644 --- a/arch/i386/pci/irq.c +++ b/arch/i386/pci/irq.c | |||
@@ -255,13 +255,13 @@ static int pirq_via_set(struct pci_dev *router, struct pci_dev *dev, int pirq, i | |||
255 | */ | 255 | */ |
256 | static int pirq_via586_get(struct pci_dev *router, struct pci_dev *dev, int pirq) | 256 | static int pirq_via586_get(struct pci_dev *router, struct pci_dev *dev, int pirq) |
257 | { | 257 | { |
258 | static const unsigned int pirqmap[4] = { 3, 2, 5, 1 }; | 258 | static const unsigned int pirqmap[5] = { 3, 2, 5, 1, 1 }; |
259 | return read_config_nybble(router, 0x55, pirqmap[pirq-1]); | 259 | return read_config_nybble(router, 0x55, pirqmap[pirq-1]); |
260 | } | 260 | } |
261 | 261 | ||
262 | static int pirq_via586_set(struct pci_dev *router, struct pci_dev *dev, int pirq, int irq) | 262 | static int pirq_via586_set(struct pci_dev *router, struct pci_dev *dev, int pirq, int irq) |
263 | { | 263 | { |
264 | static const unsigned int pirqmap[4] = { 3, 2, 5, 1 }; | 264 | static const unsigned int pirqmap[5] = { 3, 2, 5, 1, 1 }; |
265 | write_config_nybble(router, 0x55, pirqmap[pirq-1], irq); | 265 | write_config_nybble(router, 0x55, pirqmap[pirq-1], irq); |
266 | return 1; | 266 | return 1; |
267 | } | 267 | } |
diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig index 14682396f7f7..683b12c6f76c 100644 --- a/arch/ia64/Kconfig +++ b/arch/ia64/Kconfig | |||
@@ -484,6 +484,15 @@ source "net/Kconfig" | |||
484 | 484 | ||
485 | source "drivers/Kconfig" | 485 | source "drivers/Kconfig" |
486 | 486 | ||
487 | config MSPEC | ||
488 | tristate "Memory special operations driver" | ||
489 | depends on IA64 | ||
490 | select IA64_UNCACHED_ALLOCATOR | ||
491 | help | ||
492 | If you have an ia64 and you want to enable memory special | ||
493 | operations support (formerly known as fetchop), say Y here, | ||
494 | otherwise say N. | ||
495 | |||
487 | source "fs/Kconfig" | 496 | source "fs/Kconfig" |
488 | 497 | ||
489 | source "lib/Kconfig" | 498 | source "lib/Kconfig" |
diff --git a/arch/ia64/hp/sim/Kconfig b/arch/ia64/hp/sim/Kconfig index 18ccb1266e18..f92306bbedb8 100644 --- a/arch/ia64/hp/sim/Kconfig +++ b/arch/ia64/hp/sim/Kconfig | |||
@@ -13,8 +13,8 @@ config HP_SIMSERIAL_CONSOLE | |||
13 | depends on HP_SIMSERIAL | 13 | depends on HP_SIMSERIAL |
14 | 14 | ||
15 | config HP_SIMSCSI | 15 | config HP_SIMSCSI |
16 | tristate "Simulated SCSI disk" | 16 | bool "Simulated SCSI disk" |
17 | depends on SCSI | 17 | depends on SCSI=y |
18 | 18 | ||
19 | endmenu | 19 | endmenu |
20 | 20 | ||
diff --git a/arch/ia64/hp/sim/hpsim_irq.c b/arch/ia64/hp/sim/hpsim_irq.c index 8145547bb52d..c2f58ff364e7 100644 --- a/arch/ia64/hp/sim/hpsim_irq.c +++ b/arch/ia64/hp/sim/hpsim_irq.c | |||
@@ -27,7 +27,7 @@ hpsim_set_affinity_noop (unsigned int a, cpumask_t b) | |||
27 | } | 27 | } |
28 | 28 | ||
29 | static struct hw_interrupt_type irq_type_hp_sim = { | 29 | static struct hw_interrupt_type irq_type_hp_sim = { |
30 | .typename = "hpsim", | 30 | .name = "hpsim", |
31 | .startup = hpsim_irq_startup, | 31 | .startup = hpsim_irq_startup, |
32 | .shutdown = hpsim_irq_noop, | 32 | .shutdown = hpsim_irq_noop, |
33 | .enable = hpsim_irq_noop, | 33 | .enable = hpsim_irq_noop, |
diff --git a/arch/ia64/kernel/iosapic.c b/arch/ia64/kernel/iosapic.c index 9bf15fefa7e4..60d64950e3c2 100644 --- a/arch/ia64/kernel/iosapic.c +++ b/arch/ia64/kernel/iosapic.c | |||
@@ -426,7 +426,7 @@ iosapic_end_level_irq (unsigned int irq) | |||
426 | #define iosapic_ack_level_irq nop | 426 | #define iosapic_ack_level_irq nop |
427 | 427 | ||
428 | struct hw_interrupt_type irq_type_iosapic_level = { | 428 | struct hw_interrupt_type irq_type_iosapic_level = { |
429 | .typename = "IO-SAPIC-level", | 429 | .name = "IO-SAPIC-level", |
430 | .startup = iosapic_startup_level_irq, | 430 | .startup = iosapic_startup_level_irq, |
431 | .shutdown = iosapic_shutdown_level_irq, | 431 | .shutdown = iosapic_shutdown_level_irq, |
432 | .enable = iosapic_enable_level_irq, | 432 | .enable = iosapic_enable_level_irq, |
@@ -473,7 +473,7 @@ iosapic_ack_edge_irq (unsigned int irq) | |||
473 | #define iosapic_end_edge_irq nop | 473 | #define iosapic_end_edge_irq nop |
474 | 474 | ||
475 | struct hw_interrupt_type irq_type_iosapic_edge = { | 475 | struct hw_interrupt_type irq_type_iosapic_edge = { |
476 | .typename = "IO-SAPIC-edge", | 476 | .name = "IO-SAPIC-edge", |
477 | .startup = iosapic_startup_edge_irq, | 477 | .startup = iosapic_startup_edge_irq, |
478 | .shutdown = iosapic_disable_edge_irq, | 478 | .shutdown = iosapic_disable_edge_irq, |
479 | .enable = iosapic_enable_edge_irq, | 479 | .enable = iosapic_enable_edge_irq, |
@@ -664,7 +664,7 @@ register_intr (unsigned int gsi, int vector, unsigned char delivery, | |||
664 | printk(KERN_WARNING | 664 | printk(KERN_WARNING |
665 | "%s: changing vector %d from %s to %s\n", | 665 | "%s: changing vector %d from %s to %s\n", |
666 | __FUNCTION__, vector, | 666 | __FUNCTION__, vector, |
667 | idesc->chip->typename, irq_type->typename); | 667 | idesc->chip->name, irq_type->name); |
668 | idesc->chip = irq_type; | 668 | idesc->chip = irq_type; |
669 | } | 669 | } |
670 | return 0; | 670 | return 0; |
diff --git a/arch/ia64/kernel/irq.c b/arch/ia64/kernel/irq.c index f07c0864b0b4..54d55e4d64f7 100644 --- a/arch/ia64/kernel/irq.c +++ b/arch/ia64/kernel/irq.c | |||
@@ -76,7 +76,7 @@ int show_interrupts(struct seq_file *p, void *v) | |||
76 | seq_printf(p, "%10u ", kstat_cpu(j).irqs[i]); | 76 | seq_printf(p, "%10u ", kstat_cpu(j).irqs[i]); |
77 | } | 77 | } |
78 | #endif | 78 | #endif |
79 | seq_printf(p, " %14s", irq_desc[i].chip->typename); | 79 | seq_printf(p, " %14s", irq_desc[i].chip->name); |
80 | seq_printf(p, " %s", action->name); | 80 | seq_printf(p, " %s", action->name); |
81 | 81 | ||
82 | for (action=action->next; action; action = action->next) | 82 | for (action=action->next; action; action = action->next) |
@@ -197,7 +197,7 @@ void fixup_irqs(void) | |||
197 | struct pt_regs *old_regs = set_irq_regs(NULL); | 197 | struct pt_regs *old_regs = set_irq_regs(NULL); |
198 | 198 | ||
199 | vectors_in_migration[irq]=0; | 199 | vectors_in_migration[irq]=0; |
200 | __do_IRQ(irq); | 200 | generic_handle_irq(irq); |
201 | set_irq_regs(old_regs); | 201 | set_irq_regs(old_regs); |
202 | } | 202 | } |
203 | } | 203 | } |
diff --git a/arch/ia64/kernel/irq_ia64.c b/arch/ia64/kernel/irq_ia64.c index 9c6dafa2d0df..ba3ba8bc50be 100644 --- a/arch/ia64/kernel/irq_ia64.c +++ b/arch/ia64/kernel/irq_ia64.c | |||
@@ -186,7 +186,7 @@ ia64_handle_irq (ia64_vector vector, struct pt_regs *regs) | |||
186 | ia64_setreg(_IA64_REG_CR_TPR, vector); | 186 | ia64_setreg(_IA64_REG_CR_TPR, vector); |
187 | ia64_srlz_d(); | 187 | ia64_srlz_d(); |
188 | 188 | ||
189 | __do_IRQ(local_vector_to_irq(vector)); | 189 | generic_handle_irq(local_vector_to_irq(vector)); |
190 | 190 | ||
191 | /* | 191 | /* |
192 | * Disable interrupts and send EOI: | 192 | * Disable interrupts and send EOI: |
@@ -242,7 +242,7 @@ void ia64_process_pending_intr(void) | |||
242 | * Probably could shared code. | 242 | * Probably could shared code. |
243 | */ | 243 | */ |
244 | vectors_in_migration[local_vector_to_irq(vector)]=0; | 244 | vectors_in_migration[local_vector_to_irq(vector)]=0; |
245 | __do_IRQ(local_vector_to_irq(vector)); | 245 | generic_handle_irq(local_vector_to_irq(vector)); |
246 | set_irq_regs(old_regs); | 246 | set_irq_regs(old_regs); |
247 | 247 | ||
248 | /* | 248 | /* |
diff --git a/arch/ia64/kernel/irq_lsapic.c b/arch/ia64/kernel/irq_lsapic.c index 1ab58b09f3d7..c2f07beb1759 100644 --- a/arch/ia64/kernel/irq_lsapic.c +++ b/arch/ia64/kernel/irq_lsapic.c | |||
@@ -34,7 +34,7 @@ static int lsapic_retrigger(unsigned int irq) | |||
34 | } | 34 | } |
35 | 35 | ||
36 | struct hw_interrupt_type irq_type_ia64_lsapic = { | 36 | struct hw_interrupt_type irq_type_ia64_lsapic = { |
37 | .typename = "LSAPIC", | 37 | .name = "LSAPIC", |
38 | .startup = lsapic_noop_startup, | 38 | .startup = lsapic_noop_startup, |
39 | .shutdown = lsapic_noop, | 39 | .shutdown = lsapic_noop, |
40 | .enable = lsapic_noop, | 40 | .enable = lsapic_noop, |
diff --git a/arch/ia64/mm/hugetlbpage.c b/arch/ia64/mm/hugetlbpage.c index eee5c1cfbe32..f3a9585e98a8 100644 --- a/arch/ia64/mm/hugetlbpage.c +++ b/arch/ia64/mm/hugetlbpage.c | |||
@@ -70,8 +70,10 @@ huge_pte_offset (struct mm_struct *mm, unsigned long addr) | |||
70 | * Don't actually need to do any preparation, but need to make sure | 70 | * Don't actually need to do any preparation, but need to make sure |
71 | * the address is in the right region. | 71 | * the address is in the right region. |
72 | */ | 72 | */ |
73 | int prepare_hugepage_range(unsigned long addr, unsigned long len) | 73 | int prepare_hugepage_range(unsigned long addr, unsigned long len, pgoff_t pgoff) |
74 | { | 74 | { |
75 | if (pgoff & (~HPAGE_MASK >> PAGE_SHIFT)) | ||
76 | return -EINVAL; | ||
75 | if (len & ~HPAGE_MASK) | 77 | if (len & ~HPAGE_MASK) |
76 | return -EINVAL; | 78 | return -EINVAL; |
77 | if (addr & ~HPAGE_MASK) | 79 | if (addr & ~HPAGE_MASK) |
diff --git a/arch/ia64/sn/kernel/bte.c b/arch/ia64/sn/kernel/bte.c index 7f73ad4408aa..ff1c55601178 100644 --- a/arch/ia64/sn/kernel/bte.c +++ b/arch/ia64/sn/kernel/bte.c | |||
@@ -381,14 +381,13 @@ bte_result_t bte_unaligned_copy(u64 src, u64 dest, u64 len, u64 mode) | |||
381 | * bcopy to the destination. | 381 | * bcopy to the destination. |
382 | */ | 382 | */ |
383 | 383 | ||
384 | /* Add the leader from source */ | ||
385 | headBteLen = len + (src & L1_CACHE_MASK); | ||
386 | /* Add the trailing bytes from footer. */ | ||
387 | headBteLen += L1_CACHE_BYTES - (headBteLen & L1_CACHE_MASK); | ||
388 | headBteSource = src & ~L1_CACHE_MASK; | ||
389 | headBcopySrcOffset = src & L1_CACHE_MASK; | 384 | headBcopySrcOffset = src & L1_CACHE_MASK; |
390 | headBcopyDest = dest; | 385 | headBcopyDest = dest; |
391 | headBcopyLen = len; | 386 | headBcopyLen = len; |
387 | |||
388 | headBteSource = src - headBcopySrcOffset; | ||
389 | /* Add the leading and trailing bytes from source */ | ||
390 | headBteLen = L1_CACHE_ALIGN(len + headBcopySrcOffset); | ||
392 | } | 391 | } |
393 | 392 | ||
394 | if (headBcopyLen > 0) { | 393 | if (headBcopyLen > 0) { |
diff --git a/arch/ia64/sn/kernel/irq.c b/arch/ia64/sn/kernel/irq.c index 7bb6ad188ba3..0b49459a878a 100644 --- a/arch/ia64/sn/kernel/irq.c +++ b/arch/ia64/sn/kernel/irq.c | |||
@@ -201,7 +201,7 @@ static void sn_set_affinity_irq(unsigned int irq, cpumask_t mask) | |||
201 | } | 201 | } |
202 | 202 | ||
203 | struct hw_interrupt_type irq_type_sn = { | 203 | struct hw_interrupt_type irq_type_sn = { |
204 | .typename = "SN hub", | 204 | .name = "SN hub", |
205 | .startup = sn_startup_irq, | 205 | .startup = sn_startup_irq, |
206 | .shutdown = sn_shutdown_irq, | 206 | .shutdown = sn_shutdown_irq, |
207 | .enable = sn_enable_irq, | 207 | .enable = sn_enable_irq, |
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 2bd9b7fb0f6c..0673dbedb241 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig | |||
@@ -740,7 +740,7 @@ config ARCH_SPARSEMEM_ENABLE | |||
740 | 740 | ||
741 | config ARCH_SPARSEMEM_DEFAULT | 741 | config ARCH_SPARSEMEM_DEFAULT |
742 | def_bool y | 742 | def_bool y |
743 | depends on SMP && PPC_PSERIES | 743 | depends on (SMP && PPC_PSERIES) || PPC_CELL |
744 | 744 | ||
745 | config ARCH_POPULATES_NODE_MAP | 745 | config ARCH_POPULATES_NODE_MAP |
746 | def_bool y | 746 | def_bool y |
diff --git a/arch/powerpc/boot/wrapper b/arch/powerpc/boot/wrapper index eab7318729e9..b5fb1fee76f8 100755 --- a/arch/powerpc/boot/wrapper +++ b/arch/powerpc/boot/wrapper | |||
@@ -179,11 +179,11 @@ if [ -z "$cacheit" ]; then | |||
179 | fi | 179 | fi |
180 | 180 | ||
181 | if [ -n "$initrd" ]; then | 181 | if [ -n "$initrd" ]; then |
182 | addsec $tmp "$initrd" initrd | 182 | addsec $tmp "$initrd" $isection |
183 | fi | 183 | fi |
184 | 184 | ||
185 | if [ -n "$dtb" ]; then | 185 | if [ -n "$dtb" ]; then |
186 | addsec $tmp "$dtb" dtb | 186 | addsec $tmp "$dtb" .kernel:dtb |
187 | fi | 187 | fi |
188 | 188 | ||
189 | if [ "$platform" != "miboot" ]; then | 189 | if [ "$platform" != "miboot" ]; then |
diff --git a/arch/powerpc/boot/zImage.lds.S b/arch/powerpc/boot/zImage.lds.S index 4b6bb3ffe3dc..4be3c6414b04 100644 --- a/arch/powerpc/boot/zImage.lds.S +++ b/arch/powerpc/boot/zImage.lds.S | |||
@@ -21,6 +21,11 @@ SECTIONS | |||
21 | __got2_end = .; | 21 | __got2_end = .; |
22 | } | 22 | } |
23 | 23 | ||
24 | . = ALIGN(8); | ||
25 | _dtb_start = .; | ||
26 | .kernel:dtb : { *(.kernel:dtb) } | ||
27 | _dtb_end = .; | ||
28 | |||
24 | . = ALIGN(4096); | 29 | . = ALIGN(4096); |
25 | _vmlinux_start = .; | 30 | _vmlinux_start = .; |
26 | .kernel:vmlinux.strip : { *(.kernel:vmlinux.strip) } | 31 | .kernel:vmlinux.strip : { *(.kernel:vmlinux.strip) } |
diff --git a/arch/powerpc/kernel/rtas_flash.c b/arch/powerpc/kernel/rtas_flash.c index 1442b63a75da..6f6fc977cb39 100644 --- a/arch/powerpc/kernel/rtas_flash.c +++ b/arch/powerpc/kernel/rtas_flash.c | |||
@@ -72,6 +72,10 @@ | |||
72 | #define VALIDATE_BUF_SIZE 4096 | 72 | #define VALIDATE_BUF_SIZE 4096 |
73 | #define RTAS_MSG_MAXLEN 64 | 73 | #define RTAS_MSG_MAXLEN 64 |
74 | 74 | ||
75 | /* Quirk - RTAS requires 4k list length and block size */ | ||
76 | #define RTAS_BLKLIST_LENGTH 4096 | ||
77 | #define RTAS_BLK_SIZE 4096 | ||
78 | |||
75 | struct flash_block { | 79 | struct flash_block { |
76 | char *data; | 80 | char *data; |
77 | unsigned long length; | 81 | unsigned long length; |
@@ -83,7 +87,7 @@ struct flash_block { | |||
83 | * into a version/length and translate the pointers | 87 | * into a version/length and translate the pointers |
84 | * to absolute. | 88 | * to absolute. |
85 | */ | 89 | */ |
86 | #define FLASH_BLOCKS_PER_NODE ((PAGE_SIZE - 16) / sizeof(struct flash_block)) | 90 | #define FLASH_BLOCKS_PER_NODE ((RTAS_BLKLIST_LENGTH - 16) / sizeof(struct flash_block)) |
87 | struct flash_block_list { | 91 | struct flash_block_list { |
88 | unsigned long num_blocks; | 92 | unsigned long num_blocks; |
89 | struct flash_block_list *next; | 93 | struct flash_block_list *next; |
@@ -96,6 +100,9 @@ struct flash_block_list_header { /* just the header of flash_block_list */ | |||
96 | 100 | ||
97 | static struct flash_block_list_header rtas_firmware_flash_list = {0, NULL}; | 101 | static struct flash_block_list_header rtas_firmware_flash_list = {0, NULL}; |
98 | 102 | ||
103 | /* Use slab cache to guarantee 4k alignment */ | ||
104 | static kmem_cache_t *flash_block_cache = NULL; | ||
105 | |||
99 | #define FLASH_BLOCK_LIST_VERSION (1UL) | 106 | #define FLASH_BLOCK_LIST_VERSION (1UL) |
100 | 107 | ||
101 | /* Local copy of the flash block list. | 108 | /* Local copy of the flash block list. |
@@ -153,7 +160,7 @@ static int flash_list_valid(struct flash_block_list *flist) | |||
153 | return FLASH_IMG_NULL_DATA; | 160 | return FLASH_IMG_NULL_DATA; |
154 | } | 161 | } |
155 | block_size = f->blocks[i].length; | 162 | block_size = f->blocks[i].length; |
156 | if (block_size <= 0 || block_size > PAGE_SIZE) { | 163 | if (block_size <= 0 || block_size > RTAS_BLK_SIZE) { |
157 | return FLASH_IMG_BAD_LEN; | 164 | return FLASH_IMG_BAD_LEN; |
158 | } | 165 | } |
159 | image_size += block_size; | 166 | image_size += block_size; |
@@ -177,9 +184,9 @@ static void free_flash_list(struct flash_block_list *f) | |||
177 | 184 | ||
178 | while (f) { | 185 | while (f) { |
179 | for (i = 0; i < f->num_blocks; i++) | 186 | for (i = 0; i < f->num_blocks; i++) |
180 | free_page((unsigned long)(f->blocks[i].data)); | 187 | kmem_cache_free(flash_block_cache, f->blocks[i].data); |
181 | next = f->next; | 188 | next = f->next; |
182 | free_page((unsigned long)f); | 189 | kmem_cache_free(flash_block_cache, f); |
183 | f = next; | 190 | f = next; |
184 | } | 191 | } |
185 | } | 192 | } |
@@ -278,6 +285,12 @@ static ssize_t rtas_flash_read(struct file *file, char __user *buf, | |||
278 | return msglen; | 285 | return msglen; |
279 | } | 286 | } |
280 | 287 | ||
288 | /* constructor for flash_block_cache */ | ||
289 | void rtas_block_ctor(void *ptr, kmem_cache_t *cache, unsigned long flags) | ||
290 | { | ||
291 | memset(ptr, 0, RTAS_BLK_SIZE); | ||
292 | } | ||
293 | |||
281 | /* We could be much more efficient here. But to keep this function | 294 | /* We could be much more efficient here. But to keep this function |
282 | * simple we allocate a page to the block list no matter how small the | 295 | * simple we allocate a page to the block list no matter how small the |
283 | * count is. If the system is low on memory it will be just as well | 296 | * count is. If the system is low on memory it will be just as well |
@@ -302,7 +315,7 @@ static ssize_t rtas_flash_write(struct file *file, const char __user *buffer, | |||
302 | * proc file | 315 | * proc file |
303 | */ | 316 | */ |
304 | if (uf->flist == NULL) { | 317 | if (uf->flist == NULL) { |
305 | uf->flist = (struct flash_block_list *) get_zeroed_page(GFP_KERNEL); | 318 | uf->flist = kmem_cache_alloc(flash_block_cache, GFP_KERNEL); |
306 | if (!uf->flist) | 319 | if (!uf->flist) |
307 | return -ENOMEM; | 320 | return -ENOMEM; |
308 | } | 321 | } |
@@ -313,21 +326,21 @@ static ssize_t rtas_flash_write(struct file *file, const char __user *buffer, | |||
313 | next_free = fl->num_blocks; | 326 | next_free = fl->num_blocks; |
314 | if (next_free == FLASH_BLOCKS_PER_NODE) { | 327 | if (next_free == FLASH_BLOCKS_PER_NODE) { |
315 | /* Need to allocate another block_list */ | 328 | /* Need to allocate another block_list */ |
316 | fl->next = (struct flash_block_list *)get_zeroed_page(GFP_KERNEL); | 329 | fl->next = kmem_cache_alloc(flash_block_cache, GFP_KERNEL); |
317 | if (!fl->next) | 330 | if (!fl->next) |
318 | return -ENOMEM; | 331 | return -ENOMEM; |
319 | fl = fl->next; | 332 | fl = fl->next; |
320 | next_free = 0; | 333 | next_free = 0; |
321 | } | 334 | } |
322 | 335 | ||
323 | if (count > PAGE_SIZE) | 336 | if (count > RTAS_BLK_SIZE) |
324 | count = PAGE_SIZE; | 337 | count = RTAS_BLK_SIZE; |
325 | p = (char *)get_zeroed_page(GFP_KERNEL); | 338 | p = kmem_cache_alloc(flash_block_cache, GFP_KERNEL); |
326 | if (!p) | 339 | if (!p) |
327 | return -ENOMEM; | 340 | return -ENOMEM; |
328 | 341 | ||
329 | if(copy_from_user(p, buffer, count)) { | 342 | if(copy_from_user(p, buffer, count)) { |
330 | free_page((unsigned long)p); | 343 | kmem_cache_free(flash_block_cache, p); |
331 | return -EFAULT; | 344 | return -EFAULT; |
332 | } | 345 | } |
333 | fl->blocks[next_free].data = p; | 346 | fl->blocks[next_free].data = p; |
@@ -791,6 +804,16 @@ int __init rtas_flash_init(void) | |||
791 | goto cleanup; | 804 | goto cleanup; |
792 | 805 | ||
793 | rtas_flash_term_hook = rtas_flash_firmware; | 806 | rtas_flash_term_hook = rtas_flash_firmware; |
807 | |||
808 | flash_block_cache = kmem_cache_create("rtas_flash_cache", | ||
809 | RTAS_BLK_SIZE, RTAS_BLK_SIZE, 0, | ||
810 | rtas_block_ctor, NULL); | ||
811 | if (!flash_block_cache) { | ||
812 | printk(KERN_ERR "%s: failed to create block cache\n", | ||
813 | __FUNCTION__); | ||
814 | rc = -ENOMEM; | ||
815 | goto cleanup; | ||
816 | } | ||
794 | return 0; | 817 | return 0; |
795 | 818 | ||
796 | cleanup: | 819 | cleanup: |
@@ -805,6 +828,10 @@ cleanup: | |||
805 | void __exit rtas_flash_cleanup(void) | 828 | void __exit rtas_flash_cleanup(void) |
806 | { | 829 | { |
807 | rtas_flash_term_hook = NULL; | 830 | rtas_flash_term_hook = NULL; |
831 | |||
832 | if (flash_block_cache) | ||
833 | kmem_cache_destroy(flash_block_cache); | ||
834 | |||
808 | remove_flash_pde(firmware_flash_pde); | 835 | remove_flash_pde(firmware_flash_pde); |
809 | remove_flash_pde(firmware_update_pde); | 836 | remove_flash_pde(firmware_update_pde); |
810 | remove_flash_pde(validate_pde); | 837 | remove_flash_pde(validate_pde); |
diff --git a/arch/powerpc/mm/hugetlbpage.c b/arch/powerpc/mm/hugetlbpage.c index fd68b74c07c3..506d89768d45 100644 --- a/arch/powerpc/mm/hugetlbpage.c +++ b/arch/powerpc/mm/hugetlbpage.c | |||
@@ -491,11 +491,15 @@ static int open_high_hpage_areas(struct mm_struct *mm, u16 newareas) | |||
491 | return 0; | 491 | return 0; |
492 | } | 492 | } |
493 | 493 | ||
494 | int prepare_hugepage_range(unsigned long addr, unsigned long len) | 494 | int prepare_hugepage_range(unsigned long addr, unsigned long len, pgoff_t pgoff) |
495 | { | 495 | { |
496 | int err = 0; | 496 | int err = 0; |
497 | 497 | ||
498 | if ( (addr+len) < addr ) | 498 | if (pgoff & (~HPAGE_MASK >> PAGE_SHIFT)) |
499 | return -EINVAL; | ||
500 | if (len & ~HPAGE_MASK) | ||
501 | return -EINVAL; | ||
502 | if (addr & ~HPAGE_MASK) | ||
499 | return -EINVAL; | 503 | return -EINVAL; |
500 | 504 | ||
501 | if (addr < 0x100000000UL) | 505 | if (addr < 0x100000000UL) |
diff --git a/arch/powerpc/platforms/cell/spu_base.c b/arch/powerpc/platforms/cell/spu_base.c index d0fb959e3ef1..7aa809d5a244 100644 --- a/arch/powerpc/platforms/cell/spu_base.c +++ b/arch/powerpc/platforms/cell/spu_base.c | |||
@@ -655,14 +655,19 @@ static int __init spu_map_interrupts(struct spu *spu, struct device_node *np) | |||
655 | 655 | ||
656 | for (i=0; i < 3; i++) { | 656 | for (i=0; i < 3; i++) { |
657 | ret = of_irq_map_one(np, i, &oirq); | 657 | ret = of_irq_map_one(np, i, &oirq); |
658 | if (ret) | 658 | if (ret) { |
659 | pr_debug("spu_new: failed to get irq %d\n", i); | ||
659 | goto err; | 660 | goto err; |
660 | 661 | } | |
661 | ret = -EINVAL; | 662 | ret = -EINVAL; |
663 | pr_debug(" irq %d no 0x%x on %s\n", i, oirq.specifier[0], | ||
664 | oirq.controller->full_name); | ||
662 | spu->irqs[i] = irq_create_of_mapping(oirq.controller, | 665 | spu->irqs[i] = irq_create_of_mapping(oirq.controller, |
663 | oirq.specifier, oirq.size); | 666 | oirq.specifier, oirq.size); |
664 | if (spu->irqs[i] == NO_IRQ) | 667 | if (spu->irqs[i] == NO_IRQ) { |
668 | pr_debug("spu_new: failed to map it !\n"); | ||
665 | goto err; | 669 | goto err; |
670 | } | ||
666 | } | 671 | } |
667 | return 0; | 672 | return 0; |
668 | 673 | ||
@@ -681,7 +686,7 @@ static int spu_map_resource(struct device_node *node, int nr, | |||
681 | struct resource resource = { }; | 686 | struct resource resource = { }; |
682 | int ret; | 687 | int ret; |
683 | 688 | ||
684 | ret = of_address_to_resource(node, 0, &resource); | 689 | ret = of_address_to_resource(node, nr, &resource); |
685 | if (ret) | 690 | if (ret) |
686 | goto out; | 691 | goto out; |
687 | 692 | ||
@@ -704,22 +709,42 @@ static int __init spu_map_device(struct spu *spu, struct device_node *node) | |||
704 | 709 | ||
705 | ret = spu_map_resource(node, 0, (void __iomem**)&spu->local_store, | 710 | ret = spu_map_resource(node, 0, (void __iomem**)&spu->local_store, |
706 | &spu->local_store_phys); | 711 | &spu->local_store_phys); |
707 | if (ret) | 712 | if (ret) { |
713 | pr_debug("spu_new: failed to map %s resource 0\n", | ||
714 | node->full_name); | ||
708 | goto out; | 715 | goto out; |
716 | } | ||
709 | ret = spu_map_resource(node, 1, (void __iomem**)&spu->problem, | 717 | ret = spu_map_resource(node, 1, (void __iomem**)&spu->problem, |
710 | &spu->problem_phys); | 718 | &spu->problem_phys); |
711 | if (ret) | 719 | if (ret) { |
720 | pr_debug("spu_new: failed to map %s resource 1\n", | ||
721 | node->full_name); | ||
712 | goto out_unmap; | 722 | goto out_unmap; |
723 | } | ||
713 | ret = spu_map_resource(node, 2, (void __iomem**)&spu->priv2, | 724 | ret = spu_map_resource(node, 2, (void __iomem**)&spu->priv2, |
714 | NULL); | 725 | NULL); |
715 | if (ret) | 726 | if (ret) { |
727 | pr_debug("spu_new: failed to map %s resource 2\n", | ||
728 | node->full_name); | ||
716 | goto out_unmap; | 729 | goto out_unmap; |
730 | } | ||
717 | 731 | ||
718 | if (!firmware_has_feature(FW_FEATURE_LPAR)) | 732 | if (!firmware_has_feature(FW_FEATURE_LPAR)) |
719 | ret = spu_map_resource(node, 3, (void __iomem**)&spu->priv1, | 733 | ret = spu_map_resource(node, 3, (void __iomem**)&spu->priv1, |
720 | NULL); | 734 | NULL); |
721 | if (ret) | 735 | if (ret) { |
736 | pr_debug("spu_new: failed to map %s resource 3\n", | ||
737 | node->full_name); | ||
722 | goto out_unmap; | 738 | goto out_unmap; |
739 | } | ||
740 | pr_debug("spu_new: %s maps:\n", node->full_name); | ||
741 | pr_debug(" local store : 0x%016lx -> 0x%p\n", | ||
742 | spu->local_store_phys, spu->local_store); | ||
743 | pr_debug(" problem state : 0x%016lx -> 0x%p\n", | ||
744 | spu->problem_phys, spu->problem); | ||
745 | pr_debug(" priv2 : 0x%p\n", spu->priv2); | ||
746 | pr_debug(" priv1 : 0x%p\n", spu->priv1); | ||
747 | |||
723 | return 0; | 748 | return 0; |
724 | 749 | ||
725 | out_unmap: | 750 | out_unmap: |
diff --git a/arch/x86_64/boot/setup.S b/arch/x86_64/boot/setup.S index c3bfd223ab49..770940cc0108 100644 --- a/arch/x86_64/boot/setup.S +++ b/arch/x86_64/boot/setup.S | |||
@@ -836,13 +836,12 @@ gdt: | |||
836 | .word 0x9200 # data read/write | 836 | .word 0x9200 # data read/write |
837 | .word 0x00CF # granularity = 4096, 386 | 837 | .word 0x00CF # granularity = 4096, 386 |
838 | # (+5th nibble of limit) | 838 | # (+5th nibble of limit) |
839 | gdt_end: | ||
839 | idt_48: | 840 | idt_48: |
840 | .word 0 # idt limit = 0 | 841 | .word 0 # idt limit = 0 |
841 | .word 0, 0 # idt base = 0L | 842 | .word 0, 0 # idt base = 0L |
842 | gdt_48: | 843 | gdt_48: |
843 | .word 0x8000 # gdt limit=2048, | 844 | .word gdt_end-gdt-1 # gdt limit |
844 | # 256 GDT entries | ||
845 | |||
846 | .word 0, 0 # gdt base (filled in later) | 845 | .word 0, 0 # gdt base (filled in later) |
847 | 846 | ||
848 | # Include video setup & detection code | 847 | # Include video setup & detection code |
diff --git a/arch/x86_64/ia32/ptrace32.c b/arch/x86_64/ia32/ptrace32.c index 3a7561d4703e..04566fe5de49 100644 --- a/arch/x86_64/ia32/ptrace32.c +++ b/arch/x86_64/ia32/ptrace32.c | |||
@@ -244,6 +244,8 @@ asmlinkage long sys32_ptrace(long request, u32 pid, u32 addr, u32 data) | |||
244 | case PTRACE_DETACH: | 244 | case PTRACE_DETACH: |
245 | case PTRACE_SYSCALL: | 245 | case PTRACE_SYSCALL: |
246 | case PTRACE_SETOPTIONS: | 246 | case PTRACE_SETOPTIONS: |
247 | case PTRACE_SET_THREAD_AREA: | ||
248 | case PTRACE_GET_THREAD_AREA: | ||
247 | return sys_ptrace(request, pid, addr, data); | 249 | return sys_ptrace(request, pid, addr, data); |
248 | 250 | ||
249 | default: | 251 | default: |
diff --git a/arch/x86_64/kernel/e820.c b/arch/x86_64/kernel/e820.c index a75c829c2b02..6fe191c58084 100644 --- a/arch/x86_64/kernel/e820.c +++ b/arch/x86_64/kernel/e820.c | |||
@@ -278,7 +278,7 @@ e820_register_active_regions(int nid, unsigned long start_pfn, | |||
278 | >> PAGE_SHIFT; | 278 | >> PAGE_SHIFT; |
279 | 279 | ||
280 | /* Skip map entries smaller than a page */ | 280 | /* Skip map entries smaller than a page */ |
281 | if (ei_startpfn > ei_endpfn) | 281 | if (ei_startpfn >= ei_endpfn) |
282 | continue; | 282 | continue; |
283 | 283 | ||
284 | /* Check if end_pfn_map should be updated */ | 284 | /* Check if end_pfn_map should be updated */ |
@@ -594,7 +594,9 @@ static int __init parse_memmap_opt(char *p) | |||
594 | * size before original memory map is | 594 | * size before original memory map is |
595 | * reset. | 595 | * reset. |
596 | */ | 596 | */ |
597 | e820_register_active_regions(0, 0, -1UL); | ||
597 | saved_max_pfn = e820_end_of_ram(); | 598 | saved_max_pfn = e820_end_of_ram(); |
599 | remove_all_active_ranges(); | ||
598 | #endif | 600 | #endif |
599 | end_pfn_map = 0; | 601 | end_pfn_map = 0; |
600 | e820.nr_map = 0; | 602 | e820.nr_map = 0; |
diff --git a/arch/x86_64/kernel/early-quirks.c b/arch/x86_64/kernel/early-quirks.c index 2b1245d86258..68273bff58cc 100644 --- a/arch/x86_64/kernel/early-quirks.c +++ b/arch/x86_64/kernel/early-quirks.c | |||
@@ -45,7 +45,13 @@ static void nvidia_bugs(void) | |||
45 | /* | 45 | /* |
46 | * All timer overrides on Nvidia are | 46 | * All timer overrides on Nvidia are |
47 | * wrong unless HPET is enabled. | 47 | * wrong unless HPET is enabled. |
48 | * Unfortunately that's not true on many Asus boards. | ||
49 | * We don't know yet how to detect this automatically, but | ||
50 | * at least allow a command line override. | ||
48 | */ | 51 | */ |
52 | if (acpi_use_timer_override) | ||
53 | return; | ||
54 | |||
49 | nvidia_hpet_detected = 0; | 55 | nvidia_hpet_detected = 0; |
50 | acpi_table_parse(ACPI_HPET, nvidia_hpet_check); | 56 | acpi_table_parse(ACPI_HPET, nvidia_hpet_check); |
51 | if (nvidia_hpet_detected == 0) { | 57 | if (nvidia_hpet_detected == 0) { |
@@ -53,6 +59,8 @@ static void nvidia_bugs(void) | |||
53 | printk(KERN_INFO "Nvidia board " | 59 | printk(KERN_INFO "Nvidia board " |
54 | "detected. Ignoring ACPI " | 60 | "detected. Ignoring ACPI " |
55 | "timer override.\n"); | 61 | "timer override.\n"); |
62 | printk(KERN_INFO "If you got timer trouble " | ||
63 | "try acpi_use_timer_override\n"); | ||
56 | } | 64 | } |
57 | #endif | 65 | #endif |
58 | /* RED-PEN skip them on mptables too? */ | 66 | /* RED-PEN skip them on mptables too? */ |
diff --git a/arch/x86_64/kernel/io_apic.c b/arch/x86_64/kernel/io_apic.c index 41bfc49301ad..14654e682411 100644 --- a/arch/x86_64/kernel/io_apic.c +++ b/arch/x86_64/kernel/io_apic.c | |||
@@ -790,9 +790,11 @@ static void ioapic_register_intr(int irq, int vector, unsigned long trigger) | |||
790 | trigger == IOAPIC_LEVEL) | 790 | trigger == IOAPIC_LEVEL) |
791 | set_irq_chip_and_handler_name(irq, &ioapic_chip, | 791 | set_irq_chip_and_handler_name(irq, &ioapic_chip, |
792 | handle_fasteoi_irq, "fasteoi"); | 792 | handle_fasteoi_irq, "fasteoi"); |
793 | else | 793 | else { |
794 | irq_desc[irq].status |= IRQ_DELAYED_DISABLE; | ||
794 | set_irq_chip_and_handler_name(irq, &ioapic_chip, | 795 | set_irq_chip_and_handler_name(irq, &ioapic_chip, |
795 | handle_edge_irq, "edge"); | 796 | handle_edge_irq, "edge"); |
797 | } | ||
796 | } | 798 | } |
797 | 799 | ||
798 | static void __init setup_IO_APIC_irqs(void) | 800 | static void __init setup_IO_APIC_irqs(void) |
diff --git a/arch/x86_64/kernel/process.c b/arch/x86_64/kernel/process.c index 49f7fac6229e..f6226055d53d 100644 --- a/arch/x86_64/kernel/process.c +++ b/arch/x86_64/kernel/process.c | |||
@@ -88,9 +88,8 @@ void enter_idle(void) | |||
88 | 88 | ||
89 | static void __exit_idle(void) | 89 | static void __exit_idle(void) |
90 | { | 90 | { |
91 | if (read_pda(isidle) == 0) | 91 | if (test_and_clear_bit_pda(0, isidle) == 0) |
92 | return; | 92 | return; |
93 | write_pda(isidle, 0); | ||
94 | atomic_notifier_call_chain(&idle_notifier, IDLE_END, NULL); | 93 | atomic_notifier_call_chain(&idle_notifier, IDLE_END, NULL); |
95 | } | 94 | } |
96 | 95 | ||
diff --git a/arch/x86_64/kernel/smp.c b/arch/x86_64/kernel/smp.c index 4f67697f5036..9f74c883568c 100644 --- a/arch/x86_64/kernel/smp.c +++ b/arch/x86_64/kernel/smp.c | |||
@@ -376,9 +376,8 @@ int smp_call_function_single (int cpu, void (*func) (void *info), void *info, | |||
376 | /* prevent preemption and reschedule on another processor */ | 376 | /* prevent preemption and reschedule on another processor */ |
377 | int me = get_cpu(); | 377 | int me = get_cpu(); |
378 | if (cpu == me) { | 378 | if (cpu == me) { |
379 | WARN_ON(1); | ||
380 | put_cpu(); | 379 | put_cpu(); |
381 | return -EBUSY; | 380 | return 0; |
382 | } | 381 | } |
383 | spin_lock_bh(&call_lock); | 382 | spin_lock_bh(&call_lock); |
384 | __smp_call_function_single(cpu, func, info, nonatomic, wait); | 383 | __smp_call_function_single(cpu, func, info, nonatomic, wait); |
diff --git a/arch/x86_64/kernel/time.c b/arch/x86_64/kernel/time.c index 88722f11ca13..e3ef544d2cfb 100644 --- a/arch/x86_64/kernel/time.c +++ b/arch/x86_64/kernel/time.c | |||
@@ -876,15 +876,6 @@ static struct irqaction irq0 = { | |||
876 | timer_interrupt, IRQF_DISABLED, CPU_MASK_NONE, "timer", NULL, NULL | 876 | timer_interrupt, IRQF_DISABLED, CPU_MASK_NONE, "timer", NULL, NULL |
877 | }; | 877 | }; |
878 | 878 | ||
879 | static int __cpuinit | ||
880 | time_cpu_notifier(struct notifier_block *nb, unsigned long action, void *hcpu) | ||
881 | { | ||
882 | unsigned cpu = (unsigned long) hcpu; | ||
883 | if (action == CPU_ONLINE) | ||
884 | vsyscall_set_cpu(cpu); | ||
885 | return NOTIFY_DONE; | ||
886 | } | ||
887 | |||
888 | void __init time_init(void) | 879 | void __init time_init(void) |
889 | { | 880 | { |
890 | if (nohpet) | 881 | if (nohpet) |
@@ -925,8 +916,6 @@ void __init time_init(void) | |||
925 | vxtime.last_tsc = get_cycles_sync(); | 916 | vxtime.last_tsc = get_cycles_sync(); |
926 | set_cyc2ns_scale(cpu_khz); | 917 | set_cyc2ns_scale(cpu_khz); |
927 | setup_irq(0, &irq0); | 918 | setup_irq(0, &irq0); |
928 | hotcpu_notifier(time_cpu_notifier, 0); | ||
929 | time_cpu_notifier(NULL, CPU_ONLINE, (void *)(long)smp_processor_id()); | ||
930 | 919 | ||
931 | #ifndef CONFIG_SMP | 920 | #ifndef CONFIG_SMP |
932 | time_init_gtod(); | 921 | time_init_gtod(); |
diff --git a/arch/x86_64/kernel/vsyscall.c b/arch/x86_64/kernel/vsyscall.c index a98b460af6a1..a730bacecb0b 100644 --- a/arch/x86_64/kernel/vsyscall.c +++ b/arch/x86_64/kernel/vsyscall.c | |||
@@ -27,6 +27,9 @@ | |||
27 | #include <linux/jiffies.h> | 27 | #include <linux/jiffies.h> |
28 | #include <linux/sysctl.h> | 28 | #include <linux/sysctl.h> |
29 | #include <linux/getcpu.h> | 29 | #include <linux/getcpu.h> |
30 | #include <linux/cpu.h> | ||
31 | #include <linux/smp.h> | ||
32 | #include <linux/notifier.h> | ||
30 | 33 | ||
31 | #include <asm/vsyscall.h> | 34 | #include <asm/vsyscall.h> |
32 | #include <asm/pgtable.h> | 35 | #include <asm/pgtable.h> |
@@ -243,32 +246,17 @@ static ctl_table kernel_root_table2[] = { | |||
243 | 246 | ||
244 | #endif | 247 | #endif |
245 | 248 | ||
246 | static void __cpuinit write_rdtscp_cb(void *info) | 249 | /* Assume __initcall executes before all user space. Hopefully kmod |
247 | { | 250 | doesn't violate that. We'll find out if it does. */ |
248 | write_rdtscp_aux((unsigned long)info); | 251 | static void __cpuinit vsyscall_set_cpu(int cpu) |
249 | } | ||
250 | |||
251 | void __cpuinit vsyscall_set_cpu(int cpu) | ||
252 | { | 252 | { |
253 | unsigned long *d; | 253 | unsigned long *d; |
254 | unsigned long node = 0; | 254 | unsigned long node = 0; |
255 | #ifdef CONFIG_NUMA | 255 | #ifdef CONFIG_NUMA |
256 | node = cpu_to_node[cpu]; | 256 | node = cpu_to_node[cpu]; |
257 | #endif | 257 | #endif |
258 | if (cpu_has(&cpu_data[cpu], X86_FEATURE_RDTSCP)) { | 258 | if (cpu_has(&cpu_data[cpu], X86_FEATURE_RDTSCP)) |
259 | void *info = (void *)((node << 12) | cpu); | 259 | write_rdtscp_aux((node << 12) | cpu); |
260 | /* Can happen on preemptive kernel */ | ||
261 | if (get_cpu() == cpu) | ||
262 | write_rdtscp_cb(info); | ||
263 | #ifdef CONFIG_SMP | ||
264 | else { | ||
265 | /* the notifier is unfortunately not executed on the | ||
266 | target CPU */ | ||
267 | smp_call_function_single(cpu,write_rdtscp_cb,info,0,1); | ||
268 | } | ||
269 | #endif | ||
270 | put_cpu(); | ||
271 | } | ||
272 | 260 | ||
273 | /* Store cpu number in limit so that it can be loaded quickly | 261 | /* Store cpu number in limit so that it can be loaded quickly |
274 | in user space in vgetcpu. | 262 | in user space in vgetcpu. |
@@ -280,6 +268,21 @@ void __cpuinit vsyscall_set_cpu(int cpu) | |||
280 | *d |= (node >> 4) << 48; | 268 | *d |= (node >> 4) << 48; |
281 | } | 269 | } |
282 | 270 | ||
271 | static void __cpuinit cpu_vsyscall_init(void *arg) | ||
272 | { | ||
273 | /* preemption should be already off */ | ||
274 | vsyscall_set_cpu(raw_smp_processor_id()); | ||
275 | } | ||
276 | |||
277 | static int __cpuinit | ||
278 | cpu_vsyscall_notifier(struct notifier_block *n, unsigned long action, void *arg) | ||
279 | { | ||
280 | long cpu = (long)arg; | ||
281 | if (action == CPU_ONLINE) | ||
282 | smp_call_function_single(cpu, cpu_vsyscall_init, NULL, 0, 1); | ||
283 | return NOTIFY_DONE; | ||
284 | } | ||
285 | |||
283 | static void __init map_vsyscall(void) | 286 | static void __init map_vsyscall(void) |
284 | { | 287 | { |
285 | extern char __vsyscall_0; | 288 | extern char __vsyscall_0; |
@@ -299,6 +302,8 @@ static int __init vsyscall_init(void) | |||
299 | #ifdef CONFIG_SYSCTL | 302 | #ifdef CONFIG_SYSCTL |
300 | register_sysctl_table(kernel_root_table2, 0); | 303 | register_sysctl_table(kernel_root_table2, 0); |
301 | #endif | 304 | #endif |
305 | on_each_cpu(cpu_vsyscall_init, NULL, 0, 1); | ||
306 | hotcpu_notifier(cpu_vsyscall_notifier, 0); | ||
302 | return 0; | 307 | return 0; |
303 | } | 308 | } |
304 | 309 | ||
diff --git a/arch/x86_64/mm/init.c b/arch/x86_64/mm/init.c index 971dc1181e69..f1f977aafae1 100644 --- a/arch/x86_64/mm/init.c +++ b/arch/x86_64/mm/init.c | |||
@@ -655,9 +655,22 @@ void free_initrd_mem(unsigned long start, unsigned long end) | |||
655 | 655 | ||
656 | void __init reserve_bootmem_generic(unsigned long phys, unsigned len) | 656 | void __init reserve_bootmem_generic(unsigned long phys, unsigned len) |
657 | { | 657 | { |
658 | /* Should check here against the e820 map to avoid double free */ | ||
659 | #ifdef CONFIG_NUMA | 658 | #ifdef CONFIG_NUMA |
660 | int nid = phys_to_nid(phys); | 659 | int nid = phys_to_nid(phys); |
660 | #endif | ||
661 | unsigned long pfn = phys >> PAGE_SHIFT; | ||
662 | if (pfn >= end_pfn) { | ||
663 | /* This can happen with kdump kernels when accessing firmware | ||
664 | tables. */ | ||
665 | if (pfn < end_pfn_map) | ||
666 | return; | ||
667 | printk(KERN_ERR "reserve_bootmem: illegal reserve %lx %u\n", | ||
668 | phys, len); | ||
669 | return; | ||
670 | } | ||
671 | |||
672 | /* Should check here against the e820 map to avoid double free */ | ||
673 | #ifdef CONFIG_NUMA | ||
661 | reserve_bootmem_node(NODE_DATA(nid), phys, len); | 674 | reserve_bootmem_node(NODE_DATA(nid), phys, len); |
662 | #else | 675 | #else |
663 | reserve_bootmem(phys, len); | 676 | reserve_bootmem(phys, len); |
diff --git a/arch/x86_64/pci/mmconfig.c b/arch/x86_64/pci/mmconfig.c index e61093b34c26..f8b6b2800a62 100644 --- a/arch/x86_64/pci/mmconfig.c +++ b/arch/x86_64/pci/mmconfig.c | |||
@@ -163,37 +163,6 @@ static __init void unreachable_devices(void) | |||
163 | } | 163 | } |
164 | } | 164 | } |
165 | 165 | ||
166 | static __init void pci_mmcfg_insert_resources(void) | ||
167 | { | ||
168 | #define PCI_MMCFG_RESOURCE_NAME_LEN 19 | ||
169 | int i; | ||
170 | struct resource *res; | ||
171 | char *names; | ||
172 | unsigned num_buses; | ||
173 | |||
174 | res = kcalloc(PCI_MMCFG_RESOURCE_NAME_LEN + sizeof(*res), | ||
175 | pci_mmcfg_config_num, GFP_KERNEL); | ||
176 | |||
177 | if (!res) { | ||
178 | printk(KERN_ERR "PCI: Unable to allocate MMCONFIG resources\n"); | ||
179 | return; | ||
180 | } | ||
181 | |||
182 | names = (void *)&res[pci_mmcfg_config_num]; | ||
183 | for (i = 0; i < pci_mmcfg_config_num; i++, res++) { | ||
184 | num_buses = pci_mmcfg_config[i].end_bus_number - | ||
185 | pci_mmcfg_config[i].start_bus_number + 1; | ||
186 | res->name = names; | ||
187 | snprintf(names, PCI_MMCFG_RESOURCE_NAME_LEN, "PCI MMCONFIG %u", | ||
188 | pci_mmcfg_config[i].pci_segment_group_number); | ||
189 | res->start = pci_mmcfg_config[i].base_address; | ||
190 | res->end = res->start + (num_buses << 20) - 1; | ||
191 | res->flags = IORESOURCE_MEM | IORESOURCE_BUSY; | ||
192 | insert_resource(&iomem_resource, res); | ||
193 | names += PCI_MMCFG_RESOURCE_NAME_LEN; | ||
194 | } | ||
195 | } | ||
196 | |||
197 | void __init pci_mmcfg_init(int type) | 166 | void __init pci_mmcfg_init(int type) |
198 | { | 167 | { |
199 | int i; | 168 | int i; |
@@ -237,7 +206,6 @@ void __init pci_mmcfg_init(int type) | |||
237 | } | 206 | } |
238 | 207 | ||
239 | unreachable_devices(); | 208 | unreachable_devices(); |
240 | pci_mmcfg_insert_resources(); | ||
241 | 209 | ||
242 | raw_pci_ops = &pci_mmcfg; | 210 | raw_pci_ops = &pci_mmcfg; |
243 | pci_probe = (pci_probe & ~PCI_PROBE_MASK) | PCI_PROBE_MMCONF; | 211 | pci_probe = (pci_probe & ~PCI_PROBE_MASK) | PCI_PROBE_MMCONF; |
diff --git a/block/scsi_ioctl.c b/block/scsi_ioctl.c index 2dc326421a24..e55a75621437 100644 --- a/block/scsi_ioctl.c +++ b/block/scsi_ioctl.c | |||
@@ -246,10 +246,10 @@ static int sg_io(struct file *file, request_queue_t *q, | |||
246 | switch (hdr->dxfer_direction) { | 246 | switch (hdr->dxfer_direction) { |
247 | default: | 247 | default: |
248 | return -EINVAL; | 248 | return -EINVAL; |
249 | case SG_DXFER_TO_FROM_DEV: | ||
250 | case SG_DXFER_TO_DEV: | 249 | case SG_DXFER_TO_DEV: |
251 | writing = 1; | 250 | writing = 1; |
252 | break; | 251 | break; |
252 | case SG_DXFER_TO_FROM_DEV: | ||
253 | case SG_DXFER_FROM_DEV: | 253 | case SG_DXFER_FROM_DEV: |
254 | break; | 254 | break; |
255 | } | 255 | } |
@@ -286,9 +286,8 @@ static int sg_io(struct file *file, request_queue_t *q, | |||
286 | * fill in request structure | 286 | * fill in request structure |
287 | */ | 287 | */ |
288 | rq->cmd_len = hdr->cmd_len; | 288 | rq->cmd_len = hdr->cmd_len; |
289 | memset(rq->cmd, 0, BLK_MAX_CDB); /* ATAPI hates garbage after CDB */ | ||
289 | memcpy(rq->cmd, cmd, hdr->cmd_len); | 290 | memcpy(rq->cmd, cmd, hdr->cmd_len); |
290 | if (sizeof(rq->cmd) != hdr->cmd_len) | ||
291 | memset(rq->cmd + hdr->cmd_len, 0, sizeof(rq->cmd) - hdr->cmd_len); | ||
292 | 291 | ||
293 | memset(sense, 0, sizeof(sense)); | 292 | memset(sense, 0, sizeof(sense)); |
294 | rq->sense = sense; | 293 | rq->sense = sense; |
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index a8fd0c3e59b3..915a55a6cc14 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c | |||
@@ -5957,7 +5957,7 @@ static void __exit ata_exit(void) | |||
5957 | destroy_workqueue(ata_aux_wq); | 5957 | destroy_workqueue(ata_aux_wq); |
5958 | } | 5958 | } |
5959 | 5959 | ||
5960 | module_init(ata_init); | 5960 | subsys_initcall(ata_init); |
5961 | module_exit(ata_exit); | 5961 | module_exit(ata_exit); |
5962 | 5962 | ||
5963 | static unsigned long ratelimit_time; | 5963 | static unsigned long ratelimit_time; |
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index 7af2a4ba4990..5c1fc467fc7f 100644 --- a/drivers/ata/libata-scsi.c +++ b/drivers/ata/libata-scsi.c | |||
@@ -1612,9 +1612,9 @@ early_finish: | |||
1612 | 1612 | ||
1613 | err_did: | 1613 | err_did: |
1614 | ata_qc_free(qc); | 1614 | ata_qc_free(qc); |
1615 | err_mem: | ||
1616 | cmd->result = (DID_ERROR << 16); | 1615 | cmd->result = (DID_ERROR << 16); |
1617 | done(cmd); | 1616 | done(cmd); |
1617 | err_mem: | ||
1618 | DPRINTK("EXIT - internal\n"); | 1618 | DPRINTK("EXIT - internal\n"); |
1619 | return 0; | 1619 | return 0; |
1620 | 1620 | ||
diff --git a/drivers/ata/pata_artop.c b/drivers/ata/pata_artop.c index 690828eb5226..96a098020a8f 100644 --- a/drivers/ata/pata_artop.c +++ b/drivers/ata/pata_artop.c | |||
@@ -92,7 +92,7 @@ static int artop6260_pre_reset(struct ata_port *ap) | |||
92 | return -ENOENT; | 92 | return -ENOENT; |
93 | 93 | ||
94 | pci_read_config_byte(pdev, 0x49, &tmp); | 94 | pci_read_config_byte(pdev, 0x49, &tmp); |
95 | if (tmp & (1 >> ap->port_no)) | 95 | if (tmp & (1 << ap->port_no)) |
96 | ap->cbl = ATA_CBL_PATA40; | 96 | ap->cbl = ATA_CBL_PATA40; |
97 | else | 97 | else |
98 | ap->cbl = ATA_CBL_PATA80; | 98 | ap->cbl = ATA_CBL_PATA80; |
diff --git a/drivers/ata/pata_hpt37x.c b/drivers/ata/pata_hpt37x.c index 7350443948c1..fce3fcdc7e79 100644 --- a/drivers/ata/pata_hpt37x.c +++ b/drivers/ata/pata_hpt37x.c | |||
@@ -25,7 +25,7 @@ | |||
25 | #include <linux/libata.h> | 25 | #include <linux/libata.h> |
26 | 26 | ||
27 | #define DRV_NAME "pata_hpt37x" | 27 | #define DRV_NAME "pata_hpt37x" |
28 | #define DRV_VERSION "0.5" | 28 | #define DRV_VERSION "0.5.1" |
29 | 29 | ||
30 | struct hpt_clock { | 30 | struct hpt_clock { |
31 | u8 xfer_speed; | 31 | u8 xfer_speed; |
@@ -453,7 +453,13 @@ static int hpt37x_pre_reset(struct ata_port *ap) | |||
453 | { | 453 | { |
454 | u8 scr2, ata66; | 454 | u8 scr2, ata66; |
455 | struct pci_dev *pdev = to_pci_dev(ap->host->dev); | 455 | struct pci_dev *pdev = to_pci_dev(ap->host->dev); |
456 | 456 | static const struct pci_bits hpt37x_enable_bits[] = { | |
457 | { 0x50, 1, 0x04, 0x04 }, | ||
458 | { 0x54, 1, 0x04, 0x04 } | ||
459 | }; | ||
460 | if (!pci_test_config_bits(pdev, &hpt37x_enable_bits[ap->port_no])) | ||
461 | return -ENOENT; | ||
462 | |||
457 | pci_read_config_byte(pdev, 0x5B, &scr2); | 463 | pci_read_config_byte(pdev, 0x5B, &scr2); |
458 | pci_write_config_byte(pdev, 0x5B, scr2 & ~0x01); | 464 | pci_write_config_byte(pdev, 0x5B, scr2 & ~0x01); |
459 | /* Cable register now active */ | 465 | /* Cable register now active */ |
@@ -488,10 +494,17 @@ static void hpt37x_error_handler(struct ata_port *ap) | |||
488 | 494 | ||
489 | static int hpt374_pre_reset(struct ata_port *ap) | 495 | static int hpt374_pre_reset(struct ata_port *ap) |
490 | { | 496 | { |
497 | static const struct pci_bits hpt37x_enable_bits[] = { | ||
498 | { 0x50, 1, 0x04, 0x04 }, | ||
499 | { 0x54, 1, 0x04, 0x04 } | ||
500 | }; | ||
491 | u16 mcr3, mcr6; | 501 | u16 mcr3, mcr6; |
492 | u8 ata66; | 502 | u8 ata66; |
493 | |||
494 | struct pci_dev *pdev = to_pci_dev(ap->host->dev); | 503 | struct pci_dev *pdev = to_pci_dev(ap->host->dev); |
504 | |||
505 | if (!pci_test_config_bits(pdev, &hpt37x_enable_bits[ap->port_no])) | ||
506 | return -ENOENT; | ||
507 | |||
495 | /* Do the extra channel work */ | 508 | /* Do the extra channel work */ |
496 | pci_read_config_word(pdev, 0x52, &mcr3); | 509 | pci_read_config_word(pdev, 0x52, &mcr3); |
497 | pci_read_config_word(pdev, 0x56, &mcr6); | 510 | pci_read_config_word(pdev, 0x56, &mcr6); |
diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c index 6ffe2b2bdacc..4105c3bf3476 100644 --- a/drivers/block/cciss.c +++ b/drivers/block/cciss.c | |||
@@ -1300,6 +1300,12 @@ static void cciss_softirq_done(struct request *rq) | |||
1300 | 1300 | ||
1301 | complete_buffers(rq->bio, rq->errors); | 1301 | complete_buffers(rq->bio, rq->errors); |
1302 | 1302 | ||
1303 | if (blk_fs_request(rq)) { | ||
1304 | const int rw = rq_data_dir(rq); | ||
1305 | |||
1306 | disk_stat_add(rq->rq_disk, sectors[rw], rq->nr_sectors); | ||
1307 | } | ||
1308 | |||
1303 | #ifdef CCISS_DEBUG | 1309 | #ifdef CCISS_DEBUG |
1304 | printk("Done with %p\n", rq); | 1310 | printk("Done with %p\n", rq); |
1305 | #endif /* CCISS_DEBUG */ | 1311 | #endif /* CCISS_DEBUG */ |
diff --git a/drivers/block/cpqarray.c b/drivers/block/cpqarray.c index 570d2f049323..d5f519ebbc08 100644 --- a/drivers/block/cpqarray.c +++ b/drivers/block/cpqarray.c | |||
@@ -998,6 +998,7 @@ static inline void complete_buffers(struct bio *bio, int ok) | |||
998 | */ | 998 | */ |
999 | static inline void complete_command(cmdlist_t *cmd, int timeout) | 999 | static inline void complete_command(cmdlist_t *cmd, int timeout) |
1000 | { | 1000 | { |
1001 | struct request *rq = cmd->rq; | ||
1001 | int ok=1; | 1002 | int ok=1; |
1002 | int i, ddir; | 1003 | int i, ddir; |
1003 | 1004 | ||
@@ -1029,12 +1030,18 @@ static inline void complete_command(cmdlist_t *cmd, int timeout) | |||
1029 | pci_unmap_page(hba[cmd->ctlr]->pci_dev, cmd->req.sg[i].addr, | 1030 | pci_unmap_page(hba[cmd->ctlr]->pci_dev, cmd->req.sg[i].addr, |
1030 | cmd->req.sg[i].size, ddir); | 1031 | cmd->req.sg[i].size, ddir); |
1031 | 1032 | ||
1032 | complete_buffers(cmd->rq->bio, ok); | 1033 | complete_buffers(rq->bio, ok); |
1033 | 1034 | ||
1034 | add_disk_randomness(cmd->rq->rq_disk); | 1035 | if (blk_fs_request(rq)) { |
1036 | const int rw = rq_data_dir(rq); | ||
1035 | 1037 | ||
1036 | DBGPX(printk("Done with %p\n", cmd->rq);); | 1038 | disk_stat_add(rq->rq_disk, sectors[rw], rq->nr_sectors); |
1037 | end_that_request_last(cmd->rq, ok ? 1 : -EIO); | 1039 | } |
1040 | |||
1041 | add_disk_randomness(rq->rq_disk); | ||
1042 | |||
1043 | DBGPX(printk("Done with %p\n", rq);); | ||
1044 | end_that_request_last(rq, ok ? 1 : -EIO); | ||
1038 | } | 1045 | } |
1039 | 1046 | ||
1040 | /* | 1047 | /* |
diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig index 39a9f8cc6412..2af12fc45115 100644 --- a/drivers/char/Kconfig +++ b/drivers/char/Kconfig | |||
@@ -409,14 +409,6 @@ config SGI_MBCS | |||
409 | If you have an SGI Altix with an attached SABrick | 409 | If you have an SGI Altix with an attached SABrick |
410 | say Y or M here, otherwise say N. | 410 | say Y or M here, otherwise say N. |
411 | 411 | ||
412 | config MSPEC | ||
413 | tristate "Memory special operations driver" | ||
414 | depends on IA64 | ||
415 | help | ||
416 | If you have an ia64 and you want to enable memory special | ||
417 | operations support (formerly known as fetchop), say Y here, | ||
418 | otherwise say N. | ||
419 | |||
420 | source "drivers/serial/Kconfig" | 412 | source "drivers/serial/Kconfig" |
421 | 413 | ||
422 | config UNIX98_PTYS | 414 | config UNIX98_PTYS |
diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c index 0b07ca1b71fa..c47add8e47df 100644 --- a/drivers/char/ipmi/ipmi_msghandler.c +++ b/drivers/char/ipmi/ipmi_msghandler.c | |||
@@ -1854,7 +1854,7 @@ static ssize_t provides_dev_sdrs_show(struct device *dev, | |||
1854 | struct bmc_device *bmc = dev_get_drvdata(dev); | 1854 | struct bmc_device *bmc = dev_get_drvdata(dev); |
1855 | 1855 | ||
1856 | return snprintf(buf, 10, "%u\n", | 1856 | return snprintf(buf, 10, "%u\n", |
1857 | bmc->id.device_revision && 0x80 >> 7); | 1857 | (bmc->id.device_revision & 0x80) >> 7); |
1858 | } | 1858 | } |
1859 | 1859 | ||
1860 | static ssize_t revision_show(struct device *dev, struct device_attribute *attr, | 1860 | static ssize_t revision_show(struct device *dev, struct device_attribute *attr, |
@@ -1863,7 +1863,7 @@ static ssize_t revision_show(struct device *dev, struct device_attribute *attr, | |||
1863 | struct bmc_device *bmc = dev_get_drvdata(dev); | 1863 | struct bmc_device *bmc = dev_get_drvdata(dev); |
1864 | 1864 | ||
1865 | return snprintf(buf, 20, "%u\n", | 1865 | return snprintf(buf, 20, "%u\n", |
1866 | bmc->id.device_revision && 0x0F); | 1866 | bmc->id.device_revision & 0x0F); |
1867 | } | 1867 | } |
1868 | 1868 | ||
1869 | static ssize_t firmware_rev_show(struct device *dev, | 1869 | static ssize_t firmware_rev_show(struct device *dev, |
@@ -2118,7 +2118,7 @@ static int ipmi_bmc_register(ipmi_smi_t intf) | |||
2118 | dev_set_drvdata(&bmc->dev->dev, bmc); | 2118 | dev_set_drvdata(&bmc->dev->dev, bmc); |
2119 | kref_init(&bmc->refcount); | 2119 | kref_init(&bmc->refcount); |
2120 | 2120 | ||
2121 | rv = platform_device_register(bmc->dev); | 2121 | rv = platform_device_add(bmc->dev); |
2122 | mutex_unlock(&ipmidriver_mutex); | 2122 | mutex_unlock(&ipmidriver_mutex); |
2123 | if (rv) { | 2123 | if (rv) { |
2124 | printk(KERN_ERR | 2124 | printk(KERN_ERR |
diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c index abc5149e30e8..bb1fac104fda 100644 --- a/drivers/char/ipmi/ipmi_si_intf.c +++ b/drivers/char/ipmi/ipmi_si_intf.c | |||
@@ -2346,7 +2346,7 @@ static int try_smi_init(struct smi_info *new_smi) | |||
2346 | new_smi->dev = &new_smi->pdev->dev; | 2346 | new_smi->dev = &new_smi->pdev->dev; |
2347 | new_smi->dev->driver = &ipmi_driver; | 2347 | new_smi->dev->driver = &ipmi_driver; |
2348 | 2348 | ||
2349 | rv = platform_device_register(new_smi->pdev); | 2349 | rv = platform_device_add(new_smi->pdev); |
2350 | if (rv) { | 2350 | if (rv) { |
2351 | printk(KERN_ERR | 2351 | printk(KERN_ERR |
2352 | "ipmi_si_intf:" | 2352 | "ipmi_si_intf:" |
diff --git a/drivers/char/isicom.c b/drivers/char/isicom.c index e9e9bf31c369..58c955e390b3 100644 --- a/drivers/char/isicom.c +++ b/drivers/char/isicom.c | |||
@@ -1062,11 +1062,12 @@ static void isicom_shutdown_port(struct isi_port *port) | |||
1062 | static void isicom_close(struct tty_struct *tty, struct file *filp) | 1062 | static void isicom_close(struct tty_struct *tty, struct file *filp) |
1063 | { | 1063 | { |
1064 | struct isi_port *port = tty->driver_data; | 1064 | struct isi_port *port = tty->driver_data; |
1065 | struct isi_board *card = port->card; | 1065 | struct isi_board *card; |
1066 | unsigned long flags; | 1066 | unsigned long flags; |
1067 | 1067 | ||
1068 | if (!port) | 1068 | if (!port) |
1069 | return; | 1069 | return; |
1070 | card = port->card; | ||
1070 | if (isicom_paranoia_check(port, tty->name, "isicom_close")) | 1071 | if (isicom_paranoia_check(port, tty->name, "isicom_close")) |
1071 | return; | 1072 | return; |
1072 | 1073 | ||
diff --git a/drivers/char/mspec.c b/drivers/char/mspec.c index 5c0dec39cf6c..235e89226112 100644 --- a/drivers/char/mspec.c +++ b/drivers/char/mspec.c | |||
@@ -72,7 +72,11 @@ enum { | |||
72 | MSPEC_UNCACHED | 72 | MSPEC_UNCACHED |
73 | }; | 73 | }; |
74 | 74 | ||
75 | #ifdef CONFIG_SGI_SN | ||
75 | static int is_sn2; | 76 | static int is_sn2; |
77 | #else | ||
78 | #define is_sn2 0 | ||
79 | #endif | ||
76 | 80 | ||
77 | /* | 81 | /* |
78 | * One of these structures is allocated when an mspec region is mmaped. The | 82 | * One of these structures is allocated when an mspec region is mmaped. The |
@@ -211,7 +215,7 @@ mspec_nopfn(struct vm_area_struct *vma, unsigned long address) | |||
211 | if (vdata->type == MSPEC_FETCHOP) | 215 | if (vdata->type == MSPEC_FETCHOP) |
212 | paddr = TO_AMO(maddr); | 216 | paddr = TO_AMO(maddr); |
213 | else | 217 | else |
214 | paddr = __pa(TO_CAC(maddr)); | 218 | paddr = maddr & ~__IA64_UNCACHED_OFFSET; |
215 | 219 | ||
216 | pfn = paddr >> PAGE_SHIFT; | 220 | pfn = paddr >> PAGE_SHIFT; |
217 | 221 | ||
@@ -335,6 +339,7 @@ mspec_init(void) | |||
335 | * The fetchop device only works on SN2 hardware, uncached and cached | 339 | * The fetchop device only works on SN2 hardware, uncached and cached |
336 | * memory drivers should both be valid on all ia64 hardware | 340 | * memory drivers should both be valid on all ia64 hardware |
337 | */ | 341 | */ |
342 | #ifdef CONFIG_SGI_SN | ||
338 | if (ia64_platform_is("sn2")) { | 343 | if (ia64_platform_is("sn2")) { |
339 | is_sn2 = 1; | 344 | is_sn2 = 1; |
340 | if (is_shub2()) { | 345 | if (is_shub2()) { |
@@ -363,6 +368,7 @@ mspec_init(void) | |||
363 | goto free_scratch_pages; | 368 | goto free_scratch_pages; |
364 | } | 369 | } |
365 | } | 370 | } |
371 | #endif | ||
366 | ret = misc_register(&cached_miscdev); | 372 | ret = misc_register(&cached_miscdev); |
367 | if (ret) { | 373 | if (ret) { |
368 | printk(KERN_ERR "%s: failed to register device %i\n", | 374 | printk(KERN_ERR "%s: failed to register device %i\n", |
diff --git a/drivers/firmware/dell_rbu.c b/drivers/firmware/dell_rbu.c index 08b161798443..fc702e40bd43 100644 --- a/drivers/firmware/dell_rbu.c +++ b/drivers/firmware/dell_rbu.c | |||
@@ -705,17 +705,16 @@ static struct bin_attribute rbu_packet_size_attr = { | |||
705 | 705 | ||
706 | static int __init dcdrbu_init(void) | 706 | static int __init dcdrbu_init(void) |
707 | { | 707 | { |
708 | int rc = 0; | 708 | int rc; |
709 | spin_lock_init(&rbu_data.lock); | 709 | spin_lock_init(&rbu_data.lock); |
710 | 710 | ||
711 | init_packet_head(); | 711 | init_packet_head(); |
712 | rbu_device = | 712 | rbu_device = platform_device_register_simple("dell_rbu", -1, NULL, 0); |
713 | platform_device_register_simple("dell_rbu", -1, NULL, 0); | 713 | if (IS_ERR(rbu_device)) { |
714 | if (!rbu_device) { | ||
715 | printk(KERN_ERR | 714 | printk(KERN_ERR |
716 | "dell_rbu:%s:platform_device_register_simple " | 715 | "dell_rbu:%s:platform_device_register_simple " |
717 | "failed\n", __FUNCTION__); | 716 | "failed\n", __FUNCTION__); |
718 | return -EIO; | 717 | return PTR_ERR(rbu_device); |
719 | } | 718 | } |
720 | 719 | ||
721 | rc = sysfs_create_bin_file(&rbu_device->dev.kobj, &rbu_data_attr); | 720 | rc = sysfs_create_bin_file(&rbu_device->dev.kobj, &rbu_data_attr); |
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c index bddfebdf91d8..88214943d00a 100644 --- a/drivers/ide/ide-cd.c +++ b/drivers/ide/ide-cd.c | |||
@@ -724,7 +724,7 @@ static int cdrom_decode_status(ide_drive_t *drive, int good_stat, int *stat_ret) | |||
724 | * if we have an error, pass back CHECK_CONDITION as the | 724 | * if we have an error, pass back CHECK_CONDITION as the |
725 | * scsi status byte | 725 | * scsi status byte |
726 | */ | 726 | */ |
727 | if (!rq->errors) | 727 | if (blk_pc_request(rq) && !rq->errors) |
728 | rq->errors = SAM_STAT_CHECK_CONDITION; | 728 | rq->errors = SAM_STAT_CHECK_CONDITION; |
729 | 729 | ||
730 | /* Check for tray open. */ | 730 | /* Check for tray open. */ |
diff --git a/drivers/ide/legacy/hd.c b/drivers/ide/legacy/hd.c index b1d5291531b7..45ed03591cd8 100644 --- a/drivers/ide/legacy/hd.c +++ b/drivers/ide/legacy/hd.c | |||
@@ -459,7 +459,7 @@ ok_to_read: | |||
459 | #ifdef DEBUG | 459 | #ifdef DEBUG |
460 | printk("%s: read: sector %ld, remaining = %ld, buffer=%p\n", | 460 | printk("%s: read: sector %ld, remaining = %ld, buffer=%p\n", |
461 | req->rq_disk->disk_name, req->sector, req->nr_sectors, | 461 | req->rq_disk->disk_name, req->sector, req->nr_sectors, |
462 | req->buffer+512)); | 462 | req->buffer+512); |
463 | #endif | 463 | #endif |
464 | if (req->current_nr_sectors <= 0) | 464 | if (req->current_nr_sectors <= 0) |
465 | end_request(req, 1); | 465 | end_request(req, 1); |
diff --git a/drivers/infiniband/core/mad.c b/drivers/infiniband/core/mad.c index 493f4c65c7a2..a72bcea46ff6 100644 --- a/drivers/infiniband/core/mad.c +++ b/drivers/infiniband/core/mad.c | |||
@@ -1750,7 +1750,7 @@ ib_find_send_mad(struct ib_mad_agent_private *mad_agent_priv, | |||
1750 | */ | 1750 | */ |
1751 | (is_direct(wc->recv_buf.mad->mad_hdr.mgmt_class) || | 1751 | (is_direct(wc->recv_buf.mad->mad_hdr.mgmt_class) || |
1752 | rcv_has_same_gid(mad_agent_priv, wr, wc))) | 1752 | rcv_has_same_gid(mad_agent_priv, wr, wc))) |
1753 | return wr; | 1753 | return (wr->status == IB_WC_SUCCESS) ? wr : NULL; |
1754 | } | 1754 | } |
1755 | 1755 | ||
1756 | /* | 1756 | /* |
diff --git a/drivers/infiniband/hw/amso1100/c2.c b/drivers/infiniband/hw/amso1100/c2.c index 9e7bd94b958a..27fe242ed435 100644 --- a/drivers/infiniband/hw/amso1100/c2.c +++ b/drivers/infiniband/hw/amso1100/c2.c | |||
@@ -1155,7 +1155,8 @@ static int __devinit c2_probe(struct pci_dev *pcidev, | |||
1155 | goto bail10; | 1155 | goto bail10; |
1156 | } | 1156 | } |
1157 | 1157 | ||
1158 | c2_register_device(c2dev); | 1158 | if (c2_register_device(c2dev)) |
1159 | goto bail10; | ||
1159 | 1160 | ||
1160 | return 0; | 1161 | return 0; |
1161 | 1162 | ||
diff --git a/drivers/infiniband/hw/amso1100/c2_provider.c b/drivers/infiniband/hw/amso1100/c2_provider.c index da98d9f71429..fef972752912 100644 --- a/drivers/infiniband/hw/amso1100/c2_provider.c +++ b/drivers/infiniband/hw/amso1100/c2_provider.c | |||
@@ -757,20 +757,17 @@ static struct net_device *c2_pseudo_netdev_init(struct c2_dev *c2dev) | |||
757 | 757 | ||
758 | int c2_register_device(struct c2_dev *dev) | 758 | int c2_register_device(struct c2_dev *dev) |
759 | { | 759 | { |
760 | int ret; | 760 | int ret = -ENOMEM; |
761 | int i; | 761 | int i; |
762 | 762 | ||
763 | /* Register pseudo network device */ | 763 | /* Register pseudo network device */ |
764 | dev->pseudo_netdev = c2_pseudo_netdev_init(dev); | 764 | dev->pseudo_netdev = c2_pseudo_netdev_init(dev); |
765 | if (dev->pseudo_netdev) { | 765 | if (!dev->pseudo_netdev) |
766 | ret = register_netdev(dev->pseudo_netdev); | 766 | goto out3; |
767 | if (ret) { | 767 | |
768 | printk(KERN_ERR PFX | 768 | ret = register_netdev(dev->pseudo_netdev); |
769 | "Unable to register netdev, ret = %d\n", ret); | 769 | if (ret) |
770 | free_netdev(dev->pseudo_netdev); | 770 | goto out2; |
771 | return ret; | ||
772 | } | ||
773 | } | ||
774 | 771 | ||
775 | pr_debug("%s:%u\n", __FUNCTION__, __LINE__); | 772 | pr_debug("%s:%u\n", __FUNCTION__, __LINE__); |
776 | strlcpy(dev->ibdev.name, "amso%d", IB_DEVICE_NAME_MAX); | 773 | strlcpy(dev->ibdev.name, "amso%d", IB_DEVICE_NAME_MAX); |
@@ -848,21 +845,25 @@ int c2_register_device(struct c2_dev *dev) | |||
848 | 845 | ||
849 | ret = ib_register_device(&dev->ibdev); | 846 | ret = ib_register_device(&dev->ibdev); |
850 | if (ret) | 847 | if (ret) |
851 | return ret; | 848 | goto out1; |
852 | 849 | ||
853 | for (i = 0; i < ARRAY_SIZE(c2_class_attributes); ++i) { | 850 | for (i = 0; i < ARRAY_SIZE(c2_class_attributes); ++i) { |
854 | ret = class_device_create_file(&dev->ibdev.class_dev, | 851 | ret = class_device_create_file(&dev->ibdev.class_dev, |
855 | c2_class_attributes[i]); | 852 | c2_class_attributes[i]); |
856 | if (ret) { | 853 | if (ret) |
857 | unregister_netdev(dev->pseudo_netdev); | 854 | goto out0; |
858 | free_netdev(dev->pseudo_netdev); | ||
859 | ib_unregister_device(&dev->ibdev); | ||
860 | return ret; | ||
861 | } | ||
862 | } | 855 | } |
856 | goto out3; | ||
863 | 857 | ||
864 | pr_debug("%s:%u\n", __FUNCTION__, __LINE__); | 858 | out0: |
865 | return 0; | 859 | ib_unregister_device(&dev->ibdev); |
860 | out1: | ||
861 | unregister_netdev(dev->pseudo_netdev); | ||
862 | out2: | ||
863 | free_netdev(dev->pseudo_netdev); | ||
864 | out3: | ||
865 | pr_debug("%s:%u ret=%d\n", __FUNCTION__, __LINE__, ret); | ||
866 | return ret; | ||
866 | } | 867 | } |
867 | 868 | ||
868 | void c2_unregister_device(struct c2_dev *dev) | 869 | void c2_unregister_device(struct c2_dev *dev) |
diff --git a/drivers/infiniband/hw/amso1100/c2_rnic.c b/drivers/infiniband/hw/amso1100/c2_rnic.c index 21d9612a56cc..623dc95f91df 100644 --- a/drivers/infiniband/hw/amso1100/c2_rnic.c +++ b/drivers/infiniband/hw/amso1100/c2_rnic.c | |||
@@ -157,8 +157,8 @@ static int c2_rnic_query(struct c2_dev *c2dev, struct ib_device_attr *props) | |||
157 | 157 | ||
158 | props->fw_ver = | 158 | props->fw_ver = |
159 | ((u64)be32_to_cpu(reply->fw_ver_major) << 32) | | 159 | ((u64)be32_to_cpu(reply->fw_ver_major) << 32) | |
160 | ((be32_to_cpu(reply->fw_ver_minor) && 0xFFFF) << 16) | | 160 | ((be32_to_cpu(reply->fw_ver_minor) & 0xFFFF) << 16) | |
161 | (be32_to_cpu(reply->fw_ver_patch) && 0xFFFF); | 161 | (be32_to_cpu(reply->fw_ver_patch) & 0xFFFF); |
162 | memcpy(&props->sys_image_guid, c2dev->netdev->dev_addr, 6); | 162 | memcpy(&props->sys_image_guid, c2dev->netdev->dev_addr, 6); |
163 | props->max_mr_size = 0xFFFFFFFF; | 163 | props->max_mr_size = 0xFFFFFFFF; |
164 | props->page_size_cap = ~(C2_MIN_PAGESIZE-1); | 164 | props->page_size_cap = ~(C2_MIN_PAGESIZE-1); |
diff --git a/drivers/infiniband/hw/ehca/Kconfig b/drivers/infiniband/hw/ehca/Kconfig index 922389b64394..727b10d89686 100644 --- a/drivers/infiniband/hw/ehca/Kconfig +++ b/drivers/infiniband/hw/ehca/Kconfig | |||
@@ -10,6 +10,7 @@ config INFINIBAND_EHCA | |||
10 | config INFINIBAND_EHCA_SCALING | 10 | config INFINIBAND_EHCA_SCALING |
11 | bool "Scaling support (EXPERIMENTAL)" | 11 | bool "Scaling support (EXPERIMENTAL)" |
12 | depends on IBMEBUS && INFINIBAND_EHCA && HOTPLUG_CPU && EXPERIMENTAL | 12 | depends on IBMEBUS && INFINIBAND_EHCA && HOTPLUG_CPU && EXPERIMENTAL |
13 | default y | ||
13 | ---help--- | 14 | ---help--- |
14 | eHCA scaling support schedules the CQ callbacks to different CPUs. | 15 | eHCA scaling support schedules the CQ callbacks to different CPUs. |
15 | 16 | ||
diff --git a/drivers/infiniband/hw/ehca/ehca_av.c b/drivers/infiniband/hw/ehca/ehca_av.c index 3bac197f9014..214e2fdddeef 100644 --- a/drivers/infiniband/hw/ehca/ehca_av.c +++ b/drivers/infiniband/hw/ehca/ehca_av.c | |||
@@ -118,8 +118,7 @@ struct ib_ah *ehca_create_ah(struct ib_pd *pd, struct ib_ah_attr *ah_attr) | |||
118 | } | 118 | } |
119 | memcpy(&av->av.grh.word_1, &gid, sizeof(gid)); | 119 | memcpy(&av->av.grh.word_1, &gid, sizeof(gid)); |
120 | } | 120 | } |
121 | /* for the time being we use a hard coded PMTU of 2048 Bytes */ | 121 | av->av.pmtu = EHCA_MAX_MTU; |
122 | av->av.pmtu = 4; | ||
123 | 122 | ||
124 | /* dgid comes in grh.word_3 */ | 123 | /* dgid comes in grh.word_3 */ |
125 | memcpy(&av->av.grh.word_3, &ah_attr->grh.dgid, | 124 | memcpy(&av->av.grh.word_3, &ah_attr->grh.dgid, |
@@ -193,7 +192,7 @@ int ehca_modify_ah(struct ib_ah *ah, struct ib_ah_attr *ah_attr) | |||
193 | memcpy(&new_ehca_av.grh.word_1, &gid, sizeof(gid)); | 192 | memcpy(&new_ehca_av.grh.word_1, &gid, sizeof(gid)); |
194 | } | 193 | } |
195 | 194 | ||
196 | new_ehca_av.pmtu = 4; /* see also comment in create_ah() */ | 195 | new_ehca_av.pmtu = EHCA_MAX_MTU; |
197 | 196 | ||
198 | memcpy(&new_ehca_av.grh.word_3, &ah_attr->grh.dgid, | 197 | memcpy(&new_ehca_av.grh.word_3, &ah_attr->grh.dgid, |
199 | sizeof(ah_attr->grh.dgid)); | 198 | sizeof(ah_attr->grh.dgid)); |
diff --git a/drivers/infiniband/hw/ehca/ehca_hca.c b/drivers/infiniband/hw/ehca/ehca_hca.c index 5eae6ac48425..e1b618c5f685 100644 --- a/drivers/infiniband/hw/ehca/ehca_hca.c +++ b/drivers/infiniband/hw/ehca/ehca_hca.c | |||
@@ -40,6 +40,7 @@ | |||
40 | */ | 40 | */ |
41 | 41 | ||
42 | #include "ehca_tools.h" | 42 | #include "ehca_tools.h" |
43 | #include "ehca_iverbs.h" | ||
43 | #include "hcp_if.h" | 44 | #include "hcp_if.h" |
44 | 45 | ||
45 | int ehca_query_device(struct ib_device *ibdev, struct ib_device_attr *props) | 46 | int ehca_query_device(struct ib_device *ibdev, struct ib_device_attr *props) |
@@ -49,7 +50,7 @@ int ehca_query_device(struct ib_device *ibdev, struct ib_device_attr *props) | |||
49 | ib_device); | 50 | ib_device); |
50 | struct hipz_query_hca *rblock; | 51 | struct hipz_query_hca *rblock; |
51 | 52 | ||
52 | rblock = kzalloc(H_CB_ALIGNMENT, GFP_KERNEL); | 53 | rblock = ehca_alloc_fw_ctrlblock(); |
53 | if (!rblock) { | 54 | if (!rblock) { |
54 | ehca_err(&shca->ib_device, "Can't allocate rblock memory."); | 55 | ehca_err(&shca->ib_device, "Can't allocate rblock memory."); |
55 | return -ENOMEM; | 56 | return -ENOMEM; |
@@ -96,7 +97,7 @@ int ehca_query_device(struct ib_device *ibdev, struct ib_device_attr *props) | |||
96 | = min_t(int, rblock->max_total_mcast_qp_attach, INT_MAX); | 97 | = min_t(int, rblock->max_total_mcast_qp_attach, INT_MAX); |
97 | 98 | ||
98 | query_device1: | 99 | query_device1: |
99 | kfree(rblock); | 100 | ehca_free_fw_ctrlblock(rblock); |
100 | 101 | ||
101 | return ret; | 102 | return ret; |
102 | } | 103 | } |
@@ -109,7 +110,7 @@ int ehca_query_port(struct ib_device *ibdev, | |||
109 | ib_device); | 110 | ib_device); |
110 | struct hipz_query_port *rblock; | 111 | struct hipz_query_port *rblock; |
111 | 112 | ||
112 | rblock = kzalloc(H_CB_ALIGNMENT, GFP_KERNEL); | 113 | rblock = ehca_alloc_fw_ctrlblock(); |
113 | if (!rblock) { | 114 | if (!rblock) { |
114 | ehca_err(&shca->ib_device, "Can't allocate rblock memory."); | 115 | ehca_err(&shca->ib_device, "Can't allocate rblock memory."); |
115 | return -ENOMEM; | 116 | return -ENOMEM; |
@@ -162,7 +163,7 @@ int ehca_query_port(struct ib_device *ibdev, | |||
162 | props->active_speed = 0x1; | 163 | props->active_speed = 0x1; |
163 | 164 | ||
164 | query_port1: | 165 | query_port1: |
165 | kfree(rblock); | 166 | ehca_free_fw_ctrlblock(rblock); |
166 | 167 | ||
167 | return ret; | 168 | return ret; |
168 | } | 169 | } |
@@ -178,7 +179,7 @@ int ehca_query_pkey(struct ib_device *ibdev, u8 port, u16 index, u16 *pkey) | |||
178 | return -EINVAL; | 179 | return -EINVAL; |
179 | } | 180 | } |
180 | 181 | ||
181 | rblock = kzalloc(H_CB_ALIGNMENT, GFP_KERNEL); | 182 | rblock = ehca_alloc_fw_ctrlblock(); |
182 | if (!rblock) { | 183 | if (!rblock) { |
183 | ehca_err(&shca->ib_device, "Can't allocate rblock memory."); | 184 | ehca_err(&shca->ib_device, "Can't allocate rblock memory."); |
184 | return -ENOMEM; | 185 | return -ENOMEM; |
@@ -193,7 +194,7 @@ int ehca_query_pkey(struct ib_device *ibdev, u8 port, u16 index, u16 *pkey) | |||
193 | memcpy(pkey, &rblock->pkey_entries + index, sizeof(u16)); | 194 | memcpy(pkey, &rblock->pkey_entries + index, sizeof(u16)); |
194 | 195 | ||
195 | query_pkey1: | 196 | query_pkey1: |
196 | kfree(rblock); | 197 | ehca_free_fw_ctrlblock(rblock); |
197 | 198 | ||
198 | return ret; | 199 | return ret; |
199 | } | 200 | } |
@@ -211,7 +212,7 @@ int ehca_query_gid(struct ib_device *ibdev, u8 port, | |||
211 | return -EINVAL; | 212 | return -EINVAL; |
212 | } | 213 | } |
213 | 214 | ||
214 | rblock = kzalloc(H_CB_ALIGNMENT, GFP_KERNEL); | 215 | rblock = ehca_alloc_fw_ctrlblock(); |
215 | if (!rblock) { | 216 | if (!rblock) { |
216 | ehca_err(&shca->ib_device, "Can't allocate rblock memory."); | 217 | ehca_err(&shca->ib_device, "Can't allocate rblock memory."); |
217 | return -ENOMEM; | 218 | return -ENOMEM; |
@@ -227,7 +228,7 @@ int ehca_query_gid(struct ib_device *ibdev, u8 port, | |||
227 | memcpy(&gid->raw[8], &rblock->guid_entries[index], sizeof(u64)); | 228 | memcpy(&gid->raw[8], &rblock->guid_entries[index], sizeof(u64)); |
228 | 229 | ||
229 | query_gid1: | 230 | query_gid1: |
230 | kfree(rblock); | 231 | ehca_free_fw_ctrlblock(rblock); |
231 | 232 | ||
232 | return ret; | 233 | return ret; |
233 | } | 234 | } |
diff --git a/drivers/infiniband/hw/ehca/ehca_irq.c b/drivers/infiniband/hw/ehca/ehca_irq.c index 048cc443d1e7..c3ea746e9045 100644 --- a/drivers/infiniband/hw/ehca/ehca_irq.c +++ b/drivers/infiniband/hw/ehca/ehca_irq.c | |||
@@ -45,6 +45,7 @@ | |||
45 | #include "ehca_tools.h" | 45 | #include "ehca_tools.h" |
46 | #include "hcp_if.h" | 46 | #include "hcp_if.h" |
47 | #include "hipz_fns.h" | 47 | #include "hipz_fns.h" |
48 | #include "ipz_pt_fn.h" | ||
48 | 49 | ||
49 | #define EQE_COMPLETION_EVENT EHCA_BMASK_IBM(1,1) | 50 | #define EQE_COMPLETION_EVENT EHCA_BMASK_IBM(1,1) |
50 | #define EQE_CQ_QP_NUMBER EHCA_BMASK_IBM(8,31) | 51 | #define EQE_CQ_QP_NUMBER EHCA_BMASK_IBM(8,31) |
@@ -137,38 +138,36 @@ int ehca_error_data(struct ehca_shca *shca, void *data, | |||
137 | u64 *rblock; | 138 | u64 *rblock; |
138 | unsigned long block_count; | 139 | unsigned long block_count; |
139 | 140 | ||
140 | rblock = kzalloc(H_CB_ALIGNMENT, GFP_KERNEL); | 141 | rblock = ehca_alloc_fw_ctrlblock(); |
141 | if (!rblock) { | 142 | if (!rblock) { |
142 | ehca_err(&shca->ib_device, "Cannot allocate rblock memory."); | 143 | ehca_err(&shca->ib_device, "Cannot allocate rblock memory."); |
143 | ret = -ENOMEM; | 144 | ret = -ENOMEM; |
144 | goto error_data1; | 145 | goto error_data1; |
145 | } | 146 | } |
146 | 147 | ||
148 | /* rblock must be 4K aligned and should be 4K large */ | ||
147 | ret = hipz_h_error_data(shca->ipz_hca_handle, | 149 | ret = hipz_h_error_data(shca->ipz_hca_handle, |
148 | resource, | 150 | resource, |
149 | rblock, | 151 | rblock, |
150 | &block_count); | 152 | &block_count); |
151 | 153 | ||
152 | if (ret == H_R_STATE) { | 154 | if (ret == H_R_STATE) |
153 | ehca_err(&shca->ib_device, | 155 | ehca_err(&shca->ib_device, |
154 | "No error data is available: %lx.", resource); | 156 | "No error data is available: %lx.", resource); |
155 | } | ||
156 | else if (ret == H_SUCCESS) { | 157 | else if (ret == H_SUCCESS) { |
157 | int length; | 158 | int length; |
158 | 159 | ||
159 | length = EHCA_BMASK_GET(ERROR_DATA_LENGTH, rblock[0]); | 160 | length = EHCA_BMASK_GET(ERROR_DATA_LENGTH, rblock[0]); |
160 | 161 | ||
161 | if (length > PAGE_SIZE) | 162 | if (length > EHCA_PAGESIZE) |
162 | length = PAGE_SIZE; | 163 | length = EHCA_PAGESIZE; |
163 | 164 | ||
164 | print_error_data(shca, data, rblock, length); | 165 | print_error_data(shca, data, rblock, length); |
165 | } | 166 | } else |
166 | else { | ||
167 | ehca_err(&shca->ib_device, | 167 | ehca_err(&shca->ib_device, |
168 | "Error data could not be fetched: %lx", resource); | 168 | "Error data could not be fetched: %lx", resource); |
169 | } | ||
170 | 169 | ||
171 | kfree(rblock); | 170 | ehca_free_fw_ctrlblock(rblock); |
172 | 171 | ||
173 | error_data1: | 172 | error_data1: |
174 | return ret; | 173 | return ret; |
diff --git a/drivers/infiniband/hw/ehca/ehca_iverbs.h b/drivers/infiniband/hw/ehca/ehca_iverbs.h index 319c39d47f3a..3720e3032cce 100644 --- a/drivers/infiniband/hw/ehca/ehca_iverbs.h +++ b/drivers/infiniband/hw/ehca/ehca_iverbs.h | |||
@@ -179,4 +179,12 @@ int ehca_mmap_register(u64 physical,void **mapped, | |||
179 | 179 | ||
180 | int ehca_munmap(unsigned long addr, size_t len); | 180 | int ehca_munmap(unsigned long addr, size_t len); |
181 | 181 | ||
182 | #ifdef CONFIG_PPC_64K_PAGES | ||
183 | void *ehca_alloc_fw_ctrlblock(void); | ||
184 | void ehca_free_fw_ctrlblock(void *ptr); | ||
185 | #else | ||
186 | #define ehca_alloc_fw_ctrlblock() ((void *) get_zeroed_page(GFP_KERNEL)) | ||
187 | #define ehca_free_fw_ctrlblock(ptr) free_page((unsigned long)(ptr)) | ||
188 | #endif | ||
189 | |||
182 | #endif | 190 | #endif |
diff --git a/drivers/infiniband/hw/ehca/ehca_main.c b/drivers/infiniband/hw/ehca/ehca_main.c index 024d511c4b58..01f5aa9cb56d 100644 --- a/drivers/infiniband/hw/ehca/ehca_main.c +++ b/drivers/infiniband/hw/ehca/ehca_main.c | |||
@@ -40,6 +40,9 @@ | |||
40 | * POSSIBILITY OF SUCH DAMAGE. | 40 | * POSSIBILITY OF SUCH DAMAGE. |
41 | */ | 41 | */ |
42 | 42 | ||
43 | #ifdef CONFIG_PPC_64K_PAGES | ||
44 | #include <linux/slab.h> | ||
45 | #endif | ||
43 | #include "ehca_classes.h" | 46 | #include "ehca_classes.h" |
44 | #include "ehca_iverbs.h" | 47 | #include "ehca_iverbs.h" |
45 | #include "ehca_mrmw.h" | 48 | #include "ehca_mrmw.h" |
@@ -49,7 +52,7 @@ | |||
49 | MODULE_LICENSE("Dual BSD/GPL"); | 52 | MODULE_LICENSE("Dual BSD/GPL"); |
50 | MODULE_AUTHOR("Christoph Raisch <raisch@de.ibm.com>"); | 53 | MODULE_AUTHOR("Christoph Raisch <raisch@de.ibm.com>"); |
51 | MODULE_DESCRIPTION("IBM eServer HCA InfiniBand Device Driver"); | 54 | MODULE_DESCRIPTION("IBM eServer HCA InfiniBand Device Driver"); |
52 | MODULE_VERSION("SVNEHCA_0017"); | 55 | MODULE_VERSION("SVNEHCA_0018"); |
53 | 56 | ||
54 | int ehca_open_aqp1 = 0; | 57 | int ehca_open_aqp1 = 0; |
55 | int ehca_debug_level = 0; | 58 | int ehca_debug_level = 0; |
@@ -94,11 +97,31 @@ spinlock_t ehca_cq_idr_lock; | |||
94 | DEFINE_IDR(ehca_qp_idr); | 97 | DEFINE_IDR(ehca_qp_idr); |
95 | DEFINE_IDR(ehca_cq_idr); | 98 | DEFINE_IDR(ehca_cq_idr); |
96 | 99 | ||
100 | |||
97 | static struct list_head shca_list; /* list of all registered ehcas */ | 101 | static struct list_head shca_list; /* list of all registered ehcas */ |
98 | static spinlock_t shca_list_lock; | 102 | static spinlock_t shca_list_lock; |
99 | 103 | ||
100 | static struct timer_list poll_eqs_timer; | 104 | static struct timer_list poll_eqs_timer; |
101 | 105 | ||
106 | #ifdef CONFIG_PPC_64K_PAGES | ||
107 | static struct kmem_cache *ctblk_cache = NULL; | ||
108 | |||
109 | void *ehca_alloc_fw_ctrlblock(void) | ||
110 | { | ||
111 | void *ret = kmem_cache_zalloc(ctblk_cache, SLAB_KERNEL); | ||
112 | if (!ret) | ||
113 | ehca_gen_err("Out of memory for ctblk"); | ||
114 | return ret; | ||
115 | } | ||
116 | |||
117 | void ehca_free_fw_ctrlblock(void *ptr) | ||
118 | { | ||
119 | if (ptr) | ||
120 | kmem_cache_free(ctblk_cache, ptr); | ||
121 | |||
122 | } | ||
123 | #endif | ||
124 | |||
102 | static int ehca_create_slab_caches(void) | 125 | static int ehca_create_slab_caches(void) |
103 | { | 126 | { |
104 | int ret; | 127 | int ret; |
@@ -133,6 +156,17 @@ static int ehca_create_slab_caches(void) | |||
133 | goto create_slab_caches5; | 156 | goto create_slab_caches5; |
134 | } | 157 | } |
135 | 158 | ||
159 | #ifdef CONFIG_PPC_64K_PAGES | ||
160 | ctblk_cache = kmem_cache_create("ehca_cache_ctblk", | ||
161 | EHCA_PAGESIZE, H_CB_ALIGNMENT, | ||
162 | SLAB_HWCACHE_ALIGN, | ||
163 | NULL, NULL); | ||
164 | if (!ctblk_cache) { | ||
165 | ehca_gen_err("Cannot create ctblk SLAB cache."); | ||
166 | ehca_cleanup_mrmw_cache(); | ||
167 | goto create_slab_caches5; | ||
168 | } | ||
169 | #endif | ||
136 | return 0; | 170 | return 0; |
137 | 171 | ||
138 | create_slab_caches5: | 172 | create_slab_caches5: |
@@ -157,6 +191,10 @@ static void ehca_destroy_slab_caches(void) | |||
157 | ehca_cleanup_qp_cache(); | 191 | ehca_cleanup_qp_cache(); |
158 | ehca_cleanup_cq_cache(); | 192 | ehca_cleanup_cq_cache(); |
159 | ehca_cleanup_pd_cache(); | 193 | ehca_cleanup_pd_cache(); |
194 | #ifdef CONFIG_PPC_64K_PAGES | ||
195 | if (ctblk_cache) | ||
196 | kmem_cache_destroy(ctblk_cache); | ||
197 | #endif | ||
160 | } | 198 | } |
161 | 199 | ||
162 | #define EHCA_HCAAVER EHCA_BMASK_IBM(32,39) | 200 | #define EHCA_HCAAVER EHCA_BMASK_IBM(32,39) |
@@ -168,7 +206,7 @@ int ehca_sense_attributes(struct ehca_shca *shca) | |||
168 | u64 h_ret; | 206 | u64 h_ret; |
169 | struct hipz_query_hca *rblock; | 207 | struct hipz_query_hca *rblock; |
170 | 208 | ||
171 | rblock = kzalloc(H_CB_ALIGNMENT, GFP_KERNEL); | 209 | rblock = ehca_alloc_fw_ctrlblock(); |
172 | if (!rblock) { | 210 | if (!rblock) { |
173 | ehca_gen_err("Cannot allocate rblock memory."); | 211 | ehca_gen_err("Cannot allocate rblock memory."); |
174 | return -ENOMEM; | 212 | return -ENOMEM; |
@@ -211,7 +249,7 @@ int ehca_sense_attributes(struct ehca_shca *shca) | |||
211 | shca->sport[1].rate = IB_RATE_30_GBPS; | 249 | shca->sport[1].rate = IB_RATE_30_GBPS; |
212 | 250 | ||
213 | num_ports1: | 251 | num_ports1: |
214 | kfree(rblock); | 252 | ehca_free_fw_ctrlblock(rblock); |
215 | return ret; | 253 | return ret; |
216 | } | 254 | } |
217 | 255 | ||
@@ -220,7 +258,7 @@ static int init_node_guid(struct ehca_shca *shca) | |||
220 | int ret = 0; | 258 | int ret = 0; |
221 | struct hipz_query_hca *rblock; | 259 | struct hipz_query_hca *rblock; |
222 | 260 | ||
223 | rblock = kzalloc(H_CB_ALIGNMENT, GFP_KERNEL); | 261 | rblock = ehca_alloc_fw_ctrlblock(); |
224 | if (!rblock) { | 262 | if (!rblock) { |
225 | ehca_err(&shca->ib_device, "Can't allocate rblock memory."); | 263 | ehca_err(&shca->ib_device, "Can't allocate rblock memory."); |
226 | return -ENOMEM; | 264 | return -ENOMEM; |
@@ -235,7 +273,7 @@ static int init_node_guid(struct ehca_shca *shca) | |||
235 | memcpy(&shca->ib_device.node_guid, &rblock->node_guid, sizeof(u64)); | 273 | memcpy(&shca->ib_device.node_guid, &rblock->node_guid, sizeof(u64)); |
236 | 274 | ||
237 | init_node_guid1: | 275 | init_node_guid1: |
238 | kfree(rblock); | 276 | ehca_free_fw_ctrlblock(rblock); |
239 | return ret; | 277 | return ret; |
240 | } | 278 | } |
241 | 279 | ||
@@ -431,7 +469,7 @@ static ssize_t ehca_show_##name(struct device *dev, \ | |||
431 | \ | 469 | \ |
432 | shca = dev->driver_data; \ | 470 | shca = dev->driver_data; \ |
433 | \ | 471 | \ |
434 | rblock = kzalloc(H_CB_ALIGNMENT, GFP_KERNEL); \ | 472 | rblock = ehca_alloc_fw_ctrlblock(); \ |
435 | if (!rblock) { \ | 473 | if (!rblock) { \ |
436 | dev_err(dev, "Can't allocate rblock memory."); \ | 474 | dev_err(dev, "Can't allocate rblock memory."); \ |
437 | return 0; \ | 475 | return 0; \ |
@@ -439,12 +477,12 @@ static ssize_t ehca_show_##name(struct device *dev, \ | |||
439 | \ | 477 | \ |
440 | if (hipz_h_query_hca(shca->ipz_hca_handle, rblock) != H_SUCCESS) { \ | 478 | if (hipz_h_query_hca(shca->ipz_hca_handle, rblock) != H_SUCCESS) { \ |
441 | dev_err(dev, "Can't query device properties"); \ | 479 | dev_err(dev, "Can't query device properties"); \ |
442 | kfree(rblock); \ | 480 | ehca_free_fw_ctrlblock(rblock); \ |
443 | return 0; \ | 481 | return 0; \ |
444 | } \ | 482 | } \ |
445 | \ | 483 | \ |
446 | data = rblock->name; \ | 484 | data = rblock->name; \ |
447 | kfree(rblock); \ | 485 | ehca_free_fw_ctrlblock(rblock); \ |
448 | \ | 486 | \ |
449 | if ((strcmp(#name, "num_ports") == 0) && (ehca_nr_ports == 1)) \ | 487 | if ((strcmp(#name, "num_ports") == 0) && (ehca_nr_ports == 1)) \ |
450 | return snprintf(buf, 256, "1\n"); \ | 488 | return snprintf(buf, 256, "1\n"); \ |
@@ -752,7 +790,7 @@ int __init ehca_module_init(void) | |||
752 | int ret; | 790 | int ret; |
753 | 791 | ||
754 | printk(KERN_INFO "eHCA Infiniband Device Driver " | 792 | printk(KERN_INFO "eHCA Infiniband Device Driver " |
755 | "(Rel.: SVNEHCA_0017)\n"); | 793 | "(Rel.: SVNEHCA_0018)\n"); |
756 | idr_init(&ehca_qp_idr); | 794 | idr_init(&ehca_qp_idr); |
757 | idr_init(&ehca_cq_idr); | 795 | idr_init(&ehca_cq_idr); |
758 | spin_lock_init(&ehca_qp_idr_lock); | 796 | spin_lock_init(&ehca_qp_idr_lock); |
diff --git a/drivers/infiniband/hw/ehca/ehca_mrmw.c b/drivers/infiniband/hw/ehca/ehca_mrmw.c index 5ca65441e1da..abce676c0ae0 100644 --- a/drivers/infiniband/hw/ehca/ehca_mrmw.c +++ b/drivers/infiniband/hw/ehca/ehca_mrmw.c | |||
@@ -1013,7 +1013,7 @@ int ehca_reg_mr_rpages(struct ehca_shca *shca, | |||
1013 | u32 i; | 1013 | u32 i; |
1014 | u64 *kpage; | 1014 | u64 *kpage; |
1015 | 1015 | ||
1016 | kpage = kzalloc(H_CB_ALIGNMENT, GFP_KERNEL); | 1016 | kpage = ehca_alloc_fw_ctrlblock(); |
1017 | if (!kpage) { | 1017 | if (!kpage) { |
1018 | ehca_err(&shca->ib_device, "kpage alloc failed"); | 1018 | ehca_err(&shca->ib_device, "kpage alloc failed"); |
1019 | ret = -ENOMEM; | 1019 | ret = -ENOMEM; |
@@ -1092,7 +1092,7 @@ int ehca_reg_mr_rpages(struct ehca_shca *shca, | |||
1092 | 1092 | ||
1093 | 1093 | ||
1094 | ehca_reg_mr_rpages_exit1: | 1094 | ehca_reg_mr_rpages_exit1: |
1095 | kfree(kpage); | 1095 | ehca_free_fw_ctrlblock(kpage); |
1096 | ehca_reg_mr_rpages_exit0: | 1096 | ehca_reg_mr_rpages_exit0: |
1097 | if (ret) | 1097 | if (ret) |
1098 | ehca_err(&shca->ib_device, "ret=%x shca=%p e_mr=%p pginfo=%p " | 1098 | ehca_err(&shca->ib_device, "ret=%x shca=%p e_mr=%p pginfo=%p " |
@@ -1124,7 +1124,7 @@ inline int ehca_rereg_mr_rereg1(struct ehca_shca *shca, | |||
1124 | ehca_mrmw_map_acl(acl, &hipz_acl); | 1124 | ehca_mrmw_map_acl(acl, &hipz_acl); |
1125 | ehca_mrmw_set_pgsize_hipz_acl(&hipz_acl); | 1125 | ehca_mrmw_set_pgsize_hipz_acl(&hipz_acl); |
1126 | 1126 | ||
1127 | kpage = kzalloc(H_CB_ALIGNMENT, GFP_KERNEL); | 1127 | kpage = ehca_alloc_fw_ctrlblock(); |
1128 | if (!kpage) { | 1128 | if (!kpage) { |
1129 | ehca_err(&shca->ib_device, "kpage alloc failed"); | 1129 | ehca_err(&shca->ib_device, "kpage alloc failed"); |
1130 | ret = -ENOMEM; | 1130 | ret = -ENOMEM; |
@@ -1181,7 +1181,7 @@ inline int ehca_rereg_mr_rereg1(struct ehca_shca *shca, | |||
1181 | } | 1181 | } |
1182 | 1182 | ||
1183 | ehca_rereg_mr_rereg1_exit1: | 1183 | ehca_rereg_mr_rereg1_exit1: |
1184 | kfree(kpage); | 1184 | ehca_free_fw_ctrlblock(kpage); |
1185 | ehca_rereg_mr_rereg1_exit0: | 1185 | ehca_rereg_mr_rereg1_exit0: |
1186 | if ( ret && (ret != -EAGAIN) ) | 1186 | if ( ret && (ret != -EAGAIN) ) |
1187 | ehca_err(&shca->ib_device, "ret=%x lkey=%x rkey=%x " | 1187 | ehca_err(&shca->ib_device, "ret=%x lkey=%x rkey=%x " |
diff --git a/drivers/infiniband/hw/ehca/ehca_qp.c b/drivers/infiniband/hw/ehca/ehca_qp.c index 4394123cdbd7..cf3e50ee2d06 100644 --- a/drivers/infiniband/hw/ehca/ehca_qp.c +++ b/drivers/infiniband/hw/ehca/ehca_qp.c | |||
@@ -811,8 +811,8 @@ static int internal_modify_qp(struct ib_qp *ibqp, | |||
811 | unsigned long spl_flags = 0; | 811 | unsigned long spl_flags = 0; |
812 | 812 | ||
813 | /* do query_qp to obtain current attr values */ | 813 | /* do query_qp to obtain current attr values */ |
814 | mqpcb = kzalloc(H_CB_ALIGNMENT, GFP_KERNEL); | 814 | mqpcb = ehca_alloc_fw_ctrlblock(); |
815 | if (mqpcb == NULL) { | 815 | if (!mqpcb) { |
816 | ehca_err(ibqp->device, "Could not get zeroed page for mqpcb " | 816 | ehca_err(ibqp->device, "Could not get zeroed page for mqpcb " |
817 | "ehca_qp=%p qp_num=%x ", my_qp, ibqp->qp_num); | 817 | "ehca_qp=%p qp_num=%x ", my_qp, ibqp->qp_num); |
818 | return -ENOMEM; | 818 | return -ENOMEM; |
@@ -1225,7 +1225,7 @@ modify_qp_exit2: | |||
1225 | } | 1225 | } |
1226 | 1226 | ||
1227 | modify_qp_exit1: | 1227 | modify_qp_exit1: |
1228 | kfree(mqpcb); | 1228 | ehca_free_fw_ctrlblock(mqpcb); |
1229 | 1229 | ||
1230 | return ret; | 1230 | return ret; |
1231 | } | 1231 | } |
@@ -1277,7 +1277,7 @@ int ehca_query_qp(struct ib_qp *qp, | |||
1277 | return -EINVAL; | 1277 | return -EINVAL; |
1278 | } | 1278 | } |
1279 | 1279 | ||
1280 | qpcb = kzalloc(H_CB_ALIGNMENT, GFP_KERNEL ); | 1280 | qpcb = ehca_alloc_fw_ctrlblock(); |
1281 | if (!qpcb) { | 1281 | if (!qpcb) { |
1282 | ehca_err(qp->device,"Out of memory for qpcb " | 1282 | ehca_err(qp->device,"Out of memory for qpcb " |
1283 | "ehca_qp=%p qp_num=%x", my_qp, qp->qp_num); | 1283 | "ehca_qp=%p qp_num=%x", my_qp, qp->qp_num); |
@@ -1401,7 +1401,7 @@ int ehca_query_qp(struct ib_qp *qp, | |||
1401 | ehca_dmp(qpcb, 4*70, "qp_num=%x", qp->qp_num); | 1401 | ehca_dmp(qpcb, 4*70, "qp_num=%x", qp->qp_num); |
1402 | 1402 | ||
1403 | query_qp_exit1: | 1403 | query_qp_exit1: |
1404 | kfree(qpcb); | 1404 | ehca_free_fw_ctrlblock(qpcb); |
1405 | 1405 | ||
1406 | return ret; | 1406 | return ret; |
1407 | } | 1407 | } |
diff --git a/drivers/infiniband/hw/ehca/hipz_hw.h b/drivers/infiniband/hw/ehca/hipz_hw.h index 3fc92b031c50..fad91368dc5a 100644 --- a/drivers/infiniband/hw/ehca/hipz_hw.h +++ b/drivers/infiniband/hw/ehca/hipz_hw.h | |||
@@ -45,6 +45,8 @@ | |||
45 | 45 | ||
46 | #include "ehca_tools.h" | 46 | #include "ehca_tools.h" |
47 | 47 | ||
48 | #define EHCA_MAX_MTU 4 | ||
49 | |||
48 | /* QP Table Entry Memory Map */ | 50 | /* QP Table Entry Memory Map */ |
49 | struct hipz_qptemm { | 51 | struct hipz_qptemm { |
50 | u64 qpx_hcr; | 52 | u64 qpx_hcr; |
diff --git a/drivers/infiniband/hw/ipath/Kconfig b/drivers/infiniband/hw/ipath/Kconfig index 574a678e7fdd..5ca471ac6542 100644 --- a/drivers/infiniband/hw/ipath/Kconfig +++ b/drivers/infiniband/hw/ipath/Kconfig | |||
@@ -1,6 +1,6 @@ | |||
1 | config INFINIBAND_IPATH | 1 | config INFINIBAND_IPATH |
2 | tristate "QLogic InfiniPath Driver" | 2 | tristate "QLogic InfiniPath Driver" |
3 | depends on PCI_MSI && 64BIT && INFINIBAND | 3 | depends on (PCI_MSI || HT_IRQ) && 64BIT && INFINIBAND |
4 | ---help--- | 4 | ---help--- |
5 | This is a driver for QLogic InfiniPath host channel adapters, | 5 | This is a driver for QLogic InfiniPath host channel adapters, |
6 | including InfiniBand verbs support. This driver allows these | 6 | including InfiniBand verbs support. This driver allows these |
diff --git a/drivers/infiniband/hw/ipath/Makefile b/drivers/infiniband/hw/ipath/Makefile index 5e29cb0095e5..7dc10551cf18 100644 --- a/drivers/infiniband/hw/ipath/Makefile +++ b/drivers/infiniband/hw/ipath/Makefile | |||
@@ -10,8 +10,6 @@ ib_ipath-y := \ | |||
10 | ipath_eeprom.o \ | 10 | ipath_eeprom.o \ |
11 | ipath_file_ops.o \ | 11 | ipath_file_ops.o \ |
12 | ipath_fs.o \ | 12 | ipath_fs.o \ |
13 | ipath_iba6110.o \ | ||
14 | ipath_iba6120.o \ | ||
15 | ipath_init_chip.o \ | 13 | ipath_init_chip.o \ |
16 | ipath_intr.o \ | 14 | ipath_intr.o \ |
17 | ipath_keys.o \ | 15 | ipath_keys.o \ |
@@ -31,5 +29,8 @@ ib_ipath-y := \ | |||
31 | ipath_verbs_mcast.o \ | 29 | ipath_verbs_mcast.o \ |
32 | ipath_verbs.o | 30 | ipath_verbs.o |
33 | 31 | ||
32 | ib_ipath-$(CONFIG_HT_IRQ) += ipath_iba6110.o | ||
33 | ib_ipath-$(CONFIG_PCI_MSI) += ipath_iba6120.o | ||
34 | |||
34 | ib_ipath-$(CONFIG_X86_64) += ipath_wc_x86_64.o | 35 | ib_ipath-$(CONFIG_X86_64) += ipath_wc_x86_64.o |
35 | ib_ipath-$(CONFIG_PPC64) += ipath_wc_ppc64.o | 36 | ib_ipath-$(CONFIG_PPC64) += ipath_wc_ppc64.o |
diff --git a/drivers/infiniband/hw/ipath/ipath_driver.c b/drivers/infiniband/hw/ipath/ipath_driver.c index 09a13c1fc46a..1aeddb48e355 100644 --- a/drivers/infiniband/hw/ipath/ipath_driver.c +++ b/drivers/infiniband/hw/ipath/ipath_driver.c | |||
@@ -390,12 +390,16 @@ static int __devinit ipath_init_one(struct pci_dev *pdev, | |||
390 | 390 | ||
391 | /* setup the chip-specific functions, as early as possible. */ | 391 | /* setup the chip-specific functions, as early as possible. */ |
392 | switch (ent->device) { | 392 | switch (ent->device) { |
393 | #ifdef CONFIG_HT_IRQ | ||
393 | case PCI_DEVICE_ID_INFINIPATH_HT: | 394 | case PCI_DEVICE_ID_INFINIPATH_HT: |
394 | ipath_init_iba6110_funcs(dd); | 395 | ipath_init_iba6110_funcs(dd); |
395 | break; | 396 | break; |
397 | #endif | ||
398 | #ifdef CONFIG_PCI_MSI | ||
396 | case PCI_DEVICE_ID_INFINIPATH_PE800: | 399 | case PCI_DEVICE_ID_INFINIPATH_PE800: |
397 | ipath_init_iba6120_funcs(dd); | 400 | ipath_init_iba6120_funcs(dd); |
398 | break; | 401 | break; |
402 | #endif | ||
399 | default: | 403 | default: |
400 | ipath_dev_err(dd, "Found unknown QLogic deviceid 0x%x, " | 404 | ipath_dev_err(dd, "Found unknown QLogic deviceid 0x%x, " |
401 | "failing\n", ent->device); | 405 | "failing\n", ent->device); |
diff --git a/drivers/macintosh/windfarm_pm112.c b/drivers/macintosh/windfarm_pm112.c index fa4b13f89369..b3fbb45bc90a 100644 --- a/drivers/macintosh/windfarm_pm112.c +++ b/drivers/macintosh/windfarm_pm112.c | |||
@@ -685,6 +685,17 @@ static int __init wf_pm112_init(void) | |||
685 | ++nr_cores; | 685 | ++nr_cores; |
686 | 686 | ||
687 | printk(KERN_INFO "windfarm: initializing for dual-core desktop G5\n"); | 687 | printk(KERN_INFO "windfarm: initializing for dual-core desktop G5\n"); |
688 | |||
689 | #ifdef MODULE | ||
690 | request_module("windfarm_smu_controls"); | ||
691 | request_module("windfarm_smu_sensors"); | ||
692 | request_module("windfarm_smu_sat"); | ||
693 | request_module("windfarm_lm75_sensor"); | ||
694 | request_module("windfarm_max6690_sensor"); | ||
695 | request_module("windfarm_cpufreq_clamp"); | ||
696 | |||
697 | #endif /* MODULE */ | ||
698 | |||
688 | platform_driver_register(&wf_pm112_driver); | 699 | platform_driver_register(&wf_pm112_driver); |
689 | return 0; | 700 | return 0; |
690 | } | 701 | } |
diff --git a/drivers/macintosh/windfarm_pm81.c b/drivers/macintosh/windfarm_pm81.c index 2a944851b8e1..f24fa734046a 100644 --- a/drivers/macintosh/windfarm_pm81.c +++ b/drivers/macintosh/windfarm_pm81.c | |||
@@ -788,6 +788,7 @@ static int __init wf_smu_init(void) | |||
788 | request_module("windfarm_smu_controls"); | 788 | request_module("windfarm_smu_controls"); |
789 | request_module("windfarm_smu_sensors"); | 789 | request_module("windfarm_smu_sensors"); |
790 | request_module("windfarm_lm75_sensor"); | 790 | request_module("windfarm_lm75_sensor"); |
791 | request_module("windfarm_cpufreq_clamp"); | ||
791 | 792 | ||
792 | #endif /* MODULE */ | 793 | #endif /* MODULE */ |
793 | platform_driver_register(&wf_smu_driver); | 794 | platform_driver_register(&wf_smu_driver); |
diff --git a/drivers/macintosh/windfarm_pm91.c b/drivers/macintosh/windfarm_pm91.c index 9961a67b4f85..26eee69ebe6d 100644 --- a/drivers/macintosh/windfarm_pm91.c +++ b/drivers/macintosh/windfarm_pm91.c | |||
@@ -719,6 +719,7 @@ static int __init wf_smu_init(void) | |||
719 | request_module("windfarm_smu_controls"); | 719 | request_module("windfarm_smu_controls"); |
720 | request_module("windfarm_smu_sensors"); | 720 | request_module("windfarm_smu_sensors"); |
721 | request_module("windfarm_lm75_sensor"); | 721 | request_module("windfarm_lm75_sensor"); |
722 | request_module("windfarm_cpufreq_clamp"); | ||
722 | 723 | ||
723 | #endif /* MODULE */ | 724 | #endif /* MODULE */ |
724 | platform_driver_register(&wf_smu_driver); | 725 | platform_driver_register(&wf_smu_driver); |
diff --git a/drivers/media/dvb/b2c2/flexcop-usb.c b/drivers/media/dvb/b2c2/flexcop-usb.c index 2853ea1bdaf1..87fb75f0d1cf 100644 --- a/drivers/media/dvb/b2c2/flexcop-usb.c +++ b/drivers/media/dvb/b2c2/flexcop-usb.c | |||
@@ -246,7 +246,7 @@ static int flexcop_usb_i2c_req(struct flexcop_usb *fc_usb, | |||
246 | wIndex = (chipaddr << 8 ) | addr; | 246 | wIndex = (chipaddr << 8 ) | addr; |
247 | 247 | ||
248 | deb_i2c("i2c %2d: %02x %02x %02x %02x %02x %02x\n",func,request_type,req, | 248 | deb_i2c("i2c %2d: %02x %02x %02x %02x %02x %02x\n",func,request_type,req, |
249 | ((wValue && 0xff) << 8),wValue >> 8,((wIndex && 0xff) << 8),wIndex >> 8); | 249 | wValue & 0xff, wValue >> 8, wIndex & 0xff, wIndex >> 8); |
250 | 250 | ||
251 | len = usb_control_msg(fc_usb->udev,pipe, | 251 | len = usb_control_msg(fc_usb->udev,pipe, |
252 | req, | 252 | req, |
diff --git a/drivers/media/dvb/frontends/tda826x.c b/drivers/media/dvb/frontends/tda826x.c index eeab26bd36ed..34815b0b97e4 100644 --- a/drivers/media/dvb/frontends/tda826x.c +++ b/drivers/media/dvb/frontends/tda826x.c | |||
@@ -121,7 +121,7 @@ static struct dvb_tuner_ops tda826x_tuner_ops = { | |||
121 | .info = { | 121 | .info = { |
122 | .name = "Philips TDA826X", | 122 | .name = "Philips TDA826X", |
123 | .frequency_min = 950000, | 123 | .frequency_min = 950000, |
124 | .frequency_min = 2175000 | 124 | .frequency_max = 2175000 |
125 | }, | 125 | }, |
126 | .release = tda826x_release, | 126 | .release = tda826x_release, |
127 | .sleep = tda826x_sleep, | 127 | .sleep = tda826x_sleep, |
diff --git a/drivers/media/video/Kconfig b/drivers/media/video/Kconfig index fbe5b6168cc2..bf267552941f 100644 --- a/drivers/media/video/Kconfig +++ b/drivers/media/video/Kconfig | |||
@@ -186,7 +186,7 @@ config VIDEO_KS0127 | |||
186 | 186 | ||
187 | config VIDEO_SAA7110 | 187 | config VIDEO_SAA7110 |
188 | tristate "Philips SAA7110 video decoder" | 188 | tristate "Philips SAA7110 video decoder" |
189 | depends on VIDEO_V4L1 | 189 | depends on VIDEO_V4L1 && I2C |
190 | ---help--- | 190 | ---help--- |
191 | Support for the Philips SAA7110 video decoders. | 191 | Support for the Philips SAA7110 video decoders. |
192 | 192 | ||
diff --git a/drivers/media/video/bt8xx/bttv-cards.c b/drivers/media/video/bt8xx/bttv-cards.c index a84903e0d810..21ebe8f13815 100644 --- a/drivers/media/video/bt8xx/bttv-cards.c +++ b/drivers/media/video/bt8xx/bttv-cards.c | |||
@@ -4001,7 +4001,7 @@ static void __devinit init_PXC200(struct bttv *btv) | |||
4001 | * - sleep 1ms | 4001 | * - sleep 1ms |
4002 | * - write 0x0E | 4002 | * - write 0x0E |
4003 | * read from GPIO_DATA into buf (uint_32) | 4003 | * read from GPIO_DATA into buf (uint_32) |
4004 | * - if ( buf>>18 & 0x01 ) || ( buf>>19 && 0x01 != 0 ) | 4004 | * - if ( buf>>18 & 0x01 ) || ( buf>>19 & 0x01 != 0 ) |
4005 | * error. ERROR_CPLD_Check_Failed. | 4005 | * error. ERROR_CPLD_Check_Failed. |
4006 | */ | 4006 | */ |
4007 | /* ----------------------------------------------------------------------- */ | 4007 | /* ----------------------------------------------------------------------- */ |
diff --git a/drivers/media/video/cx88/cx88-input.c b/drivers/media/video/cx88/cx88-input.c index ee48995a4ab5..57e1c024a547 100644 --- a/drivers/media/video/cx88/cx88-input.c +++ b/drivers/media/video/cx88/cx88-input.c | |||
@@ -202,13 +202,19 @@ int cx88_ir_init(struct cx88_core *core, struct pci_dev *pci) | |||
202 | ir->sampling = 1; | 202 | ir->sampling = 1; |
203 | break; | 203 | break; |
204 | case CX88_BOARD_WINFAST_DTV2000H: | 204 | case CX88_BOARD_WINFAST_DTV2000H: |
205 | case CX88_BOARD_WINFAST2000XP_EXPERT: | ||
206 | ir_codes = ir_codes_winfast; | 205 | ir_codes = ir_codes_winfast; |
207 | ir->gpio_addr = MO_GP0_IO; | 206 | ir->gpio_addr = MO_GP0_IO; |
208 | ir->mask_keycode = 0x8f8; | 207 | ir->mask_keycode = 0x8f8; |
209 | ir->mask_keyup = 0x100; | 208 | ir->mask_keyup = 0x100; |
210 | ir->polling = 50; /* ms */ | 209 | ir->polling = 50; /* ms */ |
211 | break; | 210 | break; |
211 | case CX88_BOARD_WINFAST2000XP_EXPERT: | ||
212 | ir_codes = ir_codes_winfast; | ||
213 | ir->gpio_addr = MO_GP0_IO; | ||
214 | ir->mask_keycode = 0x8f8; | ||
215 | ir->mask_keyup = 0x100; | ||
216 | ir->polling = 1; /* ms */ | ||
217 | break; | ||
212 | case CX88_BOARD_IODATA_GVBCTV7E: | 218 | case CX88_BOARD_IODATA_GVBCTV7E: |
213 | ir_codes = ir_codes_iodata_bctv7e; | 219 | ir_codes = ir_codes_iodata_bctv7e; |
214 | ir->gpio_addr = MO_GP0_IO; | 220 | ir->gpio_addr = MO_GP0_IO; |
@@ -216,7 +222,7 @@ int cx88_ir_init(struct cx88_core *core, struct pci_dev *pci) | |||
216 | ir->mask_keydown = 0x02; | 222 | ir->mask_keydown = 0x02; |
217 | ir->polling = 5; /* ms */ | 223 | ir->polling = 5; /* ms */ |
218 | break; | 224 | break; |
219 | case CX88_BOARD_PROLINK_PLAYTVPVR: | 225 | case CX88_BOARD_PROLINK_PLAYTVPVR: |
220 | case CX88_BOARD_PIXELVIEW_PLAYTV_ULTRA_PRO: | 226 | case CX88_BOARD_PIXELVIEW_PLAYTV_ULTRA_PRO: |
221 | ir_codes = ir_codes_pixelview; | 227 | ir_codes = ir_codes_pixelview; |
222 | ir->gpio_addr = MO_GP1_IO; | 228 | ir->gpio_addr = MO_GP1_IO; |
diff --git a/drivers/media/video/saa7134/saa7134-cards.c b/drivers/media/video/saa7134/saa7134-cards.c index c9d8e3b9cc37..51f0cfdcb680 100644 --- a/drivers/media/video/saa7134/saa7134-cards.c +++ b/drivers/media/video/saa7134/saa7134-cards.c | |||
@@ -2969,7 +2969,7 @@ struct saa7134_board saa7134_boards[] = { | |||
2969 | /* Petr Baudis <pasky@ucw.cz> */ | 2969 | /* Petr Baudis <pasky@ucw.cz> */ |
2970 | .name = "AVerMedia TV Hybrid A16AR", | 2970 | .name = "AVerMedia TV Hybrid A16AR", |
2971 | .audio_clock = 0x187de7, | 2971 | .audio_clock = 0x187de7, |
2972 | .tuner_type = TUNER_PHILIPS_TDA8290, /* untested */ | 2972 | .tuner_type = TUNER_PHILIPS_TD1316, /* untested */ |
2973 | .radio_type = TUNER_TEA5767, /* untested */ | 2973 | .radio_type = TUNER_TEA5767, /* untested */ |
2974 | .tuner_addr = ADDR_UNSET, | 2974 | .tuner_addr = ADDR_UNSET, |
2975 | .radio_addr = ADDR_UNSET, | 2975 | .radio_addr = ADDR_UNSET, |
@@ -3718,6 +3718,7 @@ int saa7134_board_init1(struct saa7134_dev *dev) | |||
3718 | case SAA7134_BOARD_AVERMEDIA_STUDIO_307: | 3718 | case SAA7134_BOARD_AVERMEDIA_STUDIO_307: |
3719 | case SAA7134_BOARD_AVERMEDIA_307: | 3719 | case SAA7134_BOARD_AVERMEDIA_307: |
3720 | case SAA7134_BOARD_AVERMEDIA_GO_007_FM: | 3720 | case SAA7134_BOARD_AVERMEDIA_GO_007_FM: |
3721 | case SAA7134_BOARD_AVERMEDIA_777: | ||
3721 | /* case SAA7134_BOARD_SABRENT_SBTTVFM: */ /* not finished yet */ | 3722 | /* case SAA7134_BOARD_SABRENT_SBTTVFM: */ /* not finished yet */ |
3722 | case SAA7134_BOARD_VIDEOMATE_TV_PVR: | 3723 | case SAA7134_BOARD_VIDEOMATE_TV_PVR: |
3723 | case SAA7134_BOARD_VIDEOMATE_GOLD_PLUS: | 3724 | case SAA7134_BOARD_VIDEOMATE_GOLD_PLUS: |
@@ -3734,6 +3735,7 @@ int saa7134_board_init1(struct saa7134_dev *dev) | |||
3734 | case SAA7134_BOARD_FLYDVBT_LR301: | 3735 | case SAA7134_BOARD_FLYDVBT_LR301: |
3735 | case SAA7134_BOARD_FLYDVBTDUO: | 3736 | case SAA7134_BOARD_FLYDVBTDUO: |
3736 | case SAA7134_BOARD_PROTEUS_2309: | 3737 | case SAA7134_BOARD_PROTEUS_2309: |
3738 | case SAA7134_BOARD_AVERMEDIA_A16AR: | ||
3737 | dev->has_remote = SAA7134_REMOTE_GPIO; | 3739 | dev->has_remote = SAA7134_REMOTE_GPIO; |
3738 | break; | 3740 | break; |
3739 | case SAA7134_BOARD_FLYDVBS_LR300: | 3741 | case SAA7134_BOARD_FLYDVBS_LR300: |
@@ -3772,7 +3774,6 @@ int saa7134_board_init1(struct saa7134_dev *dev) | |||
3772 | saa_writeb(SAA7134_GPIO_GPMODE3, 0x08); | 3774 | saa_writeb(SAA7134_GPIO_GPMODE3, 0x08); |
3773 | saa_writeb(SAA7134_GPIO_GPSTATUS3, 0x00); | 3775 | saa_writeb(SAA7134_GPIO_GPSTATUS3, 0x00); |
3774 | break; | 3776 | break; |
3775 | case SAA7134_BOARD_AVERMEDIA_A16AR: | ||
3776 | case SAA7134_BOARD_AVERMEDIA_CARDBUS: | 3777 | case SAA7134_BOARD_AVERMEDIA_CARDBUS: |
3777 | /* power-up tuner chip */ | 3778 | /* power-up tuner chip */ |
3778 | saa_andorl(SAA7134_GPIO_GPMODE0 >> 2, 0xffffffff, 0xffffffff); | 3779 | saa_andorl(SAA7134_GPIO_GPMODE0 >> 2, 0xffffffff, 0xffffffff); |
diff --git a/drivers/media/video/saa7134/saa7134-input.c b/drivers/media/video/saa7134/saa7134-input.c index ff5991136f4e..dee83552e681 100644 --- a/drivers/media/video/saa7134/saa7134-input.c +++ b/drivers/media/video/saa7134/saa7134-input.c | |||
@@ -185,7 +185,6 @@ int saa7134_input_init1(struct saa7134_dev *dev) | |||
185 | case SAA7134_BOARD_AVERMEDIA_STUDIO_305: | 185 | case SAA7134_BOARD_AVERMEDIA_STUDIO_305: |
186 | case SAA7134_BOARD_AVERMEDIA_STUDIO_307: | 186 | case SAA7134_BOARD_AVERMEDIA_STUDIO_307: |
187 | case SAA7134_BOARD_AVERMEDIA_GO_007_FM: | 187 | case SAA7134_BOARD_AVERMEDIA_GO_007_FM: |
188 | case SAA7134_BOARD_AVERMEDIA_A16AR: | ||
189 | ir_codes = ir_codes_avermedia; | 188 | ir_codes = ir_codes_avermedia; |
190 | mask_keycode = 0x0007C8; | 189 | mask_keycode = 0x0007C8; |
191 | mask_keydown = 0x000010; | 190 | mask_keydown = 0x000010; |
@@ -194,6 +193,16 @@ int saa7134_input_init1(struct saa7134_dev *dev) | |||
194 | saa_setb(SAA7134_GPIO_GPMODE0, 0x4); | 193 | saa_setb(SAA7134_GPIO_GPMODE0, 0x4); |
195 | saa_setb(SAA7134_GPIO_GPSTATUS0, 0x4); | 194 | saa_setb(SAA7134_GPIO_GPSTATUS0, 0x4); |
196 | break; | 195 | break; |
196 | case SAA7134_BOARD_AVERMEDIA_777: | ||
197 | case SAA7134_BOARD_AVERMEDIA_A16AR: | ||
198 | ir_codes = ir_codes_avermedia; | ||
199 | mask_keycode = 0x02F200; | ||
200 | mask_keydown = 0x000400; | ||
201 | polling = 50; // ms | ||
202 | /* Without this we won't receive key up events */ | ||
203 | saa_setb(SAA7134_GPIO_GPMODE1, 0x1); | ||
204 | saa_setb(SAA7134_GPIO_GPSTATUS1, 0x1); | ||
205 | break; | ||
197 | case SAA7134_BOARD_KWORLD_TERMINATOR: | 206 | case SAA7134_BOARD_KWORLD_TERMINATOR: |
198 | ir_codes = ir_codes_pixelview; | 207 | ir_codes = ir_codes_pixelview; |
199 | mask_keycode = 0x00001f; | 208 | mask_keycode = 0x00001f; |
diff --git a/drivers/media/video/tveeprom.c b/drivers/media/video/tveeprom.c index e6baaee038bf..6b9ef731b83a 100644 --- a/drivers/media/video/tveeprom.c +++ b/drivers/media/video/tveeprom.c | |||
@@ -468,7 +468,7 @@ void tveeprom_hauppauge_analog(struct i2c_client *c, struct tveeprom *tvee, | |||
468 | (eeprom_data[i+6] << 8) + | 468 | (eeprom_data[i+6] << 8) + |
469 | (eeprom_data[i+7] << 16); | 469 | (eeprom_data[i+7] << 16); |
470 | 470 | ||
471 | if ( (eeprom_data[i + 8] && 0xf0) && | 471 | if ( (eeprom_data[i + 8] & 0xf0) && |
472 | (tvee->serial_number < 0xffffff) ) { | 472 | (tvee->serial_number < 0xffffff) ) { |
473 | tvee->MAC_address[0] = 0x00; | 473 | tvee->MAC_address[0] = 0x00; |
474 | tvee->MAC_address[1] = 0x0D; | 474 | tvee->MAC_address[1] = 0x0D; |
diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c index ee8863c123e3..766bc54406e5 100644 --- a/drivers/mmc/mmc.c +++ b/drivers/mmc/mmc.c | |||
@@ -475,7 +475,7 @@ static u32 mmc_select_voltage(struct mmc_host *host, u32 ocr) | |||
475 | if (bit) { | 475 | if (bit) { |
476 | bit -= 1; | 476 | bit -= 1; |
477 | 477 | ||
478 | ocr = 3 << bit; | 478 | ocr &= 3 << bit; |
479 | 479 | ||
480 | host->ios.vdd = bit; | 480 | host->ios.vdd = bit; |
481 | mmc_set_ios(host); | 481 | mmc_set_ios(host); |
@@ -1178,14 +1178,29 @@ static void mmc_rescan(void *data) | |||
1178 | { | 1178 | { |
1179 | struct mmc_host *host = data; | 1179 | struct mmc_host *host = data; |
1180 | struct list_head *l, *n; | 1180 | struct list_head *l, *n; |
1181 | unsigned char power_mode; | ||
1181 | 1182 | ||
1182 | mmc_claim_host(host); | 1183 | mmc_claim_host(host); |
1183 | 1184 | ||
1184 | if (host->ios.power_mode == MMC_POWER_ON) | 1185 | /* |
1186 | * Check for removed cards and newly inserted ones. We check for | ||
1187 | * removed cards first so we can intelligently re-select the VDD. | ||
1188 | */ | ||
1189 | power_mode = host->ios.power_mode; | ||
1190 | if (power_mode == MMC_POWER_ON) | ||
1185 | mmc_check_cards(host); | 1191 | mmc_check_cards(host); |
1186 | 1192 | ||
1187 | mmc_setup(host); | 1193 | mmc_setup(host); |
1188 | 1194 | ||
1195 | /* | ||
1196 | * Some broken cards process CMD1 even in stand-by state. There is | ||
1197 | * no reply, but an ILLEGAL_COMMAND error is cached and returned | ||
1198 | * after next command. We poll for card status here to clear any | ||
1199 | * possibly pending error. | ||
1200 | */ | ||
1201 | if (power_mode == MMC_POWER_ON) | ||
1202 | mmc_check_cards(host); | ||
1203 | |||
1189 | if (!list_empty(&host->cards)) { | 1204 | if (!list_empty(&host->cards)) { |
1190 | /* | 1205 | /* |
1191 | * (Re-)calculate the fastest clock rate which the | 1206 | * (Re-)calculate the fastest clock rate which the |
diff --git a/drivers/net/arcnet/com20020.c b/drivers/net/arcnet/com20020.c index 0dc70c7b7940..aa9dd8f11269 100644 --- a/drivers/net/arcnet/com20020.c +++ b/drivers/net/arcnet/com20020.c | |||
@@ -337,13 +337,16 @@ static void com20020_set_mc_list(struct net_device *dev) | |||
337 | } | 337 | } |
338 | } | 338 | } |
339 | 339 | ||
340 | #ifdef MODULE | 340 | #if defined(CONFIG_ARCNET_COM20020_PCI_MODULE) || \ |
341 | 341 | defined(CONFIG_ARCNET_COM20020_ISA_MODULE) | |
342 | EXPORT_SYMBOL(com20020_check); | 342 | EXPORT_SYMBOL(com20020_check); |
343 | EXPORT_SYMBOL(com20020_found); | 343 | EXPORT_SYMBOL(com20020_found); |
344 | #endif | ||
344 | 345 | ||
345 | MODULE_LICENSE("GPL"); | 346 | MODULE_LICENSE("GPL"); |
346 | 347 | ||
348 | #ifdef MODULE | ||
349 | |||
347 | int init_module(void) | 350 | int init_module(void) |
348 | { | 351 | { |
349 | BUGLVL(D_NORMAL) printk(VERSION); | 352 | BUGLVL(D_NORMAL) printk(VERSION); |
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index c0bbddae4ec4..17a461152d39 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c | |||
@@ -4692,6 +4692,8 @@ static int bond_check_params(struct bond_params *params) | |||
4692 | return 0; | 4692 | return 0; |
4693 | } | 4693 | } |
4694 | 4694 | ||
4695 | static struct lock_class_key bonding_netdev_xmit_lock_key; | ||
4696 | |||
4695 | /* Create a new bond based on the specified name and bonding parameters. | 4697 | /* Create a new bond based on the specified name and bonding parameters. |
4696 | * Caller must NOT hold rtnl_lock; we need to release it here before we | 4698 | * Caller must NOT hold rtnl_lock; we need to release it here before we |
4697 | * set up our sysfs entries. | 4699 | * set up our sysfs entries. |
@@ -4727,6 +4729,9 @@ int bond_create(char *name, struct bond_params *params, struct bonding **newbond | |||
4727 | if (res < 0) { | 4729 | if (res < 0) { |
4728 | goto out_bond; | 4730 | goto out_bond; |
4729 | } | 4731 | } |
4732 | |||
4733 | lockdep_set_class(&bond_dev->_xmit_lock, &bonding_netdev_xmit_lock_key); | ||
4734 | |||
4730 | if (newbond) | 4735 | if (newbond) |
4731 | *newbond = bond_dev->priv; | 4736 | *newbond = bond_dev->priv; |
4732 | 4737 | ||
diff --git a/drivers/net/cris/eth_v10.c b/drivers/net/cris/eth_v10.c index 966b563e42bb..a03d781f6d0a 100644 --- a/drivers/net/cris/eth_v10.c +++ b/drivers/net/cris/eth_v10.c | |||
@@ -509,6 +509,8 @@ etrax_ethernet_init(void) | |||
509 | * does not share cacheline with any other data (to avoid cache bug) | 509 | * does not share cacheline with any other data (to avoid cache bug) |
510 | */ | 510 | */ |
511 | RxDescList[i].skb = dev_alloc_skb(MAX_MEDIA_DATA_SIZE + 2 * L1_CACHE_BYTES); | 511 | RxDescList[i].skb = dev_alloc_skb(MAX_MEDIA_DATA_SIZE + 2 * L1_CACHE_BYTES); |
512 | if (!RxDescList[i].skb) | ||
513 | return -ENOMEM; | ||
512 | RxDescList[i].descr.ctrl = 0; | 514 | RxDescList[i].descr.ctrl = 0; |
513 | RxDescList[i].descr.sw_len = MAX_MEDIA_DATA_SIZE; | 515 | RxDescList[i].descr.sw_len = MAX_MEDIA_DATA_SIZE; |
514 | RxDescList[i].descr.next = virt_to_phys(&RxDescList[i + 1]); | 516 | RxDescList[i].descr.next = virt_to_phys(&RxDescList[i + 1]); |
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index 06e4f77b0988..1dbdd6bb587b 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c | |||
@@ -68,8 +68,8 @@ | |||
68 | 68 | ||
69 | #define DRV_MODULE_NAME "tg3" | 69 | #define DRV_MODULE_NAME "tg3" |
70 | #define PFX DRV_MODULE_NAME ": " | 70 | #define PFX DRV_MODULE_NAME ": " |
71 | #define DRV_MODULE_VERSION "3.68" | 71 | #define DRV_MODULE_VERSION "3.69" |
72 | #define DRV_MODULE_RELDATE "November 02, 2006" | 72 | #define DRV_MODULE_RELDATE "November 15, 2006" |
73 | 73 | ||
74 | #define TG3_DEF_MAC_MODE 0 | 74 | #define TG3_DEF_MAC_MODE 0 |
75 | #define TG3_DEF_RX_MODE 0 | 75 | #define TG3_DEF_RX_MODE 0 |
@@ -4728,10 +4728,11 @@ static int tg3_poll_fw(struct tg3 *tp) | |||
4728 | u32 val; | 4728 | u32 val; |
4729 | 4729 | ||
4730 | if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5906) { | 4730 | if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5906) { |
4731 | for (i = 0; i < 400; i++) { | 4731 | /* Wait up to 20ms for init done. */ |
4732 | for (i = 0; i < 200; i++) { | ||
4732 | if (tr32(VCPU_STATUS) & VCPU_STATUS_INIT_DONE) | 4733 | if (tr32(VCPU_STATUS) & VCPU_STATUS_INIT_DONE) |
4733 | return 0; | 4734 | return 0; |
4734 | udelay(10); | 4735 | udelay(100); |
4735 | } | 4736 | } |
4736 | return -ENODEV; | 4737 | return -ENODEV; |
4737 | } | 4738 | } |
@@ -10365,7 +10366,7 @@ static int __devinit tg3_get_invariants(struct tg3 *tp) | |||
10365 | u32 pci_state_reg, grc_misc_cfg; | 10366 | u32 pci_state_reg, grc_misc_cfg; |
10366 | u32 val; | 10367 | u32 val; |
10367 | u16 pci_cmd; | 10368 | u16 pci_cmd; |
10368 | int err; | 10369 | int err, pcie_cap; |
10369 | 10370 | ||
10370 | /* Force memory write invalidate off. If we leave it on, | 10371 | /* Force memory write invalidate off. If we leave it on, |
10371 | * then on 5700_BX chips we have to enable a workaround. | 10372 | * then on 5700_BX chips we have to enable a workaround. |
@@ -10540,8 +10541,19 @@ static int __devinit tg3_get_invariants(struct tg3 *tp) | |||
10540 | GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5906) | 10541 | GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5906) |
10541 | tp->tg3_flags2 |= TG3_FLG2_JUMBO_CAPABLE; | 10542 | tp->tg3_flags2 |= TG3_FLG2_JUMBO_CAPABLE; |
10542 | 10543 | ||
10543 | if (pci_find_capability(tp->pdev, PCI_CAP_ID_EXP) != 0) | 10544 | pcie_cap = pci_find_capability(tp->pdev, PCI_CAP_ID_EXP); |
10545 | if (pcie_cap != 0) { | ||
10544 | tp->tg3_flags2 |= TG3_FLG2_PCI_EXPRESS; | 10546 | tp->tg3_flags2 |= TG3_FLG2_PCI_EXPRESS; |
10547 | if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5906) { | ||
10548 | u16 lnkctl; | ||
10549 | |||
10550 | pci_read_config_word(tp->pdev, | ||
10551 | pcie_cap + PCI_EXP_LNKCTL, | ||
10552 | &lnkctl); | ||
10553 | if (lnkctl & PCI_EXP_LNKCTL_CLKREQ_EN) | ||
10554 | tp->tg3_flags2 &= ~TG3_FLG2_HW_TSO_2; | ||
10555 | } | ||
10556 | } | ||
10545 | 10557 | ||
10546 | /* If we have an AMD 762 or VIA K8T800 chipset, write | 10558 | /* If we have an AMD 762 or VIA K8T800 chipset, write |
10547 | * reordering to the mailbox registers done by the host | 10559 | * reordering to the mailbox registers done by the host |
@@ -11808,6 +11820,7 @@ static int __devinit tg3_init_one(struct pci_dev *pdev, | |||
11808 | else if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5700 || | 11820 | else if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5700 || |
11809 | GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5701 || | 11821 | GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5701 || |
11810 | tp->pci_chip_rev_id == CHIPREV_ID_5705_A0 || | 11822 | tp->pci_chip_rev_id == CHIPREV_ID_5705_A0 || |
11823 | GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5906 || | ||
11811 | (tp->tg3_flags & TG3_FLAG_ENABLE_ASF) != 0) { | 11824 | (tp->tg3_flags & TG3_FLAG_ENABLE_ASF) != 0) { |
11812 | tp->tg3_flags2 &= ~TG3_FLG2_TSO_CAPABLE; | 11825 | tp->tg3_flags2 &= ~TG3_FLG2_TSO_CAPABLE; |
11813 | } else { | 11826 | } else { |
diff --git a/drivers/net/wireless/bcm43xx/bcm43xx_main.c b/drivers/net/wireless/bcm43xx/bcm43xx_main.c index 65edb56107fd..a1b783813d8e 100644 --- a/drivers/net/wireless/bcm43xx/bcm43xx_main.c +++ b/drivers/net/wireless/bcm43xx/bcm43xx_main.c | |||
@@ -746,7 +746,7 @@ int bcm43xx_sprom_write(struct bcm43xx_private *bcm, const u16 *sprom) | |||
746 | if (err) | 746 | if (err) |
747 | goto err_ctlreg; | 747 | goto err_ctlreg; |
748 | spromctl |= 0x10; /* SPROM WRITE enable. */ | 748 | spromctl |= 0x10; /* SPROM WRITE enable. */ |
749 | bcm43xx_pci_write_config32(bcm, BCM43xx_PCICFG_SPROMCTL, spromctl); | 749 | err = bcm43xx_pci_write_config32(bcm, BCM43xx_PCICFG_SPROMCTL, spromctl); |
750 | if (err) | 750 | if (err) |
751 | goto err_ctlreg; | 751 | goto err_ctlreg; |
752 | /* We must burn lots of CPU cycles here, but that does not | 752 | /* We must burn lots of CPU cycles here, but that does not |
@@ -768,7 +768,7 @@ int bcm43xx_sprom_write(struct bcm43xx_private *bcm, const u16 *sprom) | |||
768 | mdelay(20); | 768 | mdelay(20); |
769 | } | 769 | } |
770 | spromctl &= ~0x10; /* SPROM WRITE enable. */ | 770 | spromctl &= ~0x10; /* SPROM WRITE enable. */ |
771 | bcm43xx_pci_write_config32(bcm, BCM43xx_PCICFG_SPROMCTL, spromctl); | 771 | err = bcm43xx_pci_write_config32(bcm, BCM43xx_PCICFG_SPROMCTL, spromctl); |
772 | if (err) | 772 | if (err) |
773 | goto err_ctlreg; | 773 | goto err_ctlreg; |
774 | mdelay(500); | 774 | mdelay(500); |
@@ -1463,6 +1463,23 @@ static void handle_irq_transmit_status(struct bcm43xx_private *bcm) | |||
1463 | } | 1463 | } |
1464 | } | 1464 | } |
1465 | 1465 | ||
1466 | static void drain_txstatus_queue(struct bcm43xx_private *bcm) | ||
1467 | { | ||
1468 | u32 dummy; | ||
1469 | |||
1470 | if (bcm->current_core->rev < 5) | ||
1471 | return; | ||
1472 | /* Read all entries from the microcode TXstatus FIFO | ||
1473 | * and throw them away. | ||
1474 | */ | ||
1475 | while (1) { | ||
1476 | dummy = bcm43xx_read32(bcm, BCM43xx_MMIO_XMITSTAT_0); | ||
1477 | if (!dummy) | ||
1478 | break; | ||
1479 | dummy = bcm43xx_read32(bcm, BCM43xx_MMIO_XMITSTAT_1); | ||
1480 | } | ||
1481 | } | ||
1482 | |||
1466 | static void bcm43xx_generate_noise_sample(struct bcm43xx_private *bcm) | 1483 | static void bcm43xx_generate_noise_sample(struct bcm43xx_private *bcm) |
1467 | { | 1484 | { |
1468 | bcm43xx_shm_write16(bcm, BCM43xx_SHM_SHARED, 0x408, 0x7F7F); | 1485 | bcm43xx_shm_write16(bcm, BCM43xx_SHM_SHARED, 0x408, 0x7F7F); |
@@ -3532,6 +3549,7 @@ int bcm43xx_select_wireless_core(struct bcm43xx_private *bcm, | |||
3532 | bcm43xx_macfilter_clear(bcm, BCM43xx_MACFILTER_ASSOC); | 3549 | bcm43xx_macfilter_clear(bcm, BCM43xx_MACFILTER_ASSOC); |
3533 | bcm43xx_macfilter_set(bcm, BCM43xx_MACFILTER_SELF, (u8 *)(bcm->net_dev->dev_addr)); | 3550 | bcm43xx_macfilter_set(bcm, BCM43xx_MACFILTER_SELF, (u8 *)(bcm->net_dev->dev_addr)); |
3534 | bcm43xx_security_init(bcm); | 3551 | bcm43xx_security_init(bcm); |
3552 | drain_txstatus_queue(bcm); | ||
3535 | ieee80211softmac_start(bcm->net_dev); | 3553 | ieee80211softmac_start(bcm->net_dev); |
3536 | 3554 | ||
3537 | /* Let's go! Be careful after enabling the IRQs. | 3555 | /* Let's go! Be careful after enabling the IRQs. |
diff --git a/drivers/parport/parport_ip32.c b/drivers/parport/parport_ip32.c index e3e19277030a..ec44efdbb84e 100644 --- a/drivers/parport/parport_ip32.c +++ b/drivers/parport/parport_ip32.c | |||
@@ -780,7 +780,7 @@ static irqreturn_t parport_ip32_interrupt(int irq, void *dev_id) | |||
780 | enum parport_ip32_irq_mode irq_mode = priv->irq_mode; | 780 | enum parport_ip32_irq_mode irq_mode = priv->irq_mode; |
781 | switch (irq_mode) { | 781 | switch (irq_mode) { |
782 | case PARPORT_IP32_IRQ_FWD: | 782 | case PARPORT_IP32_IRQ_FWD: |
783 | parport_generic_irq(irq, p, regs); | 783 | parport_generic_irq(irq, p); |
784 | break; | 784 | break; |
785 | case PARPORT_IP32_IRQ_HERE: | 785 | case PARPORT_IP32_IRQ_HERE: |
786 | parport_ip32_wakeup(p); | 786 | parport_ip32_wakeup(p); |
diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c index a1d2e979b17f..f952bfea48a6 100644 --- a/drivers/pci/pci-sysfs.c +++ b/drivers/pci/pci-sysfs.c | |||
@@ -642,6 +642,9 @@ err: | |||
642 | */ | 642 | */ |
643 | void pci_remove_sysfs_dev_files(struct pci_dev *pdev) | 643 | void pci_remove_sysfs_dev_files(struct pci_dev *pdev) |
644 | { | 644 | { |
645 | if (!sysfs_initialized) | ||
646 | return; | ||
647 | |||
645 | if (pdev->cfg_size < 4096) | 648 | if (pdev->cfg_size < 4096) |
646 | sysfs_remove_bin_file(&pdev->dev.kobj, &pci_config_attr); | 649 | sysfs_remove_bin_file(&pdev->dev.kobj, &pci_config_attr); |
647 | else | 650 | else |
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index 204b1c8e972b..5b4483811691 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c | |||
@@ -1460,33 +1460,6 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x2609, quirk_intel_pcie_pm); | |||
1460 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x260a, quirk_intel_pcie_pm); | 1460 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x260a, quirk_intel_pcie_pm); |
1461 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x260b, quirk_intel_pcie_pm); | 1461 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x260b, quirk_intel_pcie_pm); |
1462 | 1462 | ||
1463 | /* | ||
1464 | * Fixup the cardbus bridges on the IBM Dock II docking station | ||
1465 | */ | ||
1466 | static void __devinit quirk_ibm_dock2_cardbus(struct pci_dev *dev) | ||
1467 | { | ||
1468 | u32 val; | ||
1469 | |||
1470 | /* | ||
1471 | * tie the 2 interrupt pins to INTA, and configure the | ||
1472 | * multifunction routing register to handle this. | ||
1473 | */ | ||
1474 | if ((dev->subsystem_vendor == PCI_VENDOR_ID_IBM) && | ||
1475 | (dev->subsystem_device == 0x0148)) { | ||
1476 | printk(KERN_INFO "PCI: Found IBM Dock II Cardbus Bridge " | ||
1477 | "applying quirk\n"); | ||
1478 | pci_read_config_dword(dev, 0x8c, &val); | ||
1479 | val = ((val & 0xffffff00) | 0x1002); | ||
1480 | pci_write_config_dword(dev, 0x8c, val); | ||
1481 | pci_read_config_dword(dev, 0x80, &val); | ||
1482 | val = ((val & 0x00ffff00) | 0x2864c077); | ||
1483 | pci_write_config_dword(dev, 0x80, val); | ||
1484 | } | ||
1485 | } | ||
1486 | |||
1487 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_1420, | ||
1488 | quirk_ibm_dock2_cardbus); | ||
1489 | |||
1490 | static void __devinit quirk_netmos(struct pci_dev *dev) | 1463 | static void __devinit quirk_netmos(struct pci_dev *dev) |
1491 | { | 1464 | { |
1492 | unsigned int num_parallel = (dev->subsystem_device & 0xf0) >> 4; | 1465 | unsigned int num_parallel = (dev->subsystem_device & 0xf0) >> 4; |
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index d2c02df12fdc..3ac4890ce086 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c | |||
@@ -410,6 +410,7 @@ int scsi_execute_async(struct scsi_device *sdev, const unsigned char *cmd, | |||
410 | goto free_req; | 410 | goto free_req; |
411 | 411 | ||
412 | req->cmd_len = cmd_len; | 412 | req->cmd_len = cmd_len; |
413 | memset(req->cmd, 0, BLK_MAX_CDB); /* ATAPI hates garbage after CDB */ | ||
413 | memcpy(req->cmd, cmd, req->cmd_len); | 414 | memcpy(req->cmd, cmd, req->cmd_len); |
414 | req->sense = sioc->sense; | 415 | req->sense = sioc->sense; |
415 | req->sense_len = 0; | 416 | req->sense_len = 0; |
diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c index fd9e281c3bfe..94a274645f6f 100644 --- a/drivers/scsi/scsi_scan.c +++ b/drivers/scsi/scsi_scan.c | |||
@@ -631,12 +631,22 @@ static int scsi_add_lun(struct scsi_device *sdev, unsigned char *inq_result, | |||
631 | * scanning run at their own risk, or supply a user level program | 631 | * scanning run at their own risk, or supply a user level program |
632 | * that can correctly scan. | 632 | * that can correctly scan. |
633 | */ | 633 | */ |
634 | sdev->inquiry = kmalloc(sdev->inquiry_len, GFP_ATOMIC); | 634 | |
635 | if (sdev->inquiry == NULL) { | 635 | /* |
636 | * Copy at least 36 bytes of INQUIRY data, so that we don't | ||
637 | * dereference unallocated memory when accessing the Vendor, | ||
638 | * Product, and Revision strings. Badly behaved devices may set | ||
639 | * the INQUIRY Additional Length byte to a small value, indicating | ||
640 | * these strings are invalid, but often they contain plausible data | ||
641 | * nonetheless. It doesn't matter if the device sent < 36 bytes | ||
642 | * total, since scsi_probe_lun() initializes inq_result with 0s. | ||
643 | */ | ||
644 | sdev->inquiry = kmemdup(inq_result, | ||
645 | max_t(size_t, sdev->inquiry_len, 36), | ||
646 | GFP_ATOMIC); | ||
647 | if (sdev->inquiry == NULL) | ||
636 | return SCSI_SCAN_NO_RESPONSE; | 648 | return SCSI_SCAN_NO_RESPONSE; |
637 | } | ||
638 | 649 | ||
639 | memcpy(sdev->inquiry, inq_result, sdev->inquiry_len); | ||
640 | sdev->vendor = (char *) (sdev->inquiry + 8); | 650 | sdev->vendor = (char *) (sdev->inquiry + 8); |
641 | sdev->model = (char *) (sdev->inquiry + 16); | 651 | sdev->model = (char *) (sdev->inquiry + 16); |
642 | sdev->rev = (char *) (sdev->inquiry + 32); | 652 | sdev->rev = (char *) (sdev->inquiry + 32); |
diff --git a/drivers/serial/cpm_uart/cpm_uart.h b/drivers/serial/cpm_uart/cpm_uart.h index a8f894c78194..69715e556506 100644 --- a/drivers/serial/cpm_uart/cpm_uart.h +++ b/drivers/serial/cpm_uart/cpm_uart.h | |||
@@ -88,7 +88,7 @@ extern struct uart_cpm_port cpm_uart_ports[UART_NR]; | |||
88 | 88 | ||
89 | /* these are located in their respective files */ | 89 | /* these are located in their respective files */ |
90 | void cpm_line_cr_cmd(int line, int cmd); | 90 | void cpm_line_cr_cmd(int line, int cmd); |
91 | int cpm_uart_init_portdesc(void); | 91 | int __init cpm_uart_init_portdesc(void); |
92 | int cpm_uart_allocbuf(struct uart_cpm_port *pinfo, unsigned int is_con); | 92 | int cpm_uart_allocbuf(struct uart_cpm_port *pinfo, unsigned int is_con); |
93 | void cpm_uart_freebuf(struct uart_cpm_port *pinfo); | 93 | void cpm_uart_freebuf(struct uart_cpm_port *pinfo); |
94 | 94 | ||
diff --git a/drivers/serial/cpm_uart/cpm_uart_core.c b/drivers/serial/cpm_uart/cpm_uart_core.c index 0abb544ae63d..7a3b97fdf8d1 100644 --- a/drivers/serial/cpm_uart/cpm_uart_core.c +++ b/drivers/serial/cpm_uart/cpm_uart_core.c | |||
@@ -195,10 +195,8 @@ static void cpm_uart_start_tx(struct uart_port *port) | |||
195 | if (cpm_uart_tx_pump(port) != 0) { | 195 | if (cpm_uart_tx_pump(port) != 0) { |
196 | if (IS_SMC(pinfo)) { | 196 | if (IS_SMC(pinfo)) { |
197 | smcp->smc_smcm |= SMCM_TX; | 197 | smcp->smc_smcm |= SMCM_TX; |
198 | smcp->smc_smcmr |= SMCMR_TEN; | ||
199 | } else { | 198 | } else { |
200 | sccp->scc_sccm |= UART_SCCM_TX; | 199 | sccp->scc_sccm |= UART_SCCM_TX; |
201 | pinfo->sccp->scc_gsmrl |= SCC_GSMRL_ENT; | ||
202 | } | 200 | } |
203 | } | 201 | } |
204 | } | 202 | } |
@@ -421,9 +419,10 @@ static int cpm_uart_startup(struct uart_port *port) | |||
421 | /* Startup rx-int */ | 419 | /* Startup rx-int */ |
422 | if (IS_SMC(pinfo)) { | 420 | if (IS_SMC(pinfo)) { |
423 | pinfo->smcp->smc_smcm |= SMCM_RX; | 421 | pinfo->smcp->smc_smcm |= SMCM_RX; |
424 | pinfo->smcp->smc_smcmr |= SMCMR_REN; | 422 | pinfo->smcp->smc_smcmr |= (SMCMR_REN | SMCMR_TEN); |
425 | } else { | 423 | } else { |
426 | pinfo->sccp->scc_sccm |= UART_SCCM_RX; | 424 | pinfo->sccp->scc_sccm |= UART_SCCM_RX; |
425 | pinfo->sccp->scc_gsmrl |= (SCC_GSMRL_ENR | SCC_GSMRL_ENT); | ||
427 | } | 426 | } |
428 | 427 | ||
429 | if (!(pinfo->flags & FLAG_CONSOLE)) | 428 | if (!(pinfo->flags & FLAG_CONSOLE)) |
@@ -1350,11 +1349,10 @@ static int cpm_uart_init(void) { | |||
1350 | pr_info("cpm_uart: WARNING: no UART devices found on platform bus!\n"); | 1349 | pr_info("cpm_uart: WARNING: no UART devices found on platform bus!\n"); |
1351 | pr_info( | 1350 | pr_info( |
1352 | "cpm_uart: the driver will guess configuration, but this mode is no longer supported.\n"); | 1351 | "cpm_uart: the driver will guess configuration, but this mode is no longer supported.\n"); |
1353 | #ifndef CONFIG_SERIAL_CPM_CONSOLE | 1352 | |
1354 | ret = cpm_uart_init_portdesc(); | 1353 | /* Don't run this again, if the console driver did it already */ |
1355 | if (ret) | 1354 | if (cpm_uart_nr == 0) |
1356 | return ret; | 1355 | cpm_uart_init_portdesc(); |
1357 | #endif | ||
1358 | 1356 | ||
1359 | cpm_reg.nr = cpm_uart_nr; | 1357 | cpm_reg.nr = cpm_uart_nr; |
1360 | ret = uart_register_driver(&cpm_reg); | 1358 | ret = uart_register_driver(&cpm_reg); |
@@ -1366,6 +1364,8 @@ static int cpm_uart_init(void) { | |||
1366 | int con = cpm_uart_port_map[i]; | 1364 | int con = cpm_uart_port_map[i]; |
1367 | cpm_uart_ports[con].port.line = i; | 1365 | cpm_uart_ports[con].port.line = i; |
1368 | cpm_uart_ports[con].port.flags = UPF_BOOT_AUTOCONF; | 1366 | cpm_uart_ports[con].port.flags = UPF_BOOT_AUTOCONF; |
1367 | if (cpm_uart_ports[con].set_lineif) | ||
1368 | cpm_uart_ports[con].set_lineif(&cpm_uart_ports[con]); | ||
1369 | uart_add_one_port(&cpm_reg, &cpm_uart_ports[con].port); | 1369 | uart_add_one_port(&cpm_reg, &cpm_uart_ports[con].port); |
1370 | } | 1370 | } |
1371 | 1371 | ||
diff --git a/drivers/serial/cpm_uart/cpm_uart_cpm1.c b/drivers/serial/cpm_uart/cpm_uart_cpm1.c index 95afc37297a8..08e55fdc882a 100644 --- a/drivers/serial/cpm_uart/cpm_uart_cpm1.c +++ b/drivers/serial/cpm_uart/cpm_uart_cpm1.c | |||
@@ -184,7 +184,7 @@ void cpm_uart_freebuf(struct uart_cpm_port *pinfo) | |||
184 | } | 184 | } |
185 | 185 | ||
186 | /* Setup any dynamic params in the uart desc */ | 186 | /* Setup any dynamic params in the uart desc */ |
187 | int cpm_uart_init_portdesc(void) | 187 | int __init cpm_uart_init_portdesc(void) |
188 | { | 188 | { |
189 | pr_debug("CPM uart[-]:init portdesc\n"); | 189 | pr_debug("CPM uart[-]:init portdesc\n"); |
190 | 190 | ||
diff --git a/drivers/video/aty/atyfb_base.c b/drivers/video/aty/atyfb_base.c index b77b30923928..e815b354c09d 100644 --- a/drivers/video/aty/atyfb_base.c +++ b/drivers/video/aty/atyfb_base.c | |||
@@ -406,7 +406,7 @@ static struct { | |||
406 | { PCI_CHIP_MACH64LB, "3D RAGE LT PRO (Mach64 LB, AGP)", 236, 75, 100, 135, ATI_CHIP_264LTPRO }, | 406 | { PCI_CHIP_MACH64LB, "3D RAGE LT PRO (Mach64 LB, AGP)", 236, 75, 100, 135, ATI_CHIP_264LTPRO }, |
407 | { PCI_CHIP_MACH64LD, "3D RAGE LT PRO (Mach64 LD, AGP)", 230, 100, 100, 135, ATI_CHIP_264LTPRO }, | 407 | { PCI_CHIP_MACH64LD, "3D RAGE LT PRO (Mach64 LD, AGP)", 230, 100, 100, 135, ATI_CHIP_264LTPRO }, |
408 | { PCI_CHIP_MACH64LI, "3D RAGE LT PRO (Mach64 LI, PCI)", 230, 100, 100, 135, ATI_CHIP_264LTPRO | M64F_G3_PB_1_1 | M64F_G3_PB_1024x768 }, | 408 | { PCI_CHIP_MACH64LI, "3D RAGE LT PRO (Mach64 LI, PCI)", 230, 100, 100, 135, ATI_CHIP_264LTPRO | M64F_G3_PB_1_1 | M64F_G3_PB_1024x768 }, |
409 | { PCI_CHIP_MACH64LP, "3D RAGE LT PRO (Mach64 LP, PCI)", 230, 100, 100, 135, ATI_CHIP_264LTPRO }, | 409 | { PCI_CHIP_MACH64LP, "3D RAGE LT PRO (Mach64 LP, PCI)", 230, 100, 100, 135, ATI_CHIP_264LTPRO | M64F_G3_PB_1024x768 }, |
410 | { PCI_CHIP_MACH64LQ, "3D RAGE LT PRO (Mach64 LQ, PCI)", 230, 100, 100, 135, ATI_CHIP_264LTPRO }, | 410 | { PCI_CHIP_MACH64LQ, "3D RAGE LT PRO (Mach64 LQ, PCI)", 230, 100, 100, 135, ATI_CHIP_264LTPRO }, |
411 | 411 | ||
412 | { PCI_CHIP_MACH64GM, "3D RAGE XL (Mach64 GM, AGP 2x)", 230, 83, 63, 135, ATI_CHIP_264XL }, | 412 | { PCI_CHIP_MACH64GM, "3D RAGE XL (Mach64 GM, AGP 2x)", 230, 83, 63, 135, ATI_CHIP_264XL }, |
diff --git a/drivers/video/nvidia/nv_hw.c b/drivers/video/nvidia/nv_hw.c index 9ed640d35728..ea426115c6f9 100644 --- a/drivers/video/nvidia/nv_hw.c +++ b/drivers/video/nvidia/nv_hw.c | |||
@@ -145,12 +145,18 @@ static void nvGetClocks(struct nvidia_par *par, unsigned int *MClk, | |||
145 | 145 | ||
146 | if (par->Architecture >= NV_ARCH_40) { | 146 | if (par->Architecture >= NV_ARCH_40) { |
147 | pll = NV_RD32(par->PMC, 0x4020); | 147 | pll = NV_RD32(par->PMC, 0x4020); |
148 | P = (pll >> 16) & 0x03; | 148 | P = (pll >> 16) & 0x07; |
149 | pll = NV_RD32(par->PMC, 0x4024); | 149 | pll = NV_RD32(par->PMC, 0x4024); |
150 | M = pll & 0xFF; | 150 | M = pll & 0xFF; |
151 | N = (pll >> 8) & 0xFF; | 151 | N = (pll >> 8) & 0xFF; |
152 | MB = (pll >> 16) & 0xFF; | 152 | if (((par->Chipset & 0xfff0) == 0x0290) || |
153 | NB = (pll >> 24) & 0xFF; | 153 | ((par->Chipset & 0xfff0) == 0x0390)) { |
154 | MB = 1; | ||
155 | NB = 1; | ||
156 | } else { | ||
157 | MB = (pll >> 16) & 0xFF; | ||
158 | NB = (pll >> 24) & 0xFF; | ||
159 | } | ||
154 | *MClk = ((N * NB * par->CrystalFreqKHz) / (M * MB)) >> P; | 160 | *MClk = ((N * NB * par->CrystalFreqKHz) / (M * MB)) >> P; |
155 | 161 | ||
156 | pll = NV_RD32(par->PMC, 0x4000); | 162 | pll = NV_RD32(par->PMC, 0x4000); |
diff --git a/drivers/video/nvidia/nv_setup.c b/drivers/video/nvidia/nv_setup.c index a18a9aebf05f..eab3e282a4de 100644 --- a/drivers/video/nvidia/nv_setup.c +++ b/drivers/video/nvidia/nv_setup.c | |||
@@ -262,7 +262,7 @@ static void nv10GetConfig(struct nvidia_par *par) | |||
262 | #endif | 262 | #endif |
263 | 263 | ||
264 | dev = pci_find_slot(0, 1); | 264 | dev = pci_find_slot(0, 1); |
265 | if ((par->Chipset && 0xffff) == 0x01a0) { | 265 | if ((par->Chipset & 0xffff) == 0x01a0) { |
266 | int amt = 0; | 266 | int amt = 0; |
267 | 267 | ||
268 | pci_read_config_dword(dev, 0x7c, &amt); | 268 | pci_read_config_dword(dev, 0x7c, &amt); |
@@ -359,6 +359,7 @@ int NVCommonSetup(struct fb_info *info) | |||
359 | case 0x0186: | 359 | case 0x0186: |
360 | case 0x0187: | 360 | case 0x0187: |
361 | case 0x018D: | 361 | case 0x018D: |
362 | case 0x0228: | ||
362 | case 0x0286: | 363 | case 0x0286: |
363 | case 0x028C: | 364 | case 0x028C: |
364 | case 0x0316: | 365 | case 0x0316: |
@@ -382,6 +383,10 @@ int NVCommonSetup(struct fb_info *info) | |||
382 | case 0x034C: | 383 | case 0x034C: |
383 | case 0x0160: | 384 | case 0x0160: |
384 | case 0x0166: | 385 | case 0x0166: |
386 | case 0x0169: | ||
387 | case 0x016B: | ||
388 | case 0x016C: | ||
389 | case 0x016D: | ||
385 | case 0x00C8: | 390 | case 0x00C8: |
386 | case 0x00CC: | 391 | case 0x00CC: |
387 | case 0x0144: | 392 | case 0x0144: |
@@ -639,12 +644,23 @@ int NVCommonSetup(struct fb_info *info) | |||
639 | par->fpHeight = NV_RD32(par->PRAMDAC, 0x0800) + 1; | 644 | par->fpHeight = NV_RD32(par->PRAMDAC, 0x0800) + 1; |
640 | par->fpSyncs = NV_RD32(par->PRAMDAC, 0x0848) & 0x30000033; | 645 | par->fpSyncs = NV_RD32(par->PRAMDAC, 0x0848) & 0x30000033; |
641 | 646 | ||
642 | printk("Panel size is %i x %i\n", par->fpWidth, par->fpHeight); | 647 | printk("nvidiafb: Panel size is %i x %i\n", par->fpWidth, par->fpHeight); |
643 | } | 648 | } |
644 | 649 | ||
645 | if (monA) | 650 | if (monA) |
646 | info->monspecs = *monA; | 651 | info->monspecs = *monA; |
647 | 652 | ||
653 | if (!par->FlatPanel || !par->twoHeads) | ||
654 | par->FPDither = 0; | ||
655 | |||
656 | par->LVDS = 0; | ||
657 | if (par->FlatPanel && par->twoHeads) { | ||
658 | NV_WR32(par->PRAMDAC0, 0x08B0, 0x00010004); | ||
659 | if (par->PRAMDAC0[0x08b4] & 1) | ||
660 | par->LVDS = 1; | ||
661 | printk("nvidiafb: Panel is %s\n", par->LVDS ? "LVDS" : "TMDS"); | ||
662 | } | ||
663 | |||
648 | kfree(edidA); | 664 | kfree(edidA); |
649 | kfree(edidB); | 665 | kfree(edidB); |
650 | done: | 666 | done: |
diff --git a/drivers/video/nvidia/nv_type.h b/drivers/video/nvidia/nv_type.h index acdc26693402..86e65dea60d3 100644 --- a/drivers/video/nvidia/nv_type.h +++ b/drivers/video/nvidia/nv_type.h | |||
@@ -129,6 +129,7 @@ struct nvidia_par { | |||
129 | int fpHeight; | 129 | int fpHeight; |
130 | int PanelTweak; | 130 | int PanelTweak; |
131 | int paneltweak; | 131 | int paneltweak; |
132 | int LVDS; | ||
132 | int pm_state; | 133 | int pm_state; |
133 | u32 crtcSync_read; | 134 | u32 crtcSync_read; |
134 | u32 fpSyncs; | 135 | u32 fpSyncs; |
diff --git a/drivers/video/nvidia/nvidia.c b/drivers/video/nvidia/nvidia.c index eb24107bcc81..538e947610e1 100644 --- a/drivers/video/nvidia/nvidia.c +++ b/drivers/video/nvidia/nvidia.c | |||
@@ -1160,20 +1160,20 @@ static u32 __devinit nvidia_get_arch(struct fb_info *info) | |||
1160 | case 0x0340: /* GeForceFX 5700 */ | 1160 | case 0x0340: /* GeForceFX 5700 */ |
1161 | arch = NV_ARCH_30; | 1161 | arch = NV_ARCH_30; |
1162 | break; | 1162 | break; |
1163 | case 0x0040: | 1163 | case 0x0040: /* GeForce 6800 */ |
1164 | case 0x00C0: | 1164 | case 0x00C0: /* GeForce 6800 */ |
1165 | case 0x0120: | 1165 | case 0x0120: /* GeForce 6800 */ |
1166 | case 0x0130: | 1166 | case 0x0130: |
1167 | case 0x0140: | 1167 | case 0x0140: /* GeForce 6600 */ |
1168 | case 0x0160: | 1168 | case 0x0160: /* GeForce 6200 */ |
1169 | case 0x01D0: | 1169 | case 0x01D0: /* GeForce 7200, 7300, 7400 */ |
1170 | case 0x0090: | 1170 | case 0x0090: /* GeForce 7800 */ |
1171 | case 0x0210: | 1171 | case 0x0210: /* GeForce 6800 */ |
1172 | case 0x0220: | 1172 | case 0x0220: /* GeForce 6200 */ |
1173 | case 0x0230: | 1173 | case 0x0230: |
1174 | case 0x0240: | 1174 | case 0x0240: /* GeForce 6100 */ |
1175 | case 0x0290: | 1175 | case 0x0290: /* GeForce 7900 */ |
1176 | case 0x0390: | 1176 | case 0x0390: /* GeForce 7600 */ |
1177 | arch = NV_ARCH_40; | 1177 | arch = NV_ARCH_40; |
1178 | break; | 1178 | break; |
1179 | case 0x0020: /* TNT, TNT2 */ | 1179 | case 0x0020: /* TNT, TNT2 */ |
diff --git a/drivers/video/pnx4008/pnxrgbfb.c b/drivers/video/pnx4008/pnxrgbfb.c index 7d9453c91a42..f29e66e2d774 100644 --- a/drivers/video/pnx4008/pnxrgbfb.c +++ b/drivers/video/pnx4008/pnxrgbfb.c | |||
@@ -154,7 +154,8 @@ static int __devinit rgbfb_probe(struct platform_device *pdev) | |||
154 | goto err1; | 154 | goto err1; |
155 | } | 155 | } |
156 | 156 | ||
157 | if (!fb_get_options("pnxrgbfb", &option) && !strcmp(option, "nocursor")) | 157 | if (!fb_get_options("pnxrgbfb", &option) && option && |
158 | !strcmp(option, "nocursor")) | ||
158 | rgbfb_ops.fb_cursor = no_cursor; | 159 | rgbfb_ops.fb_cursor = no_cursor; |
159 | 160 | ||
160 | info->node = -1; | 161 | info->node = -1; |
@@ -191,7 +192,7 @@ err: | |||
191 | 192 | ||
192 | static struct platform_driver rgbfb_driver = { | 193 | static struct platform_driver rgbfb_driver = { |
193 | .driver = { | 194 | .driver = { |
194 | .name = "rgbfb", | 195 | .name = "pnx4008-rgbfb", |
195 | }, | 196 | }, |
196 | .probe = rgbfb_probe, | 197 | .probe = rgbfb_probe, |
197 | .remove = rgbfb_remove, | 198 | .remove = rgbfb_remove, |
diff --git a/drivers/video/pnx4008/sdum.c b/drivers/video/pnx4008/sdum.c index 51f0ecc2a511..d23bf0d659b6 100644 --- a/drivers/video/pnx4008/sdum.c +++ b/drivers/video/pnx4008/sdum.c | |||
@@ -848,7 +848,7 @@ static int sdum_remove(struct platform_device *pdev) | |||
848 | 848 | ||
849 | static struct platform_driver sdum_driver = { | 849 | static struct platform_driver sdum_driver = { |
850 | .driver = { | 850 | .driver = { |
851 | .name = "sdum", | 851 | .name = "pnx4008-sdum", |
852 | }, | 852 | }, |
853 | .probe = sdum_probe, | 853 | .probe = sdum_probe, |
854 | .remove = sdum_remove, | 854 | .remove = sdum_remove, |
diff --git a/fs/Kconfig b/fs/Kconfig index 133dcc8a4150..7b1511d50b05 100644 --- a/fs/Kconfig +++ b/fs/Kconfig | |||
@@ -2060,8 +2060,7 @@ config CODA_FS_OLD_API | |||
2060 | For most cases you probably want to say N. | 2060 | For most cases you probably want to say N. |
2061 | 2061 | ||
2062 | config AFS_FS | 2062 | config AFS_FS |
2063 | # for fs/nls/Config.in | 2063 | tristate "Andrew File System support (AFS) (EXPERIMENTAL)" |
2064 | tristate "Andrew File System support (AFS) (Experimental)" | ||
2065 | depends on INET && EXPERIMENTAL | 2064 | depends on INET && EXPERIMENTAL |
2066 | select RXRPC | 2065 | select RXRPC |
2067 | help | 2066 | help |
diff --git a/fs/autofs/inode.c b/fs/autofs/inode.c index 54c518c89e4c..38ede5c9d6fd 100644 --- a/fs/autofs/inode.c +++ b/fs/autofs/inode.c | |||
@@ -25,6 +25,14 @@ void autofs_kill_sb(struct super_block *sb) | |||
25 | struct autofs_sb_info *sbi = autofs_sbi(sb); | 25 | struct autofs_sb_info *sbi = autofs_sbi(sb); |
26 | unsigned int n; | 26 | unsigned int n; |
27 | 27 | ||
28 | /* | ||
29 | * In the event of a failure in get_sb_nodev the superblock | ||
30 | * info is not present so nothing else has been setup, so | ||
31 | * just exit when we are called from deactivate_super. | ||
32 | */ | ||
33 | if (!sbi) | ||
34 | return; | ||
35 | |||
28 | if ( !sbi->catatonic ) | 36 | if ( !sbi->catatonic ) |
29 | autofs_catatonic_mode(sbi); /* Free wait queues, close pipe */ | 37 | autofs_catatonic_mode(sbi); /* Free wait queues, close pipe */ |
30 | 38 | ||
@@ -136,7 +144,8 @@ int autofs_fill_super(struct super_block *s, void *data, int silent) | |||
136 | 144 | ||
137 | s->s_fs_info = sbi; | 145 | s->s_fs_info = sbi; |
138 | sbi->magic = AUTOFS_SBI_MAGIC; | 146 | sbi->magic = AUTOFS_SBI_MAGIC; |
139 | sbi->catatonic = 0; | 147 | sbi->pipe = NULL; |
148 | sbi->catatonic = 1; | ||
140 | sbi->exp_timeout = 0; | 149 | sbi->exp_timeout = 0; |
141 | sbi->oz_pgrp = process_group(current); | 150 | sbi->oz_pgrp = process_group(current); |
142 | autofs_initialize_hash(&sbi->dirhash); | 151 | autofs_initialize_hash(&sbi->dirhash); |
@@ -180,6 +189,7 @@ int autofs_fill_super(struct super_block *s, void *data, int silent) | |||
180 | if ( !pipe->f_op || !pipe->f_op->write ) | 189 | if ( !pipe->f_op || !pipe->f_op->write ) |
181 | goto fail_fput; | 190 | goto fail_fput; |
182 | sbi->pipe = pipe; | 191 | sbi->pipe = pipe; |
192 | sbi->catatonic = 0; | ||
183 | 193 | ||
184 | /* | 194 | /* |
185 | * Success! Install the root dentry now to indicate completion. | 195 | * Success! Install the root dentry now to indicate completion. |
@@ -198,6 +208,8 @@ fail_iput: | |||
198 | iput(root_inode); | 208 | iput(root_inode); |
199 | fail_free: | 209 | fail_free: |
200 | kfree(sbi); | 210 | kfree(sbi); |
211 | s->s_fs_info = NULL; | ||
212 | kill_anon_super(s); | ||
201 | fail_unlock: | 213 | fail_unlock: |
202 | return -EINVAL; | 214 | return -EINVAL; |
203 | } | 215 | } |
diff --git a/fs/autofs/waitq.c b/fs/autofs/waitq.c index 633f628005b4..19a9cafb5ddf 100644 --- a/fs/autofs/waitq.c +++ b/fs/autofs/waitq.c | |||
@@ -41,6 +41,7 @@ void autofs_catatonic_mode(struct autofs_sb_info *sbi) | |||
41 | wq = nwq; | 41 | wq = nwq; |
42 | } | 42 | } |
43 | fput(sbi->pipe); /* Close the pipe */ | 43 | fput(sbi->pipe); /* Close the pipe */ |
44 | sbi->pipe = NULL; | ||
44 | autofs_hash_dputall(&sbi->dirhash); /* Remove all dentry pointers */ | 45 | autofs_hash_dputall(&sbi->dirhash); /* Remove all dentry pointers */ |
45 | } | 46 | } |
46 | 47 | ||
diff --git a/fs/autofs4/inode.c b/fs/autofs4/inode.c index 51fd8595bf85..ce7c0f1dd529 100644 --- a/fs/autofs4/inode.c +++ b/fs/autofs4/inode.c | |||
@@ -99,6 +99,9 @@ static void autofs4_force_release(struct autofs_sb_info *sbi) | |||
99 | struct dentry *this_parent = sbi->sb->s_root; | 99 | struct dentry *this_parent = sbi->sb->s_root; |
100 | struct list_head *next; | 100 | struct list_head *next; |
101 | 101 | ||
102 | if (!sbi->sb->s_root) | ||
103 | return; | ||
104 | |||
102 | spin_lock(&dcache_lock); | 105 | spin_lock(&dcache_lock); |
103 | repeat: | 106 | repeat: |
104 | next = this_parent->d_subdirs.next; | 107 | next = this_parent->d_subdirs.next; |
@@ -146,6 +149,14 @@ void autofs4_kill_sb(struct super_block *sb) | |||
146 | { | 149 | { |
147 | struct autofs_sb_info *sbi = autofs4_sbi(sb); | 150 | struct autofs_sb_info *sbi = autofs4_sbi(sb); |
148 | 151 | ||
152 | /* | ||
153 | * In the event of a failure in get_sb_nodev the superblock | ||
154 | * info is not present so nothing else has been setup, so | ||
155 | * just exit when we are called from deactivate_super. | ||
156 | */ | ||
157 | if (!sbi) | ||
158 | return; | ||
159 | |||
149 | sb->s_fs_info = NULL; | 160 | sb->s_fs_info = NULL; |
150 | 161 | ||
151 | if ( !sbi->catatonic ) | 162 | if ( !sbi->catatonic ) |
@@ -310,7 +321,8 @@ int autofs4_fill_super(struct super_block *s, void *data, int silent) | |||
310 | s->s_fs_info = sbi; | 321 | s->s_fs_info = sbi; |
311 | sbi->magic = AUTOFS_SBI_MAGIC; | 322 | sbi->magic = AUTOFS_SBI_MAGIC; |
312 | sbi->pipefd = -1; | 323 | sbi->pipefd = -1; |
313 | sbi->catatonic = 0; | 324 | sbi->pipe = NULL; |
325 | sbi->catatonic = 1; | ||
314 | sbi->exp_timeout = 0; | 326 | sbi->exp_timeout = 0; |
315 | sbi->oz_pgrp = process_group(current); | 327 | sbi->oz_pgrp = process_group(current); |
316 | sbi->sb = s; | 328 | sbi->sb = s; |
@@ -388,6 +400,7 @@ int autofs4_fill_super(struct super_block *s, void *data, int silent) | |||
388 | goto fail_fput; | 400 | goto fail_fput; |
389 | sbi->pipe = pipe; | 401 | sbi->pipe = pipe; |
390 | sbi->pipefd = pipefd; | 402 | sbi->pipefd = pipefd; |
403 | sbi->catatonic = 0; | ||
391 | 404 | ||
392 | /* | 405 | /* |
393 | * Success! Install the root dentry now to indicate completion. | 406 | * Success! Install the root dentry now to indicate completion. |
@@ -412,6 +425,8 @@ fail_ino: | |||
412 | kfree(ino); | 425 | kfree(ino); |
413 | fail_free: | 426 | fail_free: |
414 | kfree(sbi); | 427 | kfree(sbi); |
428 | s->s_fs_info = NULL; | ||
429 | kill_anon_super(s); | ||
415 | fail_unlock: | 430 | fail_unlock: |
416 | return -EINVAL; | 431 | return -EINVAL; |
417 | } | 432 | } |
diff --git a/fs/autofs4/waitq.c b/fs/autofs4/waitq.c index c0a6c8d445c7..1e4a539f4417 100644 --- a/fs/autofs4/waitq.c +++ b/fs/autofs4/waitq.c | |||
@@ -41,10 +41,8 @@ void autofs4_catatonic_mode(struct autofs_sb_info *sbi) | |||
41 | wake_up_interruptible(&wq->queue); | 41 | wake_up_interruptible(&wq->queue); |
42 | wq = nwq; | 42 | wq = nwq; |
43 | } | 43 | } |
44 | if (sbi->pipe) { | 44 | fput(sbi->pipe); /* Close the pipe */ |
45 | fput(sbi->pipe); /* Close the pipe */ | 45 | sbi->pipe = NULL; |
46 | sbi->pipe = NULL; | ||
47 | } | ||
48 | } | 46 | } |
49 | 47 | ||
50 | static int autofs4_write(struct file *file, const void *addr, int bytes) | 48 | static int autofs4_write(struct file *file, const void *addr, int bytes) |
diff --git a/fs/cifs/file.c b/fs/cifs/file.c index 7e056b9b49e8..2436ed8fc840 100644 --- a/fs/cifs/file.c +++ b/fs/cifs/file.c | |||
@@ -492,10 +492,14 @@ int cifs_close(struct inode *inode, struct file *file) | |||
492 | the struct would be in each open file, | 492 | the struct would be in each open file, |
493 | but this should give enough time to | 493 | but this should give enough time to |
494 | clear the socket */ | 494 | clear the socket */ |
495 | cERROR(1,("close with pending writes")); | 495 | #ifdef CONFIG_CIFS_DEBUG2 |
496 | cFYI(1,("close delay, write pending")); | ||
497 | #endif /* DEBUG2 */ | ||
496 | msleep(timeout); | 498 | msleep(timeout); |
497 | timeout *= 4; | 499 | timeout *= 4; |
498 | } | 500 | } |
501 | if(atomic_read(&pSMBFile->wrtPending)) | ||
502 | cERROR(1,("close with pending writes")); | ||
499 | rc = CIFSSMBClose(xid, pTcon, | 503 | rc = CIFSSMBClose(xid, pTcon, |
500 | pSMBFile->netfid); | 504 | pSMBFile->netfid); |
501 | } | 505 | } |
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c index dffe295825f4..1ad8c9fcc742 100644 --- a/fs/cifs/inode.c +++ b/fs/cifs/inode.c | |||
@@ -1089,8 +1089,10 @@ int cifs_getattr(struct vfsmount *mnt, struct dentry *dentry, | |||
1089 | struct kstat *stat) | 1089 | struct kstat *stat) |
1090 | { | 1090 | { |
1091 | int err = cifs_revalidate(dentry); | 1091 | int err = cifs_revalidate(dentry); |
1092 | if (!err) | 1092 | if (!err) { |
1093 | generic_fillattr(dentry->d_inode, stat); | 1093 | generic_fillattr(dentry->d_inode, stat); |
1094 | stat->blksize = CIFS_MAX_MSGSIZE; | ||
1095 | } | ||
1094 | return err; | 1096 | return err; |
1095 | } | 1097 | } |
1096 | 1098 | ||
diff --git a/fs/cifs/sess.c b/fs/cifs/sess.c index a8a083543ba0..bbdda99dce61 100644 --- a/fs/cifs/sess.c +++ b/fs/cifs/sess.c | |||
@@ -90,7 +90,9 @@ static void unicode_ssetup_strings(char ** pbcc_area, struct cifsSesInfo *ses, | |||
90 | } */ | 90 | } */ |
91 | /* copy user */ | 91 | /* copy user */ |
92 | if(ses->userName == NULL) { | 92 | if(ses->userName == NULL) { |
93 | /* BB what about null user mounts - check that we do this BB */ | 93 | /* null user mount */ |
94 | *bcc_ptr = 0; | ||
95 | *(bcc_ptr+1) = 0; | ||
94 | } else { /* 300 should be long enough for any conceivable user name */ | 96 | } else { /* 300 should be long enough for any conceivable user name */ |
95 | bytes_ret = cifs_strtoUCS((__le16 *) bcc_ptr, ses->userName, | 97 | bytes_ret = cifs_strtoUCS((__le16 *) bcc_ptr, ses->userName, |
96 | 300, nls_cp); | 98 | 300, nls_cp); |
@@ -98,10 +100,13 @@ static void unicode_ssetup_strings(char ** pbcc_area, struct cifsSesInfo *ses, | |||
98 | bcc_ptr += 2 * bytes_ret; | 100 | bcc_ptr += 2 * bytes_ret; |
99 | bcc_ptr += 2; /* account for null termination */ | 101 | bcc_ptr += 2; /* account for null termination */ |
100 | /* copy domain */ | 102 | /* copy domain */ |
101 | if(ses->domainName == NULL) | 103 | if(ses->domainName == NULL) { |
102 | bytes_ret = cifs_strtoUCS((__le16 *) bcc_ptr, | 104 | /* Sending null domain better than using a bogus domain name (as |
103 | "CIFS_LINUX_DOM", 32, nls_cp); | 105 | we did briefly in 2.6.18) since server will use its default */ |
104 | else | 106 | *bcc_ptr = 0; |
107 | *(bcc_ptr+1) = 0; | ||
108 | bytes_ret = 0; | ||
109 | } else | ||
105 | bytes_ret = cifs_strtoUCS((__le16 *) bcc_ptr, ses->domainName, | 110 | bytes_ret = cifs_strtoUCS((__le16 *) bcc_ptr, ses->domainName, |
106 | 256, nls_cp); | 111 | 256, nls_cp); |
107 | bcc_ptr += 2 * bytes_ret; | 112 | bcc_ptr += 2 * bytes_ret; |
@@ -144,13 +149,11 @@ static void ascii_ssetup_strings(char ** pbcc_area, struct cifsSesInfo *ses, | |||
144 | 149 | ||
145 | /* copy domain */ | 150 | /* copy domain */ |
146 | 151 | ||
147 | if(ses->domainName == NULL) { | 152 | if(ses->domainName != NULL) { |
148 | strcpy(bcc_ptr, "CIFS_LINUX_DOM"); | ||
149 | bcc_ptr += 14; /* strlen(CIFS_LINUX_DOM) */ | ||
150 | } else { | ||
151 | strncpy(bcc_ptr, ses->domainName, 256); | 153 | strncpy(bcc_ptr, ses->domainName, 256); |
152 | bcc_ptr += strnlen(ses->domainName, 256); | 154 | bcc_ptr += strnlen(ses->domainName, 256); |
153 | } | 155 | } /* else we will send a null domain name |
156 | so the server will default to its own domain */ | ||
154 | *bcc_ptr = 0; | 157 | *bcc_ptr = 0; |
155 | bcc_ptr++; | 158 | bcc_ptr++; |
156 | 159 | ||
diff --git a/fs/ecryptfs/dentry.c b/fs/ecryptfs/dentry.c index 0b9992ab990f..52d1e36dc746 100644 --- a/fs/ecryptfs/dentry.c +++ b/fs/ecryptfs/dentry.c | |||
@@ -57,6 +57,12 @@ static int ecryptfs_d_revalidate(struct dentry *dentry, struct nameidata *nd) | |||
57 | rc = lower_dentry->d_op->d_revalidate(lower_dentry, nd); | 57 | rc = lower_dentry->d_op->d_revalidate(lower_dentry, nd); |
58 | nd->dentry = dentry_save; | 58 | nd->dentry = dentry_save; |
59 | nd->mnt = vfsmount_save; | 59 | nd->mnt = vfsmount_save; |
60 | if (dentry->d_inode) { | ||
61 | struct inode *lower_inode = | ||
62 | ecryptfs_inode_to_lower(dentry->d_inode); | ||
63 | |||
64 | ecryptfs_copy_attr_all(dentry->d_inode, lower_inode); | ||
65 | } | ||
60 | out: | 66 | out: |
61 | return rc; | 67 | return rc; |
62 | } | 68 | } |
diff --git a/fs/ecryptfs/inode.c b/fs/ecryptfs/inode.c index ff4865d24f0f..dfcc68484f47 100644 --- a/fs/ecryptfs/inode.c +++ b/fs/ecryptfs/inode.c | |||
@@ -470,6 +470,7 @@ out_lock: | |||
470 | unlock_dir(lower_dir_dentry); | 470 | unlock_dir(lower_dir_dentry); |
471 | dput(lower_new_dentry); | 471 | dput(lower_new_dentry); |
472 | dput(lower_old_dentry); | 472 | dput(lower_old_dentry); |
473 | d_drop(lower_old_dentry); | ||
473 | d_drop(new_dentry); | 474 | d_drop(new_dentry); |
474 | d_drop(old_dentry); | 475 | d_drop(old_dentry); |
475 | return rc; | 476 | return rc; |
@@ -484,7 +485,7 @@ static int ecryptfs_unlink(struct inode *dir, struct dentry *dentry) | |||
484 | lock_parent(lower_dentry); | 485 | lock_parent(lower_dentry); |
485 | rc = vfs_unlink(lower_dir_inode, lower_dentry); | 486 | rc = vfs_unlink(lower_dir_inode, lower_dentry); |
486 | if (rc) { | 487 | if (rc) { |
487 | ecryptfs_printk(KERN_ERR, "Error in vfs_unlink\n"); | 488 | printk(KERN_ERR "Error in vfs_unlink; rc = [%d]\n", rc); |
488 | goto out_unlock; | 489 | goto out_unlock; |
489 | } | 490 | } |
490 | ecryptfs_copy_attr_times(dir, lower_dir_inode); | 491 | ecryptfs_copy_attr_times(dir, lower_dir_inode); |
@@ -630,6 +631,8 @@ ecryptfs_rename(struct inode *old_dir, struct dentry *old_dentry, | |||
630 | ecryptfs_copy_attr_all(old_dir, lower_old_dir_dentry->d_inode); | 631 | ecryptfs_copy_attr_all(old_dir, lower_old_dir_dentry->d_inode); |
631 | out_lock: | 632 | out_lock: |
632 | unlock_rename(lower_old_dir_dentry, lower_new_dir_dentry); | 633 | unlock_rename(lower_old_dir_dentry, lower_new_dir_dentry); |
634 | dput(lower_new_dentry->d_parent); | ||
635 | dput(lower_old_dentry->d_parent); | ||
633 | dput(lower_new_dentry); | 636 | dput(lower_new_dentry); |
634 | dput(lower_old_dentry); | 637 | dput(lower_old_dentry); |
635 | return rc; | 638 | return rc; |
diff --git a/fs/fat/file.c b/fs/fat/file.c index 8337451e7897..0aa813d944a6 100644 --- a/fs/fat/file.c +++ b/fs/fat/file.c | |||
@@ -303,7 +303,17 @@ void fat_truncate(struct inode *inode) | |||
303 | fat_flush_inodes(inode->i_sb, inode, NULL); | 303 | fat_flush_inodes(inode->i_sb, inode, NULL); |
304 | } | 304 | } |
305 | 305 | ||
306 | int fat_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat) | ||
307 | { | ||
308 | struct inode *inode = dentry->d_inode; | ||
309 | generic_fillattr(inode, stat); | ||
310 | stat->blksize = MSDOS_SB(inode->i_sb)->cluster_size; | ||
311 | return 0; | ||
312 | } | ||
313 | EXPORT_SYMBOL_GPL(fat_getattr); | ||
314 | |||
306 | struct inode_operations fat_file_inode_operations = { | 315 | struct inode_operations fat_file_inode_operations = { |
307 | .truncate = fat_truncate, | 316 | .truncate = fat_truncate, |
308 | .setattr = fat_notify_change, | 317 | .setattr = fat_notify_change, |
318 | .getattr = fat_getattr, | ||
309 | }; | 319 | }; |
diff --git a/fs/hfs/super.c b/fs/hfs/super.c index d43b4fcc8ad3..85b17b3fa4a0 100644 --- a/fs/hfs/super.c +++ b/fs/hfs/super.c | |||
@@ -390,11 +390,13 @@ static int hfs_fill_super(struct super_block *sb, void *data, int silent) | |||
390 | hfs_find_exit(&fd); | 390 | hfs_find_exit(&fd); |
391 | goto bail_no_root; | 391 | goto bail_no_root; |
392 | } | 392 | } |
393 | res = -EINVAL; | ||
393 | root_inode = hfs_iget(sb, &fd.search_key->cat, &rec); | 394 | root_inode = hfs_iget(sb, &fd.search_key->cat, &rec); |
394 | hfs_find_exit(&fd); | 395 | hfs_find_exit(&fd); |
395 | if (!root_inode) | 396 | if (!root_inode) |
396 | goto bail_no_root; | 397 | goto bail_no_root; |
397 | 398 | ||
399 | res = -ENOMEM; | ||
398 | sb->s_root = d_alloc_root(root_inode); | 400 | sb->s_root = d_alloc_root(root_inode); |
399 | if (!sb->s_root) | 401 | if (!sb->s_root) |
400 | goto bail_iput; | 402 | goto bail_iput; |
diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c index 0bea6a619e10..7f4756963d05 100644 --- a/fs/hugetlbfs/inode.c +++ b/fs/hugetlbfs/inode.c | |||
@@ -62,24 +62,19 @@ static int hugetlbfs_file_mmap(struct file *file, struct vm_area_struct *vma) | |||
62 | loff_t len, vma_len; | 62 | loff_t len, vma_len; |
63 | int ret; | 63 | int ret; |
64 | 64 | ||
65 | if (vma->vm_pgoff & (HPAGE_SIZE / PAGE_SIZE - 1)) | 65 | /* |
66 | return -EINVAL; | 66 | * vma alignment has already been checked by prepare_hugepage_range. |
67 | 67 | * If you add any error returns here, do so after setting VM_HUGETLB, | |
68 | if (vma->vm_start & ~HPAGE_MASK) | 68 | * so is_vm_hugetlb_page tests below unmap_region go the right way |
69 | return -EINVAL; | 69 | * when do_mmap_pgoff unwinds (may be important on powerpc and ia64). |
70 | 70 | */ | |
71 | if (vma->vm_end & ~HPAGE_MASK) | 71 | vma->vm_flags |= VM_HUGETLB | VM_RESERVED; |
72 | return -EINVAL; | 72 | vma->vm_ops = &hugetlb_vm_ops; |
73 | |||
74 | if (vma->vm_end - vma->vm_start < HPAGE_SIZE) | ||
75 | return -EINVAL; | ||
76 | 73 | ||
77 | vma_len = (loff_t)(vma->vm_end - vma->vm_start); | 74 | vma_len = (loff_t)(vma->vm_end - vma->vm_start); |
78 | 75 | ||
79 | mutex_lock(&inode->i_mutex); | 76 | mutex_lock(&inode->i_mutex); |
80 | file_accessed(file); | 77 | file_accessed(file); |
81 | vma->vm_flags |= VM_HUGETLB | VM_RESERVED; | ||
82 | vma->vm_ops = &hugetlb_vm_ops; | ||
83 | 78 | ||
84 | ret = -ENOMEM; | 79 | ret = -ENOMEM; |
85 | len = vma_len + ((loff_t)vma->vm_pgoff << PAGE_SHIFT); | 80 | len = vma_len + ((loff_t)vma->vm_pgoff << PAGE_SHIFT); |
diff --git a/fs/msdos/namei.c b/fs/msdos/namei.c index b0f01b3b0536..452461955cbd 100644 --- a/fs/msdos/namei.c +++ b/fs/msdos/namei.c | |||
@@ -654,6 +654,7 @@ static struct inode_operations msdos_dir_inode_operations = { | |||
654 | .rmdir = msdos_rmdir, | 654 | .rmdir = msdos_rmdir, |
655 | .rename = msdos_rename, | 655 | .rename = msdos_rename, |
656 | .setattr = fat_notify_change, | 656 | .setattr = fat_notify_change, |
657 | .getattr = fat_getattr, | ||
657 | }; | 658 | }; |
658 | 659 | ||
659 | static int msdos_fill_super(struct super_block *sb, void *data, int silent) | 660 | static int msdos_fill_super(struct super_block *sb, void *data, int silent) |
diff --git a/fs/vfat/namei.c b/fs/vfat/namei.c index edb711ff7b05..0afd745a37cd 100644 --- a/fs/vfat/namei.c +++ b/fs/vfat/namei.c | |||
@@ -1004,6 +1004,7 @@ static struct inode_operations vfat_dir_inode_operations = { | |||
1004 | .rmdir = vfat_rmdir, | 1004 | .rmdir = vfat_rmdir, |
1005 | .rename = vfat_rename, | 1005 | .rename = vfat_rename, |
1006 | .setattr = fat_notify_change, | 1006 | .setattr = fat_notify_change, |
1007 | .getattr = fat_getattr, | ||
1007 | }; | 1008 | }; |
1008 | 1009 | ||
1009 | static int vfat_fill_super(struct super_block *sb, void *data, int silent) | 1010 | static int vfat_fill_super(struct super_block *sb, void *data, int silent) |
diff --git a/fs/xfs/Makefile-linux-2.6 b/fs/xfs/Makefile-linux-2.6 index 291948d5085a..b49989bb89ad 100644 --- a/fs/xfs/Makefile-linux-2.6 +++ b/fs/xfs/Makefile-linux-2.6 | |||
@@ -21,22 +21,7 @@ EXTRA_CFLAGS += -Ifs/xfs -Ifs/xfs/linux-2.6 -funsigned-char | |||
21 | XFS_LINUX := linux-2.6 | 21 | XFS_LINUX := linux-2.6 |
22 | 22 | ||
23 | ifeq ($(CONFIG_XFS_DEBUG),y) | 23 | ifeq ($(CONFIG_XFS_DEBUG),y) |
24 | EXTRA_CFLAGS += -g -DSTATIC="" -DDEBUG | 24 | EXTRA_CFLAGS += -g |
25 | EXTRA_CFLAGS += -DXFS_BUF_LOCK_TRACKING | ||
26 | endif | ||
27 | ifeq ($(CONFIG_XFS_TRACE),y) | ||
28 | EXTRA_CFLAGS += -DXFS_ALLOC_TRACE | ||
29 | EXTRA_CFLAGS += -DXFS_ATTR_TRACE | ||
30 | EXTRA_CFLAGS += -DXFS_BLI_TRACE | ||
31 | EXTRA_CFLAGS += -DXFS_BMAP_TRACE | ||
32 | EXTRA_CFLAGS += -DXFS_BMBT_TRACE | ||
33 | EXTRA_CFLAGS += -DXFS_DIR2_TRACE | ||
34 | EXTRA_CFLAGS += -DXFS_DQUOT_TRACE | ||
35 | EXTRA_CFLAGS += -DXFS_ILOCK_TRACE | ||
36 | EXTRA_CFLAGS += -DXFS_LOG_TRACE | ||
37 | EXTRA_CFLAGS += -DXFS_RW_TRACE | ||
38 | EXTRA_CFLAGS += -DXFS_BUF_TRACE | ||
39 | EXTRA_CFLAGS += -DXFS_VNODE_TRACE | ||
40 | endif | 25 | endif |
41 | 26 | ||
42 | obj-$(CONFIG_XFS_FS) += xfs.o | 27 | obj-$(CONFIG_XFS_FS) += xfs.o |
diff --git a/fs/xfs/linux-2.6/xfs_buf.c b/fs/xfs/linux-2.6/xfs_buf.c index db5f5a3608ca..d3382843698e 100644 --- a/fs/xfs/linux-2.6/xfs_buf.c +++ b/fs/xfs/linux-2.6/xfs_buf.c | |||
@@ -15,6 +15,7 @@ | |||
15 | * along with this program; if not, write the Free Software Foundation, | 15 | * along with this program; if not, write the Free Software Foundation, |
16 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | 16 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
17 | */ | 17 | */ |
18 | #include "xfs.h" | ||
18 | #include <linux/stddef.h> | 19 | #include <linux/stddef.h> |
19 | #include <linux/errno.h> | 20 | #include <linux/errno.h> |
20 | #include <linux/slab.h> | 21 | #include <linux/slab.h> |
@@ -31,7 +32,6 @@ | |||
31 | #include <linux/kthread.h> | 32 | #include <linux/kthread.h> |
32 | #include <linux/migrate.h> | 33 | #include <linux/migrate.h> |
33 | #include <linux/backing-dev.h> | 34 | #include <linux/backing-dev.h> |
34 | #include "xfs_linux.h" | ||
35 | 35 | ||
36 | STATIC kmem_zone_t *xfs_buf_zone; | 36 | STATIC kmem_zone_t *xfs_buf_zone; |
37 | STATIC kmem_shaker_t xfs_buf_shake; | 37 | STATIC kmem_shaker_t xfs_buf_shake; |
@@ -1406,7 +1406,7 @@ xfs_alloc_bufhash( | |||
1406 | btp->bt_hashshift = external ? 3 : 8; /* 8 or 256 buckets */ | 1406 | btp->bt_hashshift = external ? 3 : 8; /* 8 or 256 buckets */ |
1407 | btp->bt_hashmask = (1 << btp->bt_hashshift) - 1; | 1407 | btp->bt_hashmask = (1 << btp->bt_hashshift) - 1; |
1408 | btp->bt_hash = kmem_zalloc((1 << btp->bt_hashshift) * | 1408 | btp->bt_hash = kmem_zalloc((1 << btp->bt_hashshift) * |
1409 | sizeof(xfs_bufhash_t), KM_SLEEP); | 1409 | sizeof(xfs_bufhash_t), KM_SLEEP | KM_LARGE); |
1410 | for (i = 0; i < (1 << btp->bt_hashshift); i++) { | 1410 | for (i = 0; i < (1 << btp->bt_hashshift); i++) { |
1411 | spin_lock_init(&btp->bt_hash[i].bh_lock); | 1411 | spin_lock_init(&btp->bt_hash[i].bh_lock); |
1412 | INIT_LIST_HEAD(&btp->bt_hash[i].bh_list); | 1412 | INIT_LIST_HEAD(&btp->bt_hash[i].bh_list); |
diff --git a/fs/xfs/linux-2.6/xfs_dmapi_priv.h b/fs/xfs/linux-2.6/xfs_dmapi_priv.h new file mode 100644 index 000000000000..a8b0b1685eed --- /dev/null +++ b/fs/xfs/linux-2.6/xfs_dmapi_priv.h | |||
@@ -0,0 +1,28 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2000-2006 Silicon Graphics, Inc. | ||
3 | * All Rights Reserved. | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or | ||
6 | * modify it under the terms of the GNU General Public License as | ||
7 | * published by the Free Software Foundation. | ||
8 | * | ||
9 | * This program is distributed in the hope that it would be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, write the Free Software Foundation, | ||
16 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
17 | */ | ||
18 | #ifndef __XFS_DMAPI_PRIV_H__ | ||
19 | #define __XFS_DMAPI_PRIV_H__ | ||
20 | |||
21 | /* | ||
22 | * Based on IO_ISDIRECT, decide which i_ flag is set. | ||
23 | */ | ||
24 | #define DM_SEM_FLAG_RD(ioflags) (((ioflags) & IO_ISDIRECT) ? \ | ||
25 | DM_FLAGS_IMUX : 0) | ||
26 | #define DM_SEM_FLAG_WR (DM_FLAGS_IALLOCSEM_WR | DM_FLAGS_IMUX) | ||
27 | |||
28 | #endif /*__XFS_DMAPI_PRIV_H__*/ | ||
diff --git a/fs/xfs/linux-2.6/xfs_ioctl.c b/fs/xfs/linux-2.6/xfs_ioctl.c index a74f854d91e6..74d094829a4d 100644 --- a/fs/xfs/linux-2.6/xfs_ioctl.c +++ b/fs/xfs/linux-2.6/xfs_ioctl.c | |||
@@ -341,8 +341,11 @@ xfs_open_by_handle( | |||
341 | put_unused_fd(new_fd); | 341 | put_unused_fd(new_fd); |
342 | return -XFS_ERROR(-PTR_ERR(filp)); | 342 | return -XFS_ERROR(-PTR_ERR(filp)); |
343 | } | 343 | } |
344 | if (inode->i_mode & S_IFREG) | 344 | if (inode->i_mode & S_IFREG) { |
345 | /* invisible operation should not change atime */ | ||
346 | filp->f_flags |= O_NOATIME; | ||
345 | filp->f_op = &xfs_invis_file_operations; | 347 | filp->f_op = &xfs_invis_file_operations; |
348 | } | ||
346 | 349 | ||
347 | fd_install(new_fd, filp); | 350 | fd_install(new_fd, filp); |
348 | return new_fd; | 351 | return new_fd; |
diff --git a/fs/xfs/linux-2.6/xfs_super.c b/fs/xfs/linux-2.6/xfs_super.c index 38c4d128a8c0..de05abbbe7fd 100644 --- a/fs/xfs/linux-2.6/xfs_super.c +++ b/fs/xfs/linux-2.6/xfs_super.c | |||
@@ -227,9 +227,7 @@ xfs_initialize_vnode( | |||
227 | xfs_revalidate_inode(XFS_BHVTOM(bdp), vp, ip); | 227 | xfs_revalidate_inode(XFS_BHVTOM(bdp), vp, ip); |
228 | xfs_set_inodeops(inode); | 228 | xfs_set_inodeops(inode); |
229 | 229 | ||
230 | spin_lock(&ip->i_flags_lock); | 230 | xfs_iflags_clear(ip, XFS_INEW); |
231 | ip->i_flags &= ~XFS_INEW; | ||
232 | spin_unlock(&ip->i_flags_lock); | ||
233 | barrier(); | 231 | barrier(); |
234 | 232 | ||
235 | unlock_new_inode(inode); | 233 | unlock_new_inode(inode); |
diff --git a/fs/xfs/support/debug.c b/fs/xfs/support/debug.c index c75f68361e33..4363512d2f90 100644 --- a/fs/xfs/support/debug.c +++ b/fs/xfs/support/debug.c | |||
@@ -15,11 +15,9 @@ | |||
15 | * along with this program; if not, write the Free Software Foundation, | 15 | * along with this program; if not, write the Free Software Foundation, |
16 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | 16 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
17 | */ | 17 | */ |
18 | #include <xfs.h> | ||
18 | #include "debug.h" | 19 | #include "debug.h" |
19 | #include "spin.h" | 20 | #include "spin.h" |
20 | #include <asm/page.h> | ||
21 | #include <linux/sched.h> | ||
22 | #include <linux/kernel.h> | ||
23 | 21 | ||
24 | static char message[256]; /* keep it off the stack */ | 22 | static char message[256]; /* keep it off the stack */ |
25 | static DEFINE_SPINLOCK(xfs_err_lock); | 23 | static DEFINE_SPINLOCK(xfs_err_lock); |
diff --git a/fs/xfs/support/move.c b/fs/xfs/support/move.c index caefa17b80fe..ac8617ca3909 100644 --- a/fs/xfs/support/move.c +++ b/fs/xfs/support/move.c | |||
@@ -22,7 +22,7 @@ | |||
22 | * as we go. | 22 | * as we go. |
23 | */ | 23 | */ |
24 | int | 24 | int |
25 | uio_read(caddr_t src, size_t len, struct uio *uio) | 25 | xfs_uio_read(caddr_t src, size_t len, struct uio *uio) |
26 | { | 26 | { |
27 | size_t count; | 27 | size_t count; |
28 | 28 | ||
diff --git a/fs/xfs/support/move.h b/fs/xfs/support/move.h index 97a2498d2da3..977879c24ff5 100644 --- a/fs/xfs/support/move.h +++ b/fs/xfs/support/move.h | |||
@@ -65,6 +65,6 @@ struct uio { | |||
65 | typedef struct uio uio_t; | 65 | typedef struct uio uio_t; |
66 | typedef struct iovec iovec_t; | 66 | typedef struct iovec iovec_t; |
67 | 67 | ||
68 | extern int uio_read (caddr_t, size_t, uio_t *); | 68 | extern int xfs_uio_read (caddr_t, size_t, uio_t *); |
69 | 69 | ||
70 | #endif /* __XFS_SUPPORT_MOVE_H__ */ | 70 | #endif /* __XFS_SUPPORT_MOVE_H__ */ |
diff --git a/fs/xfs/xfs.h b/fs/xfs/xfs.h index 1a48dbb902a7..bf0a12040b13 100644 --- a/fs/xfs/xfs.h +++ b/fs/xfs/xfs.h | |||
@@ -17,5 +17,28 @@ | |||
17 | */ | 17 | */ |
18 | #ifndef __XFS_H__ | 18 | #ifndef __XFS_H__ |
19 | #define __XFS_H__ | 19 | #define __XFS_H__ |
20 | |||
21 | #ifdef CONFIG_XFS_DEBUG | ||
22 | #define STATIC | ||
23 | #define DEBUG 1 | ||
24 | #define XFS_BUF_LOCK_TRACKING 1 | ||
25 | /* #define QUOTADEBUG 1 */ | ||
26 | #endif | ||
27 | |||
28 | #ifdef CONFIG_XFS_TRACE | ||
29 | #define XFS_ALLOC_TRACE 1 | ||
30 | #define XFS_ATTR_TRACE 1 | ||
31 | #define XFS_BLI_TRACE 1 | ||
32 | #define XFS_BMAP_TRACE 1 | ||
33 | #define XFS_BMBT_TRACE 1 | ||
34 | #define XFS_DIR2_TRACE 1 | ||
35 | #define XFS_DQUOT_TRACE 1 | ||
36 | #define XFS_ILOCK_TRACE 1 | ||
37 | #define XFS_LOG_TRACE 1 | ||
38 | #define XFS_RW_TRACE 1 | ||
39 | #define XFS_BUF_TRACE 1 | ||
40 | #define XFS_VNODE_TRACE 1 | ||
41 | #endif | ||
42 | |||
20 | #include <linux-2.6/xfs_linux.h> | 43 | #include <linux-2.6/xfs_linux.h> |
21 | #endif /* __XFS_H__ */ | 44 | #endif /* __XFS_H__ */ |
diff --git a/fs/xfs/xfs_dir2.c b/fs/xfs/xfs_dir2.c index 8edbe1adb95b..8e8e5279334a 100644 --- a/fs/xfs/xfs_dir2.c +++ b/fs/xfs/xfs_dir2.c | |||
@@ -678,7 +678,7 @@ xfs_dir2_put_dirent64_uio( | |||
678 | idbp->d_off = pa->cook; | 678 | idbp->d_off = pa->cook; |
679 | idbp->d_name[namelen] = '\0'; | 679 | idbp->d_name[namelen] = '\0'; |
680 | memcpy(idbp->d_name, pa->name, namelen); | 680 | memcpy(idbp->d_name, pa->name, namelen); |
681 | rval = uio_read((caddr_t)idbp, reclen, uio); | 681 | rval = xfs_uio_read((caddr_t)idbp, reclen, uio); |
682 | pa->done = (rval == 0); | 682 | pa->done = (rval == 0); |
683 | return rval; | 683 | return rval; |
684 | } | 684 | } |
diff --git a/fs/xfs/xfs_dmapi.h b/fs/xfs/xfs_dmapi.h index 4e7865ad6f0e..adc3d251240d 100644 --- a/fs/xfs/xfs_dmapi.h +++ b/fs/xfs/xfs_dmapi.h | |||
@@ -157,27 +157,9 @@ typedef enum { | |||
157 | #define DM_FLAGS_IALLOCSEM_WR 0x020 /* thread holds i_alloc_sem wr */ | 157 | #define DM_FLAGS_IALLOCSEM_WR 0x020 /* thread holds i_alloc_sem wr */ |
158 | 158 | ||
159 | /* | 159 | /* |
160 | * Based on IO_ISDIRECT, decide which i_ flag is set. | 160 | * Pull in platform specific event flags defines |
161 | */ | 161 | */ |
162 | #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,0) | 162 | #include "xfs_dmapi_priv.h" |
163 | #define DM_SEM_FLAG_RD(ioflags) (((ioflags) & IO_ISDIRECT) ? \ | ||
164 | DM_FLAGS_IMUX : 0) | ||
165 | #define DM_SEM_FLAG_WR (DM_FLAGS_IALLOCSEM_WR | DM_FLAGS_IMUX) | ||
166 | #endif | ||
167 | |||
168 | #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)) && \ | ||
169 | (LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,22)) | ||
170 | #define DM_SEM_FLAG_RD(ioflags) (((ioflags) & IO_ISDIRECT) ? \ | ||
171 | DM_FLAGS_IALLOCSEM_RD : DM_FLAGS_IMUX) | ||
172 | #define DM_SEM_FLAG_WR (DM_FLAGS_IALLOCSEM_WR | DM_FLAGS_IMUX) | ||
173 | #endif | ||
174 | |||
175 | #if LINUX_VERSION_CODE <= KERNEL_VERSION(2,4,21) | ||
176 | #define DM_SEM_FLAG_RD(ioflags) (((ioflags) & IO_ISDIRECT) ? \ | ||
177 | 0 : DM_FLAGS_IMUX) | ||
178 | #define DM_SEM_FLAG_WR (DM_FLAGS_IMUX) | ||
179 | #endif | ||
180 | |||
181 | 163 | ||
182 | /* | 164 | /* |
183 | * Macros to turn caller specified delay/block flags into | 165 | * Macros to turn caller specified delay/block flags into |
diff --git a/fs/xfs/xfs_iget.c b/fs/xfs/xfs_iget.c index b73d216ecaf9..c1c89dac19cc 100644 --- a/fs/xfs/xfs_iget.c +++ b/fs/xfs/xfs_iget.c | |||
@@ -215,7 +215,7 @@ again: | |||
215 | * If INEW is set this inode is being set up | 215 | * If INEW is set this inode is being set up |
216 | * we need to pause and try again. | 216 | * we need to pause and try again. |
217 | */ | 217 | */ |
218 | if (ip->i_flags & XFS_INEW) { | 218 | if (xfs_iflags_test(ip, XFS_INEW)) { |
219 | read_unlock(&ih->ih_lock); | 219 | read_unlock(&ih->ih_lock); |
220 | delay(1); | 220 | delay(1); |
221 | XFS_STATS_INC(xs_ig_frecycle); | 221 | XFS_STATS_INC(xs_ig_frecycle); |
@@ -230,22 +230,50 @@ again: | |||
230 | * on its way out of the system, | 230 | * on its way out of the system, |
231 | * we need to pause and try again. | 231 | * we need to pause and try again. |
232 | */ | 232 | */ |
233 | if (ip->i_flags & XFS_IRECLAIM) { | 233 | if (xfs_iflags_test(ip, XFS_IRECLAIM)) { |
234 | read_unlock(&ih->ih_lock); | 234 | read_unlock(&ih->ih_lock); |
235 | delay(1); | 235 | delay(1); |
236 | XFS_STATS_INC(xs_ig_frecycle); | 236 | XFS_STATS_INC(xs_ig_frecycle); |
237 | 237 | ||
238 | goto again; | 238 | goto again; |
239 | } | 239 | } |
240 | ASSERT(xfs_iflags_test(ip, XFS_IRECLAIMABLE)); | ||
241 | |||
242 | /* | ||
243 | * If lookup is racing with unlink, then we | ||
244 | * should return an error immediately so we | ||
245 | * don't remove it from the reclaim list and | ||
246 | * potentially leak the inode. | ||
247 | */ | ||
248 | if ((ip->i_d.di_mode == 0) && | ||
249 | !(flags & XFS_IGET_CREATE)) { | ||
250 | read_unlock(&ih->ih_lock); | ||
251 | return ENOENT; | ||
252 | } | ||
253 | |||
254 | /* | ||
255 | * There may be transactions sitting in the | ||
256 | * incore log buffers or being flushed to disk | ||
257 | * at this time. We can't clear the | ||
258 | * XFS_IRECLAIMABLE flag until these | ||
259 | * transactions have hit the disk, otherwise we | ||
260 | * will void the guarantee the flag provides | ||
261 | * xfs_iunpin() | ||
262 | */ | ||
263 | if (xfs_ipincount(ip)) { | ||
264 | read_unlock(&ih->ih_lock); | ||
265 | xfs_log_force(mp, 0, | ||
266 | XFS_LOG_FORCE|XFS_LOG_SYNC); | ||
267 | XFS_STATS_INC(xs_ig_frecycle); | ||
268 | goto again; | ||
269 | } | ||
240 | 270 | ||
241 | vn_trace_exit(vp, "xfs_iget.alloc", | 271 | vn_trace_exit(vp, "xfs_iget.alloc", |
242 | (inst_t *)__return_address); | 272 | (inst_t *)__return_address); |
243 | 273 | ||
244 | XFS_STATS_INC(xs_ig_found); | 274 | XFS_STATS_INC(xs_ig_found); |
245 | 275 | ||
246 | spin_lock(&ip->i_flags_lock); | 276 | xfs_iflags_clear(ip, XFS_IRECLAIMABLE); |
247 | ip->i_flags &= ~XFS_IRECLAIMABLE; | ||
248 | spin_unlock(&ip->i_flags_lock); | ||
249 | version = ih->ih_version; | 277 | version = ih->ih_version; |
250 | read_unlock(&ih->ih_lock); | 278 | read_unlock(&ih->ih_lock); |
251 | xfs_ihash_promote(ih, ip, version); | 279 | xfs_ihash_promote(ih, ip, version); |
@@ -299,10 +327,7 @@ finish_inode: | |||
299 | if (lock_flags != 0) | 327 | if (lock_flags != 0) |
300 | xfs_ilock(ip, lock_flags); | 328 | xfs_ilock(ip, lock_flags); |
301 | 329 | ||
302 | spin_lock(&ip->i_flags_lock); | 330 | xfs_iflags_clear(ip, XFS_ISTALE); |
303 | ip->i_flags &= ~XFS_ISTALE; | ||
304 | spin_unlock(&ip->i_flags_lock); | ||
305 | |||
306 | vn_trace_exit(vp, "xfs_iget.found", | 331 | vn_trace_exit(vp, "xfs_iget.found", |
307 | (inst_t *)__return_address); | 332 | (inst_t *)__return_address); |
308 | goto return_ip; | 333 | goto return_ip; |
@@ -371,10 +396,7 @@ finish_inode: | |||
371 | ih->ih_next = ip; | 396 | ih->ih_next = ip; |
372 | ip->i_udquot = ip->i_gdquot = NULL; | 397 | ip->i_udquot = ip->i_gdquot = NULL; |
373 | ih->ih_version++; | 398 | ih->ih_version++; |
374 | spin_lock(&ip->i_flags_lock); | 399 | xfs_iflags_set(ip, XFS_INEW); |
375 | ip->i_flags |= XFS_INEW; | ||
376 | spin_unlock(&ip->i_flags_lock); | ||
377 | |||
378 | write_unlock(&ih->ih_lock); | 400 | write_unlock(&ih->ih_lock); |
379 | 401 | ||
380 | /* | 402 | /* |
@@ -625,7 +647,7 @@ xfs_iput_new(xfs_inode_t *ip, | |||
625 | vn_trace_entry(vp, "xfs_iput_new", (inst_t *)__return_address); | 647 | vn_trace_entry(vp, "xfs_iput_new", (inst_t *)__return_address); |
626 | 648 | ||
627 | if ((ip->i_d.di_mode == 0)) { | 649 | if ((ip->i_d.di_mode == 0)) { |
628 | ASSERT(!(ip->i_flags & XFS_IRECLAIMABLE)); | 650 | ASSERT(!xfs_iflags_test(ip, XFS_IRECLAIMABLE)); |
629 | vn_mark_bad(vp); | 651 | vn_mark_bad(vp); |
630 | } | 652 | } |
631 | if (inode->i_state & I_NEW) | 653 | if (inode->i_state & I_NEW) |
@@ -683,6 +705,7 @@ xfs_ireclaim(xfs_inode_t *ip) | |||
683 | /* | 705 | /* |
684 | * Free all memory associated with the inode. | 706 | * Free all memory associated with the inode. |
685 | */ | 707 | */ |
708 | xfs_iunlock(ip, XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL); | ||
686 | xfs_idestroy(ip); | 709 | xfs_idestroy(ip); |
687 | } | 710 | } |
688 | 711 | ||
diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c index c27d7d495aa0..d72c80dbfbb1 100644 --- a/fs/xfs/xfs_inode.c +++ b/fs/xfs/xfs_inode.c | |||
@@ -2193,7 +2193,7 @@ xfs_ifree_cluster( | |||
2193 | /* Inode not in memory or we found it already, | 2193 | /* Inode not in memory or we found it already, |
2194 | * nothing to do | 2194 | * nothing to do |
2195 | */ | 2195 | */ |
2196 | if (!ip || (ip->i_flags & XFS_ISTALE)) { | 2196 | if (!ip || xfs_iflags_test(ip, XFS_ISTALE)) { |
2197 | read_unlock(&ih->ih_lock); | 2197 | read_unlock(&ih->ih_lock); |
2198 | continue; | 2198 | continue; |
2199 | } | 2199 | } |
@@ -2215,10 +2215,7 @@ xfs_ifree_cluster( | |||
2215 | 2215 | ||
2216 | if (ip == free_ip) { | 2216 | if (ip == free_ip) { |
2217 | if (xfs_iflock_nowait(ip)) { | 2217 | if (xfs_iflock_nowait(ip)) { |
2218 | spin_lock(&ip->i_flags_lock); | 2218 | xfs_iflags_set(ip, XFS_ISTALE); |
2219 | ip->i_flags |= XFS_ISTALE; | ||
2220 | spin_unlock(&ip->i_flags_lock); | ||
2221 | |||
2222 | if (xfs_inode_clean(ip)) { | 2219 | if (xfs_inode_clean(ip)) { |
2223 | xfs_ifunlock(ip); | 2220 | xfs_ifunlock(ip); |
2224 | } else { | 2221 | } else { |
@@ -2231,9 +2228,7 @@ xfs_ifree_cluster( | |||
2231 | 2228 | ||
2232 | if (xfs_ilock_nowait(ip, XFS_ILOCK_EXCL)) { | 2229 | if (xfs_ilock_nowait(ip, XFS_ILOCK_EXCL)) { |
2233 | if (xfs_iflock_nowait(ip)) { | 2230 | if (xfs_iflock_nowait(ip)) { |
2234 | spin_lock(&ip->i_flags_lock); | 2231 | xfs_iflags_set(ip, XFS_ISTALE); |
2235 | ip->i_flags |= XFS_ISTALE; | ||
2236 | spin_unlock(&ip->i_flags_lock); | ||
2237 | 2232 | ||
2238 | if (xfs_inode_clean(ip)) { | 2233 | if (xfs_inode_clean(ip)) { |
2239 | xfs_ifunlock(ip); | 2234 | xfs_ifunlock(ip); |
@@ -2263,9 +2258,7 @@ xfs_ifree_cluster( | |||
2263 | AIL_LOCK(mp,s); | 2258 | AIL_LOCK(mp,s); |
2264 | iip->ili_flush_lsn = iip->ili_item.li_lsn; | 2259 | iip->ili_flush_lsn = iip->ili_item.li_lsn; |
2265 | AIL_UNLOCK(mp, s); | 2260 | AIL_UNLOCK(mp, s); |
2266 | spin_lock(&iip->ili_inode->i_flags_lock); | 2261 | xfs_iflags_set(ip, XFS_ISTALE); |
2267 | iip->ili_inode->i_flags |= XFS_ISTALE; | ||
2268 | spin_unlock(&iip->ili_inode->i_flags_lock); | ||
2269 | pre_flushed++; | 2262 | pre_flushed++; |
2270 | } | 2263 | } |
2271 | lip = lip->li_bio_list; | 2264 | lip = lip->li_bio_list; |
@@ -2748,42 +2741,39 @@ xfs_iunpin( | |||
2748 | { | 2741 | { |
2749 | ASSERT(atomic_read(&ip->i_pincount) > 0); | 2742 | ASSERT(atomic_read(&ip->i_pincount) > 0); |
2750 | 2743 | ||
2751 | if (atomic_dec_and_test(&ip->i_pincount)) { | 2744 | if (atomic_dec_and_lock(&ip->i_pincount, &ip->i_flags_lock)) { |
2745 | |||
2752 | /* | 2746 | /* |
2753 | * If the inode is currently being reclaimed, the | 2747 | * If the inode is currently being reclaimed, the link between |
2754 | * linux inode _and_ the xfs vnode may have been | 2748 | * the bhv_vnode and the xfs_inode will be broken after the |
2755 | * freed so we cannot reference either of them safely. | 2749 | * XFS_IRECLAIM* flag is set. Hence, if these flags are not |
2756 | * Hence we should not try to do anything to them | 2750 | * set, then we can move forward and mark the linux inode dirty |
2757 | * if the xfs inode is currently in the reclaim | 2751 | * knowing that it is still valid as it won't freed until after |
2758 | * path. | 2752 | * the bhv_vnode<->xfs_inode link is broken in xfs_reclaim. The |
2753 | * i_flags_lock is used to synchronise the setting of the | ||
2754 | * XFS_IRECLAIM* flags and the breaking of the link, and so we | ||
2755 | * can execute atomically w.r.t to reclaim by holding this lock | ||
2756 | * here. | ||
2759 | * | 2757 | * |
2760 | * However, we still need to issue the unpin wakeup | 2758 | * However, we still need to issue the unpin wakeup call as the |
2761 | * call as the inode reclaim may be blocked waiting for | 2759 | * inode reclaim may be blocked waiting for the inode to become |
2762 | * the inode to become unpinned. | 2760 | * unpinned. |
2763 | */ | 2761 | */ |
2764 | struct inode *inode = NULL; | ||
2765 | 2762 | ||
2766 | spin_lock(&ip->i_flags_lock); | 2763 | if (!__xfs_iflags_test(ip, XFS_IRECLAIM|XFS_IRECLAIMABLE)) { |
2767 | if (!(ip->i_flags & (XFS_IRECLAIM|XFS_IRECLAIMABLE))) { | ||
2768 | bhv_vnode_t *vp = XFS_ITOV_NULL(ip); | 2764 | bhv_vnode_t *vp = XFS_ITOV_NULL(ip); |
2765 | struct inode *inode = NULL; | ||
2766 | |||
2767 | BUG_ON(vp == NULL); | ||
2768 | inode = vn_to_inode(vp); | ||
2769 | BUG_ON(inode->i_state & I_CLEAR); | ||
2769 | 2770 | ||
2770 | /* make sync come back and flush this inode */ | 2771 | /* make sync come back and flush this inode */ |
2771 | if (vp) { | 2772 | if (!(inode->i_state & (I_NEW|I_FREEING))) |
2772 | inode = vn_to_inode(vp); | 2773 | mark_inode_dirty_sync(inode); |
2773 | |||
2774 | if (!(inode->i_state & | ||
2775 | (I_NEW|I_FREEING|I_CLEAR))) { | ||
2776 | inode = igrab(inode); | ||
2777 | if (inode) | ||
2778 | mark_inode_dirty_sync(inode); | ||
2779 | } else | ||
2780 | inode = NULL; | ||
2781 | } | ||
2782 | } | 2774 | } |
2783 | spin_unlock(&ip->i_flags_lock); | 2775 | spin_unlock(&ip->i_flags_lock); |
2784 | wake_up(&ip->i_ipin_wait); | 2776 | wake_up(&ip->i_ipin_wait); |
2785 | if (inode) | ||
2786 | iput(inode); | ||
2787 | } | 2777 | } |
2788 | } | 2778 | } |
2789 | 2779 | ||
diff --git a/fs/xfs/xfs_inode.h b/fs/xfs/xfs_inode.h index e96eb0835fe6..bc823720d88f 100644 --- a/fs/xfs/xfs_inode.h +++ b/fs/xfs/xfs_inode.h | |||
@@ -305,6 +305,47 @@ typedef struct xfs_inode { | |||
305 | #endif | 305 | #endif |
306 | } xfs_inode_t; | 306 | } xfs_inode_t; |
307 | 307 | ||
308 | |||
309 | /* | ||
310 | * i_flags helper functions | ||
311 | */ | ||
312 | static inline void | ||
313 | __xfs_iflags_set(xfs_inode_t *ip, unsigned short flags) | ||
314 | { | ||
315 | ip->i_flags |= flags; | ||
316 | } | ||
317 | |||
318 | static inline void | ||
319 | xfs_iflags_set(xfs_inode_t *ip, unsigned short flags) | ||
320 | { | ||
321 | spin_lock(&ip->i_flags_lock); | ||
322 | __xfs_iflags_set(ip, flags); | ||
323 | spin_unlock(&ip->i_flags_lock); | ||
324 | } | ||
325 | |||
326 | static inline void | ||
327 | xfs_iflags_clear(xfs_inode_t *ip, unsigned short flags) | ||
328 | { | ||
329 | spin_lock(&ip->i_flags_lock); | ||
330 | ip->i_flags &= ~flags; | ||
331 | spin_unlock(&ip->i_flags_lock); | ||
332 | } | ||
333 | |||
334 | static inline int | ||
335 | __xfs_iflags_test(xfs_inode_t *ip, unsigned short flags) | ||
336 | { | ||
337 | return (ip->i_flags & flags); | ||
338 | } | ||
339 | |||
340 | static inline int | ||
341 | xfs_iflags_test(xfs_inode_t *ip, unsigned short flags) | ||
342 | { | ||
343 | int ret; | ||
344 | spin_lock(&ip->i_flags_lock); | ||
345 | ret = __xfs_iflags_test(ip, flags); | ||
346 | spin_unlock(&ip->i_flags_lock); | ||
347 | return ret; | ||
348 | } | ||
308 | #endif /* __KERNEL__ */ | 349 | #endif /* __KERNEL__ */ |
309 | 350 | ||
310 | 351 | ||
diff --git a/fs/xfs/xfs_vnodeops.c b/fs/xfs/xfs_vnodeops.c index 061e2ffdd1de..bda774a04b8f 100644 --- a/fs/xfs/xfs_vnodeops.c +++ b/fs/xfs/xfs_vnodeops.c | |||
@@ -1013,7 +1013,7 @@ xfs_readlink( | |||
1013 | pathlen = (int)ip->i_d.di_size; | 1013 | pathlen = (int)ip->i_d.di_size; |
1014 | 1014 | ||
1015 | if (ip->i_df.if_flags & XFS_IFINLINE) { | 1015 | if (ip->i_df.if_flags & XFS_IFINLINE) { |
1016 | error = uio_read(ip->i_df.if_u1.if_data, pathlen, uiop); | 1016 | error = xfs_uio_read(ip->i_df.if_u1.if_data, pathlen, uiop); |
1017 | } | 1017 | } |
1018 | else { | 1018 | else { |
1019 | /* | 1019 | /* |
@@ -1044,7 +1044,7 @@ xfs_readlink( | |||
1044 | byte_cnt = pathlen; | 1044 | byte_cnt = pathlen; |
1045 | pathlen -= byte_cnt; | 1045 | pathlen -= byte_cnt; |
1046 | 1046 | ||
1047 | error = uio_read(XFS_BUF_PTR(bp), byte_cnt, uiop); | 1047 | error = xfs_uio_read(XFS_BUF_PTR(bp), byte_cnt, uiop); |
1048 | xfs_buf_relse (bp); | 1048 | xfs_buf_relse (bp); |
1049 | } | 1049 | } |
1050 | 1050 | ||
@@ -3827,11 +3827,16 @@ xfs_reclaim( | |||
3827 | */ | 3827 | */ |
3828 | xfs_synchronize_atime(ip); | 3828 | xfs_synchronize_atime(ip); |
3829 | 3829 | ||
3830 | /* If we have nothing to flush with this inode then complete the | 3830 | /* |
3831 | * teardown now, otherwise break the link between the xfs inode | 3831 | * If we have nothing to flush with this inode then complete the |
3832 | * and the linux inode and clean up the xfs inode later. This | 3832 | * teardown now, otherwise break the link between the xfs inode and the |
3833 | * avoids flushing the inode to disk during the delete operation | 3833 | * linux inode and clean up the xfs inode later. This avoids flushing |
3834 | * itself. | 3834 | * the inode to disk during the delete operation itself. |
3835 | * | ||
3836 | * When breaking the link, we need to set the XFS_IRECLAIMABLE flag | ||
3837 | * first to ensure that xfs_iunpin() will never see an xfs inode | ||
3838 | * that has a linux inode being reclaimed. Synchronisation is provided | ||
3839 | * by the i_flags_lock. | ||
3835 | */ | 3840 | */ |
3836 | if (!ip->i_update_core && (ip->i_itemp == NULL)) { | 3841 | if (!ip->i_update_core && (ip->i_itemp == NULL)) { |
3837 | xfs_ilock(ip, XFS_ILOCK_EXCL); | 3842 | xfs_ilock(ip, XFS_ILOCK_EXCL); |
@@ -3840,13 +3845,13 @@ xfs_reclaim( | |||
3840 | } else { | 3845 | } else { |
3841 | xfs_mount_t *mp = ip->i_mount; | 3846 | xfs_mount_t *mp = ip->i_mount; |
3842 | 3847 | ||
3843 | /* Protect sync from us */ | 3848 | /* Protect sync and unpin from us */ |
3844 | XFS_MOUNT_ILOCK(mp); | 3849 | XFS_MOUNT_ILOCK(mp); |
3845 | vn_bhv_remove(VN_BHV_HEAD(vp), XFS_ITOBHV(ip)); | ||
3846 | list_add_tail(&ip->i_reclaim, &mp->m_del_inodes); | ||
3847 | spin_lock(&ip->i_flags_lock); | 3850 | spin_lock(&ip->i_flags_lock); |
3848 | ip->i_flags |= XFS_IRECLAIMABLE; | 3851 | __xfs_iflags_set(ip, XFS_IRECLAIMABLE); |
3852 | vn_bhv_remove(VN_BHV_HEAD(vp), XFS_ITOBHV(ip)); | ||
3849 | spin_unlock(&ip->i_flags_lock); | 3853 | spin_unlock(&ip->i_flags_lock); |
3854 | list_add_tail(&ip->i_reclaim, &mp->m_del_inodes); | ||
3850 | XFS_MOUNT_IUNLOCK(mp); | 3855 | XFS_MOUNT_IUNLOCK(mp); |
3851 | } | 3856 | } |
3852 | return 0; | 3857 | return 0; |
@@ -3872,8 +3877,8 @@ xfs_finish_reclaim( | |||
3872 | */ | 3877 | */ |
3873 | write_lock(&ih->ih_lock); | 3878 | write_lock(&ih->ih_lock); |
3874 | spin_lock(&ip->i_flags_lock); | 3879 | spin_lock(&ip->i_flags_lock); |
3875 | if ((ip->i_flags & XFS_IRECLAIM) || | 3880 | if (__xfs_iflags_test(ip, XFS_IRECLAIM) || |
3876 | (!(ip->i_flags & XFS_IRECLAIMABLE) && vp == NULL)) { | 3881 | (!__xfs_iflags_test(ip, XFS_IRECLAIMABLE) && vp == NULL)) { |
3877 | spin_unlock(&ip->i_flags_lock); | 3882 | spin_unlock(&ip->i_flags_lock); |
3878 | write_unlock(&ih->ih_lock); | 3883 | write_unlock(&ih->ih_lock); |
3879 | if (locked) { | 3884 | if (locked) { |
@@ -3882,7 +3887,7 @@ xfs_finish_reclaim( | |||
3882 | } | 3887 | } |
3883 | return 1; | 3888 | return 1; |
3884 | } | 3889 | } |
3885 | ip->i_flags |= XFS_IRECLAIM; | 3890 | __xfs_iflags_set(ip, XFS_IRECLAIM); |
3886 | spin_unlock(&ip->i_flags_lock); | 3891 | spin_unlock(&ip->i_flags_lock); |
3887 | write_unlock(&ih->ih_lock); | 3892 | write_unlock(&ih->ih_lock); |
3888 | 3893 | ||
diff --git a/include/asm-i386/acpi.h b/include/asm-i386/acpi.h index 6016632d032f..c80b3a94511a 100644 --- a/include/asm-i386/acpi.h +++ b/include/asm-i386/acpi.h | |||
@@ -132,6 +132,7 @@ extern int acpi_gsi_to_irq(u32 gsi, unsigned int *irq); | |||
132 | 132 | ||
133 | #ifdef CONFIG_X86_IO_APIC | 133 | #ifdef CONFIG_X86_IO_APIC |
134 | extern int acpi_skip_timer_override; | 134 | extern int acpi_skip_timer_override; |
135 | extern int acpi_use_timer_override; | ||
135 | #endif | 136 | #endif |
136 | 137 | ||
137 | static inline void acpi_noirq_set(void) { acpi_noirq = 1; } | 138 | static inline void acpi_noirq_set(void) { acpi_noirq = 1; } |
diff --git a/include/asm-ia64/sn/addrs.h b/include/asm-ia64/sn/addrs.h index 1d9efe541662..e715c794b186 100644 --- a/include/asm-ia64/sn/addrs.h +++ b/include/asm-ia64/sn/addrs.h | |||
@@ -136,9 +136,13 @@ | |||
136 | */ | 136 | */ |
137 | #define TO_PHYS(x) (TO_PHYS_MASK & (x)) | 137 | #define TO_PHYS(x) (TO_PHYS_MASK & (x)) |
138 | #define TO_CAC(x) (CAC_BASE | TO_PHYS(x)) | 138 | #define TO_CAC(x) (CAC_BASE | TO_PHYS(x)) |
139 | #ifdef CONFIG_SGI_SN | ||
139 | #define TO_AMO(x) (AMO_BASE | TO_PHYS(x)) | 140 | #define TO_AMO(x) (AMO_BASE | TO_PHYS(x)) |
140 | #define TO_GET(x) (GET_BASE | TO_PHYS(x)) | 141 | #define TO_GET(x) (GET_BASE | TO_PHYS(x)) |
141 | 142 | #else | |
143 | #define TO_AMO(x) ({ BUG(); x; }) | ||
144 | #define TO_GET(x) ({ BUG(); x; }) | ||
145 | #endif | ||
142 | 146 | ||
143 | /* | 147 | /* |
144 | * Covert from processor physical address to II/TIO physical address: | 148 | * Covert from processor physical address to II/TIO physical address: |
diff --git a/include/asm-powerpc/systbl.h b/include/asm-powerpc/systbl.h index c6a03187f932..97b435484177 100644 --- a/include/asm-powerpc/systbl.h +++ b/include/asm-powerpc/systbl.h | |||
@@ -304,3 +304,4 @@ SYSCALL_SPU(fchmodat) | |||
304 | SYSCALL_SPU(faccessat) | 304 | SYSCALL_SPU(faccessat) |
305 | COMPAT_SYS_SPU(get_robust_list) | 305 | COMPAT_SYS_SPU(get_robust_list) |
306 | COMPAT_SYS_SPU(set_robust_list) | 306 | COMPAT_SYS_SPU(set_robust_list) |
307 | COMPAT_SYS(move_pages) | ||
diff --git a/include/asm-powerpc/topology.h b/include/asm-powerpc/topology.h index 8f7ee16781a4..9fe7894ee035 100644 --- a/include/asm-powerpc/topology.h +++ b/include/asm-powerpc/topology.h | |||
@@ -96,7 +96,13 @@ static inline void sysfs_remove_device_from_node(struct sys_device *dev, | |||
96 | 96 | ||
97 | #ifdef CONFIG_SMP | 97 | #ifdef CONFIG_SMP |
98 | #include <asm/cputable.h> | 98 | #include <asm/cputable.h> |
99 | #define smt_capable() (cpu_has_feature(CPU_FTR_SMT)) | 99 | #define smt_capable() (cpu_has_feature(CPU_FTR_SMT)) |
100 | |||
101 | #ifdef CONFIG_PPC64 | ||
102 | #include <asm/smp.h> | ||
103 | |||
104 | #define topology_thread_siblings(cpu) (cpu_sibling_map[cpu]) | ||
105 | #endif | ||
100 | #endif | 106 | #endif |
101 | 107 | ||
102 | #endif /* __KERNEL__ */ | 108 | #endif /* __KERNEL__ */ |
diff --git a/include/asm-powerpc/unistd.h b/include/asm-powerpc/unistd.h index b5fe93291c96..0e4ea37f6466 100644 --- a/include/asm-powerpc/unistd.h +++ b/include/asm-powerpc/unistd.h | |||
@@ -323,10 +323,11 @@ | |||
323 | #define __NR_faccessat 298 | 323 | #define __NR_faccessat 298 |
324 | #define __NR_get_robust_list 299 | 324 | #define __NR_get_robust_list 299 |
325 | #define __NR_set_robust_list 300 | 325 | #define __NR_set_robust_list 300 |
326 | #define __NR_move_pages 301 | ||
326 | 327 | ||
327 | #ifdef __KERNEL__ | 328 | #ifdef __KERNEL__ |
328 | 329 | ||
329 | #define __NR_syscalls 301 | 330 | #define __NR_syscalls 302 |
330 | 331 | ||
331 | #define __NR__exit __NR_exit | 332 | #define __NR__exit __NR_exit |
332 | #define NR_syscalls __NR_syscalls | 333 | #define NR_syscalls __NR_syscalls |
diff --git a/include/asm-x86_64/acpi.h b/include/asm-x86_64/acpi.h index ed59aa4c6ff9..9d1916e59c04 100644 --- a/include/asm-x86_64/acpi.h +++ b/include/asm-x86_64/acpi.h | |||
@@ -163,6 +163,7 @@ extern u8 x86_acpiid_to_apicid[]; | |||
163 | #define ARCH_HAS_POWER_INIT 1 | 163 | #define ARCH_HAS_POWER_INIT 1 |
164 | 164 | ||
165 | extern int acpi_skip_timer_override; | 165 | extern int acpi_skip_timer_override; |
166 | extern int acpi_use_timer_override; | ||
166 | 167 | ||
167 | #endif /*__KERNEL__*/ | 168 | #endif /*__KERNEL__*/ |
168 | 169 | ||
diff --git a/include/asm-x86_64/pda.h b/include/asm-x86_64/pda.h index 14996d962bac..5642634843c4 100644 --- a/include/asm-x86_64/pda.h +++ b/include/asm-x86_64/pda.h | |||
@@ -109,6 +109,15 @@ extern struct x8664_pda _proxy_pda; | |||
109 | #define sub_pda(field,val) pda_to_op("sub",field,val) | 109 | #define sub_pda(field,val) pda_to_op("sub",field,val) |
110 | #define or_pda(field,val) pda_to_op("or",field,val) | 110 | #define or_pda(field,val) pda_to_op("or",field,val) |
111 | 111 | ||
112 | /* This is not atomic against other CPUs -- CPU preemption needs to be off */ | ||
113 | #define test_and_clear_bit_pda(bit,field) ({ \ | ||
114 | int old__; \ | ||
115 | asm volatile("btr %2,%%gs:%c3\n\tsbbl %0,%0" \ | ||
116 | : "=r" (old__), "+m" (_proxy_pda.field) \ | ||
117 | : "dIr" (bit), "i" (pda_offset(field)) : "memory"); \ | ||
118 | old__; \ | ||
119 | }) | ||
120 | |||
112 | #endif | 121 | #endif |
113 | 122 | ||
114 | #define PDA_STACKOFFSET (5*8) | 123 | #define PDA_STACKOFFSET (5*8) |
diff --git a/include/asm-x86_64/vsyscall.h b/include/asm-x86_64/vsyscall.h index fd452fc2c037..01d1c17e2849 100644 --- a/include/asm-x86_64/vsyscall.h +++ b/include/asm-x86_64/vsyscall.h | |||
@@ -59,8 +59,6 @@ extern seqlock_t xtime_lock; | |||
59 | 59 | ||
60 | extern int sysctl_vsyscall; | 60 | extern int sysctl_vsyscall; |
61 | 61 | ||
62 | extern void vsyscall_set_cpu(int cpu); | ||
63 | |||
64 | #define ARCH_HAVE_XTIME_LOCK 1 | 62 | #define ARCH_HAVE_XTIME_LOCK 1 |
65 | 63 | ||
66 | #endif /* __KERNEL__ */ | 64 | #endif /* __KERNEL__ */ |
diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index 5081d27bfa27..ace64e57e17f 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h | |||
@@ -60,8 +60,11 @@ void hugetlb_free_pgd_range(struct mmu_gather **tlb, unsigned long addr, | |||
60 | * If the arch doesn't supply something else, assume that hugepage | 60 | * If the arch doesn't supply something else, assume that hugepage |
61 | * size aligned regions are ok without further preparation. | 61 | * size aligned regions are ok without further preparation. |
62 | */ | 62 | */ |
63 | static inline int prepare_hugepage_range(unsigned long addr, unsigned long len) | 63 | static inline int prepare_hugepage_range(unsigned long addr, unsigned long len, |
64 | pgoff_t pgoff) | ||
64 | { | 65 | { |
66 | if (pgoff & (~HPAGE_MASK >> PAGE_SHIFT)) | ||
67 | return -EINVAL; | ||
65 | if (len & ~HPAGE_MASK) | 68 | if (len & ~HPAGE_MASK) |
66 | return -EINVAL; | 69 | return -EINVAL; |
67 | if (addr & ~HPAGE_MASK) | 70 | if (addr & ~HPAGE_MASK) |
@@ -69,7 +72,8 @@ static inline int prepare_hugepage_range(unsigned long addr, unsigned long len) | |||
69 | return 0; | 72 | return 0; |
70 | } | 73 | } |
71 | #else | 74 | #else |
72 | int prepare_hugepage_range(unsigned long addr, unsigned long len); | 75 | int prepare_hugepage_range(unsigned long addr, unsigned long len, |
76 | pgoff_t pgoff); | ||
73 | #endif | 77 | #endif |
74 | 78 | ||
75 | #ifndef ARCH_HAS_SETCLEAR_HUGE_PTE | 79 | #ifndef ARCH_HAS_SETCLEAR_HUGE_PTE |
@@ -107,7 +111,7 @@ static inline unsigned long hugetlb_total_pages(void) | |||
107 | #define hugetlb_report_meminfo(buf) 0 | 111 | #define hugetlb_report_meminfo(buf) 0 |
108 | #define hugetlb_report_node_meminfo(n, buf) 0 | 112 | #define hugetlb_report_node_meminfo(n, buf) 0 |
109 | #define follow_huge_pmd(mm, addr, pmd, write) NULL | 113 | #define follow_huge_pmd(mm, addr, pmd, write) NULL |
110 | #define prepare_hugepage_range(addr, len) (-EINVAL) | 114 | #define prepare_hugepage_range(addr,len,pgoff) (-EINVAL) |
111 | #define pmd_huge(x) 0 | 115 | #define pmd_huge(x) 0 |
112 | #define is_hugepage_only_range(mm, addr, len) 0 | 116 | #define is_hugepage_only_range(mm, addr, len) 0 |
113 | #define hugetlb_free_pgd_range(tlb, addr, end, floor, ceiling) ({BUG(); 0; }) | 117 | #define hugetlb_free_pgd_range(tlb, addr, end, floor, ceiling) ({BUG(); 0; }) |
diff --git a/include/linux/in6.h b/include/linux/in6.h index 9be6a4756f0b..f28621f638e0 100644 --- a/include/linux/in6.h +++ b/include/linux/in6.h | |||
@@ -225,7 +225,7 @@ struct in6_flowlabel_req | |||
225 | #endif | 225 | #endif |
226 | 226 | ||
227 | /* | 227 | /* |
228 | * Netfilter | 228 | * Netfilter (1) |
229 | * | 229 | * |
230 | * Following socket options are used in ip6_tables; | 230 | * Following socket options are used in ip6_tables; |
231 | * see include/linux/netfilter_ipv6/ip6_tables.h. | 231 | * see include/linux/netfilter_ipv6/ip6_tables.h. |
@@ -240,4 +240,14 @@ struct in6_flowlabel_req | |||
240 | #define IPV6_RECVTCLASS 66 | 240 | #define IPV6_RECVTCLASS 66 |
241 | #define IPV6_TCLASS 67 | 241 | #define IPV6_TCLASS 67 |
242 | 242 | ||
243 | /* | ||
244 | * Netfilter (2) | ||
245 | * | ||
246 | * Following socket options are used in ip6_tables; | ||
247 | * see include/linux/netfilter_ipv6/ip6_tables.h. | ||
248 | * | ||
249 | * IP6T_SO_GET_REVISION_MATCH 68 | ||
250 | * IP6T_SO_GET_REVISION_TARGET 69 | ||
251 | */ | ||
252 | |||
243 | #endif | 253 | #endif |
diff --git a/include/linux/msdos_fs.h b/include/linux/msdos_fs.h index ce6c85815cbd..24a9ef1506b6 100644 --- a/include/linux/msdos_fs.h +++ b/include/linux/msdos_fs.h | |||
@@ -402,6 +402,8 @@ extern const struct file_operations fat_file_operations; | |||
402 | extern struct inode_operations fat_file_inode_operations; | 402 | extern struct inode_operations fat_file_inode_operations; |
403 | extern int fat_notify_change(struct dentry * dentry, struct iattr * attr); | 403 | extern int fat_notify_change(struct dentry * dentry, struct iattr * attr); |
404 | extern void fat_truncate(struct inode *inode); | 404 | extern void fat_truncate(struct inode *inode); |
405 | extern int fat_getattr(struct vfsmount *mnt, struct dentry *dentry, | ||
406 | struct kstat *stat); | ||
405 | 407 | ||
406 | /* fat/inode.c */ | 408 | /* fat/inode.c */ |
407 | extern void fat_attach(struct inode *inode, loff_t i_pos); | 409 | extern void fat_attach(struct inode *inode, loff_t i_pos); |
diff --git a/include/linux/netfilter/x_tables.h b/include/linux/netfilter/x_tables.h index 04319a76103a..022edfa97ed9 100644 --- a/include/linux/netfilter/x_tables.h +++ b/include/linux/netfilter/x_tables.h | |||
@@ -96,22 +96,6 @@ struct _xt_align | |||
96 | /* Error verdict. */ | 96 | /* Error verdict. */ |
97 | #define XT_ERROR_TARGET "ERROR" | 97 | #define XT_ERROR_TARGET "ERROR" |
98 | 98 | ||
99 | /* | ||
100 | * New IP firewall options for [gs]etsockopt at the RAW IP level. | ||
101 | * Unlike BSD Linux inherits IP options so you don't have to use a raw | ||
102 | * socket for this. Instead we check rights in the calls. */ | ||
103 | #define XT_BASE_CTL 64 /* base for firewall socket options */ | ||
104 | |||
105 | #define XT_SO_SET_REPLACE (XT_BASE_CTL) | ||
106 | #define XT_SO_SET_ADD_COUNTERS (XT_BASE_CTL + 1) | ||
107 | #define XT_SO_SET_MAX XT_SO_SET_ADD_COUNTERS | ||
108 | |||
109 | #define XT_SO_GET_INFO (XT_BASE_CTL) | ||
110 | #define XT_SO_GET_ENTRIES (XT_BASE_CTL + 1) | ||
111 | #define XT_SO_GET_REVISION_MATCH (XT_BASE_CTL + 2) | ||
112 | #define XT_SO_GET_REVISION_TARGET (XT_BASE_CTL + 3) | ||
113 | #define XT_SO_GET_MAX XT_SO_GET_REVISION_TARGET | ||
114 | |||
115 | #define SET_COUNTER(c,b,p) do { (c).bcnt = (b); (c).pcnt = (p); } while(0) | 99 | #define SET_COUNTER(c,b,p) do { (c).bcnt = (b); (c).pcnt = (p); } while(0) |
116 | #define ADD_COUNTER(c,b,p) do { (c).bcnt += (b); (c).pcnt += (p); } while(0) | 100 | #define ADD_COUNTER(c,b,p) do { (c).bcnt += (b); (c).pcnt += (p); } while(0) |
117 | 101 | ||
diff --git a/include/linux/netfilter_arp/arp_tables.h b/include/linux/netfilter_arp/arp_tables.h index 44e39b61d9e7..0be235418a2f 100644 --- a/include/linux/netfilter_arp/arp_tables.h +++ b/include/linux/netfilter_arp/arp_tables.h | |||
@@ -112,19 +112,20 @@ struct arpt_entry | |||
112 | * New IP firewall options for [gs]etsockopt at the RAW IP level. | 112 | * New IP firewall options for [gs]etsockopt at the RAW IP level. |
113 | * Unlike BSD Linux inherits IP options so you don't have to use a raw | 113 | * Unlike BSD Linux inherits IP options so you don't have to use a raw |
114 | * socket for this. Instead we check rights in the calls. | 114 | * socket for this. Instead we check rights in the calls. |
115 | * | ||
116 | * ATTENTION: check linux/in.h before adding new number here. | ||
115 | */ | 117 | */ |
116 | #define ARPT_CTL_OFFSET 32 | 118 | #define ARPT_BASE_CTL 96 |
117 | #define ARPT_BASE_CTL (XT_BASE_CTL+ARPT_CTL_OFFSET) | 119 | |
118 | 120 | #define ARPT_SO_SET_REPLACE (ARPT_BASE_CTL) | |
119 | #define ARPT_SO_SET_REPLACE (XT_SO_SET_REPLACE+ARPT_CTL_OFFSET) | 121 | #define ARPT_SO_SET_ADD_COUNTERS (ARPT_BASE_CTL + 1) |
120 | #define ARPT_SO_SET_ADD_COUNTERS (XT_SO_SET_ADD_COUNTERS+ARPT_CTL_OFFSET) | 122 | #define ARPT_SO_SET_MAX ARPT_SO_SET_ADD_COUNTERS |
121 | #define ARPT_SO_SET_MAX (XT_SO_SET_MAX+ARPT_CTL_OFFSET) | 123 | |
122 | 124 | #define ARPT_SO_GET_INFO (ARPT_BASE_CTL) | |
123 | #define ARPT_SO_GET_INFO (XT_SO_GET_INFO+ARPT_CTL_OFFSET) | 125 | #define ARPT_SO_GET_ENTRIES (ARPT_BASE_CTL + 1) |
124 | #define ARPT_SO_GET_ENTRIES (XT_SO_GET_ENTRIES+ARPT_CTL_OFFSET) | 126 | /* #define ARPT_SO_GET_REVISION_MATCH (APRT_BASE_CTL + 2) */ |
125 | /* #define ARPT_SO_GET_REVISION_MATCH XT_SO_GET_REVISION_MATCH */ | 127 | #define ARPT_SO_GET_REVISION_TARGET (ARPT_BASE_CTL + 3) |
126 | #define ARPT_SO_GET_REVISION_TARGET (XT_SO_GET_REVISION_TARGET+ARPT_CTL_OFFSET) | 128 | #define ARPT_SO_GET_MAX (ARPT_SO_GET_REVISION_TARGET) |
127 | #define ARPT_SO_GET_MAX (XT_SO_GET_REVISION_TARGET+ARPT_CTL_OFFSET) | ||
128 | 129 | ||
129 | /* CONTINUE verdict for targets */ | 130 | /* CONTINUE verdict for targets */ |
130 | #define ARPT_CONTINUE XT_CONTINUE | 131 | #define ARPT_CONTINUE XT_CONTINUE |
diff --git a/include/linux/netfilter_ipv4/ip_tables.h b/include/linux/netfilter_ipv4/ip_tables.h index a536bbdef145..4f06dad0bde9 100644 --- a/include/linux/netfilter_ipv4/ip_tables.h +++ b/include/linux/netfilter_ipv4/ip_tables.h | |||
@@ -101,18 +101,21 @@ struct ipt_entry | |||
101 | /* | 101 | /* |
102 | * New IP firewall options for [gs]etsockopt at the RAW IP level. | 102 | * New IP firewall options for [gs]etsockopt at the RAW IP level. |
103 | * Unlike BSD Linux inherits IP options so you don't have to use a raw | 103 | * Unlike BSD Linux inherits IP options so you don't have to use a raw |
104 | * socket for this. Instead we check rights in the calls. */ | 104 | * socket for this. Instead we check rights in the calls. |
105 | #define IPT_BASE_CTL XT_BASE_CTL | 105 | * |
106 | 106 | * ATTENTION: check linux/in.h before adding new number here. | |
107 | #define IPT_SO_SET_REPLACE XT_SO_SET_REPLACE | 107 | */ |
108 | #define IPT_SO_SET_ADD_COUNTERS XT_SO_SET_ADD_COUNTERS | 108 | #define IPT_BASE_CTL 64 |
109 | #define IPT_SO_SET_MAX XT_SO_SET_MAX | 109 | |
110 | 110 | #define IPT_SO_SET_REPLACE (IPT_BASE_CTL) | |
111 | #define IPT_SO_GET_INFO XT_SO_GET_INFO | 111 | #define IPT_SO_SET_ADD_COUNTERS (IPT_BASE_CTL + 1) |
112 | #define IPT_SO_GET_ENTRIES XT_SO_GET_ENTRIES | 112 | #define IPT_SO_SET_MAX IPT_SO_SET_ADD_COUNTERS |
113 | #define IPT_SO_GET_REVISION_MATCH XT_SO_GET_REVISION_MATCH | 113 | |
114 | #define IPT_SO_GET_REVISION_TARGET XT_SO_GET_REVISION_TARGET | 114 | #define IPT_SO_GET_INFO (IPT_BASE_CTL) |
115 | #define IPT_SO_GET_MAX XT_SO_GET_REVISION_TARGET | 115 | #define IPT_SO_GET_ENTRIES (IPT_BASE_CTL + 1) |
116 | #define IPT_SO_GET_REVISION_MATCH (IPT_BASE_CTL + 2) | ||
117 | #define IPT_SO_GET_REVISION_TARGET (IPT_BASE_CTL + 3) | ||
118 | #define IPT_SO_GET_MAX IPT_SO_GET_REVISION_TARGET | ||
116 | 119 | ||
117 | #define IPT_CONTINUE XT_CONTINUE | 120 | #define IPT_CONTINUE XT_CONTINUE |
118 | #define IPT_RETURN XT_RETURN | 121 | #define IPT_RETURN XT_RETURN |
diff --git a/include/linux/netfilter_ipv6/ip6_tables.h b/include/linux/netfilter_ipv6/ip6_tables.h index d7a8e9c0dad0..4aed340401db 100644 --- a/include/linux/netfilter_ipv6/ip6_tables.h +++ b/include/linux/netfilter_ipv6/ip6_tables.h | |||
@@ -107,18 +107,21 @@ struct ip6t_entry | |||
107 | /* | 107 | /* |
108 | * New IP firewall options for [gs]etsockopt at the RAW IP level. | 108 | * New IP firewall options for [gs]etsockopt at the RAW IP level. |
109 | * Unlike BSD Linux inherits IP options so you don't have to use | 109 | * Unlike BSD Linux inherits IP options so you don't have to use |
110 | * a raw socket for this. Instead we check rights in the calls. */ | 110 | * a raw socket for this. Instead we check rights in the calls. |
111 | #define IP6T_BASE_CTL XT_BASE_CTL | 111 | * |
112 | 112 | * ATTENTION: check linux/in6.h before adding new number here. | |
113 | #define IP6T_SO_SET_REPLACE XT_SO_SET_REPLACE | 113 | */ |
114 | #define IP6T_SO_SET_ADD_COUNTERS XT_SO_SET_ADD_COUNTERS | 114 | #define IP6T_BASE_CTL 64 |
115 | #define IP6T_SO_SET_MAX XT_SO_SET_MAX | 115 | |
116 | 116 | #define IP6T_SO_SET_REPLACE (IP6T_BASE_CTL) | |
117 | #define IP6T_SO_GET_INFO XT_SO_GET_INFO | 117 | #define IP6T_SO_SET_ADD_COUNTERS (IP6T_BASE_CTL + 1) |
118 | #define IP6T_SO_GET_ENTRIES XT_SO_GET_ENTRIES | 118 | #define IP6T_SO_SET_MAX IP6T_SO_SET_ADD_COUNTERS |
119 | #define IP6T_SO_GET_REVISION_MATCH XT_SO_GET_REVISION_MATCH | 119 | |
120 | #define IP6T_SO_GET_REVISION_TARGET XT_SO_GET_REVISION_TARGET | 120 | #define IP6T_SO_GET_INFO (IP6T_BASE_CTL) |
121 | #define IP6T_SO_GET_MAX XT_SO_GET_REVISION_TARGET | 121 | #define IP6T_SO_GET_ENTRIES (IP6T_BASE_CTL + 1) |
122 | #define IP6T_SO_GET_REVISION_MATCH (IP6T_BASE_CTL + 4) | ||
123 | #define IP6T_SO_GET_REVISION_TARGET (IP6T_BASE_CTL + 5) | ||
124 | #define IP6T_SO_GET_MAX IP6T_SO_GET_REVISION_TARGET | ||
122 | 125 | ||
123 | /* CONTINUE verdict for targets */ | 126 | /* CONTINUE verdict for targets */ |
124 | #define IP6T_CONTINUE XT_CONTINUE | 127 | #define IP6T_CONTINUE XT_CONTINUE |
diff --git a/include/linux/pci_regs.h b/include/linux/pci_regs.h index c312a12ad2d6..c321316f1bc7 100644 --- a/include/linux/pci_regs.h +++ b/include/linux/pci_regs.h | |||
@@ -371,6 +371,7 @@ | |||
371 | #define PCI_EXP_DEVSTA_TRPND 0x20 /* Transactions Pending */ | 371 | #define PCI_EXP_DEVSTA_TRPND 0x20 /* Transactions Pending */ |
372 | #define PCI_EXP_LNKCAP 12 /* Link Capabilities */ | 372 | #define PCI_EXP_LNKCAP 12 /* Link Capabilities */ |
373 | #define PCI_EXP_LNKCTL 16 /* Link Control */ | 373 | #define PCI_EXP_LNKCTL 16 /* Link Control */ |
374 | #define PCI_EXP_LNKCTL_CLKREQ_EN 0x100 /* Enable clkreq */ | ||
374 | #define PCI_EXP_LNKSTA 18 /* Link Status */ | 375 | #define PCI_EXP_LNKSTA 18 /* Link Status */ |
375 | #define PCI_EXP_SLTCAP 20 /* Slot Capabilities */ | 376 | #define PCI_EXP_SLTCAP 20 /* Slot Capabilities */ |
376 | #define PCI_EXP_SLTCTL 24 /* Slot Control */ | 377 | #define PCI_EXP_SLTCTL 24 /* Slot Control */ |
diff --git a/include/linux/personality.h b/include/linux/personality.h index bf4cf2080e5c..012cd558189b 100644 --- a/include/linux/personality.h +++ b/include/linux/personality.h | |||
@@ -114,7 +114,7 @@ struct exec_domain { | |||
114 | * Change personality of the currently running process. | 114 | * Change personality of the currently running process. |
115 | */ | 115 | */ |
116 | #define set_personality(pers) \ | 116 | #define set_personality(pers) \ |
117 | ((current->personality == pers) ? 0 : __set_personality(pers)) | 117 | ((current->personality == (pers)) ? 0 : __set_personality(pers)) |
118 | 118 | ||
119 | #endif /* __KERNEL__ */ | 119 | #endif /* __KERNEL__ */ |
120 | 120 | ||
diff --git a/include/linux/vmalloc.h b/include/linux/vmalloc.h index dc9a29d84abc..924e502905d4 100644 --- a/include/linux/vmalloc.h +++ b/include/linux/vmalloc.h | |||
@@ -23,13 +23,14 @@ struct vm_area_struct; | |||
23 | #endif | 23 | #endif |
24 | 24 | ||
25 | struct vm_struct { | 25 | struct vm_struct { |
26 | /* keep next,addr,size together to speedup lookups */ | ||
27 | struct vm_struct *next; | ||
26 | void *addr; | 28 | void *addr; |
27 | unsigned long size; | 29 | unsigned long size; |
28 | unsigned long flags; | 30 | unsigned long flags; |
29 | struct page **pages; | 31 | struct page **pages; |
30 | unsigned int nr_pages; | 32 | unsigned int nr_pages; |
31 | unsigned long phys_addr; | 33 | unsigned long phys_addr; |
32 | struct vm_struct *next; | ||
33 | }; | 34 | }; |
34 | 35 | ||
35 | /* | 36 | /* |
diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h index 49c717e3b040..903108e583f8 100644 --- a/include/net/ip_vs.h +++ b/include/net/ip_vs.h | |||
@@ -7,6 +7,7 @@ | |||
7 | #define _IP_VS_H | 7 | #define _IP_VS_H |
8 | 8 | ||
9 | #include <asm/types.h> /* For __uXX types */ | 9 | #include <asm/types.h> /* For __uXX types */ |
10 | #include <linux/types.h> /* For __beXX types in userland */ | ||
10 | 11 | ||
11 | #define IP_VS_VERSION_CODE 0x010201 | 12 | #define IP_VS_VERSION_CODE 0x010201 |
12 | #define NVERSION(version) \ | 13 | #define NVERSION(version) \ |
diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c index 2d0dc3efe813..ebfd24a41858 100644 --- a/kernel/irq/chip.c +++ b/kernel/irq/chip.c | |||
@@ -233,6 +233,8 @@ void irq_chip_set_defaults(struct irq_chip *chip) | |||
233 | chip->shutdown = chip->disable; | 233 | chip->shutdown = chip->disable; |
234 | if (!chip->name) | 234 | if (!chip->name) |
235 | chip->name = chip->typename; | 235 | chip->name = chip->typename; |
236 | if (!chip->end) | ||
237 | chip->end = dummy_irq_chip.end; | ||
236 | } | 238 | } |
237 | 239 | ||
238 | static inline void mask_ack_irq(struct irq_desc *desc, int irq) | 240 | static inline void mask_ack_irq(struct irq_desc *desc, int irq) |
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c index 6879202afe9a..b385878c6e80 100644 --- a/kernel/irq/manage.c +++ b/kernel/irq/manage.c | |||
@@ -216,6 +216,7 @@ int setup_irq(unsigned int irq, struct irqaction *new) | |||
216 | { | 216 | { |
217 | struct irq_desc *desc = irq_desc + irq; | 217 | struct irq_desc *desc = irq_desc + irq; |
218 | struct irqaction *old, **p; | 218 | struct irqaction *old, **p; |
219 | const char *old_name = NULL; | ||
219 | unsigned long flags; | 220 | unsigned long flags; |
220 | int shared = 0; | 221 | int shared = 0; |
221 | 222 | ||
@@ -255,8 +256,10 @@ int setup_irq(unsigned int irq, struct irqaction *new) | |||
255 | * set the trigger type must match. | 256 | * set the trigger type must match. |
256 | */ | 257 | */ |
257 | if (!((old->flags & new->flags) & IRQF_SHARED) || | 258 | if (!((old->flags & new->flags) & IRQF_SHARED) || |
258 | ((old->flags ^ new->flags) & IRQF_TRIGGER_MASK)) | 259 | ((old->flags ^ new->flags) & IRQF_TRIGGER_MASK)) { |
260 | old_name = old->name; | ||
259 | goto mismatch; | 261 | goto mismatch; |
262 | } | ||
260 | 263 | ||
261 | #if defined(CONFIG_IRQ_PER_CPU) | 264 | #if defined(CONFIG_IRQ_PER_CPU) |
262 | /* All handlers must agree on per-cpuness */ | 265 | /* All handlers must agree on per-cpuness */ |
@@ -322,11 +325,13 @@ int setup_irq(unsigned int irq, struct irqaction *new) | |||
322 | return 0; | 325 | return 0; |
323 | 326 | ||
324 | mismatch: | 327 | mismatch: |
325 | spin_unlock_irqrestore(&desc->lock, flags); | ||
326 | if (!(new->flags & IRQF_PROBE_SHARED)) { | 328 | if (!(new->flags & IRQF_PROBE_SHARED)) { |
327 | printk(KERN_ERR "IRQ handler type mismatch for IRQ %d\n", irq); | 329 | printk(KERN_ERR "IRQ handler type mismatch for IRQ %d\n", irq); |
330 | if (old_name) | ||
331 | printk(KERN_ERR "current handler: %s\n", old_name); | ||
328 | dump_stack(); | 332 | dump_stack(); |
329 | } | 333 | } |
334 | spin_unlock_irqrestore(&desc->lock, flags); | ||
330 | return -EBUSY; | 335 | return -EBUSY; |
331 | } | 336 | } |
332 | 337 | ||
diff --git a/kernel/irq/spurious.c b/kernel/irq/spurious.c index 543ea2e5ad93..9c7e2e4c1fe7 100644 --- a/kernel/irq/spurious.c +++ b/kernel/irq/spurious.c | |||
@@ -147,7 +147,11 @@ void note_interrupt(unsigned int irq, struct irq_desc *desc, | |||
147 | if (unlikely(irqfixup)) { | 147 | if (unlikely(irqfixup)) { |
148 | /* Don't punish working computers */ | 148 | /* Don't punish working computers */ |
149 | if ((irqfixup == 2 && irq == 0) || action_ret == IRQ_NONE) { | 149 | if ((irqfixup == 2 && irq == 0) || action_ret == IRQ_NONE) { |
150 | int ok = misrouted_irq(irq); | 150 | int ok; |
151 | |||
152 | spin_unlock(&desc->lock); | ||
153 | ok = misrouted_irq(irq); | ||
154 | spin_lock(&desc->lock); | ||
151 | if (action_ret == IRQ_NONE) | 155 | if (action_ret == IRQ_NONE) |
152 | desc->irqs_unhandled -= ok; | 156 | desc->irqs_unhandled -= ok; |
153 | } | 157 | } |
@@ -1379,7 +1379,7 @@ get_unmapped_area(struct file *file, unsigned long addr, unsigned long len, | |||
1379 | * Check if the given range is hugepage aligned, and | 1379 | * Check if the given range is hugepage aligned, and |
1380 | * can be made suitable for hugepages. | 1380 | * can be made suitable for hugepages. |
1381 | */ | 1381 | */ |
1382 | ret = prepare_hugepage_range(addr, len); | 1382 | ret = prepare_hugepage_range(addr, len, pgoff); |
1383 | } else { | 1383 | } else { |
1384 | /* | 1384 | /* |
1385 | * Ensure that a normal request is not falling in a | 1385 | * Ensure that a normal request is not falling in a |
@@ -1880,6 +1880,9 @@ unsigned long do_brk(unsigned long addr, unsigned long len) | |||
1880 | if ((addr + len) > TASK_SIZE || (addr + len) < addr) | 1880 | if ((addr + len) > TASK_SIZE || (addr + len) < addr) |
1881 | return -EINVAL; | 1881 | return -EINVAL; |
1882 | 1882 | ||
1883 | if (is_hugepage_only_range(mm, addr, len)) | ||
1884 | return -EINVAL; | ||
1885 | |||
1883 | flags = VM_DATA_DEFAULT_FLAGS | VM_ACCOUNT | mm->def_flags; | 1886 | flags = VM_DATA_DEFAULT_FLAGS | VM_ACCOUNT | mm->def_flags; |
1884 | 1887 | ||
1885 | error = arch_mmap_check(addr, len, flags); | 1888 | error = arch_mmap_check(addr, len, flags); |
diff --git a/mm/vmalloc.c b/mm/vmalloc.c index 46606c133e82..86897ee792d6 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c | |||
@@ -181,16 +181,13 @@ static struct vm_struct *__get_vm_area_node(unsigned long size, unsigned long fl | |||
181 | } | 181 | } |
182 | addr = ALIGN(start, align); | 182 | addr = ALIGN(start, align); |
183 | size = PAGE_ALIGN(size); | 183 | size = PAGE_ALIGN(size); |
184 | if (unlikely(!size)) | ||
185 | return NULL; | ||
184 | 186 | ||
185 | area = kmalloc_node(sizeof(*area), gfp_mask & GFP_LEVEL_MASK, node); | 187 | area = kmalloc_node(sizeof(*area), gfp_mask & GFP_LEVEL_MASK, node); |
186 | if (unlikely(!area)) | 188 | if (unlikely(!area)) |
187 | return NULL; | 189 | return NULL; |
188 | 190 | ||
189 | if (unlikely(!size)) { | ||
190 | kfree (area); | ||
191 | return NULL; | ||
192 | } | ||
193 | |||
194 | /* | 191 | /* |
195 | * We always allocate a guard page. | 192 | * We always allocate a guard page. |
196 | */ | 193 | */ |
@@ -532,11 +529,12 @@ void *vmalloc_user(unsigned long size) | |||
532 | void *ret; | 529 | void *ret; |
533 | 530 | ||
534 | ret = __vmalloc(size, GFP_KERNEL | __GFP_HIGHMEM | __GFP_ZERO, PAGE_KERNEL); | 531 | ret = __vmalloc(size, GFP_KERNEL | __GFP_HIGHMEM | __GFP_ZERO, PAGE_KERNEL); |
535 | write_lock(&vmlist_lock); | 532 | if (ret) { |
536 | area = __find_vm_area(ret); | 533 | write_lock(&vmlist_lock); |
537 | area->flags |= VM_USERMAP; | 534 | area = __find_vm_area(ret); |
538 | write_unlock(&vmlist_lock); | 535 | area->flags |= VM_USERMAP; |
539 | 536 | write_unlock(&vmlist_lock); | |
537 | } | ||
540 | return ret; | 538 | return ret; |
541 | } | 539 | } |
542 | EXPORT_SYMBOL(vmalloc_user); | 540 | EXPORT_SYMBOL(vmalloc_user); |
@@ -605,11 +603,12 @@ void *vmalloc_32_user(unsigned long size) | |||
605 | void *ret; | 603 | void *ret; |
606 | 604 | ||
607 | ret = __vmalloc(size, GFP_KERNEL | __GFP_ZERO, PAGE_KERNEL); | 605 | ret = __vmalloc(size, GFP_KERNEL | __GFP_ZERO, PAGE_KERNEL); |
608 | write_lock(&vmlist_lock); | 606 | if (ret) { |
609 | area = __find_vm_area(ret); | 607 | write_lock(&vmlist_lock); |
610 | area->flags |= VM_USERMAP; | 608 | area = __find_vm_area(ret); |
611 | write_unlock(&vmlist_lock); | 609 | area->flags |= VM_USERMAP; |
612 | 610 | write_unlock(&vmlist_lock); | |
611 | } | ||
613 | return ret; | 612 | return ret; |
614 | } | 613 | } |
615 | EXPORT_SYMBOL(vmalloc_32_user); | 614 | EXPORT_SYMBOL(vmalloc_32_user); |
diff --git a/net/ipv4/ipvs/ip_vs_ftp.c b/net/ipv4/ipvs/ip_vs_ftp.c index 6d398f10aa91..687c1de1146f 100644 --- a/net/ipv4/ipvs/ip_vs_ftp.c +++ b/net/ipv4/ipvs/ip_vs_ftp.c | |||
@@ -200,7 +200,7 @@ static int ip_vs_ftp_out(struct ip_vs_app *app, struct ip_vs_conn *cp, | |||
200 | from = n_cp->vaddr; | 200 | from = n_cp->vaddr; |
201 | port = n_cp->vport; | 201 | port = n_cp->vport; |
202 | sprintf(buf,"%d,%d,%d,%d,%d,%d", NIPQUAD(from), | 202 | sprintf(buf,"%d,%d,%d,%d,%d,%d", NIPQUAD(from), |
203 | ntohs(port)&255, (ntohs(port)>>8)&255); | 203 | (ntohs(port)>>8)&255, ntohs(port)&255); |
204 | buf_len = strlen(buf); | 204 | buf_len = strlen(buf); |
205 | 205 | ||
206 | /* | 206 | /* |
diff --git a/net/ipv4/ipvs/ip_vs_proto_tcp.c b/net/ipv4/ipvs/ip_vs_proto_tcp.c index bfe779e74590..6ff05c3a32e6 100644 --- a/net/ipv4/ipvs/ip_vs_proto_tcp.c +++ b/net/ipv4/ipvs/ip_vs_proto_tcp.c | |||
@@ -117,7 +117,7 @@ tcp_fast_csum_update(struct tcphdr *tcph, __be32 oldip, __be32 newip, | |||
117 | { | 117 | { |
118 | tcph->check = | 118 | tcph->check = |
119 | ip_vs_check_diff(~oldip, newip, | 119 | ip_vs_check_diff(~oldip, newip, |
120 | ip_vs_check_diff(oldport ^ htonl(0xFFFF), | 120 | ip_vs_check_diff(oldport ^ htons(0xFFFF), |
121 | newport, tcph->check)); | 121 | newport, tcph->check)); |
122 | } | 122 | } |
123 | 123 | ||
diff --git a/net/ipv4/ipvs/ip_vs_proto_udp.c b/net/ipv4/ipvs/ip_vs_proto_udp.c index 54aa7603591f..691c8b637b29 100644 --- a/net/ipv4/ipvs/ip_vs_proto_udp.c +++ b/net/ipv4/ipvs/ip_vs_proto_udp.c | |||
@@ -122,10 +122,10 @@ udp_fast_csum_update(struct udphdr *uhdr, __be32 oldip, __be32 newip, | |||
122 | { | 122 | { |
123 | uhdr->check = | 123 | uhdr->check = |
124 | ip_vs_check_diff(~oldip, newip, | 124 | ip_vs_check_diff(~oldip, newip, |
125 | ip_vs_check_diff(oldport ^ htonl(0xFFFF), | 125 | ip_vs_check_diff(oldport ^ htons(0xFFFF), |
126 | newport, uhdr->check)); | 126 | newport, uhdr->check)); |
127 | if (!uhdr->check) | 127 | if (!uhdr->check) |
128 | uhdr->check = htonl(0xFFFF); | 128 | uhdr->check = -1; |
129 | } | 129 | } |
130 | 130 | ||
131 | static int | 131 | static int |
@@ -173,7 +173,7 @@ udp_snat_handler(struct sk_buff **pskb, | |||
173 | cp->protocol, | 173 | cp->protocol, |
174 | (*pskb)->csum); | 174 | (*pskb)->csum); |
175 | if (udph->check == 0) | 175 | if (udph->check == 0) |
176 | udph->check = htonl(0xFFFF); | 176 | udph->check = -1; |
177 | IP_VS_DBG(11, "O-pkt: %s O-csum=%d (+%zd)\n", | 177 | IP_VS_DBG(11, "O-pkt: %s O-csum=%d (+%zd)\n", |
178 | pp->name, udph->check, | 178 | pp->name, udph->check, |
179 | (char*)&(udph->check) - (char*)udph); | 179 | (char*)&(udph->check) - (char*)udph); |
@@ -228,7 +228,7 @@ udp_dnat_handler(struct sk_buff **pskb, | |||
228 | cp->protocol, | 228 | cp->protocol, |
229 | (*pskb)->csum); | 229 | (*pskb)->csum); |
230 | if (udph->check == 0) | 230 | if (udph->check == 0) |
231 | udph->check = 0xFFFF; | 231 | udph->check = -1; |
232 | (*pskb)->ip_summed = CHECKSUM_UNNECESSARY; | 232 | (*pskb)->ip_summed = CHECKSUM_UNNECESSARY; |
233 | } | 233 | } |
234 | return 1; | 234 | return 1; |
diff --git a/net/ipv4/netfilter/ip_queue.c b/net/ipv4/netfilter/ip_queue.c index 7edad790478a..97556cc2e4e0 100644 --- a/net/ipv4/netfilter/ip_queue.c +++ b/net/ipv4/netfilter/ip_queue.c | |||
@@ -351,9 +351,10 @@ ipq_mangle_ipv4(ipq_verdict_msg_t *v, struct ipq_queue_entry *e) | |||
351 | if (v->data_len < sizeof(*user_iph)) | 351 | if (v->data_len < sizeof(*user_iph)) |
352 | return 0; | 352 | return 0; |
353 | diff = v->data_len - e->skb->len; | 353 | diff = v->data_len - e->skb->len; |
354 | if (diff < 0) | 354 | if (diff < 0) { |
355 | skb_trim(e->skb, v->data_len); | 355 | if (pskb_trim(e->skb, v->data_len)) |
356 | else if (diff > 0) { | 356 | return -ENOMEM; |
357 | } else if (diff > 0) { | ||
357 | if (v->data_len > 0xFFFF) | 358 | if (v->data_len > 0xFFFF) |
358 | return -EINVAL; | 359 | return -EINVAL; |
359 | if (diff > skb_tailroom(e->skb)) { | 360 | if (diff > skb_tailroom(e->skb)) { |
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index 4322318ab332..c05e8edaf544 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c | |||
@@ -2316,9 +2316,10 @@ void __init tcp_init(void) | |||
2316 | sysctl_max_syn_backlog = 128; | 2316 | sysctl_max_syn_backlog = 128; |
2317 | } | 2317 | } |
2318 | 2318 | ||
2319 | sysctl_tcp_mem[0] = 768 << order; | 2319 | /* Allow no more than 3/4 kernel memory (usually less) allocated to TCP */ |
2320 | sysctl_tcp_mem[1] = 1024 << order; | 2320 | sysctl_tcp_mem[0] = (1536 / sizeof (struct inet_bind_hashbucket)) << order; |
2321 | sysctl_tcp_mem[2] = 1536 << order; | 2321 | sysctl_tcp_mem[1] = sysctl_tcp_mem[0] * 4 / 3; |
2322 | sysctl_tcp_mem[2] = sysctl_tcp_mem[0] * 2; | ||
2322 | 2323 | ||
2323 | limit = ((unsigned long)sysctl_tcp_mem[1]) << (PAGE_SHIFT - 7); | 2324 | limit = ((unsigned long)sysctl_tcp_mem[1]) << (PAGE_SHIFT - 7); |
2324 | max_share = min(4UL*1024*1024, limit); | 2325 | max_share = min(4UL*1024*1024, limit); |
diff --git a/net/ipv6/netfilter/ip6_queue.c b/net/ipv6/netfilter/ip6_queue.c index 9510c24ca8d2..9fec832ee08b 100644 --- a/net/ipv6/netfilter/ip6_queue.c +++ b/net/ipv6/netfilter/ip6_queue.c | |||
@@ -349,9 +349,10 @@ ipq_mangle_ipv6(ipq_verdict_msg_t *v, struct ipq_queue_entry *e) | |||
349 | if (v->data_len < sizeof(*user_iph)) | 349 | if (v->data_len < sizeof(*user_iph)) |
350 | return 0; | 350 | return 0; |
351 | diff = v->data_len - e->skb->len; | 351 | diff = v->data_len - e->skb->len; |
352 | if (diff < 0) | 352 | if (diff < 0) { |
353 | skb_trim(e->skb, v->data_len); | 353 | if (pskb_trim(e->skb, v->data_len)) |
354 | else if (diff > 0) { | 354 | return -ENOMEM; |
355 | } else if (diff > 0) { | ||
355 | if (v->data_len > 0xFFFF) | 356 | if (v->data_len > 0xFFFF) |
356 | return -EINVAL; | 357 | return -EINVAL; |
357 | if (diff > skb_tailroom(e->skb)) { | 358 | if (diff > skb_tailroom(e->skb)) { |
diff --git a/net/ipv6/netfilter/ip6_tables.c b/net/ipv6/netfilter/ip6_tables.c index 167c2ea88f6b..204e02162d49 100644 --- a/net/ipv6/netfilter/ip6_tables.c +++ b/net/ipv6/netfilter/ip6_tables.c | |||
@@ -1494,7 +1494,7 @@ int ipv6_find_hdr(const struct sk_buff *skb, unsigned int *offset, | |||
1494 | if (_frag_off) { | 1494 | if (_frag_off) { |
1495 | if (target < 0 && | 1495 | if (target < 0 && |
1496 | ((!ipv6_ext_hdr(hp->nexthdr)) || | 1496 | ((!ipv6_ext_hdr(hp->nexthdr)) || |
1497 | nexthdr == NEXTHDR_NONE)) { | 1497 | hp->nexthdr == NEXTHDR_NONE)) { |
1498 | if (fragoff) | 1498 | if (fragoff) |
1499 | *fragoff = _frag_off; | 1499 | *fragoff = _frag_off; |
1500 | return hp->nexthdr; | 1500 | return hp->nexthdr; |
diff --git a/net/netfilter/nfnetlink_log.c b/net/netfilter/nfnetlink_log.c index b2bf8f2e01da..1e5207b80fe5 100644 --- a/net/netfilter/nfnetlink_log.c +++ b/net/netfilter/nfnetlink_log.c | |||
@@ -544,7 +544,7 @@ __build_packet_message(struct nfulnl_instance *inst, | |||
544 | } | 544 | } |
545 | /* global sequence number */ | 545 | /* global sequence number */ |
546 | if (inst->flags & NFULNL_CFG_F_SEQ_GLOBAL) { | 546 | if (inst->flags & NFULNL_CFG_F_SEQ_GLOBAL) { |
547 | tmp_uint = atomic_inc_return(&global_seq); | 547 | tmp_uint = htonl(atomic_inc_return(&global_seq)); |
548 | NFA_PUT(inst->skb, NFULA_SEQ_GLOBAL, sizeof(tmp_uint), &tmp_uint); | 548 | NFA_PUT(inst->skb, NFULA_SEQ_GLOBAL, sizeof(tmp_uint), &tmp_uint); |
549 | } | 549 | } |
550 | 550 | ||
diff --git a/net/netfilter/nfnetlink_queue.c b/net/netfilter/nfnetlink_queue.c index 6e4ada3c1844..e815a9aa6e95 100644 --- a/net/netfilter/nfnetlink_queue.c +++ b/net/netfilter/nfnetlink_queue.c | |||
@@ -622,9 +622,10 @@ nfqnl_mangle(void *data, int data_len, struct nfqnl_queue_entry *e) | |||
622 | int diff; | 622 | int diff; |
623 | 623 | ||
624 | diff = data_len - e->skb->len; | 624 | diff = data_len - e->skb->len; |
625 | if (diff < 0) | 625 | if (diff < 0) { |
626 | skb_trim(e->skb, data_len); | 626 | if (pskb_trim(e->skb, data_len)) |
627 | else if (diff > 0) { | 627 | return -ENOMEM; |
628 | } else if (diff > 0) { | ||
628 | if (data_len > 0xFFFF) | 629 | if (data_len > 0xFFFF) |
629 | return -EINVAL; | 630 | return -EINVAL; |
630 | if (diff > skb_tailroom(e->skb)) { | 631 | if (diff > skb_tailroom(e->skb)) { |
diff --git a/scripts/kconfig/.gitignore b/scripts/kconfig/.gitignore index e8ad1f6b3da4..b49584c932cc 100644 --- a/scripts/kconfig/.gitignore +++ b/scripts/kconfig/.gitignore | |||
@@ -6,6 +6,8 @@ lex.*.c | |||
6 | *.tab.c | 6 | *.tab.c |
7 | *.tab.h | 7 | *.tab.h |
8 | zconf.hash.c | 8 | zconf.hash.c |
9 | *.moc | ||
10 | lkc_defs.h | ||
9 | 11 | ||
10 | # | 12 | # |
11 | # configuration programs | 13 | # configuration programs |
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 0e292dc4fd87..e35cfd326df2 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c | |||
@@ -55,7 +55,7 @@ static char *model; | |||
55 | static int position_fix; | 55 | static int position_fix; |
56 | static int probe_mask = -1; | 56 | static int probe_mask = -1; |
57 | static int single_cmd; | 57 | static int single_cmd; |
58 | static int disable_msi; | 58 | static int enable_msi; |
59 | 59 | ||
60 | module_param(index, int, 0444); | 60 | module_param(index, int, 0444); |
61 | MODULE_PARM_DESC(index, "Index value for Intel HD audio interface."); | 61 | MODULE_PARM_DESC(index, "Index value for Intel HD audio interface."); |
@@ -69,8 +69,8 @@ module_param(probe_mask, int, 0444); | |||
69 | MODULE_PARM_DESC(probe_mask, "Bitmask to probe codecs (default = -1)."); | 69 | MODULE_PARM_DESC(probe_mask, "Bitmask to probe codecs (default = -1)."); |
70 | module_param(single_cmd, bool, 0444); | 70 | module_param(single_cmd, bool, 0444); |
71 | MODULE_PARM_DESC(single_cmd, "Use single command to communicate with codecs (for debugging only)."); | 71 | MODULE_PARM_DESC(single_cmd, "Use single command to communicate with codecs (for debugging only)."); |
72 | module_param(disable_msi, int, 0); | 72 | module_param(enable_msi, int, 0); |
73 | MODULE_PARM_DESC(disable_msi, "Disable Message Signaled Interrupt (MSI)"); | 73 | MODULE_PARM_DESC(enable_msi, "Enable Message Signaled Interrupt (MSI)"); |
74 | 74 | ||
75 | 75 | ||
76 | /* just for backward compatibility */ | 76 | /* just for backward compatibility */ |
@@ -1531,7 +1531,7 @@ static int __devinit azx_create(struct snd_card *card, struct pci_dev *pci, | |||
1531 | chip->pci = pci; | 1531 | chip->pci = pci; |
1532 | chip->irq = -1; | 1532 | chip->irq = -1; |
1533 | chip->driver_type = driver_type; | 1533 | chip->driver_type = driver_type; |
1534 | chip->msi = !disable_msi; | 1534 | chip->msi = enable_msi; |
1535 | 1535 | ||
1536 | chip->position_fix = position_fix; | 1536 | chip->position_fix = position_fix; |
1537 | chip->single_cmd = single_cmd; | 1537 | chip->single_cmd = single_cmd; |