Linux 4.7.3
Greg KH
maintainerI'm announcing the release of the 4.7.3 kernel.
All users of the 4.7 kernel series must upgrade.
The updated 4.7.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.7.y
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 arch/arc/include/asm/entry.h | 4 arch/arc/include/asm/irqflags-compact.h | 2 arch/arc/include/asm/pgtable.h | 2 arch/arc/mm/cache.c | 9 + arch/arm64/boot/dts/rockchip/rk3368.dtsi | 2 arch/arm64/include/asm/elf.h | 1 arch/arm64/include/uapi/asm/auxvec.h | 2 arch/arm64/kernel/head.S | 3 arch/arm64/kernel/sleep.S | 10 +- arch/arm64/mm/proc.S | 9 + arch/parisc/include/uapi/asm/errno.h | 4 arch/parisc/kernel/processor.c | 8 - arch/parisc/kernel/time.c | 12 -- arch/um/include/asm/common.lds.S | 2 arch/x86/include/asm/tlbflush.h | 7 + arch/x86/kernel/uprobes.c | 22 ++-- arch/x86/platform/uv/bios_uv.c | 3 drivers/acpi/cppc_acpi.c | 24 +++-- drivers/acpi/nfit.c | 3 drivers/acpi/scan.c | 6 - drivers/block/floppy.c | 21 ++-- drivers/clk/renesas/r8a7795-cpg-mssr.c | 9 + drivers/crypto/caam/caamalg.c | 13 +- drivers/crypto/caam/caamhash.c | 1 drivers/crypto/nx/nx.c | 2 drivers/crypto/qat/qat_common/qat_algs.c | 4 drivers/dax/pmem.c | 3 drivers/dma/sh/usb-dmac.c | 19 ++-- drivers/edac/sb_edac.c | 15 ++- drivers/firmware/efi/capsule-loader.c | 8 + drivers/firmware/efi/capsule.c | 6 - drivers/gpio/Kconfig | 1 drivers/gpio/gpio-max730x.c | 8 - drivers/gpu/drm/amd/amdgpu/amdgpu.h | 6 - drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c | 13 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c | 4 drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 5 - drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 12 ++ drivers/gpu/drm/amd/amdgpu/cik_sdma.c | 3 drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 12 +- drivers/gpu/drm/i915/i915_drv.c | 3 drivers/gpu/drm/i915/i915_drv.h | 5 + drivers/gpu/drm/i915/i915_gem_gtt.c | 1 drivers/gpu/drm/i915/i915_reg.h | 1 drivers/gpu/drm/i915/intel_audio.c | 6 + drivers/gpu/drm/i915/intel_crt.c | 28 ++++- drivers/gpu/drm/i915/intel_ddi.c | 91 +++++++++++++------ drivers/gpu/drm/i915/intel_drv.h | 4 drivers/gpu/drm/i915/intel_hotplug.c | 117 ++++++++++++++++++++++--- drivers/gpu/drm/i915/intel_runtime_pm.c | 9 + drivers/hwmon/iio_hwmon.c | 24 ++--- drivers/hwmon/it87.c | 1 drivers/i2c/busses/i2c-cros-ec-tunnel.c | 2 drivers/i2c/muxes/i2c-demux-pinctrl.c | 4 drivers/iio/industrialio-buffer.c | 23 +++- drivers/input/keyboard/tegra-kbc.c | 2 drivers/input/rmi4/rmi_driver.c | 3 drivers/input/serio/i8042.c | 17 --- drivers/input/serio/libps2.c | 10 -- drivers/iommu/arm-smmu-v3.c | 7 + drivers/iommu/arm-smmu.c | 34 +------ drivers/iommu/dma-iommu.c | 3 drivers/iommu/io-pgtable-arm-v7s.c | 4 drivers/md/dm-round-robin.c | 7 + drivers/of/base.c | 11 -- drivers/pci/msi.c | 2 drivers/pinctrl/meson/pinctrl-meson.c | 8 - drivers/pinctrl/pinctrl-amd.c | 20 ---- drivers/platform/chrome/cros_ec_proto.c | 17 +++ drivers/s390/block/dasd.c | 10 +- drivers/scsi/aacraid/commctrl.c | 13 ++ drivers/scsi/megaraid/megaraid_sas_base.c | 6 - drivers/scsi/megaraid/megaraid_sas_fusion.c | 2 drivers/scsi/mpt3sas/mpt3sas_base.c | 22 ++-- drivers/staging/comedi/drivers/comedi_test.c | 46 ++------- drivers/staging/comedi/drivers/daqboard2000.c | 2 drivers/staging/comedi/drivers/ni_mio_common.c | 12 ++ drivers/staging/lustre/lustre/llite/namei.c | 43 +++++---- drivers/usb/chipidea/udc.c | 7 + drivers/usb/class/cdc-acm.c | 5 - drivers/usb/class/cdc-acm.h | 1 drivers/usb/core/config.c | 66 +++++++++++++- drivers/usb/core/devio.c | 19 ++-- drivers/usb/core/hub.c | 23 +--- drivers/usb/dwc3/dwc3-pci.c | 2 drivers/usb/dwc3/gadget.c | 42 ++++++-- drivers/usb/gadget/legacy/inode.c | 2 drivers/usb/gadget/udc/fsl_qe_udc.c | 2 drivers/usb/gadget/udc/udc-core.c | 2 drivers/usb/host/ehci-hcd.c | 4 drivers/usb/host/xhci-hub.c | 3 drivers/usb/host/xhci-pci.c | 3 drivers/usb/host/xhci-ring.c | 13 +- drivers/usb/misc/usbtest.c | 9 + drivers/usb/renesas_usbhs/common.c | 3 drivers/usb/renesas_usbhs/fifo.c | 4 drivers/usb/renesas_usbhs/mod_gadget.c | 9 + drivers/usb/serial/ftdi_sio.c | 3 drivers/usb/serial/ftdi_sio_ids.h | 12 ++ drivers/usb/serial/mos7720.c | 2 drivers/usb/serial/mos7840.c | 4 drivers/usb/serial/option.c | 31 ++++++ drivers/usb/serial/usb-serial.c | 4 drivers/vfio/pci/vfio_pci_intrs.c | 85 ++++++++++-------- drivers/virtio/virtio_ring.c | 2 fs/btrfs/ctree.h | 1 fs/btrfs/disk-io.c | 7 - fs/btrfs/disk-io.h | 2 fs/btrfs/ioctl.c | 2 fs/btrfs/qgroup.c | 21 +++- fs/btrfs/qgroup.h | 3 fs/btrfs/root-tree.c | 27 +++-- fs/seq_file.c | 4 fs/sysfs/file.c | 8 + include/linux/acpi.h | 2 include/linux/i8042.h | 6 - include/linux/mfd/cros_ec.h | 15 +++ include/linux/msi.h | 8 - include/linux/serio.h | 24 ++++- include/trace/events/timer.h | 14 ++ kernel/events/core.c | 60 ++++++++++-- kernel/events/uprobes.c | 5 - kernel/irq/msi.c | 19 ++-- kernel/sched/cputime.c | 15 ++- mm/huge_memory.c | 7 + mm/readahead.c | 9 + mm/slub.c | 6 + net/mac80211/cfg.c | 2 net/mac80211/tx.c | 6 - net/sunrpc/auth_gss/auth_gss.c | 8 + net/sunrpc/xprtmultipath.c | 8 - net/sunrpc/xprtsock.c | 4 sound/pci/hda/hda_intel.c | 32 ++++-- sound/usb/line6/pcm.c | 3 sound/usb/line6/pod.c | 12 +- sound/usb/quirks.c | 2 tools/perf/arch/x86/util/intel-pt.c | 6 + tools/perf/builtin-mem.c | 3 tools/perf/util/symbol-elf.c | 3 tools/testing/nvdimm/test/nfit.c | 2 141 files changed, 1101 insertions(+), 539 deletions(-)
Adrian Hunter (1):
perf intel-pt: Fix occasional decoding errors when tracing system-wide
Agrawal, Nitesh-kumar (1):
pinctrl/amd: Remove the default de-bounce time
Alan Stern (5):
USB: hub: fix up early-exit pathway in hub_activate
USB: hub: change the locking in hub_activate
USB: validate wMaxPacketValue entries in endpoint descriptors
USB: avoid left shift by -1
USB: fix typo in wMaxPacketSize validation
Aleksandr Makarov (2):
USB: serial: option: add WeTelecom WM-D200
USB: serial: option: add WeTelecom 0x6802 and 0x6803 products
Alex Deucher (2):
drm/amdgpu: avoid a possible array overflow
drm/amdgpu: skip TV/CV in display parsing
Alex Thorlton (1):
x86/platform/uv: Skip UV runtime services mapping in the efi_runtime_disabled case
Alex Williamson (1):
vfio/pci: Fix NULL pointer oops in error interrupt setup handling
Alexey Khoroshilov (2):
USB: serial: mos7720: fix non-atomic allocation in write path
USB: serial: mos7840: fix non-atomic allocation in write path
Alexey Klimov (1):
USB: serial: fix memleak in driver-registration error path
Andrea Arcangeli (1):
soft_dirty: fix soft_dirty during THP split
Andrej Krutak (3):
ALSA: line6: Remove double line6_pcm_release() after failed acquire.
ALSA: line6: Give up on the lock while URBs are released.
ALSA: line6: Fix POD sysfs attributes segfault
Andrew Duggan (1):
Input: synaptics-rmi4 - fix register descriptor subpacket map construction
Andrey Ryabinin (1):
um: Don't discard .text.exit section
Anton Blanchard (1):
perf symbols: Fix annotation of objects with debuginfo files
Ard Biesheuvel (1):
arm64: kernel: avoid literal load of virtual address with MMU off
Austin Christ (1):
efi/capsule: Allocate whole capsule into virtual memory
Brian Norris (2):
iio: fix sched WARNING "do not call blocking ops when !TASK_RUNNING"
i2c: cros-ec-tunnel: Fix usage of cros_ec_cmd_xfer()
Caesar Wang (1):
arm64: dts: rockchip: add reset saradc node for rk3368 SoCs
Chris Wilson (2):
mm/slub.c: run free_partial() outside of the kmem_cache_node->list_lock drm/i915: Acquire audio powerwell for HD-Audio registers
Christian König (2):
drm/amdgpu: fix amdgpu_move_blit on 32bit systems drm/amdgpu: fix lru size grouping v2
Christophe Leroy (1):
gpio: max730x: set gpiochip data pointer before using it
Chunming Zhou (1):
drm/amdgpu: record error code when ring test failed
Dan Carpenter (2):
usb: gadget: fsl_qe_udc: off by one in setup_received_handle()
crypto: nx - off by one bug in nx_of_update_msc()
Dan Williams (2):
tools/testing/nvdimm: fix SIGTERM vs hotplug crash
dax: fix device-dax region base
Daniel Mentz (1):
ARC: Call trace_hardirqs_on() before enabling irqs
Daniele Palmas (1):
USB: serial: option: add support for Telit LE920A4
Dave Carroll (1):
aacraid: Check size values after double-fetch from user
Denys Vlasenko (1):
uprobes/x86: Fix RIP-relative handling of EVEX-encoded instructions
Dmitry Torokhov (2):
Input: i8042 - break load dependency between atkbd/psmouse and i8042
Input: i8042 - set up shared ps2_cmd_mutex for AUX ports
Felipe Balbi (4):
usb: dwc3: gadget: increment request->actual once
usb: dwc3: gadget: fix for short pkts during chained xfers
usb: dwc3: gadget: always cleanup all TRBs
usb: gadget: udc: core: don't starve DMA resources
Felix Fietkau (1):
mac80211: fix purging multicast PS buffer queue
Felix Kuehling (1):
drm/amdgpu: Change GART offset to 64-bit
Gavin Li (1):
cdc-acm: fix wrong pipe type on rx interrupt xfers
Giovanni Cabiddu (1):
crypto: qat - fix aes-xts key sizes
Greg Edwards (1):
mpt3sas: Fix resume on WarpDrive flash cards
Greg Kroah-Hartman (1):
Linux 4.7.3
Heikki Krogerus (1):
usb: dwc3: pci: add Intel Kabylake PCI ID
Helge Deller (2):
parisc: Fix order of EREFUSED define in errno.h
parisc: Fix automatic selection of cr16 clocksource
Hoan Tran (2):
ACPI: CPPC: Return error if _CPC is invalid on a CPU ACPI / CPPC: Prevent cpc_desc_ptr points to the invalid data
Horia Geantă (2):
crypto: caam - fix echainiv(authenc) encrypt shared descriptor
crypto: caam - defer aead_set_sh_desc in case of zero authsize
Ian Abbott (4):
staging: comedi: daqboard2000: bug fix board type matching code
staging: comedi: comedi_test: fix timer race conditions
staging: comedi: ni_mio_common: fix AO inttrig backwards compatibility
staging: comedi: ni_mio_common: fix wrong insn_write handler
James Hogan (1):
arm64: Define AT_VECTOR_SIZE_ARCH for ARCH_DLINFO
James Morse (1):
arm64: kernel: Fix unmasked debug exceptions when restoring mdscr_el1
Jean Delvare (1):
hwmon: (it87) Add missing sysfs attribute group terminator
Jeff Mahoney (3):
btrfs: waiting on qgroup rescan should not always be interruptible
btrfs: properly track when rescan worker is running
btrfs: don't create or leak aliased root while cleaning up orphans
Jens Axboe (1):
Revert "floppy: fix open(O_ACCMODE) for ioctl-only open"
Jim Lin (1):
usb: xhci: Fix panic if disconnect
Jiri Olsa (1):
perf tools mem: Fix -t store option for record command
Jiri Slaby (1):
usb: devio, do not warn when allocation fails
Konstantin Khlebnikov (1):
sysfs: correctly handle read offset on PREALLOC attrs
Li Jun (1):
usb: chipidea: udc: don't touch DP when controller is in host mode
Liav Rehana (1):
ARC: use correct offset in pt_regs for saving/restoring user mode r25
Linus Walleij (1):
gpio: Fix OF build problem on UM
Lorenzo Pieralisi (2):
ACPI / drivers: fix typo in ACPI_DECLARE_PROBE_ENTRY macro ACPI / drivers: replace acpi_probe_lock spinlock with mutex
Lu Baolu (1):
usb: misc: usbtest: add fix for driver hang
Lubomir Rintel (1):
USB: serial: option: add D-Link DWM-156/A3
Lucas Stach (1):
of: fix reference counting in of_graph_get_endpoint_by_regs
Lukasz Odzioba (1):
EDAC, sb_edac: Fix channel reporting on Knights Landing
Lyude (4):
drm/i915/vlv: Make intel_crt_reset() per-encoder drm/i915/vlv: Reset the ADPA in vlv_display_power_well_init() drm/i915/vlv: Disable HPD in valleyview_crt_detect_hotplug() drm/i915: Enable polling when we don't have hpd
Marc Ohlf (1):
usb: ehci: change order of register cleanup during shutdown
Marc Zyngier (1):
genirq/msi: Make sure PCI MSIs are activated early
Mark Rutland (1):
arm64: avoid TLB conflict with CONFIG_RANDOMIZE_BASE
Masahiro Yamada (1):
Input: tegra-kbc - fix inverted reset logic
Mathias Nyman (2):
xhci: always handle "Command Ring Stopped" events
xhci: don't dereference a xhci member after removing xhci
Mathieu Laurendeau (1):
usb/gadget: fix gadgetfs aio support.
Matthew Auld (1):
drm/i915: fix aliasing_ppgtt leak
Mike Snitzer (1):
dm round robin: do not use this_cpu_ptr() without having preemption disabled
Oleg Drokin (1):
staging/lustre/llite: Close atomic_open race with several openers
Oleg Nesterov (1):
uprobes: Fix the memcg accounting
Olga Kornievskaia (1):
SUNRPC: allow for upcalls for same uid but different gss service
Peter Chen (1):
usb: misc: usbtest: usbtest_do_ioctl may return positive integer
Peter Zijlstra (2):
perf/core: Fix event_function_local()
sched/cputime: Fix NO_HZ_FULL getrusage() monotonicity regression
Piotr Karasinski (1):
ALSA: usb-audio: Add a sample rate quirk for Creative Live! Cam Socialize HD (VF0610)
Quentin Schulz (1):
hwmon: (iio_hwmon) fix memory leak in name attribute
Robert Deliën (1):
USB: serial: ftdi_sio: add PIDs for Ivium Technologies devices
Robin Murphy (2):
iommu/dma: Don't put uninitialised IOVA domains iommu/io-pgtable-arm-v7s: Fix attributes when splitting blocks
Ross Zwisler (2):
libnvdimm, nd_blk: mask off reserved status bits
mm: silently skip readahead for DAX inodes
Russell King (1):
crypto: caam - fix non-hmac hashes
Sebastian Andrzej Siewior (1):
x86/mm: Disable preemption during CR3 read+write
Sheng-Hui J. Chu (1):
USB: serial: ftdi_sio: add device ID for WICED USB UART dev board
Stefan Haberland (1):
s390/dasd: fix hanging device after clear subchannel
Steven Rostedt (Red Hat) (1):
tracing: Fix tick_stop tracepoint symbols for user export
Takashi Iwai (1):
ALSA: hda - Manage power well properly for resume
Thomas Gleixner (1):
genirq/msi: Remove unused MSI_FLAG_IDENTITY_MAP
Tomeu Vizoso (1):
mfd: cros_ec: Add cros_ec_cmd_xfer_status() helper
Trond Myklebust (2):
SUNRPC: Handle EADDRNOTAVAIL on connection failures
SUNRPC: Fix infinite looping in rpc_clnt_iterate_for_each_xprt
Vegard Nossum (1):
fs/seq_file: fix out-of-bounds read
Ville Syrjälä (3):
drm/i915: Fix iboost setting for DDI with 4 lanes on SKL drm/i915: Program iboost settings for HDMI/DVI on SKL drm/i915: Fix iboost setting for SKL Y/U DP DDI buffer translation entry 2
Vineet Gupta (2):
ARC: mm: fix build breakage with STRICT_MM_TYPECHECKS
ARC: Elide redundant setup of DMA callbacks
Viresh Kumar (1):
usb: hub: Fix unbalanced reference count/memory leak/deadlocks
Vittorio Gambaletta (VittGam) (1):
ALSA: usb-audio: Add quirk for ELP HD USB Camera
Wei Yongjun (3):
virtio: fix memory leak in virtqueue_add()
pinctrl: meson: Drop pinctrl_unregister for devm_ registered device
usb: renesas_usbhs: gadget: fix return value check in usbhs_mod_gadget_probe()
Will Deacon (3):
iommu/arm-smmu: Fix CMDQ error handling
iommu/arm-smmu: Disable stalling faults for all endpoints iommu/arm-smmu: Don't BUG() if we find aborting STEs with disable_bypass
Wolfram Sang (1):
i2c: mux: demux-pinctrl: properly roll back when adding adapter fails
Yinghai Lu (1):
megaraid_sas: Fix probing cards without io port
Yoshihiro Shimoda (5):
usb: renesas_usbhs: Fix receiving data corrupt on R-Car Gen3 with dmac
usb: renesas_usbhs: clear the BRDYSTS in usbhsg_ep_enable()
usb: renesas_usbhs: Use dmac only if the pipe type is bulk
clk: renesas: r8a7795: Fix SD clocks
dmaengine: usb-dmac: check CHCR.DE bit in usb_dmac_isr_channel()
jimqu (2):
drm/amd/amdgpu: sdma resume fail during S4 on CI drm/amd/amdgpu: compute ring test fail during S4 on CI
Greg KH
maintainerMakefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 4 PATCHLEVEL = 7 -SUBLEVEL = 2 +SUBLEVEL = 3 EXTRAVERSION = NAME = Psychotic Stoned Sheep
arch/arc/include/asm/entry.h +2 -2
@@ -142,7 +142,7 @@#ifdef CONFIG_ARC_CURR_IN_REG ; Retrieve orig r25 and save it with rest of callee_regs - ld.as r12, [r12, PT_user_r25] + ld r12, [r12, PT_user_r25] PUSH r12 #else PUSH r25
@@ -198,7 +198,7 @@ ; SP is back to start of pt_regs#ifdef CONFIG_ARC_CURR_IN_REG - st.as r12, [sp, PT_user_r25] + st r12, [sp, PT_user_r25] #endif .endm
arch/arc/include/asm/irqflags-compact.h +1 -1
@@ -188,10 +188,10 @@ static inline int arch_irqs_disabled(void) .endm .macro IRQ_ENABLE scratch +TRACE_ASM_IRQ_ENABLE lr \scratch, [status32] or \scratch, \scratch, (STATUS_E1_MASK | STATUS_E2_MASK) flag \scratch - TRACE_ASM_IRQ_ENABLE .endm #endif /* __ASSEMBLY__ */
arch/arc/include/asm/pgtable.h +1 -1
@@ -280,7 +280,7 @@ static inline void pmd_set(pmd_t *pmdp, pte_t *ptep)#define pte_page (pte) pfn_to_page(pte_pfn(pte))#define mk_pte (page, prot) pfn_pte(page_to_pfn(page), prot) -#define pfn_pte (pfn, prot) (__pte(((pte_t)(pfn) << PAGE_SHIFT) | pgprot_val(prot))) +#define pfn_pte (pfn, prot) __pte(((pfn) << PAGE_SHIFT) | pgprot_val(prot))/* Don't use virt_to_pfn for macros below: could cause truncations for PAE40*/ #define pte_pfn (pte) (pte_val(pte) >> PAGE_SHIFT)
arch/arc/mm/cache.c +9 -0
@@ -921,6 +921,15 @@ void arc_cache_init(void)printk (arc_cache_mumbojumbo (0 , str,sizeof (str))); +/* +* Only master CPU needs to execute rest of function: +* - Assume SMP so all cores will have same cache config so +* any geomtry checks will be same for all +* - IOC setup / dma callbacks only need to be setup once +*/ +if (cpu) +return ; +if (IS_ENABLED (CONFIG_ARC_HAS_ICACHE )) {struct cpuinfo_arc_cache *ic = &cpuinfo_arc700[cpu].icache;
arch/arm64/boot/dts/rockchip/rk3368.dtsi +2 -0
@@ -270,6 +270,8 @@ #io-channel-cells = <1>; clocks = <&cru SCLK_SARADC>, <&cru PCLK_SARADC>; clock-names = "saradc", "apb_pclk"; + resets = <&cru SRST_SARADC>; + reset-names = "saradc-apb"; status = "disabled"; };
arch/arm64/include/asm/elf.h +1 -0
@@ -140,6 +140,7 @@ typedef struct user_fpsimd_state elf_fpregset_t;#define SET_PERSONALITY (ex) clear_thread_flag(TIF_32BIT); +/* update AT_VECTOR_SIZE_ARCH if the number of NEW_AUX_ENT entries changes */ #define ARCH_DLINFO \ do { \ NEW_AUX_ENT(AT_SYSINFO_EHDR, \
arch/arm64/include/uapi/asm/auxvec.h +2 -0
@@ -19,4 +19,6 @@/* vDSO location */ #define AT_SYSINFO_EHDR 33 +#define AT_VECTOR_SIZE_ARCH 1/* entries in ARCH_DLINFO */ +#endif
arch/arm64/kernel/head.S +3 -0
@@ -757,6 +757,9 @@ ENTRY(__enable_mmu) isb bl __create_page_tables // recreate kernel mapping + tlbi vmalle1 // Remove any stale TLB entries + dsb nsh + msr sctlr_el1, x19 // re-enable the MMU isb ic iallu // flush instructions fetched
arch/arm64/kernel/sleep.S +9 -1
@@ -101,12 +101,20 @@ ENTRY(cpu_resume) bl el2_setup // if in EL2 drop to EL1 cleanly /* enable the MMU early - so we can access sleep_save_stash by va */ adr_l lr, __enable_mmu /* __cpu_setup will return here */ - ldr x27, =_cpu_resume /* __enable_mmu will branch here */ + adr_l x27, _resume_switched /* __enable_mmu will branch here */ adrp x25, idmap_pg_dir adrp x26, swapper_pg_dir b __cpu_setup ENDPROC(cpu_resume) + .pushsection ".idmap.text", "ax" +_resume_switched: + ldr x8, =_cpu_resume + br x8 +ENDPROC(_resume_switched) + .ltorg + .popsection + ENTRY(_cpu_resume) mrs x1, mpidr_el1 adrp x8, mpidr_hash
arch/arm64/mm/proc.S +9 -0
@@ -100,7 +100,16 @@ ENTRY(cpu_do_resume) msr tcr_el1, x8 msr vbar_el1, x9 + + /* + * __cpu_setup() cleared MDSCR_EL1.MDE and friends, before unmasking + * debug exceptions. By restoring MDSCR_EL1 here, we may take a debug + * exception. Mask them until local_dbg_restore() in cpu_suspend() + * resets them. + */ + disable_dbg msr mdscr_el1, x10 + msr sctlr_el1, x12 /* * Restore oslsr_el1 by writing oslar_el1
arch/parisc/include/uapi/asm/errno.h +2 -2
@@ -97,10 +97,10 @@#define ENOTCONN 235/* Transport endpoint is not connected */ #define ESHUTDOWN 236/* Cannot send after transport endpoint shutdown */ #define ETOOMANYREFS 237/* Too many references: cannot splice */ -#define EREFUSED ECONNREFUSED/* for HP's NFS apparently */ #define ETIMEDOUT 238/* Connection timed out */ #define ECONNREFUSED 239/* Connection refused */ -#define EREMOTERELEASE 240/* Remote peer released connection */ +#define EREFUSED ECONNREFUSED/* for HP's NFS apparently */ +#define EREMOTERELEASE 240/* Remote peer released connection */ #define EHOSTDOWN 241/* Host is down */ #define EHOSTUNREACH 242/* No route to host */
arch/parisc/kernel/processor.c +0 -8
@@ -51,8 +51,6 @@ EXPORT_SYMBOL(_parisc_requires_coherency); DEFINE_PER_CPU(struct cpuinfo_parisc, cpu_data); -extern int update_cr16_clocksource (void );/* from time.c */ -/* ** PARISC CPU driver - claim "device" and initialize CPU data structures. **
@@ -228,12 +226,6 @@ static int processor_probe(struct parisc_device *dev) }#endif -/* If we've registered more than one cpu, -* we'll use the jiffies clocksource since cr16 -* is not synchronized between CPUs. -*/ -update_cr16_clocksource (); -return 0 ; }
arch/parisc/kernel/time.c +0 -12
@@ -220,18 +220,6 @@ static struct clocksource clocksource_cr16 = { .flags = CLOCK_SOURCE_IS_CONTINUOUS, }; -int update_cr16_clocksource (void ) -{ -/* since the cr16 cycle counters are not synchronized across CPUs, -we'll check if we should switch to a safe clocksource: */ -if (clocksource_cr16.rating !=0 &&num_online_cpus () >1 ) { -clocksource_change_rating (&clocksource_cr16,0 ); -return 1 ; - } - -return 0 ; -} -void __init start_cpu_itimer (void ) {unsigned int cpu =smp_processor_id ();
arch/um/include/asm/common.lds.S +1 -1
@@ -81,7 +81,7 @@ .altinstr_replacement : { *(.altinstr_replacement) } /* .exit.text is discard at runtime, not link time, to deal with references from .altinstructions and .eh_frame */ - .exit.text : { *(.exit.text) } + .exit.text : { EXIT_TEXT } .exit.data : { *(.exit.data) } .preinit_array : {
arch/x86/include/asm/tlbflush.h +7 -0
@@ -135,7 +135,14 @@ static inline void cr4_set_bits_and_update_boot(unsigned long mask)static inline void __native_flush_tlb (void ) { +/* +* If current->mm == NULL then we borrow a mm which may change during a +* task switch and therefore we must not be preempted while we write CR3 +* back: +*/ +preempt_disable ();native_write_cr3 (native_read_cr3 ()); +preempt_enable (); }static inline void __native_flush_tlb_global_irq_disabled (void )
arch/x86/kernel/uprobes.c +11 -11
@@ -357,20 +357,22 @@ static void riprel_analyze(struct arch_uprobe *auprobe, struct insn *insn) *cursor &=0xfe ; }/* -* Similar treatment for VEX3 prefix. -* TODO: add XOP/EVEX treatment when insn decoder supports them +* Similar treatment for VEX3/EVEX prefix. +* TODO: add XOP treatment when insn decoder supports them */ -if (insn->vex_prefix.nbytes ==3 ) { +if (insn->vex_prefix.nbytes >=3 ) {/* * vex2: c5 rvvvvLpp (has no b bit) * vex3/xop: c4/8f rxbmmmmm wvvvvLpp * evex: 62 rxbR00mm wvvvv1pp zllBVaaa -* (evex will need setting of both b and x since -* in non-sib encoding evex.x is 4th bit of MODRM.rm) -* Setting VEX3.b (setting because it has inverted meaning): +* Setting VEX3.b (setting because it has inverted meaning). +* Setting EVEX.x since (in non-SIB encoding) EVEX.x +* is the 4th bit of MODRM.rm, and needs the same treatment. +* For VEX3-encoded insns, VEX3.x value has no effect in +* non-SIB encoding, the change is superfluous but harmless. */ cursor = auprobe->insn +insn_offset_vex_prefix (insn) +1 ; - *cursor |=0x20 ; + *cursor |=0x60 ; }/*
@@ -415,12 +417,10 @@ static void riprel_analyze(struct arch_uprobe *auprobe, struct insn *insn) reg =MODRM_REG (insn);/* Fetch modrm.reg */ reg2 =0xff ;/* Fetch vex.vvvv */ -if (insn->vex_prefix.nbytes ==2 ) - reg2 = insn->vex_prefix.bytes[1 ]; -else if (insn->vex_prefix.nbytes ==3 ) +if (insn->vex_prefix.nbytes) reg2 = insn->vex_prefix.bytes[2 ];/* -* TODO: add XOP, EXEV vvvv reading. +* TODO: add XOP vvvv reading. * * vex.vvvv field is in bits 6-3, bits are inverted. * But in 32-bit mode, high-order bit may be ignored.
arch/x86/platform/uv/bios_uv.c +2 -1
@@ -188,7 +188,8 @@ EXPORT_SYMBOL_GPL(uv_bios_set_legacy_vga_target);void uv_bios_init (void ) { uv_systab =NULL ; -if ((efi.uv_systab ==EFI_INVALID_TABLE_ADDR ) || !efi.uv_systab) { +if ((efi.uv_systab ==EFI_INVALID_TABLE_ADDR ) || + !efi.uv_systab ||efi_runtime_disabled ()) {pr_crit ("UV: UVsystab: missing\n" );return ; }
drivers/acpi/cppc_acpi.c +15 -9
@@ -299,8 +299,10 @@ int acpi_get_psd_map(struct cpudata **all_cpu_data)continue ; cpc_ptr =per_cpu (cpc_desc_ptr, i); -if (!cpc_ptr) -continue ; +if (!cpc_ptr) { + retval = -EFAULT ; + goto err_ret; + } pdomain = &(cpc_ptr->domain_info);cpumask_set_cpu (i, pr->shared_cpu_map);
@@ -322,8 +324,10 @@ int acpi_get_psd_map(struct cpudata **all_cpu_data)continue ; match_cpc_ptr =per_cpu (cpc_desc_ptr, j); -if (!match_cpc_ptr) -continue ; +if (!match_cpc_ptr) { + retval = -EFAULT ; + goto err_ret; + } match_pdomain = &(match_cpc_ptr->domain_info);if (match_pdomain->domain != pdomain->domain)
@@ -353,8 +357,10 @@ int acpi_get_psd_map(struct cpudata **all_cpu_data)continue ; match_cpc_ptr =per_cpu (cpc_desc_ptr, j); -if (!match_cpc_ptr) -continue ; +if (!match_cpc_ptr) { + retval = -EFAULT ; + goto err_ret; + } match_pdomain = &(match_cpc_ptr->domain_info);if (match_pdomain->domain != pdomain->domain)
@@ -595,9 +601,6 @@ int acpi_cppc_processor_probe(struct acpi_processor *pr)/* Store CPU Logical ID */ cpc_ptr->cpu_id = pr->id; -/* Plug it into this CPUs CPC descriptor. */ -per_cpu (cpc_desc_ptr, pr->id) = cpc_ptr; -/* Parse PSD data for this CPU */ ret =acpi_get_psd (cpc_ptr, handle);if (ret)
@@ -610,6 +613,9 @@ int acpi_cppc_processor_probe(struct acpi_processor *pr) goto out_free; } +/* Plug PSD data into this CPUs CPC descriptor. */ +per_cpu (cpc_desc_ptr, pr->id) = cpc_ptr; +/* Everything looks okay */ pr_debug ("Parsed CPC struct for CPU: %d\n" , pr->id);
drivers/acpi/nfit.c +2 -1
@@ -1396,11 +1396,12 @@ static u32 read_blk_stat(struct nfit_blk *nfit_blk, unsigned int bw) {struct nfit_blk_mmio *mmio = &nfit_blk->mmio[DCR ];u64 offset = nfit_blk->stat_offset + mmio->size * bw; +const u32 STATUS_MASK =0x80000037 ;if (mmio->num_lines) offset =to_interleave_offset (offset, mmio); -return readl (mmio->addr.base + offset); +return readl (mmio->addr.base + offset) &STATUS_MASK ; } static void write_blk_ctl(struct nfit_blk *nfit_blk, unsigned int bw,
drivers/acpi/scan.c +3 -3
@@ -1967,7 +1967,7 @@ int __init acpi_scan_init(void)static struct acpi_probe_entry *ape;static int acpi_probe_count; -static DEFINE_SPINLOCK (acpi_probe_lock); +static DEFINE_MUTEX (acpi_probe_mutex);static int __init acpi_match_madt (struct acpi_subtable_header *header,const unsigned long end)
@@ -1986,7 +1986,7 @@ int __init __acpi_probe_device_table(struct acpi_probe_entry *ap_head, int nr)if (acpi_disabled)return 0 ; -spin_lock (&acpi_probe_lock); +mutex_lock (&acpi_probe_mutex);for (ape = ap_head; nr; ape++, nr--) {if (ACPI_COMPARE_NAME (ACPI_SIG_MADT , ape->id)) { acpi_probe_count =0 ;
@@ -1999,7 +1999,7 @@ int __init __acpi_probe_device_table(struct acpi_probe_entry *ap_head, int nr) count++; } } -spin_unlock (&acpi_probe_lock); +mutex_unlock (&acpi_probe_mutex);return count; }
drivers/block/floppy.c +12 -9
@@ -3663,6 +3663,11 @@ static int floppy_open(struct block_device *bdev, fmode_t mode) opened_bdev[drive] = bdev; +if (!(mode & (FMODE_READ |FMODE_WRITE ))) { + res = -EINVAL ; + goto out; + } + res = -ENXIO ;if (!floppy_track_buffer) {
@@ -3706,15 +3711,13 @@ static int floppy_open(struct block_device *bdev, fmode_t mode)if (UFDCS ->rawcmd ==1 )UFDCS ->rawcmd =2 ; -if (mode & (FMODE_READ |FMODE_WRITE )) { -UDRS ->last_checked =0 ; -clear_bit (FD_OPEN_SHOULD_FAIL_BIT , &UDRS ->flags); -check_disk_change (bdev); -if (test_bit (FD_DISK_CHANGED_BIT , &UDRS ->flags)) - goto out; -if (test_bit (FD_OPEN_SHOULD_FAIL_BIT , &UDRS ->flags)) - goto out; - } +UDRS ->last_checked =0 ; +clear_bit (FD_OPEN_SHOULD_FAIL_BIT , &UDRS ->flags); +check_disk_change (bdev); +if (test_bit (FD_DISK_CHANGED_BIT , &UDRS ->flags)) + goto out; +if (test_bit (FD_OPEN_SHOULD_FAIL_BIT , &UDRS ->flags)) + goto out; res = -EROFS ;
drivers/clk/renesas/r8a7795-cpg-mssr.c +5 -4
@@ -91,6 +91,7 @@ static const struct cpg_core_clk r8a7795_core_clks[] __initconst = {DEF_FIXED (".s1" ,CLK_S1 ,CLK_PLL1_DIV2 ,3 ,1 ),DEF_FIXED (".s2" ,CLK_S2 ,CLK_PLL1_DIV2 ,4 ,1 ),DEF_FIXED (".s3" ,CLK_S3 ,CLK_PLL1_DIV2 ,6 ,1 ), +DEF_FIXED (".sdsrc" ,CLK_SDSRC ,CLK_PLL1_DIV2 ,2 ,1 ),/* Core Clock Outputs */ DEF_FIXED("ztr", R8A7795_CLK_ZTR, CLK_PLL1_DIV2, 6, 1),
@@ -109,10 +110,10 @@ static const struct cpg_core_clk r8a7795_core_clks[] __initconst = {DEF_FIXED ("s3d2" ,R8A7795_CLK_S3D2 ,CLK_S3 ,2 ,1 ),DEF_FIXED ("s3d4" ,R8A7795_CLK_S3D4 ,CLK_S3 ,4 ,1 ), -DEF_GEN3_SD ("sd0" ,R8A7795_CLK_SD0 ,CLK_PLL1_DIV2 ,0x0074 ), -DEF_GEN3_SD ("sd1" ,R8A7795_CLK_SD1 ,CLK_PLL1_DIV2 ,0x0078 ), -DEF_GEN3_SD ("sd2" ,R8A7795_CLK_SD2 ,CLK_PLL1_DIV2 ,0x0268 ), -DEF_GEN3_SD ("sd3" ,R8A7795_CLK_SD3 ,CLK_PLL1_DIV2 ,0x026c ), +DEF_GEN3_SD ("sd0" ,R8A7795_CLK_SD0 ,CLK_SDSRC ,0x0074 ), +DEF_GEN3_SD ("sd1" ,R8A7795_CLK_SD1 ,CLK_SDSRC ,0x0078 ), +DEF_GEN3_SD ("sd2" ,R8A7795_CLK_SD2 ,CLK_SDSRC ,0x0268 ), +DEF_GEN3_SD ("sd3" ,R8A7795_CLK_SD3 ,CLK_SDSRC ,0x026c ),DEF_FIXED ("cl" ,R8A7795_CLK_CL ,CLK_PLL1_DIV2 ,48 ,1 ), DEF_FIXED("cp", R8A7795_CLK_CP, CLK_EXTAL, 2, 1),
drivers/crypto/caam/caamalg.c +8 -5
@@ -441,6 +441,9 @@ static int aead_set_sh_desc(struct crypto_aead *aead) OP_ALG_AAI_CTR_MOD128);const bool is_rfc3686 = alg->caam.rfc3686; +if (!ctx->authsize) +return 0 ; +/* NULL encryption / decryption */ if (!ctx->enckeylen)return aead_null_set_sh_desc (aead);
@@ -614,7 +617,7 @@ skip_enc: keys_fit_inline = true;/* aead_givencrypt shared descriptor */ - desc = ctx->sh_desc_givenc; + desc = ctx->sh_desc_enc;/* Note: Context registers are saved. */ init_sh_desc_key_aead (desc, ctx, keys_fit_inline, is_rfc3686);
@@ -645,13 +648,13 @@ copy_iv:append_operation (desc, ctx->class2_alg_type |OP_ALG_AS_INITFINAL |OP_ALG_ENCRYPT ); -/* ivsize + cryptlen = seqoutlen - authsize */ -append_math_sub_imm_u32 (desc,REG3 ,SEQOUTLEN ,IMM , ctx->authsize); -/* Read and write assoclen bytes */ append_math_add (desc,VARSEQINLEN ,ZERO ,REG3 ,CAAM_CMD_SZ );append_math_add (desc,VARSEQOUTLEN ,ZERO ,REG3 ,CAAM_CMD_SZ ); +/* ivsize + cryptlen = seqoutlen - authsize */ +append_math_sub_imm_u32 (desc,REG3 ,SEQOUTLEN ,IMM , ctx->authsize); +/* Skip assoc data */ append_seq_fifo_store (desc,0 ,FIFOST_TYPE_SKIP |FIFOLDST_VLF );
@@ -697,7 +700,7 @@ copy_iv: ctx->sh_desc_enc_dma =dma_map_single (jrdev, desc,desc_bytes (desc),DMA_TO_DEVICE ); -if (dma_mapping_error (jrdev, ctx->sh_desc_givenc_dma)) { +if (dma_mapping_error (jrdev, ctx->sh_desc_enc_dma)) {dev_err (jrdev,"unable to map shared descriptor\n" );return -ENOMEM ; }
drivers/crypto/caam/caamhash.c +1 -0
@@ -1897,6 +1897,7 @@ caam_hash_alloc(struct caam_hash_template *template, template->name);snprintf (alg->cra_driver_name,CRYPTO_MAX_ALG_NAME ,"%s" , template->driver_name); + t_alg->ahash_alg.setkey =NULL ; } alg->cra_module =THIS_MODULE ; alg->cra_init = caam_hash_cra_init;
drivers/crypto/nx/nx.c +1 -1
@@ -392,7 +392,7 @@ static void nx_of_update_msc(struct device *dev, ((bytes_so_far +sizeof (struct msc_triplet )) <= lenp) && i < msc->triplets; i++) { -if (msc->fc >NX_MAX_FC || msc->mode >NX_MAX_MODE ) { +if (msc->fc >=NX_MAX_FC || msc->mode >=NX_MAX_MODE ) {dev_err (dev,"unknown function code/mode " "combo: %d/%d (ignored)\n" , msc->fc, msc->mode);
drivers/crypto/qat/qat_common/qat_algs.c +2 -2
@@ -1260,8 +1260,8 @@ static struct crypto_alg qat_algs[] = { { .setkey = qat_alg_ablkcipher_xts_setkey, .decrypt = qat_alg_ablkcipher_decrypt, .encrypt = qat_alg_ablkcipher_encrypt, - .min_keysize = AES_MIN_KEY_SIZE, - .max_keysize = AES_MAX_KEY_SIZE, + .min_keysize = 2 * AES_MIN_KEY_SIZE, + .max_keysize = 2 * AES_MAX_KEY_SIZE, .ivsize = AES_BLOCK_SIZE, }, },
drivers/dax/pmem.c +3 -0
@@ -118,6 +118,9 @@ static int dax_pmem_probe(struct device *dev)return rc; } +/* adjust the dax_region resource to the start of data */ + res.start +=le64_to_cpu (pfn_sb->dataoff); + nd_region =to_nd_region (dev->parent); dax_region =alloc_dax_region (dev, nd_region->id, &res,le32_to_cpu (pfn_sb->align), addr,PFN_DEV |PFN_MAP );
drivers/dma/sh/usb-dmac.c +11 -8
@@ -600,27 +600,30 @@ static irqreturn_t usb_dmac_isr_channel(int irq, void *dev) {struct usb_dmac_chan *chan = dev;irqreturn_t ret =IRQ_NONE ; -u32 mask =USB_DMACHCR_TE ; -u32 check_bits =USB_DMACHCR_TE |USB_DMACHCR_SP ; +u32 mask =0 ;u32 chcr; +bool xfer_end = false;spin_lock (&chan->vc.lock); chcr =usb_dmac_chan_read (chan,USB_DMACHCR ); -if (chcr & check_bits) - mask |=USB_DMACHCR_DE | check_bits; +if (chcr & (USB_DMACHCR_TE |USB_DMACHCR_SP )) { + mask |=USB_DMACHCR_DE |USB_DMACHCR_TE |USB_DMACHCR_SP ; +if (chcr &USB_DMACHCR_DE ) + xfer_end = true; + ret |=IRQ_HANDLED ; + }if (chcr &USB_DMACHCR_NULL ) {/* An interruption of TE will happen after we set FTE */ mask |=USB_DMACHCR_NULL ; chcr |=USB_DMACHCR_FTE ; ret |=IRQ_HANDLED ; } -usb_dmac_chan_write (chan,USB_DMACHCR , chcr & ~mask); +if (mask) +usb_dmac_chan_write (chan,USB_DMACHCR , chcr & ~mask); -if (chcr & check_bits) { +if (xfer_end)usb_dmac_isr_transfer_end (chan); - ret |=IRQ_HANDLED ; - }spin_unlock (&chan->vc.lock);
drivers/edac/sb_edac.c +11 -4
@@ -552,9 +552,9 @@ static const struct pci_id_table pci_dev_descr_haswell_table[] = {/* Knight's Landing Support */ /* * KNL's memory channels are swizzled between memory controllers. -* MC0 is mapped to CH3,5,6 and MC1 is mapped to CH0,1,2 +* MC0 is mapped to CH3,4,5 and MC1 is mapped to CH0,1,2 */ -#define knl_channel_remap (channel) ((channel + 3) % 6) +#define knl_channel_remap (mc, chan) ((mc) ? (chan) : (chan) + 3)/* Memory controller, TAD tables, error injection - 2-8-0, 2-9-0 (2 of these) */ #define PCI_DEVICE_ID_INTEL_KNL_IMC_MC 0x7840
@@ -1286,7 +1286,7 @@ static u32 knl_get_mc_route(int entry, u32 reg) mc =GET_BITFIELD (reg, entry*3 , (entry*3 )+2 ); chan =GET_BITFIELD (reg, (entry*2 ) +18 , (entry*2 ) +18 +1 ); -return knl_channel_remap (mc*3 + chan); +return knl_channel_remap (mc, chan); }/*
@@ -2997,8 +2997,15 @@ static void sbridge_mce_output_error(struct mem_ctl_info *mci, }else {char A = *("A" ); - channel =knl_channel_remap (channel); +/* +* Reported channel is in range 0-2, so we can't map it +* back to mc. To figure out mc we check machine check +* bank register that reported this error. +* bank15 means mc0 and bank16 means mc1. +*/ + channel =knl_channel_remap (m->bank ==16 , channel); channel_mask =1 << channel; + snprintf(msg, sizeof(msg), "%s%s err_code:%04x:%04x channel:%d (DIMM_%c)", overflow ? " OVERFLOW" : "",
drivers/firmware/efi/capsule-loader.c +5 -3
@@ -16,6 +16,7 @@#include <linux/slab.h> #include <linux/mutex.h> #include <linux/efi.h> +#include <linux/vmalloc.h> #define NO_FURTHER_WRITE_ACTION -1
@@ -108,14 +109,15 @@ static ssize_t efi_capsule_submit_update(struct capsule_info *cap_info)int ret;void *cap_hdr_temp; - cap_hdr_temp =kmap (cap_info->pages[0 ]); + cap_hdr_temp =vmap (cap_info->pages, cap_info->index, +VM_MAP ,PAGE_KERNEL );if (!cap_hdr_temp) { -pr_debug ("%s: kmap() failed\n" , __func__); +pr_debug ("%s: vmap() failed\n" , __func__);return -EFAULT ; } ret =efi_capsule_update (cap_hdr_temp, cap_info->pages); -kunmap (cap_info->pages[0 ]); +vunmap (cap_hdr_temp);if (ret) {pr_err ("%s: efi_capsule_update() failed\n" , __func__);return ret;
drivers/firmware/efi/capsule.c +3 -3
@@ -190,9 +190,9 @@ efi_capsule_update_locked(efi_capsule_header_t *capsule,* map the capsule described by @capsule with its data in @pages and * send it to the firmware via the UpdateCapsule() runtime service. * -* @capsule must be a virtual mapping of the first page in @pages -* (@pages[0]) in the kernel address space. That is, a -* capsule_header_t that describes the entire contents of the capsule +* @capsule must be a virtual mapping of the complete capsule update in the +* kernel address space, as the capsule can be consumed immediately. +* A capsule_header_t that describes the entire contents of the capsule * must be at the start of the first data page. * * Even though this function will validate that the firmware supports
drivers/gpio/Kconfig +1 -0
@@ -50,6 +50,7 @@ config GPIO_DEVRES config OF_GPIO def_bool y depends on OF + depends on HAS_IOMEM config GPIO_ACPI def_bool y
drivers/gpio/gpio-max730x.c +4 -4
@@ -192,6 +192,10 @@ int __max730x_probe(struct max7301 *ts) ts->chip.parent = dev; ts->chip.owner =THIS_MODULE ; + ret =gpiochip_add_data (&ts->chip, ts); +if (ret) + goto exit_destroy; +/* * initialize pullups according to platform data and cache the * register values for later use.
@@ -213,10 +217,6 @@ int __max730x_probe(struct max7301 *ts) } } - ret =gpiochip_add_data (&ts->chip, ts); -if (ret) - goto exit_destroy; -return ret; exit_destroy:
drivers/gpu/drm/amd/amdgpu/amdgpu.h +4 -2
@@ -415,6 +415,8 @@ struct amdgpu_mman {/* custom LRU management */ struct amdgpu_mman_lru log2_size[AMDGPU_TTM_LRU_SIZE ]; +/* guard for log2_size array, don't add anything in between */ +struct amdgpu_mman_lru guard; }; int amdgpu_copy_buffer(struct amdgpu_ring *ring,
@@ -637,9 +639,9 @@ int amdgpu_gart_table_vram_pin(struct amdgpu_device *adev);void amdgpu_gart_table_vram_unpin (struct amdgpu_device *adev);int amdgpu_gart_init (struct amdgpu_device *adev);void amdgpu_gart_fini (struct amdgpu_device *adev); -void amdgpu_gart_unbind (struct amdgpu_device *adev,unsigned offset, +void amdgpu_gart_unbind (struct amdgpu_device *adev,uint64_t offset,int pages); -int amdgpu_gart_bind (struct amdgpu_device *adev,unsigned offset, +int amdgpu_gart_bind (struct amdgpu_device *adev,uint64_t offset,int pages,struct page **pagelist,dma_addr_t *dma_addr,uint32_t flags);
drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c +13 -0
@@ -321,6 +321,19 @@ bool amdgpu_atombios_get_connector_info_from_object_table(struct amdgpu_device * (le16_to_cpu (path->usConnObjectId) &OBJECT_TYPE_MASK ) >>OBJECT_TYPE_SHIFT ; +/* Skip TV/CV support */ +if ((le16_to_cpu (path->usDeviceTag) == +ATOM_DEVICE_TV1_SUPPORT ) || + (le16_to_cpu (path->usDeviceTag) == +ATOM_DEVICE_CV_SUPPORT )) +continue ; + +if (con_obj_id >=ARRAY_SIZE (object_connector_convert)) { +DRM_ERROR ("invalid con_obj_id %d for device tag 0x%04x\n" , + con_obj_id,le16_to_cpu (path->usDeviceTag)); +continue ; + } + connector_type = object_connector_convert[con_obj_id]; connector_object_id = con_obj_id;
drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c +2 -2
@@ -221,7 +221,7 @@ void amdgpu_gart_table_vram_free(struct amdgpu_device *adev)* Unbinds the requested pages from the gart page table and * replaces them with the dummy page (all asics). */ -void amdgpu_gart_unbind (struct amdgpu_device *adev,unsigned offset, +void amdgpu_gart_unbind (struct amdgpu_device *adev,uint64_t offset,int pages) {unsigned t;
@@ -268,7 +268,7 @@ void amdgpu_gart_unbind(struct amdgpu_device *adev, unsigned offset,* (all asics). * Returns 0 for success, -EINVAL for failure. */ -int amdgpu_gart_bind (struct amdgpu_device *adev,unsigned offset, +int amdgpu_gart_bind (struct amdgpu_device *adev,uint64_t offset,int pages,struct page **pagelist,dma_addr_t *dma_addr,uint32_t flags) {
drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c +3 -2
@@ -288,7 +288,7 @@ void amdgpu_ib_pool_fini(struct amdgpu_device *adev)int amdgpu_ib_ring_tests (struct amdgpu_device *adev) {unsigned i; -int r; +int r, ret =0 ;for (i =0 ; i <AMDGPU_MAX_RINGS ; ++i) {struct amdgpu_ring *ring = adev->rings[i];
@@ -309,10 +309,11 @@ int amdgpu_ib_ring_tests(struct amdgpu_device *adev) }else {/* still not good, but we can live with it */ DRM_ERROR ("amdgpu: failed testing IB on ring %d (%d).\n" , i, r); + ret = r; } } } -return 0 ; +return ret; }/*
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +10 -2
@@ -251,8 +251,8 @@ static int amdgpu_move_blit(struct ttm_buffer_object *bo, adev =amdgpu_get_adev (bo->bdev); ring = adev->mman.buffer_funcs_ring; - old_start = old_mem->start <<PAGE_SHIFT ; - new_start = new_mem->start <<PAGE_SHIFT ; + old_start = (u64 )old_mem->start <<PAGE_SHIFT ; + new_start = (u64 )new_mem->start <<PAGE_SHIFT ;switch (old_mem->mem_type) {case TTM_PL_VRAM :
@@ -943,6 +943,8 @@ static struct list_head *amdgpu_ttm_lru_tail(struct ttm_buffer_object *tbo)struct list_head *res = lru->lru[tbo->mem.mem_type]; lru->lru[tbo->mem.mem_type] = &tbo->lru; +while ((++lru)->lru[tbo->mem.mem_type] == res) + lru->lru[tbo->mem.mem_type] = &tbo->lru;return res; }
@@ -953,6 +955,8 @@ static struct list_head *amdgpu_ttm_swap_lru_tail(struct ttm_buffer_object *tbo)struct list_head *res = lru->swap_lru; lru->swap_lru = &tbo->swap; +while ((++lru)->swap_lru == res) + lru->swap_lru = &tbo->swap;return res; }
@@ -1004,6 +1008,10 @@ int amdgpu_ttm_init(struct amdgpu_device *adev) lru->swap_lru = &adev->mman.bdev.glob->swap_lru; } +for (j =0 ; j <TTM_NUM_MEM_TYPES ; ++j) + adev->mman.guard.lru[j] =NULL ; + adev->mman.guard.swap_lru =NULL ; + adev->mman.initialized = true; r =ttm_bo_init_mm (&adev->mman.bdev,TTM_PL_VRAM , adev->mc.real_vram_size >>PAGE_SHIFT );
drivers/gpu/drm/amd/amdgpu/cik_sdma.c +3 -0
@@ -52,6 +52,7 @@ static void cik_sdma_set_ring_funcs(struct amdgpu_device *adev);static void cik_sdma_set_irq_funcs (struct amdgpu_device *adev);static void cik_sdma_set_buffer_funcs (struct amdgpu_device *adev);static void cik_sdma_set_vm_pte_funcs (struct amdgpu_device *adev); +static int cik_sdma_soft_reset (void *handle);MODULE_FIRMWARE ("radeon/bonaire_sdma.bin" );MODULE_FIRMWARE ("radeon/bonaire_sdma1.bin" );
@@ -1051,6 +1052,8 @@ static int cik_sdma_resume(void *handle) {struct amdgpu_device *adev = (struct amdgpu_device *)handle; +cik_sdma_soft_reset (handle); +return cik_sdma_hw_init (adev); }
drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c +9 -3
@@ -2777,8 +2777,7 @@ static int gfx_v7_0_cp_compute_resume(struct amdgpu_device *adev)u64 wb_gpu_addr;u32 *buf;struct bonaire_mqd *mqd; - -gfx_v7_0_cp_compute_enable (adev, true); +struct amdgpu_ring *ring;/* fix up chicken bits */ tmp =RREG32 (mmCP_CPF_DEBUG);
@@ -2813,7 +2812,7 @@ static int gfx_v7_0_cp_compute_resume(struct amdgpu_device *adev)/* init the queues. Just two for now. */ for (i =0 ; i < adev->gfx.num_compute_rings; i++) { -struct amdgpu_ring *ring = &adev->gfx.compute_ring[i]; + ring = &adev->gfx.compute_ring[i];if (ring->mqd_obj ==NULL ) { r = amdgpu_bo_create(adev,
@@ -2992,6 +2991,13 @@ static int gfx_v7_0_cp_compute_resume(struct amdgpu_device *adev)amdgpu_bo_unreserve (ring->mqd_obj); ring->ready = true; + } + +gfx_v7_0_cp_compute_enable (adev, true); + +for (i =0 ; i < adev->gfx.num_compute_rings; i++) { + ring = &adev->gfx.compute_ring[i]; + r =amdgpu_ring_test_ring (ring);if (r) ring->ready = false;
drivers/gpu/drm/i915/i915_drv.c +3 -0
@@ -1578,6 +1578,9 @@ static int intel_runtime_suspend(struct device *device)assert_forcewakes_inactive (dev_priv); +if (!IS_VALLEYVIEW (dev_priv) || !IS_CHERRYVIEW (dev_priv)) +intel_hpd_poll_init (dev_priv); +DRM_DEBUG_KMS ("Device suspended\n" );return 0 ; }
drivers/gpu/drm/i915/i915_drv.h +5 -0
@@ -281,6 +281,9 @@ struct i915_hotplug {u32 short_port_mask;struct work_struct dig_port_work; +struct work_struct poll_init_work; +bool poll_enabled; +/* * if we get a HPD irq from DP and a HPD irq from non-DP * the non-DP HPD could block the workqueue on a mode config
@@ -2791,6 +2794,8 @@ void intel_hpd_init(struct drm_i915_private *dev_priv);void intel_hpd_init_work (struct drm_i915_private *dev_priv);void intel_hpd_cancel_work (struct drm_i915_private *dev_priv);bool intel_hpd_pin_to_port (enum hpd_pin pin,enum port *port); +bool intel_hpd_disable (struct drm_i915_private *dev_priv,enum hpd_pin pin); +void intel_hpd_enable (struct drm_i915_private *dev_priv,enum hpd_pin pin);/* i915_irq.c */ void i915_queue_hangcheck (struct drm_device *dev);
drivers/gpu/drm/i915/i915_gem_gtt.c +1 -0
@@ -2826,6 +2826,7 @@ void i915_ggtt_cleanup_hw(struct drm_device *dev)struct i915_hw_ppgtt *ppgtt = dev_priv->mm.aliasing_ppgtt; ppgtt->base.cleanup (&ppgtt->base); +kfree (ppgtt); }i915_gem_cleanup_stolen (dev);
drivers/gpu/drm/i915/i915_reg.h +1 -0
@@ -1522,6 +1522,7 @@ enum skl_disp_power_wells {#define BALANCE_LEG_MASK (port) (7<<(8+3*(port)))/* Balance leg disable bits */ #define BALANCE_LEG_DISABLE_SHIFT 23 +#define BALANCE_LEG_DISABLE (port) (1 << (23 + (port)))/* * Fence registers
drivers/gpu/drm/i915/intel_audio.c +6 -0
@@ -600,6 +600,8 @@ static void i915_audio_component_codec_wake_override(struct device *dev,if (!IS_SKYLAKE (dev_priv) && !IS_KABYLAKE (dev_priv))return ; +i915_audio_component_get_power (dev); +/* * Enable/disable generating the codec wake signal, overriding the * internal logic to generate the codec wake to controller.
@@ -615,6 +617,8 @@ static void i915_audio_component_codec_wake_override(struct device *dev,I915_WRITE (HSW_AUD_CHICKENBIT , tmp);usleep_range (1000 ,1500 ); } + +i915_audio_component_put_power (dev); }/* Get CDCLK in kHz */
@@ -654,6 +658,7 @@ static int i915_audio_component_sync_audio_rate(struct device *dev, !IS_HASWELL(dev_priv))return 0 ; +i915_audio_component_get_power (dev);mutex_lock (&dev_priv->av_mutex);/* 1. get the pipe */ intel_encoder = dev_priv->dig_port_map[port];
@@ -704,6 +709,7 @@ static int i915_audio_component_sync_audio_rate(struct device *dev, unlock:mutex_unlock (&dev_priv->av_mutex); +i915_audio_component_put_power (dev);return err; }
drivers/gpu/drm/i915/intel_crt.c +23 -5
@@ -327,10 +327,25 @@ static bool valleyview_crt_detect_hotplug(struct drm_connector *connector)struct drm_device *dev = connector->dev;struct intel_crt *crt =intel_attached_crt (connector);struct drm_i915_private *dev_priv = dev->dev_private; +bool reenable_hpd;u32 adpa;bool ret;u32 save_adpa; +/* +* Doing a force trigger causes a hpd interrupt to get sent, which can +* get us stuck in a loop if we're polling: +* - We enable power wells and reset the ADPA +* - output_poll_exec does force probe on VGA, triggering a hpd +* - HPD handler waits for poll to unlock dev->mode_config.mutex +* - output_poll_exec shuts off the ADPA, unlocks +* dev->mode_config.mutex +* - HPD handler runs, resets ADPA and brings us back to the start +* +* Just disable HPD interrupts here to prevent this +*/ + reenable_hpd =intel_hpd_disable (dev_priv, crt->base.hpd_pin); + save_adpa = adpa =I915_READ (crt->adpa_reg);DRM_DEBUG_KMS ("trigger hotplug detect cycle: adpa=0x%x\n" , adpa);
@@ -353,6 +368,9 @@ static bool valleyview_crt_detect_hotplug(struct drm_connector *connector)DRM_DEBUG_KMS ("valleyview hotplug adpa=0x%x, result %d\n" , adpa, ret); +if (reenable_hpd) +intel_hpd_enable (dev_priv, crt->base.hpd_pin); +return ret; }
@@ -713,11 +731,11 @@ static int intel_crt_set_property(struct drm_connector *connector,return 0 ; } -static void intel_crt_reset (struct drm_connector *connector) +void intel_crt_reset (struct drm_encoder *encoder) { -struct drm_device *dev = connector->dev; +struct drm_device *dev = encoder->dev;struct drm_i915_private *dev_priv = dev->dev_private; -struct intel_crt *crt =intel_attached_crt (connector); +struct intel_crt *crt =intel_encoder_to_crt (to_intel_encoder (encoder));if (INTEL_INFO (dev)->gen >=5 ) {u32 adpa;
@@ -739,7 +757,6 @@ static void intel_crt_reset(struct drm_connector *connector)*/ static const struct drm_connector_funcs intel_crt_connector_funcs = { - .reset = intel_crt_reset, .dpms = drm_atomic_helper_connector_dpms, .detect = intel_crt_detect, .fill_modes = drm_helper_probe_single_connector_modes,
@@ -757,6 +774,7 @@ static const struct drm_connector_helper_funcs intel_crt_connector_helper_funcs };static const struct drm_encoder_funcs intel_crt_enc_funcs = { + .reset = intel_crt_reset, .destroy = intel_encoder_destroy, };
@@ -902,5 +920,5 @@ void intel_crt_init(struct drm_device *dev) dev_priv->fdi_rx_config =I915_READ (FDI_RX_CTL (PIPE_A )) & fdi_config; } -intel_crt_reset (connector); +intel_crt_reset (&crt->base.base); }
drivers/gpu/drm/i915/intel_ddi.c +65 -26
181 lines not on this page · raw message
drivers/gpu/drm/i915/intel_drv.h +3 -1
@@ -1052,7 +1052,7 @@ void gen8_irq_power_well_pre_disable(struct drm_i915_private *dev_priv,/* intel_crt.c */ void intel_crt_init (struct drm_device *dev); - +void intel_crt_reset (struct drm_encoder *encoder);/* intel_ddi.c */ void intel_ddi_clk_select(struct intel_encoder *encoder,
@@ -1346,6 +1346,8 @@ void intel_dsi_init(struct drm_device *dev);/* intel_dvo.c */ void intel_dvo_init (struct drm_device *dev); +/* intel_hotplug.c */ +void intel_hpd_poll_init (struct drm_i915_private *dev_priv);/* legacy fbdev emulation in intel_fbdev.c */
drivers/gpu/drm/i915/intel_hotplug.c +105 -12
154 lines not on this page · raw message
drivers/gpu/drm/i915/intel_runtime_pm.c +9 -0
@@ -952,6 +952,7 @@ static void vlv_init_display_clock_gating(struct drm_i915_private *dev_priv)static void vlv_display_power_well_init (struct drm_i915_private *dev_priv) { +struct intel_encoder *encoder;enum pipe pipe;/*
@@ -987,6 +988,12 @@ static void vlv_display_power_well_init(struct drm_i915_private *dev_priv)intel_hpd_init (dev_priv); +/* Re-enable the ADPA, if we have one */ +for_each_intel_encoder (dev_priv->dev, encoder) { +if (encoder->type ==INTEL_OUTPUT_ANALOG ) +intel_crt_reset (&encoder->base); + } +i915_redisable_vga_power_on (dev_priv->dev); }
@@ -1000,6 +1007,8 @@ static void vlv_display_power_well_deinit(struct drm_i915_private *dev_priv)synchronize_irq (dev_priv->dev->irq);vlv_power_sequencer_reset (dev_priv); + +intel_hpd_poll_init (dev_priv); } static void vlv_display_power_well_enable(struct drm_i915_private *dev_priv,
drivers/hwmon/iio_hwmon.c +12 -12
@@ -110,24 +110,24 @@ static int iio_hwmon_probe(struct platform_device *pdev)switch (type) {case IIO_VOLTAGE : - a->dev_attr.attr.name =kasprintf (GFP_KERNEL , -"in%d_input" , - in_i++); + a->dev_attr.attr.name =devm_kasprintf (dev,GFP_KERNEL , +"in%d_input" , + in_i++);break ;case IIO_TEMP : - a->dev_attr.attr.name =kasprintf (GFP_KERNEL , -"temp%d_input" , - temp_i++); + a->dev_attr.attr.name =devm_kasprintf (dev,GFP_KERNEL , +"temp%d_input" , + temp_i++);break ;case IIO_CURRENT : - a->dev_attr.attr.name =kasprintf (GFP_KERNEL , -"curr%d_input" , - curr_i++); + a->dev_attr.attr.name =devm_kasprintf (dev,GFP_KERNEL , +"curr%d_input" , + curr_i++);break ;case IIO_HUMIDITYRELATIVE : - a->dev_attr.attr.name =kasprintf (GFP_KERNEL , -"humidity%d_input" , - humidity_i++); + a->dev_attr.attr.name =devm_kasprintf (dev,GFP_KERNEL , +"humidity%d_input" , + humidity_i++);break ;default : ret = -EINVAL ;
drivers/hwmon/it87.c +1 -0
@@ -2015,6 +2015,7 @@ static struct attribute *it87_attributes_in[] = { &sensor_dev_attr_in10_input.dev_attr.attr,/* 41 */ &sensor_dev_attr_in11_input.dev_attr.attr,/* 41 */ &sensor_dev_attr_in12_input.dev_attr.attr,/* 41 */ +NULL }; static const struct attribute_group it87_group_in = {
drivers/i2c/busses/i2c-cros-ec-tunnel.c +1 -1
@@ -215,7 +215,7 @@ static int ec_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg i2c_msgs[], msg->outsize = request_len; msg->insize = response_len; - result =cros_ec_cmd_xfer (bus->ec, msg); + result =cros_ec_cmd_xfer_status (bus->ec, msg);if (result <0 ) {dev_err (dev,"Error transferring EC i2c message %d\n" , result); goto exit;
drivers/i2c/muxes/i2c-demux-pinctrl.c +3 -1
@@ -68,7 +68,7 @@ static int i2c_demux_activate_master(struct i2c_demux_pinctrl_priv *priv, u32 ne adap =of_find_i2c_adapter_by_node (priv->chan[new_chan].parent_np);if (!adap) { ret = -ENODEV ; - goto err; + goto err_with_revert; } p =devm_pinctrl_get_select (adap->dev.parent, priv->bus_name);
@@ -103,6 +103,8 @@ static int i2c_demux_activate_master(struct i2c_demux_pinctrl_priv *priv, u32 ne err_with_put:i2c_put_adapter (adap); + err_with_revert: +of_changeset_revert (&priv->chan[new_chan].chgset); err:dev_err (priv->dev,"failed to setup demux-adapter %d (%d)\n" , new_chan, ret);return ret;
drivers/iio/industrialio-buffer.c +17 -6
@@ -107,6 +107,7 @@ ssize_t iio_buffer_read_first_n_outer(struct file *filp, char __user *buf, {struct iio_dev *indio_dev = filp->private_data;struct iio_buffer *rb = indio_dev->buffer; +DEFINE_WAIT_FUNC (wait, woken_wake_function);size_t datum_size;size_t to_wait;int ret;
@@ -131,19 +132,29 @@ ssize_t iio_buffer_read_first_n_outer(struct file *filp, char __user *buf,else to_wait =min_t (size_t, n / datum_size, rb->watermark); +add_wait_queue (&rb->pollq, &wait);do { - ret =wait_event_interruptible (rb->pollq, -iio_buffer_ready (indio_dev, rb, to_wait, n / datum_size)); -if (ret) -return ret; +if (!indio_dev->info) { + ret = -ENODEV ; +break ; + } -if (!indio_dev->info) -return -ENODEV ; +if (!iio_buffer_ready (indio_dev, rb, to_wait, n / datum_size)) { +if (signal_pending (current)) { + ret = -ERESTARTSYS ; +break ; + } + +wait_woken (&wait,TASK_INTERRUPTIBLE , +MAX_SCHEDULE_TIMEOUT ); +continue ; + } ret = rb->access->read_first_n (rb, n, buf);if (ret ==0 && (filp->f_flags &O_NONBLOCK )) ret = -EAGAIN ; }while (ret ==0 ); +remove_wait_queue (&rb->pollq, &wait);return ret; }
drivers/input/keyboard/tegra-kbc.c +1 -1
@@ -376,7 +376,7 @@ static int tegra_kbc_start(struct tegra_kbc *kbc)/* Reset the KBC controller to clear all previous status.*/ reset_control_assert (kbc->rst);udelay (100 ); -reset_control_assert (kbc->rst); +reset_control_deassert (kbc->rst);udelay (100 );tegra_kbc_config_pins (kbc);
drivers/input/rmi4/rmi_driver.c +2 -1
@@ -553,7 +553,6 @@ int rmi_read_register_desc(struct rmi_device *d, u16 addr, goto free_struct_buff; reg =find_first_bit (rdesc->presense_map,RMI_REG_DESC_PRESENSE_BITS ); - map_offset =0 ;for (i =0 ; i < rdesc->num_registers; i++) {struct rmi_register_desc_item *item = &rdesc->registers[i];int reg_size = struct_buf[offset];
@@ -576,6 +575,8 @@ int rmi_read_register_desc(struct rmi_device *d, u16 addr, item->reg = reg; item->reg_size = reg_size; + map_offset =0 ; + do { for (b = 0; b < 7; b++) { if (struct_buf[offset] & (0x1 << b))
drivers/input/serio/i8042.c +2 -15
@@ -1277,6 +1277,7 @@ static int __init i8042_create_kbd_port(void) serio->start = i8042_start; serio->stop = i8042_stop; serio->close = i8042_port_close; + serio->ps2_cmd_mutex = &i8042_mutex; serio->port_data = port; serio->dev.parent = &i8042_platform_device->dev;strlcpy (serio->name,"i8042 KBD port" ,sizeof (serio->name));
@@ -1304,6 +1305,7 @@ static int __init i8042_create_aux_port(int idx) serio->write = i8042_aux_write; serio->start = i8042_start; serio->stop = i8042_stop; + serio->ps2_cmd_mutex = &i8042_mutex; serio->port_data = port; serio->dev.parent = &i8042_platform_device->dev;if (idx <0 ) {
@@ -1373,21 +1375,6 @@ static void i8042_unregister_ports(void) } } -/* -* Checks whether port belongs to i8042 controller. -*/ -bool i8042_check_port_owner (const struct serio *port) -{ -int i; - -for (i =0 ; i <I8042_NUM_PORTS ; i++) -if (i8042_ports[i].serio == port) -return true; - -return false; -} -EXPORT_SYMBOL (i8042_check_port_owner); -static void i8042_free_irqs (void ) {if (i8042_aux_irq_registered)
drivers/input/serio/libps2.c +4 -6
@@ -56,19 +56,17 @@ EXPORT_SYMBOL(ps2_sendbyte);void ps2_begin_command (struct ps2dev *ps2dev) { -mutex_lock (&ps2dev->cmd_mutex); +struct mutex *m = ps2dev->serio->ps2_cmd_mutex ?: &ps2dev->cmd_mutex; -if (i8042_check_port_owner (ps2dev->serio)) -i8042_lock_chip (); +mutex_lock (m); }EXPORT_SYMBOL (ps2_begin_command);void ps2_end_command (struct ps2dev *ps2dev) { -if (i8042_check_port_owner (ps2dev->serio)) -i8042_unlock_chip (); +struct mutex *m = ps2dev->serio->ps2_cmd_mutex ?: &ps2dev->cmd_mutex; -mutex_unlock (&ps2dev->cmd_mutex); +mutex_unlock (m); }EXPORT_SYMBOL (ps2_end_command);
drivers/iommu/arm-smmu-v3.c +5 -2
@@ -879,7 +879,7 @@ static void arm_smmu_cmdq_skip_err(struct arm_smmu_device *smmu)* We may have concurrent producers, so we need to be careful * not to touch any of the shadow cmdq state. */ -queue_read (cmd,Q_ENT (q, idx), q->ent_dwords); +queue_read (cmd,Q_ENT (q, cons), q->ent_dwords);dev_err (smmu->dev,"skipping command in error state:\n" );for (i =0 ; i <ARRAY_SIZE (cmd); ++i)dev_err (smmu->dev,"\t0x%016llx\n" , (unsigned long long )cmd[i]);
@@ -890,7 +890,7 @@ static void arm_smmu_cmdq_skip_err(struct arm_smmu_device *smmu)return ; } -queue_write (cmd,Q_ENT (q, idx), q->ent_dwords); +queue_write (Q_ENT (q, cons), cmd, q->ent_dwords); } static void arm_smmu_cmdq_issue_cmd(struct arm_smmu_device *smmu,
@@ -1034,6 +1034,9 @@ static void arm_smmu_write_strtab_ent(struct arm_smmu_device *smmu, u32 sid,case STRTAB_STE_0_CFG_S2_TRANS : ste_live = true;break ; +case STRTAB_STE_0_CFG_ABORT : +if (disable_bypass) +break ;default :BUG ();/* STE corruption */ }
drivers/iommu/arm-smmu.c +7 -27
@@ -686,8 +686,7 @@ static struct iommu_gather_ops arm_smmu_gather_ops = {static irqreturn_t arm_smmu_context_fault (int irq,void *dev) { -int flags, ret; -u32 fsr, fsynr, resume; +u32 fsr, fsynr;unsigned long iova;struct iommu_domain *domain = dev;struct arm_smmu_domain *smmu_domain =to_smmu_domain (domain);
@@ -701,34 +700,15 @@ static irqreturn_t arm_smmu_context_fault(int irq, void *dev)if (!(fsr &FSR_FAULT ))return IRQ_NONE ; -if (fsr &FSR_IGN ) -dev_err_ratelimited (smmu->dev, -"Unexpected context fault (fsr 0x%x)\n" , - fsr); - fsynr =readl_relaxed (cb_base +ARM_SMMU_CB_FSYNR0 ); - flags = fsynr &FSYNR0_WNR ?IOMMU_FAULT_WRITE :IOMMU_FAULT_READ ; - iova =readq_relaxed (cb_base +ARM_SMMU_CB_FAR ); -if (!report_iommu_fault (domain, smmu->dev, iova, flags)) { - ret =IRQ_HANDLED ; - resume =RESUME_RETRY ; - }else { -dev_err_ratelimited (smmu->dev, -"Unhandled context fault: iova=0x%08lx, fsynr=0x%x, cb=%d\n" , - iova, fsynr, cfg->cbndx); - ret =IRQ_NONE ; - resume =RESUME_TERMINATE ; - } - -/* Clear the faulting FSR */ -writel (fsr, cb_base +ARM_SMMU_CB_FSR ); -/* Retry or terminate any stalled transactions */ -if (fsr &FSR_SS ) -writel_relaxed (resume, cb_base +ARM_SMMU_CB_RESUME ); +dev_err_ratelimited (smmu->dev, +"Unhandled context fault: fsr=0x%x, iova=0x%08lx, fsynr=0x%x, cb=%d\n" , + fsr, iova, fsynr, cfg->cbndx); -return ret; +writel (fsr, cb_base +ARM_SMMU_CB_FSR ); +return IRQ_HANDLED ; }static irqreturn_t arm_smmu_global_fault (int irq,void *dev)
@@ -837,7 +817,7 @@ static void arm_smmu_init_context_bank(struct arm_smmu_domain *smmu_domain, }/* SCTLR */ - reg =SCTLR_CFCFG |SCTLR_CFIE |SCTLR_CFRE |SCTLR_M |SCTLR_EAE_SBOP ; + reg =SCTLR_CFIE |SCTLR_CFRE |SCTLR_M |SCTLR_EAE_SBOP ;if (stage1) reg |=SCTLR_S1_ASIDPNE ;#ifdef __BIG_ENDIAN
drivers/iommu/dma-iommu.c +2 -1
@@ -68,7 +68,8 @@ void iommu_put_dma_cookie(struct iommu_domain *domain)if (!iovad)return ; -put_iova_domain (iovad); +if (iovad->granule) +put_iova_domain (iovad);kfree (iovad); domain->iova_cookie =NULL ; }
drivers/iommu/io-pgtable-arm-v7s.c +3 -1
@@ -286,12 +286,14 @@ static int arm_v7s_pte_to_prot(arm_v7s_iopte pte, int lvl)int prot =IOMMU_READ ;arm_v7s_iopte attr = pte >>ARM_V7S_ATTR_SHIFT (lvl); -if (attr &ARM_V7S_PTE_AP_RDONLY ) +if (!(attr &ARM_V7S_PTE_AP_RDONLY )) prot |=IOMMU_WRITE ;if ((attr & (ARM_V7S_TEX_MASK <<ARM_V7S_TEX_SHIFT )) ==0 ) prot |=IOMMU_MMIO ;else if (pte &ARM_V7S_ATTR_C ) prot |=IOMMU_CACHE ; +if (pte &ARM_V7S_ATTR_XN (lvl)) + prot |=IOMMU_NOEXEC ;return prot; }
drivers/md/dm-round-robin.c +5 -2
@@ -210,14 +210,17 @@ static struct dm_path *rr_select_path(struct path_selector *ps, size_t nr_bytes)struct path_info *pi =NULL ;struct dm_path *current_path =NULL ; +local_irq_save (flags); current_path = *this_cpu_ptr (s->current_path);if (current_path) {percpu_counter_dec (&s->repeat_count); -if (percpu_counter_read_positive (&s->repeat_count) >0 ) +if (percpu_counter_read_positive (&s->repeat_count) >0 ) { +local_irq_restore (flags);return current_path; + } } -spin_lock_irqsave (&s->lock, flags); +spin_lock (&s->lock);if (!list_empty (&s->valid_paths)) { pi = list_entry(s->valid_paths.next, struct path_info, list);list_move_tail (&pi->list, &s->valid_paths);
drivers/of/base.c +2 -9
@@ -2318,20 +2318,13 @@ struct device_node *of_graph_get_endpoint_by_regs( const struct device_node *parent, int port_reg, int reg) { struct of_endpoint endpoint; -struct device_node *node, *prev_node =NULL ; - -while (1 ) { - node =of_graph_get_next_endpoint (parent, prev_node); -of_node_put (prev_node); -if (!node) -break ; +struct device_node *node =NULL ; +for_each_endpoint_of_node (parent, node) {of_graph_parse_endpoint (node, &endpoint);if (((port_reg ==-1 ) || (endpoint.port == port_reg)) && ((reg ==-1 ) || (endpoint.id == reg)))return node; - - prev_node = node; }return NULL ;
drivers/pci/msi.c +2 -0
@@ -1277,6 +1277,8 @@ struct irq_domain *pci_msi_create_irq_domain(struct fwnode_handle *fwnode,if (info->flags &MSI_FLAG_USE_DEF_CHIP_OPS )pci_msi_domain_update_chip_ops (info); + info->flags |=MSI_FLAG_ACTIVATE_EARLY ; + domain =msi_create_irq_domain (fwnode, info, parent);if (!domain)return NULL ;
drivers/pinctrl/meson/pinctrl-meson.c +1 -7
@@ -727,13 +727,7 @@ static int meson_pinctrl_probe(struct platform_device *pdev)return PTR_ERR (pc->pcdev); } - ret =meson_gpiolib_register (pc); -if (ret) { -pinctrl_unregister (pc->pcdev); -return ret; - } - -return 0 ; +return meson_gpiolib_register (pc); }static struct platform_driver meson_pinctrl_driver = {
drivers/pinctrl/pinctrl-amd.c +0 -20
@@ -43,17 +43,6 @@ static int amd_gpio_direction_input(struct gpio_chip *gc, unsigned offset)spin_lock_irqsave (&gpio_dev->lock, flags); pin_reg =readl (gpio_dev->base + offset *4 ); -/* -* Suppose BIOS or Bootloader sets specific debounce for the -* GPIO. if not, set debounce to be 2.75ms and remove glitch. -*/ -if ((pin_reg &DB_TMR_OUT_MASK ) ==0 ) { - pin_reg |=0xf ; - pin_reg |=BIT (DB_TMR_OUT_UNIT_OFF ); - pin_reg |=DB_TYPE_REMOVE_GLITCH <<DB_CNTRL_OFF ; - pin_reg &= ~BIT (DB_TMR_LARGE_OFF ); - } - pin_reg &= ~BIT (OUTPUT_ENABLE_OFF );writel (pin_reg, gpio_dev->base + offset *4 );spin_unlock_irqrestore (&gpio_dev->lock, flags);
@@ -326,15 +315,6 @@ static void amd_gpio_irq_enable(struct irq_data *d)spin_lock_irqsave (&gpio_dev->lock, flags); pin_reg =readl (gpio_dev->base + (d->hwirq)*4 ); -/* -Suppose BIOS or Bootloader sets specific debounce for the -GPIO. if not, set debounce to be 2.75ms. -*/ -if ((pin_reg &DB_TMR_OUT_MASK ) ==0 ) { - pin_reg |=0xf ; - pin_reg |=BIT (DB_TMR_OUT_UNIT_OFF ); - pin_reg &= ~BIT (DB_TMR_LARGE_OFF ); - } pin_reg |=BIT (INTERRUPT_ENABLE_OFF ); pin_reg |=BIT (INTERRUPT_MASK_OFF );writel (pin_reg, gpio_dev->base + (d->hwirq)*4 );
drivers/platform/chrome/cros_ec_proto.c +17 -0
@@ -380,3 +380,20 @@ int cros_ec_cmd_xfer(struct cros_ec_device *ec_dev,return ret; }EXPORT_SYMBOL (cros_ec_cmd_xfer); + +int cros_ec_cmd_xfer_status (struct cros_ec_device *ec_dev, +struct cros_ec_command *msg) +{ +int ret; + + ret =cros_ec_cmd_xfer (ec_dev, msg); +if (ret <0 ) { +dev_err (ec_dev->dev,"Command xfer error (err:%d)\n" , ret); + }else if (msg->result !=EC_RES_SUCCESS ) { +dev_dbg (ec_dev->dev,"Command result (err: %d)\n" , msg->result); +return -EPROTO ; + } + +return ret; +} +EXPORT_SYMBOL (cros_ec_cmd_xfer_status);
drivers/s390/block/dasd.c +9 -1
@@ -1643,9 +1643,18 @@ void dasd_int_handler(struct ccw_device *cdev, unsigned long intparm,u8 *sense =NULL ;int expires; + cqr = (struct dasd_ccw_req *) intparm;if (IS_ERR (irb)) {switch (PTR_ERR (irb)) {case -EIO : +if (cqr && cqr->status ==DASD_CQR_CLEAR_PENDING ) { + device = (struct dasd_device *) cqr->startdev; + cqr->status =DASD_CQR_CLEARED ; +dasd_device_clear_timer (device); +wake_up (&dasd_flush_wq); +dasd_schedule_device_bh (device); +return ; + }break ;case -ETIMEDOUT : DBF_EVENT_DEVID(DBF_WARNING, cdev, "%s: "
@@ -1661,7 +1670,6 @@ void dasd_int_handler(struct ccw_device *cdev, unsigned long intparm, } now =get_tod_clock (); - cqr = (struct dasd_ccw_req *) intparm;/* check for conditions that should be handled immediately */ if (!cqr || !(scsw_dstat(&irb->scsw) == (DEV_STAT_CHN_END | DEV_STAT_DEV_END) &&
drivers/scsi/aacraid/commctrl.c +11 -2
@@ -63,7 +63,7 @@ static int ioctl_send_fib(struct aac_dev * dev, void __user *arg)struct fib *fibptr;struct hw_fib * hw_fib = (struct hw_fib *)0 ;dma_addr_t hw_fib_pa = (dma_addr_t )0LL ; -unsigned size; +unsigned int size, osize;int retval;if (dev->in_reset) {
@@ -87,7 +87,8 @@ static int ioctl_send_fib(struct aac_dev * dev, void __user *arg)* will not overrun the buffer when we copy the memory. Return * an error if we would. */ - size =le16_to_cpu (kfib->header.Size) +sizeof (struct aac_fibhdr ); + osize = size =le16_to_cpu (kfib->header.Size) + +sizeof (struct aac_fibhdr );if (size <le16_to_cpu (kfib->header.SenderSize)) size =le16_to_cpu (kfib->header.SenderSize);if (size > dev->max_fib_size) {
@@ -118,6 +119,14 @@ static int ioctl_send_fib(struct aac_dev * dev, void __user *arg) goto cleanup; } +/* Sanity check the second copy */ +if ((osize !=le16_to_cpu (kfib->header.Size) + +sizeof (struct aac_fibhdr )) + || (size <le16_to_cpu (kfib->header.SenderSize))) { + retval = -EINVAL ; + goto cleanup; + } +if (kfib->header.Command ==cpu_to_le16 (TakeABreakPt)) {aac_adapter_interrupt (dev);/*
drivers/scsi/megaraid/megaraid_sas_base.c +3 -3
@@ -5037,7 +5037,7 @@ static int megasas_init_fw(struct megasas_instance *instance)/* Find first memory bar */ bar_list =pci_select_bars (instance->pdev,IORESOURCE_MEM ); instance->bar =find_first_bit (&bar_list,sizeof (unsigned long )); -if (pci_request_selected_regions (instance->pdev, instance->bar, +if (pci_request_selected_regions (instance->pdev,1 <<instance->bar,"megasas: LSI" )) {dev_printk (KERN_DEBUG , &instance->pdev->dev,"IO memory region busy!\n" );return -EBUSY ;
@@ -5339,7 +5339,7 @@ fail_ready_state:iounmap (instance->reg_set); fail_ioremap: -pci_release_selected_regions (instance->pdev, instance->bar); +pci_release_selected_regions (instance->pdev,1 <<instance->bar);return -EINVAL ; }
@@ -5360,7 +5360,7 @@ static void megasas_release_mfi(struct megasas_instance *instance)iounmap (instance->reg_set); -pci_release_selected_regions (instance->pdev, instance->bar); +pci_release_selected_regions (instance->pdev,1 <<instance->bar); }/**
drivers/scsi/megaraid/megaraid_sas_fusion.c +1 -1
@@ -2603,7 +2603,7 @@ megasas_release_fusion(struct megasas_instance *instance)iounmap (instance->reg_set); -pci_release_selected_regions (instance->pdev, instance->bar); +pci_release_selected_regions (instance->pdev,1 <<instance->bar); }/**
drivers/scsi/mpt3sas/mpt3sas_base.c +11 -11
@@ -2188,6 +2188,17 @@ mpt3sas_base_map_resources(struct MPT3SAS_ADAPTER *ioc) }else ioc->msix96_vector =0 ; +if (ioc->is_warpdrive) { + ioc->reply_post_host_index[0 ] = (resource_size_t __iomem *) + &ioc->chip->ReplyPostHostIndex; + +for (i =1 ; i < ioc->cpu_msix_table_sz; i++) + ioc->reply_post_host_index[i] = + (resource_size_t __iomem *) + ((u8 __iomem *)&ioc->chip->Doorbell + (0x4000 + ((i -1 ) + *4 ))); + } +list_for_each_entry (reply_q, &ioc->reply_queue_list, list) pr_info(MPT3SAS_FMT "%s: IRQ %d\n", reply_q->name, ((ioc->msix_enable) ? "PCI-MSI-X enabled" :
@@ -5280,17 +5291,6 @@ mpt3sas_base_attach(struct MPT3SAS_ADAPTER *ioc)if (r) goto out_free_resources; -if (ioc->is_warpdrive) { - ioc->reply_post_host_index[0 ] = (resource_size_t __iomem *) - &ioc->chip->ReplyPostHostIndex; - -for (i =1 ; i < ioc->cpu_msix_table_sz; i++) - ioc->reply_post_host_index[i] = - (resource_size_t __iomem *) - ((u8 __iomem *)&ioc->chip->Doorbell + (0x4000 + ((i -1 ) - *4 ))); - } -pci_set_drvdata (ioc->pdev, ioc->shost); r =_base_get_ioc_facts (ioc,CAN_SLEEP );if (r)
drivers/staging/comedi/drivers/comedi_test.c +12 -34
94 lines not on this page · raw message
drivers/staging/comedi/drivers/daqboard2000.c +1 -1
@@ -636,7 +636,7 @@ static const void *daqboard2000_find_boardinfo(struct comedi_device *dev,const struct daq200_boardtype *board;int i; -if (pcidev->subsystem_device !=PCI_VENDOR_ID_IOTECH ) +if (pcidev->subsystem_vendor !=PCI_VENDOR_ID_IOTECH )return NULL ;for (i =0 ; i <ARRAY_SIZE (boardtypes); i++) {
drivers/staging/comedi/drivers/ni_mio_common.c +10 -2
@@ -2772,7 +2772,15 @@ static int ni_ao_inttrig(struct comedi_device *dev,int i;static const int timeout =1000 ; -if (trig_num != cmd->start_arg) +/* +* Require trig_num == cmd->start_arg when cmd->start_src == TRIG_INT. +* For backwards compatibility, also allow trig_num == 0 when +* cmd->start_src != TRIG_INT (i.e. when cmd->start_src == TRIG_EXT); +* in that case, the internal trigger is being used as a pre-trigger +* before the external trigger. +*/ +if (!(trig_num == cmd->start_arg || + (trig_num ==0 && cmd->start_src !=TRIG_INT )))return -EINVAL ;/*
@@ -5480,7 +5488,7 @@ static int ni_E_init(struct comedi_device *dev, s->maxdata = (devpriv->is_m_series) ?0xffffffff :0x00ffffff ; s->insn_read = ni_tio_insn_read; - s->insn_write = ni_tio_insn_read; + s->insn_write = ni_tio_insn_write; s->insn_config = ni_tio_insn_config;#ifdef PCIDMA if (dev->irq && devpriv->mite) {
drivers/staging/lustre/lustre/llite/namei.c +24 -19
62 lines not on this page · raw message
drivers/usb/chipidea/udc.c +5 -2
@@ -1596,8 +1596,11 @@ static int ci_udc_pullup(struct usb_gadget *_gadget, int is_on) { struct ci_hdrc *ci = container_of(_gadget, struct ci_hdrc, gadget); -/* Data+ pullup controlled by OTG state machine in OTG fsm mode */ -if (ci_otg_is_fsm_mode (ci)) +/* +* Data+ pullup controlled by OTG state machine in OTG fsm mode; +* and don't touch Data+ in host mode for dual role config. +*/ +if (ci_otg_is_fsm_mode (ci) || ci->role ==CI_ROLE_HOST )return 0 ;pm_runtime_get_sync (&ci->gadget.dev);
drivers/usb/class/cdc-acm.c +2 -3
@@ -1405,7 +1405,6 @@ made_compressed_probe:spin_lock_init (&acm->write_lock);spin_lock_init (&acm->read_lock);mutex_init (&acm->mutex); - acm->rx_endpoint =usb_rcvbulkpipe (usb_dev, epread->bEndpointAddress); acm->is_int_ep =usb_endpoint_xfer_int (epread);if (acm->is_int_ep) acm->bInterval = epread->bInterval;
@@ -1445,14 +1444,14 @@ made_compressed_probe: urb->transfer_dma = rb->dma;if (acm->is_int_ep) {usb_fill_int_urb (urb, acm->dev, - acm->rx_endpoint, +usb_rcvintpipe (usb_dev, epread->bEndpointAddress), rb->base, acm->readsize, acm_read_bulk_callback, rb, acm->bInterval); }else {usb_fill_bulk_urb (urb, acm->dev, - acm->rx_endpoint, +usb_rcvbulkpipe (usb_dev, epread->bEndpointAddress), rb->base, acm->readsize, acm_read_bulk_callback, rb);
drivers/usb/class/cdc-acm.h +0 -1
@@ -96,7 +96,6 @@ struct acm {struct acm_rb read_buffers[ACM_NR ];struct acm_wb *putbuffer;/* for acm_tty_put_char() */ int rx_buflimit; -int rx_endpoint;spinlock_t read_lock;int write_used;/* number of non-empty write buffers */ int transmitting;
drivers/usb/core/config.c +63 -3
90 lines not on this page · raw message
drivers/usb/core/devio.c +13 -6
@@ -241,7 +241,8 @@ static int usbdev_mmap(struct file *file, struct vm_area_struct *vma) goto error_decrease_mem; } - mem =usb_alloc_coherent (ps->dev, size,GFP_USER , &dma_handle); + mem =usb_alloc_coherent (ps->dev, size,GFP_USER | __GFP_NOWARN, + &dma_handle);if (!mem) { ret = -ENOMEM ; goto error_free_usbm;
@@ -1708,11 +1709,17 @@ static int proc_do_submiturb(struct usb_dev_state *ps, struct usbdevfs_urb *uurb as->urb->start_frame = uurb->start_frame; as->urb->number_of_packets = number_of_packets; as->urb->stream_id = stream_id; -if (uurb->type ==USBDEVFS_URB_TYPE_ISO || - ps->dev->speed ==USB_SPEED_HIGH ) - as->urb->interval =1 <<min (15 , ep->desc.bInterval -1 ); -else - as->urb->interval = ep->desc.bInterval; + +if (ep->desc.bInterval) { +if (uurb->type ==USBDEVFS_URB_TYPE_ISO || + ps->dev->speed ==USB_SPEED_HIGH || + ps->dev->speed >=USB_SPEED_SUPER ) + as->urb->interval =1 << +min (15 , ep->desc.bInterval -1 ); +else + as->urb->interval = ep->desc.bInterval; + } + as->urb->context = as; as->urb->complete = async_completed;for (totlen = u =0 ; u < number_of_packets; u++) {
drivers/usb/core/hub.c +9 -14
@@ -1052,14 +1052,11 @@ static void hub_activate(struct usb_hub *hub, enum hub_activation_type type)/* Continue a partial initialization */ if (type ==HUB_INIT2 || type ==HUB_INIT3 ) { -device_lock (hub->intfdev); +device_lock (&hdev->dev);/* Was the hub disconnected while we were waiting? */ -if (hub->disconnected) { -device_unlock (hub->intfdev); -kref_put (&hub->kref, hub_release); -return ; - } +if (hub->disconnected) + goto disconnected;if (type ==HUB_INIT2 ) goto init2; goto init3;
@@ -1262,7 +1259,7 @@ static void hub_activate(struct usb_hub *hub, enum hub_activation_type type)queue_delayed_work (system_power_efficient_wq, &hub->init_work,msecs_to_jiffies (delay)); -device_unlock (hub->intfdev); +device_unlock (&hdev->dev);return ;/* Continues at init3: below */ }else {msleep (delay);
@@ -1281,12 +1278,12 @@ static void hub_activate(struct usb_hub *hub, enum hub_activation_type type)/* Scan all ports that need attention */ kick_hub_wq (hub); -/* Allow autosuspend if it was suppressed */ -if (type <=HUB_INIT3 ) +if (type ==HUB_INIT2 || type ==HUB_INIT3 ) { +/* Allow autosuspend if it was suppressed */ + disconnected:usb_autopm_put_interface_async (to_usb_interface (hub->intfdev)); - -if (type ==HUB_INIT2 || type ==HUB_INIT3 ) -device_unlock (hub->intfdev); +device_unlock (&hdev->dev); + }kref_put (&hub->kref, hub_release); }
@@ -1315,8 +1312,6 @@ static void hub_quiesce(struct usb_hub *hub, enum hub_quiescing_type type)struct usb_device *hdev = hub->hdev;int i; -cancel_delayed_work_sync (&hub->init_work); -/* hub_wq and related activity won't re-trigger */ hub->quiescing =1 ;
drivers/usb/dwc3/dwc3-pci.c +2 -0
@@ -37,6 +37,7 @@#define PCI_DEVICE_ID_INTEL_BXT 0x0aaa#define PCI_DEVICE_ID_INTEL_BXT_M 0x1aaa#define PCI_DEVICE_ID_INTEL_APL 0x5aaa +#define PCI_DEVICE_ID_INTEL_KBP 0xa2b0static const struct acpi_gpio_params reset_gpios = {0 ,0 , false };static const struct acpi_gpio_params cs_gpios = {1 ,0 , false };
@@ -214,6 +215,7 @@ static const struct pci_device_id dwc3_pci_id_table[] = { { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_BXT), }, { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_BXT_M), }, { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_APL), }, + { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_KBP), }, { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_NL_USB), }, { } /* Terminating Entry */ };
drivers/usb/dwc3/gadget.c +31 -11
91 lines not on this page · raw message
drivers/usb/gadget/legacy/inode.c +1 -1
@@ -542,7 +542,7 @@ static ssize_t ep_aio(struct kiocb *iocb,*/ spin_lock_irq (&epdata->dev->lock); value = -ENODEV ; -if (unlikely (epdata->ep)) +if (unlikely (epdata->ep ==NULL )) goto fail; req =usb_ep_alloc_request (epdata->ep,GFP_ATOMIC );
drivers/usb/gadget/udc/fsl_qe_udc.c +1 -1
@@ -2053,7 +2053,7 @@ static void setup_received_handle(struct qe_udc *udc,struct qe_ep *ep;if (wValue !=0 || wLength !=0 - || pipe >USB_MAX_ENDPOINTS ) + || pipe >=USB_MAX_ENDPOINTS )break ; ep = &udc->eps[pipe];
drivers/usb/gadget/udc/udc-core.c +1 -1
@@ -106,7 +106,7 @@ void usb_gadget_unmap_request_by_dev(struct device *dev,return ;if (req->num_mapped_sgs) { -dma_unmap_sg (dev, req->sg, req->num_mapped_sgs, +dma_unmap_sg (dev, req->sg, req->num_sgs, is_in ?DMA_TO_DEVICE :DMA_FROM_DEVICE ); req->num_mapped_sgs =0 ;
drivers/usb/host/ehci-hcd.c +2 -2
@@ -332,11 +332,11 @@ static void ehci_turn_off_all_ports(struct ehci_hcd *ehci)int port =HCS_N_PORTS (ehci->hcs_params);while (port--) { -ehci_writel (ehci,PORT_RWC_BITS , - &ehci->regs->port_status[port]);spin_unlock_irq (&ehci->lock);ehci_port_power (ehci, port, false);spin_lock_irq (&ehci->lock); +ehci_writel (ehci,PORT_RWC_BITS , + &ehci->regs->port_status[port]); } }
drivers/usb/host/xhci-hub.c +3 -0
@@ -386,6 +386,9 @@ static int xhci_stop_device(struct xhci_hcd *xhci, int slot_id, int suspend) ret =0 ; virt_dev = xhci->devs[slot_id]; +if (!virt_dev) +return -ENODEV ; + cmd =xhci_alloc_command (xhci, false, true,GFP_NOIO );if (!cmd) {xhci_dbg (xhci,"Couldn't allocate command structure.\n" );
drivers/usb/host/xhci-pci.c +2 -1
@@ -314,11 +314,12 @@ static void xhci_pci_remove(struct pci_dev *dev)usb_remove_hcd (xhci->shared_hcd);usb_put_hcd (xhci->shared_hcd); } -usb_hcd_pci_remove (dev);/* Workaround for spurious wakeups at shutdown with HSW */ if (xhci->quirks &XHCI_SPURIOUS_WAKEUP )pci_set_power_state (dev, PCI_D3hot); + +usb_hcd_pci_remove (dev); }#ifdef CONFIG_PM
drivers/usb/host/xhci-ring.c +7 -6
@@ -1325,12 +1325,6 @@ static void handle_cmd_completion(struct xhci_hcd *xhci, cmd = list_entry(xhci->cmd_list.next, struct xhci_command, cmd_list); -if (cmd->command_trb != xhci->cmd_ring->dequeue) { -xhci_err (xhci, -"Command completion event does not match command\n" ); -return ; - } -del_timer (&xhci->cmd_timer);trace_xhci_cmd_completion (cmd_trb, (struct xhci_generic_trb *) event);
@@ -1342,6 +1336,13 @@ static void handle_cmd_completion(struct xhci_hcd *xhci,xhci_handle_stopped_cmd_ring (xhci, cmd);return ; } + +if (cmd->command_trb != xhci->cmd_ring->dequeue) { +xhci_err (xhci, +"Command completion event does not match command\n" ); +return ; + } +/* * Host aborted the command ring, check if the current command was * supposed to be aborted, otherwise continue normally.
drivers/usb/misc/usbtest.c +5 -4
@@ -585,7 +585,6 @@ static void sg_timeout(unsigned long _req) {struct usb_sg_request *req = (struct usb_sg_request *) _req; - req->status = -ETIMEDOUT ;usb_sg_cancel (req); }
@@ -616,8 +615,10 @@ static int perform_sglist(mod_timer (&sg_timer, jiffies +msecs_to_jiffies (SIMPLE_IO_TIMEOUT ));usb_sg_wait (req); -del_timer_sync (&sg_timer); - retval = req->status; +if (!del_timer_sync (&sg_timer)) + retval = -ETIMEDOUT ; +else + retval = req->status;/* FIXME check resulting data pattern */
@@ -2602,7 +2603,7 @@ usbtest_ioctl(struct usb_interface *intf, unsigned int code, void *buf)ktime_get_ts64 (&start); retval =usbtest_do_ioctl (intf, param_32); -if (retval) +if (retval <0 ) goto free_mutex;ktime_get_ts64 (&end);
drivers/usb/renesas_usbhs/common.c +2 -1
@@ -514,7 +514,8 @@ static struct renesas_usbhs_platform_info *usbhs_parse_dt(struct device *dev)if (gpio >0 ) dparam->enable_gpio = gpio; -if (dparam->type ==USBHS_TYPE_RCAR_GEN2 ) +if (dparam->type ==USBHS_TYPE_RCAR_GEN2 || + dparam->type ==USBHS_TYPE_RCAR_GEN3 ) dparam->has_usb_dmac =1 ;return info;
drivers/usb/renesas_usbhs/fifo.c +2 -2
@@ -871,7 +871,7 @@ static int usbhsf_dma_prepare_push(struct usbhs_pkt *pkt, int *is_done)/* use PIO if packet is less than pio_dma_border or pipe is DCP */ if ((len <usbhs_get_dparam (priv, pio_dma_border)) || -usbhs_pipe_is_dcp (pipe)) +usbhs_pipe_type_is (pipe,USB_ENDPOINT_XFER_ISOC )) goto usbhsf_pio_prepare_push;/* check data length if this driver don't use USB-DMAC */
@@ -976,7 +976,7 @@ static int usbhsf_dma_prepare_pop_with_usb_dmac(struct usbhs_pkt *pkt,/* use PIO if packet is less than pio_dma_border or pipe is DCP */ if ((pkt->length <usbhs_get_dparam (priv, pio_dma_border)) || -usbhs_pipe_is_dcp (pipe)) +usbhs_pipe_type_is (pipe,USB_ENDPOINT_XFER_ISOC )) goto usbhsf_pio_prepare_pop; fifo =usbhsf_get_dma_fifo (priv, pkt);
drivers/usb/renesas_usbhs/mod_gadget.c +6 -3
@@ -617,10 +617,13 @@ static int usbhsg_ep_enable(struct usb_ep *ep,* use dmaengine if possible. * It will use pio handler if impossible. */ -if (usb_endpoint_dir_in (desc)) +if (usb_endpoint_dir_in (desc)) { pipe->handler = &usbhs_fifo_dma_push_handler; -else + }else { pipe->handler = &usbhs_fifo_dma_pop_handler; +usbhs_xxxsts_clear (priv,BRDYSTS , +usbhs_pipe_number (pipe)); + } ret =0 ; }
@@ -1073,7 +1076,7 @@ int usbhs_mod_gadget_probe(struct usbhs_priv *priv) gpriv->transceiver =usb_get_phy (USB_PHY_TYPE_UNDEFINED );dev_info (dev,"%stransceiver found\n" , - gpriv->transceiver ?"" :"no " ); + !IS_ERR (gpriv->transceiver) ?"" :"no " );/* * CAUTION
drivers/usb/serial/ftdi_sio.c +3 -0
@@ -648,6 +648,8 @@ static const struct usb_device_id id_table_combined[] = { { USB_DEVICE(FTDI_VID, FTDI_ELV_TFD128_PID) }, { USB_DEVICE(FTDI_VID, FTDI_ELV_FM3RX_PID) }, { USB_DEVICE(FTDI_VID, FTDI_ELV_WS777_PID) }, + { USB_DEVICE(FTDI_VID, FTDI_PALMSENS_PID) }, + { USB_DEVICE(FTDI_VID, FTDI_IVIUM_XSTAT_PID) }, { USB_DEVICE(FTDI_VID, LINX_SDMUSBQSS_PID) }, { USB_DEVICE(FTDI_VID, LINX_MASTERDEVEL2_PID) }, { USB_DEVICE(FTDI_VID, LINX_FUTURE_0_PID) },
@@ -1008,6 +1010,7 @@ static const struct usb_device_id id_table_combined[] = { { USB_DEVICE(ICPDAS_VID, ICPDAS_I7560U_PID) }, { USB_DEVICE(ICPDAS_VID, ICPDAS_I7561U_PID) }, { USB_DEVICE(ICPDAS_VID, ICPDAS_I7563U_PID) }, + { USB_DEVICE(WICED_VID, WICED_USB20706V2_PID) }, { } /* Terminating entry */ };
drivers/usb/serial/ftdi_sio_ids.h +12 -0
@@ -406,6 +406,12 @@#define FTDI_4N_GALAXY_DE_3_PID 0xF3C2/* +* Ivium Technologies product IDs +*/ +#define FTDI_PALMSENS_PID 0xf440 +#define FTDI_IVIUM_XSTAT_PID 0xf441 + +/* * Linx Technologies product ids */ #define LINX_SDMUSBQSS_PID 0xF448/* Linx SDM-USB-QS-S */
@@ -673,6 +679,12 @@#define INTREPID_NEOVI_PID 0x0701/* +* WICED USB UART +*/ +#define WICED_VID 0x0A5C +#define WICED_USB20706V2_PID 0x6422 + +/* * Definitions for ID TECH (www.idt-net.com) devices */ #define IDTECH_VID 0x0ACD/* ID TECH Vendor ID */
drivers/usb/serial/mos7720.c +1 -1
@@ -1252,7 +1252,7 @@ static int mos7720_write(struct tty_struct *tty, struct usb_serial_port *port,if (urb->transfer_buffer ==NULL ) { urb->transfer_buffer =kmalloc (URB_TRANSFER_BUFFER_SIZE , -GFP_KERNEL ); +GFP_ATOMIC );if (!urb->transfer_buffer) goto exit; }
drivers/usb/serial/mos7840.c +2 -2
@@ -1340,8 +1340,8 @@ static int mos7840_write(struct tty_struct *tty, struct usb_serial_port *port, }if (urb->transfer_buffer ==NULL ) { - urb->transfer_buffer = -kmalloc (URB_TRANSFER_BUFFER_SIZE ,GFP_KERNEL ); + urb->transfer_buffer =kmalloc (URB_TRANSFER_BUFFER_SIZE , +GFP_ATOMIC );if (!urb->transfer_buffer) goto exit; }
drivers/usb/serial/option.c +31 -0
@@ -274,6 +274,12 @@ static void option_instat_callback(struct urb *urb);#define TELIT_PRODUCT_LE920 0x1200#define TELIT_PRODUCT_LE910 0x1201#define TELIT_PRODUCT_LE910_USBCFG4 0x1206 +#define TELIT_PRODUCT_LE920A4_1207 0x1207 +#define TELIT_PRODUCT_LE920A4_1208 0x1208 +#define TELIT_PRODUCT_LE920A4_1211 0x1211 +#define TELIT_PRODUCT_LE920A4_1212 0x1212 +#define TELIT_PRODUCT_LE920A4_1213 0x1213 +#define TELIT_PRODUCT_LE920A4_1214 0x1214/* ZTE PRODUCTS */ #define ZTE_VENDOR_ID 0x19d2
@@ -519,6 +525,12 @@ static void option_instat_callback(struct urb *urb);#define VIATELECOM_VENDOR_ID 0x15eb#define VIATELECOM_PRODUCT_CDS7 0x0001 +/* WeTelecom products */ +#define WETELECOM_VENDOR_ID 0x22de +#define WETELECOM_PRODUCT_WMD200 0x6801 +#define WETELECOM_PRODUCT_6802 0x6802 +#define WETELECOM_PRODUCT_WMD300 0x6803 +struct option_blacklist_info {/* bitmask of interface numbers blacklisted for send_setup */ const unsigned long sendsetup;
@@ -628,6 +640,11 @@ static const struct option_blacklist_info telit_le920_blacklist = { .reserved = BIT(1) | BIT(5), }; +static const struct option_blacklist_info telit_le920a4_blacklist_1 = { + .sendsetup =BIT (0 ), + .reserved =BIT (1 ), +}; +static const struct option_blacklist_info telit_le922_blacklist_usbcfg0 = { .sendsetup =BIT (2 ), .reserved =BIT (0 ) |BIT (1 ) |BIT (3 ),
@@ -1203,6 +1220,16 @@ static const struct usb_device_id option_ids[] = { .driver_info = (kernel_ulong_t)&telit_le922_blacklist_usbcfg3 }, { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_LE920), .driver_info = (kernel_ulong_t)&telit_le920_blacklist }, + { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_LE920A4_1207) }, + { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_LE920A4_1208), + .driver_info = (kernel_ulong_t)&telit_le920a4_blacklist_1 }, + { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_LE920A4_1211), + .driver_info = (kernel_ulong_t)&telit_le922_blacklist_usbcfg3 }, + { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_LE920A4_1212), + .driver_info = (kernel_ulong_t)&telit_le920a4_blacklist_1 }, + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, TELIT_PRODUCT_LE920A4_1213, 0xff) }, + { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_LE920A4_1214), + .driver_info = (kernel_ulong_t)&telit_le922_blacklist_usbcfg3 }, { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_MF622, 0xff, 0xff, 0xff) }, /* ZTE WCDMA products */ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0002, 0xff, 0xff, 0xff), .driver_info = (kernel_ulong_t)&net_intf1_blacklist },
@@ -1966,9 +1993,13 @@ static const struct usb_device_id option_ids[] = { .driver_info = (kernel_ulong_t)&net_intf4_blacklist }, { USB_DEVICE_AND_INTERFACE_INFO(0x07d1, 0x3e01, 0xff, 0xff, 0xff) }, /* D-Link DWM-152/C1 */ { USB_DEVICE_AND_INTERFACE_INFO(0x07d1, 0x3e02, 0xff, 0xff, 0xff) }, /* D-Link DWM-156/C1 */ + { USB_DEVICE_AND_INTERFACE_INFO(0x07d1, 0x7e11, 0xff, 0xff, 0xff) }, /* D-Link DWM-156/A3 */ { USB_DEVICE_INTERFACE_CLASS(0x2020, 0x4000, 0xff) }, /* OLICARD300 - MT6225 */ { USB_DEVICE(INOVIA_VENDOR_ID, INOVIA_SEW858) }, { USB_DEVICE(VIATELECOM_VENDOR_ID, VIATELECOM_PRODUCT_CDS7) }, + { USB_DEVICE_AND_INTERFACE_INFO(WETELECOM_VENDOR_ID, WETELECOM_PRODUCT_WMD200, 0xff, 0xff, 0xff) }, + { USB_DEVICE_AND_INTERFACE_INFO(WETELECOM_VENDOR_ID, WETELECOM_PRODUCT_6802, 0xff, 0xff, 0xff) }, + { USB_DEVICE_AND_INTERFACE_INFO(WETELECOM_VENDOR_ID, WETELECOM_PRODUCT_WMD300, 0xff, 0xff, 0xff) }, { } /* Terminating entry */ };MODULE_DEVICE_TABLE (usb, option_ids);
drivers/usb/serial/usb-serial.c +3 -1
@@ -1433,7 +1433,7 @@ int usb_serial_register_drivers(struct usb_serial_driver *const serial_drivers[] rc =usb_register (udriver);if (rc) -return rc; + goto failed_usb_register;for (sd = serial_drivers; *sd; ++sd) { (*sd)->usb_driver = udriver;
@@ -1451,6 +1451,8 @@ int usb_serial_register_drivers(struct usb_serial_driver *const serial_drivers[]while (sd-- > serial_drivers)usb_serial_deregister (*sd);usb_deregister (udriver); +failed_usb_register: +kfree (udriver);return rc; }EXPORT_SYMBOL_GPL (usb_serial_register_drivers);
drivers/vfio/pci/vfio_pci_intrs.c +49 -36
116 lines not on this page · raw message
drivers/virtio/virtio_ring.c +2 -0
@@ -316,6 +316,8 @@ static inline int virtqueue_add(struct virtqueue *_vq,* host should service the ring ASAP. */ if (out_sgs) vq->notify (&vq->vq); +if (indirect) +kfree (desc);END_USE (vq);return -ENOSPC ; }
fs/btrfs/ctree.h +1 -0
@@ -1040,6 +1040,7 @@ struct btrfs_fs_info {struct btrfs_workqueue *qgroup_rescan_workers;struct completion qgroup_rescan_completion;struct btrfs_work qgroup_rescan_work; +bool qgroup_rescan_running;/* protected by qgroup_rescan_lock */ /* filesystem state */ unsigned long fs_state;
fs/btrfs/disk-io.c +4 -3
@@ -1626,8 +1626,8 @@ fail:return ret; } -static struct btrfs_root *btrfs_lookup_fs_root (struct btrfs_fs_info *fs_info, -u64 root_id) +struct btrfs_root *btrfs_lookup_fs_root (struct btrfs_fs_info *fs_info, +u64 root_id) {struct btrfs_root *root;
@@ -2306,6 +2306,7 @@ static void btrfs_init_qgroup(struct btrfs_fs_info *fs_info) fs_info->quota_enabled =0 ; fs_info->pending_quota_state =0 ; fs_info->qgroup_ulist =NULL ; + fs_info->qgroup_rescan_running = false;mutex_init (&fs_info->qgroup_rescan_lock); }
@@ -3849,7 +3850,7 @@ void close_ctree(struct btrfs_root *root)smp_mb ();/* wait for the qgroup rescan worker to stop */ -btrfs_qgroup_wait_for_completion (fs_info); +btrfs_qgroup_wait_for_completion (fs_info, false);/* wait for the uuid_scan task to finish */ down (&fs_info->uuid_tree_rescan_sem);
fs/btrfs/disk-io.h +2 -0
@@ -68,6 +68,8 @@ struct extent_buffer *btrfs_find_tree_block(struct btrfs_fs_info *fs_info,struct btrfs_root *btrfs_read_fs_root (struct btrfs_root *tree_root,struct btrfs_key *location);int btrfs_init_fs_root (struct btrfs_root *root); +struct btrfs_root *btrfs_lookup_fs_root (struct btrfs_fs_info *fs_info, +u64 root_id);int btrfs_insert_fs_root (struct btrfs_fs_info *fs_info,struct btrfs_root *root);void btrfs_free_fs_roots (struct btrfs_fs_info *fs_info);
fs/btrfs/ioctl.c +1 -1
@@ -5088,7 +5088,7 @@ static long btrfs_ioctl_quota_rescan_wait(struct file *file, void __user *arg)if (!capable (CAP_SYS_ADMIN ))return -EPERM ; -return btrfs_qgroup_wait_for_completion (root->fs_info); +return btrfs_qgroup_wait_for_completion (root->fs_info, true); } static long _btrfs_ioctl_set_received_subvol(struct file *file,
fs/btrfs/qgroup.c +17 -4
@@ -995,7 +995,7 @@ int btrfs_quota_disable(struct btrfs_trans_handle *trans, goto out; fs_info->quota_enabled =0 ; fs_info->pending_quota_state =0 ; -btrfs_qgroup_wait_for_completion (fs_info); +btrfs_qgroup_wait_for_completion (fs_info, false);spin_lock (&fs_info->qgroup_lock); quota_root = fs_info->quota_root; fs_info->quota_root =NULL ;
@@ -2302,6 +2302,10 @@ static void btrfs_qgroup_rescan_worker(struct btrfs_work *work)int err = -ENOMEM ;int ret =0 ; +mutex_lock (&fs_info->qgroup_rescan_lock); + fs_info->qgroup_rescan_running = true; +mutex_unlock (&fs_info->qgroup_rescan_lock); + path =btrfs_alloc_path ();if (!path) goto out;
@@ -2368,6 +2372,9 @@ out: } done: +mutex_lock (&fs_info->qgroup_rescan_lock); + fs_info->qgroup_rescan_running = false; +mutex_unlock (&fs_info->qgroup_rescan_lock);complete_all (&fs_info->qgroup_rescan_completion); }
@@ -2486,20 +2493,26 @@ btrfs_qgroup_rescan(struct btrfs_fs_info *fs_info)return 0 ; } -int btrfs_qgroup_wait_for_completion (struct btrfs_fs_info *fs_info) +int btrfs_qgroup_wait_for_completion (struct btrfs_fs_info *fs_info, +bool interruptible) {int running;int ret =0 ;mutex_lock (&fs_info->qgroup_rescan_lock);spin_lock (&fs_info->qgroup_lock); - running = fs_info->qgroup_flags &BTRFS_QGROUP_STATUS_FLAG_RESCAN ; + running = fs_info->qgroup_rescan_running;spin_unlock (&fs_info->qgroup_lock);mutex_unlock (&fs_info->qgroup_rescan_lock); -if (running) +if (!running) +return 0 ; + +if (interruptible) ret =wait_for_completion_interruptible ( &fs_info->qgroup_rescan_completion); +else +wait_for_completion (&fs_info->qgroup_rescan_completion);return ret; }
fs/btrfs/qgroup.h +2 -1
@@ -46,7 +46,8 @@ int btrfs_quota_disable(struct btrfs_trans_handle *trans, struct btrfs_fs_info *fs_info);int btrfs_qgroup_rescan (struct btrfs_fs_info *fs_info);void btrfs_qgroup_rescan_resume (struct btrfs_fs_info *fs_info); -int btrfs_qgroup_wait_for_completion (struct btrfs_fs_info *fs_info); +int btrfs_qgroup_wait_for_completion (struct btrfs_fs_info *fs_info, +bool interruptible);int btrfs_add_qgroup_relation (struct btrfs_trans_handle *trans,struct btrfs_fs_info *fs_info,u64 src,u64 dst); int btrfs_del_qgroup_relation(struct btrfs_trans_handle *trans,
fs/btrfs/root-tree.c +18 -9
@@ -272,6 +272,23 @@ int btrfs_find_orphan_roots(struct btrfs_root *tree_root) root_key.objectid = key.offset; key.offset++; +/* +* The root might have been inserted already, as before we look +* for orphan roots, log replay might have happened, which +* triggers a transaction commit and qgroup accounting, which +* in turn reads and inserts fs roots while doing backref +* walking. +*/ + root =btrfs_lookup_fs_root (tree_root->fs_info, + root_key.objectid); +if (root) { +WARN_ON (!test_bit (BTRFS_ROOT_ORPHAN_ITEM_INSERTED , + &root->state)); +if (btrfs_root_refs (&root->root_item) ==0 ) +btrfs_add_dead_root (root); +continue ; + } + root =btrfs_read_fs_root (tree_root, &root_key); err =PTR_ERR_OR_ZERO (root);if (err && err != -ENOENT ) {
@@ -310,16 +327,8 @@ int btrfs_find_orphan_roots(struct btrfs_root *tree_root)set_bit (BTRFS_ROOT_ORPHAN_ITEM_INSERTED , &root->state); err =btrfs_insert_fs_root (root->fs_info, root); -/* -* The root might have been inserted already, as before we look -* for orphan roots, log replay might have happened, which -* triggers a transaction commit and qgroup accounting, which -* in turn reads and inserts fs roots while doing backref -* walking. -*/ -if (err == -EEXIST ) - err =0 ;if (err) { +BUG_ON (err == -EEXIST );btrfs_free_fs_root (root);break ; }
fs/seq_file.c +3 -1
@@ -223,8 +223,10 @@ ssize_t seq_read(struct file *file, char __user *buf, size_t size, loff_t *ppos) size -= n; buf += n; copied += n; -if (!m->count) +if (!m->count) { + m->from =0 ; m->index++; + }if (!size) goto Done; }
fs/sysfs/file.c +7 -1
@@ -114,9 +114,15 @@ static ssize_t sysfs_kf_read(struct kernfs_open_file *of, char *buf,* If buf != of->prealloc_buf, we don't know how * large it is, so cannot safely pass it to ->show */ -if (pos ||WARN_ON_ONCE (buf != of->prealloc_buf)) +if (WARN_ON_ONCE (buf != of->prealloc_buf))return 0 ; len = ops->show (kobj, of->kn->priv, buf); +if (pos) { +if (len <= pos) +return 0 ; + len -= pos; +memmove (buf, buf + pos, len); + }return min (count, len); }
include/linux/acpi.h +1 -1
@@ -985,7 +985,7 @@ static inline struct fwnode_handle *acpi_get_next_subnode(struct device *dev,return NULL ; } -#define ACPI_DECLARE_PROBE_ENTRY (table, name, table_id, subtable, validate, data, fn) \ +#define ACPI_DECLARE_PROBE_ENTRY (table, name, table_id, subtable, valid, data, fn) \ static const void * __acpi_table_##name[] \ __attribute__((unused)) \ = { (void *) table_id, \
include/linux/i8042.h +0 -6
@@ -62,7 +62,6 @@ struct serio;void i8042_lock_chip (void );void i8042_unlock_chip (void );int i8042_command (unsigned char *param,int command); -bool i8042_check_port_owner (const struct serio *);int i8042_install_filter (bool (*filter)(unsigned char data,unsigned char str,struct serio *serio)); int i8042_remove_filter(bool (*filter)(unsigned char data, unsigned char str,
@@ -83,11 +82,6 @@ static inline int i8042_command(unsigned char *param, int command)return -ENODEV ; } -static inline bool i8042_check_port_owner (const struct serio *serio) -{ -return false; -} -static inline int i8042_install_filter (bool (*filter)(unsigned char data,unsigned char str,struct serio *serio)) {
include/linux/mfd/cros_ec.h +15 -0
@@ -226,6 +226,21 @@ int cros_ec_cmd_xfer(struct cros_ec_device *ec_dev, struct cros_ec_command *msg);/** +* cros_ec_cmd_xfer_status - Send a command to the ChromeOS EC +* +* This function is identical to cros_ec_cmd_xfer, except it returns success +* status only if both the command was transmitted successfully and the EC +* replied with success status. It's not necessary to check msg->result when +* using this function. +* +* @ec_dev: EC device +* @msg: Message to write +* @return: Num. of bytes transferred on success, <0 on failure +*/ +int cros_ec_cmd_xfer_status (struct cros_ec_device *ec_dev, +struct cros_ec_command *msg); + +/** * cros_ec_remove - Remove a ChromeOS EC * * Call this to deregister a ChromeOS EC, then clean up any private data.
include/linux/msi.h +4 -4
@@ -264,12 +264,12 @@ enum {* callbacks. */ MSI_FLAG_USE_DEF_CHIP_OPS = (1 <<1 ), -/* Build identity map between hwirq and irq */ -MSI_FLAG_IDENTITY_MAP = (1 <<2 ),/* Support multiple PCI MSI interrupts */ -MSI_FLAG_MULTI_PCI_MSI = (1 <<3 ), +MSI_FLAG_MULTI_PCI_MSI = (1 <<2 ),/* Support PCI MSIX interrupts */ - MSI_FLAG_PCI_MSIX = (1 << 4), +MSI_FLAG_PCI_MSIX = (1 <<3 ), +/* Needs early activate, required for PCI */ + MSI_FLAG_ACTIVATE_EARLY = (1 << 4), }; int msi_domain_set_affinity(struct irq_data *data, const struct cpumask *mask,
include/linux/serio.h +19 -5
@@ -31,7 +31,8 @@ struct serio {struct serio_device_id id; -spinlock_t lock;/* protects critical sections from port's interrupt handler */ +/* Protects critical sections from port's interrupt handler */ +spinlock_t lock;int (*write)(struct serio *,unsigned char );int (*open)(struct serio *);
@@ -40,16 +41,29 @@ struct serio {void (*stop)(struct serio *);struct serio *parent; -struct list_head child_node;/* Entry in parent->children list */ +/* Entry in parent->children list */ +struct list_head child_node;struct list_head children; -unsigned int depth;/* level of nesting in serio hierarchy */ +/* Level of nesting in serio hierarchy */ +unsigned int depth; -struct serio_driver *drv;/* accessed from interrupt, must be protected by serio->lock and serio->sem */ -struct mutex drv_mutex;/* protects serio->drv so attributes can pin driver */
Lines of this file are not shown. View the raw message.
kernel/events/core.c +48 -12
60 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.