Linux 4.4.5
Greg KH
maintainerI'm announcing the release of the 4.4.5 kernel.
All users of the 4.4 kernel series must upgrade.
The updated 4.4.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.4.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/arm/kvm/guest.c | 2 arch/arm64/include/asm/pgtable.h | 7 arch/arm64/kvm/guest.c | 2 arch/arm64/mm/init.c | 4 arch/mips/kernel/traps.c | 13 - arch/mips/kvm/mips.c | 4 arch/mips/mm/sc-mips.c | 13 + arch/parisc/kernel/ptrace.c | 16 +- arch/parisc/kernel/syscall.S | 5 arch/x86/kernel/acpi/sleep.c | 7 arch/x86/kvm/vmx.c | 14 + arch/x86/kvm/x86.c | 9 - block/blk-settings.c | 4 drivers/ata/ahci.c | 6 drivers/ata/libahci.c | 3 drivers/ata/libata-scsi.c | 11 - drivers/ata/pata_rb532_cf.c | 11 + drivers/dma/pxa_dma.c | 8 - drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c | 2 drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 8 + drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 6 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 7 drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 13 + drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 3 drivers/gpu/drm/amd/amdgpu/vi.c | 12 - drivers/gpu/drm/ast/ast_main.c | 2 drivers/gpu/drm/i915/i915_drv.c | 5 drivers/gpu/drm/i915/i915_drv.h | 1 drivers/gpu/drm/radeon/radeon_pm.c | 8 - drivers/i2c/busses/i2c-brcmstb.c | 3 drivers/iommu/amd_iommu_init.c | 63 +++++++- drivers/iommu/dmar.c | 5 drivers/iommu/intel-iommu.c | 4 drivers/media/i2c/adv7604.c | 3 drivers/misc/cxl/pci.c | 2 drivers/mtd/ubi/upd.c | 2 drivers/pci/host/pci-keystone-dw.c | 11 - drivers/sh/pm_runtime.c | 2 drivers/target/target_core_device.c | 43 ++++++ drivers/target/target_core_file.c | 29 +--- drivers/target/target_core_iblock.c | 56 +------ drivers/thermal/cpu_cooling.c | 14 + drivers/usb/chipidea/otg.c | 2 drivers/usb/serial/cp210x.c | 1 drivers/usb/serial/option.c | 5 drivers/usb/serial/qcserial.c | 7 drivers/vfio/pci/vfio_pci.c | 9 - drivers/vfio/platform/vfio_platform_common.c | 9 - drivers/vfio/vfio_iommu_type1.c | 6 drivers/video/console/fbcon.c | 2 fs/btrfs/async-thread.c | 2 fs/btrfs/ctree.h | 2 fs/btrfs/disk-io.c | 5 fs/btrfs/extent-tree.c | 13 + fs/btrfs/inode.c | 4 fs/btrfs/root-tree.c | 10 + fs/cifs/cifsfs.h | 12 - fs/cifs/cifssmb.c | 21 ++ fs/cifs/smb2pdu.c | 24 +-- fs/dcache.c | 20 -- fs/fs-writeback.c | 54 +++++-- fs/jffs2/README.Locking | 5 fs/jffs2/build.c | 75 ++++++++-- fs/jffs2/file.c | 39 ++--- fs/jffs2/gc.c | 17 +- fs/jffs2/nodelist.h | 6 fs/super.c | 1 include/linux/ata.h | 4 include/linux/bio.h | 37 +++++ include/linux/blkdev.h | 23 ++- include/linux/dcache.h | 4 include/linux/libata.h | 2 include/linux/module.h | 17 +- include/linux/trace_events.h | 2 include/linux/writeback.h | 5 include/target/target_core_backend.h | 3 kernel/module.c | 112 +++++++++------ kernel/trace/trace_events.c | 14 + kernel/trace/trace_events_filter.c | 13 - sound/core/control_compat.c | 90 ++++++++++-- sound/core/pcm_compat.c | 177 ++++++++++++++++++++++++- sound/core/rawmidi_compat.c | 53 +++++++ sound/core/seq/oss/seq_oss.c | 2 sound/core/seq/oss/seq_oss_device.h | 1 sound/core/seq/oss/seq_oss_init.c | 16 -- sound/core/timer_compat.c | 18 ++ sound/pci/hda/patch_realtek.c | 1 sound/pci/rme9652/hdsp.c | 4 sound/pci/rme9652/hdspm.c | 16 +- sound/usb/quirks.c | 1 91 files changed, 999 insertions(+), 412 deletions(-)
Al Viro (1):
use ->d_seq to get coherency between ->d_inode and ->d_flags
Alex Deucher (3):
drm/radeon/pm: update current crtc info after setting the powerstate drm/amdgpu/pm: update current crtc info after setting the powerstate drm/amdgpu: fix topaz/tonga gmc assignment in 4.4 stable
Alexandra Yates (1):
Adding Intel Lewisburg device IDs for SATA
Ard Biesheuvel (1):
arm64: vmemmap: use virtual projection of linear region
Arindam Nath (1):
drm/amdgpu: return from atombios_dp_get_dpcd only when error
Arnd Bergmann (1):
libata: fix HDIO_GET_32BIT ioctl
Bjørn Mork (1):
USB: qcserial: add Sierra Wireless EM74xx device ID
Christian König (1):
drm/amdgpu: apply gfx_v8 fixes to gfx_v7 as well
Chunming Zhou (1):
drm/amdgpu/gfx8: specify which engine to wait before vm flush
Daniele Palmas (1):
USB: serial: option: add support for Telit LE922 PID 0x1045
David Woodhouse (2):
jffs2: Fix page lock / f->sem deadlock Fix directory hardlinks from deleted directories
Dennis Kadioglu (1):
ALSA: usb-audio: Add a quirk for Plantronics DA45
Filipe Manana (2):
Btrfs: fix deadlock running delayed iputs at transaction commit time
Btrfs: fix loading of orphan roots leading to BUG_ON
Frederic Barrat (1):
cxl: Fix PSL timebase synchronization detection
Gabor Juhos (1):
pata-rb532-cf: get rid of the irq_to_gpio() call
Geert Uytterhoeven (1):
drivers: sh: Restore legacy clock domain on SuperH platforms
Gerd Hoffmann (2):
drm/i915: more virtual south bridge detection drm/i915: refine qemu south bridge detection
Govindraj Raja (1):
MIPS: scache: Fix scache init with invalid line size.
Greg Kroah-Hartman (1):
Linux 4.4.5
Hans Verkuil (1):
adv7604: fix tx 5v detect regression
Harvey Hunt (1):
libata: Align ata_device's id on a cacheline
Helge Deller (1):
parisc: Fix ptrace syscall number and return value modification
Javi Merino (1):
thermal: cpu_cooling: fix out of bounds access in time_in_idle
Jay Cornwall (1):
iommu/amd: Apply workaround for ATS write permission check
Jean-Philippe Brucker (1):
fbcon: set a default value to blink interval
Joerg Roedel (1):
iommu/vt-d: Use BUS_NOTIFY_REMOVED_DEVICE in hotplug path
Justin Maggard (1):
cifs: fix out-of-bounds access in lease parsing
Keith Busch (1):
block: Initialize max_dev_sectors to 0
Maciej W. Rozycki (1):
MIPS: traps: Fix SIGFPE information leak from do_ov' and do_trap_or_bp'
Manuel Lauss (1):
ata: ahci: don't mark HotPlugCapable Ports as external/removable
Michael S. Tsirkin (3):
mips/kvm: fix ioctl error handling
vfio: fix ioctl error handling
arm/arm64: KVM: Fix ioctl error handling
Michel Dänzer (1):
drm/amdgpu: Use drm_calloc_large for VM page_tables array
Mike Christie (1):
target: Fix WRITE_SAME/DISCARD conversion to linux 512b sectors
Ming Lei (3):
block: bio: introduce helpers to get the 1st and last bvec
block: check virt boundary in bio_will_gap()
block: get the 1st and last bvec via helpers
Murali Karicheri (1):
PCI: keystone: Fix MSI code that retrieves struct pcie_port pointer
Oded Gabbay (1):
drm/amdgpu: mask out WC from BO on unsupported arches
Owen Hofmann (1):
kvm: x86: Update tsc multiplier on change.
Paolo Bonzini (1):
KVM: x86: fix root cause for missed hardware breakpoints
Patrik Halfar (1):
USB: qcserial: add Dell Wireless 5809e Gobi 4G HSPA+ (rev3)
Pavel Shilovsky (1):
CIFS: Fix SMB2+ interim response processing for read requests
Peter Chen (1):
usb: chipidea: otg: change workqueue ci_otg as freezable
Qu Wenruo (1):
btrfs: async-thread: Fix a use-after-free error for trace
Richard Weinberger (1):
ubi: Fix out of bounds write in volume update code
Robert Jarzmik (1):
dmaengine: pxa_dma: fix cyclic transfers
Rusty Russell (1):
modules: fix longstanding /proc/kallsyms vs module insertion race.
Simon South (1):
ALSA: hda - Fix mic issues on Acer Aspire E1-472
Steven Rostedt (Red Hat) (1):
tracing: Do not have 'comm' filter override event 'comm' field
Suravee Suthikulpanit (1):
iommu/amd: Fix boot warning when device 00:00.0 is not iommu covered
Takashi Iwai (9):
ALSA: ctl: Fix ioctls for X32 ABI
ALSA: rawmidi: Fix ioctls X32 ABI
ALSA: timer: Fix ioctls for X32 ABI
ALSA: pcm: Fix ioctls for X32 ABI
ALSA: seq: oss: Don't drain at closing a client
ALSA: hdspm: Fix wrong boolean ctl value accesses
ALSA: hdsp: Fix wrong boolean ctl value accesses
ALSA: hdspm: Fix zero-division
ALSA: timer: Fix broken compat timer user status ioctl
Tejun Heo (1):
writeback: flush inode cgroup wb switches instead of pinning super_block
Thomas Betker (1):
Revert "jffs2: Fix lock acquisition order bug in jffs2_write_begin"
Timothy Pearson (1):
drm/ast: Fix incorrect register check for DRAM width
Todd E Brandt (1):
PM / sleep / x86: Fix crash on graph trace through x86 suspend
Vittorio Alfieri (1):
USB: cp210x: Add ID for Parrot NMEA GPS Flight Recorder
Wolfram Sang (1):
i2c: brcmstb: allocate correct amount of memory for regmap
Yadan Fan (1):
Fix cifs_uniqueid_to_ino_t() function for s390x
Yegor Yefremov (1):
USB: serial: option: add support for Quectel UC20
Zhao Lei (1):
btrfs: Fix no_space in write and rm loop
Greg KH
maintainerMakefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 4 PATCHLEVEL = 4 -SUBLEVEL = 4 +SUBLEVEL = 5 EXTRAVERSION = NAME = Blurry Fish Butt
arch/arm/kvm/guest.c +1 -1
@@ -155,7 +155,7 @@ static int get_timer_reg(struct kvm_vcpu *vcpu, const struct kvm_one_reg *reg)u64 val; val =kvm_arm_timer_get_reg (vcpu, reg->id); -return copy_to_user (uaddr, &val,KVM_REG_SIZE (reg->id)); +return copy_to_user (uaddr, &val,KVM_REG_SIZE (reg->id)) ? -EFAULT :0 ; }static unsigned long num_core_regs (void )
arch/arm64/include/asm/pgtable.h +4 -3
@@ -34,13 +34,13 @@/* * VMALLOC and SPARSEMEM_VMEMMAP ranges. * -* VMEMAP_SIZE: allows the whole VA space to be covered by a struct page array +* VMEMAP_SIZE: allows the whole linear region to be covered by a struct page array * (rounded up to PUD_SIZE). * VMALLOC_START: beginning of the kernel VA space * VMALLOC_END: extends to the available space below vmmemmap, PCI I/O space, * fixed mappings and modules */ -#define VMEMMAP_SIZE ALIGN((1UL << (VA_BITS - PAGE_SHIFT)) * sizeof(struct page), PUD_SIZE) +#define VMEMMAP_SIZE ALIGN((1UL << (VA_BITS - PAGE_SHIFT - 1)) * sizeof(struct page), PUD_SIZE)#ifndef CONFIG_KASAN #define VMALLOC_START (VA_START)
@@ -51,7 +51,8 @@#define VMALLOC_END (PAGE_OFFSET - PUD_SIZE - VMEMMAP_SIZE - SZ_64K) -#define vmemmap ((struct page *)(VMALLOC_END + SZ_64K)) +#define VMEMMAP_START (VMALLOC_END + SZ_64K) +#define vmemmap ((struct page *)VMEMMAP_START - (memstart_addr >> PAGE_SHIFT))#define FIRST_USER_ADDRESS 0UL
arch/arm64/kvm/guest.c +1 -1
@@ -186,7 +186,7 @@ static int get_timer_reg(struct kvm_vcpu *vcpu, const struct kvm_one_reg *reg)u64 val; val =kvm_arm_timer_get_reg (vcpu, reg->id); -return copy_to_user (uaddr, &val,KVM_REG_SIZE (reg->id)); +return copy_to_user (uaddr, &val,KVM_REG_SIZE (reg->id)) ? -EFAULT :0 ; }/**
arch/arm64/mm/init.c +2 -2
@@ -319,8 +319,8 @@ void __init mem_init(void)#endif MLG(VMALLOC_START, VMALLOC_END),#ifdef CONFIG_SPARSEMEM_VMEMMAP -MLG ((unsigned long )vmemmap, - (unsigned long )vmemmap +VMEMMAP_SIZE ), +MLG (VMEMMAP_START , +VMEMMAP_START +VMEMMAP_SIZE ),MLM ((unsigned long )virt_to_page (PAGE_OFFSET ), (unsigned long)virt_to_page(high_memory)), #endif
arch/mips/kernel/traps.c +6 -7
@@ -690,15 +690,15 @@ static int simulate_sync(struct pt_regs *regs, unsigned int opcode) asmlinkage void do_ov(struct pt_regs *regs) {enum ctx_state prev_state; -siginfo_t info; +siginfo_t info = { + .si_signo =SIGFPE , + .si_code =FPE_INTOVF , + .si_addr = (void __user *)regs->cp0_epc, + }; prev_state =exception_enter ();die_if_kernel ("Integer overflow" , regs); - info.si_code =FPE_INTOVF ; - info.si_signo =SIGFPE ; - info.si_errno =0 ; - info.si_addr = (void __user *) regs->cp0_epc;force_sig_info (SIGFPE , &info, current);exception_exit (prev_state); }
@@ -874,7 +874,7 @@ out:void do_trap_or_bp (struct pt_regs *regs,unsigned int code,const char *str) { -siginfo_t info; +siginfo_t info = {0 };char b[40 ];#ifdef CONFIG_KGDB_LOW_LEVEL_TRAP
@@ -903,7 +903,6 @@ void do_trap_or_bp(struct pt_regs *regs, unsigned int code,else info.si_code =FPE_INTOVF ; info.si_signo =SIGFPE ; - info.si_errno =0 ; info.si_addr = (void __user *) regs->cp0_epc;force_sig_info (SIGFPE , &info, current);break ;
arch/mips/kvm/mips.c +2 -2
@@ -702,7 +702,7 @@ static int kvm_mips_get_reg(struct kvm_vcpu *vcpu, }else if ((reg->id &KVM_REG_SIZE_MASK ) ==KVM_REG_SIZE_U128 ) {void __user *uaddr = (void __user *)(long )reg->addr; -return copy_to_user (uaddr, vs,16 ); +return copy_to_user (uaddr, vs,16 ) ? -EFAULT :0 ; }else {return -EINVAL ; }
@@ -732,7 +732,7 @@ static int kvm_mips_set_reg(struct kvm_vcpu *vcpu, }else if ((reg->id &KVM_REG_SIZE_MASK ) ==KVM_REG_SIZE_U128 ) {void __user *uaddr = (void __user *)(long )reg->addr; -return copy_from_user (vs, uaddr,16 ); +return copy_from_user (vs, uaddr,16 ) ? -EFAULT :0 ; }else {return -EINVAL ; }
arch/mips/mm/sc-mips.c +9 -4
@@ -164,11 +164,13 @@ static int __init mips_sc_probe_cm3(void) sets = cfg &CM_GCR_L2_CONFIG_SET_SIZE_MSK ; sets >>=CM_GCR_L2_CONFIG_SET_SIZE_SHF ; - c->scache.sets =64 << sets; +if (sets) + c->scache.sets =64 << sets; line_sz = cfg &CM_GCR_L2_CONFIG_LINE_SIZE_MSK ; line_sz >>=CM_GCR_L2_CONFIG_LINE_SIZE_SHF ; - c->scache.linesz =2 << line_sz; +if (line_sz) + c->scache.linesz =2 << line_sz; assoc = cfg &CM_GCR_L2_CONFIG_ASSOC_MSK ; assoc >>=CM_GCR_L2_CONFIG_ASSOC_SHF ;
@@ -176,9 +178,12 @@ static int __init mips_sc_probe_cm3(void) c->scache.waysize = c->scache.sets * c->scache.linesz; c->scache.waybit =__ffs (c->scache.waysize); - c->scache.flags &= ~MIPS_CACHE_NOT_PRESENT ; +if (c->scache.linesz) { + c->scache.flags &= ~MIPS_CACHE_NOT_PRESENT ; +return 1 ; + } -return 1 ; +return 0 ; }void __weak platform_early_l2_init (void )
arch/parisc/kernel/ptrace.c +11 -5
@@ -269,14 +269,19 @@ long compat_arch_ptrace(struct task_struct *child, compat_long_t request,long do_syscall_trace_enter (struct pt_regs *regs) { -long ret =0 ; -/* Do the secure computing check first. */ secure_computing_strict (regs->gr[20 ]);if (test_thread_flag (TIF_SYSCALL_TRACE ) && -tracehook_report_syscall_entry (regs)) - ret =-1L ; +tracehook_report_syscall_entry (regs)) { +/* +* Tracing decided this syscall should not happen or the +* debugger stored an invalid system call number. Skip +* the system call and the system call restart handling. +*/ + regs->gr[20 ] =-1UL ; + goto out; + }#ifdef CONFIG_64BIT if (!is_compat_task ())
@@ -290,7 +295,8 @@ long do_syscall_trace_enter(struct pt_regs *regs) regs->gr[24 ] &0xffffffff , regs->gr[23] & 0xffffffff); -return ret ? : regs->gr[20 ]; +out: +return regs->gr[20 ]; }void do_syscall_trace_exit (struct pt_regs *regs)
arch/parisc/kernel/syscall.S +4 -1
@@ -343,7 +343,7 @@ tracesys_next: #endif comiclr,>>= __NR_Linux_syscalls, %r20, %r0 - b,n .Lsyscall_nosys + b,n .Ltracesys_nosys LDREGX %r20(%r19), %r19
@@ -359,6 +359,9 @@ tracesys_next: be 0(%sr7,%r19) ldo R%tracesys_exit(%r2),%r2 +.Ltracesys_nosys: + ldo -ENOSYS(%r0),%r28 /* set errno */ + /* Do *not* call this function on the gateway page, because it makes a direct call to syscall_trace. */
arch/x86/kernel/acpi/sleep.c +7 -0
@@ -16,6 +16,7 @@#include <asm/cacheflush.h> #include <asm/realmode.h> +#include <linux/ftrace.h> #include "../../realmode/rm/wakeup.h" #include "sleep.h"
@@ -107,7 +108,13 @@ int x86_acpi_suspend_lowlevel(void) saved_magic =0x123456789abcdef0L ;#endif /* CONFIG_64BIT */ +/* +* Pause/unpause graph tracing around do_suspend_lowlevel as it has +* inconsistent call/return info after it jumps to the wakeup vector. +*/ +pause_graph_tracing ();do_suspend_lowlevel (); +unpause_graph_tracing ();return 0 ; }
arch/x86/kvm/vmx.c +9 -5
@@ -595,6 +595,8 @@ struct vcpu_vmx {/* Support for PML */ #define PML_ENTITY_NUM 512struct page *pml_pg; + +u64 current_tsc_ratio; };enum segment_cache_field {
@@ -2062,14 +2064,16 @@ static void vmx_vcpu_load(struct kvm_vcpu *vcpu, int cpu)rdmsrl (MSR_IA32_SYSENTER_ESP , sysenter_esp);vmcs_writel (HOST_IA32_SYSENTER_ESP , sysenter_esp);/* 22.2.3 */ -/* Setup TSC multiplier */ -if (cpu_has_vmx_tsc_scaling ()) -vmcs_write64 (TSC_MULTIPLIER , - vcpu->arch.tsc_scaling_ratio); - vmx->loaded_vmcs->cpu = cpu; } +/* Setup TSC multiplier */ +if (kvm_has_tsc_control && + vmx->current_tsc_ratio != vcpu->arch.tsc_scaling_ratio) { + vmx->current_tsc_ratio = vcpu->arch.tsc_scaling_ratio; +vmcs_write64 (TSC_MULTIPLIER , vmx->current_tsc_ratio); + } +vmx_vcpu_pi_load (vcpu, cpu); }
arch/x86/kvm/x86.c +4 -5
@@ -2736,7 +2736,6 @@ void kvm_arch_vcpu_load(struct kvm_vcpu *vcpu, int cpu) }kvm_make_request (KVM_REQ_STEAL_UPDATE , vcpu); - vcpu->arch.switch_db_regs |=KVM_DEBUGREG_RELOAD ; }void kvm_arch_vcpu_put (struct kvm_vcpu *vcpu)
@@ -6545,12 +6544,12 @@ static int vcpu_enter_guest(struct kvm_vcpu *vcpu)* KVM_DEBUGREG_WONT_EXIT again. */ if (unlikely (vcpu->arch.switch_db_regs &KVM_DEBUGREG_WONT_EXIT )) { -int i; -WARN_ON (vcpu->guest_debug &KVM_GUESTDBG_USE_HW_BP ); kvm_x86_ops->sync_dirty_debug_regs (vcpu); -for (i =0 ; i <KVM_NR_DB_REGS ; i++) - vcpu->arch.eff_db[i] = vcpu->arch.db[i]; +kvm_update_dr0123 (vcpu); +kvm_update_dr6 (vcpu); +kvm_update_dr7 (vcpu); + vcpu->arch.switch_db_regs &= ~KVM_DEBUGREG_RELOAD ; }/*
block/blk-settings.c +2 -2
@@ -91,8 +91,8 @@ void blk_set_default_limits(struct queue_limits *lim) lim->seg_boundary_mask =BLK_SEG_BOUNDARY_MASK ; lim->virt_boundary_mask =0 ; lim->max_segment_size =BLK_MAX_SEGMENT_SIZE ; - lim->max_sectors = lim->max_dev_sectors = lim->max_hw_sectors = -BLK_SAFE_MAX_SECTORS ; + lim->max_sectors = lim->max_hw_sectors =BLK_SAFE_MAX_SECTORS ; + lim->max_dev_sectors =0 ; lim->chunk_sectors =0 ; lim->max_write_same_sectors =0 ; lim->max_discard_sectors =0 ;
drivers/ata/ahci.c +6 -0
@@ -367,15 +367,21 @@ static const struct pci_device_id ahci_pci_tbl[] = { { PCI_VDEVICE(INTEL, 0xa107), board_ahci }, /* Sunrise Point-H RAID */ { PCI_VDEVICE(INTEL, 0xa10f), board_ahci }, /* Sunrise Point-H RAID */ { PCI_VDEVICE(INTEL, 0x2822), board_ahci }, /* Lewisburg RAID*/ + { PCI_VDEVICE(INTEL, 0x2823), board_ahci }, /* Lewisburg AHCI*/ { PCI_VDEVICE(INTEL, 0x2826), board_ahci }, /* Lewisburg RAID*/ + { PCI_VDEVICE(INTEL, 0x2827), board_ahci }, /* Lewisburg RAID*/ { PCI_VDEVICE(INTEL, 0xa182), board_ahci }, /* Lewisburg AHCI*/ { PCI_VDEVICE(INTEL, 0xa184), board_ahci }, /* Lewisburg RAID*/ { PCI_VDEVICE(INTEL, 0xa186), board_ahci }, /* Lewisburg RAID*/ { PCI_VDEVICE(INTEL, 0xa18e), board_ahci }, /* Lewisburg RAID*/ + { PCI_VDEVICE(INTEL, 0xa1d2), board_ahci }, /* Lewisburg RAID*/ + { PCI_VDEVICE(INTEL, 0xa1d6), board_ahci }, /* Lewisburg RAID*/ { PCI_VDEVICE(INTEL, 0xa202), board_ahci }, /* Lewisburg AHCI*/ { PCI_VDEVICE(INTEL, 0xa204), board_ahci }, /* Lewisburg RAID*/ { PCI_VDEVICE(INTEL, 0xa206), board_ahci }, /* Lewisburg RAID*/ { PCI_VDEVICE(INTEL, 0xa20e), board_ahci }, /* Lewisburg RAID*/ + { PCI_VDEVICE(INTEL, 0xa252), board_ahci }, /* Lewisburg RAID*/ + { PCI_VDEVICE(INTEL, 0xa256), board_ahci }, /* Lewisburg RAID*//* JMicron 360/1/3/5/6, match class to avoid IDE function */ { PCI_VENDOR_ID_JMICRON, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID,
drivers/ata/libahci.c +1 -2
@@ -1142,8 +1142,7 @@ static void ahci_port_init(struct device *dev, struct ata_port *ap,/* mark esata ports */ tmp =readl (port_mmio +PORT_CMD ); -if ((tmp &PORT_CMD_HPCP ) || - ((tmp &PORT_CMD_ESP ) && (hpriv->cap &HOST_CAP_SXS ))) +if ((tmp &PORT_CMD_ESP ) && (hpriv->cap &HOST_CAP_SXS )) ap->pflags |=ATA_PFLAG_EXTERNAL ; }
drivers/ata/libata-scsi.c +5 -6
@@ -675,19 +675,18 @@ static int ata_ioc32(struct ata_port *ap)int ata_sas_scsi_ioctl (struct ata_port *ap,struct scsi_device *scsidev,int cmd,void __user *arg) { -int val = -EINVAL , rc = -EINVAL ; +unsigned long val; +int rc = -EINVAL ;unsigned long flags;switch (cmd) { -case ATA_IOC_GET_IO32 : +case HDIO_GET_32BIT :spin_lock_irqsave (ap->lock, flags); val =ata_ioc32 (ap);spin_unlock_irqrestore (ap->lock, flags); -if (copy_to_user (arg, &val,1 )) -return -EFAULT ; -return 0 ; +return put_user (val, (unsigned long __user *)arg); -case ATA_IOC_SET_IO32 : +case HDIO_SET_32BIT : val = (unsigned long ) arg; rc =0 ;spin_lock_irqsave (ap->lock, flags);
drivers/ata/pata_rb532_cf.c +10 -1
@@ -32,6 +32,8 @@#include <linux/libata.h> #include <scsi/scsi_host.h> +#include <asm/mach-rc32434/rb.h> +#define DRV_NAME "pata-rb532-cf"#define DRV_VERSION "0.1.0"#define DRV_DESC "PATA driver for RouterBOARD 532 Compact Flash"
@@ -107,6 +109,7 @@ static int rb532_pata_driver_probe(struct platform_device *pdev)int gpio;struct resource *res;struct ata_host *ah; +struct cf_device *pdata;struct rb532_cf_info *info;int ret;
@@ -122,7 +125,13 @@ static int rb532_pata_driver_probe(struct platform_device *pdev)return -ENOENT ; } - gpio =irq_to_gpio (irq); + pdata =dev_get_platdata (&pdev->dev); +if (!pdata) { +dev_err (&pdev->dev,"no platform data specified\n" ); +return -EINVAL ; + } + + gpio = pdata->gpio_pin;if (gpio <0 ) {dev_err (&pdev->dev,"no GPIO found for irq%d\n" , irq);return -ENOENT ;
drivers/dma/pxa_dma.c +7 -1
@@ -583,6 +583,8 @@ static void set_updater_desc(struct pxad_desc_sw *sw_desc, (PXA_DCMD_LENGTH &sizeof (u32));if (flags &DMA_PREP_INTERRUPT ) updater->dcmd |=PXA_DCMD_ENDIRQEN ; +if (sw_desc->cyclic) + sw_desc->hw_desc[sw_desc->nb_desc -2 ]->ddadr = sw_desc->first; }static bool is_desc_completed (struct virt_dma_desc *vd)
@@ -673,6 +675,10 @@ static irqreturn_t pxad_chan_handler(int irq, void *dev_id)dev_dbg (&chan->vc.chan.dev->device,"%s(): checking txd %p[%x]: completed=%d\n" , __func__, vd, vd->tx.cookie,is_desc_completed (vd)); +if (to_pxad_sw_desc (vd)->cyclic) { +vchan_cyclic_callback (vd); +break ; + }if (is_desc_completed (vd)) {list_del (&vd->node);vchan_cookie_complete (vd);
@@ -1080,7 +1086,7 @@ pxad_prep_dma_cyclic(struct dma_chan *dchan,return NULL ;pxad_get_config (chan, dir, &dcmd, &dsadr, &dtadr); - dcmd |=PXA_DCMD_ENDIRQEN | (PXA_DCMD_LENGTH | period_len); + dcmd |=PXA_DCMD_ENDIRQEN | (PXA_DCMD_LENGTH & period_len);dev_dbg (&chan->vc.chan.dev->device,"%s(): buf_addr=0x%lx len=%zu period=%zu dir=%d flags=%lx\n" , __func__, (unsigned long )buf_addr, len, period_len, dir, flags);
drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c +1 -1
@@ -77,7 +77,7 @@ void amdgpu_connector_hotplug(struct drm_connector *connector) }else if (amdgpu_atombios_dp_needs_link_train (amdgpu_connector)) {/* Don't try to start link training before we * have the dpcd */ -if (!amdgpu_atombios_dp_get_dpcd (amdgpu_connector)) +if (amdgpu_atombios_dp_get_dpcd (amdgpu_connector))return ;/* set it to OFF so that drm_helper_connector_dpms()
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +8 -0
@@ -33,6 +33,7 @@#include <linux/slab.h> #include <drm/drmP.h> #include <drm/amdgpu_drm.h> +#include <drm/drm_cache.h> #include "amdgpu.h" #include "amdgpu_trace.h"
@@ -261,6 +262,13 @@ int amdgpu_bo_create_restricted(struct amdgpu_device *adev, AMDGPU_GEM_DOMAIN_OA); bo->flags = flags; + +/* For architectures that don't support WC memory, +* mask out the WC flag from the BO +*/ +if (!drm_arch_can_wc_memory ()) + bo->flags &= ~AMDGPU_GEM_CREATE_CPU_GTT_USWC ; +amdgpu_fill_placement_to_bo (bo, placement);/* Kernel allocation are uninterruptible */ r = ttm_bo_init(&adev->mman.bdev, &bo->tbo, size, type,
drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c +3 -3
@@ -596,9 +596,6 @@ force:/* update display watermarks based on new power state */ amdgpu_display_bandwidth_update (adev); - adev->pm.dpm.current_active_crtcs = adev->pm.dpm.new_active_crtcs; - adev->pm.dpm.current_active_crtc_count = adev->pm.dpm.new_active_crtc_count; -/* wait for the rings to drain */ for (i =0 ; i <AMDGPU_MAX_RINGS ; i++) {struct amdgpu_ring *ring = adev->rings[i];
@@ -617,6 +614,9 @@ force:/* update displays */ amdgpu_dpm_display_configuration_changed (adev); + adev->pm.dpm.current_active_crtcs = adev->pm.dpm.new_active_crtcs; + adev->pm.dpm.current_active_crtc_count = adev->pm.dpm.new_active_crtc_count; +if (adev->pm.funcs->force_performance_level) {if (adev->pm.dpm.thermal_active) {enum amdgpu_dpm_forced_level level = adev->pm.dpm.forced_level;
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +3 -4
@@ -1248,7 +1248,7 @@ int amdgpu_vm_init(struct amdgpu_device *adev, struct amdgpu_vm *vm) {const unsigned align =min (AMDGPU_VM_PTB_ALIGN_SIZE ,AMDGPU_VM_PTE_COUNT *8 ); -unsigned pd_size, pd_entries, pts_size; +unsigned pd_size, pd_entries;int i, r;for (i =0 ; i <AMDGPU_MAX_RINGS ; ++i) {
@@ -1266,8 +1266,7 @@ int amdgpu_vm_init(struct amdgpu_device *adev, struct amdgpu_vm *vm) pd_entries =amdgpu_vm_num_pdes (adev);/* allocate page table array */ - pts_size = pd_entries *sizeof (struct amdgpu_vm_pt ); - vm->page_tables =kzalloc (pts_size,GFP_KERNEL ); + vm->page_tables =drm_calloc_large (pd_entries,sizeof (struct amdgpu_vm_pt ));if (vm->page_tables ==NULL ) {DRM_ERROR ("Cannot allocate memory for page table array\n" );return -ENOMEM ;
@@ -1327,7 +1326,7 @@ void amdgpu_vm_fini(struct amdgpu_device *adev, struct amdgpu_vm *vm)for (i =0 ; i <amdgpu_vm_num_pdes (adev); i++)amdgpu_bo_unref (&vm->page_tables[i].bo); -kfree (vm->page_tables); +drm_free_large (vm->page_tables);amdgpu_bo_unref (&vm->page_directory);fence_put (vm->page_directory_fence);
drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c +13 -0
@@ -3628,6 +3628,19 @@ static void gfx_v7_0_ring_emit_vm_flush(struct amdgpu_ring *ring, unsigned vm_id, uint64_t pd_addr) { int usepfp = (ring->type == AMDGPU_RING_TYPE_GFX); +uint32_t seq = ring->fence_drv.sync_seq; +uint64_t addr = ring->fence_drv.gpu_addr; + +amdgpu_ring_write (ring,PACKET3 (PACKET3_WAIT_REG_MEM ,5 )); +amdgpu_ring_write (ring, (WAIT_REG_MEM_MEM_SPACE (1 ) |/* memory */ +WAIT_REG_MEM_FUNCTION (3 ) |/* equal */ +WAIT_REG_MEM_ENGINE (usepfp)));/* pfp or me */ +amdgpu_ring_write (ring, addr &0xfffffffc ); +amdgpu_ring_write (ring,upper_32_bits (addr) &0xffffffff ); +amdgpu_ring_write (ring, seq); +amdgpu_ring_write (ring,0xffffffff ); +amdgpu_ring_write (ring,4 );/* poll interval */ +if (usepfp) {/* synce CE with ME to prevent CE fetch CEIB before context switch done */ amdgpu_ring_write (ring,PACKET3 (PACKET3_SWITCH_BUFFER ,0 ));
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +2 -1
@@ -4681,7 +4681,8 @@ static void gfx_v8_0_ring_emit_vm_flush(struct amdgpu_ring *ring,amdgpu_ring_write (ring,PACKET3 (PACKET3_WAIT_REG_MEM ,5 ));amdgpu_ring_write (ring, (WAIT_REG_MEM_MEM_SPACE (1 ) |/* memory */ -WAIT_REG_MEM_FUNCTION (3 )));/* equal */ +WAIT_REG_MEM_FUNCTION (3 ) |/* equal */ +WAIT_REG_MEM_ENGINE (usepfp)));/* pfp or me */ amdgpu_ring_write (ring, addr &0xfffffffc );amdgpu_ring_write (ring,upper_32_bits (addr) &0xffffffff );amdgpu_ring_write (ring, seq);
drivers/gpu/drm/amd/amdgpu/vi.c +6 -6
@@ -1082,10 +1082,10 @@ static const struct amdgpu_ip_block_version topaz_ip_blocks[] = }, { .type = AMD_IP_BLOCK_TYPE_GMC, - .major = 8, - .minor = 0, + .major = 7, + .minor = 4, .rev = 0, - .funcs = &gmc_v8_0_ip_funcs, + .funcs = &gmc_v7_0_ip_funcs, }, { .type = AMD_IP_BLOCK_TYPE_IH,
@@ -1129,10 +1129,10 @@ static const struct amdgpu_ip_block_version tonga_ip_blocks[] = }, { .type = AMD_IP_BLOCK_TYPE_GMC, - .major = 7, - .minor = 4, + .major = 8, + .minor = 0, .rev = 0, - .funcs = &gmc_v7_0_ip_funcs, + .funcs = &gmc_v8_0_ip_funcs, }, { .type = AMD_IP_BLOCK_TYPE_IH,
drivers/gpu/drm/ast/ast_main.c +1 -1
@@ -227,7 +227,7 @@ static int ast_get_dram_info(struct drm_device *dev) }while (ast_read32 (ast,0x10000 ) !=0x01 ); data =ast_read32 (ast,0x10004 ); -if (data &0x400 ) +if (data &0x40 ) ast->dram_bus_width =16 ;else ast->dram_bus_width =32 ;
drivers/gpu/drm/i915/i915_drv.c +4 -1
@@ -531,7 +531,10 @@ void intel_detect_pch(struct drm_device *dev) dev_priv->pch_type =PCH_SPT ;DRM_DEBUG_KMS ("Found SunrisePoint LP PCH\n" );WARN_ON (!IS_SKYLAKE (dev)); - }else if (id ==INTEL_PCH_P2X_DEVICE_ID_TYPE ) { + }else if ((id ==INTEL_PCH_P2X_DEVICE_ID_TYPE ) || + ((id ==INTEL_PCH_QEMU_DEVICE_ID_TYPE ) && + pch->subsystem_vendor ==0x1af4 && + pch->subsystem_device ==0x1100 )) { dev_priv->pch_type =intel_virt_detect_pch (dev); }else continue ;
drivers/gpu/drm/i915/i915_drv.h +1 -0
@@ -2614,6 +2614,7 @@ struct drm_i915_cmd_table {#define INTEL_PCH_SPT_DEVICE_ID_TYPE 0xA100#define INTEL_PCH_SPT_LP_DEVICE_ID_TYPE 0x9D00#define INTEL_PCH_P2X_DEVICE_ID_TYPE 0x7100 +#define INTEL_PCH_QEMU_DEVICE_ID_TYPE 0x2900/* qemu q35 has 2918 */ #define INTEL_PCH_TYPE (dev) (__I915__(dev)->pch_type)#define HAS_PCH_SPT (dev) (INTEL_PCH_TYPE(dev) == PCH_SPT)
drivers/gpu/drm/radeon/radeon_pm.c +4 -4
@@ -1076,10 +1076,6 @@ force:/* update display watermarks based on new power state */ radeon_bandwidth_update (rdev); - rdev->pm.dpm.current_active_crtcs = rdev->pm.dpm.new_active_crtcs; - rdev->pm.dpm.current_active_crtc_count = rdev->pm.dpm.new_active_crtc_count; - rdev->pm.dpm.single_display = single_display; -/* wait for the rings to drain */ for (i =0 ; i <RADEON_NUM_RINGS ; i++) {struct radeon_ring *ring = &rdev->ring[i];
@@ -1098,6 +1094,10 @@ force:/* update displays */ radeon_dpm_display_configuration_changed (rdev); + rdev->pm.dpm.current_active_crtcs = rdev->pm.dpm.new_active_crtcs; + rdev->pm.dpm.current_active_crtc_count = rdev->pm.dpm.new_active_crtc_count; + rdev->pm.dpm.single_display = single_display; +if (rdev->asic->dpm.force_performance_level) {if (rdev->pm.dpm.thermal_active) {enum radeon_dpm_forced_level level = rdev->pm.dpm.forced_level;
drivers/i2c/busses/i2c-brcmstb.c +1 -2
@@ -562,8 +562,7 @@ static int brcmstb_i2c_probe(struct platform_device *pdev)if (!dev)return -ENOMEM ; - dev->bsc_regmap =devm_kzalloc (&pdev->dev,sizeof (struct bsc_regs *), -GFP_KERNEL ); + dev->bsc_regmap =devm_kzalloc (&pdev->dev,sizeof (*dev->bsc_regmap),GFP_KERNEL );if (!dev->bsc_regmap)return -ENOMEM ;
drivers/iommu/amd_iommu_init.c +51 -12
102 lines not on this page · raw message
drivers/iommu/dmar.c +3 -2
@@ -329,7 +329,8 @@ static int dmar_pci_bus_notifier(struct notifier_block *nb,/* Only care about add/remove events for physical functions */ if (pdev->is_virtfn)return NOTIFY_DONE ; -if (action !=BUS_NOTIFY_ADD_DEVICE && action !=BUS_NOTIFY_DEL_DEVICE ) +if (action !=BUS_NOTIFY_ADD_DEVICE && + action !=BUS_NOTIFY_REMOVED_DEVICE )return NOTIFY_DONE ; info =dmar_alloc_pci_notify_info (pdev, action);
@@ -339,7 +340,7 @@ static int dmar_pci_bus_notifier(struct notifier_block *nb,down_write (&dmar_global_lock);if (action ==BUS_NOTIFY_ADD_DEVICE )dmar_pci_bus_add_dev (info); -else if (action ==BUS_NOTIFY_DEL_DEVICE ) +else if (action ==BUS_NOTIFY_REMOVED_DEVICE )dmar_pci_bus_del_dev (info);up_write (&dmar_global_lock);
drivers/iommu/intel-iommu.c +2 -2
@@ -4367,7 +4367,7 @@ int dmar_iommu_notify_scope_dev(struct dmar_pci_notify_info *info) rmrru->devices_cnt);if (ret <0 )return ret; - }else if (info->event ==BUS_NOTIFY_DEL_DEVICE ) { + }else if (info->event ==BUS_NOTIFY_REMOVED_DEVICE ) {dmar_remove_dev_scope (info, rmrr->segment, rmrru->devices, rmrru->devices_cnt); }
@@ -4387,7 +4387,7 @@ int dmar_iommu_notify_scope_dev(struct dmar_pci_notify_info *info)break ; else if(ret < 0) return ret; - }else if (info->event ==BUS_NOTIFY_DEL_DEVICE ) { + }else if (info->event ==BUS_NOTIFY_REMOVED_DEVICE ) {if (dmar_remove_dev_scope (info, atsr->segment, atsru->devices, atsru->devices_cnt))break ;
drivers/media/i2c/adv7604.c +1 -2
@@ -1960,10 +1960,9 @@ static int adv76xx_isr(struct v4l2_subdev *sd, u32 status, bool *handled) }/* tx 5v detect */ - tx_5v =io_read (sd,0x70 ) & info->cable_det_mask; + tx_5v = irq_reg_0x70 & info->cable_det_mask;if (tx_5v) {v4l2_dbg (1 , debug, sd,"%s: tx_5v: 0x%x\n" , __func__, tx_5v); -io_write (sd,0x71 , tx_5v);adv76xx_s_detect_tx_5v_ctrl (sd);if (handled) *handled = true;
drivers/misc/cxl/pci.c +1 -1
@@ -414,7 +414,7 @@ static int cxl_setup_psl_timebase(struct cxl *adapter, struct pci_dev *dev) delta =mftb () - psl_tb;if (delta <0 ) delta = -delta; - }while (cputime_to_usecs (delta) >16 ); + }while (tb_to_ns (delta) >16000 );return 0 ; }
drivers/mtd/ubi/upd.c +1 -1
@@ -193,7 +193,7 @@ int ubi_start_leb_change(struct ubi_device *ubi, struct ubi_volume *vol, vol->changing_leb =1 ; vol->ch_lnum = req->lnum; - vol->upd_buf =vmalloc (req->bytes); + vol->upd_buf =vmalloc (ALIGN ((int )req->bytes, ubi->min_io_size));if (!vol->upd_buf)return -ENOMEM ;
drivers/pci/host/pci-keystone-dw.c +3 -8
@@ -58,11 +58,6 @@#define to_keystone_pcie (x) container_of(x, struct keystone_pcie, pp) -static inline struct pcie_port *sys_to_pcie (struct pci_sys_data *sys) -{ -return sys->private_data; -} -static inline void update_reg_offset_bit_pos (u32 offset,u32 *reg_offset,u32 *bit_pos) {
@@ -108,7 +103,7 @@ static void ks_dw_pcie_msi_irq_ack(struct irq_data *d)struct pcie_port *pp; msi =irq_data_get_msi_desc (d); - pp =sys_to_pcie (msi_desc_to_pci_sysdata (msi)); + pp = (struct pcie_port *)msi_desc_to_pci_sysdata (msi); ks_pcie =to_keystone_pcie (pp); offset = d->irq -irq_linear_revmap (pp->irq_domain,0 );update_reg_offset_bit_pos (offset, ®_offset, &bit_pos);
@@ -146,7 +141,7 @@ static void ks_dw_pcie_msi_irq_mask(struct irq_data *d)u32 offset; msi =irq_data_get_msi_desc (d); - pp =sys_to_pcie (msi_desc_to_pci_sysdata (msi)); + pp = (struct pcie_port *)msi_desc_to_pci_sysdata (msi); ks_pcie =to_keystone_pcie (pp); offset = d->irq -irq_linear_revmap (pp->irq_domain,0 );
@@ -167,7 +162,7 @@ static void ks_dw_pcie_msi_irq_unmask(struct irq_data *d)u32 offset; msi =irq_data_get_msi_desc (d); - pp =sys_to_pcie (msi_desc_to_pci_sysdata (msi)); + pp = (struct pcie_port *)msi_desc_to_pci_sysdata (msi); ks_pcie =to_keystone_pcie (pp); offset = d->irq -irq_linear_revmap (pp->irq_domain,0 );
drivers/sh/pm_runtime.c +1 -1
@@ -34,7 +34,7 @@ static struct pm_clk_notifier_block platform_bus_notifier = {static int __init sh_pm_runtime_init (void ) { -if (IS_ENABLED (CONFIG_ARCH_SHMOBILE )) { +if (IS_ENABLED (CONFIG_OF ) &&IS_ENABLED (CONFIG_ARCH_SHMOBILE )) {if (!of_find_compatible_node (NULL ,NULL ,"renesas,cpg-mstp-clocks" ))return 0 ;
drivers/target/target_core_device.c +43 -0
49 lines not on this page · raw message
drivers/target/target_core_file.c +9 -20
@@ -160,25 +160,11 @@ static int fd_configure_device(struct se_device *dev)" block_device blocks: %llu logical_block_size: %d\n" , dev_size,div_u64 (dev_size, fd_dev->fd_block_size), fd_dev->fd_block_size); -/* -* Check if the underlying struct block_device request_queue supports -* the QUEUE_FLAG_DISCARD bit for UNMAP/WRITE_SAME in SCSI + TRIM -* in ATA and we need to set TPE=1 -*/ -if (blk_queue_discard (q)) { - dev->dev_attrib.max_unmap_lba_count = - q->limits.max_discard_sectors; -/* -* Currently hardcoded to 1 in Linux/SCSI code.. -*/ - dev->dev_attrib.max_unmap_block_desc_count =1 ; - dev->dev_attrib.unmap_granularity = - q->limits.discard_granularity >>9 ; - dev->dev_attrib.unmap_granularity_alignment = - q->limits.discard_alignment; + +if (target_configure_unmap_from_queue (&dev->dev_attrib, q, + fd_dev->fd_block_size))pr_debug ("IFILE: BLOCK Discard support available," -" disabled by default\n" ); - } +" disabled by default\n" );/* * Enable write same emulation for IBLOCK and use 0xFFFF as * the smaller WRITE_SAME(10) only has a two-byte block count.
@@ -490,9 +476,12 @@ fd_execute_unmap(struct se_cmd *cmd, sector_t lba, sector_t nolb)if (S_ISBLK (inode->i_mode)) {/* The backend is block device, use discard */ struct block_device *bdev = inode->i_bdev; +struct se_device *dev = cmd->se_dev; - ret =blkdev_issue_discard (bdev, lba, - nolb,GFP_KERNEL ,0 ); + ret =blkdev_issue_discard (bdev, +target_to_linux_sector (dev, lba), +target_to_linux_sector (dev, nolb), +GFP_KERNEL ,0 );if (ret <0 ) {pr_warn ("FILEIO: blkdev_issue_discard() failed: %d\n" , ret);
drivers/target/target_core_iblock.c +14 -42
94 lines not on this page · raw message
drivers/thermal/cpu_cooling.c +8 -6
@@ -377,26 +377,28 @@ static u32 cpu_power_to_freq(struct cpufreq_cooling_device *cpufreq_device,* get_load() - get load for a cpu since last updated * @cpufreq_device: &struct cpufreq_cooling_device for this cpu * @cpu: cpu number +* @cpu_idx: index of the cpu in cpufreq_device->allowed_cpus * * Return: The average load of cpu @cpu in percentage since this * function was last called. */ -static u32 get_load (struct cpufreq_cooling_device *cpufreq_device,int cpu) +static u32 get_load (struct cpufreq_cooling_device *cpufreq_device,int cpu, +int cpu_idx) {u32 load;u64 now, now_idle, delta_time, delta_idle; now_idle =get_cpu_idle_time (cpu, &now,0 ); - delta_idle = now_idle - cpufreq_device->time_in_idle[cpu]; - delta_time = now - cpufreq_device->time_in_idle_timestamp[cpu]; + delta_idle = now_idle - cpufreq_device->time_in_idle[cpu_idx]; + delta_time = now - cpufreq_device->time_in_idle_timestamp[cpu_idx];if (delta_time <= delta_idle) load =0 ;else load =div64_u64 (100 * (delta_time - delta_idle), delta_time); - cpufreq_device->time_in_idle[cpu] = now_idle; - cpufreq_device->time_in_idle_timestamp[cpu] = now; + cpufreq_device->time_in_idle[cpu_idx] = now_idle; + cpufreq_device->time_in_idle_timestamp[cpu_idx] = now;return load; }
@@ -598,7 +600,7 @@ static int cpufreq_get_requested_power(struct thermal_cooling_device *cdev,u32 load;if (cpu_online (cpu)) - load =get_load (cpufreq_device, cpu); + load =get_load (cpufreq_device, cpu, i);else load =0 ;
drivers/usb/chipidea/otg.c +1 -1
@@ -158,7 +158,7 @@ static void ci_otg_work(struct work_struct *work)int ci_hdrc_otg_init (struct ci_hdrc *ci) {INIT_WORK (&ci->work, ci_otg_work); - ci->wq =create_singlethread_workqueue ("ci_otg" ); + ci->wq =create_freezable_workqueue ("ci_otg" );if (!ci->wq) {dev_err (ci->dev,"can't create workqueue\n" );return -ENODEV ;
drivers/usb/serial/cp210x.c +1 -0
@@ -164,6 +164,7 @@ static const struct usb_device_id id_table[] = { { USB_DEVICE(0x18EF, 0xE025) }, /* ELV Marble Sound Board 1 */ { USB_DEVICE(0x1901, 0x0190) }, /* GE B850 CP2105 Recorder interface */ { USB_DEVICE(0x1901, 0x0193) }, /* GE B650 CP2104 PMC interface */ + { USB_DEVICE(0x19CF, 0x3000) }, /* Parrot NMEA GPS Flight Recorder */ { USB_DEVICE(0x1ADB, 0x0001) }, /* Schweitzer Engineering C662 Cable */ { USB_DEVICE(0x1B1C, 0x1C00) }, /* Corsair USB Dongle */ { USB_DEVICE(0x1BA4, 0x0002) }, /* Silicon Labs 358x factory default */
drivers/usb/serial/option.c +5 -0
@@ -270,6 +270,7 @@ static void option_instat_callback(struct urb *urb);#define TELIT_PRODUCT_UE910_V2 0x1012#define TELIT_PRODUCT_LE922_USBCFG0 0x1042#define TELIT_PRODUCT_LE922_USBCFG3 0x1043 +#define TELIT_PRODUCT_LE922_USBCFG5 0x1045#define TELIT_PRODUCT_LE920 0x1200#define TELIT_PRODUCT_LE910 0x1201
@@ -1132,6 +1133,8 @@ static const struct usb_device_id option_ids[] = { { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x6613)}, /* Onda H600/ZTE MF330 */ { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x0023)}, /* ONYX 3G device */ { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x9000)}, /* SIMCom SIM5218 */ + { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x9003), /* Quectel UC20 */ + .driver_info = (kernel_ulong_t)&net_intf4_blacklist }, { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_6001) }, { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_CMU_300) }, { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_6003),
@@ -1183,6 +1186,8 @@ static const struct usb_device_id option_ids[] = { .driver_info = (kernel_ulong_t)&telit_le922_blacklist_usbcfg0 }, { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_LE922_USBCFG3), .driver_info = (kernel_ulong_t)&telit_le922_blacklist_usbcfg3 }, + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, TELIT_PRODUCT_LE922_USBCFG5, 0xff), + .driver_info = (kernel_ulong_t)&telit_le922_blacklist_usbcfg0 }, { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_LE910), .driver_info = (kernel_ulong_t)&telit_le910_blacklist }, { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_LE920),
drivers/usb/serial/qcserial.c +5 -2
@@ -157,14 +157,17 @@ static const struct usb_device_id id_table[] = { {DEVICE_SWI(0x1199, 0x9056)}, /* Sierra Wireless Modem */ {DEVICE_SWI(0x1199, 0x9060)}, /* Sierra Wireless Modem */ {DEVICE_SWI(0x1199, 0x9061)}, /* Sierra Wireless Modem */ - {DEVICE_SWI(0x1199, 0x9070)}, /* Sierra Wireless MC74xx/EM74xx */ - {DEVICE_SWI(0x1199, 0x9071)}, /* Sierra Wireless MC74xx/EM74xx */ + {DEVICE_SWI(0x1199, 0x9070)}, /* Sierra Wireless MC74xx */ + {DEVICE_SWI(0x1199, 0x9071)}, /* Sierra Wireless MC74xx */ + {DEVICE_SWI(0x1199, 0x9078)}, /* Sierra Wireless EM74xx */ + {DEVICE_SWI(0x1199, 0x9079)}, /* Sierra Wireless EM74xx */ {DEVICE_SWI(0x413c, 0x81a2)}, /* Dell Wireless 5806 Gobi(TM) 4G LTE Mobile Broadband Card */ {DEVICE_SWI(0x413c, 0x81a3)}, /* Dell Wireless 5570 HSPA+ (42Mbps) Mobile Broadband Card */ {DEVICE_SWI(0x413c, 0x81a4)}, /* Dell Wireless 5570e HSPA+ (42Mbps) Mobile Broadband Card */ {DEVICE_SWI(0x413c, 0x81a8)}, /* Dell Wireless 5808 Gobi(TM) 4G LTE Mobile Broadband Card */ {DEVICE_SWI(0x413c, 0x81a9)}, /* Dell Wireless 5808e Gobi(TM) 4G LTE Mobile Broadband Card */ {DEVICE_SWI(0x413c, 0x81b1)}, /* Dell Wireless 5809e Gobi(TM) 4G LTE Mobile Broadband Card */ + {DEVICE_SWI(0x413c, 0x81b3)}, /* Dell Wireless 5809e Gobi(TM) 4G LTE Mobile Broadband Card (rev3) *//* Huawei devices */ {DEVICE_HWI(0x03f0, 0x581d)}, /* HP lt4112 LTE/HSPA+ Gobi 4G Modem (Huawei me906e) */
drivers/vfio/pci/vfio_pci.c +6 -3
@@ -446,7 +446,8 @@ static long vfio_pci_ioctl(void *device_data, info.num_regions =VFIO_PCI_NUM_REGIONS ; info.num_irqs =VFIO_PCI_NUM_IRQS ; -return copy_to_user ((void __user *)arg, &info, minsz); +return copy_to_user ((void __user *)arg, &info, minsz) ? + -EFAULT :0 ; }else if (cmd ==VFIO_DEVICE_GET_REGION_INFO ) {struct pci_dev *pdev = vdev->pdev;
@@ -520,7 +521,8 @@ static long vfio_pci_ioctl(void *device_data,return -EINVAL ; } -return copy_to_user ((void __user *)arg, &info, minsz); +return copy_to_user ((void __user *)arg, &info, minsz) ? + -EFAULT :0 ; }else if (cmd ==VFIO_DEVICE_GET_IRQ_INFO ) {struct vfio_irq_info info;
@@ -555,7 +557,8 @@ static long vfio_pci_ioctl(void *device_data,else info.flags |=VFIO_IRQ_INFO_NORESIZE ; -return copy_to_user ((void __user *)arg, &info, minsz); +return copy_to_user ((void __user *)arg, &info, minsz) ? + -EFAULT :0 ; }else if (cmd ==VFIO_DEVICE_SET_IRQS ) {struct vfio_irq_set hdr;
drivers/vfio/platform/vfio_platform_common.c +6 -3
@@ -219,7 +219,8 @@ static long vfio_platform_ioctl(void *device_data, info.num_regions = vdev->num_regions; info.num_irqs = vdev->num_irqs; -return copy_to_user ((void __user *)arg, &info, minsz); +return copy_to_user ((void __user *)arg, &info, minsz) ? + -EFAULT :0 ; }else if (cmd ==VFIO_DEVICE_GET_REGION_INFO ) {struct vfio_region_info info;
@@ -240,7 +241,8 @@ static long vfio_platform_ioctl(void *device_data, info.size = vdev->regions[info.index].size; info.flags = vdev->regions[info.index].flags; -return copy_to_user ((void __user *)arg, &info, minsz); +return copy_to_user ((void __user *)arg, &info, minsz) ? + -EFAULT :0 ; }else if (cmd ==VFIO_DEVICE_GET_IRQ_INFO ) {struct vfio_irq_info info;
@@ -259,7 +261,8 @@ static long vfio_platform_ioctl(void *device_data, info.flags = vdev->irqs[info.index].flags; info.count = vdev->irqs[info.index].count; -return copy_to_user ((void __user *)arg, &info, minsz); +return copy_to_user ((void __user *)arg, &info, minsz) ? + -EFAULT :0 ; }else if (cmd ==VFIO_DEVICE_SET_IRQS ) {struct vfio_irq_set hdr;
drivers/vfio/vfio_iommu_type1.c +4 -2
@@ -999,7 +999,8 @@ static long vfio_iommu_type1_ioctl(void *iommu_data, info.iova_pgsizes =vfio_pgsize_bitmap (iommu); -return copy_to_user ((void __user *)arg, &info, minsz); +return copy_to_user ((void __user *)arg, &info, minsz) ? + -EFAULT :0 ; }else if (cmd ==VFIO_IOMMU_MAP_DMA ) {struct vfio_iommu_type1_dma_map map;
@@ -1032,7 +1033,8 @@ static long vfio_iommu_type1_ioctl(void *iommu_data,if (ret)return ret; -return copy_to_user ((void __user *)arg, &unmap, minsz); +return copy_to_user ((void __user *)arg, &unmap, minsz) ? + -EFAULT :0 ; }return -ENOTTY ;
drivers/video/console/fbcon.c +2 -0
@@ -709,6 +709,7 @@ static int con2fb_acquire_newinfo(struct vc_data *vc, struct fb_info *info, }if (!err) { + ops->cur_blink_jiffies =HZ /5 ; info->fbcon_par = ops;if (vc)
@@ -956,6 +957,7 @@ static const char *fbcon_startup(void) ops->currcon =-1 ; ops->graphics =1 ; ops->cur_rotate =-1 ; + ops->cur_blink_jiffies =HZ /5 ; info->fbcon_par = ops; p->con_rotate = initial_rotation;set_blitting_type (vc, info);
fs/btrfs/async-thread.c +1 -1
@@ -328,8 +328,8 @@ static inline void __btrfs_queue_work(struct __btrfs_workqueue *wq,list_add_tail (&work->ordered_list, &wq->ordered_list);spin_unlock_irqrestore (&wq->list_lock, flags); } -queue_work (wq->normal_wq, &work->normal_work);trace_btrfs_work_queued (work); +queue_work (wq->normal_wq, &work->normal_work); } void btrfs_queue_work(struct btrfs_workqueue *wq,
fs/btrfs/ctree.h +1 -1
@@ -1572,7 +1572,7 @@ struct btrfs_fs_info {spinlock_t delayed_iput_lock;struct list_head delayed_iputs; -struct rw_semaphore delayed_iput_sem; +struct mutex cleaner_delayed_iput_mutex;/* this protects tree_mod_seq_list */ spinlock_t tree_mod_seq_lock;
fs/btrfs/disk-io.c +4 -1
@@ -1796,7 +1796,10 @@ static int cleaner_kthread(void *arg) goto sleep; } +mutex_lock (&root->fs_info->cleaner_delayed_iput_mutex);btrfs_run_delayed_iputs (root); +mutex_unlock (&root->fs_info->cleaner_delayed_iput_mutex); + again =btrfs_clean_one_deleted_snapshot (root);mutex_unlock (&root->fs_info->cleaner_mutex);
@@ -2556,8 +2559,8 @@ int open_ctree(struct super_block *sb,mutex_init (&fs_info->delete_unused_bgs_mutex);mutex_init (&fs_info->reloc_mutex);mutex_init (&fs_info->delalloc_root_mutex); +mutex_init (&fs_info->cleaner_delayed_iput_mutex);seqlock_init (&fs_info->profiles_lock); -init_rwsem (&fs_info->delayed_iput_sem);INIT_LIST_HEAD (&fs_info->dirty_cowonly_roots);INIT_LIST_HEAD (&fs_info->space_info);
fs/btrfs/extent-tree.c +8 -5
@@ -4086,8 +4086,10 @@ commit_trans: !atomic_read(&root->fs_info->open_ioctl_trans)) { need_commit--; -if (need_commit >0 ) +if (need_commit >0 ) { +btrfs_start_delalloc_roots (fs_info,0 ,-1 );btrfs_wait_ordered_roots (fs_info,-1 ); + } trans =btrfs_join_transaction (root);if (IS_ERR (trans))
@@ -4100,11 +4102,12 @@ commit_trans:if (ret)return ret;/* -* make sure that all running delayed iput are -* done +* The cleaner kthread might still be doing iput +* operations. Wait for it to finish so that +* more space is released. */ -down_write (&root->fs_info->delayed_iput_sem); -up_write (&root->fs_info->delayed_iput_sem); +mutex_lock (&root->fs_info->cleaner_delayed_iput_mutex); +mutex_unlock (&root->fs_info->cleaner_delayed_iput_mutex); goto again; }else {btrfs_end_transaction (trans, root);
fs/btrfs/inode.c +0 -4
@@ -3142,8 +3142,6 @@ void btrfs_run_delayed_iputs(struct btrfs_root *root)if (empty)return ; -down_read (&fs_info->delayed_iput_sem); -spin_lock (&fs_info->delayed_iput_lock);list_splice_init (&fs_info->delayed_iputs, &list);spin_unlock (&fs_info->delayed_iput_lock);
@@ -3154,8 +3152,6 @@ void btrfs_run_delayed_iputs(struct btrfs_root *root)iput (delayed->inode);kfree (delayed); } - -up_read (&root->fs_info->delayed_iput_sem); }/*
fs/btrfs/root-tree.c +9 -1
@@ -310,8 +310,16 @@ int btrfs_find_orphan_roots(struct btrfs_root *tree_root)set_bit (BTRFS_ROOT_ORPHAN_ITEM_INSERTED , &root->state); err =btrfs_insert_fs_root (root->fs_info, root); +/* +* The root might have been inserted already, as before we look +* for orphan roots, log replay might have happened, which +* triggers a transaction commit and qgroup accounting, which +* in turn reads and inserts fs roots while doing backref +* walking. +*/ +if (err == -EEXIST ) + err =0 ;if (err) { -BUG_ON (err == -EEXIST );btrfs_free_fs_root (root);break ; }
fs/cifs/cifsfs.h +4 -8
@@ -31,19 +31,15 @@* so that it will fit. We use hash_64 to convert the value to 31 bits, and * then add 1, to ensure that we don't end up with a 0 as the value. */ -#if BITS_PER_LONG ==64 static inline ino_t cifs_uniqueid_to_ino_t (u64 fileid) { +if ((sizeof (ino_t)) < (sizeof (u64))) +return (ino_t )hash_64 (fileid, (sizeof (ino_t) *8 ) -1 ) +1 ; +return (ino_t )fileid; + } -#else -static inline ino_t -cifs_uniqueid_to_ino_t (u64 fileid) -{ -return (ino_t )hash_64 (fileid, (sizeof (ino_t) *8 ) -1 ) +1 ; -} -#endif extern struct file_system_type cifs_fs_type;extern const struct address_space_operations cifs_addr_ops;
fs/cifs/cifssmb.c +18 -3
@@ -1396,11 +1396,10 @@ openRetry:* current bigbuf. */ static int -cifs_readv_discard (struct TCP_Server_Info *server,struct mid_q_entry *mid) +discard_remaining_data (struct TCP_Server_Info *server) {unsigned int rfclen =get_rfc1002_length (server->smallbuf);int remaining = rfclen +4 - server->total_read; -struct cifs_readdata *rdata = mid->callback_data;while (remaining >0 ) {int length;
@@ -1414,10 +1413,20 @@ cifs_readv_discard(struct TCP_Server_Info *server, struct mid_q_entry *mid) remaining -= length; } -dequeue_mid (mid, rdata->result);return 0 ; } +static int +cifs_readv_discard (struct TCP_Server_Info *server,struct mid_q_entry *mid) +{ +int length; +struct cifs_readdata *rdata = mid->callback_data; + + length =discard_remaining_data (server); +dequeue_mid (mid, rdata->result); +return length; +} +int cifs_readv_receive (struct TCP_Server_Info *server,struct mid_q_entry *mid) {
@@ -1446,6 +1455,12 @@ cifs_readv_receive(struct TCP_Server_Info *server, struct mid_q_entry *mid)return length; server->total_read += length; +if (server->ops->is_status_pending && + server->ops->is_status_pending (buf, server,0 )) { +discard_remaining_data (server); +return -1 ; + } +/* Was the SMB read successful? */ rdata->result = server->ops->map_error (buf, false);if (rdata->result !=0 ) {
fs/cifs/smb2pdu.c +14 -10
@@ -1109,21 +1109,25 @@ parse_lease_state(struct TCP_Server_Info *server, struct smb2_create_rsp *rsp, {char *data_offset;struct create_context *cc; -unsigned int next =0 ; +unsigned int next; +unsigned int remaining;char *name; data_offset = (char *)rsp +4 +le32_to_cpu (rsp->CreateContextsOffset); + remaining =le32_to_cpu (rsp->CreateContextsLength); cc = (struct create_context *)data_offset; -do { - cc = (struct create_context *)((char *)cc + next); +while (remaining >=sizeof (struct create_context )) { name =le16_to_cpu (cc->NameOffset) + (char *)cc; -if (le16_to_cpu (cc->NameLength) !=4 || -strncmp (name,"RqLs" ,4 )) { - next =le32_to_cpu (cc->Next); -continue ; - } -return server->ops->parse_lease_buf (cc, epoch); - }while (next !=0 ); +if (le16_to_cpu (cc->NameLength) ==4 && +strncmp (name,"RqLs" ,4 ) ==0 ) +return server->ops->parse_lease_buf (cc, epoch); + + next =le32_to_cpu (cc->Next); +if (!next) +break ; + remaining -= next; + cc = (struct create_context *)((char *)cc + next); + }return 0 ; }
fs/dcache.c +5 -15
@@ -269,9 +269,6 @@ static inline int dname_external(const struct dentry *dentry)return dentry->d_name.name != dentry->d_iname; } -/* -* Make sure other CPUs see the inode attached before the type is set. -*/ static inline void __d_set_inode_and_type (struct dentry *dentry,struct inode *inode,unsigned type_flags)
@@ -279,28 +276,18 @@ static inline void __d_set_inode_and_type(struct dentry *dentry,unsigned flags; dentry->d_inode = inode; -smp_wmb (); flags =READ_ONCE (dentry->d_flags); flags &= ~(DCACHE_ENTRY_TYPE |DCACHE_FALLTHRU ); flags |= type_flags;WRITE_ONCE (dentry->d_flags, flags); } -/* -* Ideally, we want to make sure that other CPUs see the flags cleared before -* the inode is detached, but this is really a violation of RCU principles -* since the ordering suggests we should always set inode before flags. -* -* We should instead replace or discard the entire dentry - but that sucks -* performancewise on mass deletion/rename. -*/ static inline void __d_clear_type_and_inode (struct dentry *dentry) {unsigned flags =READ_ONCE (dentry->d_flags); flags &= ~(DCACHE_ENTRY_TYPE |DCACHE_FALLTHRU );WRITE_ONCE (dentry->d_flags, flags); -smp_wmb (); dentry->d_inode =NULL ; }
@@ -370,9 +357,11 @@ static void dentry_unlink_inode(struct dentry * dentry) __releases(dentry->d_inode->i_lock) {struct inode *inode = dentry->d_inode; + +raw_write_seqcount_begin (&dentry->d_seq);__d_clear_type_and_inode (dentry);hlist_del_init (&dentry->d_u.d_alias); -dentry_rcuwalk_invalidate (dentry); +raw_write_seqcount_end (&dentry->d_seq);spin_unlock (&dentry->d_lock);spin_unlock (&inode->i_lock);if (!inode->i_nlink)
@@ -1757,8 +1746,9 @@ static void __d_instantiate(struct dentry *dentry, struct inode *inode)spin_lock (&dentry->d_lock);if (inode)hlist_add_head (&dentry->d_u.d_alias, &inode->i_dentry); +raw_write_seqcount_begin (&dentry->d_seq);__d_set_inode_and_type (dentry, inode, add_flags); -dentry_rcuwalk_invalidate (dentry); +raw_write_seqcount_end (&dentry->d_seq);spin_unlock (&dentry->d_lock);fsnotify_d_instantiate (dentry, inode); }
fs/fs-writeback.c +41 -13
103 lines not on this page · raw message
fs/jffs2/README.Locking +1 -4
@@ -2,10 +2,6 @@ JFFS2 LOCKING DOCUMENTATION --------------------------- -At least theoretically, JFFS2 does not require the Big Kernel Lock -(BKL), which was always helpfully obtained for it by Linux 2.4 VFS -code. It has its own locking, as described below. - This document attempts to describe the existing locking rules for JFFS2. It is not expected to remain perfectly up to date, but ought to be fairly close.
@@ -69,6 +65,7 @@ Ordering constraints: any f->sem held. 2. Never attempt to lock two file mutexes in one thread. No ordering rules have been made for doing so. + 3. Never lock a page cache page with f->sem held. erase_completion_lock spinlock
fs/jffs2/build.c +57 -18
121 lines not on this page · raw message
fs/jffs2/file.c +18 -21
@@ -137,39 +137,33 @@ static int jffs2_write_begin(struct file *filp, struct address_space *mapping,struct page *pg;struct inode *inode = mapping->host;struct jffs2_inode_info *f =JFFS2_INODE_INFO (inode); -struct jffs2_sb_info *c =JFFS2_SB_INFO (inode->i_sb); -struct jffs2_raw_inode ri; -uint32_t alloc_len =0 ;pgoff_t index = pos >>PAGE_CACHE_SHIFT ;uint32_t pageofs = index <<PAGE_CACHE_SHIFT ;int ret =0 ; -jffs2_dbg (1 ,"%s()\n" , __func__); - -if (pageofs > inode->i_size) { - ret =jffs2_reserve_space (c,sizeof (ri), &alloc_len, -ALLOC_NORMAL ,JFFS2_SUMMARY_INODE_SIZE ); -if (ret) -return ret; - } - -mutex_lock (&f->sem); pg =grab_cache_page_write_begin (mapping, index, flags); -if (!pg) { -if (alloc_len) -jffs2_complete_reservation (c); -mutex_unlock (&f->sem); +if (!pg)return -ENOMEM ; - } *pagep = pg; -if (alloc_len) { +jffs2_dbg (1 ,"%s()\n" , __func__); + +if (pageofs > inode->i_size) {/* Make new hole frag from old EOF to new page */ +struct jffs2_sb_info *c =JFFS2_SB_INFO (inode->i_sb); +struct jffs2_raw_inode ri;struct jffs2_full_dnode *fn; +uint32_t alloc_len;jffs2_dbg (1 ,"Writing new hole frag 0x%x-0x%x between current EOF and new page\n" , (unsigned int )inode->i_size, pageofs); + ret =jffs2_reserve_space (c,sizeof (ri), &alloc_len, +ALLOC_NORMAL ,JFFS2_SUMMARY_INODE_SIZE ); +if (ret) + goto out_page; + +mutex_lock (&f->sem);memset (&ri,0 ,sizeof (ri)); ri.magic =cpu_to_je16 (JFFS2_MAGIC_BITMASK );
@@ -196,6 +190,7 @@ static int jffs2_write_begin(struct file *filp, struct address_space *mapping,if (IS_ERR (fn)) { ret =PTR_ERR (fn);jffs2_complete_reservation (c); +mutex_unlock (&f->sem); goto out_page; } ret =jffs2_add_full_dnode_to_inode (c, f, fn);
@@ -210,10 +205,12 @@ static int jffs2_write_begin(struct file *filp, struct address_space *mapping,jffs2_mark_node_obsolete (c, fn->raw);jffs2_free_full_dnode (fn);jffs2_complete_reservation (c); +mutex_unlock (&f->sem); goto out_page; }jffs2_complete_reservation (c); inode->i_size = pageofs; +mutex_unlock (&f->sem); }/*
@@ -222,18 +219,18 @@ static int jffs2_write_begin(struct file *filp, struct address_space *mapping,* case of a short-copy. */ if (!PageUptodate (pg)) { +mutex_lock (&f->sem); ret =jffs2_do_readpage_nolock (inode, pg); +mutex_unlock (&f->sem);if (ret) goto out_page; } -mutex_unlock (&f->sem);jffs2_dbg (1 ,"end write_begin(). pg->flags %lx\n" , pg->flags);return ret; out_page:unlock_page (pg);page_cache_release (pg); -mutex_unlock (&f->sem);return ret; }
fs/jffs2/gc.c +10 -7
@@ -1296,14 +1296,17 @@ static int jffs2_garbage_collect_dnode(struct jffs2_sb_info *c, struct jffs2_eraBUG_ON (start > orig_start); } -/* First, use readpage() to read the appropriate page into the page cache */ -/* Q: What happens if we actually try to GC the _same_ page for which commit_write() -* triggered garbage collection in the first place? -* A: I _think_ it's OK. read_cache_page shouldn't deadlock, we'll write out the -* page OK. We'll actually write it out again in commit_write, which is a little -* suboptimal, but at least we're correct. -*/ +/* The rules state that we must obtain the page lock *before* f->sem, so +* drop f->sem temporarily. Since we also hold c->alloc_sem, nothing's +* actually going to *change* so we're safe; we only allow reading. +* +* It is important to note that jffs2_write_begin() will ensure that its +* page is marked Uptodate before allocating space. That means that if we +* end up here trying to GC the *same* page that jffs2_write_begin() is +* trying to write out, read_cache_page() will not deadlock. */ +mutex_unlock (&f->sem); pg_ptr =jffs2_gc_fetch_page (c, f, start, &pg); +mutex_lock (&f->sem);if (IS_ERR (pg_ptr)) { pr_warn("read_cache_page() returned error: %ld\n",
fs/jffs2/nodelist.h +5 -1
@@ -194,6 +194,7 @@ struct jffs2_inode_cache {#define INO_STATE_CLEARING 6/* In clear_inode() */ #define INO_FLAGS_XATTR_CHECKED 0x01/* has no duplicate xattr_ref */ +#define INO_FLAGS_IS_DIR 0x02/* is a directory */ #define RAWNODE_CLASS_INODE_CACHE 0#define RAWNODE_CLASS_XATTR_DATUM 1
@@ -249,7 +250,10 @@ struct jffs2_readinode_infostruct jffs2_full_dirent { -struct jffs2_raw_node_ref *raw; +union { +struct jffs2_raw_node_ref *raw; +struct jffs2_inode_cache *ic;/* Just during part of build */ + };struct jffs2_full_dirent *next;uint32_t version;uint32_t ino;/* == zero for unlink */
fs/super.c +1 -0
@@ -415,6 +415,7 @@ void generic_shutdown_super(struct super_block *sb) sb->s_flags &= ~MS_ACTIVE ;fsnotify_unmount_inodes (sb); +cgroup_writeback_umount ();evict_inodes (sb);
include/linux/ata.h +2 -2
@@ -487,8 +487,8 @@ enum ata_tf_protocols { };enum ata_ioctls { -ATA_IOC_GET_IO32 =0x309 , -ATA_IOC_SET_IO32 =0x324 , +ATA_IOC_GET_IO32 =0x309 ,/* HDIO_GET_32BIT */ +ATA_IOC_SET_IO32 =0x324 ,/* HDIO_SET_32BIT */ };/* core structures */
include/linux/bio.h +37 -0
@@ -310,6 +310,43 @@ static inline void bio_clear_flag(struct bio *bio, unsigned int bit) bio->bi_flags &= ~(1U << bit); } +static inline void bio_get_first_bvec (struct bio *bio,struct bio_vec *bv) +{ + *bv =bio_iovec (bio); +} + +static inline void bio_get_last_bvec (struct bio *bio,struct bio_vec *bv) +{ +struct bvec_iter iter = bio->bi_iter; +int idx; + +if (!bio_flagged (bio,BIO_CLONED )) { + *bv = bio->bi_io_vec[bio->bi_vcnt -1 ]; +return ; + } + +if (unlikely (!bio_multiple_segments (bio))) { + *bv =bio_iovec (bio); +return ; + } + +bio_advance_iter (bio, &iter, iter.bi_size); + +if (!iter.bi_bvec_done) + idx = iter.bi_idx -1 ; +else /* in the middle of bvec */ + idx = iter.bi_idx; + + *bv = bio->bi_io_vec[idx]; + +/* +* iter.bi_bvec_done records actual length of the last bvec +* if this bio ends in the middle of one io vector +*/ +if (iter.bi_bvec_done) + bv->bv_len = iter.bi_bvec_done; +} +enum bip_flags {BIP_BLOCK_INTEGRITY =1 <<0 ,/* block layer owns integrity data */ BIP_MAPPED_INTEGRITY =1 <<1 ,/* ref tag has been remapped */
include/linux/blkdev.h +17 -6
@@ -1367,6 +1367,13 @@ static inline void put_dev_sector(Sector p)page_cache_release (p.v); } +static inline bool __bvec_gap_to_prev (struct request_queue *q, +struct bio_vec *bprv,unsigned int offset) +{ +return offset || + ((bprv->bv_offset + bprv->bv_len) &queue_virt_boundary (q)); +} +/* * Check if adding a bio_vec after bprv with offset would create a gap in * the SG list. Most drivers don't care about this, but some do.
@@ -1376,18 +1383,22 @@ static inline bool bvec_gap_to_prev(struct request_queue *q, {if (!queue_virt_boundary (q))return false; -return offset || - ((bprv->bv_offset + bprv->bv_len) &queue_virt_boundary (q)); +return __bvec_gap_to_prev (q, bprv, offset); }static inline bool bio_will_gap (struct request_queue *q,struct bio *prev,struct bio *next) { -if (!bio_has_data (prev)) -return false; +if (bio_has_data (prev) &&queue_virt_boundary (q)) { +struct bio_vec pb, nb; + +bio_get_last_bvec (prev, &pb); +bio_get_first_bvec (next, &nb); -return bvec_gap_to_prev (q, &prev->bi_io_vec[prev->bi_vcnt -1 ], - next->bi_io_vec[0 ].bv_offset); +return __bvec_gap_to_prev (q, &pb, nb.bv_offset); + } + +return false; }static inline bool req_gap_back_merge (struct request *req,struct bio *bio)
include/linux/dcache.h +1 -3
@@ -409,9 +409,7 @@ static inline bool d_mountpoint(const struct dentry *dentry)*/ static inline unsigned __d_entry_type (const struct dentry *dentry) { -unsigned type =READ_ONCE (dentry->d_flags); -smp_rmb (); -return type &DCACHE_ENTRY_TYPE ; +return dentry->d_flags &DCACHE_ENTRY_TYPE ; }static inline bool d_is_miss (const struct dentry *dentry)
include/linux/libata.h +1 -1
@@ -718,7 +718,7 @@ struct ata_device {union {u16 id[ATA_ID_WORDS ];/* IDENTIFY xxx DEVICE data */ u32 gscr[SATA_PMP_GSCR_DWORDS ];/* PMP GSCR block */ - }; + }____cacheline_aligned ;/* DEVSLP Timing Variables from Identify Device Data Log */ u8 devslp_timing[ATA_LOG_DEVSLP_SIZE ];
include/linux/module.h +9 -8
@@ -302,6 +302,12 @@ struct mod_tree_node {struct latch_tree_node node; }; +struct mod_kallsyms { +Elf_Sym *symtab; +unsigned int num_symtab; +char *strtab; +}; +struct module {enum module_state state;
@@ -411,14 +417,9 @@ struct module {#endif #ifdef CONFIG_KALLSYMS -/* -* We keep the symbol and string tables for kallsyms. -* The core_* fields below are temporary, loader-only (they -* could really be discarded after module init). -*/ -Elf_Sym *symtab, *core_symtab; -unsigned int num_symtab, core_num_syms; -char *strtab, *core_strtab; +/* Protected by RCU and/or module_mutex: use rcu_dereference() */ +struct mod_kallsyms *kallsyms; +struct mod_kallsyms core_kallsyms;/* Section attributes */ struct module_sect_attrs *sect_attrs;
include/linux/trace_events.h +2 -0
@@ -568,6 +568,8 @@ enum {FILTER_DYN_STRING ,FILTER_PTR_STRING ,FILTER_TRACE_FN , +FILTER_COMM , + FILTER_CPU, };extern int trace_event_raw_init (struct trace_event_call *call);
include/linux/writeback.h +5 -0
@@ -198,6 +198,7 @@ void wbc_attach_and_unlock_inode(struct writeback_control *wbc,void wbc_detach_inode (struct writeback_control *wbc);void wbc_account_io (struct writeback_control *wbc,struct page *page,size_t bytes); +void cgroup_writeback_umount (void );/** * inode_attach_wb - associate an inode with its wb
@@ -301,6 +302,10 @@ static inline void wbc_account_io(struct writeback_control *wbc, { } +static inline void cgroup_writeback_umount (void ) +{ +} +#endif /* CONFIG_CGROUP_WRITEBACK */ /*
include/target/target_core_backend.h +3 -0
@@ -94,5 +94,8 @@ sense_reason_t passthrough_parse_cdb(struct se_cmd *cmd, sense_reason_t (*exec_cmd)(struct se_cmd *cmd));bool target_sense_desc_format (struct se_device *dev); +sector_t target_to_linux_sector (struct se_device *dev,sector_t lb); +bool target_configure_unmap_from_queue (struct se_dev_attrib *attrib, +struct request_queue *q,int block_size);#endif /* TARGET_CORE_BACKEND_H */
kernel/module.c +69 -43
209 lines not on this page · raw message
kernel/trace/trace_events.c +8 -6
@@ -97,16 +97,16 @@ trace_find_event_field(struct trace_event_call *call, char *name)struct ftrace_event_field *field;struct list_head *head; - field =__find_event_field (&ftrace_generic_fields, name); + head =trace_get_fields (call); + field =__find_event_field (head, name);if (field)return field; - field =__find_event_field (&ftrace_common_fields, name); + field =__find_event_field (&ftrace_generic_fields, name);if (field)return field; - head =trace_get_fields (call); -return __find_event_field (head, name); +return __find_event_field (&ftrace_common_fields, name); } static int __trace_define_field(struct list_head *head, const char *type,
@@ -171,8 +171,10 @@ static int trace_define_generic_fields(void) {int ret; -__generic_field (int, cpu,FILTER_OTHER ); - __generic_field(char *, comm, FILTER_PTR_STRING); +__generic_field (int,CPU ,FILTER_CPU ); +__generic_field (int, cpu,FILTER_CPU ); + __generic_field(char *, COMM, FILTER_COMM); + __generic_field(char *, comm, FILTER_COMM);return ret; }
kernel/trace/trace_events_filter.c +7 -6
@@ -1043,13 +1043,14 @@ static int init_pred(struct filter_parse_state *ps,return -EINVAL ; } -if (is_string_field (field)) { +if (field->filter_type ==FILTER_COMM ) { +filter_build_regex (pred); + fn = filter_pred_comm; + pred->regex.field_len =TASK_COMM_LEN ; + }else if (is_string_field (field)) {filter_build_regex (pred); -if (!strcmp (field->name,"comm" )) { - fn = filter_pred_comm; - pred->regex.field_len =TASK_COMM_LEN ; - }else if (field->filter_type ==FILTER_STATIC_STRING ) { +if (field->filter_type ==FILTER_STATIC_STRING ) { fn = filter_pred_string; pred->regex.field_len = field->size; }else if (field->filter_type ==FILTER_DYN_STRING )
@@ -1072,7 +1073,7 @@ static int init_pred(struct filter_parse_state *ps, } pred->val = val; -if (!strcmp (field->name,"cpu" )) +if (field->filter_type ==FILTER_CPU ) fn = filter_pred_cpu;else fn = select_comparison_fn(pred->op, field->size,
sound/core/control_compat.c +74 -16
186 lines not on this page · raw message
sound/core/pcm_compat.c +176 -1
207 lines not on this page · raw message
sound/core/rawmidi_compat.c +53 -0
68 lines not on this page · raw message
sound/core/seq/oss/seq_oss.c +0 -2
@@ -148,8 +148,6 @@ odev_release(struct inode *inode, struct file *file)if ((dp = file->private_data) ==NULL )return 0 ; -snd_seq_oss_drain_write (dp); -mutex_lock (®ister_mutex);snd_seq_oss_release (dp);mutex_unlock (®ister_mutex);
sound/core/seq/oss/seq_oss_device.h +0 -1
@@ -127,7 +127,6 @@ int snd_seq_oss_write(struct seq_oss_devinfo *dp, const char __user *buf, int counsigned int snd_seq_oss_poll (struct seq_oss_devinfo *dp,struct file *file,poll_table * wait);void snd_seq_oss_reset (struct seq_oss_devinfo *dp); -void snd_seq_oss_drain_write (struct seq_oss_devinfo *dp);/* */ void snd_seq_oss_process_queue (struct seq_oss_devinfo *dp,abstime_t time);
sound/core/seq/oss/seq_oss_init.c +0 -16
@@ -436,22 +436,6 @@ snd_seq_oss_release(struct seq_oss_devinfo *dp)/* -* Wait until the queue is empty (if we don't have nonblock) -*/ -void -snd_seq_oss_drain_write (struct seq_oss_devinfo *dp) -{ -if (! dp->timer->running) -return ; -if (is_write_mode (dp->file_mode) && !is_nonblock_mode (dp->file_mode) && - dp->writeq) { -while (snd_seq_oss_writeq_sync (dp->writeq)) - ; - } -} - - -/* * reset sequencer devices */ void
sound/core/timer_compat.c +16 -2
@@ -70,13 +70,14 @@ static int snd_timer_user_status_compat(struct file *file, struct snd_timer_status32 __user *_status) {struct snd_timer_user *tu; -struct snd_timer_status status; +struct snd_timer_status32 status; tu = file->private_data;if (snd_BUG_ON (!tu->timeri))return -ENXIO ;memset (&status,0 ,sizeof (status)); - status.tstamp = tu->tstamp; + status.tstamp.tv_sec = tu->tstamp.tv_sec; + status.tstamp.tv_nsec = tu->tstamp.tv_nsec; status.resolution =snd_timer_resolution (tu->timeri); status.lost = tu->timeri->lost; status.overrun = tu->overrun;
@@ -88,12 +89,21 @@ static int snd_timer_user_status_compat(struct file *file,return 0 ; } +#ifdef CONFIG_X86_X32 +/* X32 ABI has the same struct as x86-64 */ +#define snd_timer_user_status_x32 (file, s) \ + snd_timer_user_status(file, s) +#endif /* CONFIG_X86_X32 */ +/* */ enum { SNDRV_TIMER_IOCTL_INFO32 = _IOR('T', 0x11, struct snd_timer_info32), SNDRV_TIMER_IOCTL_STATUS32 = _IOW('T', 0x14, struct snd_timer_status32), +#ifdef CONFIG_X86_X32 + SNDRV_TIMER_IOCTL_STATUS_X32 = _IOW('T', 0x14, struct snd_timer_status), +#endif /* CONFIG_X86_X32 */ };static long snd_timer_user_ioctl_compat (struct file *file,unsigned int cmd,unsigned long arg)
@@ -122,6 +132,10 @@ static long snd_timer_user_ioctl_compat(struct file *file, unsigned int cmd, unsreturn snd_timer_user_info_compat (file, argp);case SNDRV_TIMER_IOCTL_STATUS32 :return snd_timer_user_status_compat (file, argp); +#ifdef CONFIG_X86_X32 +case SNDRV_TIMER_IOCTL_STATUS_X32 : +return snd_timer_user_status_x32 (file, argp); +#endif /* CONFIG_X86_X32 */ }return -ENOIOCTLCMD ; }
sound/pci/hda/patch_realtek.c +1 -0
@@ -5386,6 +5386,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {SND_PCI_QUIRK (0x1025 ,0x080d ,"Acer Aspire V5-122P" ,ALC269_FIXUP_ASPIRE_HEADSET_MIC ),SND_PCI_QUIRK (0x1025 ,0x0740 ,"Acer AO725" ,ALC271_FIXUP_HP_GATE_MIC_JACK ),SND_PCI_QUIRK (0x1025 ,0x0742 ,"Acer AO756" ,ALC271_FIXUP_HP_GATE_MIC_JACK ), +SND_PCI_QUIRK (0x1025 ,0x0762 ,"Acer Aspire E1-472" ,ALC271_FIXUP_HP_GATE_MIC_JACK_E1_572 ),SND_PCI_QUIRK (0x1025 ,0x0775 ,"Acer Aspire E1-572" ,ALC271_FIXUP_HP_GATE_MIC_JACK_E1_572 ),SND_PCI_QUIRK (0x1025 ,0x079b ,"Acer Aspire V5-573G" ,ALC282_FIXUP_ASPIRE_V5_PINS ), SND_PCI_QUIRK(0x1025, 0x106d, "Acer Cloudbook 14", ALC283_FIXUP_CHROME_BOOK),
sound/pci/rme9652/hdsp.c +2 -2
@@ -2879,7 +2879,7 @@ static int snd_hdsp_get_dds_offset(struct snd_kcontrol *kcontrol, struct snd_ctl {struct hdsp *hdsp =snd_kcontrol_chip (kcontrol); - ucontrol->value.enumerated.item[0 ] =hdsp_dds_offset (hdsp); + ucontrol->value.integer.value[0 ] =hdsp_dds_offset (hdsp);return 0 ; }
@@ -2891,7 +2891,7 @@ static int snd_hdsp_put_dds_offset(struct snd_kcontrol *kcontrol, struct snd_ctlif (!snd_hdsp_use_is_exclusive (hdsp))return -EBUSY ; - val = ucontrol->value.enumerated.item[0 ]; + val = ucontrol->value.integer.value[0 ];spin_lock_irq (&hdsp->lock);if (val !=hdsp_dds_offset (hdsp)) change = (hdsp_set_dds_offset (hdsp, val) ==0 ) ?1 :0 ;
sound/pci/rme9652/hdspm.c +12 -4
@@ -1601,6 +1601,9 @@ static void hdspm_set_dds_value(struct hdspm *hdspm, int rate) {u64 n; +if (snd_BUG_ON (rate <=0 )) +return ; +if (rate >=112000 ) rate /=4 ;else if (rate >=56000 )
@@ -2215,6 +2218,8 @@ static int hdspm_get_system_sample_rate(struct hdspm *hdspm) }else {/* slave mode, return external sample rate */ rate =hdspm_external_sample_rate (hdspm); +if (!rate) + rate = hdspm->system_sample_rate; } }
@@ -2260,8 +2265,11 @@ static int snd_hdspm_put_system_sample_rate(struct snd_kcontrol *kcontrol, ucontrol) {struct hdspm *hdspm =snd_kcontrol_chip (kcontrol); +int rate = ucontrol->value.integer.value[0 ]; -hdspm_set_dds_value (hdspm, ucontrol->value.enumerated.item[0 ]); +if (rate <27000 || rate >207000 ) +return -EINVAL ; +hdspm_set_dds_value (hdspm, ucontrol->value.integer.value[0 ]);return 0 ; }
@@ -4449,7 +4457,7 @@ static int snd_hdspm_get_tco_word_term(struct snd_kcontrol *kcontrol, {struct hdspm *hdspm =snd_kcontrol_chip (kcontrol); - ucontrol->value.enumerated.item[0 ] = hdspm->tco->term; + ucontrol->value.integer.value[0 ] = hdspm->tco->term;return 0 ; }
@@ -4460,8 +4468,8 @@ static int snd_hdspm_put_tco_word_term(struct snd_kcontrol *kcontrol, {struct hdspm *hdspm =snd_kcontrol_chip (kcontrol); -if (hdspm->tco->term != ucontrol->value.enumerated.item[0 ]) { - hdspm->tco->term = ucontrol->value.enumerated.item[0 ]; +if (hdspm->tco->term != ucontrol->value.integer.value[0 ]) { + hdspm->tco->term = ucontrol->value.integer.value[0 ];hdspm_tco_write (hdspm);
sound/usb/quirks.c +1 -0
@@ -1124,6 +1124,7 @@ bool snd_usb_get_sample_rate_quirk(struct snd_usb_audio *chip)case USB_ID (0x045E ,0x076F ):/* MS Lifecam HD-6000 */ case USB_ID (0x045E ,0x0772 ):/* MS Lifecam Studio */ case USB_ID (0x045E ,0x0779 ):/* MS Lifecam HD-3000 */ +case USB_ID (0x047F ,0xAA05 ):/* Plantronics DA45 */ case USB_ID (0x04D8 ,0xFEEA ):/* Benchmark DAC1 Pre */ case USB_ID (0x074D ,0x3553 ):/* Outlaw RR2150 (Micronas UAC3553B) */ case USB_ID (0x21B4 ,0x0081 ):/* AudioQuest DragonFly */