Linux 4.15.12
Greg KH
maintainerI'm announcing the release of the 4.15.12 kernel.
All users of the 4.15 kernel series must upgrade.
The updated 4.15.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.15.y
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Documentation/devicetree/bindings/usb/dwc2.txt | 2 Makefile | 2 arch/parisc/kernel/cache.c | 41 +++++++++-- arch/x86/include/asm/cpufeatures.h | 2 arch/x86/include/asm/nospec-branch.h | 5 + arch/x86/kernel/cpu/intel.c | 3 arch/x86/kernel/vm86_32.c | 3 arch/x86/kvm/mmu.c | 4 - arch/x86/mm/fault.c | 6 - drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c | 31 +++----- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 2 drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 2 drivers/gpu/drm/nouveau/nouveau_backlight.c | 4 - drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c | 2 drivers/gpu/drm/radeon/radeon_gem.c | 2 drivers/gpu/drm/radeon/radeon_object.c | 2 drivers/infiniband/sw/rdmavt/mr.c | 10 +- drivers/irqchip/irq-gic-v3-its.c | 9 +- drivers/nvme/host/core.c | 18 ++++- drivers/phy/broadcom/phy-brcm-usb-init.c | 22 ++---- drivers/phy/broadcom/phy-brcm-usb.c | 4 - drivers/scsi/qla2xxx/qla_init.c | 13 ++- drivers/scsi/qla2xxx/qla_mid.c | 6 + drivers/scsi/qla2xxx/qla_os.c | 59 ++++++++++------ drivers/scsi/qla2xxx/qla_target.c | 1 drivers/usb/dwc2/params.c | 6 - drivers/usb/dwc3/core.c | 36 ++++++---- drivers/usb/dwc3/core.h | 16 ++-- drivers/usb/dwc3/dwc3-of-simple.c | 1 drivers/usb/gadget/udc/bdc/bdc_pci.c | 1 drivers/usb/gadget/udc/renesas_usb3.c | 2 fs/aio.c | 44 ++++++++---- fs/btrfs/backref.c | 12 +++ fs/btrfs/raid56.c | 1 fs/btrfs/volumes.c | 30 ++++++-- fs/btrfs/volumes.h | 12 +++ fs/dcache.c | 11 ++- fs/namei.c | 5 - fs/nfs/super.c | 2 fs/xfs/xfs_icache.c | 2 include/kvm/arm_vgic.h | 1 include/linux/fs.h | 1 include/linux/irqchip/arm-gic-v3.h | 1 include/linux/irqchip/arm-gic.h | 1 sound/core/oss/pcm_oss.c | 10 +- sound/core/seq/seq_clientmgr.c | 4 - sound/core/seq/seq_prioq.c | 28 ++++---- sound/core/seq/seq_prioq.h | 6 - sound/core/seq/seq_queue.c | 28 ++------ sound/pci/hda/hda_intel.c | 9 +- tools/testing/selftests/x86/entry_from_vm86.c | 32 ++++++++- virt/kvm/arm/arch_timer.c | 6 + virt/kvm/arm/hyp/vgic-v3-sr.c | 3 virt/kvm/arm/mmu.c | 6 - virt/kvm/arm/vgic/vgic-v2.c | 11 ++- virt/kvm/arm/vgic/vgic-v3.c | 9 ++ virt/kvm/arm/vgic/vgic.c | 87 ++++++++++++++++++++----- virt/kvm/arm/vgic/vgic.h | 2 58 files changed, 460 insertions(+), 221 deletions(-)
Al Cooper (4):
phy: phy-brcm-usb: Fix two DT properties to match bindings doc
phy: phy-brcm-usb-init: Some Low Speed keyboards fail on 7271
phy: phy-brcm-usb-init: DRD mode can cause crash on startup
phy: phy-brcm-usb-init: Power down USB 3.0 PHY when XHCI disabled
Al Viro (1):
lock_parent() needs to recheck if dentry got __dentry_kill'ed under it
Alexander Sergeyev (1):
x86/speculation: Remove Skylake C2 from Speculation Control microcode blacklist
Amelie Delaunay (2):
usb: dwc2: fix STM32F7 USB OTG HS compatible
dt-bindings: usb: fix the STM32F7 DWC2 OTG HS core binding
Amir Goldstein (1):
xfs: preserve i_rdev when recycling a reclaimable inode
Andy Lutomirski (3):
selftests/x86/entry_from_vm86: Exit with 1 if we fail selftests/x86/entry_from_vm86: Add test cases for POPF x86/vm86/32: Fix POPF emulation
Andy Whitcroft (1):
x86/speculation, objtool: Annotate indirect calls/jumps for objtool on 32-bit kernels
Ard Biesheuvel (2):
KVM: arm/arm64: Reduce verbosity of KVM init log irqchip/gic-v3-its: Ensure nr_ites >= nr_lpis
Bill Kuzeja (1):
scsi: qla2xxx: Fix crashes in qla2x00_probe_one on probe failure
Christian König (2):
drm/amdgpu: fix prime teardown order
drm/radeon: fix prime teardown order
Christoffer Dall (1):
KVM: arm/arm64: Reset mapped IRQs on VM reset
Dmitriy Gorokh (1):
btrfs: Fix NULL pointer exception in find_bio_stripe
Edmund Nadolski (1):
btrfs: add missing initialization in btrfs_check_shared
Enric Balletbo i Serra (1):
usb: dwc3: of-simple: fix oops by unbalanced clk disable call
Eric W. Biederman (1):
fs: Teach path_connected to handle nfs filesystems with multiple roots.
Greg Kroah-Hartman (1):
Linux 4.15.12
Hans van Kranenburg (1):
btrfs: alloc_chunk: fix DUP stripe size handling
Himanshu Madhani (2):
scsi: qla2xxx: Fix smatch warning in qla25xx_delete_{rsp|req}_que
scsi: qla2xxx: Fix logo flag for qlt_free_session_done()
Israel Rukshin (1):
nvme: fix subsystem multiple controllers support check
John David Anglin (1):
parisc: Handle case where flush_cache_range is called with no context
Kirill A. Shutemov (2):
x86/cpufeatures: Add Intel Total Memory Encryption cpufeature x86/cpufeatures: Add Intel PCONFIG cpufeature
Lukas Wunner (1):
drm/nouveau/bl: Fix oops on driver unbind
Manu Gautam (1):
usb: dwc3: core: Power-off core/PHYs on system_suspend in host mode
Marc Zyngier (2):
kvm: arm/arm64: vgic-v3: Tighten synchronization for guests using v2 on v3
KVM: arm/arm64: vgic: Don't populate multiple LRs with the same vintid
Michel Dänzer (1):
drm/amdgpu/dce: Don't turn off DP sink when disconnected
Māris Nartišs (1):
drm/nouveau/mmu: ALIGN_DOWN correct variable
Nikolay Borisov (2):
btrfs: Fix use-after-free when cleaning up fs_devs with a single stale device
btrfs: Fix memory barriers usage with device stats counters
Quinn Tran (1):
scsi: qla2xxx: Fix NULL pointer access for fcport structure
Takashi Iwai (4):
ALSA: pcm: Fix UAF in snd_pcm_oss_get_formats()
ALSA: hda - Revert power_save option default value
ALSA: seq: Fix possible UAF in snd_seq_check_queue()
ALSA: seq: Clear client entry before deleting else at closing
Tejun Heo (3):
fs/aio: Add explicit RCU grace period when freeing kioctx fs/aio: Use RCU accessors for kioctx_table->table[]
RDMAVT: Fix synchronization around percpu_ref
Thinh Nguyen (1):
usb: dwc3: Fix GDBGFIFOSPACE_TYPE values
Tom Lendacky (1):
KVM: x86: Fix device passthrough when SME is active
Toshi Kani (1):
x86/mm: Fix vmalloc_fault to use pXd_large
Wei Yongjun (1):
USB: gadget: udc: Add missing platform_device_put() on error in bdc_pci_probe()
Yoshihiro Shimoda (1):
usb: gadget: udc: renesas_usb3: fix oops in renesas_usb3_remove()
Zygo Blaxell (1):
btrfs: remove spurious WARN_ON(ref->count < 0) in find_parent_nodes
Greg KH
maintainerDocumentation/devicetree/bindings/usb/dwc2.txt +1 -1
@@ -19,7 +19,7 @@ Required properties: configured in FS mode; - "st,stm32f4x9-hsotg": The DWC2 USB HS controller instance in STM32F4x9 SoCs configured in HS mode; - - "st,stm32f7xx-hsotg": The DWC2 USB HS controller instance in STM32F7xx SoCs + - "st,stm32f7-hsotg": The DWC2 USB HS controller instance in STM32F7 SoCs configured in HS mode; - reg : Should contain 1 register range (address and length) - interrupts : Should contain 1 interrupt
Makefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 4 PATCHLEVEL = 15 -SUBLEVEL = 11 +SUBLEVEL = 12 EXTRAVERSION = NAME = Fearless Coyote
arch/parisc/kernel/cache.c +32 -9
71 lines not on this page · raw message
arch/x86/include/asm/cpufeatures.h +2 -0
@@ -314,6 +314,7 @@#define X86_FEATURE_VPCLMULQDQ (16*32+10)/* Carry-Less Multiplication Double Quadword */ #define X86_FEATURE_AVX512_VNNI (16*32+11)/* Vector Neural Network Instructions */ #define X86_FEATURE_AVX512_BITALG (16*32+12)/* Support for VPOPCNT[B,W] and VPSHUF-BITQMB instructions */ +#define X86_FEATURE_TME (16*32+13)/* Intel Total Memory Encryption */ #define X86_FEATURE_AVX512_VPOPCNTDQ (16*32+14)/* POPCNT for vectors of DW/QW */ #define X86_FEATURE_LA57 (16*32+16)/* 5-level page tables */ #define X86_FEATURE_RDPID (16*32+22)/* RDPID instruction */
@@ -326,6 +327,7 @@/* Intel-defined CPU features, CPUID level 0x00000007:0 (EDX), word 18 */ #define X86_FEATURE_AVX512_4VNNIW (18*32+ 2)/* AVX-512 Neural Network Instructions */ #define X86_FEATURE_AVX512_4FMAPS (18*32+ 3)/* AVX-512 Multiply Accumulation Single precision */ +#define X86_FEATURE_PCONFIG (18*32+18)/* Intel PCONFIG */ #define X86_FEATURE_SPEC_CTRL (18*32+26)/* "" Speculation Control (IBRS + IBPB) */ #define X86_FEATURE_INTEL_STIBP (18*32+27)/* "" Single Thread Indirect Branch Predictors */ #define X86_FEATURE_ARCH_CAPABILITIES (18*32+29)/* IA32_ARCH_CAPABILITIES MSR (Intel) */
arch/x86/include/asm/nospec-branch.h +4 -1
@@ -183,7 +183,10 @@* otherwise we'll run out of registers. We don't care about CET * here, anyway. */ -# define CALL_NOSPEC ALTERNATIVE("call *%[thunk_target]\n", \ +# define CALL_NOSPEC \ + ALTERNATIVE( \ + ANNOTATE_RETPOLINE_SAFE \ + "call *%[thunk_target]\n", \ " jmp 904f;\n" \ " .align 16\n" \ "901: call 903f;\n" \
arch/x86/kernel/cpu/intel.c +1 -2
@@ -105,7 +105,7 @@ static void probe_xeon_phi_r3mwait(struct cpuinfo_x86 *c)/* * Early microcode releases for the Spectre v2 mitigation were broken. * Information taken from; -* - https://newsroom.intel.com/wp-content/uploads/sites/11/2018/01/microcode-update-guidance.pdf +* - https://newsroom.intel.com/wp-content/uploads/sites/11/2018/03/microcode-update-guidance.pdf * - https://kb.vmware.com/s/article/52345 * - Microcode revisions observed in the wild * - Release note from 20180108 microcode release
@@ -123,7 +123,6 @@ static const struct sku_microcode spectre_bad_microcodes[] = { { INTEL_FAM6_KABYLAKE_MOBILE, 0x09, 0x80 }, { INTEL_FAM6_SKYLAKE_X, 0x03, 0x0100013e }, { INTEL_FAM6_SKYLAKE_X, 0x04, 0x0200003c }, - { INTEL_FAM6_SKYLAKE_DESKTOP, 0x03, 0xc2 }, { INTEL_FAM6_BROADWELL_CORE, 0x04, 0x28 }, { INTEL_FAM6_BROADWELL_GT3E, 0x01, 0x1b }, { INTEL_FAM6_BROADWELL_XEON_D, 0x02, 0x14 },
arch/x86/kernel/vm86_32.c +2 -1
@@ -727,7 +727,8 @@ void handle_vm86_fault(struct kernel_vm86_regs *regs, long error_code)return ; check_vip: -if (VEFLAGS &X86_EFLAGS_VIP ) { +if ((VEFLAGS & (X86_EFLAGS_VIP |X86_EFLAGS_VIF )) == + (X86_EFLAGS_VIP |X86_EFLAGS_VIF )) {save_v86_state (regs,VM86_STI );return ; }
arch/x86/kvm/mmu.c +3 -1
@@ -2758,8 +2758,10 @@ static int set_spte(struct kvm_vcpu *vcpu, u64 *sptep,else pte_access &= ~ACC_WRITE_MASK ; +if (!kvm_is_mmio_pfn (pfn)) + spte |= shadow_me_mask; + spte |= (u64 )pfn <<PAGE_SHIFT ; - spte |= shadow_me_mask;if (pte_access &ACC_WRITE_MASK ) {
arch/x86/mm/fault.c +3 -3
@@ -330,7 +330,7 @@ static noinline int vmalloc_fault(unsigned long address)if (!pmd_k)return -1 ; -if (pmd_huge (*pmd_k)) +if (pmd_large (*pmd_k))return 0 ; pte_k =pte_offset_kernel (pmd_k, address);
@@ -475,7 +475,7 @@ static noinline int vmalloc_fault(unsigned long address)if (pud_none (*pud) ||pud_pfn (*pud) !=pud_pfn (*pud_ref))BUG (); -if (pud_huge (*pud)) +if (pud_large (*pud))return 0 ; pmd =pmd_offset (pud, address);
@@ -486,7 +486,7 @@ static noinline int vmalloc_fault(unsigned long address)if (pmd_none (*pmd) ||pmd_pfn (*pmd) !=pmd_pfn (*pmd_ref))BUG (); -if (pmd_huge (*pmd)) +if (pmd_large (*pmd))return 0 ; pte_ref =pte_offset_kernel (pmd_ref, address);
drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c +12 -19
@@ -69,25 +69,18 @@ void amdgpu_connector_hotplug(struct drm_connector *connector)/* don't do anything if sink is not display port, i.e., * passive dp->(dvi|hdmi) adaptor */ -if (dig_connector->dp_sink_type ==CONNECTOR_OBJECT_ID_DISPLAYPORT ) { -int saved_dpms = connector->dpms; -/* Only turn off the display if it's physically disconnected */ -if (!amdgpu_display_hpd_sense (adev, amdgpu_connector->hpd.hpd)) { -drm_helper_connector_dpms (connector,DRM_MODE_DPMS_OFF ); - }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)) -return ; - -/* set it to OFF so that drm_helper_connector_dpms() -* won't return immediately since the current state -* is ON at this point. -*/ - connector->dpms =DRM_MODE_DPMS_OFF ; -drm_helper_connector_dpms (connector,DRM_MODE_DPMS_ON ); - } - connector->dpms = saved_dpms; +if (dig_connector->dp_sink_type ==CONNECTOR_OBJECT_ID_DISPLAYPORT && +amdgpu_display_hpd_sense (adev, amdgpu_connector->hpd.hpd) && +amdgpu_atombios_dp_needs_link_train (amdgpu_connector)) { +/* Don't start link training before we have the DPCD */ +if (amdgpu_atombios_dp_get_dpcd (amdgpu_connector)) +return ; + +/* Turn the connector off and back on immediately, which +* will trigger link training +*/ +drm_helper_connector_dpms (connector,DRM_MODE_DPMS_OFF ); +drm_helper_connector_dpms (connector,DRM_MODE_DPMS_ON ); } } }
drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c +0 -2
@@ -36,8 +36,6 @@ void amdgpu_gem_object_free(struct drm_gem_object *gobj)struct amdgpu_bo *robj =gem_to_amdgpu_bo (gobj);if (robj) { -if (robj->gem_base.import_attach) -drm_prime_gem_destroy (&robj->gem_base, robj->tbo.sg);amdgpu_mn_unregister (robj);amdgpu_bo_unref (&robj); }
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +2 -0
@@ -44,6 +44,8 @@ static void amdgpu_ttm_bo_destroy(struct ttm_buffer_object *tbo)amdgpu_bo_kunmap (bo); +if (bo->gem_base.import_attach) +drm_prime_gem_destroy (&bo->gem_base, bo->tbo.sg);drm_gem_object_release (&bo->gem_base);amdgpu_bo_unref (&bo->parent);if (!list_empty (&bo->shadow_list)) {
drivers/gpu/drm/nouveau/nouveau_backlight.c +2 -2
@@ -268,13 +268,13 @@ nouveau_backlight_init(struct drm_device *dev)struct nvif_device *device = &drm->client.device;struct drm_connector *connector; +INIT_LIST_HEAD (&drm->bl_connectors); +if (apple_gmux_present ()) {NV_INFO (drm,"Apple GMUX detected: not registering Nouveau backlight interface\n" );return 0 ; } -INIT_LIST_HEAD (&drm->bl_connectors); -list_for_each_entry (connector, &dev->mode_config.connector_list, head) {if (connector->connector_type !=DRM_MODE_CONNECTOR_LVDS && connector->connector_type != DRM_MODE_CONNECTOR_eDP)
drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c +1 -1
@@ -1354,7 +1354,7 @@ nvkm_vmm_get_locked(struct nvkm_vmm *vmm, bool getref, bool mapref, bool sparse, tail = this->addr + this->size;if (vmm->func->page_block && next && next->page != p) - tail =ALIGN_DOWN (addr, vmm->func->page_block); + tail =ALIGN_DOWN (tail, vmm->func->page_block);if (addr <= tail && tail - addr >= size) {rb_erase (&this->tree, &vmm->free);
drivers/gpu/drm/radeon/radeon_gem.c +0 -2
@@ -34,8 +34,6 @@ void radeon_gem_object_free(struct drm_gem_object *gobj)struct radeon_bo *robj =gem_to_radeon_bo (gobj);if (robj) { -if (robj->gem_base.import_attach) -drm_prime_gem_destroy (&robj->gem_base, robj->tbo.sg);radeon_mn_unregister (robj);radeon_bo_unref (&robj); }
drivers/gpu/drm/radeon/radeon_object.c +2 -0
@@ -82,6 +82,8 @@ static void radeon_ttm_bo_destroy(struct ttm_buffer_object *tbo)mutex_unlock (&bo->rdev->gem.mutex);radeon_bo_clear_surface_reg (bo);WARN_ON_ONCE (!list_empty (&bo->va)); +if (bo->gem_base.import_attach) +drm_prime_gem_destroy (&bo->gem_base, bo->tbo.sg);drm_gem_object_release (&bo->gem_base);kfree (bo); }
drivers/infiniband/sw/rdmavt/mr.c +6 -4
@@ -489,11 +489,13 @@ static int rvt_check_refs(struct rvt_mregion *mr, const char *t)unsigned long timeout;struct rvt_dev_info *rdi =ib_to_rvt (mr->pd->device); -if (percpu_ref_is_zero (&mr->refcount)) -return 0 ; -/* avoid dma mr */ -if (mr->lkey) +if (mr->lkey) { +/* avoid dma mr */ rvt_dereg_clean_qps (mr); +/* @mr was indexed on rcu protected @lkey_table */ +synchronize_rcu (); + } + timeout =wait_for_completion_timeout (&mr->comp,5 *HZ );if (!timeout) { rvt_pr_err(rdi,
drivers/irqchip/irq-gic-v3-its.c +4 -5
@@ -1412,7 +1412,7 @@ static struct irq_chip its_irq_chip = {* This gives us (((1UL << id_bits) - 8192) >> 5) possible allocations. */ #define IRQS_PER_CHUNK_SHIFT 5 -#define IRQS_PER_CHUNK (1 << IRQS_PER_CHUNK_SHIFT) +#define IRQS_PER_CHUNK (1UL << IRQS_PER_CHUNK_SHIFT)#define ITS_MAX_LPI_NRBITS 16/* 64K LPIs */ static unsigned long *lpi_bitmap;
@@ -2119,11 +2119,10 @@ static struct its_device *its_create_device(struct its_node *its, u32 dev_id, dev =kzalloc (sizeof (*dev),GFP_KERNEL );/* -* At least one bit of EventID is being used, hence a minimum -* of two entries. No, the architecture doesn't let you -* express an ITT with a single entry. +* We allocate at least one chunk worth of LPIs bet device, +* and thus that many ITEs. The device may require less though. */ - nr_ites =max (2UL ,roundup_pow_of_two (nvecs)); + nr_ites =max (IRQS_PER_CHUNK ,roundup_pow_of_two (nvecs)); sz = nr_ites * its->ite_size; sz =max (sz,ITS_ITT_ALIGN ) +ITS_ITT_ALIGN -1 ; itt =kzalloc (sz,GFP_KERNEL );
drivers/nvme/host/core.c +17 -1
@@ -2052,6 +2052,22 @@ static const struct attribute_group *nvme_subsys_attrs_groups[] = { NULL, }; +static int nvme_active_ctrls (struct nvme_subsystem *subsys) +{ +int count =0 ; +struct nvme_ctrl *ctrl; + +mutex_lock (&subsys->lock); +list_for_each_entry (ctrl, &subsys->ctrls, subsys_entry) { +if (ctrl->state !=NVME_CTRL_DELETING && + ctrl->state !=NVME_CTRL_DEAD ) + count++; + } +mutex_unlock (&subsys->lock); + +return count; +} +static int nvme_init_subsystem (struct nvme_ctrl *ctrl,struct nvme_id_ctrl *id) {struct nvme_subsystem *subsys, *found;
@@ -2090,7 +2106,7 @@ static int nvme_init_subsystem(struct nvme_ctrl *ctrl, struct nvme_id_ctrl *id)* Verify that the subsystem actually supports multiple * controllers, else bail out. */ -if (!(id->cmic & (1 <<1 ))) { +if (nvme_active_ctrls (found) && !(id->cmic & (1 <<1 ))) {dev_err (ctrl->device,"ignoring ctrl due to duplicate subnqn (%s).\n" , found->subnqn);
drivers/phy/broadcom/phy-brcm-usb-init.c +10 -12
@@ -50,6 +50,8 @@#define USB_CTRL_PLL_CTL_PLL_IDDQ_PWRDN_MASK 0x80000000/* option */ #define USB_CTRL_EBRIDGE 0x0c#define USB_CTRL_EBRIDGE_ESTOP_SCB_REQ_MASK 0x00020000/* option */ +#define USB_CTRL_OBRIDGE 0x10 +#define USB_CTRL_OBRIDGE_LS_KEEP_ALIVE_MASK 0x08000000#define USB_CTRL_MDIO 0x14#define USB_CTRL_MDIO2 0x18#define USB_CTRL_UTMI_CTL_1 0x2c
@@ -71,6 +73,7 @@#define USB_CTRL_USB30_CTL1_USB3_IPP_MASK 0x20000000/* option */ #define USB_CTRL_USB30_PCTL 0x70#define USB_CTRL_USB30_PCTL_PHY3_SOFT_RESETB_MASK 0x00000002 +#define USB_CTRL_USB30_PCTL_PHY3_IDDQ_OVERRIDE_MASK 0x00008000#define USB_CTRL_USB30_PCTL_PHY3_SOFT_RESETB_P1_MASK 0x00020000#define USB_CTRL_USB_DEVICE_CTL1 0x90#define USB_CTRL_USB_DEVICE_CTL1_PORT_MODE_MASK 0x00000003/* option */
@@ -116,7 +119,6 @@ enum {USB_CTRL_SETUP_STRAP_IPP_SEL_SELECTOR ,USB_CTRL_SETUP_OC3_DISABLE_SELECTOR ,USB_CTRL_PLL_CTL_PLL_IDDQ_PWRDN_SELECTOR , -USB_CTRL_EBRIDGE_ESTOP_SCB_REQ_SELECTOR ,USB_CTRL_USB_PM_BDC_SOFT_RESETB_SELECTOR ,USB_CTRL_USB_PM_XHC_SOFT_RESETB_SELECTOR , USB_CTRL_USB_PM_USB_PWRDN_SELECTOR,
@@ -203,7 +205,6 @@ usb_reg_bits_map_table[BRCM_FAMILY_COUNT][USB_CTRL_SELECTOR_COUNT] = {USB_CTRL_SETUP_STRAP_IPP_SEL_MASK ,USB_CTRL_SETUP_OC3_DISABLE_MASK ,0 ,/* USB_CTRL_PLL_CTL_PLL_IDDQ_PWRDN_MASK */ -USB_CTRL_EBRIDGE_ESTOP_SCB_REQ_MASK ,0 ,/* USB_CTRL_USB_PM_BDC_SOFT_RESETB_MASK */ USB_CTRL_USB_PM_XHC_SOFT_RESETB_MASK , USB_CTRL_USB_PM_USB_PWRDN_MASK,
@@ -225,7 +226,6 @@ usb_reg_bits_map_table[BRCM_FAMILY_COUNT][USB_CTRL_SELECTOR_COUNT] = {0 ,/* USB_CTRL_SETUP_STRAP_IPP_SEL_MASK */ USB_CTRL_SETUP_OC3_DISABLE_MASK ,USB_CTRL_PLL_CTL_PLL_IDDQ_PWRDN_MASK , -USB_CTRL_EBRIDGE_ESTOP_SCB_REQ_MASK ,0 ,/* USB_CTRL_USB_PM_BDC_SOFT_RESETB_MASK */ USB_CTRL_USB_PM_XHC_SOFT_RESETB_VAR_MASK , 0, /* USB_CTRL_USB_PM_USB_PWRDN_MASK */
@@ -247,7 +247,6 @@ usb_reg_bits_map_table[BRCM_FAMILY_COUNT][USB_CTRL_SELECTOR_COUNT] = {USB_CTRL_SETUP_STRAP_IPP_SEL_MASK ,USB_CTRL_SETUP_OC3_DISABLE_MASK ,0 ,/* USB_CTRL_PLL_CTL_PLL_IDDQ_PWRDN_MASK */ -USB_CTRL_EBRIDGE_ESTOP_SCB_REQ_MASK ,USB_CTRL_USB_PM_BDC_SOFT_RESETB_MASK ,USB_CTRL_USB_PM_XHC_SOFT_RESETB_MASK , USB_CTRL_USB_PM_USB_PWRDN_MASK,
@@ -269,7 +268,6 @@ usb_reg_bits_map_table[BRCM_FAMILY_COUNT][USB_CTRL_SELECTOR_COUNT] = {0 ,/* USB_CTRL_SETUP_STRAP_IPP_SEL_MASK */ USB_CTRL_SETUP_OC3_DISABLE_MASK ,USB_CTRL_PLL_CTL_PLL_IDDQ_PWRDN_MASK , -USB_CTRL_EBRIDGE_ESTOP_SCB_REQ_MASK ,0 ,/* USB_CTRL_USB_PM_BDC_SOFT_RESETB_MASK */ USB_CTRL_USB_PM_XHC_SOFT_RESETB_VAR_MASK , 0, /* USB_CTRL_USB_PM_USB_PWRDN_MASK */
@@ -291,7 +289,6 @@ usb_reg_bits_map_table[BRCM_FAMILY_COUNT][USB_CTRL_SELECTOR_COUNT] = {0 ,/* USB_CTRL_SETUP_STRAP_IPP_SEL_MASK */ USB_CTRL_SETUP_OC3_DISABLE_MASK ,0 ,/* USB_CTRL_PLL_CTL_PLL_IDDQ_PWRDN_MASK */ -USB_CTRL_EBRIDGE_ESTOP_SCB_REQ_MASK ,0 ,/* USB_CTRL_USB_PM_BDC_SOFT_RESETB_MASK */ USB_CTRL_USB_PM_XHC_SOFT_RESETB_VAR_MASK , USB_CTRL_USB_PM_USB_PWRDN_MASK,
@@ -313,7 +310,6 @@ usb_reg_bits_map_table[BRCM_FAMILY_COUNT][USB_CTRL_SELECTOR_COUNT] = {0 ,/* USB_CTRL_SETUP_STRAP_IPP_SEL_MASK */ 0 ,/* USB_CTRL_SETUP_OC3_DISABLE_MASK */ USB_CTRL_PLL_CTL_PLL_IDDQ_PWRDN_MASK , -0 ,/* USB_CTRL_EBRIDGE_ESTOP_SCB_REQ_MASK */ 0 ,/* USB_CTRL_USB_PM_BDC_SOFT_RESETB_MASK */ 0 ,/* USB_CTRL_USB_PM_XHC_SOFT_RESETB_MASK */ 0, /* USB_CTRL_USB_PM_USB_PWRDN_MASK */
@@ -335,7 +331,6 @@ usb_reg_bits_map_table[BRCM_FAMILY_COUNT][USB_CTRL_SELECTOR_COUNT] = {USB_CTRL_SETUP_STRAP_IPP_SEL_MASK ,USB_CTRL_SETUP_OC3_DISABLE_MASK ,0 ,/* USB_CTRL_PLL_CTL_PLL_IDDQ_PWRDN_MASK */ -0 ,/* USB_CTRL_EBRIDGE_ESTOP_SCB_REQ_MASK */ USB_CTRL_USB_PM_BDC_SOFT_RESETB_MASK ,USB_CTRL_USB_PM_XHC_SOFT_RESETB_MASK , USB_CTRL_USB_PM_USB_PWRDN_MASK,
@@ -357,7 +352,6 @@ usb_reg_bits_map_table[BRCM_FAMILY_COUNT][USB_CTRL_SELECTOR_COUNT] = {0 ,/* USB_CTRL_SETUP_STRAP_IPP_SEL_MASK */ USB_CTRL_SETUP_OC3_DISABLE_MASK ,USB_CTRL_PLL_CTL_PLL_IDDQ_PWRDN_MASK , -0 ,/* USB_CTRL_EBRIDGE_ESTOP_SCB_REQ_MASK */ 0 ,/* USB_CTRL_USB_PM_BDC_SOFT_RESETB_MASK */ 0 ,/* USB_CTRL_USB_PM_XHC_SOFT_RESETB_MASK */ 0, /* USB_CTRL_USB_PM_USB_PWRDN_MASK */
@@ -379,7 +373,6 @@ usb_reg_bits_map_table[BRCM_FAMILY_COUNT][USB_CTRL_SELECTOR_COUNT] = {USB_CTRL_SETUP_STRAP_IPP_SEL_MASK ,USB_CTRL_SETUP_OC3_DISABLE_MASK ,0 ,/* USB_CTRL_PLL_CTL_PLL_IDDQ_PWRDN_MASK */ -USB_CTRL_EBRIDGE_ESTOP_SCB_REQ_MASK ,USB_CTRL_USB_PM_BDC_SOFT_RESETB_MASK ,USB_CTRL_USB_PM_XHC_SOFT_RESETB_MASK , USB_CTRL_USB_PM_USB_PWRDN_MASK,
@@ -401,7 +394,6 @@ usb_reg_bits_map_table[BRCM_FAMILY_COUNT][USB_CTRL_SELECTOR_COUNT] = {USB_CTRL_SETUP_STRAP_IPP_SEL_MASK ,USB_CTRL_SETUP_OC3_DISABLE_MASK ,0 ,/* USB_CTRL_PLL_CTL_PLL_IDDQ_PWRDN_MASK */ -USB_CTRL_EBRIDGE_ESTOP_SCB_REQ_MASK ,USB_CTRL_USB_PM_BDC_SOFT_RESETB_MASK ,USB_CTRL_USB_PM_XHC_SOFT_RESETB_MASK , USB_CTRL_USB_PM_USB_PWRDN_MASK,
@@ -926,6 +918,7 @@ void brcm_usb_init_common(struct brcm_usb_init_params *params)USB_CTRL_UNSET_FAMILY (params,USB_PM ,BDC_SOFT_RESETB );break ;default : +USB_CTRL_UNSET_FAMILY (params,USB_PM ,BDC_SOFT_RESETB );USB_CTRL_SET_FAMILY (params,USB_PM ,BDC_SOFT_RESETB );break ; }
@@ -952,13 +945,17 @@ void brcm_usb_init_eohci(struct brcm_usb_init_params *params)* Don't enable this so the memory controller doesn't read * into memory holes. NOTE: This bit is low true on 7366C0. */ -USB_CTRL_SET_FAMILY (params,EBRIDGE ,ESTOP_SCB_REQ ); +USB_CTRL_SET (ctrl,EBRIDGE ,ESTOP_SCB_REQ );/* Setup the endian bits */ reg =brcmusb_readl (USB_CTRL_REG (ctrl,SETUP )); reg &= ~USB_CTRL_SETUP_ENDIAN_BITS ; reg |=USB_CTRL_MASK_FAMILY (params,SETUP ,ENDIAN );brcmusb_writel (reg,USB_CTRL_REG (ctrl,SETUP )); + +if (params->selected_family ==BRCM_FAMILY_7271A0 ) +/* Enable LS keep alive fix for certain keyboards */ +USB_CTRL_SET (ctrl,OBRIDGE ,LS_KEEP_ALIVE ); }void brcm_usb_init_xhci (struct brcm_usb_init_params *params)
@@ -1003,6 +1000,7 @@ void brcm_usb_uninit_eohci(struct brcm_usb_init_params *params)void brcm_usb_uninit_xhci (struct brcm_usb_init_params *params) {brcmusb_xhci_soft_reset (params,1 ); +USB_CTRL_SET (params->ctrl_regs,USB30_PCTL ,PHY3_IDDQ_OVERRIDE ); }void brcm_usb_set_family_map (struct brcm_usb_init_params *params)
drivers/phy/broadcom/phy-brcm-usb.c +2 -2
@@ -338,9 +338,9 @@ static int brcm_usb_phy_probe(struct platform_device *pdev)ARRAY_SIZE (brcm_dr_mode_to_name), mode, &priv->ini.mode); } -if (of_property_read_bool (dn,"brcm,has_xhci" )) +if (of_property_read_bool (dn,"brcm,has-xhci" )) priv->has_xhci = true; -if (of_property_read_bool (dn,"brcm,has_eohci" )) +if (of_property_read_bool (dn,"brcm,has-eohci" )) priv->has_eohci = true; err =brcm_usb_phy_dvr_init (dev, priv, dn);
drivers/scsi/qla2xxx/qla_init.c +9 -4
@@ -102,11 +102,16 @@ qla2x00_async_iocb_timeout(void *data)struct srb_iocb *lio = &sp->u.iocb_cmd;struct event_arg ea; -ql_dbg (ql_dbg_disc, fcport->vha,0x2071 , -"Async-%s timeout - hdl=%x portid=%06x %8phC.\n" , - sp->name, sp->handle, fcport->d_id.b24, fcport->port_name); +if (fcport) { +ql_dbg (ql_dbg_disc, fcport->vha,0x2071 , +"Async-%s timeout - hdl=%x portid=%06x %8phC.\n" , + sp->name, sp->handle, fcport->d_id.b24, fcport->port_name); - fcport->flags &= ~FCF_ASYNC_SENT ; + fcport->flags &= ~FCF_ASYNC_SENT ; + }else { +pr_info ("Async-%s timeout - hdl=%x.\n" , + sp->name, sp->handle); + }switch (sp->type) {case SRB_LOGIN_CMD :
drivers/scsi/qla2xxx/qla_mid.c +4 -2
@@ -582,8 +582,9 @@ qla25xx_delete_req_que(struct scsi_qla_host *vha, struct req_que *req) ret =qla25xx_init_req_que (vha, req);if (ret !=QLA_SUCCESS )return QLA_FUNCTION_FAILED ; + +qla25xx_free_req_que (vha, req); } -qla25xx_free_req_que (vha, req);return ret; }
@@ -598,8 +599,9 @@ qla25xx_delete_rsp_que(struct scsi_qla_host *vha, struct rsp_que *rsp) ret =qla25xx_init_rsp_que (vha, rsp);if (ret !=QLA_SUCCESS )return QLA_FUNCTION_FAILED ; + +qla25xx_free_rsp_que (vha, rsp); } -qla25xx_free_rsp_que (vha, rsp);return ret; }
drivers/scsi/qla2xxx/qla_os.c +37 -22
123 lines not on this page · raw message
drivers/scsi/qla2xxx/qla_target.c +1 -0
@@ -982,6 +982,7 @@ static void qlt_free_session_done(struct work_struct *work) logo.id = sess->d_id; logo.cmd_count =0 ; + sess->send_els_logo =0 ;qlt_send_first_logo (vha, &logo); }
drivers/usb/dwc2/params.c +3 -3
@@ -137,7 +137,7 @@ static void dwc2_set_stm32f4x9_fsotg_params(struct dwc2_hsotg *hsotg) p->activate_stm_fs_transceiver = true; } -static void dwc2_set_stm32f7xx_hsotg_params (struct dwc2_hsotg *hsotg) +static void dwc2_set_stm32f7_hsotg_params (struct dwc2_hsotg *hsotg) {struct dwc2_core_params *p = &hsotg->params;
@@ -164,8 +164,8 @@ const struct of_device_id dwc2_of_match_table[] = { { .compatible = "st,stm32f4x9-fsotg", .data = dwc2_set_stm32f4x9_fsotg_params }, { .compatible = "st,stm32f4x9-hsotg" }, - { .compatible = "st,stm32f7xx-hsotg", - .data = dwc2_set_stm32f7xx_hsotg_params }, + { .compatible = "st,stm32f7-hsotg", + .data = dwc2_set_stm32f7_hsotg_params }, {}, };MODULE_DEVICE_TABLE (of, dwc2_of_match_table);
drivers/usb/dwc3/core.c +22 -14
@@ -100,6 +100,8 @@ static void dwc3_set_prtcap(struct dwc3 *dwc, u32 mode) reg &= ~(DWC3_GCTL_PRTCAPDIR (DWC3_GCTL_PRTCAP_OTG )); reg |=DWC3_GCTL_PRTCAPDIR (mode);dwc3_writel (dwc->regs,DWC3_GCTL , reg); + + dwc->current_dr_role = mode; }static void __dwc3_set_mode (struct work_struct *work)
@@ -133,8 +135,6 @@ static void __dwc3_set_mode(struct work_struct *work)dwc3_set_prtcap (dwc, dwc->desired_dr_role); - dwc->current_dr_role = dwc->desired_dr_role; -spin_unlock_irqrestore (&dwc->lock, flags);switch (dwc->desired_dr_role) {
@@ -218,7 +218,7 @@ static int dwc3_core_soft_reset(struct dwc3 *dwc)* XHCI driver will reset the host block. If dwc3 was configured for * host-only mode, then we can return early. */ -if (dwc->dr_mode ==USB_DR_MODE_HOST ) +if (dwc->current_dr_role ==DWC3_GCTL_PRTCAP_HOST )return 0 ; reg =dwc3_readl (dwc->regs,DWC3_DCTL );
@@ -915,7 +915,6 @@ static int dwc3_core_init_mode(struct dwc3 *dwc)switch (dwc->dr_mode) {case USB_DR_MODE_PERIPHERAL : - dwc->current_dr_role =DWC3_GCTL_PRTCAP_DEVICE ;dwc3_set_prtcap (dwc,DWC3_GCTL_PRTCAP_DEVICE );if (dwc->usb2_phy)
@@ -931,7 +930,6 @@ static int dwc3_core_init_mode(struct dwc3 *dwc) }break ;case USB_DR_MODE_HOST : - dwc->current_dr_role =DWC3_GCTL_PRTCAP_HOST ;dwc3_set_prtcap (dwc,DWC3_GCTL_PRTCAP_HOST );if (dwc->usb2_phy)
@@ -1279,7 +1277,7 @@ static int dwc3_remove(struct platform_device *pdev) }#ifdef CONFIG_PM -static int dwc3_suspend_common (struct dwc3 *dwc) +static int dwc3_suspend_common (struct dwc3 *dwc,pm_message_t msg) {unsigned long flags;
@@ -1291,6 +1289,10 @@ static int dwc3_suspend_common(struct dwc3 *dwc)dwc3_core_exit (dwc);break ;case DWC3_GCTL_PRTCAP_HOST : +/* do nothing during host runtime_suspend */ +if (!PMSG_IS_AUTO (msg)) +dwc3_core_exit (dwc); +break ;default :/* do nothing */ break ;
@@ -1299,7 +1301,7 @@ static int dwc3_suspend_common(struct dwc3 *dwc)return 0 ; } -static int dwc3_resume_common (struct dwc3 *dwc) +static int dwc3_resume_common (struct dwc3 *dwc,pm_message_t msg) {unsigned long flags;int ret;
@@ -1315,6 +1317,13 @@ static int dwc3_resume_common(struct dwc3 *dwc)spin_unlock_irqrestore (&dwc->lock, flags);break ;case DWC3_GCTL_PRTCAP_HOST : +/* nothing to do on host runtime_resume */ +if (!PMSG_IS_AUTO (msg)) { + ret =dwc3_core_init (dwc); +if (ret) +return ret; + } +break ;default :/* do nothing */ break ;
@@ -1326,12 +1335,11 @@ static int dwc3_resume_common(struct dwc3 *dwc)static int dwc3_runtime_checks (struct dwc3 *dwc) {switch (dwc->current_dr_role) { -case USB_DR_MODE_PERIPHERAL : -case USB_DR_MODE_OTG : +case DWC3_GCTL_PRTCAP_DEVICE :if (dwc->connected)return -EBUSY ;break ; -case USB_DR_MODE_HOST : +case DWC3_GCTL_PRTCAP_HOST :default :/* do nothing */ break ;
@@ -1348,7 +1356,7 @@ static int dwc3_runtime_suspend(struct device *dev)if (dwc3_runtime_checks (dwc))return -EBUSY ; - ret =dwc3_suspend_common (dwc); + ret =dwc3_suspend_common (dwc,PMSG_AUTO_SUSPEND );if (ret)return ret;
@@ -1364,7 +1372,7 @@ static int dwc3_runtime_resume(struct device *dev)device_init_wakeup (dev, false); - ret =dwc3_resume_common (dwc); + ret =dwc3_resume_common (dwc,PMSG_AUTO_RESUME );if (ret)return ret;
@@ -1411,7 +1419,7 @@ static int dwc3_suspend(struct device *dev)struct dwc3 *dwc =dev_get_drvdata (dev);int ret; - ret =dwc3_suspend_common (dwc); + ret =dwc3_suspend_common (dwc,PMSG_SUSPEND );if (ret)return ret;
@@ -1427,7 +1435,7 @@ static int dwc3_resume(struct device *dev)pinctrl_pm_select_default_state (dev); - ret =dwc3_resume_common (dwc); + ret =dwc3_resume_common (dwc,PMSG_RESUME );if (ret)return ret;
drivers/usb/dwc3/core.h +9 -7
@@ -158,13 +158,15 @@#define DWC3_GDBGFIFOSPACE_TYPE (n) (((n) << 5) & 0x1e0)#define DWC3_GDBGFIFOSPACE_SPACE_AVAILABLE (n) (((n) >> 16) & 0xffff) -#define DWC3_TXFIFOQ 1 -#define DWC3_RXFIFOQ 3 -#define DWC3_TXREQQ 5 -#define DWC3_RXREQQ 7 -#define DWC3_RXINFOQ 9 -#define DWC3_DESCFETCHQ 13 -#define DWC3_EVENTQ 15 +#define DWC3_TXFIFOQ 0 +#define DWC3_RXFIFOQ 1 +#define DWC3_TXREQQ 2 +#define DWC3_RXREQQ 3 +#define DWC3_RXINFOQ 4 +#define DWC3_PSTATQ 5 +#define DWC3_DESCFETCHQ 6 +#define DWC3_EVENTQ 7 +#define DWC3_AUXEVENTQ 8/* Global RX Threshold Configuration Register */ #define DWC3_GRXTHRCFG_MAXRXBURSTSIZE (n) (((n) & 0x1f) << 19)
drivers/usb/dwc3/dwc3-of-simple.c +1 -0
@@ -143,6 +143,7 @@ static int dwc3_of_simple_remove(struct platform_device *pdev)clk_disable_unprepare (simple->clks[i]);clk_put (simple->clks[i]); } + simple->num_clocks =0 ;reset_control_assert (simple->resets);reset_control_put (simple->resets);
drivers/usb/gadget/udc/bdc/bdc_pci.c +1 -0
@@ -77,6 +77,7 @@ static int bdc_pci_probe(struct pci_dev *pci, const struct pci_device_id *id)if (ret) {dev_err (&pci->dev,"couldn't add resources to bdc device\n" ); +platform_device_put (bdc);return ret; }
drivers/usb/gadget/udc/renesas_usb3.c +1 -1
@@ -2410,7 +2410,7 @@ static int renesas_usb3_remove(struct platform_device *pdev)__renesas_usb3_ep_free_request (usb3->ep0_req);if (usb3->phy)phy_put (usb3->phy); -pm_runtime_disable (usb3_to_dev (usb3)); +pm_runtime_disable (&pdev->dev);return 0 ; }
fs/aio.c +30 -14
107 lines not on this page · raw message
fs/btrfs/backref.c +11 -1
@@ -1263,7 +1263,16 @@ static int find_parent_nodes(struct btrfs_trans_handle *trans,while (node) { ref = rb_entry(node, struct prelim_ref, rbnode); node =rb_next (&ref->rbnode); -WARN_ON (ref->count <0 ); +/* +* ref->count < 0 can happen here if there are delayed +* refs with a node->action of BTRFS_DROP_DELAYED_REF. +* prelim_ref_insert() relies on this when merging +* identical refs to keep the overall count correct. +* prelim_ref_insert() will merge only those refs +* which compare identically. Any refs having +* e.g. different offsets would not be merged, +* and would retain their original ref->count < 0. +*/ if (roots && ref->count && ref->root_id && ref->parent ==0 ) {if (sc && sc->root_objectid && ref->root_id != sc->root_objectid) {
@@ -1509,6 +1518,7 @@ int btrfs_check_shared(struct btrfs_root *root, u64 inum, u64 bytenr)if (!node)break ; bytenr = node->val; + shared.share_count =0 ;cond_resched (); }
fs/btrfs/raid56.c +1 -0
@@ -1351,6 +1351,7 @@ static int find_bio_stripe(struct btrfs_raid_bio *rbio, stripe_start = stripe->physical;if (physical >= stripe_start && physical < stripe_start + rbio->stripe_len && + stripe->dev->bdev && bio->bi_disk == stripe->dev->bdev->bd_disk && bio->bi_partno == stripe->dev->bdev->bd_partno) {return i;
fs/btrfs/volumes.c +23 -7
@@ -574,6 +574,7 @@ static void btrfs_free_stale_device(struct btrfs_device *cur_dev)btrfs_sysfs_remove_fsid (fs_devs);list_del (&fs_devs->list);free_fs_devices (fs_devs); +break ; }else { fs_devs->num_devices--;list_del (&dev->dev_list);
@@ -4737,10 +4738,13 @@ static int __btrfs_alloc_chunk(struct btrfs_trans_handle *trans, ndevs =min (ndevs, devs_max);/* -* the primary goal is to maximize the number of stripes, so use as many -* devices as possible, even if the stripes are not maximum sized. +* The primary goal is to maximize the number of stripes, so use as +* many devices as possible, even if the stripes are not maximum sized. +* +* The DUP profile stores more than one stripe per device, the +* max_avail is the total size so we have to adjust. */ - stripe_size = devices_info[ndevs-1 ].max_avail; + stripe_size =div_u64 (devices_info[ndevs -1 ].max_avail, dev_stripes); num_stripes = ndevs * dev_stripes;/*
@@ -4775,8 +4779,6 @@ static int __btrfs_alloc_chunk(struct btrfs_trans_handle *trans, stripe_size = devices_info[ndevs-1 ].max_avail; } - stripe_size =div_u64 (stripe_size, dev_stripes); -/* align to BTRFS_STRIPE_LEN */ stripe_size =round_down (stripe_size,BTRFS_STRIPE_LEN );
@@ -7091,10 +7093,24 @@ int btrfs_run_dev_stats(struct btrfs_trans_handle *trans,mutex_lock (&fs_devices->device_list_mutex);list_for_each_entry (device, &fs_devices->devices, dev_list) { -if (!device->dev_stats_valid || !btrfs_dev_stats_dirty (device)) + stats_cnt =atomic_read (&device->dev_stats_ccnt); +if (!device->dev_stats_valid || stats_cnt ==0 )continue ; - stats_cnt =atomic_read (&device->dev_stats_ccnt); + +/* +* There is a LOAD-LOAD control dependency between the value of +* dev_stats_ccnt and updating the on-disk values which requires +* reading the in-memory counters. Such control dependencies +* require explicit read memory barriers. +* +* This memory barriers pairs with smp_mb__before_atomic in +* btrfs_dev_stat_inc/btrfs_dev_stat_set and with the full +* barrier implied by atomic_xchg in +* btrfs_dev_stats_read_and_reset +*/ +smp_rmb (); + ret =update_dev_stat_item (trans, fs_info, device);if (!ret)atomic_sub (stats_cnt, &device->dev_stats_ccnt);
fs/btrfs/volumes.h +12 -0
@@ -498,6 +498,12 @@ static inline void btrfs_dev_stat_inc(struct btrfs_device *dev, int index) {atomic_inc (dev->dev_stat_values + index); +/* +* This memory barrier orders stores updating statistics before stores +* updating dev_stats_ccnt. +* +* It pairs with smp_rmb() in btrfs_run_dev_stats(). +*/ smp_mb__before_atomic ();atomic_inc (&dev->dev_stats_ccnt); }
@@ -523,6 +529,12 @@ static inline void btrfs_dev_stat_set(struct btrfs_device *dev, int index, unsigned long val) {atomic_set (dev->dev_stat_values + index, val); +/* +* This memory barrier orders stores updating statistics before stores +* updating dev_stats_ccnt. +* +* It pairs with smp_rmb() in btrfs_run_dev_stats(). +*/ smp_mb__before_atomic ();atomic_inc (&dev->dev_stats_ccnt); }
fs/dcache.c +8 -3
@@ -644,11 +644,16 @@ static inline struct dentry *lock_parent(struct dentry *dentry)spin_unlock (&parent->d_lock); goto again; } -rcu_read_unlock (); -if (parent != dentry) +if (parent != dentry) {spin_lock_nested (&dentry->d_lock,DENTRY_D_LOCK_NESTED ); -else +if (unlikely (dentry->d_lockref.count <0 )) { +spin_unlock (&parent->d_lock); + parent =NULL ; + } + }else { parent =NULL ; + } +rcu_read_unlock ();return parent; }
fs/namei.c +3 -2
@@ -578,9 +578,10 @@ static int __nd_alloc_stack(struct nameidata *nd)static bool path_connected (const struct path *path) {struct vfsmount *mnt = path->mnt; +struct super_block *sb = mnt->mnt_sb; -/* Only bind mounts can have disconnected paths */ -if (mnt->mnt_root == mnt->mnt_sb->s_root) +/* Bind mounts and multi-root filesystems can have disconnected paths */ +if (!(sb->s_iflags &SB_I_MULTIROOT ) && (mnt->mnt_root == sb->s_root))return true;return is_subdir (path->dentry, mnt->mnt_root);
fs/nfs/super.c +2 -0
@@ -2631,6 +2631,8 @@ struct dentry *nfs_fs_mount_common(struct nfs_server *server,/* initial superblock/root creation */ mount_info->fill_super (s, mount_info);nfs_get_cache_cookie (s, mount_info->parsed, mount_info->cloned); +if (!(server->flags &NFS_MOUNT_UNSHARED )) + s->s_iflags |=SB_I_MULTIROOT ; } mntroot =nfs_get_root (s, mount_info->mntfh, dev_name);
fs/xfs/xfs_icache.c +2 -0
@@ -295,6 +295,7 @@ xfs_reinit_inode(uint32_t generation = inode->i_generation;uint64_t version = inode->i_version;umode_t mode = inode->i_mode; +dev_t dev = inode->i_rdev; error =inode_init_always (mp->m_super, inode);
@@ -302,6 +303,7 @@ xfs_reinit_inode( inode->i_generation = generation; inode->i_version = version; inode->i_mode = mode; + inode->i_rdev = dev;return error; }
include/kvm/arm_vgic.h +1 -0
@@ -349,6 +349,7 @@ void kvm_vgic_put(struct kvm_vcpu *vcpu);bool kvm_vcpu_has_pending_irqs (struct kvm_vcpu *vcpu);void kvm_vgic_sync_hwstate (struct kvm_vcpu *vcpu);void kvm_vgic_flush_hwstate (struct kvm_vcpu *vcpu); +void kvm_vgic_reset_mapped_irq (struct kvm_vcpu *vcpu,u32 vintid);void vgic_v3_dispatch_sgi (struct kvm_vcpu *vcpu,u64 reg);
include/linux/fs.h +1 -0
@@ -1312,6 +1312,7 @@ extern int send_sigurg(struct fown_struct *fown);#define SB_I_CGROUPWB 0x00000001/* cgroup-aware writeback enabled */ #define SB_I_NOEXEC 0x00000002/* Ignore executables on this fs */ #define SB_I_NODEV 0x00000004/* Ignore devices on this fs */ +#define SB_I_MULTIROOT 0x00000008/* Multiple roots to the dentry tree */ /* sb->s_iflags to limit user namespace mounts */ #define SB_I_USERNS_VISIBLE 0x00000010/* fstype already mounted */
include/linux/irqchip/arm-gic-v3.h +1 -0
@@ -503,6 +503,7 @@#define ICH_HCR_EN (1 << 0)#define ICH_HCR_UIE (1 << 1) +#define ICH_HCR_NPIE (1 << 3)#define ICH_HCR_TC (1 << 10)#define ICH_HCR_TALL0 (1 << 11)#define ICH_HCR_TALL1 (1 << 12)
include/linux/irqchip/arm-gic.h +1 -0
@@ -84,6 +84,7 @@#define GICH_HCR_EN (1 << 0)#define GICH_HCR_UIE (1 << 1) +#define GICH_HCR_NPIE (1 << 3)#define GICH_LR_VIRTUALID (0x3ff << 0)#define GICH_LR_PHYSID_CPUID_SHIFT (10)
sound/core/oss/pcm_oss.c +6 -4
@@ -1762,10 +1762,9 @@ static int snd_pcm_oss_get_formats(struct snd_pcm_oss_file *pcm_oss_file)return -ENOMEM ;_snd_pcm_hw_params_any (params); err =snd_pcm_hw_refine (substream, params); - format_mask =hw_param_mask_c (params,SNDRV_PCM_HW_PARAM_FORMAT ); -kfree (params);if (err <0 ) -return err; + goto error; + format_mask =hw_param_mask_c (params,SNDRV_PCM_HW_PARAM_FORMAT );for (fmt =0 ; fmt <32 ; ++fmt) {if (snd_mask_test (format_mask, fmt)) {int f =snd_pcm_oss_format_to (fmt);
@@ -1773,7 +1772,10 @@ static int snd_pcm_oss_get_formats(struct snd_pcm_oss_file *pcm_oss_file) formats |= f; } } -return formats; + + error: +kfree (params); +return err <0 ? err : formats; }static int snd_pcm_oss_set_format (struct snd_pcm_oss_file *pcm_oss_file,int format)
sound/core/seq/seq_clientmgr.c +2 -2
@@ -255,12 +255,12 @@ static int seq_free_client1(struct snd_seq_client *client)if (!client)return 0 ; -snd_seq_delete_all_ports (client); -snd_seq_queue_client_leave (client->number);spin_lock_irqsave (&clients_lock, flags); clienttablock[client->number] =1 ; clienttab[client->number] =NULL ;spin_unlock_irqrestore (&clients_lock, flags); +snd_seq_delete_all_ports (client); +snd_seq_queue_client_leave (client->number);snd_use_lock_sync (&client->use_lock);snd_seq_queue_client_termination (client->number);if (client->pool)
sound/core/seq/seq_prioq.c +14 -14
@@ -87,7 +87,7 @@ void snd_seq_prioq_delete(struct snd_seq_prioq **fifo)if (f->cells >0 ) {/* drain prioQ */ while (f->cells >0 ) -snd_seq_cell_free (snd_seq_prioq_cell_out (f)); +snd_seq_cell_free (snd_seq_prioq_cell_out (f,NULL )); }kfree (f);
@@ -214,8 +214,18 @@ int snd_seq_prioq_cell_in(struct snd_seq_prioq * f,return 0 ; } +/* return 1 if the current time >= event timestamp */ +static int event_is_ready (struct snd_seq_event *ev,void *current_time) +{ +if ((ev->flags &SNDRV_SEQ_TIME_STAMP_MASK ) ==SNDRV_SEQ_TIME_STAMP_TICK ) +return snd_seq_compare_tick_time (current_time, &ev->time.tick); +else +return snd_seq_compare_real_time (current_time, &ev->time.time); +} +/* dequeue cell from prioq */ -struct snd_seq_event_cell *snd_seq_prioq_cell_out (struct snd_seq_prioq *f) +struct snd_seq_event_cell *snd_seq_prioq_cell_out (struct snd_seq_prioq *f, +void *current_time) {struct snd_seq_event_cell *cell;unsigned long flags;
@@ -227,6 +237,8 @@ struct snd_seq_event_cell *snd_seq_prioq_cell_out(struct snd_seq_prioq *f)spin_lock_irqsave (&f->lock, flags); cell = f->head; +if (cell && current_time && !event_is_ready (&cell->event, current_time)) + cell =NULL ;if (cell) { f->head = cell->next;
@@ -252,18 +264,6 @@ int snd_seq_prioq_avail(struct snd_seq_prioq * f)return f->cells; } - -/* peek at cell at the head of the prioq */ -struct snd_seq_event_cell *snd_seq_prioq_cell_peek (struct snd_seq_prioq * f) -{ -if (f ==NULL ) { -pr_debug ("ALSA: seq: snd_seq_prioq_cell_in() called with NULL prioq\n" ); -return NULL ; - } -return f->head; -} - -static inline int prioq_match (struct snd_seq_event_cell *cell,int client,int timestamp) {
sound/core/seq/seq_prioq.h +2 -4
@@ -44,14 +44,12 @@ void snd_seq_prioq_delete(struct snd_seq_prioq **fifo);int snd_seq_prioq_cell_in (struct snd_seq_prioq *f,struct snd_seq_event_cell *cell);/* dequeue cell from prioq */ -struct snd_seq_event_cell *snd_seq_prioq_cell_out (struct snd_seq_prioq *f); +struct snd_seq_event_cell *snd_seq_prioq_cell_out (struct snd_seq_prioq *f, +void *current_time);/* return number of events available in prioq */ int snd_seq_prioq_avail (struct snd_seq_prioq *f); -/* peek at cell at the head of the prioq */ -struct snd_seq_event_cell *snd_seq_prioq_cell_peek (struct snd_seq_prioq *f); -/* client left queue */ void snd_seq_prioq_leave (struct snd_seq_prioq *f,int client,int timestamp);
sound/core/seq/seq_queue.c +9 -19
@@ -277,30 +277,20 @@ void snd_seq_check_queue(struct snd_seq_queue *q, int atomic, int hop) __again:/* Process tick queue... */ -while ((cell =snd_seq_prioq_cell_peek (q->tickq)) !=NULL ) { -if (snd_seq_compare_tick_time (&q->timer->tick.cur_tick, - &cell->event.time.tick)) { - cell =snd_seq_prioq_cell_out (q->tickq); -if (cell) -snd_seq_dispatch_event (cell, atomic, hop); - }else { -/* event remains in the queue */ +for (;;) { + cell =snd_seq_prioq_cell_out (q->tickq, + &q->timer->tick.cur_tick); +if (!cell)break ; - } +snd_seq_dispatch_event (cell, atomic, hop); } -/* Process time queue... */ -while ((cell =snd_seq_prioq_cell_peek (q->timeq)) !=NULL ) { -if (snd_seq_compare_real_time (&q->timer->cur_time, - &cell->event.time.time)) { - cell =snd_seq_prioq_cell_out (q->timeq); -if (cell) -snd_seq_dispatch_event (cell, atomic, hop); - }else { -/* event remains in the queue */ +for (;;) { + cell =snd_seq_prioq_cell_out (q->timeq, &q->timer->cur_time); +if (!cell)break ; - } +snd_seq_dispatch_event (cell, atomic, hop); }/* free lock */
sound/pci/hda/hda_intel.c +6 -3
@@ -181,11 +181,15 @@ static const struct kernel_param_ops param_ops_xint = { };#define param_check_xint param_check_int -static int power_save =-1 ; +static int power_save =CONFIG_SND_HDA_POWER_SAVE_DEFAULT ;module_param (power_save, xint,0644 );MODULE_PARM_DESC (power_save,"Automatic power-saving timeout " "(in second, 0 = disable)." ); +static bool pm_blacklist = true; +module_param (pm_blacklist, bool,0644 ); +MODULE_PARM_DESC (pm_blacklist,"Enable power-management blacklist" ); +/* reset the HD-audio controller in power save mode. * this may give more power-saving, but will take longer time to * wake up.
@@ -2300,10 +2304,9 @@ static int azx_probe_continue(struct azx *chip) val = power_save;#ifdef CONFIG_PM -if (val ==-1 ) { +if (pm_blacklist) {const struct snd_pci_quirk *q; - val =CONFIG_SND_HDA_POWER_SAVE_DEFAULT ; q =snd_pci_quirk_lookup (chip->pci, power_save_blacklist);if (q && val) { dev_info(chip->card->dev, "device %04x:%04x is on the power_save blacklist, forcing power_save to 0\n",
tools/testing/selftests/x86/entry_from_vm86.c +28 -4
@@ -95,6 +95,10 @@ asm ("int3\n\t" "vmcode_int80:\n\t" "int $0x80\n\t" +"vmcode_popf_hlt:\n\t" +"push %ax\n\t" +"popf\n\t" +"hlt\n\t" "vmcode_umip:\n\t" /* addressing via displacements */ "smsw (2052)\n\t"
@@ -124,8 +128,8 @@ asm (extern unsigned char vmcode[], end_vmcode[];extern unsigned char vmcode_bound[], vmcode_sysenter[], vmcode_syscall[], - vmcode_sti[], vmcode_int3[], vmcode_int80[], vmcode_umip[], - vmcode_umip_str[], vmcode_umip_sldt[]; + vmcode_sti[], vmcode_int3[], vmcode_int80[], vmcode_popf_hlt[], + vmcode_umip[], vmcode_umip_str[], vmcode_umip_sldt[];/* Returns false if the test was skipped. */ static bool do_test(struct vm86plus_struct *v86, unsigned long eip,
@@ -175,7 +179,7 @@ static bool do_test(struct vm86plus_struct *v86, unsigned long eip, (VM86_TYPE(ret) == rettype && VM86_ARG(ret) == retarg)) { printf("[OK]\tReturned correctly\n"); } else { -printf ("[FAIL]\tIncorrect return reason\n" ); +printf ("[FAIL]\tIncorrect return reason (started at eip = 0x%lx, ended at eip = 0x%lx)\n" , eip, v86->regs.eip); nerrs++; }
@@ -264,6 +268,9 @@ int main(void) v86.regs.ds = load_addr /16 ; v86.regs.es = load_addr /16 ; +/* Use the end of the page as our stack. */ + v86.regs.esp =4096 ; +assert ((v86.regs.cs &3 ) ==0 );/* Looks like RPL = 0 */ /* #BR -- should deliver SIG??? */
@@ -295,6 +302,23 @@ int main(void) v86.regs.eflags &= ~X86_EFLAGS_IF ;do_test (&v86, vmcode_sti - vmcode,VM86_STI ,0 ,"STI with VIP set" ); +/* POPF with VIP set but IF clear: should not trap */ + v86.regs.eflags =X86_EFLAGS_VIP ; + v86.regs.eax =0 ; +do_test (&v86, vmcode_popf_hlt - vmcode,VM86_UNKNOWN ,0 ,"POPF with VIP set and IF clear" ); + +/* POPF with VIP set and IF set: should trap */ + v86.regs.eflags =X86_EFLAGS_VIP ; + v86.regs.eax =X86_EFLAGS_IF ; +do_test (&v86, vmcode_popf_hlt - vmcode,VM86_STI ,0 ,"POPF with VIP and IF set" ); + +/* POPF with VIP clear and IF set: should not trap */ + v86.regs.eflags =0 ; + v86.regs.eax =X86_EFLAGS_IF ; +do_test (&v86, vmcode_popf_hlt - vmcode,VM86_UNKNOWN ,0 ,"POPF with VIP clear and IF set" ); + + v86.regs.eflags =0 ; +/* INT3 -- should cause #BP */ do_test (&v86, vmcode_int3 - vmcode,VM86_TRAP ,3 ,"INT3" );
@@ -318,7 +342,7 @@ int main(void)clearhandler (SIGSEGV );/* Make sure nothing explodes if we fork. */ -if (fork () >0 ) +if (fork () ==0 )return 0 ;return (nerrs ==0 ?0 :1 );
virt/kvm/arm/arch_timer.c +5 -1
@@ -589,6 +589,7 @@ void kvm_timer_sync_hwstate(struct kvm_vcpu *vcpu)int kvm_timer_vcpu_reset (struct kvm_vcpu *vcpu) { +struct arch_timer_cpu *timer = &vcpu->arch.timer_cpu;struct arch_timer_context *vtimer =vcpu_vtimer (vcpu);struct arch_timer_context *ptimer =vcpu_ptimer (vcpu);
@@ -602,6 +603,9 @@ int kvm_timer_vcpu_reset(struct kvm_vcpu *vcpu) ptimer->cnt_ctl =0 ;kvm_timer_update_state (vcpu); +if (timer->enabled &&irqchip_in_kernel (vcpu->kvm)) +kvm_vgic_reset_mapped_irq (vcpu, vtimer->irq.irq); +return 0 ; }
@@ -773,7 +777,7 @@ int kvm_timer_hyp_init(bool has_gic) } } -kvm_info ("virtual timer IRQ%d\n" , host_vtimer_irq); +kvm_debug ("virtual timer IRQ%d\n" , host_vtimer_irq); cpuhp_setup_state(CPUHP_AP_KVM_ARM_TIMER_STARTING, "kvm/arm/timer:starting", kvm_timer_starting_cpu,
virt/kvm/arm/hyp/vgic-v3-sr.c +2 -1
@@ -215,7 +215,8 @@ void __hyp_text __vgic_v3_save_state(struct kvm_vcpu *vcpu)* are now visible to the system register interface. */ if (!cpu_if->vgic_sre) { -dsb (st); +dsb (sy); +isb (); cpu_if->vgic_vmcr =read_gicreg (ICH_VMCR_EL2 ); }
virt/kvm/arm/mmu.c +3 -3
@@ -1760,9 +1760,9 @@ int kvm_mmu_init(void)*/ BUG_ON ((hyp_idmap_start ^ (hyp_idmap_end -1 )) &PAGE_MASK ); -kvm_info ("IDMAP page: %lx\n" , hyp_idmap_start); -kvm_info ("HYP VA range: %lx:%lx\n" , -kern_hyp_va (PAGE_OFFSET ),kern_hyp_va (~0UL )); +kvm_debug ("IDMAP page: %lx\n" , hyp_idmap_start); +kvm_debug ("HYP VA range: %lx:%lx\n" , +kern_hyp_va (PAGE_OFFSET ),kern_hyp_va (~0UL )); if (hyp_idmap_start >= kern_hyp_va(PAGE_OFFSET) && hyp_idmap_start < kern_hyp_va(~0UL) &&
virt/kvm/arm/vgic/vgic-v2.c +9 -2
@@ -37,6 +37,13 @@ void vgic_v2_init_lrs(void)vgic_v2_write_lr (i,0 ); } +void vgic_v2_set_npie (struct kvm_vcpu *vcpu) +{ +struct vgic_v2_cpu_if *cpuif = &vcpu->arch.vgic_cpu.vgic_v2; + + cpuif->vgic_hcr |=GICH_HCR_NPIE ; +} +void vgic_v2_set_underflow (struct kvm_vcpu *vcpu) {struct vgic_v2_cpu_if *cpuif = &vcpu->arch.vgic_cpu.vgic_v2;
@@ -64,7 +71,7 @@ void vgic_v2_fold_lr_state(struct kvm_vcpu *vcpu)int lr;unsigned long flags; - cpuif->vgic_hcr &= ~GICH_HCR_UIE ; + cpuif->vgic_hcr &= ~(GICH_HCR_UIE |GICH_HCR_NPIE );for (lr =0 ; lr < vgic_cpu->used_lrs; lr++) {u32 val = cpuif->vgic_lr[lr];
@@ -381,7 +388,7 @@ int vgic_v2_probe(const struct gic_kvm_info *info) kvm_vgic_global_state.type =VGIC_V2 ; kvm_vgic_global_state.max_gic_vcpus =VGIC_V2_MAX_CPUS ; -kvm_info ("vgic-v2@%llx\n" , info->vctrl.start); +kvm_debug ("vgic-v2@%llx\n" , info->vctrl.start);return 0 ; out:
virt/kvm/arm/vgic/vgic-v3.c +8 -1
@@ -26,6 +26,13 @@ static bool group1_trap;static bool common_trap;static bool gicv4_enable; +void vgic_v3_set_npie (struct kvm_vcpu *vcpu) +{ +struct vgic_v3_cpu_if *cpuif = &vcpu->arch.vgic_cpu.vgic_v3; + + cpuif->vgic_hcr |=ICH_HCR_NPIE ; +} +void vgic_v3_set_underflow (struct kvm_vcpu *vcpu) {struct vgic_v3_cpu_if *cpuif = &vcpu->arch.vgic_cpu.vgic_v3;
@@ -47,7 +54,7 @@ void vgic_v3_fold_lr_state(struct kvm_vcpu *vcpu)int lr;unsigned long flags; - cpuif->vgic_hcr &= ~ICH_HCR_UIE ; + cpuif->vgic_hcr &= ~(ICH_HCR_UIE |ICH_HCR_NPIE );for (lr =0 ; lr < vgic_cpu->used_lrs; lr++) {u64 val = cpuif->vgic_lr[lr];
virt/kvm/arm/vgic/vgic.c +73 -14
135 lines not on this page · raw message
virt/kvm/arm/vgic/vgic.h +2 -0
@@ -151,6 +151,7 @@ void vgic_v2_fold_lr_state(struct kvm_vcpu *vcpu);void vgic_v2_populate_lr (struct kvm_vcpu *vcpu,struct vgic_irq *irq,int lr);void vgic_v2_clear_lr (struct kvm_vcpu *vcpu,int lr);void vgic_v2_set_underflow (struct kvm_vcpu *vcpu); +void vgic_v2_set_npie (struct kvm_vcpu *vcpu);int vgic_v2_has_attr_regs (struct kvm_device *dev,struct kvm_device_attr *attr);int vgic_v2_dist_uaccess (struct kvm_vcpu *vcpu,bool is_write,int offset,u32 *val);
@@ -180,6 +181,7 @@ void vgic_v3_fold_lr_state(struct kvm_vcpu *vcpu);void vgic_v3_populate_lr (struct kvm_vcpu *vcpu,struct vgic_irq *irq,int lr);void vgic_v3_clear_lr (struct kvm_vcpu *vcpu,int lr);void vgic_v3_set_underflow (struct kvm_vcpu *vcpu); +void vgic_v3_set_npie (struct kvm_vcpu *vcpu);void vgic_v3_set_vmcr (struct kvm_vcpu *vcpu,struct vgic_vmcr *vmcr);void vgic_v3_get_vmcr (struct kvm_vcpu *vcpu,struct vgic_vmcr *vmcr);void vgic_v3_enable (struct kvm_vcpu *vcpu);