Linux 3.10.10
Greg KH
maintainerI'm announcing the release of the 3.10.10 kernel.
All users of the 3.10 kernel series must upgrade.
The updated 3.10.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-3.10.y
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 arch/arc/include/asm/ptrace.h | 2 arch/arc/include/asm/syscall.h | 5 arch/arc/kernel/entry.S | 4 arch/arc/lib/strchr-700.S | 10 + arch/arm/boot/dts/at91sam9n12ek.dts | 4 arch/arm/boot/dts/at91sam9x5.dtsi | 2 arch/arm/mach-davinci/board-dm355-leopard.c | 1 arch/arm/mach-davinci/board-dm644x-evm.c | 1 arch/arm/mach-davinci/board-dm646x-evm.c | 1 arch/arm/mach-davinci/board-neuros-osd2.c | 1 arch/arm/mm/Kconfig | 9 - arch/arm64/kernel/perf_event.c | 10 + arch/s390/kvm/kvm-s390.c | 21 +- arch/x86/include/asm/bootparam_utils.h | 4 arch/x86/kernel/sys_x86_64.c | 2 arch/x86/mm/mmap.c | 8 - arch/x86/xen/setup.c | 22 ++ arch/x86/xen/smp.c | 11 + drivers/acpi/glue.c | 95 ++++++++++-- drivers/ata/libata-pmp.c | 12 - drivers/ata/sata_fsl.c | 5 drivers/gpu/drm/i915/i915_reg.h | 2 drivers/gpu/drm/i915/intel_ringbuffer.c | 12 + drivers/gpu/drm/radeon/radeon.h | 2 drivers/gpu/drm/radeon/radeon_uvd.c | 8 + drivers/gpu/drm/radeon/rv770.c | 12 - drivers/md/bcache/btree.c | 23 ++- drivers/md/bcache/io.c | 2 drivers/md/bcache/journal.c | 2 drivers/md/bcache/request.c | 13 + drivers/misc/mei/hw-me.c | 14 + drivers/misc/mei/init.c | 3 drivers/net/wireless/hostap/hostap_ioctl.c | 4 drivers/net/wireless/iwlwifi/dvm/mac80211.c | 5 drivers/net/wireless/iwlwifi/iwl-7000.c | 12 - drivers/net/wireless/iwlwifi/mvm/fw-api-d3.h | 4 drivers/net/wireless/iwlwifi/mvm/fw-api-mac.h | 8 - drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c | 11 - drivers/net/wireless/iwlwifi/mvm/mac80211.c | 6 drivers/net/wireless/iwlwifi/mvm/mvm.h | 1 drivers/net/wireless/iwlwifi/mvm/sta.c | 11 - drivers/net/wireless/iwlwifi/mvm/tx.c | 6 drivers/net/wireless/iwlwifi/pcie/trans.c | 10 - drivers/net/wireless/zd1201.c | 4 drivers/of/fdt.c | 2 drivers/pci/pci-acpi.c | 15 + drivers/platform/olpc/olpc-ec.c | 2 drivers/s390/scsi/zfcp_erp.c | 29 ++- drivers/s390/scsi/zfcp_qdio.c | 8 - drivers/scsi/Kconfig | 1 drivers/staging/comedi/drivers.c | 2 drivers/usb/phy/phy-fsl-usb.h | 2 drivers/usb/phy/phy-fsm-usb.c | 2 drivers/xen/events.c | 13 + fs/bio.c | 20 +- fs/namespace.c | 2 fs/nilfs2/segbuf.c | 5 include/acpi/acpi_bus.h | 6 include/linux/ftrace_event.h | 2 include/linux/mm_types.h | 1 include/linux/sched.h | 1 include/linux/wait.h | 57 +++++++ kernel/trace/ftrace.c | 89 +++++++++-- kernel/trace/trace.c | 173 ++++++++++------------ kernel/trace/trace_events.c | 198 +++++++++++++++----------- kernel/trace/trace_events_filter.c | 17 -- kernel/trace/trace_kprobe.c | 42 ++++- kernel/trace/trace_uprobe.c | 51 ++++-- net/mac80211/mlme.c | 15 + net/nfc/llcp.h | 1 net/nfc/llcp_sock.c | 8 - 72 files changed, 810 insertions(+), 361 deletions(-)
Alex Deucher (1):
drm/radeon/r7xx: fix copy paste typo in golden register setup
Anatolij Gustschin (1):
usb: phy: fix build breakage
Anthony Foiani (1):
sata_fsl: save irqs while coalescing
Anton Blanchard (1):
SCSI: lpfc: Don't force CONFIG_GENERIC_CSUM on
Chris Wilson (1):
drm/i915: Invalidate TLBs for the rings after a reset
Christian König (1):
drm/radeon: fix UVD message buffer validation
Chuck Anderson (1):
xen/smp: initialize IPI vectors before marking CPU online
Dan Carpenter (2):
VFS: collect_mounts() should return an ERR_PTR
Hostap: copying wrong data prism2_ioctl_giwaplist()
Daniel Drake (2):
x86: Don't clear olpc_ofw_header when sentinel is detected drivers/platform/olpc/olpc-ec.c: initialise earlier
David Vrabel (3):
xen/events: initialize local per-cpu mask for all possible events xen/events: mask events when changing their VCPU binding x86/xen: do not identity map UNUSABLE regions in the machine E820
Dominik Dingel (1):
KVM: s390: move kvm_guest_enter,exit closer to sie
Emmanuel Grumbach (7):
iwlwifi: mvm: correctly configure MCAST in AP mode
iwlwifi: mvm: fix MCAST in AP mode
iwlwifi: mvm: properly tell the fw that a STA is awake
iwlwifi: mvm: don't set the MCAST queue in STA's queue list
iwlwifi: mvm: take the seqno from packet if transmit failed
iwlwifi: mvm: unregister leds when registration failed
iwlwifi: pcie: disable L1 Active after pci_enable_device
Greg Kroah-Hartman (1):
Linux 3.10.10
Ian Abbott (1):
staging: comedi: bug-fix NULL pointer dereference on failed attach
Jeff Wu (1):
ACPI: add _STA evaluation at do_acpi_find_child()
Joern Rennecke (1):
ARC: [lib] strchr breakage in Big-endian configuration
Johannes Berg (3):
mac80211: don't wait for TX status forever
iwlwifi: bump required firmware API version for 3160/7260
iwlwifi: mvm: adjust firmware D3 configuration API
Jussi Kivilinna (1):
zd1201: do not use stack as URB transfer_buffer
Kent Overstreet (1):
bcache: FUA fixes
Kumar Amit Mehta (1):
md: bcache: io.c: fix a potential NULL pointer dereference
Linus Torvalds (1):
Revert "x86 get_unmapped_area(): use proper mmap base for bottom-up direction"
Martin Peschke (2):
SCSI: zfcp: fix lock imbalance by reworking request queue locking
SCSI: zfcp: fix schedule-inside-lock in scsi_device list loops
Masami Hiramatsu (1):
tracing/kprobe: Wait for disabling all running kprobe handlers
Namhyung Kim (1):
tracing: Do not call kmem_cache_free() on allocation failure
Nicolas Ferre (2):
ARM: at91: at91sam9x5 RTC is not compatible with at91rm9200 one
ARM: at91/DT: fix at91sam9n12ek memory node
Nicolas Pitre (1):
ARM: 7816/1: CONFIG_KUSER_HELPERS: fix help text
Oleg Nesterov (13):
tracing: Introduce trace_create_cpu_file() and tracing_get_cpu()
tracing: Change tracing_pipe_fops() to rely on tracing_get_cpu()
tracing: Change tracing_buffers_fops to rely on tracing_get_cpu()
tracing: Change tracing_stats_fops to rely on tracing_get_cpu()
tracing: Change tracing_entries_fops to rely on tracing_get_cpu()
tracing: Change tracing_fops/snapshot_fops to rely on tracing_get_cpu()
tracing: Turn event/id->i_private into call->event.type
tracing: Change event_enable/disable_read() to verify i_private != NULL
tracing: Change event_filter_read/write to verify i_private != NULL
tracing: Change f_start() to take event_mutex and verify i_private != NULL
tracing: Introduce remove_event_file_dir()
tracing: Change remove_event_file_dir() to clear "d_subdirs"->i_private
tracing: trace_remove_event_call() should fail if call/file is in use
Radu Caragea (1):
x86 get_unmapped_area: Access mmap_legacy_base through mm_struct member
Rafael J. Wysocki (1):
ACPI: Try harder to resolve _ADR collisions for bridges
Rafał Miłecki (1):
drm/radeon: fix WREG32_OR macro setting bits in a register
Roland Dreier (1):
SCSI: sg: Fix user memory corruption when SG_IO is interrupted by a signal
Samuel Ortiz (1):
NFC: llcp: Fix non blocking sockets connections
Sekhar Nori (1):
ARM: davinci: nand: specify ecc strength
Stanislaw Gruszka (1):
iwlwifi: dvm: fix calling ieee80211_chswitch_done() with NULL
Steven Rostedt (Red Hat) (4):
ftrace: Add check for NULL regs if ops has SAVE_REGS set tracing/kprobes: Fail to unregister if probe event files are in use tracing/uprobes: Fail to unregister if probe event files are in use
ftrace: Check module functions being traced on reload
Terry Suereth (1):
libata: apply behavioral quirks to sil3826 PMP
Tomas Winkler (3):
mei: me: fix reset state machine
mei: don't have to clean the state on power up
mei: me: fix waiting for hw ready
Vineet Gupta (2):
ARC: gdbserver breakage in Big-Endian configuration #1
ARC: gdbserver breakage in Big-Endian configuration #2
Vyacheslav Dubeyko (2):
nilfs2: remove double bio_put() in nilfs_end_bio_write() for BIO_EOPNOTSUPP error
nilfs2: fix issue with counting number of bio requests for BIO_EOPNOTSUPP error detection
Will Deacon (2):
arm64: perf: fix array out of bounds access in armpmu_map_hw_event()
arm64: perf: fix event validation for software group leaders
Wladislav Wiebe (1):
of: fdt: fix memory initialization for expanded DT
Greg KH
maintainerMakefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 3 PATCHLEVEL = 10 -SUBLEVEL = 9 +SUBLEVEL = 10 EXTRAVERSION = NAME = TOSSUG Baby Fish
arch/arc/include/asm/ptrace.h +2 -0
@@ -52,12 +52,14 @@ struct pt_regs {/*to distinguish bet excp, syscall, irq */ union { +struct {#ifdef CONFIG_CPU_BIG_ENDIAN /* so that assembly code is same for LE/BE */ unsigned long orig_r8:16 , event:16 ;#else unsigned long event:16 , orig_r8:16 ;#endif + };long orig_r8_word; }; };
arch/arc/include/asm/syscall.h +2 -3
@@ -18,7 +18,7 @@ static inline long syscall_get_nr(struct task_struct *task, struct pt_regs *regs) { if (user_mode(regs) && in_syscall(regs)) - return regs->orig_r8; + return regs->r8; else return -1; }
@@ -26,8 +26,7 @@ syscall_get_nr(struct task_struct *task, struct pt_regs *regs)static inline void syscall_rollback (struct task_struct *task,struct pt_regs *regs) { -/* XXX: I can't fathom how pt_regs->r8 will be clobbered ? */ - regs->r8 = regs->orig_r8; + regs->r0 = regs->orig_r0; } static inline long
arch/arc/kernel/entry.S +2 -2
@@ -498,7 +498,7 @@ tracesys_exit: trap_with_param: ; stop_pc info by gdb needs this info - stw orig_r8_IS_BRKPT, [sp, PT_orig_r8] + st orig_r8_IS_BRKPT, [sp, PT_orig_r8] mov r0, r12 lr r1, [efa]
@@ -723,7 +723,7 @@ not_exception: ; things to what they were, before returning from L2 context ;---------------------------------------------------------------- - ldw r9, [sp, PT_orig_r8] ; get orig_r8 to make sure it is + ld r9, [sp, PT_orig_r8] ; get orig_r8 to make sure it is brne r9, orig_r8_IS_IRQ2, 149f ; infact a L2 ISR ret path ld r9, [sp, PT_status32] ; get statu32_l2 (saved in pt_regs)
arch/arc/lib/strchr-700.S +10 -0
@@ -39,9 +39,18 @@ ARC_ENTRY strchr ld.a r2,[r0,4] sub r12,r6,r7 bic r12,r12,r6 +#ifdef __LITTLE_ENDIAN__ and r7,r12,r4 breq r7,0,.Loop ; For speed, we want this branch to be unaligned. b .Lfound_char ; Likewise this one. +#else + and r12,r12,r4 + breq r12,0,.Loop ; For speed, we want this branch to be unaligned. + lsr_s r12,r12,7 + bic r2,r7,r6 + b.d .Lfound_char_b + and_s r2,r2,r12 +#endif ; /* We require this code address to be unaligned for speed... */ .Laligned: ld_s r2,[r0]
@@ -95,6 +104,7 @@ ARC_ENTRY strchr lsr r7,r7,7 bic r2,r7,r6 +.Lfound_char_b: norm r2,r2 sub_s r0,r0,4 asr_s r2,r2,3
arch/arm/boot/dts/at91sam9n12ek.dts +2 -2
@@ -14,11 +14,11 @@ compatible = "atmel,at91sam9n12ek", "atmel,at91sam9n12", "atmel,at91sam9"; chosen { - bootargs = "mem=128M console=ttyS0,115200 root=/dev/mtdblock1 rw rootfstype=jffs2"; + bootargs = "console=ttyS0,115200 root=/dev/mtdblock1 rw rootfstype=jffs2"; }; memory { - reg = <0x20000000 0x10000000>; + reg = <0x20000000 0x8000000>; }; clocks {
arch/arm/boot/dts/at91sam9x5.dtsi +1 -1
@@ -643,7 +643,7 @@ }; rtc@fffffeb0 { - compatible = "atmel,at91rm9200-rtc"; + compatible = "atmel,at91sam9x5-rtc"; reg = <0xfffffeb0 0x40>; interrupts = <1 4 7>; status = "disabled";
arch/arm/mach-davinci/board-dm355-leopard.c +1 -0
@@ -75,6 +75,7 @@ static struct davinci_nand_pdata davinci_nand_data = { .parts = davinci_nand_partitions, .nr_parts = ARRAY_SIZE(davinci_nand_partitions), .ecc_mode = NAND_ECC_HW_SYNDROME, + .ecc_bits = 4, .bbt_options = NAND_BBT_USE_FLASH, };
arch/arm/mach-davinci/board-dm644x-evm.c +1 -0
@@ -153,6 +153,7 @@ static struct davinci_nand_pdata davinci_evm_nandflash_data = { .parts = davinci_evm_nandflash_partition, .nr_parts = ARRAY_SIZE(davinci_evm_nandflash_partition), .ecc_mode = NAND_ECC_HW, + .ecc_bits = 1, .bbt_options = NAND_BBT_USE_FLASH, .timing = &davinci_evm_nandflash_timing, };
arch/arm/mach-davinci/board-dm646x-evm.c +1 -0
@@ -90,6 +90,7 @@ static struct davinci_nand_pdata davinci_nand_data = { .parts = davinci_nand_partitions, .nr_parts = ARRAY_SIZE(davinci_nand_partitions), .ecc_mode = NAND_ECC_HW, + .ecc_bits = 1, .options = 0, };
arch/arm/mach-davinci/board-neuros-osd2.c +1 -0
@@ -88,6 +88,7 @@ static struct davinci_nand_pdata davinci_ntosd2_nandflash_data = { .parts = davinci_ntosd2_nandflash_partition, .nr_parts = ARRAY_SIZE(davinci_ntosd2_nandflash_partition), .ecc_mode = NAND_ECC_HW, + .ecc_bits = 1, .bbt_options = NAND_BBT_USE_FLASH, };
arch/arm/mm/Kconfig +6 -3
@@ -789,15 +789,18 @@ config KUSER_HELPERS the CPU type fitted to the system. This permits binaries to be run on ARMv4 through to ARMv7 without modification. + See Documentation/arm/kernel_user_helpers.txt for details. + However, the fixed address nature of these helpers can be used by ROP (return orientated programming) authors when creating exploits. If all of the binaries and libraries which run on your platform are built specifically for your platform, and make no use of - these helpers, then you can turn this option off. However, - when such an binary or library is run, it will receive a SIGILL - signal, which will terminate the program. + these helpers, then you can turn this option off to hinder + such exploits. However, in that case, if a binary or library + relying on those helpers is run, it will receive a SIGILL signal, + which will terminate the program. Say N here only if you are absolutely certain that you do not need these helpers; otherwise, the safe option is to say Y.
arch/arm64/kernel/perf_event.c +9 -1
@@ -107,7 +107,12 @@ armpmu_map_cache_event(const unsigned (*cache_map)static int armpmu_map_event (const unsigned (*event_map)[PERF_COUNT_HW_MAX ],u64 config) { -int mapping = (*event_map)[config]; +int mapping; + +if (config >=PERF_COUNT_HW_MAX ) +return -EINVAL ; + + mapping = (*event_map)[config];return mapping ==HW_OP_UNSUPPORTED ? -ENOENT : mapping; }
@@ -317,6 +322,9 @@ validate_event(struct pmu_hw_events *hw_events,struct hw_perf_event fake_event = event->hw;struct pmu *leader_pmu = event->group_leader->pmu; +if (is_software_event (event)) +return 1 ; +if (event->pmu != leader_pmu || event->state <=PERF_EVENT_STATE_OFF )return 1 ;
arch/s390/kvm/kvm-s390.c +14 -7
@@ -622,14 +622,25 @@ static int __vcpu_run(struct kvm_vcpu *vcpu)kvm_s390_deliver_pending_interrupts (vcpu); vcpu->arch.sie_block->icptcode =0 ; -preempt_disable (); -kvm_guest_enter (); -preempt_enable ();VCPU_EVENT (vcpu,6 ,"entering sie flags %x" ,atomic_read (&vcpu->arch.sie_block->cpuflags));trace_kvm_s390_sie_enter (vcpu,atomic_read (&vcpu->arch.sie_block->cpuflags)); + +/* +* As PF_VCPU will be used in fault handler, between guest_enter +* and guest_exit should be no uaccess. +*/ +preempt_disable (); +kvm_guest_enter (); +preempt_enable (); rc =sie64a (vcpu->arch.sie_block, vcpu->run->s.regs.gprs); +kvm_guest_exit (); + +VCPU_EVENT (vcpu,6 ,"exit sie icptcode %d" , + vcpu->arch.sie_block->icptcode); +trace_kvm_s390_sie_exit (vcpu, vcpu->arch.sie_block->icptcode); +if (rc) {if (kvm_is_ucontrol (vcpu->kvm)) { rc =SIE_INTERCEPT_UCONTROL ;
@@ -639,10 +650,6 @@ static int __vcpu_run(struct kvm_vcpu *vcpu) rc =kvm_s390_inject_program_int (vcpu,PGM_ADDRESSING ); } } -VCPU_EVENT (vcpu,6 ,"exit sie icptcode %d" , - vcpu->arch.sie_block->icptcode); -trace_kvm_s390_sie_exit (vcpu, vcpu->arch.sie_block->icptcode); -kvm_guest_exit ();memcpy (&vcpu->run->s.regs.gprs[14 ], &vcpu->arch.sie_block->gg14,16 );return rc;
arch/x86/include/asm/bootparam_utils.h +2 -2
@@ -35,9 +35,9 @@ static void sanitize_boot_params(struct boot_params *boot_params)*/ if (boot_params->sentinel) {/* fields in boot_params are left uninitialized, clear them */ -memset (&boot_params->olpc_ofw_header,0 , +memset (&boot_params->ext_ramdisk_image,0 , (char *)&boot_params->efi_info - - (char *)&boot_params->olpc_ofw_header); + (char *)&boot_params->ext_ramdisk_image);memset (&boot_params->kbd_status,0 , (char *)&boot_params->hdr - (char *)&boot_params->kbd_status);
arch/x86/kernel/sys_x86_64.c +1 -1
@@ -101,7 +101,7 @@ static void find_start_end(unsigned long flags, unsigned long *begin, *begin = new_begin; } }else { - *begin =mmap_legacy_base (); + *begin = current->mm->mmap_legacy_base; *end =TASK_SIZE ; } }
arch/x86/mm/mmap.c +5 -3
@@ -98,7 +98,7 @@ static unsigned long mmap_base(void)* Bottom-up (legacy) layout on X86_32 did not support randomization, X86_64 * does, but not when emulating X86_32 */ -unsigned long mmap_legacy_base (void ) +static unsigned long mmap_legacy_base (void ) {if (mmap_is_ia32 ())return TASK_UNMAPPED_BASE ;
@@ -112,12 +112,14 @@ unsigned long mmap_legacy_base(void)*/ void arch_pick_mmap_layout (struct mm_struct *mm) { + mm->mmap_legacy_base =mmap_legacy_base (); + mm->mmap_base =mmap_base (); +if (mmap_is_legacy ()) { - mm->mmap_base =mmap_legacy_base (); + mm->mmap_base = mm->mmap_legacy_base; mm->get_unmapped_area = arch_get_unmapped_area; mm->unmap_area = arch_unmap_area; }else { - mm->mmap_base =mmap_base (); mm->get_unmapped_area = arch_get_unmapped_area_topdown; mm->unmap_area = arch_unmap_area_topdown; }
arch/x86/xen/setup.c +22 -0
@@ -313,6 +313,17 @@ static void xen_align_and_add_e820_region(u64 start, u64 size, int type)e820_add_region (start, end - start, type); } +void xen_ignore_unusable (struct e820entry *list,size_t map_size) +{ +struct e820entry *entry; +unsigned int i; + +for (i =0 , entry = list; i < map_size; i++, entry++) { +if (entry->type ==E820_UNUSABLE ) + entry->type =E820_RAM ; + } +} +/** * machine_specific_memory_setup - Hook for machine specific memory setup. **/
@@ -353,6 +364,17 @@ char * __init xen_memory_setup(void) }BUG_ON (rc); +/* +* Xen won't allow a 1:1 mapping to be created to UNUSABLE +* regions, so if we're using the machine memory map leave the +* region as RAM as it is in the pseudo-physical map. +* +* UNUSABLE regions in domUs are not handled and will need +* a patch in the future. +*/ +if (xen_initial_domain ()) +xen_ignore_unusable (map, memmap.nr_entries); +/* Make sure the Xen-supplied memory map is well-ordered. */ sanitize_e820_map (map, memmap.nr_entries, &memmap.nr_entries);
arch/x86/xen/smp.c +9 -2
@@ -667,8 +667,15 @@ static void __init xen_hvm_smp_prepare_cpus(unsigned int max_cpus)static int __cpuinit xen_hvm_cpu_up (unsigned int cpu,struct task_struct *tidle) {int rc; - rc =native_cpu_up (cpu, tidle); -WARN_ON (xen_smp_intr_init (cpu)); +/* +* xen_smp_intr_init() needs to run before native_cpu_up() +* so that IPI vectors are set up on the booting CPU before +* it is marked online in native_cpu_up(). +*/ + rc =xen_smp_intr_init (cpu); +WARN_ON (rc); +if (!rc) + rc =native_cpu_up (cpu, tidle);return rc; }
drivers/acpi/glue.c +81 -14
113 lines not on this page · raw message
drivers/ata/libata-pmp.c +6 -6
@@ -289,24 +289,24 @@ static int sata_pmp_configure(struct ata_device *dev, int print_info)/* Disable sending Early R_OK. * With "cached read" HDD testing and multiple ports busy on a SATA -* host controller, 3726 PMP will very rarely drop a deferred +* host controller, 3x26 PMP will very rarely drop a deferred * R_OK that was intended for the host. Symptom will be all * 5 drives under test will timeout, get reset, and recover. */ -if (vendor ==0x1095 && devid ==0x3726 ) { +if (vendor ==0x1095 && (devid ==0x3726 || devid ==0x3826 )) {u32 reg; err_mask =sata_pmp_read (&ap->link,PMP_GSCR_SII_POL , ®);if (err_mask) { rc = -EIO ; - reason ="failed to read Sil3726 Private Register" ; + reason ="failed to read Sil3x26 Private Register" ; goto fail; } reg &= ~0x1 ; err_mask =sata_pmp_write (&ap->link,PMP_GSCR_SII_POL , reg);if (err_mask) { rc = -EIO ; - reason ="failed to write Sil3726 Private Register" ; + reason ="failed to write Sil3x26 Private Register" ; goto fail; } }
@@ -383,8 +383,8 @@ static void sata_pmp_quirks(struct ata_port *ap)u16 devid =sata_pmp_gscr_devid (gscr);struct ata_link *link; -if (vendor ==0x1095 && devid ==0x3726 ) { -/* sil3726 quirks */ +if (vendor ==0x1095 && (devid ==0x3726 || devid ==0x3826 )) { +/* sil3x26 quirks */ ata_for_each_link (link, ap,EDGE ) {/* link reports offline after LPM */ link->flags |=ATA_LFLAG_NO_LPM ;
drivers/ata/sata_fsl.c +3 -2
@@ -293,6 +293,7 @@ static void fsl_sata_set_irq_coalescing(struct ata_host *host, {struct sata_fsl_host_priv *host_priv = host->private_data;void __iomem *hcr_base = host_priv->hcr_base; +unsigned long flags;if (count >ICC_MAX_INT_COUNT_THRESHOLD ) count =ICC_MAX_INT_COUNT_THRESHOLD ;
@@ -305,12 +306,12 @@ static void fsl_sata_set_irq_coalescing(struct ata_host *host, (count > ICC_MIN_INT_COUNT_THRESHOLD)) ticks =ICC_SAFE_INT_TICKS ; -spin_lock (&host->lock); +spin_lock_irqsave (&host->lock, flags);iowrite32 ((count <<24 | ticks), hcr_base +ICC ); intr_coalescing_count = count; intr_coalescing_ticks = ticks; -spin_unlock (&host->lock); +spin_unlock_irqrestore (&host->lock, flags);DPRINTK ("interrupt coalescing, count = 0x%x, ticks = %x\n" , intr_coalescing_count, intr_coalescing_ticks);
drivers/gpu/drm/i915/i915_reg.h +2 -0
@@ -617,6 +617,8 @@will not assert AGPBUSY# and will only be delivered when out of C3. */ #define INSTPM_FORCE_ORDERING (1<<7)/* GEN6+ */ +#define INSTPM_TLB_INVALIDATE (1<<9) +#define INSTPM_SYNC_FLUSH (1<<5)#define ACTHD 0x020c8#define FW_BLC 0x020d8#define FW_BLC2 0x020dc
drivers/gpu/drm/i915/intel_ringbuffer.c +12 -0
@@ -907,6 +907,18 @@ void intel_ring_setup_status_page(struct intel_ring_buffer *ring)I915_WRITE (mmio, (u32 )ring->status_page.gfx_addr);POSTING_READ (mmio); + +/* Flush the TLB for this page */ +if (INTEL_INFO (dev)->gen >=6 ) { +u32 reg =RING_INSTPM (ring->mmio_base); +I915_WRITE (reg, +_MASKED_BIT_ENABLE (INSTPM_TLB_INVALIDATE | +INSTPM_SYNC_FLUSH )); +if (wait_for ((I915_READ (reg) &INSTPM_SYNC_FLUSH ) ==0 , +1000 )) +DRM_ERROR ("%s: wait for SyncFlush to complete for TLB invalidation timed out\n" , + ring->name); + } } static int
drivers/gpu/drm/radeon/radeon.h +1 -1
@@ -1764,7 +1764,7 @@ void r100_io_wreg(struct radeon_device *rdev, u32 reg, u32 v);WREG32 (reg, tmp_); \ } while (0)#define WREG32_AND (reg, and) WREG32_P(reg, 0, and) -#define WREG32_OR (reg, or) WREG32_P(reg, or, ~or) +#define WREG32_OR (reg, or) WREG32_P(reg, or, ~(or))#define WREG32_PLL_P (reg, val, mask) \ do { \ uint32_t tmp_ = RREG32_PLL(reg); \
drivers/gpu/drm/radeon/radeon_uvd.c +8 -0
@@ -359,6 +359,14 @@ static int radeon_uvd_cs_msg(struct radeon_cs_parser *p, struct radeon_bo *bo,return -EINVAL ; } +if (bo->tbo.sync_obj) { + r =radeon_fence_wait (bo->tbo.sync_obj, false); +if (r) { +DRM_ERROR ("Failed waiting for UVD message (%d)!\n" , r); +return r; + } + } + r =radeon_bo_kmap (bo, &ptr);if (r)return r;
drivers/gpu/drm/radeon/rv770.c +6 -6
@@ -744,10 +744,10 @@ static void rv770_init_golden_registers(struct radeon_device *rdev) (const u32)ARRAY_SIZE(r7xx_golden_dyn_gpr_registers));radeon_program_register_sequence (rdev, rv730_golden_registers, - (const u32 )ARRAY_SIZE (rv770_golden_registers)); + (const u32 )ARRAY_SIZE (rv730_golden_registers));radeon_program_register_sequence (rdev, rv730_mgcg_init, - (const u32 )ARRAY_SIZE (rv770_mgcg_init)); + (const u32 )ARRAY_SIZE (rv730_mgcg_init));break ;case CHIP_RV710 : radeon_program_register_sequence(rdev,
@@ -758,18 +758,18 @@ static void rv770_init_golden_registers(struct radeon_device *rdev) (const u32)ARRAY_SIZE(r7xx_golden_dyn_gpr_registers));radeon_program_register_sequence (rdev, rv710_golden_registers, - (const u32 )ARRAY_SIZE (rv770_golden_registers)); + (const u32 )ARRAY_SIZE (rv710_golden_registers));radeon_program_register_sequence (rdev, rv710_mgcg_init, - (const u32 )ARRAY_SIZE (rv770_mgcg_init)); + (const u32 )ARRAY_SIZE (rv710_mgcg_init));break ;case CHIP_RV740 :radeon_program_register_sequence (rdev, rv740_golden_registers, - (const u32 )ARRAY_SIZE (rv770_golden_registers)); + (const u32 )ARRAY_SIZE (rv740_golden_registers));radeon_program_register_sequence (rdev, rv740_mgcg_init, - (const u32 )ARRAY_SIZE (rv770_mgcg_init)); + (const u32 )ARRAY_SIZE (rv740_mgcg_init));break ;default :break ;
drivers/md/bcache/btree.c +21 -2
@@ -326,10 +326,25 @@ static void do_btree_write(struct btree *b) i->csum =btree_csum_set (b, i);btree_bio_init (b); - b->bio->bi_rw =REQ_META |WRITE_SYNC ; + b->bio->bi_rw =REQ_META |WRITE_SYNC |REQ_FUA ; b->bio->bi_size =set_blocks (i, b->c) *block_bytes (b->c);bch_bio_map (b->bio, i); +/* +* If we're appending to a leaf node, we don't technically need FUA - +* this write just needs to be persisted before the next journal write, +* which will be marked FLUSH|FUA. +* +* Similarly if we're writing a new btree root - the pointer is going to +* be in the next journal entry. +* +* But if we're writing a new btree node (that isn't a root) or +* appending to a non leaf btree node, we need either FUA or a flush +* when we write the parent with the new pointer. FUA is cheaper than a +* flush, and writes appending to leaf nodes aren't blocking anything so +* just make all btree node writes FUA to keep things sane. +*/ +bkey_copy (&k.key, &b->key);SET_PTR_OFFSET (&k.key,0 ,PTR_OFFSET (&k.key,0 ) +bset_offset (b, i));
@@ -2142,6 +2157,9 @@ int bch_btree_insert(struct btree_op *op, struct cache_set *c)void bch_btree_set_root (struct btree *b) {unsigned i; +struct closure cl; + +closure_init_stack (&cl);BUG_ON (!b->written);
@@ -2155,8 +2173,9 @@ void bch_btree_set_root(struct btree *b) b->c->root = b;__bkey_put (b->c, &b->key); -bch_journal_meta (b->c,NULL ); +bch_journal_meta (b->c, &cl);pr_debug ("%s for %pf" ,pbtree (b),__builtin_return_address (0 )); +closure_sync (&cl); }/* Cache lookup */
drivers/md/bcache/io.c +2 -0
@@ -97,6 +97,8 @@ struct bio *bch_bio_split(struct bio *bio, int sectors,if (bio->bi_rw &REQ_DISCARD ) { ret =bio_alloc_bioset (gfp,1 , bs); +if (!ret) +return NULL ; idx =0 ; goto out; }
drivers/md/bcache/journal.c +1 -1
@@ -622,7 +622,7 @@ static void journal_write_unlocked(struct closure *cl)bio_reset (bio); bio->bi_sector =PTR_OFFSET (k, i); bio->bi_bdev = ca->bdev; - bio->bi_rw =REQ_WRITE |REQ_SYNC |REQ_META |REQ_FLUSH ; + bio->bi_rw =REQ_WRITE |REQ_SYNC |REQ_META |REQ_FLUSH |REQ_FUA ; bio->bi_size = sectors <<9 ; bio->bi_end_io = journal_write_endio;
drivers/md/bcache/request.c +12 -1
@@ -1053,9 +1053,20 @@ static void request_write(struct cached_dev *dc, struct search *s)trace_bcache_writethrough (s->orig_bio);closure_bio_submit (bio, cl, s->d); }else { - s->op.cache_bio = bio;trace_bcache_writeback (s->orig_bio);bch_writeback_add (dc,bio_sectors (bio)); + +if (s->op.flush_journal) { +/* Also need to send a flush to the backing device */ + s->op.cache_bio =bio_clone_bioset (bio,GFP_NOIO , + dc->disk.bio_split); + + bio->bi_size =0 ; + bio->bi_vcnt =0 ; +closure_bio_submit (bio, cl, s->d); + }else { + s->op.cache_bio = bio; + } } out:closure_call (&s->op.cl, bch_insert_data,NULL , cl);
drivers/misc/mei/hw-me.c +10 -4
@@ -238,14 +238,18 @@ static int mei_me_hw_ready_wait(struct mei_device *dev)if (mei_me_hw_is_ready (dev))return 0 ; + dev->recvd_hw_ready = false;mutex_unlock (&dev->device_lock); err =wait_event_interruptible_timeout (dev->wait_hw_ready, - dev->recvd_hw_ready,MEI_INTEROP_TIMEOUT ); + dev->recvd_hw_ready, +mei_secs_to_jiffies (MEI_INTEROP_TIMEOUT ));mutex_lock (&dev->device_lock);if (!err && !dev->recvd_hw_ready) { +if (!err) + err = -ETIMEDOUT ;dev_err (&dev->pdev->dev, -"wait hw ready failed. status = 0x%x\n" , err); -return -ETIMEDOUT ; +"wait hw ready failed. status = %d\n" , err); +return err; } dev->recvd_hw_ready = false;
@@ -482,7 +486,9 @@ irqreturn_t mei_me_irq_thread_handler(int irq, void *dev_id)/* check if ME wants a reset */ if (!mei_hw_is_ready (dev) && dev->dev_state !=MEI_DEV_RESETTING && - dev->dev_state !=MEI_DEV_INITIALIZING ) { + dev->dev_state !=MEI_DEV_INITIALIZING && + dev->dev_state !=MEI_DEV_POWER_DOWN && + dev->dev_state !=MEI_DEV_POWER_UP ) {dev_dbg (&dev->pdev->dev,"FW not ready.\n" );mei_reset (dev,1 );mutex_unlock (&dev->device_lock);
drivers/misc/mei/init.c +2 -1
@@ -143,7 +143,8 @@ void mei_reset(struct mei_device *dev, int interrupts_enabled) dev->hbm_state =MEI_HBM_IDLE ; -if (dev->dev_state !=MEI_DEV_INITIALIZING ) { +if (dev->dev_state !=MEI_DEV_INITIALIZING && + dev->dev_state !=MEI_DEV_POWER_UP ) {if (dev->dev_state !=MEI_DEV_DISABLED && dev->dev_state !=MEI_DEV_POWER_DOWN ) dev->dev_state =MEI_DEV_RESETTING ;
drivers/net/wireless/hostap/hostap_ioctl.c +2 -2
@@ -523,9 +523,9 @@ static int prism2_ioctl_giwaplist(struct net_device *dev, data->length =prism2_ap_get_sta_qual (local, addr, qual,IW_MAX_AP ,1 ); -memcpy (extra, &addr,sizeof (struct sockaddr ) * data->length); +memcpy (extra, addr,sizeof (struct sockaddr ) * data->length); data->flags =1 ;/* has quality information */ -memcpy (extra +sizeof (struct sockaddr ) * data->length, &qual, +memcpy (extra +sizeof (struct sockaddr ) * data->length, qual,sizeof (struct iw_quality ) * data->length);kfree (addr);
drivers/net/wireless/iwlwifi/dvm/mac80211.c +4 -1
@@ -1059,7 +1059,10 @@ void iwl_chswitch_done(struct iwl_priv *priv, bool is_success)if (test_bit (STATUS_EXIT_PENDING , &priv->status))return ; -if (test_and_clear_bit (STATUS_CHANNEL_SWITCH_PENDING , &priv->status)) +if (!test_and_clear_bit (STATUS_CHANNEL_SWITCH_PENDING , &priv->status)) +return ; + +if (ctx->vif)ieee80211_chswitch_done (ctx->vif, is_success); }
drivers/net/wireless/iwlwifi/iwl-7000.c +6 -6
@@ -67,16 +67,16 @@#include "iwl-agn-hw.h" /* Highest firmware API version supported */ -#define IWL7260_UCODE_API_MAX 6 -#define IWL3160_UCODE_API_MAX 6 +#define IWL7260_UCODE_API_MAX 7 +#define IWL3160_UCODE_API_MAX 7/* Oldest version we won't warn about */ -#define IWL7260_UCODE_API_OK 6 -#define IWL3160_UCODE_API_OK 6 +#define IWL7260_UCODE_API_OK 7 +#define IWL3160_UCODE_API_OK 7/* Lowest firmware API version supported */ -#define IWL7260_UCODE_API_MIN 6 -#define IWL3160_UCODE_API_MIN 6 +#define IWL7260_UCODE_API_MIN 7 +#define IWL3160_UCODE_API_MIN 7/* NVM versions */ #define IWL7260_NVM_VERSION 0x0a1d
drivers/net/wireless/iwlwifi/mvm/fw-api-d3.h +3 -1
@@ -75,13 +75,15 @@ enum iwl_d3_wakeup_flags {* struct iwl_d3_manager_config - D3 manager configuration command * @min_sleep_time: minimum sleep time (in usec) * @wakeup_flags: wakeup flags, see &enum iwl_d3_wakeup_flags +* @wakeup_host_timer: force wakeup after this many seconds * * The structure is used for the D3_CONFIG_CMD command. */ struct iwl_d3_manager_config {__le32 min_sleep_time;__le32 wakeup_flags; -} __packed;/* D3_MANAGER_CONFIG_CMD_S_VER_3 */ +__le32 wakeup_host_timer; +} __packed;/* D3_MANAGER_CONFIG_CMD_S_VER_4 */ /* TODO: OFFLOADS_QUERY_API_S_VER_1 */
drivers/net/wireless/iwlwifi/mvm/fw-api-mac.h +7 -1
@@ -71,7 +71,13 @@#define MAC_INDEX_MIN_DRIVER 0#define NUM_MAC_INDEX_DRIVER MAC_INDEX_AUX -#define AC_NUM 4/* Number of access categories */ +enum iwl_ac { +AC_BK , +AC_BE , +AC_VI , +AC_VO , +AC_NUM , +};/** * enum iwl_mac_protection_flags - MAC context flags
drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c +6 -5
@@ -193,14 +193,11 @@ static void iwl_mvm_mac_iface_iterator(void *_data, u8 *mac,u32 iwl_mvm_mac_get_queues_mask (struct iwl_mvm *mvm,struct ieee80211_vif *vif) { -u32 qmask, ac; +u32 qmask =0 , ac;if (vif->type ==NL80211_IFTYPE_P2P_DEVICE )return BIT (IWL_MVM_OFFCHANNEL_QUEUE ); - qmask = (vif->cab_queue !=IEEE80211_INVAL_HW_QUEUE ) ? -BIT (vif->cab_queue) :0 ; -for (ac =0 ; ac <IEEE80211_NUM_ACS ; ac++)if (vif->hw_queue[ac] !=IEEE80211_INVAL_HW_QUEUE ) qmask |=BIT (vif->hw_queue[ac]);
@@ -362,7 +359,7 @@ int iwl_mvm_mac_ctxt_init(struct iwl_mvm *mvm, struct ieee80211_vif *vif)break ;case NL80211_IFTYPE_AP :iwl_trans_ac_txq_enable (mvm->trans, vif->cab_queue, -IWL_MVM_TX_FIFO_VO ); +IWL_MVM_TX_FIFO_MCAST );/* fall through */ default :for (ac =0 ; ac <IEEE80211_NUM_ACS ; ac++)
@@ -550,6 +547,10 @@ static void iwl_mvm_mac_ctxt_cmd_common(struct iwl_mvm *mvm, cmd->ac[i].fifos_mask =BIT (iwl_mvm_ac_to_tx_fifo[i]); } +/* in AP mode, the MCAST FIFO takes the EDCA params from VO */ +if (vif->type ==NL80211_IFTYPE_AP ) + cmd->ac[AC_VO ].fifos_mask |=BIT (IWL_MVM_TX_FIFO_MCAST ); +if (vif->bss_conf.qos) cmd->qos_flags |=cpu_to_le32 (MAC_QOS_FLG_UPDATE_EDCA );
drivers/net/wireless/iwlwifi/mvm/mac80211.c +5 -1
@@ -243,7 +243,11 @@ int iwl_mvm_mac_setup_register(struct iwl_mvm *mvm)if (ret)return ret; -return ieee80211_register_hw (mvm->hw); + ret =ieee80211_register_hw (mvm->hw); +if (ret) +iwl_mvm_leds_exit (mvm); + +return ret; } static void iwl_mvm_mac_tx(struct ieee80211_hw *hw,
drivers/net/wireless/iwlwifi/mvm/mvm.h +1 -0
@@ -88,6 +88,7 @@ enum iwl_mvm_tx_fifo {IWL_MVM_TX_FIFO_BE ,IWL_MVM_TX_FIFO_VI ,IWL_MVM_TX_FIFO_VO , + IWL_MVM_TX_FIFO_MCAST = 5, };extern struct ieee80211_ops iwl_mvm_hw_ops;
drivers/net/wireless/iwlwifi/mvm/sta.c +1 -10
@@ -226,9 +226,6 @@ int iwl_mvm_add_sta(struct iwl_mvm *mvm,if (vif->hw_queue[i] !=IEEE80211_INVAL_HW_QUEUE ) mvm_sta->tfd_queue_msk |=BIT (vif->hw_queue[i]); -if (vif->cab_queue !=IEEE80211_INVAL_HW_QUEUE ) - mvm_sta->tfd_queue_msk |=BIT (vif->cab_queue); -/* for HW restart - need to reset the seq_number etc... */ memset (mvm_sta->tid_data,0 ,sizeof (mvm_sta->tid_data));
@@ -1296,17 +1293,11 @@ void iwl_mvm_sta_modify_ps_wake(struct iwl_mvm *mvm,struct iwl_mvm_add_sta_cmd cmd = { .add_modify =STA_MODE_MODIFY , .sta_id = mvmsta->sta_id, - .modify_mask =STA_MODIFY_SLEEPING_STA_TX_COUNT , - .sleep_state_flags =cpu_to_le16 (STA_SLEEP_STATE_AWAKE ), + .station_flags_msk =cpu_to_le32 (STA_FLG_PS ), .mac_id_n_color =cpu_to_le32 (mvmsta->mac_id_n_color), };int ret; -/* -* Same modify mask for sleep_tx_count and sleep_state_flags but this -* should be fine since if we set the STA as "awake", then -* sleep_tx_count is not relevant. -*/ ret =iwl_mvm_send_cmd_pdu (mvm,ADD_STA ,CMD_ASYNC ,sizeof (cmd), &cmd);if (ret)IWL_ERR (mvm,"Failed to send ADD_STA command (%d)\n" , ret);
drivers/net/wireless/iwlwifi/mvm/tx.c +3 -3
@@ -175,7 +175,7 @@ static void iwl_mvm_set_tx_cmd_rate(struct iwl_mvm *mvm,* table is controlled by LINK_QUALITY commands */ -if (ieee80211_is_data (fc)) { +if (ieee80211_is_data (fc) && sta) { tx_cmd->initial_rate_index =0 ; tx_cmd->tx_flags |=cpu_to_le32 (TX_CMD_FLG_STA_RATE );return ;
@@ -610,8 +610,8 @@ static void iwl_mvm_rx_tx_cmd_single(struct iwl_mvm *mvm, !(info->flags & IEEE80211_TX_STAT_ACK)) info->flags |=IEEE80211_TX_STAT_AMPDU_NO_BACK ; -/* W/A FW bug: seq_ctl is wrong when the queue is flushed */ -if (status ==TX_STATUS_FAIL_FIFO_FLUSHED ) { +/* W/A FW bug: seq_ctl is wrong when the status isn't success */ +if (status !=TX_STATUS_SUCCESS ) {struct ieee80211_hdr *hdr = (void *)skb->data; seq_ctl =le16_to_cpu (hdr->seq_ctrl); }
drivers/net/wireless/iwlwifi/pcie/trans.c +5 -5
@@ -1481,16 +1481,16 @@ struct iwl_trans *iwl_trans_pcie_alloc(struct pci_dev *pdev,spin_lock_init (&trans_pcie->reg_lock);init_waitqueue_head (&trans_pcie->ucode_write_waitq); -/* W/A - seems to solve weird behavior. We need to remove this if we -* don't want to stay in L1 all the time. This wastes a lot of power */ -pci_disable_link_state (pdev,PCIE_LINK_STATE_L0S |PCIE_LINK_STATE_L1 | -PCIE_LINK_STATE_CLKPM ); -if (pci_enable_device (pdev)) { err = -ENODEV ; goto out_no_pci; } +/* W/A - seems to solve weird behavior. We need to remove this if we +* don't want to stay in L1 all the time. This wastes a lot of power */ +pci_disable_link_state (pdev,PCIE_LINK_STATE_L0S |PCIE_LINK_STATE_L1 | +PCIE_LINK_STATE_CLKPM ); +pci_set_master (pdev); err =pci_set_dma_mask (pdev,DMA_BIT_MASK (36 ));
drivers/net/wireless/zd1201.c +3 -1
@@ -98,10 +98,12 @@ static int zd1201_fw_upload(struct usb_device *dev, int apfw) goto exit; err =usb_control_msg (dev,usb_rcvctrlpipe (dev,0 ),0x4 , -USB_DIR_IN |0x40 ,0 ,0 , &ret,sizeof (ret),ZD1201_FW_TIMEOUT ); +USB_DIR_IN |0x40 ,0 ,0 , buf,sizeof (ret),ZD1201_FW_TIMEOUT );if (err <0 ) goto exit; +memcpy (&ret, buf,sizeof (ret)); +if (ret &0x80 ) { err = -EIO ; goto exit;
drivers/of/fdt.c +2 -0
@@ -392,6 +392,8 @@ static void __unflatten_device_tree(struct boot_param_header *blob, mem = (unsigned long )dt_alloc (size +4 , __alignof__(struct device_node )); +memset ((void *)mem,0 , size); + ((__be32 *)mem)[size /4 ] =cpu_to_be32 (0xdeadbeef );pr_debug (" unflattening %lx...\n" , mem);
drivers/pci/pci-acpi.c +11 -4
@@ -317,13 +317,20 @@ void acpi_pci_remove_bus(struct pci_bus *bus)/* ACPI bus type */ static int acpi_pci_find_device (struct device *dev,acpi_handle *handle) { -struct pci_dev * pci_dev; -u64 addr; +struct pci_dev *pci_dev =to_pci_dev (dev); +bool is_bridge; +u64 addr; - pci_dev =to_pci_dev (dev); +/* +* pci_is_bridge() is not suitable here, because pci_dev->subordinate +* is set only after acpi_pci_find_device() has been called for the +* given device. +*/ + is_bridge = pci_dev->hdr_type ==PCI_HEADER_TYPE_BRIDGE + || pci_dev->hdr_type ==PCI_HEADER_TYPE_CARDBUS ;/* Please ref to ACPI spec for the syntax of _ADR */ addr = (PCI_SLOT (pci_dev->devfn) <<16 ) |PCI_FUNC (pci_dev->devfn); - *handle =acpi_get_child (DEVICE_ACPI_HANDLE (dev->parent), addr); + *handle =acpi_find_child (ACPI_HANDLE (dev->parent), addr, is_bridge);if (!*handle)return -ENODEV ;return 0 ;
drivers/platform/olpc/olpc-ec.c +1 -1
@@ -330,7 +330,7 @@ static int __init olpc_ec_init_module(void)return platform_driver_register (&olpc_ec_plat_driver); } -module_init (olpc_ec_init_module); +arch_initcall (olpc_ec_init_module);MODULE_AUTHOR ("Andres Salomon <[email protected]>" );MODULE_LICENSE ("GPL" );
drivers/s390/scsi/zfcp_erp.c +22 -7
@@ -102,10 +102,13 @@ static void zfcp_erp_action_dismiss_port(struct zfcp_port *port)if (atomic_read (&port->status) &ZFCP_STATUS_COMMON_ERP_INUSE )zfcp_erp_action_dismiss (&port->erp_action); -else -shost_for_each_device (sdev, port->adapter->scsi_host) +else { +spin_lock (port->adapter->scsi_host->host_lock); +__shost_for_each_device (sdev, port->adapter->scsi_host)if (sdev_to_zfcp (sdev)->port == port)zfcp_erp_action_dismiss_lun (sdev); +spin_unlock (port->adapter->scsi_host->host_lock); + } }static void zfcp_erp_action_dismiss_adapter (struct zfcp_adapter *adapter)
@@ -592,9 +595,11 @@ static void _zfcp_erp_lun_reopen_all(struct zfcp_port *port, int clear, {struct scsi_device *sdev; -shost_for_each_device (sdev, port->adapter->scsi_host) +spin_lock (port->adapter->scsi_host->host_lock); +__shost_for_each_device (sdev, port->adapter->scsi_host)if (sdev_to_zfcp (sdev)->port == port)_zfcp_erp_lun_reopen (sdev, clear, id,0 ); +spin_unlock (port->adapter->scsi_host->host_lock); }static void zfcp_erp_strategy_followup_failed (struct zfcp_erp_action *act)
@@ -1435,8 +1440,10 @@ void zfcp_erp_set_adapter_status(struct zfcp_adapter *adapter, u32 mask)atomic_set_mask (common_mask, &port->status);read_unlock_irqrestore (&adapter->port_list_lock, flags); -shost_for_each_device (sdev, adapter->scsi_host) +spin_lock_irqsave (adapter->scsi_host->host_lock, flags); +__shost_for_each_device (sdev, adapter->scsi_host)atomic_set_mask (common_mask, &sdev_to_zfcp (sdev)->status); +spin_unlock_irqrestore (adapter->scsi_host->host_lock, flags); }/**
@@ -1470,11 +1477,13 @@ void zfcp_erp_clear_adapter_status(struct zfcp_adapter *adapter, u32 mask) }read_unlock_irqrestore (&adapter->port_list_lock, flags); -shost_for_each_device (sdev, adapter->scsi_host) { +spin_lock_irqsave (adapter->scsi_host->host_lock, flags); +__shost_for_each_device (sdev, adapter->scsi_host) {atomic_clear_mask (common_mask, &sdev_to_zfcp (sdev)->status);if (clear_counter)atomic_set (&sdev_to_zfcp (sdev)->erp_counter,0 ); } +spin_unlock_irqrestore (adapter->scsi_host->host_lock, flags); }/**
@@ -1488,16 +1497,19 @@ void zfcp_erp_set_port_status(struct zfcp_port *port, u32 mask) {struct scsi_device *sdev;u32 common_mask = mask &ZFCP_COMMON_FLAGS ; +unsigned long flags;atomic_set_mask (mask, &port->status);if (!common_mask)return ; -shost_for_each_device (sdev, port->adapter->scsi_host) +spin_lock_irqsave (port->adapter->scsi_host->host_lock, flags); +__shost_for_each_device (sdev, port->adapter->scsi_host)if (sdev_to_zfcp (sdev)->port == port)atomic_set_mask (common_mask, &sdev_to_zfcp (sdev)->status); +spin_unlock_irqrestore (port->adapter->scsi_host->host_lock, flags); }/**
@@ -1512,6 +1524,7 @@ void zfcp_erp_clear_port_status(struct zfcp_port *port, u32 mask)struct scsi_device *sdev;u32 common_mask = mask &ZFCP_COMMON_FLAGS ;u32 clear_counter = mask &ZFCP_STATUS_COMMON_ERP_FAILED ; +unsigned long flags;atomic_clear_mask (mask, &port->status);
@@ -1521,13 +1534,15 @@ void zfcp_erp_clear_port_status(struct zfcp_port *port, u32 mask)if (clear_counter)atomic_set (&port->erp_counter,0 ); -shost_for_each_device (sdev, port->adapter->scsi_host) +spin_lock_irqsave (port->adapter->scsi_host->host_lock, flags); +__shost_for_each_device (sdev, port->adapter->scsi_host)if (sdev_to_zfcp (sdev)->port == port) {atomic_clear_mask (common_mask, &sdev_to_zfcp (sdev)->status);if (clear_counter)atomic_set (&sdev_to_zfcp (sdev)->erp_counter,0 ); } +spin_unlock_irqrestore (port->adapter->scsi_host->host_lock, flags); }/**
drivers/s390/scsi/zfcp_qdio.c +2 -6
@@ -224,11 +224,9 @@ int zfcp_qdio_sbals_from_sg(struct zfcp_qdio *qdio, struct zfcp_qdio_req *q_req,static int zfcp_qdio_sbal_check (struct zfcp_qdio *qdio) { -spin_lock_irq (&qdio->req_q_lock);if (atomic_read (&qdio->req_q_free) || !(atomic_read (&qdio->adapter->status) &ZFCP_STATUS_ADAPTER_QDIOUP ))return 1 ; -spin_unlock_irq (&qdio->req_q_lock);return 0 ; }
@@ -246,9 +244,8 @@ int zfcp_qdio_sbal_get(struct zfcp_qdio *qdio) {long ret; -spin_unlock_irq (&qdio->req_q_lock); - ret =wait_event_interruptible_timeout (qdio->req_q_wq, -zfcp_qdio_sbal_check (qdio),5 *HZ ); + ret =wait_event_interruptible_lock_irq_timeout (qdio->req_q_wq, +zfcp_qdio_sbal_check (qdio), qdio->req_q_lock,5 *HZ );if (!(atomic_read (&qdio->adapter->status) &ZFCP_STATUS_ADAPTER_QDIOUP ))return -EIO ;
@@ -262,7 +259,6 @@ int zfcp_qdio_sbal_get(struct zfcp_qdio *qdio)zfcp_erp_adapter_reopen (qdio->adapter,0 ,"qdsbg_1" ); } -spin_lock_irq (&qdio->req_q_lock);return -EIO ; }
drivers/scsi/Kconfig +0 -1
@@ -1353,7 +1353,6 @@ config SCSI_LPFC tristate "Emulex LightPulse Fibre Channel Support" depends on PCI && SCSI select SCSI_FC_ATTRS - select GENERIC_CSUM select CRC_T10DIF help This lpfc driver supports the Emulex LightPulse
drivers/staging/comedi/drivers.c +1 -1
@@ -464,7 +464,7 @@ int comedi_device_attach(struct comedi_device *dev, struct comedi_devconfig *it) ret =comedi_device_postconfig (dev);if (ret <0 ) {comedi_device_detach (dev); -module_put (dev->driver->module); +module_put (driv->module); }/* On success, the driver module count has been incremented. */ return ret;
drivers/usb/phy/phy-fsl-usb.h +1 -1
@@ -15,7 +15,7 @@* 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include "otg_fsm.h" +#include "phy-fsm-usb.h" #include <linux/usb/otg.h> #include <linux/ioctl.h>
drivers/usb/phy/phy-fsm-usb.c +1 -1
@@ -29,7 +29,7 @@#include <linux/usb/gadget.h> #include <linux/usb/otg.h> -#include "phy-otg-fsm.h" +#include "phy-fsm-usb.h" /* Change USB protocol when there is a protocol change */ static int otg_set_protocol (struct otg_fsm *fsm,int protocol)
drivers/xen/events.c +12 -1
@@ -346,7 +346,7 @@ static void init_evtchn_cpu_bindings(void)for_each_possible_cpu (i)memset (per_cpu (cpu_evtchn_mask, i), - (i ==0 ) ? ~0 :0 ,sizeof (*per_cpu (cpu_evtchn_mask, i))); + (i ==0 ) ? ~0 :0 ,NR_EVENT_CHANNELS /8 ); }static inline void clear_evtchn (int port)
@@ -1492,8 +1492,10 @@ void rebind_evtchn_irq(int evtchn, int irq)/* Rebind an evtchn so that it gets delivered to a specific cpu */ static int rebind_irq_to_cpu (unsigned irq,unsigned tcpu) { +struct shared_info *s = HYPERVISOR_shared_info;struct evtchn_bind_vcpu bind_vcpu;int evtchn =evtchn_from_irq (irq); +int masked;if (!VALID_EVTCHN (evtchn))return -1 ;
@@ -1510,6 +1512,12 @@ static int rebind_irq_to_cpu(unsigned irq, unsigned tcpu) bind_vcpu.vcpu = tcpu;/* +* Mask the event while changing the VCPU binding to prevent +* it being delivered on an unexpected VCPU. +*/ + masked =sync_test_and_set_bit (evtchn,BM (s->evtchn_mask)); + +/* * If this fails, it usually just indicates that we're dealing with a * virq or IPI channel, which don't actually need to be rebound. Ignore * it, but don't do the xenlinux-level rebind in that case.
@@ -1517,6 +1525,9 @@ static int rebind_irq_to_cpu(unsigned irq, unsigned tcpu)if (HYPERVISOR_event_channel_op (EVTCHNOP_bind_vcpu, &bind_vcpu) >=0 )bind_evtchn_to_cpu (evtchn, tcpu); +if (!masked) +unmask_evtchn (evtchn); +return 0 ; }
fs/bio.c +15 -5
@@ -1045,12 +1045,22 @@ static int __bio_copy_iov(struct bio *bio, struct bio_vec *iovecs,int bio_uncopy_user (struct bio *bio) {struct bio_map_data *bmd = bio->bi_private; -int ret =0 ; +struct bio_vec *bvec; +int ret =0 , i; -if (!bio_flagged (bio,BIO_NULL_MAPPED )) - ret =__bio_copy_iov (bio, bmd->iovecs, bmd->sgvecs, - bmd->nr_sgvecs,bio_data_dir (bio) ==READ , -0 , bmd->is_our_pages); +if (!bio_flagged (bio,BIO_NULL_MAPPED )) { +/* +* if we're in a workqueue, the request is orphaned, so +* don't copy into a random user address space, just free. +*/ +if (current->mm) + ret =__bio_copy_iov (bio, bmd->iovecs, bmd->sgvecs, + bmd->nr_sgvecs,bio_data_dir (bio) ==READ , +0 , bmd->is_our_pages); +else if (bmd->is_our_pages) +bio_for_each_segment_all (bvec, bio, i) +__free_page (bvec->bv_page); + }bio_free_map_data (bmd);bio_put (bio);return ret;
fs/namespace.c +1 -1
@@ -1429,7 +1429,7 @@ struct vfsmount *collect_mounts(struct path *path) CL_COPY_ALL | CL_PRIVATE);namespace_unlock ();if (IS_ERR (tree)) -return NULL ; +return ERR_CAST (tree);return &tree->mnt; }
fs/nilfs2/segbuf.c +2 -3
@@ -345,8 +345,7 @@ static void nilfs_end_bio_write(struct bio *bio, int err)if (err == -EOPNOTSUPP ) {set_bit (BIO_EOPNOTSUPP , &bio->bi_flags); -bio_put (bio); -/* to be detected by submit_seg_bio() */ +/* to be detected by nilfs_segbuf_submit_bio() */ }if (!uptodate)
@@ -377,12 +376,12 @@ static int nilfs_segbuf_submit_bio(struct nilfs_segment_buffer *segbuf, bio->bi_private = segbuf;bio_get (bio);submit_bio (mode, bio); + segbuf->sb_nbio++;if (bio_flagged (bio,BIO_EOPNOTSUPP )) {bio_put (bio); err = -EOPNOTSUPP ; goto failed; } - segbuf->sb_nbio++;bio_put (bio); wi->bio =NULL ;
include/acpi/acpi_bus.h +5 -1
@@ -455,7 +455,11 @@ struct acpi_pci_root { };/* helper */ -acpi_handle acpi_get_child (acpi_handle ,u64 ); +acpi_handle acpi_find_child (acpi_handle ,u64 ,bool ); +static inline acpi_handle acpi_get_child (acpi_handle handle,u64 addr) +{ +return acpi_find_child (handle, addr, false); +}int acpi_is_root_bridge (acpi_handle );struct acpi_pci_root *acpi_pci_find_root (acpi_handle handle);#define DEVICE_ACPI_HANDLE (dev) ((acpi_handle)ACPI_HANDLE(dev))
include/linux/ftrace_event.h +1 -1
@@ -334,7 +334,7 @@ extern int trace_define_field(struct ftrace_event_call *call, const char *type, const char *name, int offset, int size, int is_signed, int filter_type);extern int trace_add_event_call (struct ftrace_event_call *call); -extern void trace_remove_event_call (struct ftrace_event_call *call); +extern int trace_remove_event_call (struct ftrace_event_call *call);#define is_signed_type (type) (((type)(-1)) < (type)1)
include/linux/mm_types.h +1 -0
@@ -333,6 +333,7 @@ struct mm_struct {void (*unmap_area) (struct mm_struct *mm,unsigned long addr);#endif unsigned long mmap_base;/* base of mmap area */ +unsigned long mmap_legacy_base;/* base of mmap area in bottom-up allocations */ unsigned long task_size;/* size of task vm space */ unsigned long cached_hole_size;/* if non-zero, the largest hole below free_area_cache */ unsigned long free_area_cache;/* first hole of size cached_hole_size or larger */
include/linux/sched.h +0 -1
@@ -314,7 +314,6 @@ struct nsproxy;struct user_namespace ;#ifdef CONFIG_MMU -extern unsigned long mmap_legacy_base (void );extern void arch_pick_mmap_layout (struct mm_struct *mm); extern unsigned long arch_get_unmapped_area(struct file *, unsigned long, unsigned long,
include/linux/wait.h +57 -0
63 lines not on this page · raw message
kernel/trace/ftrace.c +76 -13
155 lines not on this page · raw message
kernel/trace/trace.c +80 -93
383 lines not on this page · raw message
kernel/trace/trace_events.c +120 -78
387 lines not on this page · raw message
kernel/trace/trace_events_filter.c +6 -11
@@ -631,17 +631,15 @@ static void append_filter_err(struct filter_parse_state *ps,free_page ((unsigned long ) buf); } +/* caller must hold event_mutex */ void print_event_filter (struct ftrace_event_call *call,struct trace_seq *s) { -struct event_filter *filter; +struct event_filter *filter = call->filter; -mutex_lock (&event_mutex); - filter = call->filter;if (filter && filter->filter_string)trace_seq_printf (s,"%s\n" , filter->filter_string);else trace_seq_printf (s,"none\n" ); -mutex_unlock (&event_mutex); } void print_subsystem_event_filter(struct event_subsystem *system,
@@ -1835,23 +1833,22 @@ static int create_system_filter(struct event_subsystem *system,return err; } +/* caller must hold event_mutex */ int apply_event_filter (struct ftrace_event_call *call,char *filter_string) {struct event_filter *filter; -int err =0 ; - -mutex_lock (&event_mutex); +int err;if (!strcmp (strstrip (filter_string),"0" )) {filter_disable (call); filter = call->filter;if (!filter) - goto out_unlock; +return 0 ;RCU_INIT_POINTER (call->filter,NULL );/* Make sure the filter is not being used */ synchronize_sched ();__free_filter (filter); - goto out_unlock; +return 0 ; } err =create_filter (call, filter_string, true, &filter);
@@ -1878,8 +1875,6 @@ int apply_event_filter(struct ftrace_event_call *call, char *filter_string)__free_filter (tmp); } } -out_unlock: -mutex_unlock (&event_mutex);return err; }
kernel/trace/trace_kprobe.c +32 -10
93 lines not on this page · raw message
kernel/trace/trace_uprobe.c +38 -13
116 lines not on this page · raw message
net/mac80211/mlme.c +12 -3
@@ -31,10 +31,12 @@#include "led.h" #define IEEE80211_AUTH_TIMEOUT (HZ / 5) +#define IEEE80211_AUTH_TIMEOUT_LONG (HZ / 2)#define IEEE80211_AUTH_TIMEOUT_SHORT (HZ / 10)#define IEEE80211_AUTH_MAX_TRIES 3#define IEEE80211_AUTH_WAIT_ASSOC (HZ * 5)#define IEEE80211_ASSOC_TIMEOUT (HZ / 5) +#define IEEE80211_ASSOC_TIMEOUT_LONG (HZ / 2)#define IEEE80211_ASSOC_TIMEOUT_SHORT (HZ / 10)#define IEEE80211_ASSOC_MAX_TRIES 3
@@ -3470,10 +3472,13 @@ static int ieee80211_probe_auth(struct ieee80211_sub_if_data *sdata)if (tx_flags ==0 ) { auth_data->timeout = jiffies +IEEE80211_AUTH_TIMEOUT ; - ifmgd->auth_data->timeout_started = true; + auth_data->timeout_started = true;run_again (ifmgd, auth_data->timeout); }else { - auth_data->timeout_started = false; + auth_data->timeout = +round_jiffies_up (jiffies +IEEE80211_AUTH_TIMEOUT_LONG ); + auth_data->timeout_started = true; +run_again (ifmgd, auth_data->timeout); }return 0 ;
@@ -3510,7 +3515,11 @@ static int ieee80211_do_assoc(struct ieee80211_sub_if_data *sdata) assoc_data->timeout_started = true;run_again (&sdata->u.mgd, assoc_data->timeout); }else { - assoc_data->timeout_started = false; + assoc_data->timeout = +round_jiffies_up (jiffies + +IEEE80211_ASSOC_TIMEOUT_LONG ); + assoc_data->timeout_started = true; +run_again (&sdata->u.mgd, assoc_data->timeout); }return 0 ;
net/nfc/llcp.h +1 -0
@@ -19,6 +19,7 @@enum llcp_state {LLCP_CONNECTED =1 ,/* wait_for_packet() wants that */ +LLCP_CONNECTING ,LLCP_CLOSED ,LLCP_BOUND ,LLCP_LISTEN ,
net/nfc/llcp_sock.c +5 -3
@@ -571,7 +571,7 @@ static unsigned int llcp_sock_poll(struct file *file, struct socket *sock,if (sk->sk_shutdown ==SHUTDOWN_MASK ) mask |=POLLHUP ; -if (sock_writeable (sk)) +if (sock_writeable (sk) && sk->sk_state ==LLCP_CONNECTED ) mask |=POLLOUT |POLLWRNORM |POLLWRBAND ;else set_bit (SOCK_ASYNC_NOSPACE , &sk->sk_socket->flags);
@@ -722,14 +722,16 @@ static int llcp_sock_connect(struct socket *sock, struct sockaddr *_addr,if (ret) goto sock_unlink; + sk->sk_state =LLCP_CONNECTING ; + ret =sock_wait_state (sk,LLCP_CONNECTED ,sock_sndtimeo (sk, flags &O_NONBLOCK )); -if (ret) +if (ret && ret != -EINPROGRESS ) goto sock_unlink;release_sock (sk); -return 0 ; +return ret; sock_unlink:nfc_llcp_put_ssap (local, llcp_sock->ssap);