Linux 4.9.10
Greg KH
maintainerI'm announcing the release of the 4.9.10 kernel.
All users of the 4.9 kernel series must upgrade.
The updated 4.9.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.9.y
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 arch/arc/kernel/unaligned.c | 2 arch/arm/boot/dts/imx6dl.dtsi | 2 arch/arm/kernel/ptrace.c | 2 arch/arm/mm/fault.c | 4 arch/arm/mm/fault.h | 4 arch/powerpc/include/asm/reg.h | 3 arch/powerpc/include/asm/xics.h | 1 arch/powerpc/mm/tlb-radix.c | 6 - arch/powerpc/platforms/powernv/smp.c | 12 ++ arch/powerpc/sysdev/xics/icp-opal.c | 29 +++++ arch/x86/include/asm/processor.h | 1 arch/x86/kernel/apic/io_apic.c | 2 arch/x86/kernel/cpu/amd.c | 16 +++ arch/x86/kernel/cpu/common.c | 1 arch/x86/kernel/smpboot.c | 12 +- arch/x86/mm/dump_pagetables.c | 2 crypto/algif_aead.c | 2 drivers/acpi/nfit/core.c | 6 + drivers/cpufreq/intel_pstate.c | 30 ++++++ drivers/crypto/ccp/ccp-dev-v5.c | 2 drivers/crypto/ccp/ccp-dev.h | 1 drivers/crypto/ccp/ccp-dmaengine.c | 6 + drivers/crypto/chelsio/chcr_core.c | 18 +-- drivers/crypto/qat/qat_c62x/adf_drv.c | 2 drivers/crypto/qat/qat_common/adf_accel_devices.h | 1 drivers/crypto/qat/qat_common/qat_hal.c | 4 drivers/gpu/drm/drm_atomic.c | 16 +-- drivers/gpu/drm/i915/i915_gem_execbuffer.c | 12 +- drivers/gpu/drm/i915/intel_display.c | 4 drivers/gpu/drm/i915/intel_dpll_mgr.c | 3 drivers/hv/channel.c | 93 ++----------------- drivers/hv/channel_mgmt.c | 2 drivers/hv/hyperv_vmbus.h | 10 +- drivers/hv/ring_buffer.c | 45 +++++---- drivers/infiniband/sw/rxe/rxe_mr.c | 8 + drivers/infiniband/sw/rxe/rxe_resp.c | 2 drivers/input/misc/uinput.c | 20 ++-- drivers/md/dm-rq.c | 4 drivers/net/ethernet/hisilicon/hns/hns_dsaf_reg.h | 8 - drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c | 18 ++- drivers/net/hyperv/netvsc.c | 6 + drivers/net/wireless/realtek/rtlwifi/rtl8192ce/sw.c | 9 + drivers/net/xen-netfront.c | 3 drivers/nvdimm/namespace_devs.c | 11 +- drivers/nvdimm/pfn_devs.c | 7 - drivers/s390/scsi/zfcp_fsf.c | 8 - drivers/scsi/aacraid/comminit.c | 8 + drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c | 1 drivers/scsi/mpt3sas/mpt3sas_scsih.c | 3 drivers/scsi/qla2xxx/qla_os.c | 2 drivers/target/target_core_device.c | 10 +- drivers/target/target_core_sbc.c | 8 + drivers/target/target_core_transport.c | 86 +++++++++++------ drivers/target/target_core_xcopy.c | 2 fs/btrfs/ioctl.c | 6 - include/linux/cpumask.h | 8 - include/linux/hyperv.h | 45 +++++++-- include/target/target_core_base.h | 1 kernel/events/core.c | 25 +++-- kernel/stacktrace.c | 12 -- mm/slub.c | 4 net/mac80211/mesh.c | 2 net/wireless/nl80211.c | 1 security/selinux/hooks.c | 2 sound/core/seq/seq_memory.c | 9 - sound/core/seq/seq_queue.c | 33 ++++-- sound/pci/hda/patch_hdmi.c | 1 sound/usb/line6/driver.c | 3 tools/perf/builtin-diff.c | 2 tools/perf/ui/hist.c | 10 ++ tools/perf/util/hist.h | 7 + 72 files changed, 463 insertions(+), 290 deletions(-)
Alexander Sverdlin (1):
ARM: 8642/1: LPAE: catch pending imprecise abort on unmask
Andrey Ryabinin (2):
drm/i915: fix use-after-free in page_flip_completed() x86/mm/ptdump: Fix soft lockup in page table walker
Arnd Bergmann (1):
hns: avoid stack overflow with CONFIG_KASAN
Benjamin Herrenschmidt (2):
powerpc/mm/radix: Update ERAT flushes when invalidating TLB powerpc/powernv: Fix CPU hotplug to handle waking on HVI
Boris Ostrovsky (1):
xen-netfront: Delete rx_refill_timer in xennet_disconnect_backend()
Borislav Petkov (1):
x86/CPU/AMD: Bring back Compute Unit ID
Bryant G. Ly (1):
ibmvscsis: Add SGL limit
Dan Williams (3):
acpi, nfit: fix acpi_nfit_flush_probe() crash libnvdimm, namespace: do not delete namespace-id 0 libnvdimm, pfn: fix memmap reservation size versus 4K alignment
Dave Carroll (1):
scsi: aacraid: Fix INTx/MSI-x issue with older controllers
Dave Martin (1):
ARM: 8643/3: arm/ptrace: Preserve previous registers for short regset write
Dexuan Cui (1):
Drivers: hv: vmbus: finally fix hv_need_to_signal_on_read()
Dmitry Torokhov (1):
Input: uinput - fix crash when mixing old and new init style
Eyal Itkin (2):
IB/rxe: Fix resid update
IB/rxe: Fix mem_check_range integer overflow
Gal Pressman (1):
net/mlx5e: Modify TIRs hash only when it's needed
Gary R Hook (2):
crypto: ccp - Fix DMA operations when IOMMU is enabled
crypto: ccp - Fix double add when creating new DMA command
Giovanni Cabiddu (2):
crypto: qat - fix bar discovery for c62x
crypto: qat - zero esram only for DH85x devices
Greg Kroah-Hartman (1):
Linux 4.9.10
Harsh Jain (2):
crypto: algif_aead - Fix kernel panic on list_del
crypto: chcr - Check device is allocated before use
Hui Wang (1):
ALSA: hda - adding a new NV HDMI/DP codec ID in the driver
Jeff Mahoney (1):
btrfs: fix btrfs_compat_ioctl failures on non-compat ioctls
Jurij Smakov (1):
rtlwifi: rtl8192ce: Fix loading of incorrect firmware
K. Y. Srinivasan (3):
Drivers: hv: vmbus: Base host signaling strictly on the ring state
Drivers: hv: vmbus: On write cleanup the logic to interrupt the host
Drivers: hv: vmbus: On the read path cleanup the logic to interrupt the host
Lee, Shawn C (1):
drm/i915/bxt: Add MST support when do DPLL calculation
Linus Torvalds (1):
Revert "x86/ioapic: Restore IO-APIC irq_chip retrigger callback"
Maarten Lankhorst (1):
drm/atomic: Fix double free in drm_atomic_state_default_clear
Masashi Honma (1):
nl80211: Fix mesh HT operation check
Mauricio Faria de Oliveira (1):
scsi: qla2xxx: Avoid that issuing a LIP triggers a kernel crash
Michał Winiarski (1):
drm/i915: Always convert incoming exec offsets to non-canonical
Mike Snitzer (1):
dm rq: cope with DM device destruction while in dm_old_request_fn()
Namhyung Kim (2):
perf diff: Fix -o/--order option behavior (again) perf diff: Fix segfault on 'perf diff -o N' option
Nicholas Bellinger (5):
target: Don't BUG_ON during NodeACL dynamic -> explicit conversion
target: Use correct SCSI status during EXTENDED_COPY exception
target: Fix early transport_generic_handle_tmr abort scenario
target: Fix multi-session dynamic se_node_acl double free OOPs
target: Fix COMPARE_AND_WRITE ref leak for non GOOD status
Omar Sandoval (1):
stacktrace, lockdep: Fix address, newline ugliness
Peter Zijlstra (1):
perf/core: Fix crash in perf_event_read()
Sean Rees (1):
mm/slub.c: fix random_seq offset destruction
Srinivas Pandruvada (1):
cpufreq: intel_pstate: Disable energy efficiency optimization
Steffen Maier (1):
scsi: zfcp: fix use-after-free by not tracing WKA port open/close on failed send
Stephen Smalley (1):
selinux: fix off-by-one in setprocattr
Sébastien Szymanski (1):
ARM: dts: imx6dl: fix GPIO4 range
Takashi Iwai (3):
ALSA: seq: Fix race at creating a queue
ALSA: seq: Don't handle loop timeout at snd_seq_pool_done() Revert "ALSA: line6: Only determine control port properties if needed"
Tejun Heo (1):
cpumask: use nr_cpumask_bits for parsing functions
Thorsten Horstmann (1):
mac80211: Fix adding of mesh vendor IEs
Vineet Gupta (1):
ARC: [arcompact] brown paper bag bug in unaligned access delay slot fixup
Yazen Ghannam (1):
x86/CPU/AMD: Fix Zen SMT topology
ojab (1):
scsi: mpt3sas: disable ASPM for MPI2 controllers
Greg KH
maintainerMakefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 4 PATCHLEVEL = 9 -SUBLEVEL = 9 +SUBLEVEL = 10 EXTRAVERSION = NAME = Roaring Lionus
arch/arc/kernel/unaligned.c +1 -1
@@ -243,7 +243,7 @@ int misaligned_fixup(unsigned long address, struct pt_regs *regs,/* clear any remanants of delay slot */ if (delay_mode (regs)) { - regs->ret = regs->bta ~1U; + regs->ret = regs->bta & ~1U ; regs->status32 &= ~STATUS_DE_MASK ; }else { regs->ret += state.instr_len;
arch/arm/boot/dts/imx6dl.dtsi +1 -1
@@ -137,7 +137,7 @@ &gpio4 { gpio-ranges = <&iomuxc 5 136 1>, <&iomuxc 6 145 1>, <&iomuxc 7 150 1>, <&iomuxc 8 146 1>, <&iomuxc 9 151 1>, <&iomuxc 10 147 1>, - <&iomuxc 11 151 1>, <&iomuxc 12 148 1>, <&iomuxc 13 153 1>, + <&iomuxc 11 152 1>, <&iomuxc 12 148 1>, <&iomuxc 13 153 1>, <&iomuxc 14 149 1>, <&iomuxc 15 154 1>, <&iomuxc 16 39 7>, <&iomuxc 23 56 1>, <&iomuxc 24 61 7>, <&iomuxc 31 46 1>; };
arch/arm/kernel/ptrace.c +1 -1
@@ -600,7 +600,7 @@ static int gpr_set(struct task_struct *target, const void *kbuf, const void __user *ubuf) { int ret; -struct pt_regs newregs; +struct pt_regs newregs = *task_pt_regs (target); ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, &newregs,
arch/arm/mm/fault.c +2 -2
@@ -610,9 +610,9 @@ static int __init early_abort_handler(unsigned long addr, unsigned int fsr,void __init early_abt_enable (void ) { - fsr_info[22 ].fn = early_abort_handler; + fsr_info[FSR_FS_AEA ].fn = early_abort_handler;local_abt_enable (); - fsr_info[22 ].fn = do_bad; + fsr_info[FSR_FS_AEA ].fn = do_bad; }#ifndef CONFIG_ARM_LPAE
arch/arm/mm/fault.h +4 -0
@@ -11,11 +11,15 @@#define FSR_FS5_0 (0x3f)#ifdef CONFIG_ARM_LPAE +#define FSR_FS_AEA 17 +static inline int fsr_fs (unsigned int fsr) {return fsr &FSR_FS5_0 ; }#else +#define FSR_FS_AEA 22 +static inline int fsr_fs (unsigned int fsr) {return (fsr &FSR_FS3_0 ) | (fsr &FSR_FS4 ) >>6 ;
arch/powerpc/include/asm/reg.h +2 -1
@@ -641,9 +641,10 @@#define SRR1_ISI_N_OR_G 0x10000000/* ISI: Access is no-exec or G */ #define SRR1_ISI_PROT 0x08000000/* ISI: Other protection fault */ #define SRR1_WAKEMASK 0x00380000/* reason for wakeup */ -#define SRR1_WAKEMASK_P8 0x003c0000/* reason for wakeup on POWER8 */ +#define SRR1_WAKEMASK_P8 0x003c0000/* reason for wakeup on POWER8 and 9 */ #define SRR1_WAKESYSERR 0x00300000/* System error */ #define SRR1_WAKEEE 0x00200000/* External interrupt */ +#define SRR1_WAKEHVI 0x00240000/* Hypervisor Virtualization Interrupt (P9) */ #define SRR1_WAKEMT 0x00280000/* mtctrl */ #define SRR1_WAKEHMI 0x00280000/* Hypervisor maintenance */ #define SRR1_WAKEDEC 0x00180000/* Decrementer interrupt */
arch/powerpc/include/asm/xics.h +1 -0
@@ -44,6 +44,7 @@ static inline int icp_hv_init(void) { return -ENODEV; }#ifdef CONFIG_PPC_POWERNV extern int icp_opal_init (void ); +extern void icp_opal_flush_interrupt (void );#else static inline int icp_opal_init (void ) {return -ENODEV ; }#endif
arch/powerpc/mm/tlb-radix.c +1 -5
@@ -50,9 +50,7 @@ static inline void _tlbiel_pid(unsigned long pid, unsigned long ric)for (set =0 ; set <POWER9_TLB_SETS_RADIX ; set++) {__tlbiel_pid (pid, set, ric); } -if (cpu_has_feature (CPU_FTR_POWER9_DD1 )) - asm volatile(PPC_INVALIDATE_ERAT : : :"memory"); -return ; + asmvolatile (PPC_INVALIDATE_ERAT "; isync" : : :"memory" ); }static inline void _tlbie_pid (unsigned long pid,unsigned long ric)
@@ -85,8 +83,6 @@ static inline void _tlbiel_va(unsigned long va, unsigned long pid, asm volatile(PPC_TLBIEL(%0, %4, %3, %2, %1) : : "r"(rb), "i"(r), "i"(prs), "i"(ric), "r"(rs) : "memory"); asm volatile("ptesync": : :"memory"); -if (cpu_has_feature (CPU_FTR_POWER9_DD1 )) - asm volatile(PPC_INVALIDATE_ERAT : : :"memory"); } static inline void _tlbie_va(unsigned long va, unsigned long pid,
arch/powerpc/platforms/powernv/smp.c +10 -2
@@ -155,8 +155,10 @@ static void pnv_smp_cpu_kill_self(void) wmask =SRR1_WAKEMASK_P8 ; idle_states =pnv_get_supported_cpuidle_states (); +/* We don't want to take decrementer interrupts while we are offline, -* so clear LPCR:PECE1. We keep PECE2 enabled. +* so clear LPCR:PECE1. We keep PECE2 (and LPCR_PECE_HVEE on P9) +* enabled as to let IPIs in. */ mtspr (SPRN_LPCR ,mfspr (SPRN_LPCR ) & ~(u64 )LPCR_PECE1 );
@@ -206,8 +208,12 @@ static void pnv_smp_cpu_kill_self(void)* contains 0. */ if (((srr1 & wmask) ==SRR1_WAKEEE ) || + ((srr1 & wmask) ==SRR1_WAKEHVI ) || (local_paca->irq_happened &PACA_IRQ_EE )) { -icp_native_flush_interrupt (); +if (cpu_has_feature (CPU_FTR_ARCH_300 )) +icp_opal_flush_interrupt (); +else +icp_native_flush_interrupt (); }else if ((srr1 & wmask) ==SRR1_WAKEHDBELL ) {unsigned long msg =PPC_DBELL_TYPE (PPC_DBELL_SERVER ); asm volatile(PPC_MSGCLR(%0) : : "r" (msg));
@@ -221,6 +227,8 @@ static void pnv_smp_cpu_kill_self(void)if (srr1 && !generic_check_cpu_restart (cpu))DBG ("CPU%d Unexpected exit while offline !\n" , cpu); } + +/* Re-enable decrementer interrupts */ mtspr (SPRN_LPCR ,mfspr (SPRN_LPCR ) |LPCR_PECE1 );DBG ("CPU%d coming online...\n" , cpu); }
arch/powerpc/sysdev/xics/icp-opal.c +29 -0
@@ -132,6 +132,35 @@ static irqreturn_t icp_opal_ipi_action(int irq, void *dev_id) return smp_ipi_demux(); } +/* +* Called when an interrupt is received on an off-line CPU to +* clear the interrupt, so that the CPU can go back to nap mode. +*/ +void icp_opal_flush_interrupt (void ) +{ +unsigned int xirr; +unsigned int vec; + +do { + xirr =icp_opal_get_xirr (); + vec = xirr &0x00ffffff ; +if (vec ==XICS_IRQ_SPURIOUS ) +break ; +if (vec ==XICS_IPI ) { +/* Clear pending IPI */ +int cpu =smp_processor_id (); +kvmppc_set_host_ipi (cpu,0 ); +opal_int_set_mfrr (get_hard_smp_processor_id (cpu),0xff ); + }else { +pr_err ("XICS: hw interrupt 0x%x to offline cpu, " +"disabling\n" , vec); +xics_mask_unknown_vec (vec); + } + +/* EOI the interrupt */ + }while (opal_int_eoi (xirr) >0 ); +} +#endif /* CONFIG_SMP */ static const struct icp_ops icp_opal_ops = {
arch/x86/include/asm/processor.h +1 -0
@@ -104,6 +104,7 @@ struct cpuinfo_x86 {__u8 x86_phys_bits;/* CPUID returned core id bits: */ __u8 x86_coreid_bits; +__u8 cu_id;/* Max extended CPUID function supported: */ __u32 extended_cpuid_level;/* Maximum supported CPUID level, -1=no CPUID: */
arch/x86/kernel/apic/io_apic.c +0 -2
@@ -1876,7 +1876,6 @@ static struct irq_chip ioapic_chip __read_mostly = { .irq_ack = irq_chip_ack_parent, .irq_eoi = ioapic_ack_level, .irq_set_affinity = ioapic_set_affinity, - .irq_retrigger = irq_chip_retrigger_hierarchy, .flags = IRQCHIP_SKIP_SET_WAKE, };
@@ -1888,7 +1887,6 @@ static struct irq_chip ioapic_ir_chip __read_mostly = { .irq_ack = irq_chip_ack_parent, .irq_eoi = ioapic_ir_ack_level, .irq_set_affinity = ioapic_set_affinity, - .irq_retrigger = irq_chip_retrigger_hierarchy, .flags = IRQCHIP_SKIP_SET_WAKE, };
arch/x86/kernel/cpu/amd.c +15 -1
@@ -309,8 +309,22 @@ static void amd_get_topology(struct cpuinfo_x86 *c)/* get information required for multi-node processors */ if (boot_cpu_has (X86_FEATURE_TOPOEXT )) { +u32 eax, ebx, ecx, edx; - node_id =cpuid_ecx (0x8000001e ) &7 ; +cpuid (0x8000001e , &eax, &ebx, &ecx, &edx); + + node_id = ecx &0xff ; + smp_num_siblings = ((ebx >>8 ) &0xff ) +1 ; + +if (c->x86 ==0x15 ) + c->cu_id = ebx &0xff ; + +if (c->x86 >=0x17 ) { + c->cpu_core_id = ebx &0xff ; + +if (smp_num_siblings >1 ) + c->x86_max_cores /= smp_num_siblings; + }/* * We may have multiple LLCs if L3 caches exist, so check if we
arch/x86/kernel/cpu/common.c +1 -0
@@ -1015,6 +1015,7 @@ static void identify_cpu(struct cpuinfo_x86 *c) c->x86_model_id[0 ] ='\0' ;/* Unset */ c->x86_max_cores =1 ; c->x86_coreid_bits =0 ; + c->cu_id =0xff ;#ifdef CONFIG_X86_64 c->x86_clflush_size =64 ; c->x86_phys_bits =36 ;
arch/x86/kernel/smpboot.c +9 -3
@@ -423,9 +423,15 @@ static bool match_smt(struct cpuinfo_x86 *c, struct cpuinfo_x86 *o)int cpu1 = c->cpu_index, cpu2 = o->cpu_index;if (c->phys_proc_id == o->phys_proc_id && -per_cpu (cpu_llc_id, cpu1) ==per_cpu (cpu_llc_id, cpu2) && - c->cpu_core_id == o->cpu_core_id) -return topology_sane (c, o,"smt" ); +per_cpu (cpu_llc_id, cpu1) ==per_cpu (cpu_llc_id, cpu2)) { +if (c->cpu_core_id == o->cpu_core_id) +return topology_sane (c, o,"smt" ); + +if ((c->cu_id !=0xff ) && + (o->cu_id !=0xff ) && + (c->cu_id == o->cu_id)) +return topology_sane (c, o,"smt" ); + } }else if (c->phys_proc_id == o->phys_proc_id && c->cpu_core_id == o->cpu_core_id) {
arch/x86/mm/dump_pagetables.c +2 -0
@@ -15,6 +15,7 @@#include <linux/debugfs.h> #include <linux/mm.h> #include <linux/init.h> +#include <linux/sched.h> #include <linux/seq_file.h> #include <asm/pgtable.h>
@@ -406,6 +407,7 @@ static void ptdump_walk_pgd_level_core(struct seq_file *m, pgd_t *pgd, }else note_page (m, &st,__pgprot (0 ),1 ); +cond_resched (); start++; }
crypto/algif_aead.c +1 -1
@@ -671,9 +671,9 @@ static int aead_recvmsg_sync(struct socket *sock, struct msghdr *msg, int flags) unlock:list_for_each_entry_safe (rsgl, tmp, &ctx->list, list) {af_alg_free_sg (&rsgl->sgl); +list_del (&rsgl->list);if (rsgl != &ctx->first_rsgl)sock_kfree_s (sk, rsgl,sizeof (*rsgl)); -list_del (&rsgl->list); }INIT_LIST_HEAD (&ctx->list);aead_wmem_wakeup (sk);
drivers/acpi/nfit/core.c +5 -1
@@ -2704,6 +2704,7 @@ static int acpi_nfit_flush_probe(struct nvdimm_bus_descriptor *nd_desc)struct acpi_nfit_desc *acpi_desc =to_acpi_nfit_desc (nd_desc);struct device *dev = acpi_desc->dev;struct acpi_nfit_flush_work flush; +int rc;/* bounce the device lock to flush acpi_nfit_add / acpi_nfit_notify */ device_lock (dev);
@@ -2716,7 +2717,10 @@ static int acpi_nfit_flush_probe(struct nvdimm_bus_descriptor *nd_desc)INIT_WORK_ONSTACK (&flush.work, flush_probe);COMPLETION_INITIALIZER_ONSTACK (flush.cmp);queue_work (nfit_wq, &flush.work); -return wait_for_completion_interruptible (&flush.cmp); + + rc =wait_for_completion_interruptible (&flush.cmp); +cancel_work_sync (&flush.work); +return rc; } static int acpi_nfit_clear_to_send(struct nvdimm_bus_descriptor *nd_desc,
drivers/cpufreq/intel_pstate.c +30 -0
@@ -820,6 +820,25 @@ static void intel_pstate_hwp_enable(struct cpudata *cpudata)wrmsrl_on_cpu (cpudata->cpu,MSR_PM_ENABLE ,0x1 ); } +#define MSR_IA32_POWER_CTL_BIT_EE 19 + +/* Disable energy efficiency optimization */ +static void intel_pstate_disable_ee (int cpu) +{ +u64 power_ctl; +int ret; + + ret =rdmsrl_on_cpu (cpu,MSR_IA32_POWER_CTL , &power_ctl); +if (ret) +return ; + +if (!(power_ctl &BIT (MSR_IA32_POWER_CTL_BIT_EE ))) { +pr_info ("Disabling energy efficiency optimization\n" ); + power_ctl |=BIT (MSR_IA32_POWER_CTL_BIT_EE ); +wrmsrl_on_cpu (cpu,MSR_IA32_POWER_CTL , power_ctl); + } +} +static int atom_get_min_pstate (void ) {u64 value;
@@ -1420,6 +1439,11 @@ static const struct x86_cpu_id intel_pstate_cpu_oob_ids[] __initconst = { {} }; +static const struct x86_cpu_id intel_pstate_cpu_ee_disable_ids[] = { +ICPU (INTEL_FAM6_KABYLAKE_DESKTOP , core_params), + {} +}; +static int intel_pstate_init_cpu (unsigned int cpunum) {struct cpudata *cpu;
@@ -1435,6 +1459,12 @@ static int intel_pstate_init_cpu(unsigned int cpunum) cpu->cpu = cpunum;if (hwp_active) { +const struct x86_cpu_id *id; + + id =x86_match_cpu (intel_pstate_cpu_ee_disable_ids); +if (id) +intel_pstate_disable_ee (cpunum); +intel_pstate_hwp_enable (cpu); pid_params.sample_rate_ms =50 ; pid_params.sample_rate_ns =50 *NSEC_PER_MSEC ;
drivers/crypto/ccp/ccp-dev-v5.c +1 -1
@@ -955,7 +955,7 @@ static irqreturn_t ccp5_irq_handler(int irq, void *data)static void ccp5_config (struct ccp_device *ccp) {/* Public side */ -iowrite32 (0x00001249 , ccp->io_regs +CMD5_REQID_CONFIG_OFFSET ); +iowrite32 (0x0 , ccp->io_regs +CMD5_REQID_CONFIG_OFFSET ); }static void ccp5other_config (struct ccp_device *ccp)
drivers/crypto/ccp/ccp-dev.h +1 -0
@@ -238,6 +238,7 @@ struct ccp_dma_chan {struct ccp_device *ccp;spinlock_t lock; +struct list_head created;struct list_head pending;struct list_head active;struct list_head complete;
drivers/crypto/ccp/ccp-dmaengine.c +5 -1
@@ -63,6 +63,7 @@ static void ccp_free_chan_resources(struct dma_chan *dma_chan)ccp_free_desc_resources (chan->ccp, &chan->complete);ccp_free_desc_resources (chan->ccp, &chan->active);ccp_free_desc_resources (chan->ccp, &chan->pending); +ccp_free_desc_resources (chan->ccp, &chan->created);spin_unlock_irqrestore (&chan->lock, flags); }
@@ -273,6 +274,7 @@ static dma_cookie_t ccp_tx_submit(struct dma_async_tx_descriptor *tx_desc)spin_lock_irqsave (&chan->lock, flags); cookie =dma_cookie_assign (tx_desc); +list_del (&desc->entry);list_add_tail (&desc->entry, &chan->pending);spin_unlock_irqrestore (&chan->lock, flags);
@@ -426,7 +428,7 @@ static struct ccp_dma_desc *ccp_create_desc(struct dma_chan *dma_chan,spin_lock_irqsave (&chan->lock, sflags); -list_add_tail (&desc->entry, &chan->pending); +list_add_tail (&desc->entry, &chan->created);spin_unlock_irqrestore (&chan->lock, sflags);
@@ -610,6 +612,7 @@ static int ccp_terminate_all(struct dma_chan *dma_chan)/*TODO: Purge the complete list? */ ccp_free_desc_resources (chan->ccp, &chan->active);ccp_free_desc_resources (chan->ccp, &chan->pending); +ccp_free_desc_resources (chan->ccp, &chan->created);spin_unlock_irqrestore (&chan->lock, flags);
@@ -679,6 +682,7 @@ int ccp_dmaengine_register(struct ccp_device *ccp) chan->ccp = ccp;spin_lock_init (&chan->lock); +INIT_LIST_HEAD (&chan->created);INIT_LIST_HEAD (&chan->pending);INIT_LIST_HEAD (&chan->active);INIT_LIST_HEAD (&chan->complete);
drivers/crypto/chelsio/chcr_core.c +8 -10
@@ -51,6 +51,7 @@ static struct cxgb4_uld_info chcr_uld_info = {int assign_chcr_device (struct chcr_dev **dev) {struct uld_ctx *u_ctx; +int ret = -ENXIO ;/* * Which device to use if multiple devices are available TODO
@@ -58,15 +59,14 @@ int assign_chcr_device(struct chcr_dev **dev)* must go to the same device to maintain the ordering. */ mutex_lock (&dev_mutex);/* TODO ? */ - u_ctx = list_first_entry(&uld_ctx_list, struct uld_ctx, entry); -if (!u_ctx) { -mutex_unlock (&dev_mutex); -return -ENXIO ; +list_for_each_entry (u_ctx, &uld_ctx_list, entry) +if (u_ctx && u_ctx->dev) { + *dev = u_ctx->dev; + ret =0 ; +break ; } - - *dev = u_ctx->dev;mutex_unlock (&dev_mutex); -return 0 ; +return ret; }static int chcr_dev_add (struct uld_ctx *u_ctx)
@@ -203,10 +203,8 @@ static int chcr_uld_state_change(void *handle, enum cxgb4_state state)static int __init chcr_crypto_init (void ) { -if (cxgb4_register_uld (CXGB4_ULD_CRYPTO , &chcr_uld_info)) { +if (cxgb4_register_uld (CXGB4_ULD_CRYPTO , &chcr_uld_info))pr_err ("ULD register fail: No chcr crypto support in cxgb4" ); -return -1 ; - }return 0 ; }
drivers/crypto/qat/qat_c62x/adf_drv.c +1 -1
@@ -233,7 +233,7 @@ static int adf_probe(struct pci_dev *pdev, const struct pci_device_id *ent) &hw_data->accel_capabilities_mask);/* Find and map all the device's BARS */ - i =0 ; + i = (hw_data->fuses &ADF_DEVICE_FUSECTL_MASK ) ?1 :0 ; bar_mask =pci_select_bars (pdev,IORESOURCE_MEM );for_each_set_bit (bar_nr, (const unsigned long *)&bar_mask,ADF_PCI_MAX_BARS *2 ) {
drivers/crypto/qat/qat_common/adf_accel_devices.h +1 -0
@@ -69,6 +69,7 @@#define ADF_ERRSOU5 (0x3A000 + 0xD8)#define ADF_DEVICE_FUSECTL_OFFSET 0x40#define ADF_DEVICE_LEGFUSE_OFFSET 0x4C +#define ADF_DEVICE_FUSECTL_MASK 0x80000000#define ADF_PCI_MAX_BARS 3#define ADF_DEVICE_NAME_LENGTH 32#define ADF_ETR_MAX_RINGS_PER_BANK 16
drivers/crypto/qat/qat_common/qat_hal.c +2 -2
@@ -456,7 +456,7 @@ static int qat_hal_init_esram(struct icp_qat_fw_loader_handle *handle)unsigned int csr_val;int times =30 ; -if (handle->pci_dev->device ==ADF_C3XXX_PCI_DEVICE_ID ) +if (handle->pci_dev->device !=ADF_DH895XCC_PCI_DEVICE_ID )return 0 ; csr_val =ADF_CSR_RD (csr_addr,0 );
@@ -716,7 +716,7 @@ int qat_hal_init(struct adf_accel_dev *accel_dev) (void __iomem *)((uintptr_t )handle->hal_cap_ae_xfer_csr_addr_v +LOCAL_TO_XFER_REG_OFFSET ); handle->pci_dev = pci_info->pci_dev; -if (handle->pci_dev->device !=ADF_C3XXX_PCI_DEVICE_ID ) { +if (handle->pci_dev->device ==ADF_DH895XCC_PCI_DEVICE_ID ) { sram_bar = &pci_info->pci_bars[hw_data->get_sram_bar_id (hw_data)]; handle->hal_sram_addr_v = sram_bar->virt_addr;
drivers/gpu/drm/drm_atomic.c +8 -8
@@ -1759,16 +1759,16 @@ int drm_mode_atomic_ioctl(struct drm_device *dev,if (ret && arg->flags &DRM_MODE_PAGE_FLIP_EVENT ) {/* -* TEST_ONLY and PAGE_FLIP_EVENT are mutually exclusive, -* if they weren't, this code should be called on success -* for TEST_ONLY too. +* Free the allocated event. drm_atomic_helper_setup_commit +* can allocate an event too, so only free it if it's ours +* to prevent a double free in drm_atomic_state_clear. */ -for_each_crtc_in_state (state, crtc, crtc_state, i) { -if (!crtc_state->event) -continue ; - -drm_event_cancel_free (dev, &crtc_state->event->base); +struct drm_pending_vblank_event *event = crtc_state->event; +if (event && (event->base.fence || event->base.file_priv)) { +drm_event_cancel_free (dev, &event->base); + crtc_state->event =NULL ; + } } }
drivers/gpu/drm/i915/i915_gem_execbuffer.c +6 -6
@@ -1215,14 +1215,14 @@ validate_exec_list(struct drm_device *dev,if (exec[i].offset !=gen8_canonical_addr (exec[i].offset &PAGE_MASK ))return -EINVAL ; - -/* From drm_mm perspective address space is continuous, -* so from this point we're always using non-canonical -* form internally. -*/ - exec[i].offset =gen8_noncanonical_addr (exec[i].offset); } +/* From drm_mm perspective address space is continuous, +* so from this point we're always using non-canonical +* form internally. +*/ + exec[i].offset =gen8_noncanonical_addr (exec[i].offset); +if (exec[i].alignment && !is_power_of_2 (exec[i].alignment))return -EINVAL ;
drivers/gpu/drm/i915/intel_display.c +2 -2
@@ -4280,10 +4280,10 @@ static void page_flip_completed(struct intel_crtc *intel_crtc)drm_crtc_vblank_put (&intel_crtc->base);wake_up_all (&dev_priv->pending_flip_queue); -queue_work (dev_priv->wq, &work->unpin_work); -trace_i915_flip_complete (intel_crtc->plane, work->pending_flip_obj); + +queue_work (dev_priv->wq, &work->unpin_work); }static int intel_crtc_wait_for_pending_flips (struct drm_crtc *crtc)
drivers/gpu/drm/i915/intel_dpll_mgr.c +2 -1
@@ -1723,7 +1723,8 @@ bxt_get_dpll(struct intel_crtc *crtc,return NULL ;if ((encoder->type ==INTEL_OUTPUT_DP || - encoder->type ==INTEL_OUTPUT_EDP ) && + encoder->type ==INTEL_OUTPUT_EDP || + encoder->type ==INTEL_OUTPUT_DP_MST ) && !bxt_ddi_dp_set_dpll_hw_state (clock, &dpll_hw_state))return NULL ;
drivers/hv/channel.c +12 -81
177 lines not on this page · raw message
drivers/hv/channel_mgmt.c +0 -2
@@ -449,8 +449,6 @@ static void vmbus_process_offer(struct vmbus_channel *newchannel) } dev_type =hv_get_dev_type (newchannel); -if (dev_type ==HV_NIC ) -set_channel_signal_state (newchannel,HV_SIGNAL_POLICY_EXPLICIT );init_vp_index (newchannel, dev_type);
drivers/hv/hyperv_vmbus.h +5 -5
@@ -527,14 +527,14 @@ int hv_ringbuffer_init(struct hv_ring_buffer_info *ring_info,void hv_ringbuffer_cleanup (struct hv_ring_buffer_info *ring_info); -int hv_ringbuffer_write (struct hv_ring_buffer_info *ring_info, +int hv_ringbuffer_write (struct vmbus_channel *channel,struct kvec *kv_list, -u32 kv_count,bool *signal,bool lock, -enum hv_signal_policy policy); +u32 kv_count,bool lock, +bool kick_q); -int hv_ringbuffer_read (struct hv_ring_buffer_info *inring_info, +int hv_ringbuffer_read (struct vmbus_channel *channel,void *buffer,u32 buflen,u32 *buffer_actual_len, -u64 *requestid,bool *signal,bool raw); +u64 *requestid,bool raw);void hv_ringbuffer_get_debuginfo (struct hv_ring_buffer_info *ring_info,struct hv_ring_buffer_debug_info *debug_info);
drivers/hv/ring_buffer.c +26 -19
103 lines not on this page · raw message
drivers/infiniband/sw/rxe/rxe_mr.c +5 -3
@@ -59,9 +59,11 @@ int mem_check_range(struct rxe_mem *mem, u64 iova, size_t length)case RXE_MEM_TYPE_MR :case RXE_MEM_TYPE_FMR : -return ((iova < mem->iova) || - ((iova + length) > (mem->iova + mem->length))) ? - -EFAULT :0 ; +if (iova < mem->iova || + length > mem->length || + iova > mem->iova + mem->length - length) +return -EFAULT ; +return 0 ;default :return -EFAULT ;
drivers/infiniband/sw/rxe/rxe_resp.c +1 -1
@@ -472,7 +472,7 @@ static enum resp_states check_rkey(struct rxe_qp *qp, goto err2; } - resid = mtu; + qp->resp.resid = mtu; }else {if (pktlen != resid) { state =RESPST_ERR_LENGTH ;
drivers/input/misc/uinput.c +14 -6
@@ -263,13 +263,21 @@ static int uinput_create_device(struct uinput_device *udev)return -EINVAL ; } -if (test_bit (ABS_MT_SLOT , dev->absbit)) { - nslot =input_abs_get_max (dev,ABS_MT_SLOT ) +1 ; - error =input_mt_init_slots (dev, nslot,0 ); -if (error) +if (test_bit (EV_ABS , dev->evbit)) { +input_alloc_absinfo (dev); +if (!dev->absinfo) { + error = -EINVAL ; goto fail1; - }else if (test_bit (ABS_MT_POSITION_X , dev->absbit)) { -input_set_events_per_packet (dev,60 ); + } + +if (test_bit (ABS_MT_SLOT , dev->absbit)) { + nslot =input_abs_get_max (dev,ABS_MT_SLOT ) +1 ; + error =input_mt_init_slots (dev, nslot,0 ); +if (error) + goto fail1; + }else if (test_bit (ABS_MT_POSITION_X , dev->absbit)) { +input_set_events_per_packet (dev,60 ); + } }if (test_bit (EV_FF , dev->evbit) && !udev->ff_effects_max) {
drivers/md/dm-rq.c +4 -0
@@ -804,6 +804,10 @@ static void dm_old_request_fn(struct request_queue *q)int srcu_idx;struct dm_table *map =dm_get_live_table (md, &srcu_idx); +if (unlikely (!map)) { +dm_put_live_table (md, srcu_idx); +return ; + } ti =dm_table_find_target (map, pos);dm_put_live_table (md, srcu_idx); }
drivers/net/ethernet/hisilicon/hns/hns_dsaf_reg.h +2 -6
@@ -1007,9 +1007,7 @@static inline void dsaf_write_reg (void __iomem *base,u32 reg,u32 value) { -u8 __iomem *reg_addr =ACCESS_ONCE (base); - -writel (value, reg_addr + reg); +writel (value, base + reg); }#define dsaf_write_dev (a, reg, value) \
@@ -1017,9 +1015,7 @@ static inline void dsaf_write_reg(void __iomem *base, u32 reg, u32 value)static inline u32 dsaf_read_reg (u8 __iomem *base,u32 reg) { -u8 __iomem *reg_addr =ACCESS_ONCE (base); - -return readl (reg_addr + reg); +return readl (base + reg); }static inline void dsaf_write_syscon (struct regmap *base,u32 reg,u32 value)
drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c +13 -5
@@ -991,6 +991,7 @@ static int mlx5e_set_rxfh(struct net_device *dev, const u32 *indir, {struct mlx5e_priv *priv =netdev_priv (dev);int inlen =MLX5_ST_SZ_BYTES (modify_tir_in); +bool hash_changed = false;void *in; if ((hfunc != ETH_RSS_HASH_NO_CHANGE) &&
@@ -1012,14 +1013,21 @@ static int mlx5e_set_rxfh(struct net_device *dev, const u32 *indir,mlx5e_redirect_rqt (priv, rqtn,MLX5E_INDIR_RQT_SIZE ,0 ); } -if (key) +if (hfunc !=ETH_RSS_HASH_NO_CHANGE && + hfunc != priv->params.rss_hfunc) { + priv->params.rss_hfunc = hfunc; + hash_changed = true; + } + +if (key) {memcpy (priv->params.toeplitz_hash_key, key,sizeof (priv->params.toeplitz_hash_key)); + hash_changed = hash_changed || + priv->params.rss_hfunc ==ETH_RSS_HASH_TOP ; + } -if (hfunc !=ETH_RSS_HASH_NO_CHANGE ) - priv->params.rss_hfunc = hfunc; - -mlx5e_modify_tirs_hash (priv, in, inlen); +if (hash_changed) +mlx5e_modify_tirs_hash (priv, in, inlen);mutex_unlock (&priv->state_lock);
drivers/net/hyperv/netvsc.c +6 -0
@@ -1288,6 +1288,9 @@ void netvsc_channel_cb(void *context) ndev =hv_get_drvdata (device); buffer =get_per_channel_state (channel); +/* commit_rd_index() -> hv_signal_on_read() needs this. */ +init_cached_read_index (channel); + do { desc = get_next_pkt_raw(channel); if (desc != NULL) {
@@ -1340,6 +1343,9 @@ void netvsc_channel_cb(void *context) bufferlen = bytes_recvd; } + +init_cached_read_index (channel); + }while (1 );if (bufferlen >NETVSC_PACKET_SIZE )
drivers/net/wireless/realtek/rtlwifi/rtl8192ce/sw.c +7 -2
@@ -96,7 +96,7 @@ int rtl92c_init_sw_vars(struct ieee80211_hw *hw)struct rtl_priv *rtlpriv =rtl_priv (hw);struct rtl_pci *rtlpci =rtl_pcidev (rtl_pcipriv (hw));struct rtl_hal *rtlhal =rtl_hal (rtl_priv (hw)); -char *fw_name ="rtlwifi/rtl8192cfwU.bin" ; +char *fw_name;rtl8192ce_bt_reg_init (hw);
@@ -168,8 +168,13 @@ int rtl92c_init_sw_vars(struct ieee80211_hw *hw) }/* request fw */ -if (IS_81XXC_VENDOR_UMC_B_CUT (rtlhal->version)) +if (IS_VENDOR_UMC_A_CUT (rtlhal->version) && + !IS_92C_SERIAL (rtlhal->version)) + fw_name ="rtlwifi/rtl8192cfwU.bin" ; +else if (IS_81XXC_VENDOR_UMC_B_CUT (rtlhal->version)) fw_name ="rtlwifi/rtl8192cfwU_B.bin" ; +else + fw_name ="rtlwifi/rtl8192cfw.bin" ; rtlpriv->max_fw_size =0x4000 ;pr_info ("Using firmware %s\n" , fw_name);
drivers/net/xen-netfront.c +2 -1
@@ -1397,6 +1397,8 @@ static void xennet_disconnect_backend(struct netfront_info *info)for (i =0 ; i < num_queues && info->queues; ++i) {struct netfront_queue *queue = &info->queues[i]; +del_timer_sync (&queue->rx_refill_timer); +if (queue->tx_irq && (queue->tx_irq == queue->rx_irq))unbind_from_irqhandler (queue->tx_irq, queue);if (queue->tx_irq && (queue->tx_irq != queue->rx_irq)) {
@@ -1751,7 +1753,6 @@ static void xennet_destroy_queues(struct netfront_info *info)if (netif_running (info->netdev))napi_disable (&queue->napi); -del_timer_sync (&queue->rx_refill_timer);netif_napi_del (&queue->napi); }
drivers/nvdimm/namespace_devs.c +7 -4
@@ -962,8 +962,8 @@ static ssize_t __size_store(struct device *dev, unsigned long long val)struct nvdimm_drvdata *ndd;struct nd_label_id label_id;u32 flags =0 , remainder; +int rc, i, id =-1 ;u8 *uuid =NULL ; -int rc, i;if (dev->driver || ndns->claim)return -EBUSY ;
@@ -972,11 +972,13 @@ static ssize_t __size_store(struct device *dev, unsigned long long val)struct nd_namespace_pmem *nspm =to_nd_namespace_pmem (dev); uuid = nspm->uuid; + id = nspm->id; }else if (is_namespace_blk (dev)) {struct nd_namespace_blk *nsblk =to_nd_namespace_blk (dev); uuid = nsblk->uuid; flags =NSLABEL_FLAG_LOCAL ; + id = nsblk->id; }/*
@@ -1039,10 +1041,11 @@ static ssize_t __size_store(struct device *dev, unsigned long long val)/* * Try to delete the namespace if we deleted all of its -* allocation, this is not the seed device for the region, and -* it is not actively claimed by a btt instance. +* allocation, this is not the seed or 0th device for the +* region, and it is not actively claimed by a btt, pfn, or dax +* instance. */ -if (val ==0 && nd_region->ns_seed != dev && !ndns->claim) +if (val ==0 && id !=0 && nd_region->ns_seed != dev && !ndns->claim)nd_device_unregister (dev,ND_ASYNC );return rc;
drivers/nvdimm/pfn_devs.c +2 -5
@@ -627,15 +627,12 @@ static int nd_pfn_init(struct nd_pfn *nd_pfn) size =resource_size (&nsio->res); npfns = (size - start_pad - end_trunc -SZ_8K ) /SZ_4K ;if (nd_pfn->mode ==PFN_MODE_PMEM ) { -unsigned long memmap_size; -/* * vmemmap_populate_hugepages() allocates the memmap array in * HPAGE_SIZE chunks. */ - memmap_size =ALIGN (64 * npfns,HPAGE_SIZE ); - offset =ALIGN (start +SZ_8K + memmap_size + dax_label_reserve, - nd_pfn->align) - start; + offset =ALIGN (start +SZ_8K +64 * npfns + dax_label_reserve, +max (nd_pfn->align,HPAGE_SIZE )) - start; }else if (nd_pfn->mode ==PFN_MODE_RAM ) offset =ALIGN (start +SZ_8K + dax_label_reserve, nd_pfn->align) - start;
drivers/s390/scsi/zfcp_fsf.c +4 -4
@@ -1583,7 +1583,7 @@ static void zfcp_fsf_open_wka_port_handler(struct zfcp_fsf_req *req)int zfcp_fsf_open_wka_port (struct zfcp_fc_wka_port *wka_port) {struct zfcp_qdio *qdio = wka_port->adapter->qdio; -struct zfcp_fsf_req *req =NULL ; +struct zfcp_fsf_req *req;int retval = -EIO ;spin_lock_irq (&qdio->req_q_lock);
@@ -1612,7 +1612,7 @@ int zfcp_fsf_open_wka_port(struct zfcp_fc_wka_port *wka_port)zfcp_fsf_req_free (req); out:spin_unlock_irq (&qdio->req_q_lock); -if (req && !IS_ERR (req)) +if (!retval)zfcp_dbf_rec_run_wka ("fsowp_1" , wka_port, req->req_id);return retval; }
@@ -1638,7 +1638,7 @@ static void zfcp_fsf_close_wka_port_handler(struct zfcp_fsf_req *req)int zfcp_fsf_close_wka_port (struct zfcp_fc_wka_port *wka_port) {struct zfcp_qdio *qdio = wka_port->adapter->qdio; -struct zfcp_fsf_req *req =NULL ; +struct zfcp_fsf_req *req;int retval = -EIO ;spin_lock_irq (&qdio->req_q_lock);
@@ -1667,7 +1667,7 @@ int zfcp_fsf_close_wka_port(struct zfcp_fc_wka_port *wka_port)zfcp_fsf_req_free (req); out:spin_unlock_irq (&qdio->req_q_lock); -if (req && !IS_ERR (req)) +if (!retval)zfcp_dbf_rec_run_wka ("fscwp_1" , wka_port, req->req_id);return retval; }
drivers/scsi/aacraid/comminit.c +6 -2
@@ -50,9 +50,13 @@ struct aac_common aac_config = {static inline int aac_is_msix_mode (struct aac_dev *dev) { -u32 status; +u32 status =0 ; - status =src_readl (dev, MUnit.OMR); +if (dev->pdev->device ==PMC_DEVICE_S6 || + dev->pdev->device ==PMC_DEVICE_S7 || + dev->pdev->device ==PMC_DEVICE_S8 ) { + status =src_readl (dev, MUnit.OMR); + }return (status &AAC_INT_MODE_MSIX ); }
drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c +1 -0
@@ -3929,6 +3929,7 @@ static struct configfs_attribute *ibmvscsis_tpg_attrs[] = {static const struct target_core_fabric_ops ibmvscsis_ops = { .module =THIS_MODULE , .name ="ibmvscsis" , + .max_data_sg_nents =MAX_TXU /PAGE_SIZE , .get_fabric_name = ibmvscsis_get_fabric_name, .tpg_get_wwn = ibmvscsis_get_fabric_wwn, .tpg_get_tag = ibmvscsis_get_tag,
drivers/scsi/mpt3sas/mpt3sas_scsih.c +3 -0
@@ -51,6 +51,7 @@#include <linux/workqueue.h> #include <linux/delay.h> #include <linux/pci.h> +#include <linux/pci-aspm.h> #include <linux/interrupt.h> #include <linux/aer.h> #include <linux/raid_class.h>
@@ -8706,6 +8707,8 @@ _scsih_probe(struct pci_dev *pdev, const struct pci_device_id *id)switch (hba_mpi_version) {case MPI2_VERSION : +pci_disable_link_state (pdev,PCIE_LINK_STATE_L0S | +PCIE_LINK_STATE_L1 |PCIE_LINK_STATE_CLKPM );/* Use mpt2sas driver host template for SAS 2.0 HBA's */ shost =scsi_host_alloc (&mpt2sas_driver_template,sizeof (struct MPT3SAS_ADAPTER ));
drivers/scsi/qla2xxx/qla_os.c +1 -1
@@ -1459,7 +1459,7 @@ qla2x00_abort_all_cmds(scsi_qla_host_t *vha, int res)/* Don't abort commands in adapter during EEH * recovery as it's not accessible/responding. */ -if (!ha->flags.eeh_busy) { +if (GET_CMD_SP (sp) && !ha->flags.eeh_busy) {/* Get a reference to the sp and drop the lock. * The reference ensures this sp->done() call * - and not the call in qla2xxx_eh_abort() -
drivers/target/target_core_device.c +9 -1
@@ -351,7 +351,15 @@ int core_enable_device_list_for_node(kfree (new);return -EINVAL ; } -BUG_ON (orig->se_lun_acl !=NULL ); +if (orig->se_lun_acl !=NULL ) { +pr_warn_ratelimited ("Detected existing explicit" +" se_lun_acl->se_lun_group reference for %s" +" mapped_lun: %llu, failing\n" , + nacl->initiatorname, mapped_lun); +mutex_unlock (&nacl->lun_entry_mutex); +kfree (new); +return -EINVAL ; + }rcu_assign_pointer (new->se_lun, lun);rcu_assign_pointer (new->se_lun_acl, lun_acl);
drivers/target/target_core_sbc.c +6 -2
@@ -450,6 +450,7 @@ static sense_reason_t compare_and_write_post(struct se_cmd *cmd, bool success, int *post_ret) {struct se_device *dev = cmd->se_dev; +sense_reason_t ret =TCM_NO_SENSE ;/* * Only set SCF_COMPARE_AND_WRITE_POST to force a response fall-through
@@ -457,9 +458,12 @@ static sense_reason_t compare_and_write_post(struct se_cmd *cmd, bool success,* sent to the backend driver. */ spin_lock_irq (&cmd->t_state_lock); -if ((cmd->transport_state &CMD_T_SENT ) && !cmd->scsi_status) { +if (cmd->transport_state &CMD_T_SENT ) { cmd->se_cmd_flags |=SCF_COMPARE_AND_WRITE_POST ; *post_ret =1 ; + +if (cmd->scsi_status ==SAM_STAT_CHECK_CONDITION ) + ret =TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE ; }spin_unlock_irq (&cmd->t_state_lock);
@@ -469,7 +473,7 @@ static sense_reason_t compare_and_write_post(struct se_cmd *cmd, bool success,*/ up (&dev->caw_sem); -return TCM_NO_SENSE ; +return ret; } static sense_reason_t compare_and_write_callback(struct se_cmd *cmd, bool success,
drivers/target/target_core_transport.c +58 -28
145 lines not on this page · raw message
drivers/target/target_core_xcopy.c +1 -1
@@ -836,7 +836,7 @@ static void target_xcopy_do_work(struct work_struct *work) " CHECK_CONDITION -> sending response\n", rc); ec_cmd->scsi_status =SAM_STAT_CHECK_CONDITION ; } -target_complete_cmd (ec_cmd,SAM_STAT_CHECK_CONDITION ); +target_complete_cmd (ec_cmd, ec_cmd->scsi_status); }sense_reason_t target_do_xcopy (struct se_cmd *se_cmd)
fs/btrfs/ioctl.c +4 -2
@@ -5648,6 +5648,10 @@ long btrfs_ioctl(struct file *file, unsigned int#ifdef CONFIG_COMPAT long btrfs_compat_ioctl (struct file *file,unsigned int cmd,unsigned long arg) { +/* +* These all access 32-bit values anyway so no further +* handling is necessary. +*/ switch (cmd) {case FS_IOC32_GETFLAGS : cmd =FS_IOC_GETFLAGS ;
@@ -5658,8 +5662,6 @@ long btrfs_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg)case FS_IOC32_GETVERSION : cmd =FS_IOC_GETVERSION ;break ; -default : -return -ENOIOCTLCMD ; }return btrfs_ioctl (file, cmd, (unsigned long )compat_ptr (arg));
include/linux/cpumask.h +4 -4
@@ -560,7 +560,7 @@ static inline void cpumask_copy(struct cpumask *dstp,static inline int cpumask_parse_user (const char __user *buf,int len,struct cpumask *dstp) { -return bitmap_parse_user (buf, len,cpumask_bits (dstp), nr_cpu_ids); +return bitmap_parse_user (buf, len,cpumask_bits (dstp), nr_cpumask_bits); }/**
@@ -575,7 +575,7 @@ static inline int cpumask_parselist_user(const char __user *buf, int len, struct cpumask *dstp) {return bitmap_parselist_user (buf, len,cpumask_bits (dstp), - nr_cpu_ids); + nr_cpumask_bits); }/**
@@ -590,7 +590,7 @@ static inline int cpumask_parse(const char *buf, struct cpumask *dstp)char *nl =strchr (buf,'\n' );unsigned int len = nl ? (unsigned int )(nl - buf) :strlen (buf); -return bitmap_parse (buf, len,cpumask_bits (dstp), nr_cpu_ids); +return bitmap_parse (buf, len,cpumask_bits (dstp), nr_cpumask_bits); }/**
@@ -602,7 +602,7 @@ static inline int cpumask_parse(const char *buf, struct cpumask *dstp)*/ static inline int cpulist_parse (const char *buf,struct cpumask *dstp) { -return bitmap_parselist (buf,cpumask_bits (dstp), nr_cpu_ids); +return bitmap_parselist (buf,cpumask_bits (dstp), nr_cpumask_bits); }/**
include/linux/hyperv.h +37 -8
93 lines not on this page · raw message
include/target/target_core_base.h +1 -0
@@ -538,6 +538,7 @@ struct se_node_acl {char initiatorname[TRANSPORT_IQN_LEN ];/* Used to signal demo mode created ACL, disabled by default */ bool dynamic_node_acl; +bool dynamic_stop;u32 queue_depth;u32 acl_index;enum target_prot_type saved_prot_type;
kernel/events/core.c +15 -10
@@ -3461,14 +3461,15 @@ struct perf_read_data {int ret; }; -static int find_cpu_to_read (struct perf_event *event,int local_cpu) +static int __perf_event_read_cpu (struct perf_event *event,int event_cpu) { -int event_cpu = event->oncpu;u16 local_pkg, event_pkg;if (event->group_caps &PERF_EV_CAP_READ_ACTIVE_PKG ) { - event_pkg =topology_physical_package_id (event_cpu); - local_pkg =topology_physical_package_id (local_cpu); +int local_cpu =smp_processor_id (); + + event_pkg =topology_physical_package_id (event_cpu); + local_pkg =topology_physical_package_id (local_cpu);if (event_pkg == local_pkg)return local_cpu;
@@ -3598,7 +3599,7 @@ u64 perf_event_read_local(struct perf_event *event)static int perf_event_read (struct perf_event *event,bool group) { -int ret =0 , cpu_to_read, local_cpu; +int event_cpu, ret =0 ;/* * If event is enabled and currently active on a CPU, update the
@@ -3611,21 +3612,25 @@ static int perf_event_read(struct perf_event *event, bool group) .ret = 0, }; - local_cpu =get_cpu (); - cpu_to_read =find_cpu_to_read (event, local_cpu); -put_cpu (); + event_cpu =READ_ONCE (event->oncpu); +if ((unsigned )event_cpu >= nr_cpu_ids) +return 0 ; + +preempt_disable (); + event_cpu =__perf_event_read_cpu (event, event_cpu);/* * Purposely ignore the smp_call_function_single() return * value. * -* If event->oncpu isn't a valid CPU it means the event got +* If event_cpu isn't a valid CPU it means the event got * scheduled out and that will have updated the event count. * * Therefore, either way, we'll have an up-to-date event count * after this. */ - (void )smp_call_function_single (cpu_to_read, __perf_event_read, &data,1 ); + (void )smp_call_function_single (event_cpu, __perf_event_read, &data,1 ); +preempt_enable (); ret = data.ret; }else if (event->state ==PERF_EVENT_STATE_INACTIVE ) {struct perf_event_context *ctx = event->ctx;
kernel/stacktrace.c +4 -8
@@ -18,10 +18,8 @@ void print_stack_trace(struct stack_trace *trace, int spaces)if (WARN_ON (!trace->entries))return ; -for (i =0 ; i < trace->nr_entries; i++) { -printk ("%*c" ,1 + spaces,' ' ); -print_ip_sym (trace->entries[i]); - } +for (i =0 ; i < trace->nr_entries; i++) +printk ("%*c%pS\n" ,1 + spaces,' ' , (void *)trace->entries[i]); }EXPORT_SYMBOL_GPL (print_stack_trace);
@@ -29,7 +27,6 @@ int snprint_stack_trace(char *buf, size_t size, struct stack_trace *trace, int spaces) {int i; -unsigned long ip;int generated;int total =0 ;
@@ -37,9 +34,8 @@ int snprint_stack_trace(char *buf, size_t size,return 0 ;for (i =0 ; i < trace->nr_entries; i++) { - ip = trace->entries[i]; - generated =snprintf (buf, size,"%*c[<%p>] %pS\n" , -1 + spaces,' ' , (void *) ip, (void *) ip); + generated =snprintf (buf, size,"%*c%pS\n" ,1 + spaces,' ' , + (void *)trace->entries[i]); total += generated;
mm/slub.c +4 -0
@@ -1419,6 +1419,10 @@ static int init_cache_random_seq(struct kmem_cache *s)int err;unsigned long i, count =oo_objects (s->oo); +/* Bailout if already initialised */ +if (s->random_seq) +return 0 ; + err =cache_random_seq_create (s, count,GFP_KERNEL );if (err) { pr_err("SLUB: Unable to initialize free list for %s\n",
net/mac80211/mesh.c +1 -1
@@ -339,7 +339,7 @@ int mesh_add_vendor_ies(struct ieee80211_sub_if_data *sdata,/* fast-forward to vendor IEs */ offset =ieee80211_ie_split_vendor (ifmsh->ie, ifmsh->ie_len,0 ); -if (offset) { +if (offset < ifmsh->ie_len) { len = ifmsh->ie_len - offset; data = ifmsh->ie + offset;if (skb_tailroom (skb) < len)
net/wireless/nl80211.c +1 -0
@@ -5874,6 +5874,7 @@ do { \break ; } cfg->ht_opmode = ht_opmode; + mask |= (1 << (NL80211_MESHCONF_HT_OPMODE -1 )); } FILL_IN_MESH_PARAM_IF_SET(tb, cfg, dot11MeshHWMPactivePathToRootTimeout, 1, 65535, mask,
security/selinux/hooks.c +1 -1
@@ -5858,7 +5858,7 @@ static int selinux_setprocattr(struct task_struct *p,return error;/* Obtain a SID for the context, if one was specified. */ -if (size && str[1 ] && str[1 ] !='\n' ) { +if (size && str[0 ] && str[0 ] !='\n' ) {if (str[size-1 ] =='\n' ) { str[size-1 ] =0 ; size--;
sound/core/seq/seq_memory.c +1 -8
@@ -419,7 +419,6 @@ int snd_seq_pool_done(struct snd_seq_pool *pool) {unsigned long flags;struct snd_seq_event_cell *ptr; -int max_count =5 *HZ ;if (snd_BUG_ON (!pool))return -EINVAL ;
@@ -432,14 +431,8 @@ int snd_seq_pool_done(struct snd_seq_pool *pool)if (waitqueue_active (&pool->output_sleep))wake_up (&pool->output_sleep); -while (atomic_read (&pool->counter) >0 ) { -if (max_count ==0 ) { -pr_warn ("ALSA: snd_seq_pool_done timeout: %d cells remain\n" ,atomic_read (&pool->counter)); -break ; - } +while (atomic_read (&pool->counter) >0 )schedule_timeout_uninterruptible (1 ); - max_count--; - }/* release all resources */ spin_lock_irqsave (&pool->lock, flags);
sound/core/seq/seq_queue.c +20 -13
@@ -181,6 +181,8 @@ void __exit snd_seq_queues_delete(void) } } +static void queue_use (struct snd_seq_queue *queue,int client,int use); +/* allocate a new queue - * return queue index value or negative value for error */
@@ -192,11 +194,11 @@ int snd_seq_queue_alloc(int client, int locked, unsigned int info_flags)if (q ==NULL )return -ENOMEM ; q->info_flags = info_flags; +queue_use (q, client,1 );if (queue_list_add (q) <0 ) {queue_delete (q);return -ENOMEM ; } -snd_seq_queue_use (q->queue, client,1 );/* use this queue */ return q->queue; }
@@ -502,19 +504,9 @@ int snd_seq_queue_timer_set_tempo(int queueid, int client,return result; } - -/* use or unuse this queue - -* if it is the first client, starts the timer. -* if it is not longer used by any clients, stop the timer. -*/ -int snd_seq_queue_use (int queueid,int client,int use) +/* use or unuse this queue */ +static void queue_use (struct snd_seq_queue *queue,int client,int use) { -struct snd_seq_queue *queue; - - queue =queueptr (queueid); -if (queue ==NULL ) -return -EINVAL ; -mutex_lock (&queue->timer_mutex);if (use) {if (!test_and_set_bit (client, queue->clients_bitmap)) queue->clients++;
@@ -529,6 +521,21 @@ int snd_seq_queue_use(int queueid, int client, int use) }else {snd_seq_timer_close (queue); } +} + +/* use or unuse this queue - +* if it is the first client, starts the timer. +* if it is not longer used by any clients, stop the timer. +*/ +int snd_seq_queue_use (int queueid,int client,int use) +{ +struct snd_seq_queue *queue; + + queue =queueptr (queueid); +if (queue ==NULL ) +return -EINVAL ; +mutex_lock (&queue->timer_mutex); +queue_use (queue, client, use);mutex_unlock (&queue->timer_mutex);queuefree (queue);return 0 ;
sound/pci/hda/patch_hdmi.c +1 -0
@@ -3638,6 +3638,7 @@ HDA_CODEC_ENTRY(0x10de0070, "GPU 70 HDMI/DP", patch_nvhdmi),HDA_CODEC_ENTRY (0x10de0071 ,"GPU 71 HDMI/DP" , patch_nvhdmi),HDA_CODEC_ENTRY (0x10de0072 ,"GPU 72 HDMI/DP" , patch_nvhdmi),HDA_CODEC_ENTRY (0x10de007d ,"GPU 7d HDMI/DP" , patch_nvhdmi), +HDA_CODEC_ENTRY (0x10de0080 ,"GPU 80 HDMI/DP" , patch_nvhdmi),HDA_CODEC_ENTRY (0x10de0082 ,"GPU 82 HDMI/DP" , patch_nvhdmi),HDA_CODEC_ENTRY (0x10de0083 ,"GPU 83 HDMI/DP" , patch_nvhdmi), HDA_CODEC_ENTRY(0x10de8001, "MCP73 HDMI", patch_nvhdmi_2ch),
sound/usb/line6/driver.c +2 -1
@@ -754,8 +754,9 @@ int line6_probe(struct usb_interface *interface, goto error; } +line6_get_interval (line6); +if (properties->capabilities &LINE6_CAP_CONTROL ) { -line6_get_interval (line6); ret =line6_init_cap_control (line6);if (ret <0 ) goto error;
tools/perf/builtin-diff.c +1 -1
@@ -1199,7 +1199,7 @@ static int ui_init(void)BUG_ON (1 ); } -perf_hpp__register_sort_field (fmt); +perf_hpp__prepend_sort_field (fmt);return 0 ; }
tools/perf/ui/hist.c +10 -0
@@ -521,6 +521,12 @@ void perf_hpp_list__register_sort_field(struct perf_hpp_list *list,list_add_tail (&format->sort_list, &list->sorts); } +void perf_hpp_list__prepend_sort_field (struct perf_hpp_list *list, +struct perf_hpp_fmt *format) +{ +list_add (&format->sort_list, &list->sorts); +} +void perf_hpp__column_unregister (struct perf_hpp_fmt *format) {list_del (&format->list);
@@ -560,6 +566,10 @@ void perf_hpp__setup_output_field(struct perf_hpp_list *list)perf_hpp_list__for_each_sort_list (list, fmt) {struct perf_hpp_fmt *pos; +/* skip sort-only fields ("sort_compute" in perf diff) */ +if (!fmt->entry && !fmt->color) +continue ; +perf_hpp_list__for_each_format (list, pos) {if (fmt_equal (fmt, pos)) goto next;
tools/perf/util/hist.h +7 -0
@@ -282,6 +282,8 @@ void perf_hpp_list__column_register(struct perf_hpp_list *list, struct perf_hpp_fmt *format);void perf_hpp_list__register_sort_field (struct perf_hpp_list *list,struct perf_hpp_fmt *format); +void perf_hpp_list__prepend_sort_field (struct perf_hpp_list *list, +struct perf_hpp_fmt *format);static inline void perf_hpp__column_register (struct perf_hpp_fmt *format) {
@@ -293,6 +295,11 @@ static inline void perf_hpp__register_sort_field(struct perf_hpp_fmt *format)perf_hpp_list__register_sort_field (&perf_hpp_list, format); } +static inline void perf_hpp__prepend_sort_field (struct perf_hpp_fmt *format) +{ +perf_hpp_list__prepend_sort_field (&perf_hpp_list, format); +} +#define perf_hpp_list__for_each_format (_list, format) \ list_for_each_entry(format, &(_list)->fields, list)