aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/scheduler/sched-rt-group.txt13
-rw-r--r--Makefile3
-rw-r--r--arch/ia64/include/asm/fpu.h2
-rw-r--r--arch/ia64/include/asm/xen/hypervisor.h1
-rw-r--r--arch/ia64/kernel/dma-mapping.c8
-rw-r--r--arch/powerpc/kernel/ptrace.c17
-rw-r--r--arch/powerpc/kernel/vector.S6
-rw-r--r--arch/x86/include/asm/io_apic.h2
-rw-r--r--arch/x86/include/asm/lguest_hcall.h2
-rw-r--r--arch/x86/kernel/apic/io_apic.c14
-rw-r--r--arch/x86/lguest/boot.c7
-rw-r--r--arch/x86/pci/i386.c7
-rw-r--r--drivers/ata/ahci.c1
-rw-r--r--drivers/ata/libata-core.c20
-rw-r--r--drivers/ata/libata-eh.c4
-rw-r--r--drivers/ata/pata_at91.c3
-rw-r--r--drivers/block/virtio_blk.c5
-rw-r--r--drivers/char/n_tty.c3
-rw-r--r--drivers/char/nozomi.c12
-rw-r--r--drivers/char/tty_ldisc.c25
-rw-r--r--drivers/char/tty_port.c2
-rw-r--r--drivers/char/vt.c12
-rw-r--r--drivers/lguest/lg.h2
-rw-r--r--drivers/net/ppp_async.c1
-rw-r--r--drivers/net/ppp_synctty.c1
-rw-r--r--drivers/serial/bfin_sport_uart.c1
-rw-r--r--drivers/serial/msm_serial.c1
-rw-r--r--drivers/virtio/virtio_pci.c2
-rw-r--r--include/linux/console_struct.h1
-rw-r--r--include/linux/hrtimer.h2
-rw-r--r--include/linux/lguest.h2
-rw-r--r--include/linux/libata.h1
-rw-r--r--include/linux/virtio_net.h14
-rw-r--r--kernel/sched.c43
-rw-r--r--kernel/sched_fair.c3
-rw-r--r--kernel/sched_rt.c18
-rw-r--r--kernel/trace/trace_functions.c2
-rw-r--r--sound/arm/pxa2xx-pcm-lib.c2
-rw-r--r--sound/pci/hda/patch_realtek.c6
-rw-r--r--sound/pci/riptide/riptide.c7
-rw-r--r--sound/usb/usbaudio.c14
41 files changed, 201 insertions, 91 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
73realtime tasks have explicitly allocated the CPU time they need to perform 73realtime tasks have explicitly allocated the CPU time they need to perform
74their tasks, buffer underruns in the graphics or audio can be eliminated. 74their tasks, buffer underruns in the graphics or audio can be eliminated.
75 75
76NOTE: the above example is not fully implemented as of yet (2.6.25). We still 76NOTE: the above example is not fully implemented yet. We still
77lack an EDF scheduler to make non-uniform periods usable. 77lack 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
143This uses the /cgroup virtual file system and "/cgroup/<cgroup>/cpu.rt_runtime_us" 143This uses the /cgroup virtual file system and
144to 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
145control group instead.
145 146
146For more information on working with control groups, you should read 147For more information on working with control groups, you should read
147Documentation/cgroups/cgroups.txt as well. 148Documentation/cgroups/cgroups.txt as well.
148 149
149Group settings are checked against the following limits in order to keep the configuration 150Group settings are checked against the following limits in order to keep the
150schedulable: 151configuration 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
189the biggest challenge as the current linux PI infrastructure is geared towards 190the biggest challenge as the current linux PI infrastructure is geared towards
190the limited static priority levels 0-99. With deadline scheduling you need to 191the limited static priority levels 0-99. With deadline scheduling you need to
191do deadline inheritance (since priority is inversely proportional to the 192do deadline inheritance (since priority is inversely proportional to the
192deadline delta (deadline - now). 193deadline delta (deadline - now)).
193 194
194This means the whole PI machinery will have to be reworked - and that is one of 195This means the whole PI machinery will have to be reworked - and that is one of
195the most complex pieces of code we have. 196the most complex pieces of code we have.
diff --git a/Makefile b/Makefile
index be0abacd042d..79957b338770 100644
--- a/Makefile
+++ b/Makefile
@@ -343,7 +343,8 @@ KBUILD_CPPFLAGS := -D__KERNEL__
343KBUILD_CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \ 343KBUILD_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
347KBUILD_AFLAGS := -D__ASSEMBLY__ 348KBUILD_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/ia64/include/asm/fpu.h b/arch/ia64/include/asm/fpu.h
index 0c26157cffa5..b6395ad1500a 100644
--- a/arch/ia64/include/asm/fpu.h
+++ b/arch/ia64/include/asm/fpu.h
@@ -6,6 +6,8 @@
6 * David Mosberger-Tang <davidm@hpl.hp.com> 6 * David Mosberger-Tang <davidm@hpl.hp.com>
7 */ 7 */
8 8
9#include <linux/types.h>
10
9/* floating point status register: */ 11/* floating point status register: */
10#define FPSR_TRAP_VD (1 << 0) /* invalid op trap disabled */ 12#define FPSR_TRAP_VD (1 << 0) /* invalid op trap disabled */
11#define FPSR_TRAP_DD (1 << 1) /* denormal trap disabled */ 13#define FPSR_TRAP_DD (1 << 1) /* denormal trap disabled */
diff --git a/arch/ia64/include/asm/xen/hypervisor.h b/arch/ia64/include/asm/xen/hypervisor.h
index e425227a418e..88afb54501e4 100644
--- a/arch/ia64/include/asm/xen/hypervisor.h
+++ b/arch/ia64/include/asm/xen/hypervisor.h
@@ -33,6 +33,7 @@
33#ifndef _ASM_IA64_XEN_HYPERVISOR_H 33#ifndef _ASM_IA64_XEN_HYPERVISOR_H
34#define _ASM_IA64_XEN_HYPERVISOR_H 34#define _ASM_IA64_XEN_HYPERVISOR_H
35 35
36#include <linux/err.h>
36#include <xen/interface/xen.h> 37#include <xen/interface/xen.h>
37#include <xen/interface/version.h> /* to compile feature.c */ 38#include <xen/interface/version.h> /* to compile feature.c */
38#include <xen/features.h> /* to comiple xen-netfront.c */ 39#include <xen/features.h> /* to comiple xen-netfront.c */
diff --git a/arch/ia64/kernel/dma-mapping.c b/arch/ia64/kernel/dma-mapping.c
index 086a2aeb0404..39a3cd0a4173 100644
--- a/arch/ia64/kernel/dma-mapping.c
+++ b/arch/ia64/kernel/dma-mapping.c
@@ -6,6 +6,14 @@ int iommu_detected __read_mostly;
6struct dma_map_ops *dma_ops; 6struct dma_map_ops *dma_ops;
7EXPORT_SYMBOL(dma_ops); 7EXPORT_SYMBOL(dma_ops);
8 8
9#define PREALLOC_DMA_DEBUG_ENTRIES (1 << 16)
10
11static int __init dma_init(void)
12{
13 dma_debug_init(PREALLOC_DMA_DEBUG_ENTRIES);
14}
15fs_initcall(dma_init);
16
9struct dma_map_ops *dma_get_ops(struct device *dev) 17struct dma_map_ops *dma_get_ops(struct device *dev)
10{ 18{
11 return dma_ops; 19 return dma_ops;
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/io_apic.h b/arch/x86/include/asm/io_apic.h
index daf866ed0612..330ee807f89e 100644
--- a/arch/x86/include/asm/io_apic.h
+++ b/arch/x86/include/asm/io_apic.h
@@ -161,6 +161,7 @@ extern int io_apic_set_pci_routing(struct device *dev, int irq,
161 struct io_apic_irq_attr *irq_attr); 161 struct io_apic_irq_attr *irq_attr);
162extern int (*ioapic_renumber_irq)(int ioapic, int irq); 162extern int (*ioapic_renumber_irq)(int ioapic, int irq);
163extern void ioapic_init_mappings(void); 163extern void ioapic_init_mappings(void);
164extern void ioapic_insert_resources(void);
164 165
165extern struct IO_APIC_route_entry **alloc_ioapic_entries(void); 166extern struct IO_APIC_route_entry **alloc_ioapic_entries(void);
166extern void free_ioapic_entries(struct IO_APIC_route_entry **ioapic_entries); 167extern void free_ioapic_entries(struct IO_APIC_route_entry **ioapic_entries);
@@ -180,6 +181,7 @@ extern void ioapic_write_entry(int apic, int pin,
180#define io_apic_assign_pci_irqs 0 181#define io_apic_assign_pci_irqs 0
181static const int timer_through_8259 = 0; 182static const int timer_through_8259 = 0;
182static inline void ioapic_init_mappings(void) { } 183static inline void ioapic_init_mappings(void) { }
184static inline void ioapic_insert_resources(void) { }
183 185
184static inline void probe_nr_irqs_gsi(void) { } 186static inline void probe_nr_irqs_gsi(void) { }
185#endif 187#endif
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/io_apic.c b/arch/x86/kernel/apic/io_apic.c
index 90b5e6efa938..2284a4812b68 100644
--- a/arch/x86/kernel/apic/io_apic.c
+++ b/arch/x86/kernel/apic/io_apic.c
@@ -4181,28 +4181,20 @@ fake_ioapic_page:
4181 } 4181 }
4182} 4182}
4183 4183
4184static int __init ioapic_insert_resources(void) 4184void __init ioapic_insert_resources(void)
4185{ 4185{
4186 int i; 4186 int i;
4187 struct resource *r = ioapic_resources; 4187 struct resource *r = ioapic_resources;
4188 4188
4189 if (!r) { 4189 if (!r) {
4190 if (nr_ioapics > 0) { 4190 if (nr_ioapics > 0)
4191 printk(KERN_ERR 4191 printk(KERN_ERR
4192 "IO APIC resources couldn't be allocated.\n"); 4192 "IO APIC resources couldn't be allocated.\n");
4193 return -1; 4193 return;
4194 }
4195 return 0;
4196 } 4194 }
4197 4195
4198 for (i = 0; i < nr_ioapics; i++) { 4196 for (i = 0; i < nr_ioapics; i++) {
4199 insert_resource(&iomem_resource, r); 4197 insert_resource(&iomem_resource, r);
4200 r++; 4198 r++;
4201 } 4199 }
4202
4203 return 0;
4204} 4200}
4205
4206/* Insert the IO APIC resources after PCI initialization has occured to handle
4207 * IO APICS that are mapped in on a BAR in PCI space. */
4208late_initcall(ioapic_insert_resources);
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/pci/i386.c b/arch/x86/pci/i386.c
index 0fb56db16d18..52e62e57fedd 100644
--- a/arch/x86/pci/i386.c
+++ b/arch/x86/pci/i386.c
@@ -35,6 +35,7 @@
35#include <asm/pat.h> 35#include <asm/pat.h>
36#include <asm/e820.h> 36#include <asm/e820.h>
37#include <asm/pci_x86.h> 37#include <asm/pci_x86.h>
38#include <asm/io_apic.h>
38 39
39 40
40static int 41static int
@@ -227,6 +228,12 @@ void __init pcibios_resource_survey(void)
227 pcibios_allocate_resources(1); 228 pcibios_allocate_resources(1);
228 229
229 e820_reserve_resources_late(); 230 e820_reserve_resources_late();
231 /*
232 * Insert the IO APIC resources after PCI initialization has
233 * occured to handle IO APICS that are mapped in on a BAR in
234 * PCI space, but before trying to assign unassigned pci res.
235 */
236 ioapic_insert_resources();
230} 237}
231 238
232/** 239/**
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
3393static int ata_dev_set_mode(struct ata_device *dev) 3393static 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:
312static int __devexit pata_at91_remove(struct platform_device *pdev) 312static 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
1332static void n_tty_write_wakeup(struct tty_struct *tty) 1332static 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;
877put:
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}
273EXPORT_SYMBOL(tty_port_block_til_ready); 273EXPORT_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, &param); 781 atomic_notifier_call_chain(&vt_notifier_list, VT_ALLOCATE, &param);
@@ -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/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
41struct lguest;
42
43struct lg_cpu { 41struct lg_cpu {
44 unsigned int id; 42 unsigned int id;
45 struct lguest *lg; 43 struct lguest *lg;
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
361static void 362static 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
402static void 403static void
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
732static struct platform_driver msm_platform_driver = { 732static 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/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
449static inline void timer_stats_account_hrtimer(struct hrtimer *timer) 449static 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. :*/
17struct lguest_data 17struct 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/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/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
13static inline struct rq *rq_of_rt_rq(struct rt_rq *rt_rq) 15static 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
25static inline struct rq *rq_of_rt_rq(struct rt_rq *rt_rq) 29static 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
74static void update_rt_migration(struct rt_rq *rt_rq) 78static 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
87static void inc_rt_migration(struct sched_rt_entity *rt_se, struct rt_rq *rt_rq) 91static 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
95static void dec_rt_migration(struct sched_rt_entity *rt_se, struct rt_rq *rt_rq) 105static 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/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
369static struct ftrace_func_command ftrace_traceon_cmd = { 369static struct ftrace_func_command ftrace_traceon_cmd = {
diff --git a/sound/arm/pxa2xx-pcm-lib.c b/sound/arm/pxa2xx-pcm-lib.c
index 108b643229ba..6205f37d547c 100644
--- a/sound/arm/pxa2xx-pcm-lib.c
+++ b/sound/arm/pxa2xx-pcm-lib.c
@@ -75,7 +75,7 @@ int __pxa2xx_pcm_hw_free(struct snd_pcm_substream *substream)
75{ 75{
76 struct pxa2xx_runtime_data *rtd = substream->runtime->private_data; 76 struct pxa2xx_runtime_data *rtd = substream->runtime->private_data;
77 77
78 if (rtd && rtd->params) 78 if (rtd && rtd->params && rtd->params->drcmr)
79 *rtd->params->drcmr = 0; 79 *rtd->params->drcmr = 0;
80 80
81 snd_pcm_set_runtime_buffer(substream, NULL); 81 snd_pcm_set_runtime_buffer(substream, NULL);
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index bbb9b42e2604..7e99763ca527 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -4505,6 +4505,12 @@ static int alc880_parse_auto_config(struct hda_codec *codec)
4505 &dig_nid, 1); 4505 &dig_nid, 1);
4506 if (err < 0) 4506 if (err < 0)
4507 continue; 4507 continue;
4508 if (dig_nid > 0x7f) {
4509 printk(KERN_ERR "alc880_auto: invalid dig_nid "
4510 "connection 0x%x for NID 0x%x\n", dig_nid,
4511 spec->autocfg.dig_out_pins[i]);
4512 continue;
4513 }
4508 if (!i) 4514 if (!i)
4509 spec->multiout.dig_out_nid = dig_nid; 4515 spec->multiout.dig_out_nid = dig_nid;
4510 else { 4516 else {
diff --git a/sound/pci/riptide/riptide.c b/sound/pci/riptide/riptide.c
index 235a71e5ac8d..b5ca02e2038c 100644
--- a/sound/pci/riptide/riptide.c
+++ b/sound/pci/riptide/riptide.c
@@ -2197,9 +2197,12 @@ static int __init alsa_card_riptide_init(void)
2197 if (err < 0) 2197 if (err < 0)
2198 return err; 2198 return err;
2199#if defined(SUPPORT_JOYSTICK) 2199#if defined(SUPPORT_JOYSTICK)
2200 pci_register_driver(&joystick_driver); 2200 err = pci_register_driver(&joystick_driver);
2201 /* On failure unregister formerly registered audio driver */
2202 if (err < 0)
2203 pci_unregister_driver(&driver);
2201#endif 2204#endif
2202 return 0; 2205 return err;
2203} 2206}
2204 2207
2205static void __exit alsa_card_riptide_exit(void) 2208static void __exit alsa_card_riptide_exit(void)
diff --git a/sound/usb/usbaudio.c b/sound/usb/usbaudio.c
index c7b902358b7b..44b9cdc8a83b 100644
--- a/sound/usb/usbaudio.c
+++ b/sound/usb/usbaudio.c
@@ -2661,7 +2661,7 @@ static int parse_audio_endpoints(struct snd_usb_audio *chip, int iface_no)
2661 struct usb_interface_descriptor *altsd; 2661 struct usb_interface_descriptor *altsd;
2662 int i, altno, err, stream; 2662 int i, altno, err, stream;
2663 int format; 2663 int format;
2664 struct audioformat *fp; 2664 struct audioformat *fp = NULL;
2665 unsigned char *fmt, *csep; 2665 unsigned char *fmt, *csep;
2666 int num; 2666 int num;
2667 2667
@@ -2734,6 +2734,18 @@ static int parse_audio_endpoints(struct snd_usb_audio *chip, int iface_no)
2734 continue; 2734 continue;
2735 } 2735 }
2736 2736
2737 /*
2738 * Blue Microphones workaround: The last altsetting is identical
2739 * with the previous one, except for a larger packet size, but
2740 * is actually a mislabeled two-channel setting; ignore it.
2741 */
2742 if (fmt[4] == 1 && fmt[5] == 2 && altno == 2 && num == 3 &&
2743 fp && fp->altsetting == 1 && fp->channels == 1 &&
2744 fp->format == SNDRV_PCM_FORMAT_S16_LE &&
2745 le16_to_cpu(get_endpoint(alts, 0)->wMaxPacketSize) ==
2746 fp->maxpacksize * 2)
2747 continue;
2748
2737 csep = snd_usb_find_desc(alts->endpoint[0].extra, alts->endpoint[0].extralen, NULL, USB_DT_CS_ENDPOINT); 2749 csep = snd_usb_find_desc(alts->endpoint[0].extra, alts->endpoint[0].extralen, NULL, USB_DT_CS_ENDPOINT);
2738 /* Creamware Noah has this descriptor after the 2nd endpoint */ 2750 /* Creamware Noah has this descriptor after the 2nd endpoint */
2739 if (!csep && altsd->bNumEndpoints >= 2) 2751 if (!csep && altsd->bNumEndpoints >= 2)