diff options
86 files changed, 420 insertions, 278 deletions
diff --git a/Documentation/scheduler/sched-rt-group.txt b/Documentation/scheduler/sched-rt-group.txt index 1df7f9cdab05..86eabe6c3419 100644 --- a/Documentation/scheduler/sched-rt-group.txt +++ b/Documentation/scheduler/sched-rt-group.txt | |||
@@ -73,7 +73,7 @@ The remaining CPU time will be used for user input and other tasks. Because | |||
73 | realtime tasks have explicitly allocated the CPU time they need to perform | 73 | realtime tasks have explicitly allocated the CPU time they need to perform |
74 | their tasks, buffer underruns in the graphics or audio can be eliminated. | 74 | their tasks, buffer underruns in the graphics or audio can be eliminated. |
75 | 75 | ||
76 | NOTE: the above example is not fully implemented as of yet (2.6.25). We still | 76 | NOTE: the above example is not fully implemented yet. We still |
77 | lack an EDF scheduler to make non-uniform periods usable. | 77 | lack an EDF scheduler to make non-uniform periods usable. |
78 | 78 | ||
79 | 79 | ||
@@ -140,14 +140,15 @@ The other option is: | |||
140 | 140 | ||
141 | .o CONFIG_CGROUP_SCHED (aka "Basis for grouping tasks" = "Control groups") | 141 | .o CONFIG_CGROUP_SCHED (aka "Basis for grouping tasks" = "Control groups") |
142 | 142 | ||
143 | This uses the /cgroup virtual file system and "/cgroup/<cgroup>/cpu.rt_runtime_us" | 143 | This uses the /cgroup virtual file system and |
144 | to control the CPU time reserved for each control group instead. | 144 | "/cgroup/<cgroup>/cpu.rt_runtime_us" to control the CPU time reserved for each |
145 | control group instead. | ||
145 | 146 | ||
146 | For more information on working with control groups, you should read | 147 | For more information on working with control groups, you should read |
147 | Documentation/cgroups/cgroups.txt as well. | 148 | Documentation/cgroups/cgroups.txt as well. |
148 | 149 | ||
149 | Group settings are checked against the following limits in order to keep the configuration | 150 | Group settings are checked against the following limits in order to keep the |
150 | schedulable: | 151 | configuration schedulable: |
151 | 152 | ||
152 | \Sum_{i} runtime_{i} / global_period <= global_runtime / global_period | 153 | \Sum_{i} runtime_{i} / global_period <= global_runtime / global_period |
153 | 154 | ||
@@ -189,7 +190,7 @@ Implementing SCHED_EDF might take a while to complete. Priority Inheritance is | |||
189 | the biggest challenge as the current linux PI infrastructure is geared towards | 190 | the biggest challenge as the current linux PI infrastructure is geared towards |
190 | the limited static priority levels 0-99. With deadline scheduling you need to | 191 | the limited static priority levels 0-99. With deadline scheduling you need to |
191 | do deadline inheritance (since priority is inversely proportional to the | 192 | do deadline inheritance (since priority is inversely proportional to the |
192 | deadline delta (deadline - now). | 193 | deadline delta (deadline - now)). |
193 | 194 | ||
194 | This means the whole PI machinery will have to be reworked - and that is one of | 195 | This means the whole PI machinery will have to be reworked - and that is one of |
195 | the most complex pieces of code we have. | 196 | the most complex pieces of code we have. |
@@ -343,7 +343,8 @@ KBUILD_CPPFLAGS := -D__KERNEL__ | |||
343 | KBUILD_CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \ | 343 | KBUILD_CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \ |
344 | -fno-strict-aliasing -fno-common \ | 344 | -fno-strict-aliasing -fno-common \ |
345 | -Werror-implicit-function-declaration \ | 345 | -Werror-implicit-function-declaration \ |
346 | -Wno-format-security | 346 | -Wno-format-security \ |
347 | -fno-delete-null-pointer-checks | ||
347 | KBUILD_AFLAGS := -D__ASSEMBLY__ | 348 | KBUILD_AFLAGS := -D__ASSEMBLY__ |
348 | 349 | ||
349 | # Read KERNELRELEASE from include/config/kernel.release (if it exists) | 350 | # Read KERNELRELEASE from include/config/kernel.release (if it exists) |
diff --git a/arch/powerpc/kernel/ptrace.c b/arch/powerpc/kernel/ptrace.c index 9fa2c7dcd05a..ef149880c145 100644 --- a/arch/powerpc/kernel/ptrace.c +++ b/arch/powerpc/kernel/ptrace.c | |||
@@ -736,15 +736,16 @@ void user_disable_single_step(struct task_struct *task) | |||
736 | { | 736 | { |
737 | struct pt_regs *regs = task->thread.regs; | 737 | struct pt_regs *regs = task->thread.regs; |
738 | 738 | ||
739 | |||
740 | #if defined(CONFIG_BOOKE) | ||
741 | /* If DAC then do not single step, skip */ | ||
742 | if (task->thread.dabr) | ||
743 | return; | ||
744 | #endif | ||
745 | |||
746 | if (regs != NULL) { | 739 | if (regs != NULL) { |
747 | #if defined(CONFIG_40x) || defined(CONFIG_BOOKE) | 740 | #if defined(CONFIG_BOOKE) |
741 | /* If DAC don't clear DBCRO_IDM or MSR_DE */ | ||
742 | if (task->thread.dabr) | ||
743 | task->thread.dbcr0 &= ~(DBCR0_IC | DBCR0_BT); | ||
744 | else { | ||
745 | task->thread.dbcr0 &= ~(DBCR0_IC | DBCR0_BT | DBCR0_IDM); | ||
746 | regs->msr &= ~MSR_DE; | ||
747 | } | ||
748 | #elif defined(CONFIG_40x) | ||
748 | task->thread.dbcr0 &= ~(DBCR0_IC | DBCR0_BT | DBCR0_IDM); | 749 | task->thread.dbcr0 &= ~(DBCR0_IC | DBCR0_BT | DBCR0_IDM); |
749 | regs->msr &= ~MSR_DE; | 750 | regs->msr &= ~MSR_DE; |
750 | #else | 751 | #else |
diff --git a/arch/powerpc/kernel/vector.S b/arch/powerpc/kernel/vector.S index ef36cbbc5882..ea4d64644d02 100644 --- a/arch/powerpc/kernel/vector.S +++ b/arch/powerpc/kernel/vector.S | |||
@@ -80,10 +80,10 @@ _GLOBAL(load_up_altivec) | |||
80 | mtvscr vr0 | 80 | mtvscr vr0 |
81 | REST_32VRS(0,r4,r5) | 81 | REST_32VRS(0,r4,r5) |
82 | #ifndef CONFIG_SMP | 82 | #ifndef CONFIG_SMP |
83 | /* Update last_task_used_math to 'current' */ | 83 | /* Update last_task_used_altivec to 'current' */ |
84 | subi r4,r5,THREAD /* Back to 'current' */ | 84 | subi r4,r5,THREAD /* Back to 'current' */ |
85 | fromreal(r4) | 85 | fromreal(r4) |
86 | PPC_STL r4,ADDROFF(last_task_used_math)(r3) | 86 | PPC_STL r4,ADDROFF(last_task_used_altivec)(r3) |
87 | #endif /* CONFIG_SMP */ | 87 | #endif /* CONFIG_SMP */ |
88 | /* restore registers and return */ | 88 | /* restore registers and return */ |
89 | blr | 89 | blr |
@@ -172,7 +172,7 @@ _GLOBAL(load_up_vsx) | |||
172 | oris r12,r12,MSR_VSX@h | 172 | oris r12,r12,MSR_VSX@h |
173 | std r12,_MSR(r1) | 173 | std r12,_MSR(r1) |
174 | #ifndef CONFIG_SMP | 174 | #ifndef CONFIG_SMP |
175 | /* Update last_task_used_math to 'current' */ | 175 | /* Update last_task_used_vsx to 'current' */ |
176 | ld r4,PACACURRENT(r13) | 176 | ld r4,PACACURRENT(r13) |
177 | std r4,0(r3) | 177 | std r4,0(r3) |
178 | #endif /* CONFIG_SMP */ | 178 | #endif /* CONFIG_SMP */ |
diff --git a/arch/x86/include/asm/lguest_hcall.h b/arch/x86/include/asm/lguest_hcall.h index d31c4a684078..33600a66755f 100644 --- a/arch/x86/include/asm/lguest_hcall.h +++ b/arch/x86/include/asm/lguest_hcall.h | |||
@@ -30,7 +30,7 @@ | |||
30 | #include <asm/hw_irq.h> | 30 | #include <asm/hw_irq.h> |
31 | #include <asm/kvm_para.h> | 31 | #include <asm/kvm_para.h> |
32 | 32 | ||
33 | /*G:031 But first, how does our Guest contact the Host to ask for privileged | 33 | /*G:030 But first, how does our Guest contact the Host to ask for privileged |
34 | * operations? There are two ways: the direct way is to make a "hypercall", | 34 | * operations? There are two ways: the direct way is to make a "hypercall", |
35 | * to make requests of the Host Itself. | 35 | * to make requests of the Host Itself. |
36 | * | 36 | * |
diff --git a/arch/x86/kernel/apic/es7000_32.c b/arch/x86/kernel/apic/es7000_32.c index 69328ac8de9c..8952a5890281 100644 --- a/arch/x86/kernel/apic/es7000_32.c +++ b/arch/x86/kernel/apic/es7000_32.c | |||
@@ -652,7 +652,8 @@ static int es7000_mps_oem_check_cluster(struct mpc_table *mpc, char *oem, | |||
652 | return ret && es7000_apic_is_cluster(); | 652 | return ret && es7000_apic_is_cluster(); |
653 | } | 653 | } |
654 | 654 | ||
655 | struct apic apic_es7000_cluster = { | 655 | /* We've been warned by a false positive warning.Use __refdata to keep calm. */ |
656 | struct apic __refdata apic_es7000_cluster = { | ||
656 | 657 | ||
657 | .name = "es7000", | 658 | .name = "es7000", |
658 | .probe = probe_es7000, | 659 | .probe = probe_es7000, |
diff --git a/arch/x86/kernel/apic/numaq_32.c b/arch/x86/kernel/apic/numaq_32.c index 533e59c6fc82..ca96e68f0d23 100644 --- a/arch/x86/kernel/apic/numaq_32.c +++ b/arch/x86/kernel/apic/numaq_32.c | |||
@@ -493,7 +493,8 @@ static void numaq_setup_portio_remap(void) | |||
493 | (u_long) xquad_portio, (u_long) num_quads*XQUAD_PORTIO_QUAD); | 493 | (u_long) xquad_portio, (u_long) num_quads*XQUAD_PORTIO_QUAD); |
494 | } | 494 | } |
495 | 495 | ||
496 | struct apic apic_numaq = { | 496 | /* Use __refdata to keep false positive warning calm. */ |
497 | struct apic __refdata apic_numaq = { | ||
497 | 498 | ||
498 | .name = "NUMAQ", | 499 | .name = "NUMAQ", |
499 | .probe = probe_numaq, | 500 | .probe = probe_numaq, |
diff --git a/arch/x86/kernel/pvclock.c b/arch/x86/kernel/pvclock.c index 4f9c55f3a7c0..03801f2f761f 100644 --- a/arch/x86/kernel/pvclock.c +++ b/arch/x86/kernel/pvclock.c | |||
@@ -60,7 +60,7 @@ static inline u64 scale_delta(u64 delta, u32 mul_frac, int shift) | |||
60 | "adc %5,%%edx ; " | 60 | "adc %5,%%edx ; " |
61 | : "=A" (product), "=r" (tmp1), "=r" (tmp2) | 61 | : "=A" (product), "=r" (tmp1), "=r" (tmp2) |
62 | : "a" ((u32)delta), "1" ((u32)(delta >> 32)), "2" (mul_frac) ); | 62 | : "a" ((u32)delta), "1" ((u32)(delta >> 32)), "2" (mul_frac) ); |
63 | #elif __x86_64__ | 63 | #elif defined(__x86_64__) |
64 | __asm__ ( | 64 | __asm__ ( |
65 | "mul %%rdx ; shrd $32,%%rdx,%%rax" | 65 | "mul %%rdx ; shrd $32,%%rdx,%%rax" |
66 | : "=a" (product) : "0" (delta), "d" ((u64)mul_frac) ); | 66 | : "=a" (product) : "0" (delta), "d" ((u64)mul_frac) ); |
diff --git a/arch/x86/lguest/boot.c b/arch/x86/lguest/boot.c index 7bc65f0f62c4..f2bf1f73d468 100644 --- a/arch/x86/lguest/boot.c +++ b/arch/x86/lguest/boot.c | |||
@@ -379,6 +379,11 @@ static void lguest_cpuid(unsigned int *ax, unsigned int *bx, | |||
379 | 379 | ||
380 | native_cpuid(ax, bx, cx, dx); | 380 | native_cpuid(ax, bx, cx, dx); |
381 | switch (function) { | 381 | switch (function) { |
382 | case 0: /* ID and highest CPUID. Futureproof a little by sticking to | ||
383 | * older ones. */ | ||
384 | if (*ax > 5) | ||
385 | *ax = 5; | ||
386 | break; | ||
382 | case 1: /* Basic feature request. */ | 387 | case 1: /* Basic feature request. */ |
383 | /* We only allow kernel to see SSE3, CMPXCHG16B and SSSE3 */ | 388 | /* We only allow kernel to see SSE3, CMPXCHG16B and SSSE3 */ |
384 | *cx &= 0x00002201; | 389 | *cx &= 0x00002201; |
@@ -1079,7 +1084,7 @@ static unsigned lguest_patch(u8 type, u16 clobber, void *ibuf, | |||
1079 | return insn_len; | 1084 | return insn_len; |
1080 | } | 1085 | } |
1081 | 1086 | ||
1082 | /*G:030 Once we get to lguest_init(), we know we're a Guest. The various | 1087 | /*G:029 Once we get to lguest_init(), we know we're a Guest. The various |
1083 | * pv_ops structures in the kernel provide points for (almost) every routine we | 1088 | * pv_ops structures in the kernel provide points for (almost) every routine we |
1084 | * have to override to avoid privileged instructions. */ | 1089 | * have to override to avoid privileged instructions. */ |
1085 | __init void lguest_init(void) | 1090 | __init void lguest_init(void) |
diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c index 85307cc6e45f..bfae139182ff 100644 --- a/arch/x86/mm/fault.c +++ b/arch/x86/mm/fault.c | |||
@@ -697,7 +697,7 @@ show_signal_msg(struct pt_regs *regs, unsigned long error_code, | |||
697 | if (!printk_ratelimit()) | 697 | if (!printk_ratelimit()) |
698 | return; | 698 | return; |
699 | 699 | ||
700 | printk(KERN_CONT "%s%s[%d]: segfault at %lx ip %p sp %p error %lx", | 700 | printk("%s%s[%d]: segfault at %lx ip %p sp %p error %lx", |
701 | task_pid_nr(tsk) > 1 ? KERN_INFO : KERN_EMERG, | 701 | task_pid_nr(tsk) > 1 ? KERN_INFO : KERN_EMERG, |
702 | tsk->comm, task_pid_nr(tsk), address, | 702 | tsk->comm, task_pid_nr(tsk), address, |
703 | (void *)regs->ip, (void *)regs->sp, error_code); | 703 | (void *)regs->ip, (void *)regs->sp, error_code); |
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index 15a23031833f..336eb1ed73cc 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c | |||
@@ -513,6 +513,7 @@ static const struct pci_device_id ahci_pci_tbl[] = { | |||
513 | { PCI_VDEVICE(INTEL, 0x502a), board_ahci }, /* Tolapai */ | 513 | { PCI_VDEVICE(INTEL, 0x502a), board_ahci }, /* Tolapai */ |
514 | { PCI_VDEVICE(INTEL, 0x502b), board_ahci }, /* Tolapai */ | 514 | { PCI_VDEVICE(INTEL, 0x502b), board_ahci }, /* Tolapai */ |
515 | { PCI_VDEVICE(INTEL, 0x3a05), board_ahci }, /* ICH10 */ | 515 | { PCI_VDEVICE(INTEL, 0x3a05), board_ahci }, /* ICH10 */ |
516 | { PCI_VDEVICE(INTEL, 0x3a22), board_ahci }, /* ICH10 */ | ||
516 | { PCI_VDEVICE(INTEL, 0x3a25), board_ahci }, /* ICH10 */ | 517 | { PCI_VDEVICE(INTEL, 0x3a25), board_ahci }, /* ICH10 */ |
517 | { PCI_VDEVICE(INTEL, 0x3b24), board_ahci }, /* PCH RAID */ | 518 | { PCI_VDEVICE(INTEL, 0x3b24), board_ahci }, /* PCH RAID */ |
518 | { PCI_VDEVICE(INTEL, 0x3b25), board_ahci }, /* PCH RAID */ | 519 | { PCI_VDEVICE(INTEL, 0x3b25), board_ahci }, /* PCH RAID */ |
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 045a486a09ea..2c6aedaef718 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c | |||
@@ -3392,17 +3392,27 @@ int ata_down_xfermask_limit(struct ata_device *dev, unsigned int sel) | |||
3392 | 3392 | ||
3393 | static int ata_dev_set_mode(struct ata_device *dev) | 3393 | static int ata_dev_set_mode(struct ata_device *dev) |
3394 | { | 3394 | { |
3395 | struct ata_port *ap = dev->link->ap; | ||
3395 | struct ata_eh_context *ehc = &dev->link->eh_context; | 3396 | struct ata_eh_context *ehc = &dev->link->eh_context; |
3397 | const bool nosetxfer = dev->horkage & ATA_HORKAGE_NOSETXFER; | ||
3396 | const char *dev_err_whine = ""; | 3398 | const char *dev_err_whine = ""; |
3397 | int ign_dev_err = 0; | 3399 | int ign_dev_err = 0; |
3398 | unsigned int err_mask; | 3400 | unsigned int err_mask = 0; |
3399 | int rc; | 3401 | int rc; |
3400 | 3402 | ||
3401 | dev->flags &= ~ATA_DFLAG_PIO; | 3403 | dev->flags &= ~ATA_DFLAG_PIO; |
3402 | if (dev->xfer_shift == ATA_SHIFT_PIO) | 3404 | if (dev->xfer_shift == ATA_SHIFT_PIO) |
3403 | dev->flags |= ATA_DFLAG_PIO; | 3405 | dev->flags |= ATA_DFLAG_PIO; |
3404 | 3406 | ||
3405 | err_mask = ata_dev_set_xfermode(dev); | 3407 | if (nosetxfer && ap->flags & ATA_FLAG_SATA && ata_id_is_sata(dev->id)) |
3408 | dev_err_whine = " (SET_XFERMODE skipped)"; | ||
3409 | else { | ||
3410 | if (nosetxfer) | ||
3411 | ata_dev_printk(dev, KERN_WARNING, | ||
3412 | "NOSETXFER but PATA detected - can't " | ||
3413 | "skip SETXFER, might malfunction\n"); | ||
3414 | err_mask = ata_dev_set_xfermode(dev); | ||
3415 | } | ||
3406 | 3416 | ||
3407 | if (err_mask & ~AC_ERR_DEV) | 3417 | if (err_mask & ~AC_ERR_DEV) |
3408 | goto fail; | 3418 | goto fail; |
@@ -4297,6 +4307,12 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = { | |||
4297 | /* Devices which aren't very happy with higher link speeds */ | 4307 | /* Devices which aren't very happy with higher link speeds */ |
4298 | { "WD My Book", NULL, ATA_HORKAGE_1_5_GBPS, }, | 4308 | { "WD My Book", NULL, ATA_HORKAGE_1_5_GBPS, }, |
4299 | 4309 | ||
4310 | /* | ||
4311 | * Devices which choke on SETXFER. Applies only if both the | ||
4312 | * device and controller are SATA. | ||
4313 | */ | ||
4314 | { "PIONEER DVD-RW DVRTD08", "1.00", ATA_HORKAGE_NOSETXFER }, | ||
4315 | |||
4300 | /* End Marker */ | 4316 | /* End Marker */ |
4301 | { } | 4317 | { } |
4302 | }; | 4318 | }; |
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c index fa22f94ca415..1a07c061f644 100644 --- a/drivers/ata/libata-eh.c +++ b/drivers/ata/libata-eh.c | |||
@@ -2517,6 +2517,10 @@ int ata_eh_reset(struct ata_link *link, int classify, | |||
2517 | 2517 | ||
2518 | ata_eh_about_to_do(link, NULL, ATA_EH_RESET); | 2518 | ata_eh_about_to_do(link, NULL, ATA_EH_RESET); |
2519 | rc = ata_do_reset(link, reset, classes, deadline, true); | 2519 | rc = ata_do_reset(link, reset, classes, deadline, true); |
2520 | if (rc) { | ||
2521 | failed_link = link; | ||
2522 | goto fail; | ||
2523 | } | ||
2520 | } | 2524 | } |
2521 | } else { | 2525 | } else { |
2522 | if (verbose) | 2526 | if (verbose) |
diff --git a/drivers/ata/pata_at91.c b/drivers/ata/pata_at91.c index 4b27617be26d..8561a9f195c1 100644 --- a/drivers/ata/pata_at91.c +++ b/drivers/ata/pata_at91.c | |||
@@ -312,11 +312,12 @@ err_ide_ioremap: | |||
312 | static int __devexit pata_at91_remove(struct platform_device *pdev) | 312 | static int __devexit pata_at91_remove(struct platform_device *pdev) |
313 | { | 313 | { |
314 | struct ata_host *host = dev_get_drvdata(&pdev->dev); | 314 | struct ata_host *host = dev_get_drvdata(&pdev->dev); |
315 | struct at91_ide_info *info = host->private_data; | 315 | struct at91_ide_info *info; |
316 | struct device *dev = &pdev->dev; | 316 | struct device *dev = &pdev->dev; |
317 | 317 | ||
318 | if (!host) | 318 | if (!host) |
319 | return 0; | 319 | return 0; |
320 | info = host->private_data; | ||
320 | 321 | ||
321 | ata_host_detach(host); | 322 | ata_host_detach(host); |
322 | 323 | ||
diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index 43db3ea15b54..fbeefb68a31f 100644 --- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c | |||
@@ -213,7 +213,7 @@ static int virtblk_ioctl(struct block_device *bdev, fmode_t mode, | |||
213 | * Only allow the generic SCSI ioctls if the host can support it. | 213 | * Only allow the generic SCSI ioctls if the host can support it. |
214 | */ | 214 | */ |
215 | if (!virtio_has_feature(vblk->vdev, VIRTIO_BLK_F_SCSI)) | 215 | if (!virtio_has_feature(vblk->vdev, VIRTIO_BLK_F_SCSI)) |
216 | return -ENOIOCTLCMD; | 216 | return -ENOTTY; |
217 | 217 | ||
218 | return scsi_cmd_ioctl(disk->queue, disk, mode, cmd, argp); | 218 | return scsi_cmd_ioctl(disk->queue, disk, mode, cmd, argp); |
219 | } | 219 | } |
@@ -360,6 +360,9 @@ static int __devinit virtblk_probe(struct virtio_device *vdev) | |||
360 | blk_queue_max_phys_segments(vblk->disk->queue, vblk->sg_elems-2); | 360 | blk_queue_max_phys_segments(vblk->disk->queue, vblk->sg_elems-2); |
361 | blk_queue_max_hw_segments(vblk->disk->queue, vblk->sg_elems-2); | 361 | blk_queue_max_hw_segments(vblk->disk->queue, vblk->sg_elems-2); |
362 | 362 | ||
363 | /* No need to bounce any requests */ | ||
364 | blk_queue_bounce_limit(vblk->disk->queue, BLK_BOUNCE_ANY); | ||
365 | |||
363 | /* No real sector limit. */ | 366 | /* No real sector limit. */ |
364 | blk_queue_max_sectors(vblk->disk->queue, -1U); | 367 | blk_queue_max_sectors(vblk->disk->queue, -1U); |
365 | 368 | ||
diff --git a/drivers/char/n_tty.c b/drivers/char/n_tty.c index 94a5d5020abc..ff47907ff1bf 100644 --- a/drivers/char/n_tty.c +++ b/drivers/char/n_tty.c | |||
@@ -1331,9 +1331,6 @@ handle_newline: | |||
1331 | 1331 | ||
1332 | static void n_tty_write_wakeup(struct tty_struct *tty) | 1332 | static void n_tty_write_wakeup(struct tty_struct *tty) |
1333 | { | 1333 | { |
1334 | /* Write out any echoed characters that are still pending */ | ||
1335 | process_echoes(tty); | ||
1336 | |||
1337 | if (tty->fasync && test_and_clear_bit(TTY_DO_WRITE_WAKEUP, &tty->flags)) | 1334 | if (tty->fasync && test_and_clear_bit(TTY_DO_WRITE_WAKEUP, &tty->flags)) |
1338 | kill_fasync(&tty->fasync, SIGIO, POLL_OUT); | 1335 | kill_fasync(&tty->fasync, SIGIO, POLL_OUT); |
1339 | } | 1336 | } |
diff --git a/drivers/char/nozomi.c b/drivers/char/nozomi.c index 574f1c79b6e6..280b41c507a7 100644 --- a/drivers/char/nozomi.c +++ b/drivers/char/nozomi.c | |||
@@ -828,7 +828,7 @@ static int receive_data(enum port_type index, struct nozomi *dc) | |||
828 | struct port *port = &dc->port[index]; | 828 | struct port *port = &dc->port[index]; |
829 | void __iomem *addr = port->dl_addr[port->toggle_dl]; | 829 | void __iomem *addr = port->dl_addr[port->toggle_dl]; |
830 | struct tty_struct *tty = tty_port_tty_get(&port->port); | 830 | struct tty_struct *tty = tty_port_tty_get(&port->port); |
831 | int i; | 831 | int i, ret; |
832 | 832 | ||
833 | if (unlikely(!tty)) { | 833 | if (unlikely(!tty)) { |
834 | DBG1("tty not open for port: %d?", index); | 834 | DBG1("tty not open for port: %d?", index); |
@@ -844,12 +844,14 @@ static int receive_data(enum port_type index, struct nozomi *dc) | |||
844 | 844 | ||
845 | /* disable interrupt in downlink... */ | 845 | /* disable interrupt in downlink... */ |
846 | disable_transmit_dl(index, dc); | 846 | disable_transmit_dl(index, dc); |
847 | return 0; | 847 | ret = 0; |
848 | goto put; | ||
848 | } | 849 | } |
849 | 850 | ||
850 | if (unlikely(size == 0)) { | 851 | if (unlikely(size == 0)) { |
851 | dev_err(&dc->pdev->dev, "size == 0?\n"); | 852 | dev_err(&dc->pdev->dev, "size == 0?\n"); |
852 | return 1; | 853 | ret = 1; |
854 | goto put; | ||
853 | } | 855 | } |
854 | 856 | ||
855 | tty_buffer_request_room(tty, size); | 857 | tty_buffer_request_room(tty, size); |
@@ -871,8 +873,10 @@ static int receive_data(enum port_type index, struct nozomi *dc) | |||
871 | } | 873 | } |
872 | 874 | ||
873 | set_bit(index, &dc->flip); | 875 | set_bit(index, &dc->flip); |
876 | ret = 1; | ||
877 | put: | ||
874 | tty_kref_put(tty); | 878 | tty_kref_put(tty); |
875 | return 1; | 879 | return ret; |
876 | } | 880 | } |
877 | 881 | ||
878 | /* Debug for interrupts */ | 882 | /* Debug for interrupts */ |
diff --git a/drivers/char/tty_ldisc.c b/drivers/char/tty_ldisc.c index 0ef0dc97ba20..acd76b767d4c 100644 --- a/drivers/char/tty_ldisc.c +++ b/drivers/char/tty_ldisc.c | |||
@@ -790,17 +790,20 @@ void tty_ldisc_hangup(struct tty_struct *tty) | |||
790 | * N_TTY. | 790 | * N_TTY. |
791 | */ | 791 | */ |
792 | if (tty->driver->flags & TTY_DRIVER_RESET_TERMIOS) { | 792 | if (tty->driver->flags & TTY_DRIVER_RESET_TERMIOS) { |
793 | /* Avoid racing set_ldisc */ | 793 | /* Avoid racing set_ldisc or tty_ldisc_release */ |
794 | mutex_lock(&tty->ldisc_mutex); | 794 | mutex_lock(&tty->ldisc_mutex); |
795 | /* Switch back to N_TTY */ | 795 | if (tty->ldisc) { /* Not yet closed */ |
796 | tty_ldisc_halt(tty); | 796 | /* Switch back to N_TTY */ |
797 | tty_ldisc_wait_idle(tty); | 797 | tty_ldisc_halt(tty); |
798 | tty_ldisc_reinit(tty); | 798 | tty_ldisc_wait_idle(tty); |
799 | /* At this point we have a closed ldisc and we want to | 799 | tty_ldisc_reinit(tty); |
800 | reopen it. We could defer this to the next open but | 800 | /* At this point we have a closed ldisc and we want to |
801 | it means auditing a lot of other paths so this is a FIXME */ | 801 | reopen it. We could defer this to the next open but |
802 | WARN_ON(tty_ldisc_open(tty, tty->ldisc)); | 802 | it means auditing a lot of other paths so this is |
803 | tty_ldisc_enable(tty); | 803 | a FIXME */ |
804 | WARN_ON(tty_ldisc_open(tty, tty->ldisc)); | ||
805 | tty_ldisc_enable(tty); | ||
806 | } | ||
804 | mutex_unlock(&tty->ldisc_mutex); | 807 | mutex_unlock(&tty->ldisc_mutex); |
805 | tty_reset_termios(tty); | 808 | tty_reset_termios(tty); |
806 | } | 809 | } |
@@ -865,6 +868,7 @@ void tty_ldisc_release(struct tty_struct *tty, struct tty_struct *o_tty) | |||
865 | 868 | ||
866 | tty_ldisc_wait_idle(tty); | 869 | tty_ldisc_wait_idle(tty); |
867 | 870 | ||
871 | mutex_lock(&tty->ldisc_mutex); | ||
868 | /* | 872 | /* |
869 | * Now kill off the ldisc | 873 | * Now kill off the ldisc |
870 | */ | 874 | */ |
@@ -875,6 +879,7 @@ void tty_ldisc_release(struct tty_struct *tty, struct tty_struct *o_tty) | |||
875 | 879 | ||
876 | /* Ensure the next open requests the N_TTY ldisc */ | 880 | /* Ensure the next open requests the N_TTY ldisc */ |
877 | tty_set_termios_ldisc(tty, N_TTY); | 881 | tty_set_termios_ldisc(tty, N_TTY); |
882 | mutex_unlock(&tty->ldisc_mutex); | ||
878 | 883 | ||
879 | /* This will need doing differently if we need to lock */ | 884 | /* This will need doing differently if we need to lock */ |
880 | if (o_tty) | 885 | if (o_tty) |
diff --git a/drivers/char/tty_port.c b/drivers/char/tty_port.c index 4e862a75f7ff..9769b1149f76 100644 --- a/drivers/char/tty_port.c +++ b/drivers/char/tty_port.c | |||
@@ -267,7 +267,7 @@ int tty_port_block_til_ready(struct tty_port *port, | |||
267 | if (retval == 0) | 267 | if (retval == 0) |
268 | port->flags |= ASYNC_NORMAL_ACTIVE; | 268 | port->flags |= ASYNC_NORMAL_ACTIVE; |
269 | spin_unlock_irqrestore(&port->lock, flags); | 269 | spin_unlock_irqrestore(&port->lock, flags); |
270 | return 0; | 270 | return retval; |
271 | 271 | ||
272 | } | 272 | } |
273 | EXPORT_SYMBOL(tty_port_block_til_ready); | 273 | EXPORT_SYMBOL(tty_port_block_til_ready); |
diff --git a/drivers/char/vt.c b/drivers/char/vt.c index 7947bd1b4cf7..404f4c1ee431 100644 --- a/drivers/char/vt.c +++ b/drivers/char/vt.c | |||
@@ -770,14 +770,12 @@ int vc_allocate(unsigned int currcons) /* return 0 on success */ | |||
770 | visual_init(vc, currcons, 1); | 770 | visual_init(vc, currcons, 1); |
771 | if (!*vc->vc_uni_pagedir_loc) | 771 | if (!*vc->vc_uni_pagedir_loc) |
772 | con_set_default_unimap(vc); | 772 | con_set_default_unimap(vc); |
773 | if (!vc->vc_kmalloced) | 773 | vc->vc_screenbuf = kmalloc(vc->vc_screenbuf_size, GFP_KERNEL); |
774 | vc->vc_screenbuf = kmalloc(vc->vc_screenbuf_size, GFP_KERNEL); | ||
775 | if (!vc->vc_screenbuf) { | 774 | if (!vc->vc_screenbuf) { |
776 | kfree(vc); | 775 | kfree(vc); |
777 | vc_cons[currcons].d = NULL; | 776 | vc_cons[currcons].d = NULL; |
778 | return -ENOMEM; | 777 | return -ENOMEM; |
779 | } | 778 | } |
780 | vc->vc_kmalloced = 1; | ||
781 | vc_init(vc, vc->vc_rows, vc->vc_cols, 1); | 779 | vc_init(vc, vc->vc_rows, vc->vc_cols, 1); |
782 | vcs_make_sysfs(currcons); | 780 | vcs_make_sysfs(currcons); |
783 | atomic_notifier_call_chain(&vt_notifier_list, VT_ALLOCATE, ¶m); | 781 | atomic_notifier_call_chain(&vt_notifier_list, VT_ALLOCATE, ¶m); |
@@ -913,10 +911,8 @@ static int vc_do_resize(struct tty_struct *tty, struct vc_data *vc, | |||
913 | if (new_scr_end > new_origin) | 911 | if (new_scr_end > new_origin) |
914 | scr_memsetw((void *)new_origin, vc->vc_video_erase_char, | 912 | scr_memsetw((void *)new_origin, vc->vc_video_erase_char, |
915 | new_scr_end - new_origin); | 913 | new_scr_end - new_origin); |
916 | if (vc->vc_kmalloced) | 914 | kfree(vc->vc_screenbuf); |
917 | kfree(vc->vc_screenbuf); | ||
918 | vc->vc_screenbuf = newscreen; | 915 | vc->vc_screenbuf = newscreen; |
919 | vc->vc_kmalloced = 1; | ||
920 | vc->vc_screenbuf_size = new_screen_size; | 916 | vc->vc_screenbuf_size = new_screen_size; |
921 | set_origin(vc); | 917 | set_origin(vc); |
922 | 918 | ||
@@ -995,8 +991,7 @@ void vc_deallocate(unsigned int currcons) | |||
995 | vc->vc_sw->con_deinit(vc); | 991 | vc->vc_sw->con_deinit(vc); |
996 | put_pid(vc->vt_pid); | 992 | put_pid(vc->vt_pid); |
997 | module_put(vc->vc_sw->owner); | 993 | module_put(vc->vc_sw->owner); |
998 | if (vc->vc_kmalloced) | 994 | kfree(vc->vc_screenbuf); |
999 | kfree(vc->vc_screenbuf); | ||
1000 | if (currcons >= MIN_NR_CONSOLES) | 995 | if (currcons >= MIN_NR_CONSOLES) |
1001 | kfree(vc); | 996 | kfree(vc); |
1002 | vc_cons[currcons].d = NULL; | 997 | vc_cons[currcons].d = NULL; |
@@ -2881,7 +2876,6 @@ static int __init con_init(void) | |||
2881 | INIT_WORK(&vc_cons[currcons].SAK_work, vc_SAK); | 2876 | INIT_WORK(&vc_cons[currcons].SAK_work, vc_SAK); |
2882 | visual_init(vc, currcons, 1); | 2877 | visual_init(vc, currcons, 1); |
2883 | vc->vc_screenbuf = kzalloc(vc->vc_screenbuf_size, GFP_NOWAIT); | 2878 | vc->vc_screenbuf = kzalloc(vc->vc_screenbuf_size, GFP_NOWAIT); |
2884 | vc->vc_kmalloced = 0; | ||
2885 | vc_init(vc, vc->vc_rows, vc->vc_cols, | 2879 | vc_init(vc, vc->vc_rows, vc->vc_cols, |
2886 | currcons || !vc->vc_sw->con_save_screen); | 2880 | currcons || !vc->vc_sw->con_save_screen); |
2887 | } | 2881 | } |
diff --git a/drivers/i2c/busses/i2c-davinci.c b/drivers/i2c/busses/i2c-davinci.c index 3fae3a91ce5b..c89687a10835 100644 --- a/drivers/i2c/busses/i2c-davinci.c +++ b/drivers/i2c/busses/i2c-davinci.c | |||
@@ -187,6 +187,11 @@ static int i2c_davinci_init(struct davinci_i2c_dev *dev) | |||
187 | davinci_i2c_write_reg(dev, DAVINCI_I2C_CLKH_REG, clkh); | 187 | davinci_i2c_write_reg(dev, DAVINCI_I2C_CLKH_REG, clkh); |
188 | davinci_i2c_write_reg(dev, DAVINCI_I2C_CLKL_REG, clkl); | 188 | davinci_i2c_write_reg(dev, DAVINCI_I2C_CLKL_REG, clkl); |
189 | 189 | ||
190 | /* Respond at reserved "SMBus Host" slave address" (and zero); | ||
191 | * we seem to have no option to not respond... | ||
192 | */ | ||
193 | davinci_i2c_write_reg(dev, DAVINCI_I2C_OAR_REG, 0x08); | ||
194 | |||
190 | dev_dbg(dev->dev, "input_clock = %d, CLK = %d\n", input_clock, clk); | 195 | dev_dbg(dev->dev, "input_clock = %d, CLK = %d\n", input_clock, clk); |
191 | dev_dbg(dev->dev, "PSC = %d\n", | 196 | dev_dbg(dev->dev, "PSC = %d\n", |
192 | davinci_i2c_read_reg(dev, DAVINCI_I2C_PSC_REG)); | 197 | davinci_i2c_read_reg(dev, DAVINCI_I2C_PSC_REG)); |
@@ -387,7 +392,7 @@ static void terminate_write(struct davinci_i2c_dev *dev) | |||
387 | davinci_i2c_write_reg(dev, DAVINCI_I2C_MDR_REG, w); | 392 | davinci_i2c_write_reg(dev, DAVINCI_I2C_MDR_REG, w); |
388 | 393 | ||
389 | if (!dev->terminate) | 394 | if (!dev->terminate) |
390 | dev_err(dev->dev, "TDR IRQ while no data to send\n"); | 395 | dev_dbg(dev->dev, "TDR IRQ while no data to send\n"); |
391 | } | 396 | } |
392 | 397 | ||
393 | /* | 398 | /* |
@@ -473,9 +478,14 @@ static irqreturn_t i2c_davinci_isr(int this_irq, void *dev_id) | |||
473 | break; | 478 | break; |
474 | 479 | ||
475 | case DAVINCI_I2C_IVR_AAS: | 480 | case DAVINCI_I2C_IVR_AAS: |
476 | dev_warn(dev->dev, "Address as slave interrupt\n"); | 481 | dev_dbg(dev->dev, "Address as slave interrupt\n"); |
477 | }/* switch */ | 482 | break; |
478 | }/* while */ | 483 | |
484 | default: | ||
485 | dev_warn(dev->dev, "Unrecognized irq stat %d\n", stat); | ||
486 | break; | ||
487 | } | ||
488 | } | ||
479 | 489 | ||
480 | return count ? IRQ_HANDLED : IRQ_NONE; | 490 | return count ? IRQ_HANDLED : IRQ_NONE; |
481 | } | 491 | } |
@@ -505,7 +515,7 @@ static int davinci_i2c_probe(struct platform_device *pdev) | |||
505 | return -ENODEV; | 515 | return -ENODEV; |
506 | } | 516 | } |
507 | 517 | ||
508 | ioarea = request_mem_region(mem->start, (mem->end - mem->start) + 1, | 518 | ioarea = request_mem_region(mem->start, resource_size(mem), |
509 | pdev->name); | 519 | pdev->name); |
510 | if (!ioarea) { | 520 | if (!ioarea) { |
511 | dev_err(&pdev->dev, "I2C region already claimed\n"); | 521 | dev_err(&pdev->dev, "I2C region already claimed\n"); |
@@ -523,7 +533,7 @@ static int davinci_i2c_probe(struct platform_device *pdev) | |||
523 | dev->irq = irq->start; | 533 | dev->irq = irq->start; |
524 | platform_set_drvdata(pdev, dev); | 534 | platform_set_drvdata(pdev, dev); |
525 | 535 | ||
526 | dev->clk = clk_get(&pdev->dev, "I2CCLK"); | 536 | dev->clk = clk_get(&pdev->dev, NULL); |
527 | if (IS_ERR(dev->clk)) { | 537 | if (IS_ERR(dev->clk)) { |
528 | r = -ENODEV; | 538 | r = -ENODEV; |
529 | goto err_free_mem; | 539 | goto err_free_mem; |
@@ -568,7 +578,7 @@ err_free_mem: | |||
568 | put_device(&pdev->dev); | 578 | put_device(&pdev->dev); |
569 | kfree(dev); | 579 | kfree(dev); |
570 | err_release_region: | 580 | err_release_region: |
571 | release_mem_region(mem->start, (mem->end - mem->start) + 1); | 581 | release_mem_region(mem->start, resource_size(mem)); |
572 | 582 | ||
573 | return r; | 583 | return r; |
574 | } | 584 | } |
@@ -591,7 +601,7 @@ static int davinci_i2c_remove(struct platform_device *pdev) | |||
591 | kfree(dev); | 601 | kfree(dev); |
592 | 602 | ||
593 | mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 603 | mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
594 | release_mem_region(mem->start, (mem->end - mem->start) + 1); | 604 | release_mem_region(mem->start, resource_size(mem)); |
595 | return 0; | 605 | return 0; |
596 | } | 606 | } |
597 | 607 | ||
diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c index ad8d2010c921..fdd83277c8a8 100644 --- a/drivers/i2c/busses/i2c-omap.c +++ b/drivers/i2c/busses/i2c-omap.c | |||
@@ -806,7 +806,7 @@ omap_i2c_probe(struct platform_device *pdev) | |||
806 | return -ENODEV; | 806 | return -ENODEV; |
807 | } | 807 | } |
808 | 808 | ||
809 | ioarea = request_mem_region(mem->start, (mem->end - mem->start) + 1, | 809 | ioarea = request_mem_region(mem->start, resource_size(mem), |
810 | pdev->name); | 810 | pdev->name); |
811 | if (!ioarea) { | 811 | if (!ioarea) { |
812 | dev_err(&pdev->dev, "I2C region already claimed\n"); | 812 | dev_err(&pdev->dev, "I2C region already claimed\n"); |
@@ -905,7 +905,7 @@ err_free_mem: | |||
905 | platform_set_drvdata(pdev, NULL); | 905 | platform_set_drvdata(pdev, NULL); |
906 | kfree(dev); | 906 | kfree(dev); |
907 | err_release_region: | 907 | err_release_region: |
908 | release_mem_region(mem->start, (mem->end - mem->start) + 1); | 908 | release_mem_region(mem->start, resource_size(mem)); |
909 | 909 | ||
910 | return r; | 910 | return r; |
911 | } | 911 | } |
@@ -925,7 +925,7 @@ omap_i2c_remove(struct platform_device *pdev) | |||
925 | iounmap(dev->base); | 925 | iounmap(dev->base); |
926 | kfree(dev); | 926 | kfree(dev); |
927 | mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 927 | mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
928 | release_mem_region(mem->start, (mem->end - mem->start) + 1); | 928 | release_mem_region(mem->start, resource_size(mem)); |
929 | return 0; | 929 | return 0; |
930 | } | 930 | } |
931 | 931 | ||
diff --git a/drivers/i2c/busses/i2c-sh_mobile.c b/drivers/i2c/busses/i2c-sh_mobile.c index 1c01083b01b5..4f3d99cd1692 100644 --- a/drivers/i2c/busses/i2c-sh_mobile.c +++ b/drivers/i2c/busses/i2c-sh_mobile.c | |||
@@ -563,7 +563,7 @@ static int sh_mobile_i2c_probe(struct platform_device *dev) | |||
563 | goto err_irq; | 563 | goto err_irq; |
564 | } | 564 | } |
565 | 565 | ||
566 | size = (res->end - res->start) + 1; | 566 | size = resource_size(res); |
567 | 567 | ||
568 | pd->reg = ioremap(res->start, size); | 568 | pd->reg = ioremap(res->start, size); |
569 | if (pd->reg == NULL) { | 569 | if (pd->reg == NULL) { |
diff --git a/drivers/i2c/busses/i2c-simtec.c b/drivers/i2c/busses/i2c-simtec.c index 042fda295f3a..6407f47bda82 100644 --- a/drivers/i2c/busses/i2c-simtec.c +++ b/drivers/i2c/busses/i2c-simtec.c | |||
@@ -92,7 +92,7 @@ static int simtec_i2c_probe(struct platform_device *dev) | |||
92 | goto err; | 92 | goto err; |
93 | } | 93 | } |
94 | 94 | ||
95 | size = (res->end-res->start)+1; | 95 | size = resource_size(res); |
96 | 96 | ||
97 | pd->ioarea = request_mem_region(res->start, size, dev->name); | 97 | pd->ioarea = request_mem_region(res->start, size, dev->name); |
98 | if (pd->ioarea == NULL) { | 98 | if (pd->ioarea == NULL) { |
diff --git a/drivers/lguest/lg.h b/drivers/lguest/lg.h index 9c3138265f8e..01c591923793 100644 --- a/drivers/lguest/lg.h +++ b/drivers/lguest/lg.h | |||
@@ -38,8 +38,6 @@ struct lguest_pages | |||
38 | #define CHANGED_GDT_TLS 4 /* Actually a subset of CHANGED_GDT */ | 38 | #define CHANGED_GDT_TLS 4 /* Actually a subset of CHANGED_GDT */ |
39 | #define CHANGED_ALL 3 | 39 | #define CHANGED_ALL 3 |
40 | 40 | ||
41 | struct lguest; | ||
42 | |||
43 | struct lg_cpu { | 41 | struct lg_cpu { |
44 | unsigned int id; | 42 | unsigned int id; |
45 | struct lguest *lg; | 43 | struct lguest *lg; |
diff --git a/drivers/net/8139too.c b/drivers/net/8139too.c index 8ae72ec14456..0e2ba21d4441 100644 --- a/drivers/net/8139too.c +++ b/drivers/net/8139too.c | |||
@@ -908,6 +908,7 @@ static const struct net_device_ops rtl8139_netdev_ops = { | |||
908 | .ndo_open = rtl8139_open, | 908 | .ndo_open = rtl8139_open, |
909 | .ndo_stop = rtl8139_close, | 909 | .ndo_stop = rtl8139_close, |
910 | .ndo_get_stats = rtl8139_get_stats, | 910 | .ndo_get_stats = rtl8139_get_stats, |
911 | .ndo_change_mtu = eth_change_mtu, | ||
911 | .ndo_validate_addr = eth_validate_addr, | 912 | .ndo_validate_addr = eth_validate_addr, |
912 | .ndo_set_mac_address = rtl8139_set_mac_address, | 913 | .ndo_set_mac_address = rtl8139_set_mac_address, |
913 | .ndo_start_xmit = rtl8139_start_xmit, | 914 | .ndo_start_xmit = rtl8139_start_xmit, |
diff --git a/drivers/net/arm/ixp4xx_eth.c b/drivers/net/arm/ixp4xx_eth.c index 6f42ad728915..3fe09876e76d 100644 --- a/drivers/net/arm/ixp4xx_eth.c +++ b/drivers/net/arm/ixp4xx_eth.c | |||
@@ -1142,7 +1142,9 @@ static const struct net_device_ops ixp4xx_netdev_ops = { | |||
1142 | .ndo_start_xmit = eth_xmit, | 1142 | .ndo_start_xmit = eth_xmit, |
1143 | .ndo_set_multicast_list = eth_set_mcast_list, | 1143 | .ndo_set_multicast_list = eth_set_mcast_list, |
1144 | .ndo_do_ioctl = eth_ioctl, | 1144 | .ndo_do_ioctl = eth_ioctl, |
1145 | 1145 | .ndo_change_mtu = eth_change_mtu, | |
1146 | .ndo_set_mac_address = eth_mac_addr, | ||
1147 | .ndo_validate_addr = eth_validate_addr, | ||
1146 | }; | 1148 | }; |
1147 | 1149 | ||
1148 | static int __devinit eth_init_one(struct platform_device *pdev) | 1150 | static int __devinit eth_init_one(struct platform_device *pdev) |
diff --git a/drivers/net/atlx/atl2.c b/drivers/net/atlx/atl2.c index c734b1983ec1..204db961029e 100644 --- a/drivers/net/atlx/atl2.c +++ b/drivers/net/atlx/atl2.c | |||
@@ -2071,7 +2071,7 @@ static int atl2_set_wol(struct net_device *netdev, struct ethtool_wolinfo *wol) | |||
2071 | if (wol->wolopts & (WAKE_ARP | WAKE_MAGICSECURE)) | 2071 | if (wol->wolopts & (WAKE_ARP | WAKE_MAGICSECURE)) |
2072 | return -EOPNOTSUPP; | 2072 | return -EOPNOTSUPP; |
2073 | 2073 | ||
2074 | if (wol->wolopts & (WAKE_MCAST|WAKE_BCAST|WAKE_MCAST)) | 2074 | if (wol->wolopts & (WAKE_UCAST | WAKE_BCAST | WAKE_MCAST)) |
2075 | return -EOPNOTSUPP; | 2075 | return -EOPNOTSUPP; |
2076 | 2076 | ||
2077 | /* these settings will always override what we currently have */ | 2077 | /* these settings will always override what we currently have */ |
diff --git a/drivers/net/cs89x0.c b/drivers/net/cs89x0.c index 3eee666a9cd2..55445f980f9c 100644 --- a/drivers/net/cs89x0.c +++ b/drivers/net/cs89x0.c | |||
@@ -1524,6 +1524,7 @@ static void net_timeout(struct net_device *dev) | |||
1524 | static int net_send_packet(struct sk_buff *skb, struct net_device *dev) | 1524 | static int net_send_packet(struct sk_buff *skb, struct net_device *dev) |
1525 | { | 1525 | { |
1526 | struct net_local *lp = netdev_priv(dev); | 1526 | struct net_local *lp = netdev_priv(dev); |
1527 | unsigned long flags; | ||
1527 | 1528 | ||
1528 | if (net_debug > 3) { | 1529 | if (net_debug > 3) { |
1529 | printk("%s: sent %d byte packet of type %x\n", | 1530 | printk("%s: sent %d byte packet of type %x\n", |
@@ -1535,7 +1536,7 @@ static int net_send_packet(struct sk_buff *skb, struct net_device *dev) | |||
1535 | ask the chip to start transmitting before the | 1536 | ask the chip to start transmitting before the |
1536 | whole packet has been completely uploaded. */ | 1537 | whole packet has been completely uploaded. */ |
1537 | 1538 | ||
1538 | spin_lock_irq(&lp->lock); | 1539 | spin_lock_irqsave(&lp->lock, flags); |
1539 | netif_stop_queue(dev); | 1540 | netif_stop_queue(dev); |
1540 | 1541 | ||
1541 | /* initiate a transmit sequence */ | 1542 | /* initiate a transmit sequence */ |
@@ -1549,13 +1550,13 @@ static int net_send_packet(struct sk_buff *skb, struct net_device *dev) | |||
1549 | * we're waiting for TxOk, so return 1 and requeue this packet. | 1550 | * we're waiting for TxOk, so return 1 and requeue this packet. |
1550 | */ | 1551 | */ |
1551 | 1552 | ||
1552 | spin_unlock_irq(&lp->lock); | 1553 | spin_unlock_irqrestore(&lp->lock, flags); |
1553 | if (net_debug) printk("cs89x0: Tx buffer not free!\n"); | 1554 | if (net_debug) printk("cs89x0: Tx buffer not free!\n"); |
1554 | return NETDEV_TX_BUSY; | 1555 | return NETDEV_TX_BUSY; |
1555 | } | 1556 | } |
1556 | /* Write the contents of the packet */ | 1557 | /* Write the contents of the packet */ |
1557 | writewords(dev->base_addr, TX_FRAME_PORT,skb->data,(skb->len+1) >>1); | 1558 | writewords(dev->base_addr, TX_FRAME_PORT,skb->data,(skb->len+1) >>1); |
1558 | spin_unlock_irq(&lp->lock); | 1559 | spin_unlock_irqrestore(&lp->lock, flags); |
1559 | lp->stats.tx_bytes += skb->len; | 1560 | lp->stats.tx_bytes += skb->len; |
1560 | dev->trans_start = jiffies; | 1561 | dev->trans_start = jiffies; |
1561 | dev_kfree_skb (skb); | 1562 | dev_kfree_skb (skb); |
diff --git a/drivers/net/ehea/ehea_main.c b/drivers/net/ehea/ehea_main.c index 147c4b088fb3..e8d46cc1bec2 100644 --- a/drivers/net/ehea/ehea_main.c +++ b/drivers/net/ehea/ehea_main.c | |||
@@ -3080,7 +3080,9 @@ static const struct net_device_ops ehea_netdev_ops = { | |||
3080 | .ndo_poll_controller = ehea_netpoll, | 3080 | .ndo_poll_controller = ehea_netpoll, |
3081 | #endif | 3081 | #endif |
3082 | .ndo_get_stats = ehea_get_stats, | 3082 | .ndo_get_stats = ehea_get_stats, |
3083 | .ndo_change_mtu = eth_change_mtu, | ||
3083 | .ndo_set_mac_address = ehea_set_mac_addr, | 3084 | .ndo_set_mac_address = ehea_set_mac_addr, |
3085 | .ndo_validate_addr = eth_validate_addr, | ||
3084 | .ndo_set_multicast_list = ehea_set_multicast_list, | 3086 | .ndo_set_multicast_list = ehea_set_multicast_list, |
3085 | .ndo_change_mtu = ehea_change_mtu, | 3087 | .ndo_change_mtu = ehea_change_mtu, |
3086 | .ndo_vlan_rx_register = ehea_vlan_rx_register, | 3088 | .ndo_vlan_rx_register = ehea_vlan_rx_register, |
diff --git a/drivers/net/fec.c b/drivers/net/fec.c index 0f19b743749b..d4b98074b1b7 100644 --- a/drivers/net/fec.c +++ b/drivers/net/fec.c | |||
@@ -1642,6 +1642,7 @@ static const struct net_device_ops fec_netdev_ops = { | |||
1642 | .ndo_stop = fec_enet_close, | 1642 | .ndo_stop = fec_enet_close, |
1643 | .ndo_start_xmit = fec_enet_start_xmit, | 1643 | .ndo_start_xmit = fec_enet_start_xmit, |
1644 | .ndo_set_multicast_list = set_multicast_list, | 1644 | .ndo_set_multicast_list = set_multicast_list, |
1645 | .ndo_change_mtu = eth_change_mtu, | ||
1645 | .ndo_validate_addr = eth_validate_addr, | 1646 | .ndo_validate_addr = eth_validate_addr, |
1646 | .ndo_tx_timeout = fec_timeout, | 1647 | .ndo_tx_timeout = fec_timeout, |
1647 | .ndo_set_mac_address = fec_set_mac_address, | 1648 | .ndo_set_mac_address = fec_set_mac_address, |
diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c index 4ae1d259fced..43d813ed9f45 100644 --- a/drivers/net/gianfar.c +++ b/drivers/net/gianfar.c | |||
@@ -156,6 +156,8 @@ static const struct net_device_ops gfar_netdev_ops = { | |||
156 | .ndo_tx_timeout = gfar_timeout, | 156 | .ndo_tx_timeout = gfar_timeout, |
157 | .ndo_do_ioctl = gfar_ioctl, | 157 | .ndo_do_ioctl = gfar_ioctl, |
158 | .ndo_vlan_rx_register = gfar_vlan_rx_register, | 158 | .ndo_vlan_rx_register = gfar_vlan_rx_register, |
159 | .ndo_set_mac_address = eth_mac_addr, | ||
160 | .ndo_validate_addr = eth_validate_addr, | ||
159 | #ifdef CONFIG_NET_POLL_CONTROLLER | 161 | #ifdef CONFIG_NET_POLL_CONTROLLER |
160 | .ndo_poll_controller = gfar_netpoll, | 162 | .ndo_poll_controller = gfar_netpoll, |
161 | #endif | 163 | #endif |
diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c index be480292aba1..adb09d32625d 100644 --- a/drivers/net/igb/igb_main.c +++ b/drivers/net/igb/igb_main.c | |||
@@ -127,14 +127,48 @@ static void igb_restore_vlan(struct igb_adapter *); | |||
127 | static void igb_ping_all_vfs(struct igb_adapter *); | 127 | static void igb_ping_all_vfs(struct igb_adapter *); |
128 | static void igb_msg_task(struct igb_adapter *); | 128 | static void igb_msg_task(struct igb_adapter *); |
129 | static int igb_rcv_msg_from_vf(struct igb_adapter *, u32); | 129 | static int igb_rcv_msg_from_vf(struct igb_adapter *, u32); |
130 | static inline void igb_set_rah_pool(struct e1000_hw *, int , int); | ||
131 | static void igb_set_mc_list_pools(struct igb_adapter *, int, u16); | 130 | static void igb_set_mc_list_pools(struct igb_adapter *, int, u16); |
132 | static void igb_vmm_control(struct igb_adapter *); | 131 | static void igb_vmm_control(struct igb_adapter *); |
133 | static inline void igb_set_vmolr(struct e1000_hw *, int); | ||
134 | static inline int igb_set_vf_rlpml(struct igb_adapter *, int, int); | ||
135 | static int igb_set_vf_mac(struct igb_adapter *adapter, int, unsigned char *); | 132 | static int igb_set_vf_mac(struct igb_adapter *adapter, int, unsigned char *); |
136 | static void igb_restore_vf_multicasts(struct igb_adapter *adapter); | 133 | static void igb_restore_vf_multicasts(struct igb_adapter *adapter); |
137 | 134 | ||
135 | static inline void igb_set_vmolr(struct e1000_hw *hw, int vfn) | ||
136 | { | ||
137 | u32 reg_data; | ||
138 | |||
139 | reg_data = rd32(E1000_VMOLR(vfn)); | ||
140 | reg_data |= E1000_VMOLR_BAM | /* Accept broadcast */ | ||
141 | E1000_VMOLR_ROPE | /* Accept packets matched in UTA */ | ||
142 | E1000_VMOLR_ROMPE | /* Accept packets matched in MTA */ | ||
143 | E1000_VMOLR_AUPE | /* Accept untagged packets */ | ||
144 | E1000_VMOLR_STRVLAN; /* Strip vlan tags */ | ||
145 | wr32(E1000_VMOLR(vfn), reg_data); | ||
146 | } | ||
147 | |||
148 | static inline int igb_set_vf_rlpml(struct igb_adapter *adapter, int size, | ||
149 | int vfn) | ||
150 | { | ||
151 | struct e1000_hw *hw = &adapter->hw; | ||
152 | u32 vmolr; | ||
153 | |||
154 | vmolr = rd32(E1000_VMOLR(vfn)); | ||
155 | vmolr &= ~E1000_VMOLR_RLPML_MASK; | ||
156 | vmolr |= size | E1000_VMOLR_LPE; | ||
157 | wr32(E1000_VMOLR(vfn), vmolr); | ||
158 | |||
159 | return 0; | ||
160 | } | ||
161 | |||
162 | static inline void igb_set_rah_pool(struct e1000_hw *hw, int pool, int entry) | ||
163 | { | ||
164 | u32 reg_data; | ||
165 | |||
166 | reg_data = rd32(E1000_RAH(entry)); | ||
167 | reg_data &= ~E1000_RAH_POOL_MASK; | ||
168 | reg_data |= E1000_RAH_POOL_1 << pool;; | ||
169 | wr32(E1000_RAH(entry), reg_data); | ||
170 | } | ||
171 | |||
138 | #ifdef CONFIG_PM | 172 | #ifdef CONFIG_PM |
139 | static int igb_suspend(struct pci_dev *, pm_message_t); | 173 | static int igb_suspend(struct pci_dev *, pm_message_t); |
140 | static int igb_resume(struct pci_dev *); | 174 | static int igb_resume(struct pci_dev *); |
@@ -5418,43 +5452,6 @@ static void igb_io_resume(struct pci_dev *pdev) | |||
5418 | igb_get_hw_control(adapter); | 5452 | igb_get_hw_control(adapter); |
5419 | } | 5453 | } |
5420 | 5454 | ||
5421 | static inline void igb_set_vmolr(struct e1000_hw *hw, int vfn) | ||
5422 | { | ||
5423 | u32 reg_data; | ||
5424 | |||
5425 | reg_data = rd32(E1000_VMOLR(vfn)); | ||
5426 | reg_data |= E1000_VMOLR_BAM | /* Accept broadcast */ | ||
5427 | E1000_VMOLR_ROPE | /* Accept packets matched in UTA */ | ||
5428 | E1000_VMOLR_ROMPE | /* Accept packets matched in MTA */ | ||
5429 | E1000_VMOLR_AUPE | /* Accept untagged packets */ | ||
5430 | E1000_VMOLR_STRVLAN; /* Strip vlan tags */ | ||
5431 | wr32(E1000_VMOLR(vfn), reg_data); | ||
5432 | } | ||
5433 | |||
5434 | static inline int igb_set_vf_rlpml(struct igb_adapter *adapter, int size, | ||
5435 | int vfn) | ||
5436 | { | ||
5437 | struct e1000_hw *hw = &adapter->hw; | ||
5438 | u32 vmolr; | ||
5439 | |||
5440 | vmolr = rd32(E1000_VMOLR(vfn)); | ||
5441 | vmolr &= ~E1000_VMOLR_RLPML_MASK; | ||
5442 | vmolr |= size | E1000_VMOLR_LPE; | ||
5443 | wr32(E1000_VMOLR(vfn), vmolr); | ||
5444 | |||
5445 | return 0; | ||
5446 | } | ||
5447 | |||
5448 | static inline void igb_set_rah_pool(struct e1000_hw *hw, int pool, int entry) | ||
5449 | { | ||
5450 | u32 reg_data; | ||
5451 | |||
5452 | reg_data = rd32(E1000_RAH(entry)); | ||
5453 | reg_data &= ~E1000_RAH_POOL_MASK; | ||
5454 | reg_data |= E1000_RAH_POOL_1 << pool;; | ||
5455 | wr32(E1000_RAH(entry), reg_data); | ||
5456 | } | ||
5457 | |||
5458 | static void igb_set_mc_list_pools(struct igb_adapter *adapter, | 5455 | static void igb_set_mc_list_pools(struct igb_adapter *adapter, |
5459 | int entry_count, u16 total_rar_filters) | 5456 | int entry_count, u16 total_rar_filters) |
5460 | { | 5457 | { |
diff --git a/drivers/net/isa-skeleton.c b/drivers/net/isa-skeleton.c index 73585fd8f29f..d12377b84358 100644 --- a/drivers/net/isa-skeleton.c +++ b/drivers/net/isa-skeleton.c | |||
@@ -430,7 +430,8 @@ static int net_send_packet(struct sk_buff *skb, struct net_device *dev) | |||
430 | * hardware interrupt handler. Queue flow control is | 430 | * hardware interrupt handler. Queue flow control is |
431 | * thus managed under this lock as well. | 431 | * thus managed under this lock as well. |
432 | */ | 432 | */ |
433 | spin_lock_irq(&np->lock); | 433 | unsigned long flags; |
434 | spin_lock_irqsave(&np->lock, flags); | ||
434 | 435 | ||
435 | add_to_tx_ring(np, skb, length); | 436 | add_to_tx_ring(np, skb, length); |
436 | dev->trans_start = jiffies; | 437 | dev->trans_start = jiffies; |
@@ -446,7 +447,7 @@ static int net_send_packet(struct sk_buff *skb, struct net_device *dev) | |||
446 | * is when the transmit statistics are updated. | 447 | * is when the transmit statistics are updated. |
447 | */ | 448 | */ |
448 | 449 | ||
449 | spin_unlock_irq(&np->lock); | 450 | spin_unlock_irqrestore(&np->lock, flags); |
450 | #else | 451 | #else |
451 | /* This is the case for older hardware which takes | 452 | /* This is the case for older hardware which takes |
452 | * a single transmit buffer at a time, and it is | 453 | * a single transmit buffer at a time, and it is |
diff --git a/drivers/net/mlx4/cmd.c b/drivers/net/mlx4/cmd.c index 2845a0560b84..65ec77dc31f5 100644 --- a/drivers/net/mlx4/cmd.c +++ b/drivers/net/mlx4/cmd.c | |||
@@ -80,7 +80,9 @@ enum { | |||
80 | /* Bad management packet (silently discarded): */ | 80 | /* Bad management packet (silently discarded): */ |
81 | CMD_STAT_BAD_PKT = 0x30, | 81 | CMD_STAT_BAD_PKT = 0x30, |
82 | /* More outstanding CQEs in CQ than new CQ size: */ | 82 | /* More outstanding CQEs in CQ than new CQ size: */ |
83 | CMD_STAT_BAD_SIZE = 0x40 | 83 | CMD_STAT_BAD_SIZE = 0x40, |
84 | /* Multi Function device support required: */ | ||
85 | CMD_STAT_MULTI_FUNC_REQ = 0x50, | ||
84 | }; | 86 | }; |
85 | 87 | ||
86 | enum { | 88 | enum { |
@@ -128,6 +130,7 @@ static int mlx4_status_to_errno(u8 status) | |||
128 | [CMD_STAT_LAM_NOT_PRE] = -EAGAIN, | 130 | [CMD_STAT_LAM_NOT_PRE] = -EAGAIN, |
129 | [CMD_STAT_BAD_PKT] = -EINVAL, | 131 | [CMD_STAT_BAD_PKT] = -EINVAL, |
130 | [CMD_STAT_BAD_SIZE] = -ENOMEM, | 132 | [CMD_STAT_BAD_SIZE] = -ENOMEM, |
133 | [CMD_STAT_MULTI_FUNC_REQ] = -EACCES, | ||
131 | }; | 134 | }; |
132 | 135 | ||
133 | if (status >= ARRAY_SIZE(trans_table) || | 136 | if (status >= ARRAY_SIZE(trans_table) || |
diff --git a/drivers/net/mlx4/main.c b/drivers/net/mlx4/main.c index 018348c01193..dac621b1e9fc 100644 --- a/drivers/net/mlx4/main.c +++ b/drivers/net/mlx4/main.c | |||
@@ -729,7 +729,10 @@ static int mlx4_init_hca(struct mlx4_dev *dev) | |||
729 | 729 | ||
730 | err = mlx4_QUERY_FW(dev); | 730 | err = mlx4_QUERY_FW(dev); |
731 | if (err) { | 731 | if (err) { |
732 | mlx4_err(dev, "QUERY_FW command failed, aborting.\n"); | 732 | if (err == -EACCES) |
733 | mlx4_info(dev, "non-primary physical function, skipping.\n"); | ||
734 | else | ||
735 | mlx4_err(dev, "QUERY_FW command failed, aborting.\n"); | ||
733 | return err; | 736 | return err; |
734 | } | 737 | } |
735 | 738 | ||
@@ -1285,6 +1288,7 @@ static struct pci_device_id mlx4_pci_table[] = { | |||
1285 | { PCI_VDEVICE(MELLANOX, 0x6750) }, /* MT25408 "Hermon" EN 10GigE PCIe gen2 */ | 1288 | { PCI_VDEVICE(MELLANOX, 0x6750) }, /* MT25408 "Hermon" EN 10GigE PCIe gen2 */ |
1286 | { PCI_VDEVICE(MELLANOX, 0x6372) }, /* MT25458 ConnectX EN 10GBASE-T 10GigE */ | 1289 | { PCI_VDEVICE(MELLANOX, 0x6372) }, /* MT25458 ConnectX EN 10GBASE-T 10GigE */ |
1287 | { PCI_VDEVICE(MELLANOX, 0x675a) }, /* MT25458 ConnectX EN 10GBASE-T+Gen2 10GigE */ | 1290 | { PCI_VDEVICE(MELLANOX, 0x675a) }, /* MT25458 ConnectX EN 10GBASE-T+Gen2 10GigE */ |
1291 | { PCI_VDEVICE(MELLANOX, 0x6764) }, /* MT26468 ConnectX EN 10GigE PCIe gen2*/ | ||
1288 | { 0, } | 1292 | { 0, } |
1289 | }; | 1293 | }; |
1290 | 1294 | ||
diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c index eba937c46376..b10fedd82143 100644 --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c | |||
@@ -134,8 +134,10 @@ int phy_scan_fixups(struct phy_device *phydev) | |||
134 | 134 | ||
135 | err = fixup->run(phydev); | 135 | err = fixup->run(phydev); |
136 | 136 | ||
137 | if (err < 0) | 137 | if (err < 0) { |
138 | mutex_unlock(&phy_fixup_lock); | ||
138 | return err; | 139 | return err; |
140 | } | ||
139 | } | 141 | } |
140 | } | 142 | } |
141 | mutex_unlock(&phy_fixup_lock); | 143 | mutex_unlock(&phy_fixup_lock); |
diff --git a/drivers/net/plip.c b/drivers/net/plip.c index 7a62f781fef2..2ca8b0d84ee2 100644 --- a/drivers/net/plip.c +++ b/drivers/net/plip.c | |||
@@ -270,6 +270,9 @@ static const struct net_device_ops plip_netdev_ops = { | |||
270 | .ndo_stop = plip_close, | 270 | .ndo_stop = plip_close, |
271 | .ndo_start_xmit = plip_tx_packet, | 271 | .ndo_start_xmit = plip_tx_packet, |
272 | .ndo_do_ioctl = plip_ioctl, | 272 | .ndo_do_ioctl = plip_ioctl, |
273 | .ndo_change_mtu = eth_change_mtu, | ||
274 | .ndo_set_mac_address = eth_mac_addr, | ||
275 | .ndo_validate_addr = eth_validate_addr, | ||
273 | }; | 276 | }; |
274 | 277 | ||
275 | /* Entry point of PLIP driver. | 278 | /* Entry point of PLIP driver. |
diff --git a/drivers/net/ppp_async.c b/drivers/net/ppp_async.c index 17c116bb332c..6de8399d6dd9 100644 --- a/drivers/net/ppp_async.c +++ b/drivers/net/ppp_async.c | |||
@@ -356,6 +356,7 @@ ppp_asynctty_receive(struct tty_struct *tty, const unsigned char *buf, | |||
356 | if (!skb_queue_empty(&ap->rqueue)) | 356 | if (!skb_queue_empty(&ap->rqueue)) |
357 | tasklet_schedule(&ap->tsk); | 357 | tasklet_schedule(&ap->tsk); |
358 | ap_put(ap); | 358 | ap_put(ap); |
359 | tty_unthrottle(tty); | ||
359 | } | 360 | } |
360 | 361 | ||
361 | static void | 362 | static void |
diff --git a/drivers/net/ppp_synctty.c b/drivers/net/ppp_synctty.c index aa3d39f38e22..d2fa2db13586 100644 --- a/drivers/net/ppp_synctty.c +++ b/drivers/net/ppp_synctty.c | |||
@@ -397,6 +397,7 @@ ppp_sync_receive(struct tty_struct *tty, const unsigned char *buf, | |||
397 | if (!skb_queue_empty(&ap->rqueue)) | 397 | if (!skb_queue_empty(&ap->rqueue)) |
398 | tasklet_schedule(&ap->tsk); | 398 | tasklet_schedule(&ap->tsk); |
399 | sp_put(ap); | 399 | sp_put(ap); |
400 | tty_unthrottle(tty); | ||
400 | } | 401 | } |
401 | 402 | ||
402 | static void | 403 | static void |
diff --git a/drivers/net/ps3_gelic_net.c b/drivers/net/ps3_gelic_net.c index d1a5fb4d6acb..a3932c9f3406 100644 --- a/drivers/net/ps3_gelic_net.c +++ b/drivers/net/ps3_gelic_net.c | |||
@@ -1411,6 +1411,7 @@ static const struct net_device_ops gelic_netdevice_ops = { | |||
1411 | .ndo_set_multicast_list = gelic_net_set_multi, | 1411 | .ndo_set_multicast_list = gelic_net_set_multi, |
1412 | .ndo_change_mtu = gelic_net_change_mtu, | 1412 | .ndo_change_mtu = gelic_net_change_mtu, |
1413 | .ndo_tx_timeout = gelic_net_tx_timeout, | 1413 | .ndo_tx_timeout = gelic_net_tx_timeout, |
1414 | .ndo_set_mac_address = eth_mac_addr, | ||
1414 | .ndo_validate_addr = eth_validate_addr, | 1415 | .ndo_validate_addr = eth_validate_addr, |
1415 | #ifdef CONFIG_NET_POLL_CONTROLLER | 1416 | #ifdef CONFIG_NET_POLL_CONTROLLER |
1416 | .ndo_poll_controller = gelic_net_poll_controller, | 1417 | .ndo_poll_controller = gelic_net_poll_controller, |
diff --git a/drivers/net/ps3_gelic_wireless.c b/drivers/net/ps3_gelic_wireless.c index b6b3ca9bdb21..6932b08d746b 100644 --- a/drivers/net/ps3_gelic_wireless.c +++ b/drivers/net/ps3_gelic_wireless.c | |||
@@ -2707,6 +2707,7 @@ static const struct net_device_ops gelic_wl_netdevice_ops = { | |||
2707 | .ndo_set_multicast_list = gelic_net_set_multi, | 2707 | .ndo_set_multicast_list = gelic_net_set_multi, |
2708 | .ndo_change_mtu = gelic_net_change_mtu, | 2708 | .ndo_change_mtu = gelic_net_change_mtu, |
2709 | .ndo_tx_timeout = gelic_net_tx_timeout, | 2709 | .ndo_tx_timeout = gelic_net_tx_timeout, |
2710 | .ndo_set_mac_address = eth_mac_addr, | ||
2710 | .ndo_validate_addr = eth_validate_addr, | 2711 | .ndo_validate_addr = eth_validate_addr, |
2711 | #ifdef CONFIG_NET_POLL_CONTROLLER | 2712 | #ifdef CONFIG_NET_POLL_CONTROLLER |
2712 | .ndo_poll_controller = gelic_net_poll_controller, | 2713 | .ndo_poll_controller = gelic_net_poll_controller, |
diff --git a/drivers/net/smc91x.c b/drivers/net/smc91x.c index fdcbaf8dfa73..1c70e999cc50 100644 --- a/drivers/net/smc91x.c +++ b/drivers/net/smc91x.c | |||
@@ -1774,6 +1774,7 @@ static const struct net_device_ops smc_netdev_ops = { | |||
1774 | .ndo_start_xmit = smc_hard_start_xmit, | 1774 | .ndo_start_xmit = smc_hard_start_xmit, |
1775 | .ndo_tx_timeout = smc_timeout, | 1775 | .ndo_tx_timeout = smc_timeout, |
1776 | .ndo_set_multicast_list = smc_set_multicast_list, | 1776 | .ndo_set_multicast_list = smc_set_multicast_list, |
1777 | .ndo_change_mtu = eth_change_mtu, | ||
1777 | .ndo_validate_addr = eth_validate_addr, | 1778 | .ndo_validate_addr = eth_validate_addr, |
1778 | .ndo_set_mac_address = eth_mac_addr, | 1779 | .ndo_set_mac_address = eth_mac_addr, |
1779 | #ifdef CONFIG_NET_POLL_CONTROLLER | 1780 | #ifdef CONFIG_NET_POLL_CONTROLLER |
diff --git a/drivers/net/smsc911x.c b/drivers/net/smsc911x.c index 66067f9d91c0..94b6d2658ddc 100644 --- a/drivers/net/smsc911x.c +++ b/drivers/net/smsc911x.c | |||
@@ -1779,6 +1779,7 @@ static const struct net_device_ops smsc911x_netdev_ops = { | |||
1779 | .ndo_get_stats = smsc911x_get_stats, | 1779 | .ndo_get_stats = smsc911x_get_stats, |
1780 | .ndo_set_multicast_list = smsc911x_set_multicast_list, | 1780 | .ndo_set_multicast_list = smsc911x_set_multicast_list, |
1781 | .ndo_do_ioctl = smsc911x_do_ioctl, | 1781 | .ndo_do_ioctl = smsc911x_do_ioctl, |
1782 | .ndo_change_mtu = eth_change_mtu, | ||
1782 | .ndo_validate_addr = eth_validate_addr, | 1783 | .ndo_validate_addr = eth_validate_addr, |
1783 | .ndo_set_mac_address = smsc911x_set_mac_address, | 1784 | .ndo_set_mac_address = smsc911x_set_mac_address, |
1784 | #ifdef CONFIG_NET_POLL_CONTROLLER | 1785 | #ifdef CONFIG_NET_POLL_CONTROLLER |
diff --git a/drivers/net/sunvnet.c b/drivers/net/sunvnet.c index a82fb2aca4cb..f1e5e4542c2a 100644 --- a/drivers/net/sunvnet.c +++ b/drivers/net/sunvnet.c | |||
@@ -1016,7 +1016,9 @@ static const struct net_device_ops vnet_ops = { | |||
1016 | .ndo_open = vnet_open, | 1016 | .ndo_open = vnet_open, |
1017 | .ndo_stop = vnet_close, | 1017 | .ndo_stop = vnet_close, |
1018 | .ndo_set_multicast_list = vnet_set_rx_mode, | 1018 | .ndo_set_multicast_list = vnet_set_rx_mode, |
1019 | .ndo_change_mtu = eth_change_mtu, | ||
1019 | .ndo_set_mac_address = vnet_set_mac_addr, | 1020 | .ndo_set_mac_address = vnet_set_mac_addr, |
1021 | .ndo_validate_addr = eth_validate_addr, | ||
1020 | .ndo_tx_timeout = vnet_tx_timeout, | 1022 | .ndo_tx_timeout = vnet_tx_timeout, |
1021 | .ndo_change_mtu = vnet_change_mtu, | 1023 | .ndo_change_mtu = vnet_change_mtu, |
1022 | .ndo_start_xmit = vnet_start_xmit, | 1024 | .ndo_start_xmit = vnet_start_xmit, |
diff --git a/drivers/net/usb/kaweth.c b/drivers/net/usb/kaweth.c index e01314789718..1f9ec29fce50 100644 --- a/drivers/net/usb/kaweth.c +++ b/drivers/net/usb/kaweth.c | |||
@@ -999,6 +999,9 @@ static const struct net_device_ops kaweth_netdev_ops = { | |||
999 | .ndo_tx_timeout = kaweth_tx_timeout, | 999 | .ndo_tx_timeout = kaweth_tx_timeout, |
1000 | .ndo_set_multicast_list = kaweth_set_rx_mode, | 1000 | .ndo_set_multicast_list = kaweth_set_rx_mode, |
1001 | .ndo_get_stats = kaweth_netdev_stats, | 1001 | .ndo_get_stats = kaweth_netdev_stats, |
1002 | .ndo_change_mtu = eth_change_mtu, | ||
1003 | .ndo_set_mac_address = eth_mac_addr, | ||
1004 | .ndo_validate_addr = eth_validate_addr, | ||
1002 | }; | 1005 | }; |
1003 | 1006 | ||
1004 | static int kaweth_probe( | 1007 | static int kaweth_probe( |
diff --git a/drivers/net/usb/pegasus.c b/drivers/net/usb/pegasus.c index 73acbd244aa1..631d269ac980 100644 --- a/drivers/net/usb/pegasus.c +++ b/drivers/net/usb/pegasus.c | |||
@@ -1493,6 +1493,9 @@ static const struct net_device_ops pegasus_netdev_ops = { | |||
1493 | .ndo_set_multicast_list = pegasus_set_multicast, | 1493 | .ndo_set_multicast_list = pegasus_set_multicast, |
1494 | .ndo_get_stats = pegasus_netdev_stats, | 1494 | .ndo_get_stats = pegasus_netdev_stats, |
1495 | .ndo_tx_timeout = pegasus_tx_timeout, | 1495 | .ndo_tx_timeout = pegasus_tx_timeout, |
1496 | .ndo_change_mtu = eth_change_mtu, | ||
1497 | .ndo_set_mac_address = eth_mac_addr, | ||
1498 | .ndo_validate_addr = eth_validate_addr, | ||
1496 | }; | 1499 | }; |
1497 | 1500 | ||
1498 | static struct usb_driver pegasus_driver = { | 1501 | static struct usb_driver pegasus_driver = { |
diff --git a/drivers/net/via-rhine.c b/drivers/net/via-rhine.c index d3489a3c4c03..88c30a58b4bd 100644 --- a/drivers/net/via-rhine.c +++ b/drivers/net/via-rhine.c | |||
@@ -621,6 +621,7 @@ static const struct net_device_ops rhine_netdev_ops = { | |||
621 | .ndo_start_xmit = rhine_start_tx, | 621 | .ndo_start_xmit = rhine_start_tx, |
622 | .ndo_get_stats = rhine_get_stats, | 622 | .ndo_get_stats = rhine_get_stats, |
623 | .ndo_set_multicast_list = rhine_set_rx_mode, | 623 | .ndo_set_multicast_list = rhine_set_rx_mode, |
624 | .ndo_change_mtu = eth_change_mtu, | ||
624 | .ndo_validate_addr = eth_validate_addr, | 625 | .ndo_validate_addr = eth_validate_addr, |
625 | .ndo_set_mac_address = eth_mac_addr, | 626 | .ndo_set_mac_address = eth_mac_addr, |
626 | .ndo_do_ioctl = netdev_ioctl, | 627 | .ndo_do_ioctl = netdev_ioctl, |
diff --git a/drivers/net/wireless/orinoco/main.c b/drivers/net/wireless/orinoco/main.c index 345593c4accb..a370e510f19f 100644 --- a/drivers/net/wireless/orinoco/main.c +++ b/drivers/net/wireless/orinoco/main.c | |||
@@ -2521,6 +2521,8 @@ static const struct net_device_ops orinoco_netdev_ops = { | |||
2521 | .ndo_start_xmit = orinoco_xmit, | 2521 | .ndo_start_xmit = orinoco_xmit, |
2522 | .ndo_set_multicast_list = orinoco_set_multicast_list, | 2522 | .ndo_set_multicast_list = orinoco_set_multicast_list, |
2523 | .ndo_change_mtu = orinoco_change_mtu, | 2523 | .ndo_change_mtu = orinoco_change_mtu, |
2524 | .ndo_set_mac_address = eth_mac_addr, | ||
2525 | .ndo_validate_addr = eth_validate_addr, | ||
2524 | .ndo_tx_timeout = orinoco_tx_timeout, | 2526 | .ndo_tx_timeout = orinoco_tx_timeout, |
2525 | .ndo_get_stats = orinoco_get_stats, | 2527 | .ndo_get_stats = orinoco_get_stats, |
2526 | }; | 2528 | }; |
@@ -2555,7 +2557,6 @@ struct net_device | |||
2555 | priv->wireless_data.spy_data = &priv->spy_data; | 2557 | priv->wireless_data.spy_data = &priv->spy_data; |
2556 | dev->wireless_data = &priv->wireless_data; | 2558 | dev->wireless_data = &priv->wireless_data; |
2557 | #endif | 2559 | #endif |
2558 | /* we use the default eth_mac_addr for setting the MAC addr */ | ||
2559 | 2560 | ||
2560 | /* Reserve space in skb for the SNAP header */ | 2561 | /* Reserve space in skb for the SNAP header */ |
2561 | dev->hard_header_len += ENCAPS_OVERHEAD; | 2562 | dev->hard_header_len += ENCAPS_OVERHEAD; |
diff --git a/drivers/serial/bfin_sport_uart.c b/drivers/serial/bfin_sport_uart.c index 34b4ae0fe760..c108b1a0ce98 100644 --- a/drivers/serial/bfin_sport_uart.c +++ b/drivers/serial/bfin_sport_uart.c | |||
@@ -236,7 +236,6 @@ static int sport_startup(struct uart_port *port) | |||
236 | int retval; | 236 | int retval; |
237 | 237 | ||
238 | pr_debug("%s enter\n", __func__); | 238 | pr_debug("%s enter\n", __func__); |
239 | memset(buffer, 20, '\0'); | ||
240 | snprintf(buffer, 20, "%s rx", up->name); | 239 | snprintf(buffer, 20, "%s rx", up->name); |
241 | retval = request_irq(up->rx_irq, sport_uart_rx_irq, IRQF_SAMPLE_RANDOM, buffer, up); | 240 | retval = request_irq(up->rx_irq, sport_uart_rx_irq, IRQF_SAMPLE_RANDOM, buffer, up); |
242 | if (retval) { | 241 | if (retval) { |
diff --git a/drivers/serial/msm_serial.c b/drivers/serial/msm_serial.c index 698048f64f5e..f7c24baa1416 100644 --- a/drivers/serial/msm_serial.c +++ b/drivers/serial/msm_serial.c | |||
@@ -730,7 +730,6 @@ static int __devexit msm_serial_remove(struct platform_device *pdev) | |||
730 | } | 730 | } |
731 | 731 | ||
732 | static struct platform_driver msm_platform_driver = { | 732 | static struct platform_driver msm_platform_driver = { |
733 | .probe = msm_serial_probe, | ||
734 | .remove = msm_serial_remove, | 733 | .remove = msm_serial_remove, |
735 | .driver = { | 734 | .driver = { |
736 | .name = "msm_serial", | 735 | .name = "msm_serial", |
diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c index 193c8f0e5cc5..bcec78ffc765 100644 --- a/drivers/virtio/virtio_pci.c +++ b/drivers/virtio/virtio_pci.c | |||
@@ -669,7 +669,7 @@ static int __init virtio_pci_init(void) | |||
669 | 669 | ||
670 | err = pci_register_driver(&virtio_pci_driver); | 670 | err = pci_register_driver(&virtio_pci_driver); |
671 | if (err) | 671 | if (err) |
672 | device_unregister(virtio_pci_root); | 672 | root_device_unregister(virtio_pci_root); |
673 | 673 | ||
674 | return err; | 674 | return err; |
675 | } | 675 | } |
diff --git a/fs/dlm/lock.c b/fs/dlm/lock.c index 205ec95b347e..eb507c453c5f 100644 --- a/fs/dlm/lock.c +++ b/fs/dlm/lock.c | |||
@@ -435,7 +435,7 @@ static int search_rsb(struct dlm_ls *ls, char *name, int len, int b, | |||
435 | static int find_rsb(struct dlm_ls *ls, char *name, int namelen, | 435 | static int find_rsb(struct dlm_ls *ls, char *name, int namelen, |
436 | unsigned int flags, struct dlm_rsb **r_ret) | 436 | unsigned int flags, struct dlm_rsb **r_ret) |
437 | { | 437 | { |
438 | struct dlm_rsb *r, *tmp; | 438 | struct dlm_rsb *r = NULL, *tmp; |
439 | uint32_t hash, bucket; | 439 | uint32_t hash, bucket; |
440 | int error = -EINVAL; | 440 | int error = -EINVAL; |
441 | 441 | ||
diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c index cdb580a9c7a2..618a60f03886 100644 --- a/fs/dlm/lowcomms.c +++ b/fs/dlm/lowcomms.c | |||
@@ -902,7 +902,7 @@ static void tcp_connect_to_sock(struct connection *con) | |||
902 | int result = -EHOSTUNREACH; | 902 | int result = -EHOSTUNREACH; |
903 | struct sockaddr_storage saddr, src_addr; | 903 | struct sockaddr_storage saddr, src_addr; |
904 | int addr_len; | 904 | int addr_len; |
905 | struct socket *sock; | 905 | struct socket *sock = NULL; |
906 | 906 | ||
907 | if (con->nodeid == 0) { | 907 | if (con->nodeid == 0) { |
908 | log_print("attempt to connect sock 0 foiled"); | 908 | log_print("attempt to connect sock 0 foiled"); |
@@ -962,6 +962,8 @@ out_err: | |||
962 | if (con->sock) { | 962 | if (con->sock) { |
963 | sock_release(con->sock); | 963 | sock_release(con->sock); |
964 | con->sock = NULL; | 964 | con->sock = NULL; |
965 | } else if (sock) { | ||
966 | sock_release(sock); | ||
965 | } | 967 | } |
966 | /* | 968 | /* |
967 | * Some errors are fatal and this list might need adjusting. For other | 969 | * Some errors are fatal and this list might need adjusting. For other |
diff --git a/fs/dlm/plock.c b/fs/dlm/plock.c index 894a32d438d5..16f682e26c07 100644 --- a/fs/dlm/plock.c +++ b/fs/dlm/plock.c | |||
@@ -353,7 +353,7 @@ static ssize_t dev_write(struct file *file, const char __user *u, size_t count, | |||
353 | { | 353 | { |
354 | struct dlm_plock_info info; | 354 | struct dlm_plock_info info; |
355 | struct plock_op *op; | 355 | struct plock_op *op; |
356 | int found = 0; | 356 | int found = 0, do_callback = 0; |
357 | 357 | ||
358 | if (count != sizeof(info)) | 358 | if (count != sizeof(info)) |
359 | return -EINVAL; | 359 | return -EINVAL; |
@@ -366,21 +366,24 @@ static ssize_t dev_write(struct file *file, const char __user *u, size_t count, | |||
366 | 366 | ||
367 | spin_lock(&ops_lock); | 367 | spin_lock(&ops_lock); |
368 | list_for_each_entry(op, &recv_list, list) { | 368 | list_for_each_entry(op, &recv_list, list) { |
369 | if (op->info.fsid == info.fsid && op->info.number == info.number && | 369 | if (op->info.fsid == info.fsid && |
370 | op->info.number == info.number && | ||
370 | op->info.owner == info.owner) { | 371 | op->info.owner == info.owner) { |
372 | struct plock_xop *xop = (struct plock_xop *)op; | ||
371 | list_del_init(&op->list); | 373 | list_del_init(&op->list); |
372 | found = 1; | ||
373 | op->done = 1; | ||
374 | memcpy(&op->info, &info, sizeof(info)); | 374 | memcpy(&op->info, &info, sizeof(info)); |
375 | if (xop->callback) | ||
376 | do_callback = 1; | ||
377 | else | ||
378 | op->done = 1; | ||
379 | found = 1; | ||
375 | break; | 380 | break; |
376 | } | 381 | } |
377 | } | 382 | } |
378 | spin_unlock(&ops_lock); | 383 | spin_unlock(&ops_lock); |
379 | 384 | ||
380 | if (found) { | 385 | if (found) { |
381 | struct plock_xop *xop; | 386 | if (do_callback) |
382 | xop = (struct plock_xop *)op; | ||
383 | if (xop->callback) | ||
384 | dlm_plock_callback(op); | 387 | dlm_plock_callback(op); |
385 | else | 388 | else |
386 | wake_up(&recv_wq); | 389 | wake_up(&recv_wq); |
diff --git a/fs/gfs2/trace_gfs2.h b/fs/gfs2/trace_gfs2.h index 98d6ef1c1dc0..148d55c14171 100644 --- a/fs/gfs2/trace_gfs2.h +++ b/fs/gfs2/trace_gfs2.h | |||
@@ -1,12 +1,11 @@ | |||
1 | #undef TRACE_SYSTEM | ||
2 | #define TRACE_SYSTEM gfs2 | ||
3 | |||
1 | #if !defined(_TRACE_GFS2_H) || defined(TRACE_HEADER_MULTI_READ) | 4 | #if !defined(_TRACE_GFS2_H) || defined(TRACE_HEADER_MULTI_READ) |
2 | #define _TRACE_GFS2_H | 5 | #define _TRACE_GFS2_H |
3 | 6 | ||
4 | #include <linux/tracepoint.h> | 7 | #include <linux/tracepoint.h> |
5 | 8 | ||
6 | #undef TRACE_SYSTEM | ||
7 | #define TRACE_SYSTEM gfs2 | ||
8 | #define TRACE_INCLUDE_FILE trace_gfs2 | ||
9 | |||
10 | #include <linux/fs.h> | 9 | #include <linux/fs.h> |
11 | #include <linux/buffer_head.h> | 10 | #include <linux/buffer_head.h> |
12 | #include <linux/dlmconstants.h> | 11 | #include <linux/dlmconstants.h> |
@@ -403,5 +402,6 @@ TRACE_EVENT(gfs2_block_alloc, | |||
403 | /* This part must be outside protection */ | 402 | /* This part must be outside protection */ |
404 | #undef TRACE_INCLUDE_PATH | 403 | #undef TRACE_INCLUDE_PATH |
405 | #define TRACE_INCLUDE_PATH . | 404 | #define TRACE_INCLUDE_PATH . |
405 | #define TRACE_INCLUDE_FILE trace_gfs2 | ||
406 | #include <trace/define_trace.h> | 406 | #include <trace/define_trace.h> |
407 | 407 | ||
diff --git a/include/linux/clockchips.h b/include/linux/clockchips.h index 20a100fe2b4f..3a1dbba4d3ae 100644 --- a/include/linux/clockchips.h +++ b/include/linux/clockchips.h | |||
@@ -143,12 +143,3 @@ extern void clockevents_notify(unsigned long reason, void *arg); | |||
143 | #endif | 143 | #endif |
144 | 144 | ||
145 | #endif | 145 | #endif |
146 | |||
147 | #ifdef CONFIG_GENERIC_CLOCKEVENTS | ||
148 | extern ktime_t clockevents_get_next_event(int cpu); | ||
149 | #else | ||
150 | static inline ktime_t clockevents_get_next_event(int cpu) | ||
151 | { | ||
152 | return (ktime_t) { .tv64 = KTIME_MAX }; | ||
153 | } | ||
154 | #endif | ||
diff --git a/include/linux/console_struct.h b/include/linux/console_struct.h index d71f7c0f931b..38fe59dc89ae 100644 --- a/include/linux/console_struct.h +++ b/include/linux/console_struct.h | |||
@@ -89,7 +89,6 @@ struct vc_data { | |||
89 | unsigned int vc_need_wrap : 1; | 89 | unsigned int vc_need_wrap : 1; |
90 | unsigned int vc_can_do_color : 1; | 90 | unsigned int vc_can_do_color : 1; |
91 | unsigned int vc_report_mouse : 2; | 91 | unsigned int vc_report_mouse : 2; |
92 | unsigned int vc_kmalloced : 1; | ||
93 | unsigned char vc_utf : 1; /* Unicode UTF-8 encoding */ | 92 | unsigned char vc_utf : 1; /* Unicode UTF-8 encoding */ |
94 | unsigned char vc_utf_count; | 93 | unsigned char vc_utf_count; |
95 | int vc_utf_char; | 94 | int vc_utf_char; |
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h index 54648e625efd..4759917adc71 100644 --- a/include/linux/hrtimer.h +++ b/include/linux/hrtimer.h | |||
@@ -448,7 +448,7 @@ extern void timer_stats_update_stats(void *timer, pid_t pid, void *startf, | |||
448 | 448 | ||
449 | static inline void timer_stats_account_hrtimer(struct hrtimer *timer) | 449 | static inline void timer_stats_account_hrtimer(struct hrtimer *timer) |
450 | { | 450 | { |
451 | if (likely(!timer->start_pid)) | 451 | if (likely(!timer->start_site)) |
452 | return; | 452 | return; |
453 | timer_stats_update_stats(timer, timer->start_pid, timer->start_site, | 453 | timer_stats_update_stats(timer, timer->start_pid, timer->start_site, |
454 | timer->function, timer->start_comm, 0); | 454 | timer->function, timer->start_comm, 0); |
diff --git a/include/linux/lguest.h b/include/linux/lguest.h index 7bc1440fc473..dbf2479e808e 100644 --- a/include/linux/lguest.h +++ b/include/linux/lguest.h | |||
@@ -11,7 +11,7 @@ | |||
11 | #define LG_CLOCK_MIN_DELTA 100UL | 11 | #define LG_CLOCK_MIN_DELTA 100UL |
12 | #define LG_CLOCK_MAX_DELTA ULONG_MAX | 12 | #define LG_CLOCK_MAX_DELTA ULONG_MAX |
13 | 13 | ||
14 | /*G:032 The second method of communicating with the Host is to via "struct | 14 | /*G:031 The second method of communicating with the Host is to via "struct |
15 | * lguest_data". Once the Guest's initialization hypercall tells the Host where | 15 | * lguest_data". Once the Guest's initialization hypercall tells the Host where |
16 | * this is, the Guest and Host both publish information in it. :*/ | 16 | * this is, the Guest and Host both publish information in it. :*/ |
17 | struct lguest_data | 17 | struct lguest_data |
diff --git a/include/linux/libata.h b/include/linux/libata.h index 3d501db36a26..79b6d7fd4ac2 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -385,6 +385,7 @@ enum { | |||
385 | not multiple of 16 bytes */ | 385 | not multiple of 16 bytes */ |
386 | ATA_HORKAGE_FIRMWARE_WARN = (1 << 12), /* firmware update warning */ | 386 | ATA_HORKAGE_FIRMWARE_WARN = (1 << 12), /* firmware update warning */ |
387 | ATA_HORKAGE_1_5_GBPS = (1 << 13), /* force 1.5 Gbps */ | 387 | ATA_HORKAGE_1_5_GBPS = (1 << 13), /* force 1.5 Gbps */ |
388 | ATA_HORKAGE_NOSETXFER = (1 << 14), /* skip SETXFER, SATA only */ | ||
388 | 389 | ||
389 | /* DMA mask for user DMA control: User visible values; DO NOT | 390 | /* DMA mask for user DMA control: User visible values; DO NOT |
390 | renumber */ | 391 | renumber */ |
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index b47b3f039d14..f2c69a2cca17 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -1342,12 +1342,12 @@ static inline int skb_network_offset(const struct sk_buff *skb) | |||
1342 | * shifting the start of the packet by 2 bytes. Drivers should do this | 1342 | * shifting the start of the packet by 2 bytes. Drivers should do this |
1343 | * with: | 1343 | * with: |
1344 | * | 1344 | * |
1345 | * skb_reserve(NET_IP_ALIGN); | 1345 | * skb_reserve(skb, NET_IP_ALIGN); |
1346 | * | 1346 | * |
1347 | * The downside to this alignment of the IP header is that the DMA is now | 1347 | * The downside to this alignment of the IP header is that the DMA is now |
1348 | * unaligned. On some architectures the cost of an unaligned DMA is high | 1348 | * unaligned. On some architectures the cost of an unaligned DMA is high |
1349 | * and this cost outweighs the gains made by aligning the IP header. | 1349 | * and this cost outweighs the gains made by aligning the IP header. |
1350 | * | 1350 | * |
1351 | * Since this trade off varies between architectures, we allow NET_IP_ALIGN | 1351 | * Since this trade off varies between architectures, we allow NET_IP_ALIGN |
1352 | * to be overridden. | 1352 | * to be overridden. |
1353 | */ | 1353 | */ |
diff --git a/include/linux/virtio_net.h b/include/linux/virtio_net.h index cec79adbe3ea..9c543d6ac535 100644 --- a/include/linux/virtio_net.h +++ b/include/linux/virtio_net.h | |||
@@ -27,6 +27,7 @@ | |||
27 | #define VIRTIO_NET_F_CTRL_VQ 17 /* Control channel available */ | 27 | #define VIRTIO_NET_F_CTRL_VQ 17 /* Control channel available */ |
28 | #define VIRTIO_NET_F_CTRL_RX 18 /* Control channel RX mode support */ | 28 | #define VIRTIO_NET_F_CTRL_RX 18 /* Control channel RX mode support */ |
29 | #define VIRTIO_NET_F_CTRL_VLAN 19 /* Control channel VLAN filtering */ | 29 | #define VIRTIO_NET_F_CTRL_VLAN 19 /* Control channel VLAN filtering */ |
30 | #define VIRTIO_NET_F_CTRL_RX_EXTRA 20 /* Extra RX mode control support */ | ||
30 | 31 | ||
31 | #define VIRTIO_NET_S_LINK_UP 1 /* Link is up */ | 32 | #define VIRTIO_NET_S_LINK_UP 1 /* Link is up */ |
32 | 33 | ||
@@ -81,14 +82,19 @@ typedef __u8 virtio_net_ctrl_ack; | |||
81 | #define VIRTIO_NET_ERR 1 | 82 | #define VIRTIO_NET_ERR 1 |
82 | 83 | ||
83 | /* | 84 | /* |
84 | * Control the RX mode, ie. promisucous and allmulti. PROMISC and | 85 | * Control the RX mode, ie. promisucous, allmulti, etc... |
85 | * ALLMULTI commands require an "out" sg entry containing a 1 byte | 86 | * All commands require an "out" sg entry containing a 1 byte |
86 | * state value, zero = disable, non-zero = enable. These commands | 87 | * state value, zero = disable, non-zero = enable. Commands |
87 | * are supported with the VIRTIO_NET_F_CTRL_RX feature. | 88 | * 0 and 1 are supported with the VIRTIO_NET_F_CTRL_RX feature. |
89 | * Commands 2-5 are added with VIRTIO_NET_F_CTRL_RX_EXTRA. | ||
88 | */ | 90 | */ |
89 | #define VIRTIO_NET_CTRL_RX 0 | 91 | #define VIRTIO_NET_CTRL_RX 0 |
90 | #define VIRTIO_NET_CTRL_RX_PROMISC 0 | 92 | #define VIRTIO_NET_CTRL_RX_PROMISC 0 |
91 | #define VIRTIO_NET_CTRL_RX_ALLMULTI 1 | 93 | #define VIRTIO_NET_CTRL_RX_ALLMULTI 1 |
94 | #define VIRTIO_NET_CTRL_RX_ALLUNI 2 | ||
95 | #define VIRTIO_NET_CTRL_RX_NOMULTI 3 | ||
96 | #define VIRTIO_NET_CTRL_RX_NOUNI 4 | ||
97 | #define VIRTIO_NET_CTRL_RX_NOBCAST 5 | ||
92 | 98 | ||
93 | /* | 99 | /* |
94 | * Control the MAC filter table. | 100 | * Control the MAC filter table. |
diff --git a/include/trace/events/block.h b/include/trace/events/block.h index d6b05f42dd44..9a74b468a229 100644 --- a/include/trace/events/block.h +++ b/include/trace/events/block.h | |||
@@ -1,3 +1,6 @@ | |||
1 | #undef TRACE_SYSTEM | ||
2 | #define TRACE_SYSTEM block | ||
3 | |||
1 | #if !defined(_TRACE_BLOCK_H) || defined(TRACE_HEADER_MULTI_READ) | 4 | #if !defined(_TRACE_BLOCK_H) || defined(TRACE_HEADER_MULTI_READ) |
2 | #define _TRACE_BLOCK_H | 5 | #define _TRACE_BLOCK_H |
3 | 6 | ||
@@ -5,9 +8,6 @@ | |||
5 | #include <linux/blkdev.h> | 8 | #include <linux/blkdev.h> |
6 | #include <linux/tracepoint.h> | 9 | #include <linux/tracepoint.h> |
7 | 10 | ||
8 | #undef TRACE_SYSTEM | ||
9 | #define TRACE_SYSTEM block | ||
10 | |||
11 | TRACE_EVENT(block_rq_abort, | 11 | TRACE_EVENT(block_rq_abort, |
12 | 12 | ||
13 | TP_PROTO(struct request_queue *q, struct request *rq), | 13 | TP_PROTO(struct request_queue *q, struct request *rq), |
diff --git a/include/trace/events/ext4.h b/include/trace/events/ext4.h index dfbc9b0edc88..7d8b5bc74185 100644 --- a/include/trace/events/ext4.h +++ b/include/trace/events/ext4.h | |||
@@ -1,9 +1,9 @@ | |||
1 | #if !defined(_TRACE_EXT4_H) || defined(TRACE_HEADER_MULTI_READ) | ||
2 | #define _TRACE_EXT4_H | ||
3 | |||
4 | #undef TRACE_SYSTEM | 1 | #undef TRACE_SYSTEM |
5 | #define TRACE_SYSTEM ext4 | 2 | #define TRACE_SYSTEM ext4 |
6 | 3 | ||
4 | #if !defined(_TRACE_EXT4_H) || defined(TRACE_HEADER_MULTI_READ) | ||
5 | #define _TRACE_EXT4_H | ||
6 | |||
7 | #include <linux/writeback.h> | 7 | #include <linux/writeback.h> |
8 | #include "../../../fs/ext4/ext4.h" | 8 | #include "../../../fs/ext4/ext4.h" |
9 | #include "../../../fs/ext4/mballoc.h" | 9 | #include "../../../fs/ext4/mballoc.h" |
diff --git a/include/trace/events/irq.h b/include/trace/events/irq.h index b0c7ede55eb1..1cb0c3aa11e6 100644 --- a/include/trace/events/irq.h +++ b/include/trace/events/irq.h | |||
@@ -1,12 +1,12 @@ | |||
1 | #undef TRACE_SYSTEM | ||
2 | #define TRACE_SYSTEM irq | ||
3 | |||
1 | #if !defined(_TRACE_IRQ_H) || defined(TRACE_HEADER_MULTI_READ) | 4 | #if !defined(_TRACE_IRQ_H) || defined(TRACE_HEADER_MULTI_READ) |
2 | #define _TRACE_IRQ_H | 5 | #define _TRACE_IRQ_H |
3 | 6 | ||
4 | #include <linux/tracepoint.h> | 7 | #include <linux/tracepoint.h> |
5 | #include <linux/interrupt.h> | 8 | #include <linux/interrupt.h> |
6 | 9 | ||
7 | #undef TRACE_SYSTEM | ||
8 | #define TRACE_SYSTEM irq | ||
9 | |||
10 | #define softirq_name(sirq) { sirq##_SOFTIRQ, #sirq } | 10 | #define softirq_name(sirq) { sirq##_SOFTIRQ, #sirq } |
11 | #define show_softirq_name(val) \ | 11 | #define show_softirq_name(val) \ |
12 | __print_symbolic(val, \ | 12 | __print_symbolic(val, \ |
diff --git a/include/trace/events/jbd2.h b/include/trace/events/jbd2.h index 845b0b4b48fd..10813fa0c8d0 100644 --- a/include/trace/events/jbd2.h +++ b/include/trace/events/jbd2.h | |||
@@ -1,12 +1,12 @@ | |||
1 | #undef TRACE_SYSTEM | ||
2 | #define TRACE_SYSTEM jbd2 | ||
3 | |||
1 | #if !defined(_TRACE_JBD2_H) || defined(TRACE_HEADER_MULTI_READ) | 4 | #if !defined(_TRACE_JBD2_H) || defined(TRACE_HEADER_MULTI_READ) |
2 | #define _TRACE_JBD2_H | 5 | #define _TRACE_JBD2_H |
3 | 6 | ||
4 | #include <linux/jbd2.h> | 7 | #include <linux/jbd2.h> |
5 | #include <linux/tracepoint.h> | 8 | #include <linux/tracepoint.h> |
6 | 9 | ||
7 | #undef TRACE_SYSTEM | ||
8 | #define TRACE_SYSTEM jbd2 | ||
9 | |||
10 | TRACE_EVENT(jbd2_checkpoint, | 10 | TRACE_EVENT(jbd2_checkpoint, |
11 | 11 | ||
12 | TP_PROTO(journal_t *journal, int result), | 12 | TP_PROTO(journal_t *journal, int result), |
diff --git a/include/trace/events/kmem.h b/include/trace/events/kmem.h index 9baba50d6512..1493c541f9c4 100644 --- a/include/trace/events/kmem.h +++ b/include/trace/events/kmem.h | |||
@@ -1,12 +1,12 @@ | |||
1 | #undef TRACE_SYSTEM | ||
2 | #define TRACE_SYSTEM kmem | ||
3 | |||
1 | #if !defined(_TRACE_KMEM_H) || defined(TRACE_HEADER_MULTI_READ) | 4 | #if !defined(_TRACE_KMEM_H) || defined(TRACE_HEADER_MULTI_READ) |
2 | #define _TRACE_KMEM_H | 5 | #define _TRACE_KMEM_H |
3 | 6 | ||
4 | #include <linux/types.h> | 7 | #include <linux/types.h> |
5 | #include <linux/tracepoint.h> | 8 | #include <linux/tracepoint.h> |
6 | 9 | ||
7 | #undef TRACE_SYSTEM | ||
8 | #define TRACE_SYSTEM kmem | ||
9 | |||
10 | /* | 10 | /* |
11 | * The order of these masks is important. Matching masks will be seen | 11 | * The order of these masks is important. Matching masks will be seen |
12 | * first and the left over flags will end up showing by themselves. | 12 | * first and the left over flags will end up showing by themselves. |
diff --git a/include/trace/events/lockdep.h b/include/trace/events/lockdep.h index 0e956c9dfd7e..bcf1d209a00d 100644 --- a/include/trace/events/lockdep.h +++ b/include/trace/events/lockdep.h | |||
@@ -1,12 +1,12 @@ | |||
1 | #undef TRACE_SYSTEM | ||
2 | #define TRACE_SYSTEM lockdep | ||
3 | |||
1 | #if !defined(_TRACE_LOCKDEP_H) || defined(TRACE_HEADER_MULTI_READ) | 4 | #if !defined(_TRACE_LOCKDEP_H) || defined(TRACE_HEADER_MULTI_READ) |
2 | #define _TRACE_LOCKDEP_H | 5 | #define _TRACE_LOCKDEP_H |
3 | 6 | ||
4 | #include <linux/lockdep.h> | 7 | #include <linux/lockdep.h> |
5 | #include <linux/tracepoint.h> | 8 | #include <linux/tracepoint.h> |
6 | 9 | ||
7 | #undef TRACE_SYSTEM | ||
8 | #define TRACE_SYSTEM lockdep | ||
9 | |||
10 | #ifdef CONFIG_LOCKDEP | 10 | #ifdef CONFIG_LOCKDEP |
11 | 11 | ||
12 | TRACE_EVENT(lock_acquire, | 12 | TRACE_EVENT(lock_acquire, |
diff --git a/include/trace/events/sched.h b/include/trace/events/sched.h index 24ab5bcff7b2..8949bb7eb082 100644 --- a/include/trace/events/sched.h +++ b/include/trace/events/sched.h | |||
@@ -1,12 +1,12 @@ | |||
1 | #undef TRACE_SYSTEM | ||
2 | #define TRACE_SYSTEM sched | ||
3 | |||
1 | #if !defined(_TRACE_SCHED_H) || defined(TRACE_HEADER_MULTI_READ) | 4 | #if !defined(_TRACE_SCHED_H) || defined(TRACE_HEADER_MULTI_READ) |
2 | #define _TRACE_SCHED_H | 5 | #define _TRACE_SCHED_H |
3 | 6 | ||
4 | #include <linux/sched.h> | 7 | #include <linux/sched.h> |
5 | #include <linux/tracepoint.h> | 8 | #include <linux/tracepoint.h> |
6 | 9 | ||
7 | #undef TRACE_SYSTEM | ||
8 | #define TRACE_SYSTEM sched | ||
9 | |||
10 | /* | 10 | /* |
11 | * Tracepoint for calling kthread_stop, performed to end a kthread: | 11 | * Tracepoint for calling kthread_stop, performed to end a kthread: |
12 | */ | 12 | */ |
diff --git a/include/trace/events/skb.h b/include/trace/events/skb.h index 1e8fabb57c06..e499863b9669 100644 --- a/include/trace/events/skb.h +++ b/include/trace/events/skb.h | |||
@@ -1,12 +1,12 @@ | |||
1 | #undef TRACE_SYSTEM | ||
2 | #define TRACE_SYSTEM skb | ||
3 | |||
1 | #if !defined(_TRACE_SKB_H) || defined(TRACE_HEADER_MULTI_READ) | 4 | #if !defined(_TRACE_SKB_H) || defined(TRACE_HEADER_MULTI_READ) |
2 | #define _TRACE_SKB_H | 5 | #define _TRACE_SKB_H |
3 | 6 | ||
4 | #include <linux/skbuff.h> | 7 | #include <linux/skbuff.h> |
5 | #include <linux/tracepoint.h> | 8 | #include <linux/tracepoint.h> |
6 | 9 | ||
7 | #undef TRACE_SYSTEM | ||
8 | #define TRACE_SYSTEM skb | ||
9 | |||
10 | /* | 10 | /* |
11 | * Tracepoint for free an sk_buff: | 11 | * Tracepoint for free an sk_buff: |
12 | */ | 12 | */ |
diff --git a/include/trace/events/workqueue.h b/include/trace/events/workqueue.h index 035f1bff288e..fcfd9a1e4b96 100644 --- a/include/trace/events/workqueue.h +++ b/include/trace/events/workqueue.h | |||
@@ -1,3 +1,6 @@ | |||
1 | #undef TRACE_SYSTEM | ||
2 | #define TRACE_SYSTEM workqueue | ||
3 | |||
1 | #if !defined(_TRACE_WORKQUEUE_H) || defined(TRACE_HEADER_MULTI_READ) | 4 | #if !defined(_TRACE_WORKQUEUE_H) || defined(TRACE_HEADER_MULTI_READ) |
2 | #define _TRACE_WORKQUEUE_H | 5 | #define _TRACE_WORKQUEUE_H |
3 | 6 | ||
@@ -5,9 +8,6 @@ | |||
5 | #include <linux/sched.h> | 8 | #include <linux/sched.h> |
6 | #include <linux/tracepoint.h> | 9 | #include <linux/tracepoint.h> |
7 | 10 | ||
8 | #undef TRACE_SYSTEM | ||
9 | #define TRACE_SYSTEM workqueue | ||
10 | |||
11 | TRACE_EVENT(workqueue_insertion, | 11 | TRACE_EVENT(workqueue_insertion, |
12 | 12 | ||
13 | TP_PROTO(struct task_struct *wq_thread, struct work_struct *work), | 13 | TP_PROTO(struct task_struct *wq_thread, struct work_struct *work), |
diff --git a/kernel/futex.c b/kernel/futex.c index 794c862125fe..0672ff88f159 100644 --- a/kernel/futex.c +++ b/kernel/futex.c | |||
@@ -247,6 +247,7 @@ again: | |||
247 | if (err < 0) | 247 | if (err < 0) |
248 | return err; | 248 | return err; |
249 | 249 | ||
250 | page = compound_head(page); | ||
250 | lock_page(page); | 251 | lock_page(page); |
251 | if (!page->mapping) { | 252 | if (!page->mapping) { |
252 | unlock_page(page); | 253 | unlock_page(page); |
diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c index 9002958a96e7..49da79ab8486 100644 --- a/kernel/hrtimer.c +++ b/kernel/hrtimer.c | |||
@@ -191,6 +191,46 @@ struct hrtimer_clock_base *lock_hrtimer_base(const struct hrtimer *timer, | |||
191 | } | 191 | } |
192 | } | 192 | } |
193 | 193 | ||
194 | |||
195 | /* | ||
196 | * Get the preferred target CPU for NOHZ | ||
197 | */ | ||
198 | static int hrtimer_get_target(int this_cpu, int pinned) | ||
199 | { | ||
200 | #ifdef CONFIG_NO_HZ | ||
201 | if (!pinned && get_sysctl_timer_migration() && idle_cpu(this_cpu)) { | ||
202 | int preferred_cpu = get_nohz_load_balancer(); | ||
203 | |||
204 | if (preferred_cpu >= 0) | ||
205 | return preferred_cpu; | ||
206 | } | ||
207 | #endif | ||
208 | return this_cpu; | ||
209 | } | ||
210 | |||
211 | /* | ||
212 | * With HIGHRES=y we do not migrate the timer when it is expiring | ||
213 | * before the next event on the target cpu because we cannot reprogram | ||
214 | * the target cpu hardware and we would cause it to fire late. | ||
215 | * | ||
216 | * Called with cpu_base->lock of target cpu held. | ||
217 | */ | ||
218 | static int | ||
219 | hrtimer_check_target(struct hrtimer *timer, struct hrtimer_clock_base *new_base) | ||
220 | { | ||
221 | #ifdef CONFIG_HIGH_RES_TIMERS | ||
222 | ktime_t expires; | ||
223 | |||
224 | if (!new_base->cpu_base->hres_active) | ||
225 | return 0; | ||
226 | |||
227 | expires = ktime_sub(hrtimer_get_expires(timer), new_base->offset); | ||
228 | return expires.tv64 <= new_base->cpu_base->expires_next.tv64; | ||
229 | #else | ||
230 | return 0; | ||
231 | #endif | ||
232 | } | ||
233 | |||
194 | /* | 234 | /* |
195 | * Switch the timer base to the current CPU when possible. | 235 | * Switch the timer base to the current CPU when possible. |
196 | */ | 236 | */ |
@@ -200,16 +240,8 @@ switch_hrtimer_base(struct hrtimer *timer, struct hrtimer_clock_base *base, | |||
200 | { | 240 | { |
201 | struct hrtimer_clock_base *new_base; | 241 | struct hrtimer_clock_base *new_base; |
202 | struct hrtimer_cpu_base *new_cpu_base; | 242 | struct hrtimer_cpu_base *new_cpu_base; |
203 | int cpu, preferred_cpu = -1; | 243 | int this_cpu = smp_processor_id(); |
204 | 244 | int cpu = hrtimer_get_target(this_cpu, pinned); | |
205 | cpu = smp_processor_id(); | ||
206 | #if defined(CONFIG_NO_HZ) && defined(CONFIG_SMP) | ||
207 | if (!pinned && get_sysctl_timer_migration() && idle_cpu(cpu)) { | ||
208 | preferred_cpu = get_nohz_load_balancer(); | ||
209 | if (preferred_cpu >= 0) | ||
210 | cpu = preferred_cpu; | ||
211 | } | ||
212 | #endif | ||
213 | 245 | ||
214 | again: | 246 | again: |
215 | new_cpu_base = &per_cpu(hrtimer_bases, cpu); | 247 | new_cpu_base = &per_cpu(hrtimer_bases, cpu); |
@@ -217,7 +249,7 @@ again: | |||
217 | 249 | ||
218 | if (base != new_base) { | 250 | if (base != new_base) { |
219 | /* | 251 | /* |
220 | * We are trying to schedule the timer on the local CPU. | 252 | * We are trying to move timer to new_base. |
221 | * However we can't change timer's base while it is running, | 253 | * However we can't change timer's base while it is running, |
222 | * so we keep it on the same CPU. No hassle vs. reprogramming | 254 | * so we keep it on the same CPU. No hassle vs. reprogramming |
223 | * the event source in the high resolution case. The softirq | 255 | * the event source in the high resolution case. The softirq |
@@ -233,38 +265,12 @@ again: | |||
233 | spin_unlock(&base->cpu_base->lock); | 265 | spin_unlock(&base->cpu_base->lock); |
234 | spin_lock(&new_base->cpu_base->lock); | 266 | spin_lock(&new_base->cpu_base->lock); |
235 | 267 | ||
236 | /* Optimized away for NOHZ=n SMP=n */ | 268 | if (cpu != this_cpu && hrtimer_check_target(timer, new_base)) { |
237 | if (cpu == preferred_cpu) { | 269 | cpu = this_cpu; |
238 | /* Calculate clock monotonic expiry time */ | 270 | spin_unlock(&new_base->cpu_base->lock); |
239 | #ifdef CONFIG_HIGH_RES_TIMERS | 271 | spin_lock(&base->cpu_base->lock); |
240 | ktime_t expires = ktime_sub(hrtimer_get_expires(timer), | 272 | timer->base = base; |
241 | new_base->offset); | 273 | goto again; |
242 | #else | ||
243 | ktime_t expires = hrtimer_get_expires(timer); | ||
244 | #endif | ||
245 | |||
246 | /* | ||
247 | * Get the next event on target cpu from the | ||
248 | * clock events layer. | ||
249 | * This covers the highres=off nohz=on case as well. | ||
250 | */ | ||
251 | ktime_t next = clockevents_get_next_event(cpu); | ||
252 | |||
253 | ktime_t delta = ktime_sub(expires, next); | ||
254 | |||
255 | /* | ||
256 | * We do not migrate the timer when it is expiring | ||
257 | * before the next event on the target cpu because | ||
258 | * we cannot reprogram the target cpu hardware and | ||
259 | * we would cause it to fire late. | ||
260 | */ | ||
261 | if (delta.tv64 < 0) { | ||
262 | cpu = smp_processor_id(); | ||
263 | spin_unlock(&new_base->cpu_base->lock); | ||
264 | spin_lock(&base->cpu_base->lock); | ||
265 | timer->base = base; | ||
266 | goto again; | ||
267 | } | ||
268 | } | 274 | } |
269 | timer->base = new_base; | 275 | timer->base = new_base; |
270 | } | 276 | } |
@@ -1276,14 +1282,22 @@ void hrtimer_interrupt(struct clock_event_device *dev) | |||
1276 | 1282 | ||
1277 | expires_next.tv64 = KTIME_MAX; | 1283 | expires_next.tv64 = KTIME_MAX; |
1278 | 1284 | ||
1285 | spin_lock(&cpu_base->lock); | ||
1286 | /* | ||
1287 | * We set expires_next to KTIME_MAX here with cpu_base->lock | ||
1288 | * held to prevent that a timer is enqueued in our queue via | ||
1289 | * the migration code. This does not affect enqueueing of | ||
1290 | * timers which run their callback and need to be requeued on | ||
1291 | * this CPU. | ||
1292 | */ | ||
1293 | cpu_base->expires_next.tv64 = KTIME_MAX; | ||
1294 | |||
1279 | base = cpu_base->clock_base; | 1295 | base = cpu_base->clock_base; |
1280 | 1296 | ||
1281 | for (i = 0; i < HRTIMER_MAX_CLOCK_BASES; i++) { | 1297 | for (i = 0; i < HRTIMER_MAX_CLOCK_BASES; i++) { |
1282 | ktime_t basenow; | 1298 | ktime_t basenow; |
1283 | struct rb_node *node; | 1299 | struct rb_node *node; |
1284 | 1300 | ||
1285 | spin_lock(&cpu_base->lock); | ||
1286 | |||
1287 | basenow = ktime_add(now, base->offset); | 1301 | basenow = ktime_add(now, base->offset); |
1288 | 1302 | ||
1289 | while ((node = base->first)) { | 1303 | while ((node = base->first)) { |
@@ -1316,11 +1330,15 @@ void hrtimer_interrupt(struct clock_event_device *dev) | |||
1316 | 1330 | ||
1317 | __run_hrtimer(timer); | 1331 | __run_hrtimer(timer); |
1318 | } | 1332 | } |
1319 | spin_unlock(&cpu_base->lock); | ||
1320 | base++; | 1333 | base++; |
1321 | } | 1334 | } |
1322 | 1335 | ||
1336 | /* | ||
1337 | * Store the new expiry value so the migration code can verify | ||
1338 | * against it. | ||
1339 | */ | ||
1323 | cpu_base->expires_next = expires_next; | 1340 | cpu_base->expires_next = expires_next; |
1341 | spin_unlock(&cpu_base->lock); | ||
1324 | 1342 | ||
1325 | /* Reprogramming necessary ? */ | 1343 | /* Reprogramming necessary ? */ |
1326 | if (expires_next.tv64 != KTIME_MAX) { | 1344 | if (expires_next.tv64 != KTIME_MAX) { |
diff --git a/kernel/sched.c b/kernel/sched.c index 01f55ada3598..98972d366fdc 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -493,6 +493,7 @@ struct rt_rq { | |||
493 | #endif | 493 | #endif |
494 | #ifdef CONFIG_SMP | 494 | #ifdef CONFIG_SMP |
495 | unsigned long rt_nr_migratory; | 495 | unsigned long rt_nr_migratory; |
496 | unsigned long rt_nr_total; | ||
496 | int overloaded; | 497 | int overloaded; |
497 | struct plist_head pushable_tasks; | 498 | struct plist_head pushable_tasks; |
498 | #endif | 499 | #endif |
@@ -2571,15 +2572,37 @@ static void __sched_fork(struct task_struct *p) | |||
2571 | p->se.avg_wakeup = sysctl_sched_wakeup_granularity; | 2572 | p->se.avg_wakeup = sysctl_sched_wakeup_granularity; |
2572 | 2573 | ||
2573 | #ifdef CONFIG_SCHEDSTATS | 2574 | #ifdef CONFIG_SCHEDSTATS |
2574 | p->se.wait_start = 0; | 2575 | p->se.wait_start = 0; |
2575 | p->se.sum_sleep_runtime = 0; | 2576 | p->se.wait_max = 0; |
2576 | p->se.sleep_start = 0; | 2577 | p->se.wait_count = 0; |
2577 | p->se.block_start = 0; | 2578 | p->se.wait_sum = 0; |
2578 | p->se.sleep_max = 0; | 2579 | |
2579 | p->se.block_max = 0; | 2580 | p->se.sleep_start = 0; |
2580 | p->se.exec_max = 0; | 2581 | p->se.sleep_max = 0; |
2581 | p->se.slice_max = 0; | 2582 | p->se.sum_sleep_runtime = 0; |
2582 | p->se.wait_max = 0; | 2583 | |
2584 | p->se.block_start = 0; | ||
2585 | p->se.block_max = 0; | ||
2586 | p->se.exec_max = 0; | ||
2587 | p->se.slice_max = 0; | ||
2588 | |||
2589 | p->se.nr_migrations_cold = 0; | ||
2590 | p->se.nr_failed_migrations_affine = 0; | ||
2591 | p->se.nr_failed_migrations_running = 0; | ||
2592 | p->se.nr_failed_migrations_hot = 0; | ||
2593 | p->se.nr_forced_migrations = 0; | ||
2594 | p->se.nr_forced2_migrations = 0; | ||
2595 | |||
2596 | p->se.nr_wakeups = 0; | ||
2597 | p->se.nr_wakeups_sync = 0; | ||
2598 | p->se.nr_wakeups_migrate = 0; | ||
2599 | p->se.nr_wakeups_local = 0; | ||
2600 | p->se.nr_wakeups_remote = 0; | ||
2601 | p->se.nr_wakeups_affine = 0; | ||
2602 | p->se.nr_wakeups_affine_attempts = 0; | ||
2603 | p->se.nr_wakeups_passive = 0; | ||
2604 | p->se.nr_wakeups_idle = 0; | ||
2605 | |||
2583 | #endif | 2606 | #endif |
2584 | 2607 | ||
2585 | INIT_LIST_HEAD(&p->rt.run_list); | 2608 | INIT_LIST_HEAD(&p->rt.run_list); |
@@ -9074,7 +9097,7 @@ static void init_rt_rq(struct rt_rq *rt_rq, struct rq *rq) | |||
9074 | #ifdef CONFIG_SMP | 9097 | #ifdef CONFIG_SMP |
9075 | rt_rq->rt_nr_migratory = 0; | 9098 | rt_rq->rt_nr_migratory = 0; |
9076 | rt_rq->overloaded = 0; | 9099 | rt_rq->overloaded = 0; |
9077 | plist_head_init(&rq->rt.pushable_tasks, &rq->lock); | 9100 | plist_head_init(&rt_rq->pushable_tasks, &rq->lock); |
9078 | #endif | 9101 | #endif |
9079 | 9102 | ||
9080 | rt_rq->rt_time = 0; | 9103 | rt_rq->rt_time = 0; |
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c index ba7fd6e9556f..7c248dc30f41 100644 --- a/kernel/sched_fair.c +++ b/kernel/sched_fair.c | |||
@@ -687,7 +687,8 @@ place_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int initial) | |||
687 | * all of which have the same weight. | 687 | * all of which have the same weight. |
688 | */ | 688 | */ |
689 | if (sched_feat(NORMALIZED_SLEEPER) && | 689 | if (sched_feat(NORMALIZED_SLEEPER) && |
690 | task_of(se)->policy != SCHED_IDLE) | 690 | (!entity_is_task(se) || |
691 | task_of(se)->policy != SCHED_IDLE)) | ||
691 | thresh = calc_delta_fair(thresh, se); | 692 | thresh = calc_delta_fair(thresh, se); |
692 | 693 | ||
693 | vruntime -= thresh; | 694 | vruntime -= thresh; |
diff --git a/kernel/sched_rt.c b/kernel/sched_rt.c index 9bf0d2a73045..3918e01994e0 100644 --- a/kernel/sched_rt.c +++ b/kernel/sched_rt.c | |||
@@ -10,6 +10,8 @@ static inline struct task_struct *rt_task_of(struct sched_rt_entity *rt_se) | |||
10 | 10 | ||
11 | #ifdef CONFIG_RT_GROUP_SCHED | 11 | #ifdef CONFIG_RT_GROUP_SCHED |
12 | 12 | ||
13 | #define rt_entity_is_task(rt_se) (!(rt_se)->my_q) | ||
14 | |||
13 | static inline struct rq *rq_of_rt_rq(struct rt_rq *rt_rq) | 15 | static inline struct rq *rq_of_rt_rq(struct rt_rq *rt_rq) |
14 | { | 16 | { |
15 | return rt_rq->rq; | 17 | return rt_rq->rq; |
@@ -22,6 +24,8 @@ static inline struct rt_rq *rt_rq_of_se(struct sched_rt_entity *rt_se) | |||
22 | 24 | ||
23 | #else /* CONFIG_RT_GROUP_SCHED */ | 25 | #else /* CONFIG_RT_GROUP_SCHED */ |
24 | 26 | ||
27 | #define rt_entity_is_task(rt_se) (1) | ||
28 | |||
25 | static inline struct rq *rq_of_rt_rq(struct rt_rq *rt_rq) | 29 | static inline struct rq *rq_of_rt_rq(struct rt_rq *rt_rq) |
26 | { | 30 | { |
27 | return container_of(rt_rq, struct rq, rt); | 31 | return container_of(rt_rq, struct rq, rt); |
@@ -73,7 +77,7 @@ static inline void rt_clear_overload(struct rq *rq) | |||
73 | 77 | ||
74 | static void update_rt_migration(struct rt_rq *rt_rq) | 78 | static void update_rt_migration(struct rt_rq *rt_rq) |
75 | { | 79 | { |
76 | if (rt_rq->rt_nr_migratory && (rt_rq->rt_nr_running > 1)) { | 80 | if (rt_rq->rt_nr_migratory && rt_rq->rt_nr_total > 1) { |
77 | if (!rt_rq->overloaded) { | 81 | if (!rt_rq->overloaded) { |
78 | rt_set_overload(rq_of_rt_rq(rt_rq)); | 82 | rt_set_overload(rq_of_rt_rq(rt_rq)); |
79 | rt_rq->overloaded = 1; | 83 | rt_rq->overloaded = 1; |
@@ -86,6 +90,12 @@ static void update_rt_migration(struct rt_rq *rt_rq) | |||
86 | 90 | ||
87 | static void inc_rt_migration(struct sched_rt_entity *rt_se, struct rt_rq *rt_rq) | 91 | static void inc_rt_migration(struct sched_rt_entity *rt_se, struct rt_rq *rt_rq) |
88 | { | 92 | { |
93 | if (!rt_entity_is_task(rt_se)) | ||
94 | return; | ||
95 | |||
96 | rt_rq = &rq_of_rt_rq(rt_rq)->rt; | ||
97 | |||
98 | rt_rq->rt_nr_total++; | ||
89 | if (rt_se->nr_cpus_allowed > 1) | 99 | if (rt_se->nr_cpus_allowed > 1) |
90 | rt_rq->rt_nr_migratory++; | 100 | rt_rq->rt_nr_migratory++; |
91 | 101 | ||
@@ -94,6 +104,12 @@ static void inc_rt_migration(struct sched_rt_entity *rt_se, struct rt_rq *rt_rq) | |||
94 | 104 | ||
95 | static void dec_rt_migration(struct sched_rt_entity *rt_se, struct rt_rq *rt_rq) | 105 | static void dec_rt_migration(struct sched_rt_entity *rt_se, struct rt_rq *rt_rq) |
96 | { | 106 | { |
107 | if (!rt_entity_is_task(rt_se)) | ||
108 | return; | ||
109 | |||
110 | rt_rq = &rq_of_rt_rq(rt_rq)->rt; | ||
111 | |||
112 | rt_rq->rt_nr_total--; | ||
97 | if (rt_se->nr_cpus_allowed > 1) | 113 | if (rt_se->nr_cpus_allowed > 1) |
98 | rt_rq->rt_nr_migratory--; | 114 | rt_rq->rt_nr_migratory--; |
99 | 115 | ||
diff --git a/kernel/time/clockevents.c b/kernel/time/clockevents.c index 1ad6dd461119..a6dcd67b041d 100644 --- a/kernel/time/clockevents.c +++ b/kernel/time/clockevents.c | |||
@@ -254,15 +254,4 @@ void clockevents_notify(unsigned long reason, void *arg) | |||
254 | spin_unlock(&clockevents_lock); | 254 | spin_unlock(&clockevents_lock); |
255 | } | 255 | } |
256 | EXPORT_SYMBOL_GPL(clockevents_notify); | 256 | EXPORT_SYMBOL_GPL(clockevents_notify); |
257 | |||
258 | ktime_t clockevents_get_next_event(int cpu) | ||
259 | { | ||
260 | struct tick_device *td; | ||
261 | struct clock_event_device *dev; | ||
262 | |||
263 | td = &per_cpu(tick_cpu_device, cpu); | ||
264 | dev = td->evtdev; | ||
265 | |||
266 | return dev->next_event; | ||
267 | } | ||
268 | #endif | 257 | #endif |
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index bce9e01a29c8..4521c77d1a1a 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c | |||
@@ -768,7 +768,7 @@ static struct tracer_stat function_stats __initdata = { | |||
768 | .stat_show = function_stat_show | 768 | .stat_show = function_stat_show |
769 | }; | 769 | }; |
770 | 770 | ||
771 | static void ftrace_profile_debugfs(struct dentry *d_tracer) | 771 | static __init void ftrace_profile_debugfs(struct dentry *d_tracer) |
772 | { | 772 | { |
773 | struct ftrace_profile_stat *stat; | 773 | struct ftrace_profile_stat *stat; |
774 | struct dentry *entry; | 774 | struct dentry *entry; |
@@ -786,7 +786,6 @@ static void ftrace_profile_debugfs(struct dentry *d_tracer) | |||
786 | * The files created are permanent, if something happens | 786 | * The files created are permanent, if something happens |
787 | * we still do not free memory. | 787 | * we still do not free memory. |
788 | */ | 788 | */ |
789 | kfree(stat); | ||
790 | WARN(1, | 789 | WARN(1, |
791 | "Could not allocate stat file for cpu %d\n", | 790 | "Could not allocate stat file for cpu %d\n", |
792 | cpu); | 791 | cpu); |
@@ -813,7 +812,7 @@ static void ftrace_profile_debugfs(struct dentry *d_tracer) | |||
813 | } | 812 | } |
814 | 813 | ||
815 | #else /* CONFIG_FUNCTION_PROFILER */ | 814 | #else /* CONFIG_FUNCTION_PROFILER */ |
816 | static void ftrace_profile_debugfs(struct dentry *d_tracer) | 815 | static __init void ftrace_profile_debugfs(struct dentry *d_tracer) |
817 | { | 816 | { |
818 | } | 817 | } |
819 | #endif /* CONFIG_FUNCTION_PROFILER */ | 818 | #endif /* CONFIG_FUNCTION_PROFILER */ |
diff --git a/kernel/trace/trace_functions.c b/kernel/trace/trace_functions.c index 7402144bff21..75ef000613c3 100644 --- a/kernel/trace/trace_functions.c +++ b/kernel/trace/trace_functions.c | |||
@@ -363,7 +363,7 @@ ftrace_trace_onoff_callback(char *glob, char *cmd, char *param, int enable) | |||
363 | out_reg: | 363 | out_reg: |
364 | ret = register_ftrace_function_probe(glob, ops, count); | 364 | ret = register_ftrace_function_probe(glob, ops, count); |
365 | 365 | ||
366 | return ret; | 366 | return ret < 0 ? ret : 0; |
367 | } | 367 | } |
368 | 368 | ||
369 | static struct ftrace_func_command ftrace_traceon_cmd = { | 369 | static struct ftrace_func_command ftrace_traceon_cmd = { |
diff --git a/net/core/sock.c b/net/core/sock.c index 6354863b1c68..ba5d2116aea1 100644 --- a/net/core/sock.c +++ b/net/core/sock.c | |||
@@ -939,8 +939,23 @@ static struct sock *sk_prot_alloc(struct proto *prot, gfp_t priority, | |||
939 | struct kmem_cache *slab; | 939 | struct kmem_cache *slab; |
940 | 940 | ||
941 | slab = prot->slab; | 941 | slab = prot->slab; |
942 | if (slab != NULL) | 942 | if (slab != NULL) { |
943 | sk = kmem_cache_alloc(slab, priority); | 943 | sk = kmem_cache_alloc(slab, priority & ~__GFP_ZERO); |
944 | if (!sk) | ||
945 | return sk; | ||
946 | if (priority & __GFP_ZERO) { | ||
947 | /* | ||
948 | * caches using SLAB_DESTROY_BY_RCU should let | ||
949 | * sk_node.next un-modified. Special care is taken | ||
950 | * when initializing object to zero. | ||
951 | */ | ||
952 | if (offsetof(struct sock, sk_node.next) != 0) | ||
953 | memset(sk, 0, offsetof(struct sock, sk_node.next)); | ||
954 | memset(&sk->sk_node.pprev, 0, | ||
955 | prot->obj_size - offsetof(struct sock, | ||
956 | sk_node.pprev)); | ||
957 | } | ||
958 | } | ||
944 | else | 959 | else |
945 | sk = kmalloc(prot->obj_size, priority); | 960 | sk = kmalloc(prot->obj_size, priority); |
946 | 961 | ||
diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c index 44e2a3d2359a..cb4a0f4bd5e5 100644 --- a/net/ipv4/ip_gre.c +++ b/net/ipv4/ip_gre.c | |||
@@ -735,10 +735,10 @@ static int ipgre_tunnel_xmit(struct sk_buff *skb, struct net_device *dev) | |||
735 | } | 735 | } |
736 | 736 | ||
737 | tos = tiph->tos; | 737 | tos = tiph->tos; |
738 | if (tos&1) { | 738 | if (tos == 1) { |
739 | tos = 0; | ||
739 | if (skb->protocol == htons(ETH_P_IP)) | 740 | if (skb->protocol == htons(ETH_P_IP)) |
740 | tos = old_iph->tos; | 741 | tos = old_iph->tos; |
741 | tos &= ~1; | ||
742 | } | 742 | } |
743 | 743 | ||
744 | { | 744 | { |
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c index 247026282669..7d0821054729 100644 --- a/net/ipv4/ip_output.c +++ b/net/ipv4/ip_output.c | |||
@@ -1243,7 +1243,6 @@ int ip_push_pending_frames(struct sock *sk) | |||
1243 | skb->len += tmp_skb->len; | 1243 | skb->len += tmp_skb->len; |
1244 | skb->data_len += tmp_skb->len; | 1244 | skb->data_len += tmp_skb->len; |
1245 | skb->truesize += tmp_skb->truesize; | 1245 | skb->truesize += tmp_skb->truesize; |
1246 | __sock_put(tmp_skb->sk); | ||
1247 | tmp_skb->destructor = NULL; | 1246 | tmp_skb->destructor = NULL; |
1248 | tmp_skb->sk = NULL; | 1247 | tmp_skb->sk = NULL; |
1249 | } | 1248 | } |
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c index 7c76e3d18215..87f8419a68fd 100644 --- a/net/ipv6/ip6_output.c +++ b/net/ipv6/ip6_output.c | |||
@@ -1484,7 +1484,6 @@ int ip6_push_pending_frames(struct sock *sk) | |||
1484 | skb->len += tmp_skb->len; | 1484 | skb->len += tmp_skb->len; |
1485 | skb->data_len += tmp_skb->len; | 1485 | skb->data_len += tmp_skb->len; |
1486 | skb->truesize += tmp_skb->truesize; | 1486 | skb->truesize += tmp_skb->truesize; |
1487 | __sock_put(tmp_skb->sk); | ||
1488 | tmp_skb->destructor = NULL; | 1487 | tmp_skb->destructor = NULL; |
1489 | tmp_skb->sk = NULL; | 1488 | tmp_skb->sk = NULL; |
1490 | } | 1489 | } |
diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c index 68e52308e552..98b7327d0949 100644 --- a/net/ipv6/sit.c +++ b/net/ipv6/sit.c | |||
@@ -1018,6 +1018,7 @@ static void ipip6_tunnel_setup(struct net_device *dev) | |||
1018 | dev->hard_header_len = LL_MAX_HEADER + sizeof(struct iphdr); | 1018 | dev->hard_header_len = LL_MAX_HEADER + sizeof(struct iphdr); |
1019 | dev->mtu = ETH_DATA_LEN - sizeof(struct iphdr); | 1019 | dev->mtu = ETH_DATA_LEN - sizeof(struct iphdr); |
1020 | dev->flags = IFF_NOARP; | 1020 | dev->flags = IFF_NOARP; |
1021 | dev->priv_flags &= ~IFF_XMIT_DST_RELEASE; | ||
1021 | dev->iflink = 0; | 1022 | dev->iflink = 0; |
1022 | dev->addr_len = 4; | 1023 | dev->addr_len = 4; |
1023 | dev->features |= NETIF_F_NETNS_LOCAL; | 1024 | dev->features |= NETIF_F_NETNS_LOCAL; |
diff --git a/samples/trace_events/trace-events-sample.h b/samples/trace_events/trace-events-sample.h index 9977a756fb32..f24ae370e514 100644 --- a/samples/trace_events/trace-events-sample.h +++ b/samples/trace_events/trace-events-sample.h | |||
@@ -1,21 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * Notice that this file is not protected like a normal header. | ||
3 | * We also must allow for rereading of this file. The | ||
4 | * | ||
5 | * || defined(TRACE_HEADER_MULTI_READ) | ||
6 | * | ||
7 | * serves this purpose. | ||
8 | */ | ||
9 | #if !defined(_TRACE_EVENT_SAMPLE_H) || defined(TRACE_HEADER_MULTI_READ) | ||
10 | #define _TRACE_EVENT_SAMPLE_H | ||
11 | |||
12 | /* | ||
13 | * All trace headers should include tracepoint.h, until we finally | ||
14 | * make it into a standard header. | ||
15 | */ | ||
16 | #include <linux/tracepoint.h> | ||
17 | |||
18 | /* | ||
19 | * If TRACE_SYSTEM is defined, that will be the directory created | 2 | * If TRACE_SYSTEM is defined, that will be the directory created |
20 | * in the ftrace directory under /debugfs/tracing/events/<system> | 3 | * in the ftrace directory under /debugfs/tracing/events/<system> |
21 | * | 4 | * |
@@ -34,11 +17,31 @@ | |||
34 | * #define TRACE_INCLUDE_FILE trace-events-sample | 17 | * #define TRACE_INCLUDE_FILE trace-events-sample |
35 | * | 18 | * |
36 | * As we do an the bottom of this file. | 19 | * As we do an the bottom of this file. |
20 | * | ||
21 | * Notice that TRACE_SYSTEM should be defined outside of #if | ||
22 | * protection, just like TRACE_INCLUDE_FILE. | ||
37 | */ | 23 | */ |
38 | #undef TRACE_SYSTEM | 24 | #undef TRACE_SYSTEM |
39 | #define TRACE_SYSTEM sample | 25 | #define TRACE_SYSTEM sample |
40 | 26 | ||
41 | /* | 27 | /* |
28 | * Notice that this file is not protected like a normal header. | ||
29 | * We also must allow for rereading of this file. The | ||
30 | * | ||
31 | * || defined(TRACE_HEADER_MULTI_READ) | ||
32 | * | ||
33 | * serves this purpose. | ||
34 | */ | ||
35 | #if !defined(_TRACE_EVENT_SAMPLE_H) || defined(TRACE_HEADER_MULTI_READ) | ||
36 | #define _TRACE_EVENT_SAMPLE_H | ||
37 | |||
38 | /* | ||
39 | * All trace headers should include tracepoint.h, until we finally | ||
40 | * make it into a standard header. | ||
41 | */ | ||
42 | #include <linux/tracepoint.h> | ||
43 | |||
44 | /* | ||
42 | * The TRACE_EVENT macro is broken up into 5 parts. | 45 | * The TRACE_EVENT macro is broken up into 5 parts. |
43 | * | 46 | * |
44 | * name: name of the trace point. This is also how to enable the tracepoint. | 47 | * name: name of the trace point. This is also how to enable the tracepoint. |