Linux 3.16.2
Greg KH
maintainerI'm announcing the release of the 3.16.2 kernel.
All users of the 3.16 kernel series must upgrade.
The updated 3.16.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-3.16.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
------------
Documentation/sound/alsa/ALSA-Configuration.txt | 4 Documentation/stable_kernel_rules.txt | 3 Documentation/virtual/kvm/api.txt | 3 Makefile | 2 arch/arm/boot/dts/am4372.dtsi | 3 arch/arm/include/asm/unistd.h | 10 arch/arm/include/uapi/asm/unistd.h | 11 arch/arm/mach-omap2/control.c | 3 arch/arm/mach-omap2/omap_hwmod.c | 4 arch/arm64/include/asm/cacheflush.h | 11 arch/arm64/include/asm/pgtable.h | 13 arch/arm64/include/asm/tlbflush.h | 5 arch/arm64/kernel/debug-monitors.c | 22 - arch/arm64/kernel/efi.c | 2 arch/mips/math-emu/cp1emu.c | 2 arch/powerpc/include/uapi/asm/kvm.h | 1 arch/powerpc/kernel/eeh_pe.c | 46 --- arch/powerpc/kvm/book3s_hv.c | 13 arch/powerpc/kvm/book3s_pr.c | 2 arch/powerpc/platforms/powernv/pci-ioda.c | 1 arch/powerpc/platforms/pseries/pci_dlpar.c | 4 arch/s390/mm/pgtable.c | 5 arch/x86/Kconfig | 1 arch/x86/include/asm/kvm_host.h | 2 arch/x86/include/asm/pgtable.h | 9 arch/x86/kernel/cpu/mcheck/mce_intel.c | 18 - arch/x86/kernel/resource.c | 8 arch/x86/kernel/vsyscall_64.c | 8 arch/x86/kvm/emulate.c | 4 arch/x86/kvm/irq.c | 2 arch/x86/kvm/lapic.c | 52 ++- arch/x86/pci/i386.c | 4 arch/x86/xen/grant-table.c | 10 arch/x86/xen/time.c | 2 drivers/char/tpm/tpm_i2c_stm_st33.c | 1 drivers/crypto/ux500/cryp/cryp_core.c | 25 - drivers/gpu/drm/omapdrm/omap_dmm_tiler.c | 6 drivers/gpu/drm/omapdrm/omap_gem.c | 10 drivers/gpu/drm/omapdrm/omap_plane.c | 4 drivers/gpu/drm/radeon/cik.c | 1 drivers/hid/hid-cherry.c | 2 drivers/hid/hid-kye.c | 2 drivers/hid/hid-lg.c | 4 drivers/hid/hid-logitech-dj.c | 15 - drivers/hid/hid-monterey.c | 2 drivers/hid/hid-petalynx.c | 2 drivers/hid/hid-sunplus.c | 2 drivers/hwmon/ads1015.c | 4 drivers/hwmon/amc6821.c | 17 - drivers/hwmon/dme1737.c | 33 +- drivers/hwmon/gpio-fan.c | 2 drivers/hwmon/lm78.c | 2 drivers/hwmon/lm85.c | 9 drivers/hwmon/lm92.c | 13 drivers/hwmon/sis5595.c | 2 drivers/i2c/busses/i2c-at91.c | 4 drivers/i2c/busses/i2c-rk3x.c | 2 drivers/misc/mei/client.c | 18 - drivers/misc/mei/nfc.c | 11 drivers/misc/mei/pci-me.c | 2 drivers/misc/mei/pci-txe.c | 2 drivers/mmc/host/mmci.c | 33 +- drivers/pci/hotplug/pciehp_hpc.c | 2 drivers/pci/pci-label.c | 18 - drivers/pci/pci.c | 12 drivers/pci/setup-res.c | 7 drivers/scsi/hpsa.c | 6 drivers/staging/et131x/et131x.c | 68 ++--- drivers/staging/lustre/lustre/obdclass/class_obd.c | 2 drivers/staging/rtl8188eu/os_dep/usb_intf.c | 2 drivers/tty/serial/serial_core.c | 3 drivers/usb/core/devio.c | 2 drivers/usb/core/hub.c | 58 ++++ drivers/usb/host/ehci-hub.c | 2 drivers/usb/host/ehci-pci.c | 25 + drivers/usb/host/ohci-dbg.c | 9 drivers/usb/host/ohci-hcd.c | 10 drivers/usb/host/ohci-q.c | 46 ++- drivers/usb/host/xhci-pci.c | 13 drivers/usb/host/xhci-ring.c | 104 +++---- drivers/usb/host/xhci.c | 6 drivers/usb/host/xhci.h | 2 drivers/usb/serial/ftdi_sio.c | 5 drivers/usb/serial/ftdi_sio_ids.h | 20 + drivers/usb/serial/whiteheat.c | 7 drivers/usb/storage/uas.c | 2 drivers/xen/events/events_fifo.c | 5 fs/btrfs/async-thread.c | 44 ++- fs/btrfs/async-thread.h | 28 ++ fs/btrfs/backref.c | 14 - fs/btrfs/btrfs_inode.h | 6 fs/btrfs/delayed-inode.c | 4 fs/btrfs/disk-io.c | 85 ++---- fs/btrfs/extent-tree.c | 7 fs/btrfs/extent_io.c | 1 fs/btrfs/file-item.c | 2 fs/btrfs/file.c | 22 - fs/btrfs/inode.c | 94 ++----- fs/btrfs/ordered-data.c | 124 --------- fs/btrfs/ordered-data.h | 5 fs/btrfs/qgroup.c | 1 fs/btrfs/raid56.c | 9 fs/btrfs/reada.c | 3 fs/btrfs/scrub.c | 14 - fs/btrfs/transaction.c | 33 -- fs/btrfs/transaction.h | 1 fs/btrfs/ulist.h | 15 + fs/btrfs/volumes.c | 3 fs/debugfs/inode.c | 33 +- fs/ext4/ext4.h | 20 + fs/ext4/extents.c | 88 +++--- fs/ext4/indirect.c | 281 +++++++++++++++------ fs/ext4/inode.c | 46 +-- fs/ext4/mballoc.c | 26 + fs/ext4/namei.c | 21 + fs/ext4/super.c | 5 fs/isofs/inode.c | 15 - fs/isofs/isofs.h | 23 + fs/isofs/rock.c | 39 ++ fs/jbd2/commit.c | 21 - fs/jbd2/journal.c | 56 ++-- fs/jbd2/recovery.c | 33 +- fs/jbd2/revoke.c | 6 fs/nfs/nfs3acl.c | 7 fs/nfs/nfs4proc.c | 26 + fs/nfs/super.c | 9 fs/nfsd/nfs4callback.c | 3 fs/nfsd/nfssvc.c | 5 include/drm/drm_pciids.h | 7 include/linux/jbd2.h | 30 +- include/linux/sunrpc/svc_xprt.h | 1 kernel/sched/core.c | 5 mm/memory.c | 7 mm/util.c | 9 net/sunrpc/svcsock.c | 2 net/sunrpc/xprt.c | 2 net/sunrpc/xprtrdma/svc_rdma_transport.c | 1 sound/pci/Kconfig | 4 sound/pci/hda/patch_ca0132.c | 7 sound/pci/hda/patch_realtek.c | 28 +- sound/pci/hda/patch_sigmatel.c | 12 sound/pci/oxygen/virtuoso.c | 1 sound/pci/oxygen/xonar_pcm179x.c | 12 sound/usb/quirks-table.h | 29 ++ sound/usb/quirks.c | 2 virt/kvm/ioapic.c | 7 virt/kvm/iommu.c | 19 - 147 files changed, 1403 insertions(+), 1016 deletions(-)
Alan Stern (2):
USB: OHCI: fix bugs in debug routines
USB: OHCI: don't lose track of EDs when a controller dies
Alex Deucher (3):
drm/radeon: add new KV pci id
drm/radeon: add new bonaire pci ids
drm/radeon: add additional SI pci ids
Alexander Usyskin (6):
mei: reset client connection state on timeout
mei: start disconnect request timer consistently
mei: don't schedule suspend in pm idle
mei: fix return value on disconnect timeout
mei: reset client state on queued connect request
mei: nfc: fix memory leak in error path
Alexey Kardashevskiy (1):
KVM: PPC: Book3S: Fix LPCR one_reg interface
Andrey Utkin (1):
nfs3_list_one_acl(): check get_acl() result with IS_ERR_OR_NULL
Andy Lutomirski (1):
x86_64/vsyscall: Fix warn_bad_vsyscall log output
Arnd Bergmann (2):
crypto: ux500 - make interrupt mode plausible
hpsa: fix non-x86 builds
Axel Lin (7):
hwmon: (sis5595) Prevent overflow problem when writing large limits
hwmon: (amc6821) Fix possible race condition bug
hwmon: (gpio-fan) Prevent overflow problem when writing large limits
hwmon: (ads1015) Fix off-by-one for valid channel index checking
hwmon: (ads1015) Fix out-of-bounds array access
hwmon: (dme1737) Prevent overflow problem when writing large limits
hwmon: (lm92) Prevent overflow problem when writing large limits
Baruch Siach (1):
ARM: 8097/1: unistd.h: relocate comments back to place
Brian W Hart (1):
powerpc/powernv: Update dev->dma_mask in pci_set_dma_mask() path
Bryan O'Donoghue (1):
USB: ehci-pci: USB host controller support for Intel Quark X1000
Catalin Marinas (1):
arm64: Fix barriers used for page table modifications
Chris Mason (2):
btrfs: disable strict file flushes for renames and truncates
Btrfs: fix filemap_flush call in btrfs_file_release
Christian Borntraeger (1):
KVM: s390/mm: Fix page table locking vs. split pmd lock
Christoph Schulz (1):
x86: don't exclude low BIOS area when allocating address space for non-PCI cards
Chuck Lever (1):
svcrdma: Select NFSv4.1 backchannel transport based on forward channel
Clemens Ladisch (2):
ALSA: virtuoso: add Xonar Essence STX II support
ALSA: usb-audio: fix BOSS ME-25 MIDI regression
Daniel Bristot de Oliveira (1):
sched: Fix sched_setparam() policy == -1 logic
Darrick J. Wong (3):
ext4: fix same-dir rename when inline data directory overflows
jbd2: fix infinite loop when recovering corrupt journal blocks
jbd2: fix descriptor block size handling errors with journal_csum
Dave Chiluk (1):
stable_kernel_rules: Add pointer to netdev-FAQ for network patches
David Henningsson (1):
ALSA: hda - Add mute LED pin quirk for HP 15 touchsmart
David Vrabel (3):
xen/events/fifo: ensure all bitops are properly aligned even on x86 x86/xen: use vmap() to map grant table pages in PVH guests x86/xen: resume timer irqs early
Dmitry Monakhov (4):
ext4: move i_size,i_disksize update routines to helper function
ext4: fix incorect journal credits reservation in ext4_zero_range
ext4: fix transaction issues for ext4_fallocate and ext_zero_range
ext4: update i_disksize coherently with block allocation on error path
Filipe Manana (2):
Btrfs: fix csum tree corruption, duplicate and outdated checksums
Btrfs: read lock extent buffer while walking backrefs
Greg Kroah-Hartman (2):
USB: fix build error with CONFIG_PM_RUNTIME disabled Linux 3.16.2
Guenter Roeck (2):
hwmon: (lm78) Fix overflow problems seen when writing large temperature limits
hwmon: (lm85) Fix various errors on attribute writes
Guo Chao (1):
PCI: Keep original resource if we fail to expand it
Hans de Goede (4):
uas: Limit qdepth to 32 when connected over usb-2
xhci: Blacklist using streams on the Etron EJ168 controller
xhci: Treat not finding the event_seg on COMP_STOP the same as COMP_STOP_INVAL
xhci: Disable streams on Via XHCI with device-id 0x3432
Holger Paradies (1):
staging/rtl8188eu: add 0df6:0076 Sitecom Europe B.V.
Huang Rui (1):
usb: xhci: amd chipset also needs short TX quirk
Hugh Dickins (1):
x86,mm: fix pte_special versus pte_numa
Hui Wang (2):
ALSA: hda - fix an external mic jack problem on a HP machine
ALSA: hda - restore the gpio led after resume
James Forshaw (1):
USB: whiteheat: Added bounds checking for bulk command response
Jan Kara (1):
isofs: Fix unbounded recursion when processing relocated directories
Jason Gunthorpe (1):
tpm: Add missing tpm_do_selftest to ST33 I2C driver
Jaša Bartelj (1):
USB: ftdi_sio: Added PID for new ekey device
Jeremy Vial (1):
ARM: OMAP3: Fix choice of omap3_restore_es function in OMAP34XX rev3.1.2 case.
Jiri Kosina (3):
HID: logitech: fix bounds checking on LED report size
HID: logitech: perform bounds checking on device_id early enough
HID: fix a couple of off-by-ones
Johan Hovold (1):
USB: ftdi_sio: add Basic Micro ATOM Nano USB2Serial PID
Kinglong Mee (1):
NFSD: Decrease nfsd_users in nfsd_startup_generic fail
Larry Finger (1):
staging: r8188eu: Add new USB ID
Liu Bo (3):
Btrfs: fix compressed write corruption on enospc
Btrfs: fix crash on endio of reading corrupted block
Btrfs: fix task hang under heavy compressed write
Lukas Czerner (1):
ext4: fix punch hole on files with indirect mapping
Mark Einon (1):
staging: et131x: Fix errors caused by phydev->addr accesses before initialisation
Mathias Nyman (1):
xhci: rework cycle bit checking for new dequeue pointers
Matt Fleming (1):
x86/efi: Enforce CONFIG_RELOCATABLE for EFI boot stub
Michael S. Tsirkin (1):
kvm: iommu: fix the third parameter of kvm_iommu_put_pages (CVE-2014-3601)
Mike Qiu (1):
powerpc/eeh: Wrong place to call pci_get_slot()
Myron Stowe (1):
PCI: pciehp: Clear Data Link Layer State Changed during init
Nadav Amit (1):
KVM: x86: Inter-privilege level ret emulation is not implemeneted
Oleg Nesterov (1):
vm_is_stack: use for_each_thread() rather then buggy while_each_thread()
Oliver Neukum (2):
usbcore: don't log on consecutive debounce failures of the same port
USB: devio: fix issue with log flooding
Paolo Bonzini (2):
KVM: x86: always exit on EOIs for interrupts listed in the IOAPIC redir table Revert "KVM: x86: Increase the number of fixed MTRR regs to 10"
Patrick Riphagen (2):
USB: serial: ftdi_sio: Annotate the current Xsens PID assignments
USB: serial: ftdi_sio: Add support for new Xsens devices
Paul S McSpadden (1):
ALSA: usb-audio: Adjust Gamecom 780 volume level
Peter Chen (1):
usb: ehci: using wIndex + 1 for hub port
Peter Hurley (1):
serial: core: Preserve termios c_cflag for console resume
Pranith Kumar (1):
staging: lustre: Remove circular dependency on header
Pratyush Anand (1):
USB: Fix persist resume of some SS USB devices
Rob Kendrick (1):
MIPS: math-emu: Fix instruction decoding.
Roger Quadros (1):
usb: hub: Prevent hub autosuspend if usbcore.autosuspend is -1
Russell King (1):
drm: omapdrm: fix compiler errors
Scott Mayhew (1):
nfs: reject changes to resvport and sharecache during remount
Semen Protsenko (1):
efi/arm64: Store Runtime Services revision
Simone Gotti (1):
ACPI / PCI: Fix sysfs acpi_index and label errors
Stephen M. Cameron (1):
hpsa: fix bad -ENOMEM return value in hpsa_big_passthru_ioctl
Steven Rostedt (1):
debugfs: Fix corrupted loop in debugfs_remove_recursive
Suman Anna (1):
ARM: dts: AM4372: Correct mailbox node data
Takashi Iwai (4):
ALSA: hda/ca0132 - Don't try loading firmware at resume when already failed
ALSA: hda/realtek - Avoid setting wrong COEF on ALC269 & co
Btrfs: Fix memory corruption by ulist_add_merge() on 32bit arch
usbcore: Fix wrong device in an error message in hub_port_connect()
Theodore Ts'o (2):
ext4: fix ext4_discard_allocated_blocks() if we can't allocate the pa struct
ext4: fix BUG_ON in mb_free_blocks()
Thomas Gleixner (1):
x86: MCE: Add raw_lock conversion again
Tony Lindgren (1):
ARM: OMAP2+: hwmod: Rearm wake-up interrupts for DT when MUSB is idled
Trond Myklebust (3):
NFSv3: Fix another acl regression
NFSv4: Don't clear the open state when we just did an OPEN_DOWNGRADE
NFSv4: Fix problems with close in the presence of a delegation
Tyrel Datwyler (1):
powerpc/pci: Reorder pci bus/bridge unregistration during PHB removal
Ulf Hansson (2):
mmc: mmci: Remove redundant check of status for DATA irq
mmc: mmci: Move all CMD irq handling to mmci_cmd_irq()
Vidya Sagar (1):
PCI: Configure ASPM when enabling device
Wanpeng Li (1):
KVM: nVMX: fix "acknowledge interrupt on exit" when APICv is in use
Will Deacon (1):
arm64: don't call break hooks for BRK exceptions from EL0
Wolfram Sang (1):
drivers/i2c/busses: use correct type for dma_map/unmap
addy ke (1):
i2c: rk3x: fix interrupt handling issue
Greg KH
maintainerDocumentation/sound/alsa/ALSA-Configuration.txt +2 -2
@@ -2026,8 +2026,8 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. ------------------- Module for sound cards based on the Asus AV66/AV100/AV200 chips, - i.e., Xonar D1, DX, D2, D2X, DS, Essence ST (Deluxe), Essence STX, - HDAV1.3 (Deluxe), and HDAV1.3 Slim. + i.e., Xonar D1, DX, D2, D2X, DS, DSX, Essence ST (Deluxe), + Essence STX (II), HDAV1.3 (Deluxe), and HDAV1.3 Slim. This module supports autoprobe and multiple cards.
Documentation/stable_kernel_rules.txt +3 -0
@@ -29,6 +29,9 @@ Rules on what kind of patches are accepted, and which ones are not, into the Procedure for submitting patches to the -stable tree: + - If the patch covers files in net/ or drivers/net please follow netdev stable + submission guidelines as described in + Documentation/networking/netdev-FAQ.txt - Send the patch, after verifying that it follows the above rules, to [email protected]. You must note the upstream commit ID in the changelog of your submission, as well as the kernel version you wish
Documentation/virtual/kvm/api.txt +2 -1
@@ -1869,7 +1869,8 @@ registers, find a list below: PPC | KVM_REG_PPC_PID | 64 PPC | KVM_REG_PPC_ACOP | 64 PPC | KVM_REG_PPC_VRSAVE | 32 - PPC | KVM_REG_PPC_LPCR | 64 + PPC | KVM_REG_PPC_LPCR | 32 + PPC | KVM_REG_PPC_LPCR_64 | 64 PPC | KVM_REG_PPC_PPR | 64 PPC | KVM_REG_PPC_ARCH_COMPAT 32 PPC | KVM_REG_PPC_DABRX | 32
Makefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 3 PATCHLEVEL = 16 -SUBLEVEL = 1 +SUBLEVEL = 2 EXTRAVERSION = NAME = Museum of Fishiegoodies
arch/arm/boot/dts/am4372.dtsi +0 -3
@@ -168,9 +168,6 @@ ti,hwmods = "mailbox"; ti,mbox-num-users = <4>; ti,mbox-num-fifos = <8>; - ti,mbox-names = "wkup_m3"; - ti,mbox-data = <0 0 0 0>; - status = "disabled"; }; timer1: timer@44e31000 {
arch/arm/include/asm/unistd.h +10 -0
@@ -15,7 +15,17 @@#include <uapi/asm/unistd.h> +/* +* This may need to be greater than __NR_last_syscall+1 in order to +* account for the padding in the syscall table +*/ #define __NR_syscalls (384) + +/* +* *NOTE*: This is a ghost syscall private to the kernel. Only the +* __kuser_cmpxchg code in entry-armv.S should be aware of its +* existence. Don't ever use this from user code. +*/ #define __ARM_NR_cmpxchg (__ARM_NR_BASE+0x00fff0)#define __ARCH_WANT_STAT64
arch/arm/include/uapi/asm/unistd.h +0 -11
@@ -411,11 +411,6 @@#define __NR_renameat2 (__NR_SYSCALL_BASE+382)/* -* This may need to be greater than __NR_last_syscall+1 in order to -* account for the padding in the syscall table -*/ - -/* * The following SWIs are ARM private. */ #define __ARM_NR_BASE (__NR_SYSCALL_BASE+0x0f0000)
@@ -426,12 +421,6 @@#define __ARM_NR_set_tls (__ARM_NR_BASE+5)/* -* *NOTE*: This is a ghost syscall private to the kernel. Only the -* __kuser_cmpxchg code in entry-armv.S should be aware of its -* existence. Don't ever use this from user code. -*/ - -/* * The following syscalls are obsolete and no longer available for EABI. */ #if !defined(__KERNEL__)
arch/arm/mach-omap2/control.c +2 -1
@@ -314,7 +314,8 @@ void omap3_save_scratchpad_contents(void) scratchpad_contents.public_restore_ptr =virt_to_phys (omap3_restore_3630); else if (omap_rev() != OMAP3430_REV_ES3_0 && - omap_rev() != OMAP3430_REV_ES3_1) + omap_rev() != OMAP3430_REV_ES3_1 && + omap_rev() != OMAP3430_REV_ES3_1_2) scratchpad_contents.public_restore_ptr =virt_to_phys (omap3_restore); else
arch/arm/mach-omap2/omap_hwmod.c +4 -0
@@ -2185,6 +2185,8 @@ static int _enable(struct omap_hwmod *oh) oh->mux->pads_dynamic))) {omap_hwmod_mux (oh->mux, _HWMOD_STATE_ENABLED);_reconfigure_io_chain (); + } else if (oh->flags & HWMOD_FORCE_MSTANDBY) { +_reconfigure_io_chain (); }_add_initiator_dep (oh, mpu_oh);
@@ -2291,6 +2293,8 @@ static int _idle(struct omap_hwmod *oh)if (oh->mux && oh->mux->pads_dynamic) {omap_hwmod_mux (oh->mux, _HWMOD_STATE_IDLE);_reconfigure_io_chain (); + }else if (oh->flags &HWMOD_FORCE_MSTANDBY ) { +_reconfigure_io_chain (); } oh->_state = _HWMOD_STATE_IDLE;
arch/arm64/include/asm/cacheflush.h +1 -10
@@ -138,19 +138,10 @@ static inline void __flush_icache_all(void)#define flush_icache_page (vma,page) do { } while (0)/* -* flush_cache_vmap() is used when creating mappings (eg, via vmap, -* vmalloc, ioremap etc) in kernel space for pages. On non-VIPT -* caches, since the direct-mappings of these pages may contain cached -* data, we need to do a full cache flush to ensure that writebacks -* don't corrupt data placed into these pages via the new mappings. +* Not required on AArch64 (PIPT or VIPT non-aliasing D-cache). */ static inline void flush_cache_vmap (unsigned long start,unsigned long end) { -/* -* set_pte_at() called from vmap_pte_range() does not -* have a DSB after cleaning the cache line. -*/ -dsb (ish); }static inline void flush_cache_vunmap (unsigned long start,unsigned long end)
arch/arm64/include/asm/pgtable.h +13 -0
@@ -138,6 +138,8 @@ extern struct page *empty_zero_page;#define pte_valid_user (pte) \ ((pte_val(pte) & (PTE_VALID | PTE_USER)) == (PTE_VALID | PTE_USER)) +#define pte_valid_not_user (pte) \ + ((pte_val(pte) & (PTE_VALID | PTE_USER)) == PTE_VALID)static inline pte_t pte_wrprotect (pte_t pte) {
@@ -184,6 +186,15 @@ static inline pte_t pte_mkspecial(pte_t pte)static inline void set_pte (pte_t *ptep,pte_t pte) { *ptep = pte; + +/* +* Only if the new pte is valid and kernel, otherwise TLB maintenance +* or update_mmu_cache() have the necessary barriers. +*/ +if (pte_valid_not_user (pte)) { +dsb (ishst); +isb (); + } }extern void __sync_icache_dcache (pte_t pteval,unsigned long addr);
@@ -303,6 +314,7 @@ static inline void set_pmd(pmd_t *pmdp, pmd_t pmd) { *pmdp = pmd;dsb (ishst); +isb (); }static inline void pmd_clear (pmd_t *pmdp)
@@ -333,6 +345,7 @@ static inline void set_pud(pud_t *pudp, pud_t pud) { *pudp = pud;dsb (ishst); +isb (); }static inline void pud_clear (pud_t *pudp)
arch/arm64/include/asm/tlbflush.h +3 -2
@@ -122,6 +122,7 @@ static inline void flush_tlb_kernel_range(unsigned long start, unsigned long endfor (addr = start; addr < end; addr +=1 << (PAGE_SHIFT -12 )) asm("tlbi vaae1is, %0" : :"r" (addr));dsb (ish); +isb (); }/*
@@ -131,8 +132,8 @@ static inline void update_mmu_cache(struct vm_area_struct *vma, unsigned long addr, pte_t *ptep) {/* -* set_pte() does not have a DSB, so make sure that the page table -* write is visible. +* set_pte() does not have a DSB for user mappings, so make sure that +* the page table write is visible. */ dsb (ishst ); }
arch/arm64/kernel/debug-monitors.c +11 -11
@@ -315,20 +315,20 @@ static int brk_handler(unsigned long addr, unsigned int esr, {siginfo_t info; -if (call_break_hook (regs, esr) ==DBG_HOOK_HANDLED ) -return 0 ; +if (user_mode (regs)) { + info = (siginfo_t ) { + .si_signo =SIGTRAP , + .si_errno =0 , + .si_code =TRAP_BRKPT , + .si_addr = (void __user *)instruction_pointer (regs), + }; -if (!user_mode (regs)) +force_sig_info (SIGTRAP , &info, current); + }else if (call_break_hook (regs, esr) !=DBG_HOOK_HANDLED ) { +pr_warning ("Unexpected kernel BRK exception at EL1\n" );return -EFAULT ; + } - info = (siginfo_t ) { - .si_signo =SIGTRAP , - .si_errno =0 , - .si_code =TRAP_BRKPT , - .si_addr = (void __user *)instruction_pointer (regs), - }; - -force_sig_info (SIGTRAP , &info, current);return 0 ; }
arch/arm64/kernel/efi.c +2 -0
@@ -464,6 +464,8 @@ static int __init arm64_enter_virtual_mode(void)set_bit (EFI_RUNTIME_SERVICES , &efi.flags); + efi.runtime_version = efi.systab->hdr.revision; +return 0 ; }early_initcall (arm64_enter_virtual_mode);
arch/mips/math-emu/cp1emu.c +1 -1
@@ -1827,7 +1827,7 @@ dcopuop:case -1 :if (cpu_has_mips_4_5_r) - cbit = fpucondbit[MIPSInst_RT (ir) >>2 ]; + cbit = fpucondbit[MIPSInst_FD (ir) >>2 ];else cbit =FPU_CSR_COND ;if (rv.w)
arch/powerpc/include/uapi/asm/kvm.h +1 -0
@@ -548,6 +548,7 @@ struct kvm_get_htab_header {#define KVM_REG_PPC_VRSAVE (KVM_REG_PPC | KVM_REG_SIZE_U32 | 0xb4)#define KVM_REG_PPC_LPCR (KVM_REG_PPC | KVM_REG_SIZE_U32 | 0xb5) +#define KVM_REG_PPC_LPCR_64 (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0xb5)#define KVM_REG_PPC_PPR (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0xb6)/* Architecture compatibility level */
arch/powerpc/kernel/eeh_pe.c +13 -33
66 lines not on this page · raw message
arch/powerpc/kvm/book3s_hv.c +11 -2
@@ -785,7 +785,8 @@ static int kvm_arch_vcpu_ioctl_set_sregs_hv(struct kvm_vcpu *vcpu,return 0 ; } -static void kvmppc_set_lpcr (struct kvm_vcpu *vcpu,u64 new_lpcr) +static void kvmppc_set_lpcr (struct kvm_vcpu *vcpu,u64 new_lpcr, +bool preserve_top32) {struct kvmppc_vcore *vc = vcpu->arch.vcore;u64 mask;
@@ -820,6 +821,10 @@ static void kvmppc_set_lpcr(struct kvm_vcpu *vcpu, u64 new_lpcr) mask =LPCR_DPFD |LPCR_ILE |LPCR_TC ;if (cpu_has_feature (CPU_FTR_ARCH_207S )) mask |=LPCR_AIL ; + +/* Broken 32-bit version of LPCR must not clear top bits */ +if (preserve_top32) + mask &=0xFFFFFFFF ; vc->lpcr = (vc->lpcr & ~mask) | (new_lpcr & mask);spin_unlock (&vc->lock); }
@@ -939,6 +944,7 @@ static int kvmppc_get_one_reg_hv(struct kvm_vcpu *vcpu, u64 id, *val =get_reg_val (id, vcpu->arch.vcore->tb_offset);break ;case KVM_REG_PPC_LPCR : +case KVM_REG_PPC_LPCR_64 : *val =get_reg_val (id, vcpu->arch.vcore->lpcr);break ;case KVM_REG_PPC_PPR :
@@ -1150,7 +1156,10 @@ static int kvmppc_set_one_reg_hv(struct kvm_vcpu *vcpu, u64 id,ALIGN (set_reg_val (id, *val),1UL <<24 );break ;case KVM_REG_PPC_LPCR : -kvmppc_set_lpcr (vcpu,set_reg_val (id, *val)); +kvmppc_set_lpcr (vcpu,set_reg_val (id, *val), true); +break ; +case KVM_REG_PPC_LPCR_64 : +kvmppc_set_lpcr (vcpu,set_reg_val (id, *val), false);break ;case KVM_REG_PPC_PPR : vcpu->arch.ppr =set_reg_val (id, *val);
arch/powerpc/kvm/book3s_pr.c +2 -0
@@ -1233,6 +1233,7 @@ static int kvmppc_get_one_reg_pr(struct kvm_vcpu *vcpu, u64 id, *val =get_reg_val (id,to_book3s (vcpu)->hior);break ;case KVM_REG_PPC_LPCR : +case KVM_REG_PPC_LPCR_64 :/* * We are only interested in the LPCR_ILE bit */
@@ -1268,6 +1269,7 @@ static int kvmppc_set_one_reg_pr(struct kvm_vcpu *vcpu, u64 id,to_book3s (vcpu)->hior_explicit = true;break ;case KVM_REG_PPC_LPCR : +case KVM_REG_PPC_LPCR_64 :kvmppc_set_lpcr_pr (vcpu,set_reg_val (id, *val));break ;default :
arch/powerpc/platforms/powernv/pci-ioda.c +1 -0
@@ -491,6 +491,7 @@ static int pnv_pci_ioda_dma_set_mask(struct pnv_phb *phb,set_dma_ops (&pdev->dev, &dma_iommu_ops);set_iommu_table_base (&pdev->dev, &pe->tce32_table); } + *pdev->dev.dma_mask = dma_mask;return 0 ; }
arch/powerpc/platforms/pseries/pci_dlpar.c +2 -2
@@ -118,10 +118,10 @@ int remove_phb_dynamic(struct pci_controller *phb) } } -/* Unregister the bridge device from sysfs and remove the PCI bus */ -device_unregister (b->bridge); +/* Remove the PCI bus and unregister the bridge device from sysfs */ phb->bus =NULL ;pci_remove_bus (b); +device_unregister (b->bridge);/* Now release the IO resource */ if (res->flags &IORESOURCE_IO )
arch/s390/mm/pgtable.c +3 -2
@@ -1279,6 +1279,7 @@ static unsigned long page_table_realloc_pmd(struct mmu_gather *tlb, {unsigned long next, *table, *new;struct page *page; +spinlock_t *ptl;pmd_t *pmd; pmd =pmd_offset (pud, addr);
@@ -1296,7 +1297,7 @@ again:if (!new)return -ENOMEM ; -spin_lock (&mm->page_table_lock); + ptl =pmd_lock (mm, pmd);if (likely ((unsigned long *)pmd_deref (*pmd) == table)) {/* Nuke pmd entry pointing to the "short" page table */ pmdp_flush_lazy (mm, addr, pmd);
@@ -1310,7 +1311,7 @@ again:page_table_free_rcu (tlb, table); new =NULL ; } -spin_unlock (&mm->page_table_lock); +spin_unlock (ptl);if (new) {page_table_free_pgste (new); goto again;
arch/x86/Kconfig +1 -0
@@ -1537,6 +1537,7 @@ config EFI config EFI_STUB bool "EFI stub support" depends on EFI + select RELOCATABLE ---help--- This kernel feature allows a bzImage to be loaded directly by EFI firmware without the use of a bootloader.
arch/x86/include/asm/kvm_host.h +1 -1
@@ -95,7 +95,7 @@ static inline gfn_t gfn_to_index(gfn_t gfn, gfn_t base_gfn, int level)#define KVM_REFILL_PAGES 25#define KVM_MAX_CPUID_ENTRIES 80#define KVM_NR_FIXED_MTRR_REGION 88 -#define KVM_NR_VAR_MTRR 10 +#define KVM_NR_VAR_MTRR 8#define ASYNC_PF_PER_VCPU 64
arch/x86/include/asm/pgtable.h +7 -2
@@ -131,8 +131,13 @@ static inline int pte_exec(pte_t pte)static inline int pte_special (pte_t pte) { -return (pte_flags (pte) & (_PAGE_PRESENT|_PAGE_SPECIAL)) == - (_PAGE_PRESENT|_PAGE_SPECIAL); +/* +* See CONFIG_NUMA_BALANCING pte_numa in include/asm-generic/pgtable.h. +* On x86 we have _PAGE_BIT_NUMA == _PAGE_BIT_GLOBAL+1 == +* __PAGE_BIT_SOFTW1 == _PAGE_BIT_SPECIAL. +*/ +return (pte_flags (pte) & _PAGE_SPECIAL) && + (pte_flags (pte) & (_PAGE_PRESENT|_PAGE_PROTNONE)); }static inline unsigned long pte_pfn (pte_t pte)
arch/x86/kernel/cpu/mcheck/mce_intel.c +9 -9
@@ -42,7 +42,7 @@ static DEFINE_PER_CPU(mce_banks_t, mce_banks_owned);* cmci_discover_lock protects against parallel discovery attempts * which could race against each other. */ -static DEFINE_SPINLOCK (cmci_discover_lock); +static DEFINE_RAW_SPINLOCK (cmci_discover_lock);#define CMCI_THRESHOLD 1#define CMCI_POLL_INTERVAL (30 * HZ)
@@ -144,14 +144,14 @@ static void cmci_storm_disable_banks(void)int bank;u64 val; -spin_lock_irqsave (&cmci_discover_lock, flags); +raw_spin_lock_irqsave (&cmci_discover_lock, flags); owned =__get_cpu_var (mce_banks_owned);for_each_set_bit (bank, owned,MAX_NR_BANKS ) {rdmsrl (MSR_IA32_MCx_CTL2 (bank), val); val &= ~MCI_CTL2_CMCI_EN ;wrmsrl (MSR_IA32_MCx_CTL2 (bank), val); } -spin_unlock_irqrestore (&cmci_discover_lock, flags); +raw_spin_unlock_irqrestore (&cmci_discover_lock, flags); }static bool cmci_storm_detect (void )
@@ -211,7 +211,7 @@ static void cmci_discover(int banks)int i;int bios_wrong_thresh =0 ; -spin_lock_irqsave (&cmci_discover_lock, flags); +raw_spin_lock_irqsave (&cmci_discover_lock, flags);for (i =0 ; i < banks; i++) {u64 val;int bios_zero_thresh =0 ;
@@ -266,7 +266,7 @@ static void cmci_discover(int banks)WARN_ON (!test_bit (i,__get_cpu_var (mce_poll_banks))); } } -spin_unlock_irqrestore (&cmci_discover_lock, flags); +raw_spin_unlock_irqrestore (&cmci_discover_lock, flags);if (mca_cfg.bios_cmci_threshold && bios_wrong_thresh) {pr_info_once ("bios_cmci_threshold: Some banks do not have valid thresholds set\n" );
@@ -316,10 +316,10 @@ void cmci_clear(void)if (!cmci_supported (&banks))return ; -spin_lock_irqsave (&cmci_discover_lock, flags); +raw_spin_lock_irqsave (&cmci_discover_lock, flags);for (i =0 ; i < banks; i++)__cmci_disable_bank (i); -spin_unlock_irqrestore (&cmci_discover_lock, flags); +raw_spin_unlock_irqrestore (&cmci_discover_lock, flags); }static void cmci_rediscover_work_func (void *arg)
@@ -360,9 +360,9 @@ void cmci_disable_bank(int bank)if (!cmci_supported (&banks))return ; -spin_lock_irqsave (&cmci_discover_lock, flags); +raw_spin_lock_irqsave (&cmci_discover_lock, flags);__cmci_disable_bank (bank); -spin_unlock_irqrestore (&cmci_discover_lock, flags); +raw_spin_unlock_irqrestore (&cmci_discover_lock, flags); }static void intel_init_cmci (void )
arch/x86/kernel/resource.c +5 -3
@@ -37,10 +37,12 @@ static void remove_e820_regions(struct resource *avail)void arch_remove_reservations (struct resource *avail) { -/* Trim out BIOS areas (low 1MB and high 2MB) and E820 regions */ +/* +* Trim out BIOS area (high 2MB) and E820 regions. We do not remove +* the low 1MB unconditionally, as this area is needed for some ISA +* cards requiring a memory range, e.g. the i82365 PCMCIA controller. +*/ if (avail->flags &IORESOURCE_MEM ) { -if (avail->start <BIOS_END ) - avail->start =BIOS_END ;resource_clip (avail,BIOS_ROM_BASE ,BIOS_ROM_END );remove_e820_regions (avail);
arch/x86/kernel/vsyscall_64.c +4 -4
@@ -81,10 +81,10 @@ static void warn_bad_vsyscall(const char *level, struct pt_regs *regs,if (!show_unhandled_signals)return ; -pr_notice_ratelimited ("%s%s[%d] %s ip:%lx cs:%lx sp:%lx ax:%lx si:%lx di:%lx\n" , - level, current->comm,task_pid_nr (current), - message, regs->ip, regs->cs, - regs->sp, regs->ax, regs->si, regs->di); +printk_ratelimited ("%s%s[%d] %s ip:%lx cs:%lx sp:%lx ax:%lx si:%lx di:%lx\n" , + level, current->comm,task_pid_nr (current), + message, regs->ip, regs->cs, + regs->sp, regs->ax, regs->si, regs->di); }static int addr_to_vsyscall_nr (unsigned long addr)
arch/x86/kvm/emulate.c +4 -0
@@ -2017,6 +2017,7 @@ static int em_ret_far(struct x86_emulate_ctxt *ctxt) {int rc;unsigned long cs; +int cpl = ctxt->ops->cpl (ctxt); rc =emulate_pop (ctxt, &ctxt->_eip, ctxt->op_bytes);if (rc !=X86EMUL_CONTINUE )
@@ -2026,6 +2027,9 @@ static int em_ret_far(struct x86_emulate_ctxt *ctxt) rc =emulate_pop (ctxt, &cs, ctxt->op_bytes);if (rc !=X86EMUL_CONTINUE )return rc; +/* Outer-privilege level return is not implemented */ +if (ctxt->mode >=X86EMUL_MODE_PROT16 && (cs &3 ) > cpl) +return X86EMUL_UNHANDLEABLE ; rc =load_segment_descriptor (ctxt, (u16 )cs,VCPU_SREG_CS );return rc; }
arch/x86/kvm/irq.c +1 -1
@@ -108,7 +108,7 @@ int kvm_cpu_get_interrupt(struct kvm_vcpu *v) vector =kvm_cpu_get_extint (v); -if (kvm_apic_vid_enabled (v->kvm) || vector !=-1 ) +if (vector !=-1 )return vector;/* PIC */ return kvm_get_apic_interrupt (v);/* APIC */
arch/x86/kvm/lapic.c +39 -13
75 lines not on this page · raw message
arch/x86/pci/i386.c +4 -0
@@ -162,6 +162,10 @@ pcibios_align_resource(void *data, const struct resource *res,return start;if (start &0x300 ) start = (start +0x3ff ) & ~0x3ff ; + }else if (res->flags &IORESOURCE_MEM ) { +/* The low 1MB range is reserved for ISA cards */ +if (start <BIOS_END ) + start =BIOS_END ; }return start; }
arch/x86/xen/grant-table.c +5 -5
@@ -168,6 +168,7 @@ static int __init xlated_setup_gnttab_pages(void) {struct page **pages;xen_pfn_t *pfns; +void *vaddr;int rc;unsigned int i;unsigned long nr_grant_frames =gnttab_max_grant_frames ();
@@ -193,21 +194,20 @@ static int __init xlated_setup_gnttab_pages(void)for (i =0 ; i < nr_grant_frames; i++) pfns[i] =page_to_pfn (pages[i]); - rc =arch_gnttab_map_shared (pfns, nr_grant_frames, nr_grant_frames, - &xen_auto_xlat_grant_frames.vaddr); - -if (rc) { + vaddr =vmap (pages, nr_grant_frames,0 ,PAGE_KERNEL ); +if (!vaddr) {pr_warn ("%s Couldn't map %ld pfns rc:%d\n" , __func__, nr_grant_frames, rc);free_xenballooned_pages (nr_grant_frames, pages);kfree (pages);kfree (pfns); -return rc; +return -ENOMEM ; }kfree (pages); xen_auto_xlat_grant_frames.pfn = pfns; xen_auto_xlat_grant_frames.count = nr_grant_frames; + xen_auto_xlat_grant_frames.vaddr = vaddr;return 0 ; }
arch/x86/xen/time.c +1 -1
@@ -444,7 +444,7 @@ void xen_setup_timer(int cpu) irq =bind_virq_to_irqhandler (VIRQ_TIMER , cpu, xen_timer_interrupt,IRQF_PERCPU |IRQF_NOBALANCING |IRQF_TIMER | -IRQF_FORCE_RESUME , +IRQF_FORCE_RESUME |IRQF_EARLY_RESUME , name,NULL ); (void )xen_set_irq_priority (irq,XEN_IRQ_PRIORITY_MAX );
drivers/char/tpm/tpm_i2c_stm_st33.c +1 -0
@@ -714,6 +714,7 @@ tpm_st33_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id) }tpm_get_timeouts (chip); +tpm_do_selftest (chip);dev_info (chip->dev,"TPM I2C Initialized\n" );return 0 ;
drivers/crypto/ux500/cryp/cryp_core.c +12 -13
@@ -190,7 +190,7 @@ static void add_session_id(struct cryp_ctx *ctx)static irqreturn_t cryp_interrupt_handler (int irq,void *param) {struct cryp_ctx *ctx; -int i; +int count;struct cryp_device_data *device_data;if (param ==NULL ) {
@@ -215,12 +215,11 @@ static irqreturn_t cryp_interrupt_handler(int irq, void *param)if (cryp_pending_irq_src (device_data,CRYP_IRQ_SRC_OUTPUT_FIFO )) {if (ctx->outlen / ctx->blocksize >0 ) { -for (i =0 ; i < ctx->blocksize /4 ; i++) { - *(ctx->outdata) =readl_relaxed ( - &device_data->base->dout); - ctx->outdata +=4 ; - ctx->outlen -=4 ; - } + count = ctx->blocksize /4 ; + +readsl (&device_data->base->dout, ctx->outdata, count); + ctx->outdata += count; + ctx->outlen -= count;if (ctx->outlen ==0 ) { cryp_disable_irq_src(device_data,
@@ -230,12 +229,12 @@ static irqreturn_t cryp_interrupt_handler(int irq, void *param) }else if (cryp_pending_irq_src (device_data,CRYP_IRQ_SRC_INPUT_FIFO )) {if (ctx->datalen / ctx->blocksize >0 ) { -for (i =0 ; i < ctx->blocksize /4 ; i++) { -writel_relaxed (ctx->indata, - &device_data->base->din); - ctx->indata +=4 ; - ctx->datalen -=4 ; - } + count = ctx->blocksize /4 ; + +writesl (&device_data->base->din, ctx->indata, count); + + ctx->indata += count; + ctx->datalen -= count;if (ctx->datalen ==0 ) cryp_disable_irq_src(device_data,
drivers/gpu/drm/omapdrm/omap_dmm_tiler.c +4 -2
@@ -199,7 +199,7 @@ static struct dmm_txn *dmm_txn_init(struct dmm *dmm, struct tcm *tcm)static void dmm_txn_append (struct dmm_txn *txn,struct pat_area *area,struct page **pages,uint32_t npages,uint32_t roll) { -dma_addr_t pat_pa =0 ; +dma_addr_t pat_pa =0 , data_pa =0 ;uint32_t *data;struct pat *pat;struct refill_engine *engine = txn->engine_handle;
@@ -223,7 +223,9 @@ static void dmm_txn_append(struct dmm_txn *txn, struct pat_area *area, .lut_id = engine->tcm->lut_id, }; - data =alloc_dma (txn,4 *i, &pat->data_pa); + data =alloc_dma (txn,4 *i, &data_pa); +/* FIXME: what if data_pa is more than 32-bit ? */ + pat->data_pa = data_pa;while (i--) {int n = i + roll;
drivers/gpu/drm/omapdrm/omap_gem.c +5 -5
@@ -791,7 +791,7 @@ int omap_gem_get_paddr(struct drm_gem_object *obj, omap_obj->paddr =tiler_ssptr (block); omap_obj->block = block; -DBG ("got paddr: %08x" , omap_obj->paddr); +DBG ("got paddr: %pad" , &omap_obj->paddr); } omap_obj->paddr_cnt++;
@@ -985,9 +985,9 @@ void omap_gem_describe(struct drm_gem_object *obj, struct seq_file *m) off =drm_vma_node_start (&obj->vma_node); -seq_printf (m,"%08x: %2d (%2d) %08llx %08Zx (%2d) %p %4d" , +seq_printf (m,"%08x: %2d (%2d) %08llx %pad (%2d) %p %4d" , omap_obj->flags, obj->name, obj->refcount.refcount.counter, - off, omap_obj->paddr, omap_obj->paddr_cnt, + off, &omap_obj->paddr, omap_obj->paddr_cnt, omap_obj->vaddr, omap_obj->roll);if (omap_obj->flags &OMAP_BO_TILED ) {
@@ -1467,8 +1467,8 @@ void omap_gem_init(struct drm_device *dev) entry->paddr =tiler_ssptr (block); entry->block = block; -DBG ("%d:%d: %dx%d: paddr=%08x stride=%d" , i, j, w, h, - entry->paddr, +DBG ("%d:%d: %dx%d: paddr=%pad stride=%d" , i, j, w, h, + &entry->paddr, usergart[i].stride_pfn <<PAGE_SHIFT ); } }
drivers/gpu/drm/omapdrm/omap_plane.c +2 -2
@@ -142,8 +142,8 @@ static void omap_plane_pre_apply(struct omap_drm_apply *apply)DBG ("%dx%d -> %dx%d (%d)" , info->width, info->height, info->out_width, info->out_height, info->screen_width); -DBG ("%d,%d %08x %08x" , info->pos_x, info->pos_y, - info->paddr, info->p_uv_addr); +DBG ("%d,%d %pad %pad" , info->pos_x, info->pos_y, + &info->paddr, &info->p_uv_addr);/* TODO: */ ilace = false;
drivers/gpu/drm/radeon/cik.c +1 -0
@@ -3320,6 +3320,7 @@ static void cik_gpu_init(struct radeon_device *rdev) (rdev->pdev->device ==0x130B ) || (rdev->pdev->device ==0x130E ) || (rdev->pdev->device ==0x1315 ) || + (rdev->pdev->device ==0x1318 ) || (rdev->pdev->device == 0x131B)) { rdev->config.cik.max_cu_per_sh = 4; rdev->config.cik.max_backends_per_se =1 ;
drivers/hid/hid-cherry.c +1 -1
@@ -28,7 +28,7 @@static __u8 *ch_report_fixup (struct hid_device *hdev,__u8 *rdesc,unsigned int *rsize) { -if (*rsize >=17 && rdesc[11 ] ==0x3c && rdesc[12 ] ==0x02 ) { +if (*rsize >=18 && rdesc[11 ] ==0x3c && rdesc[12 ] ==0x02 ) {hid_info (hdev,"fixing up Cherry Cymotion report descriptor\n" ); rdesc[11 ] = rdesc[16 ] =0xff ; rdesc[12 ] = rdesc[17 ] =0x03 ;
drivers/hid/hid-kye.c +1 -1
@@ -300,7 +300,7 @@ static __u8 *kye_report_fixup(struct hid_device *hdev, __u8 *rdesc,* - change the button usage range to 4-7 for the extra * buttons */ - if (*rsize >= 74 && + if (*rsize >= 75 && rdesc[61] == 0x05 && rdesc[62] == 0x08 && rdesc[63] == 0x19 && rdesc[64] == 0x08 && rdesc[65] == 0x29 && rdesc[66] == 0x0f &&
drivers/hid/hid-lg.c +2 -2
@@ -345,14 +345,14 @@ static __u8 *lg_report_fixup(struct hid_device *hdev, __u8 *rdesc,struct usb_device_descriptor *udesc;__u16 bcdDevice, rev_maj, rev_min; -if ((drv_data->quirks &LG_RDESC ) && *rsize >=90 && rdesc[83 ] ==0x26 && +if ((drv_data->quirks &LG_RDESC ) && *rsize >=91 && rdesc[83 ] ==0x26 && rdesc[84 ] ==0x8c && rdesc[85 ] ==0x02 ) {hid_info (hdev,"fixing up Logitech keyboard report descriptor\n" ); rdesc[84 ] = rdesc[89 ] =0x4d ; rdesc[85 ] = rdesc[90 ] =0x10 ; } -if ((drv_data->quirks &LG_RDESC_REL_ABS ) && *rsize >=50 && +if ((drv_data->quirks &LG_RDESC_REL_ABS ) && *rsize >=51 && rdesc[32 ] ==0x81 && rdesc[33 ] ==0x06 && rdesc[49 ] ==0x81 && rdesc[50 ] ==0x06 ) { hid_info(hdev,
drivers/hid/hid-logitech-dj.c +7 -8
@@ -238,13 +238,6 @@ static void logi_dj_recv_add_djhid_device(struct dj_receiver_dev *djrcv_dev,return ; } -if ((dj_report->device_index <DJ_DEVICE_INDEX_MIN ) || - (dj_report->device_index >DJ_DEVICE_INDEX_MAX )) { -dev_err (&djrcv_hdev->dev,"%s: invalid device index:%d\n" , - __func__, dj_report->device_index); -return ; - } -if (djrcv_dev->paired_dj_devices[dj_report->device_index]) {/* The device is already known. No need to reallocate it. */ dbg_hid ("%s: device is already known\n" , __func__);
@@ -557,7 +550,7 @@ static int logi_dj_ll_raw_request(struct hid_device *hid,if (!out_buf)return -ENOMEM ; -if (count <DJREPORT_SHORT_LENGTH -2 ) +if (count >DJREPORT_SHORT_LENGTH -2 ) count =DJREPORT_SHORT_LENGTH -2 ; out_buf[0 ] =REPORT_ID_DJ_SHORT ;
@@ -690,6 +683,12 @@ static int logi_dj_raw_event(struct hid_device *hdev,* device (via hid_input_report() ) and return 1 so hid-core does not do * anything else with it. */ +if ((dj_report->device_index <DJ_DEVICE_INDEX_MIN ) || + (dj_report->device_index >DJ_DEVICE_INDEX_MAX )) { +dev_err (&hdev->dev,"%s: invalid device index:%d\n" , + __func__, dj_report->device_index); +return false; + }spin_lock_irqsave (&djrcv_dev->lock, flags);if (dj_report->report_id ==REPORT_ID_DJ_SHORT ) {
drivers/hid/hid-monterey.c +1 -1
@@ -24,7 +24,7 @@static __u8 *mr_report_fixup (struct hid_device *hdev,__u8 *rdesc,unsigned int *rsize) { -if (*rsize >=30 && rdesc[29 ] ==0x05 && rdesc[30 ] ==0x09 ) { +if (*rsize >=31 && rdesc[29 ] ==0x05 && rdesc[30 ] ==0x09 ) {hid_info (hdev,"fixing up button/consumer in HID report descriptor\n" ); rdesc[30 ] =0x0c ; }
drivers/hid/hid-petalynx.c +1 -1
@@ -25,7 +25,7 @@static __u8 *pl_report_fixup (struct hid_device *hdev,__u8 *rdesc,unsigned int *rsize) { -if (*rsize >=60 && rdesc[39 ] ==0x2a && rdesc[40 ] ==0xf5 && +if (*rsize >=62 && rdesc[39 ] ==0x2a && rdesc[40 ] ==0xf5 && rdesc[41 ] ==0x00 && rdesc[59 ] ==0x26 && rdesc[60 ] ==0xf9 && rdesc[61 ] ==0x00 ) {hid_info (hdev,"fixing up Petalynx Maxter Remote report descriptor\n" );
drivers/hid/hid-sunplus.c +1 -1
@@ -24,7 +24,7 @@static __u8 *sp_report_fixup (struct hid_device *hdev,__u8 *rdesc,unsigned int *rsize) { -if (*rsize >=107 && rdesc[104 ] ==0x26 && rdesc[105 ] ==0x80 && +if (*rsize >=112 && rdesc[104 ] ==0x26 && rdesc[105 ] ==0x80 && rdesc[106 ] ==0x03 ) {hid_info (hdev,"fixing up Sunplus Wireless Desktop report descriptor\n" ); rdesc[105 ] = rdesc[110 ] =0x03 ;
drivers/hwmon/ads1015.c +3 -1
@@ -198,7 +198,7 @@ static int ads1015_get_channels_config_of(struct i2c_client *client) } channel =be32_to_cpup (property); -if (channel >ADS1015_CHANNELS ) { +if (channel >=ADS1015_CHANNELS ) {dev_err (&client->dev,"invalid channel index %d on %s\n" , channel, node->full_name);
@@ -212,6 +212,7 @@ static int ads1015_get_channels_config_of(struct i2c_client *client)dev_err (&client->dev,"invalid gain on %s\n" , node->full_name); +return -EINVAL ; } }
@@ -222,6 +223,7 @@ static int ads1015_get_channels_config_of(struct i2c_client *client)dev_err (&client->dev,"invalid data_rate on %s\n" , node->full_name); +return -EINVAL ; } }
drivers/hwmon/amc6821.c +11 -6
@@ -360,11 +360,13 @@ static ssize_t set_pwm1_enable(if (config)return config; +mutex_lock (&data->update_lock); config =i2c_smbus_read_byte_data (client,AMC6821_REG_CONF1 );if (config <0 ) {dev_err (&client->dev,"Error reading configuration register, aborting.\n" ); -return config; + count = config; + goto unlock; }switch (val) {
@@ -381,14 +383,15 @@ static ssize_t set_pwm1_enable( config |=AMC6821_CONF1_FDRC1 ;break ;default : -return -EINVAL ; + count = -EINVAL ; + goto unlock; } -mutex_lock (&data->update_lock);if (i2c_smbus_write_byte_data (client,AMC6821_REG_CONF1 , config)) {dev_err (&client->dev,"Configuration register write error, aborting.\n" ); count = -EIO ; } +unlock:mutex_unlock (&data->update_lock);return count; }
@@ -493,8 +496,9 @@ static ssize_t set_temp_auto_point_temp(return -EINVAL ; } - data->valid =0 ;mutex_lock (&data->update_lock); + data->valid =0 ; +switch (ix) {case 0 : ptemp[0] = clamp_val(val / 1000, 0,
@@ -658,13 +662,14 @@ static ssize_t set_fan1_div(if (config)return config; +mutex_lock (&data->update_lock); config =i2c_smbus_read_byte_data (client,AMC6821_REG_CONF4 );if (config <0 ) {dev_err (&client->dev,"Error reading configuration register, aborting.\n" ); -return config; + count = config; + goto EXIT; } -mutex_lock (&data->update_lock);switch (val) {case 2 : config &= ~AMC6821_CONF4_PSPR ;
drivers/hwmon/dme1737.c +18 -15
@@ -247,8 +247,8 @@ struct dme1737_data {u8 pwm_acz[3 ];u8 pwm_freq[6 ];u8 pwm_rr[2 ]; -u8 zone_low[3 ]; -u8 zone_abs[3 ]; +s8 zone_low[3 ]; +s8 zone_abs[3 ];u8 zone_hyst[2 ];u32 alarms; };
@@ -277,7 +277,7 @@ static inline int IN_FROM_REG(int reg, int nominal, int res)return (reg * nominal + (3 << (res -3 ))) / (3 << (res -2 )); } -static inline int IN_TO_REG (int val,int nominal) +static inline int IN_TO_REG (long val,int nominal) {return clamp_val ((val *192 + nominal /2 ) / nominal,0 ,255 ); }
@@ -293,7 +293,7 @@ static inline int TEMP_FROM_REG(int reg, int res)return (reg *1000 ) >> (res -8 ); } -static inline int TEMP_TO_REG (int val) +static inline int TEMP_TO_REG (long val) {return clamp_val ((val <0 ? val -500 : val +500 ) /1000 ,-128 ,127 ); }
@@ -308,7 +308,7 @@ static inline int TEMP_RANGE_FROM_REG(int reg)return TEMP_RANGE [(reg >>4 ) &0x0f ]; } -static int TEMP_RANGE_TO_REG (int val,int reg) +static int TEMP_RANGE_TO_REG (long val,int reg) {int i;
@@ -331,7 +331,7 @@ static inline int TEMP_HYST_FROM_REG(int reg, int ix)return (((ix ==1 ) ? reg : reg >>4 ) &0x0f ) *1000 ; } -static inline int TEMP_HYST_TO_REG (int val,int ix,int reg) +static inline int TEMP_HYST_TO_REG (long val,int ix,int reg) {int hyst =clamp_val ((val +500 ) /1000 ,0 ,15 );
@@ -347,7 +347,7 @@ static inline int FAN_FROM_REG(int reg, int tpc)return (reg ==0 || reg ==0xffff ) ?0 :90000 *60 / reg; } -static inline int FAN_TO_REG (int val,int tpc) +static inline int FAN_TO_REG (long val,int tpc) {if (tpc) {return clamp_val (val / tpc,0 ,0xffff );
@@ -379,7 +379,7 @@ static inline int FAN_TYPE_FROM_REG(int reg)return (edge >0 ) ?1 << (edge -1 ) :0 ; } -static inline int FAN_TYPE_TO_REG (int val,int reg) +static inline int FAN_TYPE_TO_REG (long val,int reg) {int edge = (val ==4 ) ?3 : val;
@@ -402,7 +402,7 @@ static int FAN_MAX_FROM_REG(int reg)return 1000 + i *500 ; } -static int FAN_MAX_TO_REG (int val) +static int FAN_MAX_TO_REG (long val) {int i;
@@ -460,7 +460,7 @@ static inline int PWM_ACZ_FROM_REG(int reg)return acz[(reg >>5 ) &0x07 ]; } -static inline int PWM_ACZ_TO_REG (int val,int reg) +static inline int PWM_ACZ_TO_REG (long val,int reg) {int acz = (val ==4 ) ?2 : val -1 ;
@@ -476,7 +476,7 @@ static inline int PWM_FREQ_FROM_REG(int reg)return PWM_FREQ [reg &0x0f ]; } -static int PWM_FREQ_TO_REG (int val,int reg) +static int PWM_FREQ_TO_REG (long val,int reg) {int i;
@@ -510,7 +510,7 @@ static inline int PWM_RR_FROM_REG(int reg, int ix)return (rr &0x08 ) ?PWM_RR [rr &0x07 ] :0 ; } -static int PWM_RR_TO_REG (int val,int ix,int reg) +static int PWM_RR_TO_REG (long val,int ix,int reg) {int i;
@@ -528,7 +528,7 @@ static inline int PWM_RR_EN_FROM_REG(int reg, int ix)return PWM_RR_FROM_REG (reg, ix) ?1 :0 ; } -static inline int PWM_RR_EN_TO_REG (int val,int ix,int reg) +static inline int PWM_RR_EN_TO_REG (long val,int ix,int reg) {int en = (ix ==1 ) ?0x80 :0x08 ;
@@ -1481,13 +1481,16 @@ static ssize_t set_vrm(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) {struct dme1737_data *data =dev_get_drvdata (dev); -long val; +unsigned long val;int err; - err =kstrtol (buf,10 , &val); + err =kstrtoul (buf,10 , &val);if (err)return err; +if (val >255 ) +return -EINVAL ; + data->vrm = val;return count; }
drivers/hwmon/gpio-fan.c +1 -1
@@ -173,7 +173,7 @@ static int get_fan_speed_index(struct gpio_fan_data *fan_data)return -ENODEV ; } -static int rpm_to_speed_index (struct gpio_fan_data *fan_data,int rpm) +static int rpm_to_speed_index (struct gpio_fan_data *fan_data,unsigned long rpm) {struct gpio_fan_speed *speed = fan_data->speed;int i;
drivers/hwmon/lm78.c +1 -1
@@ -108,7 +108,7 @@ static inline int FAN_FROM_REG(u8 val, int div)* TEMP: mC (-128C to +127C) * REG: 1C/bit, two's complement */ -static inline s8 TEMP_TO_REG (int val) +static inline s8 TEMP_TO_REG (long val) {int nval =clamp_val (val,-128000 ,127000 ) ;return nval <0 ? (nval -500 ) /1000 : (nval +500 ) /1000 ;
drivers/hwmon/lm85.c +6 -3
@@ -155,7 +155,7 @@ static inline u16 FAN_TO_REG(unsigned long val)/* Temperature is reported in .001 degC increments */ #define TEMP_TO_REG (val) \ - clamp_val(SCALE(val, 1000, 1), -127, 127) + DIV_ROUND_CLOSEST(clamp_val((val), -127000, 127000), 1000)#define TEMPEXT_FROM_REG (val, ext) \ SCALE(((val) << 4) + (ext), 16, 1000)#define TEMP_FROM_REG (val) ((val) * 1000)
@@ -189,7 +189,7 @@ static const int lm85_range_map[] = { 13300, 16000, 20000, 26600, 32000, 40000, 53300, 80000 }; -static int RANGE_TO_REG (int range) +static int RANGE_TO_REG (long range) {int i;
@@ -211,7 +211,7 @@ static const int adm1027_freq_map[8] = { /* 1 Hz */ 11, 15, 22, 29, 35, 44, 59, 88 }; -static int FREQ_TO_REG (const int *map,int freq) +static int FREQ_TO_REG (const int *map,unsigned long freq) {int i;
@@ -460,6 +460,9 @@ static ssize_t store_vrm_reg(struct device *dev, struct device_attribute *attr,if (err)return err; +if (val >255 ) +return -EINVAL ; + data->vrm = val;return count; }
drivers/hwmon/lm92.c +6 -7
@@ -74,12 +74,9 @@ static inline int TEMP_FROM_REG(s16 reg)return reg /8 *625 /10 ; } -static inline s16 TEMP_TO_REG (int val) +static inline s16 TEMP_TO_REG (long val) { -if (val <=-60000 ) -return -60000 *10 /625 *8 ; -if (val >=160000 ) -return 160000 *10 /625 *8 ; + val =clamp_val (val,-60000 ,160000 );return val *10 /625 *8 ; }
@@ -206,10 +203,12 @@ static ssize_t set_temp_hyst(struct device *dev,if (err)return err; + val =clamp_val (val,-120000 ,220000 );mutex_lock (&data->update_lock); - data->temp[t_hyst] =TEMP_FROM_REG (data->temp[attr->index]) - val; + data->temp[t_hyst] = +TEMP_TO_REG (TEMP_FROM_REG (data->temp[attr->index]) - val);i2c_smbus_write_word_swapped (client,LM92_REG_TEMP_HYST , -TEMP_TO_REG (data->temp[t_hyst])); + data->temp[t_hyst]);mutex_unlock (&data->update_lock);return count; }
drivers/hwmon/sis5595.c +1 -1
@@ -159,7 +159,7 @@ static inline int TEMP_FROM_REG(s8 val) {return val *830 +52120 ; } -static inline s8 TEMP_TO_REG (int val) +static inline s8 TEMP_TO_REG (long val) {int nval =clamp_val (val,-54120 ,157530 ) ;return nval <0 ? (nval -5212 -415 ) /830 : (nval -5212 +415 ) /830 ;
drivers/i2c/busses/i2c-at91.c +2 -2
@@ -210,7 +210,7 @@ static void at91_twi_write_data_dma_callback(void *data)struct at91_twi_dev *dev = (struct at91_twi_dev *)data;dma_unmap_single (dev->dev,sg_dma_address (&dev->dma.sg), - dev->buf_len,DMA_MEM_TO_DEV ); + dev->buf_len,DMA_TO_DEVICE );at91_twi_write (dev,AT91_TWI_CR ,AT91_TWI_STOP ); }
@@ -289,7 +289,7 @@ static void at91_twi_read_data_dma_callback(void *data)struct at91_twi_dev *dev = (struct at91_twi_dev *)data;dma_unmap_single (dev->dev,sg_dma_address (&dev->dma.sg), - dev->buf_len,DMA_DEV_TO_MEM ); + dev->buf_len,DMA_FROM_DEVICE );/* The last two bytes have to be read without using dma */ dev->buf += dev->buf_len -2 ;
drivers/i2c/busses/i2c-rk3x.c +1 -1
@@ -399,7 +399,7 @@ static irqreturn_t rk3x_i2c_irq(int irqno, void *dev_id) }/* is there anything left to handle? */ -if (unlikely (ipd ==0 )) +if (unlikely ((ipd ®_INT_ALL ) ==0 )) goto out;switch (i2c->state) {
drivers/misc/mei/client.c +8 -10
@@ -459,7 +459,7 @@ int mei_cl_disconnect(struct mei_cl *cl) {struct mei_device *dev;struct mei_cl_cb *cb; -int rets, err; +int rets;if (WARN_ON (!cl || !cl->dev))return -ENODEV ;
@@ -491,6 +491,7 @@ int mei_cl_disconnect(struct mei_cl *cl)cl_err (dev, cl,"failed to disconnect.\n" ); goto free; } + cl->timer_count =MEI_CONNECT_TIMEOUT ;mdelay (10 );/* Wait for hardware disconnection ready */ list_add_tail (&cb->list, &dev->ctrl_rd_list.list); }else {
@@ -500,23 +501,18 @@ int mei_cl_disconnect(struct mei_cl *cl) }mutex_unlock (&dev->device_lock); - err =wait_event_timeout (dev->wait_recvd_msg, +wait_event_timeout (dev->wait_recvd_msg,MEI_FILE_DISCONNECTED == cl->state,mei_secs_to_jiffies (MEI_CL_CONNECT_TIMEOUT ));mutex_lock (&dev->device_lock); +if (MEI_FILE_DISCONNECTED == cl->state) { rets =0 ;cl_dbg (dev, cl,"successfully disconnected from FW client.\n" ); }else { - rets = -ENODEV ; -if (MEI_FILE_DISCONNECTED != cl->state) -cl_err (dev, cl,"wrong status client disconnect.\n" ); - -if (err) -cl_dbg (dev, cl,"wait failed disconnect err=%d\n" , err); - -cl_err (dev, cl,"failed to disconnect from FW client.\n" ); +cl_dbg (dev, cl,"timeout on disconnect from FW client.\n" ); + rets = -ETIME ; }mei_io_list_flush (&dev->ctrl_rd_list, cl);
@@ -605,6 +601,7 @@ int mei_cl_connect(struct mei_cl *cl, struct file *file) cl->timer_count =MEI_CONNECT_TIMEOUT ;list_add_tail (&cb->list, &dev->ctrl_rd_list.list); }else { + cl->state =MEI_FILE_INITIALIZING ;list_add_tail (&cb->list, &dev->ctrl_wr_list.list); }
@@ -616,6 +613,7 @@ int mei_cl_connect(struct mei_cl *cl, struct file *file)mutex_lock (&dev->device_lock);if (cl->state !=MEI_FILE_CONNECTED ) { + cl->state =MEI_FILE_DISCONNECTED ;/* something went really wrong */ if (!cl->status) cl->status = -EFAULT ;
drivers/misc/mei/nfc.c +5 -6
@@ -342,9 +342,10 @@ static int mei_nfc_send(struct mei_cl_device *cldev, u8 *buf, size_t length) ndev = (struct mei_nfc_dev *) cldev->priv_data; dev = ndev->cl->dev; + err = -ENOMEM ; mei_buf =kzalloc (length +MEI_NFC_HEADER_SIZE ,GFP_KERNEL );if (!mei_buf) -return -ENOMEM ; + goto out; hdr = (struct mei_nfc_hci_hdr *) mei_buf; hdr->cmd =MEI_NFC_CMD_HCI_SEND ;
@@ -354,12 +355,9 @@ static int mei_nfc_send(struct mei_cl_device *cldev, u8 *buf, size_t length) hdr->data_size = length;memcpy (mei_buf +MEI_NFC_HEADER_SIZE , buf, length); - err =__mei_cl_send (ndev->cl, mei_buf, length +MEI_NFC_HEADER_SIZE );if (err <0 ) -return err; - -kfree (mei_buf); + goto out;if (!wait_event_interruptible_timeout (ndev->send_wq, ndev->recv_req_id == ndev->req_id,HZ )) {
@@ -368,7 +366,8 @@ static int mei_nfc_send(struct mei_cl_device *cldev, u8 *buf, size_t length) }else { ndev->req_id++; } - +out: +kfree (mei_buf);return err; }
drivers/misc/mei/pci-me.c +1 -1
@@ -369,7 +369,7 @@ static int mei_me_pm_runtime_idle(struct device *device)if (!dev)return -ENODEV ;if (mei_write_is_idle (dev)) -pm_schedule_suspend (device,MEI_ME_RPM_TIMEOUT *2 ); +pm_runtime_autosuspend (device);return -EBUSY ; }
drivers/misc/mei/pci-txe.c +1 -1
@@ -306,7 +306,7 @@ static int mei_txe_pm_runtime_idle(struct device *device)if (!dev)return -ENODEV ;if (mei_write_is_idle (dev)) -pm_schedule_suspend (device,MEI_TXI_RPM_TIMEOUT *2 ); +pm_runtime_autosuspend (device);return -EBUSY ; }
drivers/mmc/host/mmci.c +17 -16
@@ -834,6 +834,10 @@ static void mmci_data_irq(struct mmci_host *host, struct mmc_data *data, unsigned int status) { + /* Make sure we have data to handle */ + if (!data) + return; +/* First check for errors */ if (status & (MCI_DATACRCFAIL |MCI_DATATIMEOUT |MCI_STARTBITERR |MCI_TXUNDERRUN |MCI_RXOVERRUN )) {
@@ -902,9 +906,17 @@ mmci_cmd_irq(struct mmci_host *host, struct mmc_command *cmd, unsigned int status) {void __iomem *base = host->base; -bool sbc = (cmd == host->mrq->sbc); -bool busy_resp = host->variant->busy_detect && - (cmd->flags &MMC_RSP_BUSY ); +bool sbc, busy_resp; + +if (!cmd) +return ; + + sbc = (cmd == host->mrq->sbc); + busy_resp = host->variant->busy_detect && (cmd->flags &MMC_RSP_BUSY ); + +if (!((status|host->busy_status) & (MCI_CMDCRCFAIL |MCI_CMDTIMEOUT | +MCI_CMDSENT |MCI_CMDRESPEND ))) +return ;/* Check if we need to wait for busy completion. */ if (host->busy_status && (status &MCI_ST_CARDBUSY ))
@@ -1132,9 +1144,6 @@ static irqreturn_t mmci_irq(int irq, void *dev_id)spin_lock (&host->lock); do { - struct mmc_command *cmd; - struct mmc_data *data; - status = readl(host->base + MMCISTATUS); if (host->singleirq) {
@@ -1154,16 +1163,8 @@ static irqreturn_t mmci_irq(int irq, void *dev_id)dev_dbg (mmc_dev (host->mmc),"irq0 (data+cmd) %08x\n" , status); - cmd = host->cmd; -if ((status|host->busy_status) & (MCI_CMDCRCFAIL |MCI_CMDTIMEOUT | -MCI_CMDSENT |MCI_CMDRESPEND ) && cmd) -mmci_cmd_irq (host, cmd, status); - - data = host->data; -if (status & (MCI_DATACRCFAIL |MCI_DATATIMEOUT |MCI_STARTBITERR | -MCI_TXUNDERRUN |MCI_RXOVERRUN |MCI_DATAEND | -MCI_DATABLOCKEND ) && data) -mmci_data_irq (host, data, status); +mmci_cmd_irq (host, host->cmd, status); +mmci_data_irq (host, host->data, status);/* Don't poll for busy completion in irq context. */ if (host->busy_status)
drivers/pci/hotplug/pciehp_hpc.c +1 -1
@@ -794,7 +794,7 @@ struct controller *pcie_init(struct pcie_device *dev)pcie_capability_write_word (pdev,PCI_EXP_SLTSTA ,PCI_EXP_SLTSTA_ABP |PCI_EXP_SLTSTA_PFD |PCI_EXP_SLTSTA_MRLSC |PCI_EXP_SLTSTA_PDC | -PCI_EXP_SLTSTA_CC ); +PCI_EXP_SLTSTA_CC |PCI_EXP_SLTSTA_DLLSC );/* Disable software notification */ pcie_disable_notification (ctrl);
drivers/pci/pci-label.c +12 -6
@@ -161,8 +161,8 @@ enum acpi_attr_enum {static void dsm_label_utf16s_to_utf8s (union acpi_object *obj,char *buf) {int len; - len =utf16s_to_utf8s ((const wchar_t *)obj->string.pointer, - obj->string.length, + len =utf16s_to_utf8s ((const wchar_t *)obj->buffer.pointer, + obj->buffer.length,UTF16_LITTLE_ENDIAN , buf,PAGE_SIZE ); buf[len] ='\n' ;
@@ -187,16 +187,22 @@ static int dsm_get_label(struct device *dev, char *buf, tmp = obj->package.elements;if (obj->type ==ACPI_TYPE_PACKAGE && obj->package.count ==2 && tmp[0 ].type ==ACPI_TYPE_INTEGER && - tmp[1 ].type ==ACPI_TYPE_STRING ) { + (tmp[1 ].type ==ACPI_TYPE_STRING || + tmp[1 ].type ==ACPI_TYPE_BUFFER )) {/* * The second string element is optional even when * this _DSM is implemented; when not implemented, * this entry must return a null string. */ -if (attr ==ACPI_ATTR_INDEX_SHOW ) +if (attr ==ACPI_ATTR_INDEX_SHOW ) {scnprintf (buf,PAGE_SIZE ,"%llu\n" , tmp->integer.value); -else if (attr ==ACPI_ATTR_LABEL_SHOW ) -dsm_label_utf16s_to_utf8s (tmp +1 , buf); + }else if (attr ==ACPI_ATTR_LABEL_SHOW ) { +if (tmp[1 ].type ==ACPI_TYPE_STRING ) +scnprintf (buf,PAGE_SIZE ,"%s\n" , + tmp[1 ].string.pointer); +else if (tmp[1 ].type ==ACPI_TYPE_BUFFER ) +dsm_label_utf16s_to_utf8s (tmp +1 , buf); + } len =strlen (buf) >0 ?strlen (buf) :-1 ; }
drivers/pci/pci.c +6 -6
@@ -839,12 +839,6 @@ int pci_set_power_state(struct pci_dev *dev, pci_power_t state)if (!__pci_complete_power_transition (dev, state)) error =0 ; -/* -* When aspm_policy is "powersave" this call ensures -* that ASPM is configured. -*/ -if (!error && dev->bus->self) -pcie_aspm_powersave_config_link (dev->bus->self);return error; }
@@ -1195,12 +1189,18 @@ int __weak pcibios_enable_device(struct pci_dev *dev, int bars)static int do_pci_enable_device (struct pci_dev *dev,int bars) {int err; +struct pci_dev *bridge;u16 cmd;u8 pin; err =pci_set_power_state (dev,PCI_D0 );if (err <0 && err != -EIO )return err; + + bridge =pci_upstream_bridge (dev); +if (bridge) +pcie_aspm_powersave_config_link (bridge); + err =pcibios_enable_device (dev, bars);if (err <0 )return err;
drivers/pci/setup-res.c +7 -0
@@ -320,9 +320,11 @@ int pci_reassign_resource(struct pci_dev *dev, int resno, resource_size_t addsiz resource_size_t min_align) {struct resource *res = dev->resource + resno; +unsigned long flags;resource_size_t new_size;int ret; + flags = res->flags; res->flags |=IORESOURCE_UNSET ;if (!res->parent) { dev_info(&dev->dev, "BAR %d: can't reassign an unassigned resource %pR\n",
@@ -339,7 +341,12 @@ int pci_reassign_resource(struct pci_dev *dev, int resno, resource_size_t addsizdev_info (&dev->dev,"BAR %d: reassigned %pR\n" , resno, res);if (resno <PCI_BRIDGE_RESOURCES )pci_update_resource (dev, resno); + }else { + res->flags = flags; +dev_info (&dev->dev,"BAR %d: %pR (failed to expand by %#llx)\n" , + resno, res, (unsigned long long ) addsize); } +return ret; }
drivers/scsi/hpsa.c +3 -3
@@ -5092,7 +5092,7 @@ static int hpsa_big_passthru_ioctl(struct ctlr_info *h, void __user *argp) }if (ioc->Request.Type.Direction &XFER_WRITE ) {if (copy_from_user (buff[sg_used], data_ptr, sz)) { - status = -ENOMEM ; + status = -EFAULT ; goto cleanup1; } }else
@@ -6365,9 +6365,9 @@ static inline void hpsa_set_driver_support_bits(struct ctlr_info *h) {u32 driver_support; -#ifdef CONFIG_X86 -/* Need to enable prefetch in the SCSI core for 6400 in x86 */ driver_support =readl (&(h->cfgtable->driver_support)); +/* Need to enable prefetch in the SCSI core for 6400 in x86 */ +#ifdef CONFIG_X86 driver_support |=ENABLE_SCSI_PREFETCH ;#endif driver_support |=ENABLE_UNIT_ATTN ;
drivers/staging/et131x/et131x.c +27 -41
149 lines not on this page · raw message
drivers/staging/lustre/lustre/obdclass/class_obd.c +1 -1
@@ -35,7 +35,7 @@*/ #define DEBUG_SUBSYSTEM S_CLASS -# include <asm/atomic.h> +# include <linux/atomic.h> #include <obd_support.h> #include <obd_class.h>
drivers/staging/rtl8188eu/os_dep/usb_intf.c +2 -0
@@ -54,9 +54,11 @@ static struct usb_device_id rtw_usb_id_tbl[] = { {USB_DEVICE(USB_VENDER_ID_REALTEK, 0x0179)}, /* 8188ETV *//*=== Customer ID ===*/ /****** 8188EUS ********/ + {USB_DEVICE(0x056e, 0x4008)}, /* Elecom WDC-150SU2M */ {USB_DEVICE(0x07b8, 0x8179)}, /* Abocom - Abocom */ {USB_DEVICE(0x2001, 0x330F)}, /* DLink DWA-125 REV D1 */ {USB_DEVICE(0x2001, 0x3310)}, /* Dlink DWA-123 REV D1 */ + {USB_DEVICE(0x0df6, 0x0076)}, /* Sitecom N150 v2 */ {} /* Terminating entry */ };
drivers/tty/serial/serial_core.c +3 -0
@@ -243,6 +243,9 @@ static void uart_shutdown(struct tty_struct *tty, struct uart_state *state)/* * Turn off DTR and RTS early. */ +if (uart_console (uport) && tty) + uport->cons->cflag = tty->termios.c_cflag; +if (!tty || (tty->termios.c_cflag &HUPCL ))uart_clear_mctrl (uport,TIOCM_DTR |TIOCM_RTS );
drivers/usb/core/devio.c +1 -1
@@ -1509,7 +1509,7 @@ static int proc_do_submiturb(struct usb_dev_state *ps, struct usbdevfs_urb *uurb u = (is_in ?URB_DIR_IN :URB_DIR_OUT );if (uurb->flags &USBDEVFS_URB_ISO_ASAP ) u |=URB_ISO_ASAP ; -if (uurb->flags &USBDEVFS_URB_SHORT_NOT_OK ) +if (uurb->flags &USBDEVFS_URB_SHORT_NOT_OK && is_in) u |=URB_SHORT_NOT_OK ;if (uurb->flags &USBDEVFS_URB_NO_FSBR ) u |=URB_NO_FSBR ;
drivers/usb/core/hub.c +54 -4
90 lines not on this page · raw message
drivers/usb/host/ehci-hub.c +1 -1
@@ -1230,7 +1230,7 @@ int ehci_hub_control(if (selector ==EHSET_TEST_SINGLE_STEP_SET_FEATURE ) {spin_unlock_irqrestore (&ehci->lock, flags); retval =ehset_single_step_set_feature (hcd, - wIndex); + wIndex +1 );spin_lock_irqsave (&ehci->lock, flags);break ; }
drivers/usb/host/ehci-pci.c +25 -0
@@ -35,6 +35,21 @@ static const char hcd_name[] = "ehci-pci";#define PCI_DEVICE_ID_INTEL_CE4100_USB 0x2e70/*-------------------------------------------------------------------------*/ +#define PCI_DEVICE_ID_INTEL_QUARK_X1000_SOC 0x0939 +static inline bool is_intel_quark_x1000 (struct pci_dev *pdev) +{ +return pdev->vendor ==PCI_VENDOR_ID_INTEL && + pdev->device ==PCI_DEVICE_ID_INTEL_QUARK_X1000_SOC ; +} + +/* +* 0x84 is the offset of in/out threshold register, +* and it is the same offset as the register of 'hostpc'. +*/ +#define intel_quark_x1000_insnreg01 hostpc + +/* Maximum usable threshold value is 0x7f dwords for both IN and OUT */ +#define INTEL_QUARK_X1000_EHCI_MAX_THRESHOLD 0x007f007f/* called after powerup, by probe or system-pm "wakeup" */ static int ehci_pci_reinit (struct ehci_hcd *ehci,struct pci_dev *pdev)
@@ -50,6 +65,16 @@ static int ehci_pci_reinit(struct ehci_hcd *ehci, struct pci_dev *pdev)if (!retval)ehci_dbg (ehci,"MWI active\n" ); +/* Reset the threshold limit */ +if (is_intel_quark_x1000 (pdev)) { +/* +* For the Intel QUARK X1000, raise the I/O threshold to the +* maximum usable value in order to improve performance. +*/ +ehci_writel (ehci,INTEL_QUARK_X1000_EHCI_MAX_THRESHOLD , + ehci->regs->intel_quark_x1000_insnreg01); + } +return 0 ; }
drivers/usb/host/ohci-dbg.c +5 -4
@@ -236,7 +236,7 @@ ohci_dump_roothub ( } } -static void ohci_dump (struct ohci_hcd *controller,int verbose) +static void ohci_dump (struct ohci_hcd *controller) {ohci_dbg (controller,"OHCI controller state\n" );
@@ -464,15 +464,16 @@ show_list (struct ohci_hcd *ohci, char *buf, size_t count, struct ed *ed)static ssize_t fill_async_buffer (struct debug_buffer *buf) {struct ohci_hcd *ohci; -size_t temp; +size_t temp, size;unsigned long flags; ohci = buf->ohci; + size =PAGE_SIZE ;/* display control and bulk lists together, for simplicity */ spin_lock_irqsave (&ohci->lock, flags); - temp =show_list (ohci, buf->page, buf->count, ohci->ed_controltail); - temp +=show_list (ohci, buf->page + temp, buf->count - temp, + temp =show_list (ohci, buf->page, size, ohci->ed_controltail); + temp +=show_list (ohci, buf->page + temp, size - temp, ohci->ed_bulktail);spin_unlock_irqrestore (&ohci->lock, flags);
drivers/usb/host/ohci-hcd.c +5 -5
@@ -76,8 +76,8 @@ static const char hcd_name [] = "ohci_hcd";#include "ohci.h" #include "pci-quirks.h" -static void ohci_dump (struct ohci_hcd *ohci,int verbose); -static void ohci_stop (struct usb_hcd *hcd); +static void ohci_dump (struct ohci_hcd *ohci); +static void ohci_stop (struct usb_hcd *hcd);#include "ohci-hub.c" #include "ohci-dbg.c"
@@ -744,7 +744,7 @@ retry: ohci->ed_to_check =NULL ; } -ohci_dump (ohci,1 ); +ohci_dump (ohci);return 0 ; }
@@ -825,7 +825,7 @@ static irqreturn_t ohci_irq (struct usb_hcd *hcd)usb_hc_died (hcd); } -ohci_dump (ohci,1 ); +ohci_dump (ohci);ohci_usb_reset (ohci); }
@@ -925,7 +925,7 @@ static void ohci_stop (struct usb_hcd *hcd) {struct ohci_hcd *ohci =hcd_to_ohci (hcd); -ohci_dump (ohci,1 ); +ohci_dump (ohci);if (quirk_nec (ohci))flush_work (&ohci->nec_work);
drivers/usb/host/ohci-q.c +29 -17
74 lines not on this page · raw message
drivers/usb/host/xhci-pci.c +12 -1
@@ -101,6 +101,10 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci)/* AMD PLL quirk */ if (pdev->vendor ==PCI_VENDOR_ID_AMD &&usb_amd_find_chipset_info ()) xhci->quirks |=XHCI_AMD_PLL_FIX ; + +if (pdev->vendor ==PCI_VENDOR_ID_AMD ) + xhci->quirks |=XHCI_TRUST_TX_LENGTH ; +if (pdev->vendor ==PCI_VENDOR_ID_INTEL ) { xhci->quirks |=XHCI_LPM_SUPPORT ; xhci->quirks |=XHCI_INTEL_HOST ;
@@ -143,6 +147,7 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci) pdev->device == PCI_DEVICE_ID_ASROCK_P67) { xhci->quirks |=XHCI_RESET_ON_RESUME ; xhci->quirks |=XHCI_TRUST_TX_LENGTH ; + xhci->quirks |=XHCI_BROKEN_STREAMS ; }if (pdev->vendor ==PCI_VENDOR_ID_RENESAS && pdev->device ==0x0015 )
@@ -150,6 +155,11 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci)if (pdev->vendor ==PCI_VENDOR_ID_VIA ) xhci->quirks |=XHCI_RESET_ON_RESUME ; +/* See https://bugzilla.kernel.org/show_bug.cgi?id=79511 */ +if (pdev->vendor ==PCI_VENDOR_ID_VIA && + pdev->device ==0x3432 ) + xhci->quirks |=XHCI_BROKEN_STREAMS ; +if (xhci->quirks &XHCI_RESET_ON_RESUME )xhci_dbg_trace (xhci, trace_xhci_dbg_quirks,"QUIRK: Resetting on resume" );
@@ -230,7 +240,8 @@ static int xhci_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) goto put_usb3_hcd;/* Roothub already marked as USB 3.0 speed */ -if (HCC_MAX_PSA (xhci->hcc_params) >=4 ) +if (!(xhci->quirks &XHCI_BROKEN_STREAMS ) && +HCC_MAX_PSA (xhci->hcc_params) >=4 ) xhci->shared_hcd->can_do_streams =1 ;/* USB-2 and USB-3 roothubs initialized, allow runtime pm suspend */
drivers/usb/host/xhci-ring.c +41 -63
134 lines not on this page · raw message
drivers/usb/host/xhci.c +5 -1
@@ -2891,6 +2891,9 @@ void xhci_cleanup_stalled_ring(struct xhci_hcd *xhci, ep_index, ep->stopped_stream, ep->stopped_td, &deq_state); +if (!deq_state.new_deq_ptr || !deq_state.new_deq_seg) +return ; +/* HW with the reset endpoint quirk will use the saved dequeue state to * issue a configure endpoint command later. */
@@ -3163,7 +3166,8 @@ int xhci_alloc_streams(struct usb_hcd *hcd, struct usb_device *udev, num_streams);/* MaxPSASize value 0 (2 streams) means streams are not supported */ -if (HCC_MAX_PSA (xhci->hcc_params) <4 ) { +if ((xhci->quirks &XHCI_BROKEN_STREAMS ) || +HCC_MAX_PSA (xhci->hcc_params) <4 ) {xhci_dbg (xhci,"xHCI controller does not support streams.\n" );return -ENOSYS ; }
drivers/usb/host/xhci.h +2 -0
@@ -1558,6 +1558,8 @@ struct xhci_hcd {#define XHCI_PLAT (1 << 16)#define XHCI_SLOW_SUSPEND (1 << 17)#define XHCI_SPURIOUS_WAKEUP (1 << 18) +/* For controllers with a broken beyond repair streams implementation */ +#define XHCI_BROKEN_STREAMS (1 << 19)unsigned int num_active_eps;unsigned int limit_active_eps;/* There are two roothubs to keep track of bus suspend info for */
drivers/usb/serial/ftdi_sio.c +5 -0
@@ -151,6 +151,7 @@ static const struct usb_device_id id_table_combined[] = { { USB_DEVICE(FTDI_VID, FTDI_AMC232_PID) }, { USB_DEVICE(FTDI_VID, FTDI_CANUSB_PID) }, { USB_DEVICE(FTDI_VID, FTDI_CANDAPTER_PID) }, + { USB_DEVICE(FTDI_VID, FTDI_BM_ATOM_NANO_PID) }, { USB_DEVICE(FTDI_VID, FTDI_NXTCAM_PID) }, { USB_DEVICE(FTDI_VID, FTDI_EV3CON_PID) }, { USB_DEVICE(FTDI_VID, FTDI_SCS_DEVICE_0_PID) },
@@ -673,6 +674,8 @@ static const struct usb_device_id id_table_combined[] = { { USB_DEVICE(FTDI_VID, XSENS_CONVERTER_5_PID) }, { USB_DEVICE(FTDI_VID, XSENS_CONVERTER_6_PID) }, { USB_DEVICE(FTDI_VID, XSENS_CONVERTER_7_PID) }, + { USB_DEVICE(XSENS_VID, XSENS_CONVERTER_PID) }, + { USB_DEVICE(XSENS_VID, XSENS_MTW_PID) }, { USB_DEVICE(FTDI_VID, FTDI_OMNI1509) }, { USB_DEVICE(MOBILITY_VID, MOBILITY_USB_SERIAL_PID) }, { USB_DEVICE(FTDI_VID, FTDI_ACTIVE_ROBOTS_PID) },
@@ -945,6 +948,8 @@ static const struct usb_device_id id_table_combined[] = { { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_842_2_PID) }, { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_842_3_PID) }, { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_US_842_4_PID) }, +/* ekey Devices */ + { USB_DEVICE(FTDI_VID, FTDI_EKEY_CONV_USB_PID) },/* Infineon Devices */ { USB_DEVICE_INTERFACE_NUMBER(INFINEON_VID, INFINEON_TRIBOARD_PID, 1) }, { } /* Terminating entry */
drivers/usb/serial/ftdi_sio_ids.h +15 -5
@@ -42,6 +42,8 @@/* www.candapter.com Ewert Energy Systems CANdapter device */ #define FTDI_CANDAPTER_PID 0x9F80/* Product Id */ +#define FTDI_BM_ATOM_NANO_PID 0xa559/* Basic Micro ATOM Nano USB2Serial */ +/* * Texas Instruments XDS100v2 JTAG / BeagleBone A3 * http://processors.wiki.ti.com/index.php/XDS100
@@ -140,12 +142,15 @@/* * Xsens Technologies BV products (http://www.xsens.com). */ -#define XSENS_CONVERTER_0_PID 0xD388 -#define XSENS_CONVERTER_1_PID 0xD389 +#define XSENS_VID 0x2639 +#define XSENS_CONVERTER_PID 0xD00D/* Xsens USB-serial converter */ +#define XSENS_MTW_PID 0x0200/* Xsens MTw */ +#define XSENS_CONVERTER_0_PID 0xD388/* Xsens USB converter */ +#define XSENS_CONVERTER_1_PID 0xD389/* Xsens Wireless Receiver */ #define XSENS_CONVERTER_2_PID 0xD38A -#define XSENS_CONVERTER_3_PID 0xD38B -#define XSENS_CONVERTER_4_PID 0xD38C -#define XSENS_CONVERTER_5_PID 0xD38D +#define XSENS_CONVERTER_3_PID 0xD38B/* Xsens USB-serial converter */ +#define XSENS_CONVERTER_4_PID 0xD38C/* Xsens Wireless Receiver */ +#define XSENS_CONVERTER_5_PID 0xD38D/* Xsens Awinda Station */ #define XSENS_CONVERTER_6_PID 0xD38E#define XSENS_CONVERTER_7_PID 0xD38F
@@ -1375,3 +1380,8 @@#define BRAINBOXES_US_160_6_PID 0x9006/* US-160 16xRS232 1Mbaud Port 11 and 12 */ #define BRAINBOXES_US_160_7_PID 0x9007/* US-160 16xRS232 1Mbaud Port 13 and 14 */ #define BRAINBOXES_US_160_8_PID 0x9008/* US-160 16xRS232 1Mbaud Port 15 and 16 */ + +/* +* ekey biometric systems GmbH (http://ekey.net/) +*/ +#define FTDI_EKEY_CONV_USB_PID 0xCB08/* Converter USB */
drivers/usb/serial/whiteheat.c +6 -1
@@ -514,6 +514,10 @@ static void command_port_read_callback(struct urb *urb)dev_dbg (&urb->dev->dev,"%s - command_info is NULL, exiting.\n" , __func__);return ; } +if (!urb->actual_length) { +dev_dbg (&urb->dev->dev,"%s - empty response, exiting.\n" , __func__); +return ; + }if (status) {dev_dbg (&urb->dev->dev,"%s - nonzero urb status: %d\n" , __func__, status);if (status != -ENOENT )
@@ -534,7 +538,8 @@ static void command_port_read_callback(struct urb *urb)/* These are unsolicited reports from the firmware, hence no waiting command to wakeup */ dev_dbg (&urb->dev->dev,"%s - event received\n" , __func__); - }else if (data[0 ] ==WHITEHEAT_GET_DTR_RTS ) { + }else if ((data[0 ] ==WHITEHEAT_GET_DTR_RTS ) && + (urb->actual_length -1 <=sizeof (command_info->result_buffer))) {memcpy (command_info->result_buffer, &data[1 ], urb->actual_length -1 ); command_info->command_finished =WHITEHEAT_CMD_COMPLETE ;
drivers/usb/storage/uas.c +1 -1
@@ -1026,7 +1026,7 @@ static int uas_configure_endpoints(struct uas_dev_info *devinfo) usb_endpoint_num(&eps[3]->desc));if (udev->speed !=USB_SPEED_SUPER ) { - devinfo->qdepth =256 ; + devinfo->qdepth =32 ; devinfo->use_streams =0 ; }else { devinfo->qdepth = usb_alloc_streams(devinfo->intf, eps + 1,
drivers/xen/events/events_fifo.c +2 -3
@@ -67,10 +67,9 @@ static event_word_t *event_array[MAX_EVENT_ARRAY_PAGES] __read_mostly;static unsigned event_array_pages__read_mostly ;/* -* sync_set_bit() and friends must be unsigned long aligned on non-x86 -* platforms. +* sync_set_bit() and friends must be unsigned long aligned. */ -#if !defined(CONFIG_X86 ) &&BITS_PER_LONG >32 +#if BITS_PER_LONG >32 #define BM (w) (unsigned long *)((unsigned long)w & ~0x7UL)#define EVTCHN_FIFO_BIT (b, w) \
fs/btrfs/async-thread.c +36 -8
78 lines not on this page · raw message
fs/btrfs/async-thread.h +27 -1
@@ -19,12 +19,14 @@ #ifndef __BTRFS_ASYNC_THREAD_ #define __BTRFS_ASYNC_THREAD_ +#include <linux/workqueue.h> struct btrfs_workqueue; /* Internal use only */ struct __btrfs_workqueue; struct btrfs_work; typedef void (*btrfs_func_t)(struct btrfs_work *arg); +typedef void (*btrfs_work_func_t)(struct work_struct *arg); struct btrfs_work { btrfs_func_t func;
@@ -38,11 +40,35 @@ struct btrfs_work {unsigned long flags; }; +#define BTRFS_WORK_HELPER_PROTO (name) \ +void btrfs_##name(struct work_struct *arg) + +BTRFS_WORK_HELPER_PROTO (worker_helper); +BTRFS_WORK_HELPER_PROTO (delalloc_helper); +BTRFS_WORK_HELPER_PROTO (flush_delalloc_helper); +BTRFS_WORK_HELPER_PROTO (cache_helper); +BTRFS_WORK_HELPER_PROTO (submit_helper); +BTRFS_WORK_HELPER_PROTO (fixup_helper); +BTRFS_WORK_HELPER_PROTO (endio_helper); +BTRFS_WORK_HELPER_PROTO (endio_meta_helper); +BTRFS_WORK_HELPER_PROTO (endio_meta_write_helper); +BTRFS_WORK_HELPER_PROTO (endio_raid56_helper); +BTRFS_WORK_HELPER_PROTO (rmw_helper); +BTRFS_WORK_HELPER_PROTO (endio_write_helper); +BTRFS_WORK_HELPER_PROTO (freespace_write_helper); +BTRFS_WORK_HELPER_PROTO (delayed_meta_helper); +BTRFS_WORK_HELPER_PROTO (readahead_helper); +BTRFS_WORK_HELPER_PROTO (qgroup_rescan_helper); +BTRFS_WORK_HELPER_PROTO (extent_refs_helper); +BTRFS_WORK_HELPER_PROTO (scrub_helper); +BTRFS_WORK_HELPER_PROTO (scrubwrc_helper); +BTRFS_WORK_HELPER_PROTO (scrubnc_helper); +struct btrfs_workqueue *btrfs_alloc_workqueue (const char *name,int flags,int max_active,int thresh); -void btrfs_init_work (struct btrfs_work *work, +void btrfs_init_work (struct btrfs_work *work,btrfs_work_func_t helper,btrfs_func_t func,btrfs_func_t ordered_func,btrfs_func_t ordered_free);
fs/btrfs/backref.c +8 -6
@@ -276,9 +276,8 @@ static int add_all_parents(struct btrfs_root *root, struct btrfs_path *path, }if (ret >0 ) goto next; - ret =ulist_add_merge (parents, eb->start, - (uintptr_t )eie, - (u64 *)&old,GFP_NOFS ); + ret =ulist_add_merge_ptr (parents, eb->start, + eie, (void **)&old,GFP_NOFS );if (ret <0 )break ;if (!ret && extent_item_pos) {
@@ -1001,16 +1000,19 @@ again: ret = -EIO ; goto out; } +btrfs_tree_read_lock (eb); +btrfs_set_lock_blocking_rw (eb,BTRFS_READ_LOCK ); ret =find_extent_in_eb (eb, bytenr, *extent_item_pos, &eie); +btrfs_tree_read_unlock_blocking (eb);free_extent_buffer (eb);if (ret <0 ) goto out; ref->inode_list = eie; } - ret =ulist_add_merge (refs, ref->parent, - (uintptr_t )ref->inode_list, - (u64 *)&eie,GFP_NOFS ); + ret =ulist_add_merge_ptr (refs, ref->parent, + ref->inode_list, + (void **)&eie,GFP_NOFS );if (ret <0 ) goto out;if (!ret && extent_item_pos) {
fs/btrfs/btrfs_inode.h +0 -6
@@ -84,12 +84,6 @@ struct btrfs_inode {*/ struct list_head delalloc_inodes; -/* -* list for tracking inodes that must be sent to disk before a -* rename or truncate commit -*/ -struct list_head ordered_operations; -/* node for the red-black tree that links inodes in subvolume root */ struct rb_node rb_node;
fs/btrfs/delayed-inode.c +2 -2
@@ -1395,8 +1395,8 @@ static int btrfs_wq_run_delayed_node(struct btrfs_delayed_root *delayed_root,return -ENOMEM ; async_work->delayed_root = delayed_root; -btrfs_init_work (&async_work->work, btrfs_async_run_delayed_root, -NULL ,NULL ); +btrfs_init_work (&async_work->work, btrfs_delayed_meta_helper, + btrfs_async_run_delayed_root,NULL ,NULL ); async_work->nr = nr;btrfs_queue_work (root->fs_info->delayed_workers, &async_work->work);
fs/btrfs/disk-io.c +29 -56
128 lines not on this page · raw message
fs/btrfs/extent-tree.c +4 -3
@@ -552,7 +552,8 @@ static int cache_block_group(struct btrfs_block_group_cache *cache, caching_ctl->block_group = cache; caching_ctl->progress = cache->key.objectid;atomic_set (&caching_ctl->count,1 ); -btrfs_init_work (&caching_ctl->work, caching_thread,NULL ,NULL ); +btrfs_init_work (&caching_ctl->work, btrfs_cache_helper, + caching_thread,NULL ,NULL );spin_lock (&cache->lock);/*
@@ -2749,8 +2750,8 @@ int btrfs_async_run_delayed_refs(struct btrfs_root *root, async->sync =0 ;init_completion (&async->wait); -btrfs_init_work (&async->work, delayed_ref_async_start, -NULL ,NULL ); +btrfs_init_work (&async->work, btrfs_extent_refs_helper, + delayed_ref_async_start,NULL ,NULL );btrfs_queue_work (root->fs_info->extent_workers, &async->work);
fs/btrfs/extent_io.c +1 -0
@@ -2532,6 +2532,7 @@ static void end_bio_extent_readpage(struct bio *bio, int err)test_bit (BIO_UPTODATE , &bio->bi_flags);if (err) uptodate =0 ; + offset += len;continue ; } }
fs/btrfs/file-item.c +1 -1
@@ -756,7 +756,7 @@ again: found_next =1 ;if (ret !=0 ) goto insert; - slot =0 ; + slot = path->slots[0 ]; }btrfs_item_key_to_cpu (path->nodes[0 ], &found_key, slot); if (found_key.objectid != BTRFS_EXTENT_CSUM_OBJECTID ||
fs/btrfs/file.c +3 -19
@@ -1838,6 +1838,8 @@ out:int btrfs_release_file (struct inode *inode,struct file *filp) { +if (filp->private_data) +btrfs_ioctl_trans_end (filp);/* * ordered_data_close is set by settattr when we are about to truncate * a file from a non-zero size to a zero size. This tries to
@@ -1845,26 +1847,8 @@ int btrfs_release_file(struct inode *inode, struct file *filp)* application were using truncate to replace a file in place. */ if (test_and_clear_bit (BTRFS_INODE_ORDERED_DATA_CLOSE , - &BTRFS_I (inode)->runtime_flags)) { -struct btrfs_trans_handle *trans; -struct btrfs_root *root =BTRFS_I (inode)->root; - -/* -* We need to block on a committing transaction to keep us from -* throwing a ordered operation on to the list and causing -* something like sync to deadlock trying to flush out this -* inode. -*/ - trans =btrfs_start_transaction (root,0 ); -if (IS_ERR (trans)) -return PTR_ERR (trans); -btrfs_add_ordered_operation (trans,BTRFS_I (inode)->root, inode); -btrfs_end_transaction (trans, root); -if (inode->i_size >BTRFS_ORDERED_OPERATIONS_FLUSH_LIMIT ) + &BTRFS_I (inode)->runtime_flags))filemap_flush (inode->i_mapping); - } -if (filp->private_data) -btrfs_ioctl_trans_end (filp);return 0 ; }
fs/btrfs/inode.c +38 -56
168 lines not on this page · raw message
fs/btrfs/ordered-data.c +1 -123
148 lines not on this page · raw message
fs/btrfs/ordered-data.h +0 -5
@@ -190,11 +190,6 @@ int btrfs_ordered_update_i_size(struct inode *inode, u64 offset, struct btrfs_ordered_extent *ordered);int btrfs_find_ordered_sum (struct inode *inode,u64 offset,u64 disk_bytenr,u32 *sum,int len); -int btrfs_run_ordered_operations (struct btrfs_trans_handle *trans, -struct btrfs_root *root,int wait); -void btrfs_add_ordered_operation (struct btrfs_trans_handle *trans, -struct btrfs_root *root, -struct inode *inode);int btrfs_wait_ordered_extents (struct btrfs_root *root,int nr);void btrfs_wait_ordered_roots (struct btrfs_fs_info *fs_info,int nr); void btrfs_get_logged_extents(struct inode *inode,
fs/btrfs/qgroup.c +1 -0
@@ -2551,6 +2551,7 @@ qgroup_rescan_init(struct btrfs_fs_info *fs_info, u64 progress_objectid,memset (&fs_info->qgroup_rescan_work,0 ,sizeof (fs_info->qgroup_rescan_work));btrfs_init_work (&fs_info->qgroup_rescan_work, + btrfs_qgroup_rescan_helper, btrfs_qgroup_rescan_worker,NULL ,NULL );if (ret) {
fs/btrfs/raid56.c +6 -3
@@ -1416,7 +1416,8 @@ cleanup:static void async_rmw_stripe (struct btrfs_raid_bio *rbio) { -btrfs_init_work (&rbio->work, rmw_work,NULL ,NULL ); +btrfs_init_work (&rbio->work, btrfs_rmw_helper, + rmw_work,NULL ,NULL );btrfs_queue_work (rbio->fs_info->rmw_workers, &rbio->work);
@@ -1424,7 +1425,8 @@ static void async_rmw_stripe(struct btrfs_raid_bio *rbio)static void async_read_rebuild (struct btrfs_raid_bio *rbio) { -btrfs_init_work (&rbio->work, read_rebuild_work,NULL ,NULL ); +btrfs_init_work (&rbio->work, btrfs_rmw_helper, + read_rebuild_work,NULL ,NULL );btrfs_queue_work (rbio->fs_info->rmw_workers, &rbio->work);
@@ -1665,7 +1667,8 @@ static void btrfs_raid_unplug(struct blk_plug_cb *cb, bool from_schedule) plug = container_of(cb, struct btrfs_plug_cb, cb);if (from_schedule) { -btrfs_init_work (&plug->work, unplug_work,NULL ,NULL ); +btrfs_init_work (&plug->work, btrfs_rmw_helper, + unplug_work,NULL ,NULL );btrfs_queue_work (plug->info->rmw_workers, &plug->work);return ;
fs/btrfs/reada.c +2 -1
@@ -798,7 +798,8 @@ static void reada_start_machine(struct btrfs_fs_info *fs_info)/* FIXME we cannot handle this properly right now */ BUG (); } -btrfs_init_work (&rmw->work, reada_start_machine_worker,NULL ,NULL ); +btrfs_init_work (&rmw->work, btrfs_readahead_helper, + reada_start_machine_worker,NULL ,NULL ); rmw->fs_info = fs_info;btrfs_queue_work (fs_info->readahead_workers, &rmw->work);
fs/btrfs/scrub.c +8 -6
@@ -428,8 +428,8 @@ struct scrub_ctx *scrub_setup_ctx(struct btrfs_device *dev, int is_dev_replace) sbio->index = i; sbio->sctx = sctx; sbio->page_count =0 ; -btrfs_init_work (&sbio->work, scrub_bio_end_io_worker, -NULL ,NULL ); +btrfs_init_work (&sbio->work, btrfs_scrub_helper, + scrub_bio_end_io_worker,NULL ,NULL );if (i !=SCRUB_BIOS_PER_SCTX -1 ) sctx->bios[i]->next_free = i +1 ;
@@ -999,8 +999,8 @@ nodatasum_case: fixup_nodatasum->root = fs_info->extent_root; fixup_nodatasum->mirror_num = failed_mirror_index +1 ;scrub_pending_trans_workers_inc (sctx); -btrfs_init_work (&fixup_nodatasum->work, scrub_fixup_nodatasum, -NULL ,NULL ); +btrfs_init_work (&fixup_nodatasum->work, btrfs_scrub_helper, + scrub_fixup_nodatasum,NULL ,NULL );btrfs_queue_work (fs_info->scrub_workers, &fixup_nodatasum->work); goto out;
@@ -1616,7 +1616,8 @@ static void scrub_wr_bio_end_io(struct bio *bio, int err) sbio->err = err; sbio->bio = bio; -btrfs_init_work (&sbio->work, scrub_wr_bio_end_io_worker,NULL ,NULL ); +btrfs_init_work (&sbio->work, btrfs_scrubwrc_helper, + scrub_wr_bio_end_io_worker,NULL ,NULL );btrfs_queue_work (fs_info->scrub_wr_completion_workers, &sbio->work); }
@@ -3203,7 +3204,8 @@ static int copy_nocow_pages(struct scrub_ctx *sctx, u64 logical, u64 len, nocow_ctx->len = len; nocow_ctx->mirror_num = mirror_num; nocow_ctx->physical_for_dev_replace = physical_for_dev_replace; -btrfs_init_work (&nocow_ctx->work, copy_nocow_pages_worker,NULL ,NULL ); +btrfs_init_work (&nocow_ctx->work, btrfs_scrubnc_helper, + copy_nocow_pages_worker,NULL ,NULL );INIT_LIST_HEAD (&nocow_ctx->inodes);btrfs_queue_work (fs_info->scrub_nocow_workers, &nocow_ctx->work);
fs/btrfs/transaction.c +2 -31
@@ -218,7 +218,6 @@ loop:spin_lock_init (&cur_trans->delayed_refs.lock);INIT_LIST_HEAD (&cur_trans->pending_snapshots); -INIT_LIST_HEAD (&cur_trans->ordered_operations);INIT_LIST_HEAD (&cur_trans->pending_chunks);INIT_LIST_HEAD (&cur_trans->switch_commits);list_add_tail (&cur_trans->list, &fs_info->trans_list);
@@ -1612,27 +1611,6 @@ static void cleanup_transaction(struct btrfs_trans_handle *trans,kmem_cache_free (btrfs_trans_handle_cachep, trans); }
Lines of this file are not shown. View the raw message.
fs/ext4/extents.c +44 -44
88 lines not on this page · raw message
fs/ext4/indirect.c +202 -79
281 lines not on this page · raw message
fs/ext4/inode.c +17 -29
46 lines not on this page · raw message
fs/jbd2/journal.c +37 -19
56 lines not on this page · raw message
net/sunrpc/xprtrdma/svc_rdma_transport.c +1 -0
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.