Skip to contentSkip to conversation

Linux 4.6.5

DISCUSSION Greg KH 1 participant 2 messages Jul 27, 2016 Stable branch

lore
Share & tools
lore

Greg KH

author maintainer
#0 lore raw

I'm announcing the release of the 4.6.5 kernel.

All users of the 4.6 kernel series must upgrade.

The updated 4.6.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.6.y
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary

thanks,

greg k-h

------------

 Documentation/ABI/testing/sysfs-bus-iio-proximity-as3935    |    2 
 Documentation/scsi/scsi_eh.txt                              |    8 -
 Makefile                                                    |    2 
 arch/arm/boot/dts/armada-385-linksys.dtsi                   |    4 
 arch/arm/boot/dts/sun5i-r8-chip.dts                         |    2 
 arch/arm/boot/dts/sun6i-a31s-primo81.dts                    |    2 
 arch/arm/boot/dts/sun6i-a31s-yones-toptech-bs1078-v2.dts    |    2 
 arch/arm/include/asm/pgtable-2level.h                       |    1 
 arch/arm/include/asm/pgtable-3level.h                       |    5 
 arch/arm/include/asm/pgtable.h                              |    1 
 arch/arm/kvm/arm.c                                          |    1 
 arch/arm/mach-imx/mach-imx6ul.c                             |    2 
 arch/arm/mach-mvebu/coherency.c                             |   22 +--
 arch/arm64/include/asm/ptrace.h                             |    2 
 arch/arm64/kernel/asm-offsets.c                             |    1 
 arch/arm64/kernel/entry.S                                   |   19 ++
 arch/arm64/kernel/traps.c                                   |   26 +--
 arch/arm64/mm/fault.c                                       |    3 
 arch/arm64/mm/flush.c                                       |    4 
 arch/mips/include/asm/kvm_host.h                            |    1 
 arch/mips/kvm/interrupt.h                                   |    1 
 arch/mips/kvm/locore.S                                      |    1 
 arch/mips/kvm/mips.c                                        |   11 +
 arch/powerpc/kernel/process.c                               |   10 +
 arch/powerpc/kernel/prom_init.c                             |    2 
 arch/powerpc/platforms/pseries/iommu.c                      |   24 +--
 arch/s390/include/asm/fpu/api.h                             |    2 
 arch/s390/kernel/ipl.c                                      |    7 -
 arch/s390/mm/pgtable.c                                      |    2 
 arch/x86/boot/Makefile                                      |    3 
 arch/x86/events/core.c                                      |   11 -
 arch/x86/events/intel/rapl.c                                |    2 
 arch/x86/include/asm/msr.h                                  |    4 
 arch/x86/kernel/amd_nb.c                                    |    4 
 arch/x86/kernel/kprobes/core.c                              |   12 +
 arch/x86/kvm/vmx.c                                          |   38 +++--
 crypto/rsa-pkcs1pad.c                                       |    4 
 drivers/ata/libata-eh.c                                     |    2 
 drivers/base/module.c                                       |    8 -
 drivers/char/ipmi/ipmi_msghandler.c                         |    8 -
 drivers/crypto/qat/qat_common/Makefile                      |    1 
 drivers/edac/edac_mc.c                                      |    3 
 drivers/edac/sb_edac.c                                      |   13 +
 drivers/extcon/extcon-palmas.c                              |    2 
 drivers/gpio/gpio-sch.c                                     |   21 +--
 drivers/gpio/gpiolib-legacy.c                               |    8 -
 drivers/gpio/gpiolib.c                                      |   66 ++++-----
 drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c                     |    2 
 drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c                     |    3 
 drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c                       |    2 
 drivers/gpu/drm/amd/amdkfd/kfd_process.c                    |   70 ++++++----
 drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c       |    6 
 drivers/gpu/drm/amd/powerplay/hwmgr/pp_acpi.c               |   18 ++
 drivers/gpu/drm/amd/powerplay/hwmgr/tonga_hwmgr.c           |    2 
 drivers/gpu/drm/amd/powerplay/hwmgr/tonga_processpptables.c |    2 
 drivers/gpu/drm/amd/powerplay/inc/pp_acpi.h                 |    1 
 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c             |    2 
 drivers/gpu/drm/drm_atomic.c                                |   30 ++++
 drivers/gpu/drm/drm_crtc.c                                  |    2 
 drivers/gpu/drm/drm_dp_mst_topology.c                       |    8 -
 drivers/gpu/drm/drm_fb_cma_helper.c                         |    2 
 drivers/gpu/drm/drm_gem_cma_helper.c                        |   12 -
 drivers/gpu/drm/drm_modes.c                                 |    2 
 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c                   |    3 
 drivers/gpu/drm/i915/i915_gem_shrinker.c                    |    2 
 drivers/gpu/drm/i915/intel_display.c                        |   48 +++++--
 drivers/gpu/drm/i915/intel_dp.c                             |   11 -
 drivers/gpu/drm/i915/intel_dp_link_training.c               |   25 ---
 drivers/gpu/drm/i915/intel_drv.h                            |    2 
 drivers/gpu/drm/i915/intel_fbc.c                            |    3 
 drivers/gpu/drm/mgag200/mgag200_mode.c                      |   10 +
 drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/disp.h     |    5 
 drivers/gpu/drm/nouveau/nouveau_fbcon.c                     |    2 
 drivers/gpu/drm/nouveau/nv04_fbcon.c                        |    7 -
 drivers/gpu/drm/nouveau/nv50_fbcon.c                        |    6 
 drivers/gpu/drm/nouveau/nvc0_fbcon.c                        |    6 
 drivers/gpu/drm/nouveau/nvkm/engine/device/pci.c            |    2 
 drivers/gpu/drm/nouveau/nvkm/engine/disp/Kbuild             |    1 
 drivers/gpu/drm/nouveau/nvkm/engine/disp/gf119.c            |   13 -
 drivers/gpu/drm/nouveau/nvkm/engine/disp/gm107.c            |    2 
 drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.c             |   12 -
 drivers/gpu/drm/nouveau/nvkm/engine/disp/outpdp.h           |    9 +
 drivers/gpu/drm/nouveau/nvkm/engine/disp/sorgf119.c         |    6 
 drivers/gpu/drm/nouveau/nvkm/engine/disp/sorgm107.c         |   53 +++++++
 drivers/gpu/drm/nouveau/nvkm/engine/disp/sorgm200.c         |   15 --
 drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c              |   37 ++++-
 drivers/gpu/drm/nouveau/nvkm/subdev/bios/disp.c             |    8 -
 drivers/gpu/drm/nouveau/nvkm/subdev/ltc/gm107.c             |    6 
 drivers/gpu/drm/nouveau/nvkm/subdev/ltc/gm200.c             |    2 
 drivers/gpu/drm/radeon/radeon_device.c                      |   21 +++
 drivers/gpu/drm/ttm/ttm_bo.c                                |    7 -
 drivers/gpu/drm/vmwgfx/vmwgfx_dmabuf.c                      |   25 +++
 drivers/gpu/drm/vmwgfx/vmwgfx_drv.c                         |   12 +
 drivers/gpu/drm/vmwgfx/vmwgfx_drv.h                         |    1 
 drivers/gpu/drm/vmwgfx/vmwgfx_fb.c                          |   47 +++----
 drivers/gpu/drm/vmwgfx/vmwgfx_kms.c                         |   10 -
 drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c                        |    8 -
 drivers/hid/hid-elo.c                                       |    2 
 drivers/hid/hid-multitouch.c                                |   21 ++-
 drivers/hid/usbhid/hiddev.c                                 |   10 -
 drivers/hwmon/dell-smm-hwmon.c                              |   80 ++++++++----
 drivers/iio/accel/kxsd9.c                                   |    4 
 drivers/iio/adc/ad7266.c                                    |    7 -
 drivers/iio/humidity/hdc100x.c                              |   20 +--
 drivers/iio/industrialio-trigger.c                          |   23 ++-
 drivers/iio/light/apds9960.c                                |    1 
 drivers/iio/pressure/st_pressure_core.c                     |   80 +++++++-----
 drivers/iio/proximity/as3935.c                              |   17 +-
 drivers/infiniband/core/cm.c                                |    4 
 drivers/infiniband/hw/mlx4/ah.c                             |    2 
 drivers/infiniband/sw/rdmavt/qp.c                           |    4 
 drivers/iommu/amd_iommu_init.c                              |   14 +-
 drivers/iommu/arm-smmu-v3.c                                 |    1 
 drivers/iommu/intel-iommu.c                                 |   17 +-
 drivers/iommu/rockchip-iommu.c                              |    2 
 drivers/irqchip/irq-mips-gic.c                              |   12 +
 drivers/media/usb/uvc/uvc_v4l2.c                            |   39 ++---
 drivers/memory/omap-gpmc.c                                  |    2 
 drivers/mtd/ubi/eba.c                                       |   22 ++-
 drivers/net/geneve.c                                        |    9 +
 drivers/net/macsec.c                                        |    1 
 drivers/net/usb/cdc_ncm.c                                   |    7 +
 drivers/net/wireless/mac80211_hwsim.c                       |    1 
 drivers/net/wireless/realtek/rtlwifi/core.c                 |    6 
 drivers/of/irq.c                                            |   19 +-
 drivers/pci/vc.c                                            |    4 
 drivers/regulator/qcom_smd-regulator.c                      |   14 +-
 drivers/scsi/53c700.c                                       |    4 
 drivers/scsi/scsi_error.c                                   |    4 
 drivers/scsi/sd.c                                           |    8 -
 drivers/scsi/sd.h                                           |    5 
 drivers/staging/iio/accel/sca3000_core.c                    |    2 
 drivers/thermal/cpu_cooling.c                               |   16 +-
 drivers/tty/vt/keyboard.c                                   |   30 +---
 drivers/tty/vt/vt.c                                         |    1 
 drivers/usb/common/usb-otg-fsm.c                            |    2 
 drivers/usb/core/hcd.c                                      |   17 +-
 drivers/usb/dwc2/core.h                                     |   27 ++++
 drivers/virtio/virtio_balloon.c                             |   20 +--
 drivers/xen/balloon.c                                       |   28 +---
 drivers/xen/xen-acpi-processor.c                            |   35 -----
 fs/btrfs/ctree.c                                            |    5 
 fs/btrfs/extent-tree.c                                      |    2 
 fs/btrfs/super.c                                            |    2 
 fs/btrfs/transaction.h                                      |    2 
 fs/cifs/cifs_unicode.c                                      |   33 ++++
 fs/cifs/cifs_unicode.h                                      |    2 
 fs/cifs/connect.c                                           |    4 
 fs/cifs/ntlmssp.h                                           |    2 
 fs/cifs/sess.c                                              |   76 ++++++-----
 fs/cifs/smb2pdu.c                                           |   37 ++++-
 fs/namei.c                                                  |    8 -
 fs/namespace.c                                              |   10 +
 fs/nfs/dir.c                                                |    2 
 fs/nfs/nfs4proc.c                                           |    5 
 fs/nfs/pnfs_nfs.c                                           |   12 +
 fs/nfs/read.c                                               |    4 
 fs/nfsd/nfs2acl.c                                           |   20 +--
 fs/nfsd/nfs3acl.c                                           |   16 +-
 fs/nfsd/nfs4acl.c                                           |   16 +-
 fs/nfsd/nfs4callback.c                                      |   18 --
 fs/nfsd/nfs4state.c                                         |   50 ++++---
 fs/nfsd/state.h                                             |    2 
 fs/overlayfs/dir.c                                          |   54 +++-----
 fs/overlayfs/inode.c                                        |   35 ++++-
 fs/overlayfs/overlayfs.h                                    |    1 
 fs/overlayfs/super.c                                        |   21 +--
 fs/posix_acl.c                                              |   42 +++---
 fs/ubifs/file.c                                             |   24 +++
 include/asm-generic/qspinlock.h                             |   53 ++-----
 include/drm/ttm/ttm_bo_api.h                                |   14 ++
 include/linux/cpuidle.h                                     |    3 
 include/linux/dcache.h                                      |   12 +
 include/linux/jump_label.h                                  |   16 +-
 include/linux/skbuff.h                                      |   20 +++
 include/linux/sunrpc/clnt.h                                 |    2 
 include/linux/sunrpc/svc_xprt.h                             |    1 
 include/linux/sunrpc/xprt.h                                 |    1 
 include/linux/usb/ehci_def.h                                |    4 
 include/rdma/ib_verbs.h                                     |    2 
 include/rdma/rdma_vt.h                                      |    4 
 kernel/futex.c                                              |   14 +-
 kernel/jump_label.c                                         |   36 ++++-
 kernel/locking/mutex.c                                      |    9 -
 kernel/locking/qspinlock.c                                  |   60 +++++++++
 kernel/sched/fair.c                                         |   33 +++-
 kernel/sched/idle.c                                         |    2 
 kernel/trace/trace_printk.c                                 |    7 -
 mm/migrate.c                                                |    2 
 mm/page-writeback.c                                         |   21 +--
 mm/percpu.c                                                 |   73 ++++++----
 mm/shmem.c                                                  |    8 -
 net/core/flow_dissector.c                                   |   43 ++++++
 net/core/skbuff.c                                           |   18 --
 net/ipv6/ip6_fib.c                                          |    1 
 net/mac80211/mesh.c                                         |   11 +
 net/mac80211/sta_info.h                                     |    2 
 net/packet/af_packet.c                                      |    2 
 net/sched/act_mirred.c                                      |    2 
 net/sunrpc/clnt.c                                           |   31 +++-
 net/sunrpc/svc_xprt.c                                       |    2 
 net/sunrpc/xprtsock.c                                       |    1 
 net/unix/af_unix.c                                          |    6 
 net/wireless/core.c                                         |    2 
 net/wireless/util.c                                         |    2 
 scripts/mod/file2alias.c                                    |    2 
 security/apparmor/lsm.c                                     |   36 ++---
 security/keys/key.c                                         |    2 
 sound/core/control.c                                        |    2 
 sound/core/pcm.c                                            |   14 +-
 sound/core/timer.c                                          |    2 
 sound/drivers/dummy.c                                       |    1 
 sound/hda/hdac_regmap.c                                     |    4 
 sound/pci/au88x0/au88x0_core.c                              |    5 
 sound/pci/echoaudio/echoaudio.c                             |    4 
 sound/pci/hda/hda_generic.c                                 |    2 
 sound/pci/hda/hda_intel.c                                   |   12 +
 sound/pci/hda/patch_realtek.c                               |   22 +++
 sound/usb/card.c                                            |    2 
 virt/kvm/kvm_main.c                                         |    2 
 220 files changed, 1754 insertions(+), 998 deletions(-)

Al Viro (2):
autofs braino fix for do_last()
make nfs_atomic_open() call d_drop() on all ->open_context() errors.

Alan Stern (2):
USB: EHCI: declare hostpc register as zero-length array
USB: don't free bandwidth_mutex too early

Alex Deucher (3):
drm/radeon: fix asic initialization for virtualized environments drm/amdgpu/gfx7: fix broken condition check drm/amdgpu: fix num_rbs exposed to userspace (v2)

Alison Schofield (1):

      iio: humidity: hdc100x: correct humidity integration time mask

Allen Hung (2):
Revert "HID: multitouch: enable palm rejection if device implements confidence usage"
HID: multitouch: enable palm rejection for Windows Precision Touchpad

Andreas Gruenbacher (1):
posix_acl: Add set_posix_acl

Andrey Grodzovsky (1):
drm/dp/mst: Always clear proposed vcpi table for port.

Andy Lutomirski (1):
uvc: Forward compat ioctls to their handlers directly

Anthony Romano (1):
tmpfs: don't undo fallocate past its last page

Arnd Bergmann (1):
usb: dwc2: fix regression on big-endian PowerPC/ARM systems

Awais Belal (1):
ALSA: hda: add AMD Stoney PCI ID with proper driver caps

Bart Van Assche (1):
IB/cm: Fix a recently introduced locking bug

Ben Hutchings (1):
nfsd: check permissions when setting ACLs

Ben Skeggs (7):
drm/nouveau/bios/disp: fix handling of "match any protocol" entries drm/nouveau/disp/sor/gf119: both links use the same training register drm/nouveau/gr/gf100-: update sm error decoding from gk20a nvgpu headers drm/nouveau/ltc/gm107-: fix typo in the address of NV_PLTCG_LTC0_LTS0_INTR drm/nouveau/fbcon: fix out-of-bounds memory accesses drm/nouveau/disp/sor/gm107: training pattern registers are like gm200 drm/nouveau/disp/sor/gf119: select correct sor when poking training pattern

Bjørn Mork (1):
cdc_ncm: workaround for EM7455 "silent" data interface

Bob Copeland (2):
mac80211: mesh: flush mesh paths unconditionally
ALSA: hda - fix read before array start

Boris Brezillon (2):
drm: atmel-hlcdc: actually disable scaling when no scaling is required
ARM: sunxi/dt: make the CHIP inherit from allwinner,sun5i-a13

Borislav Petkov (1):
x86/amd_nb: Fix boot crash on non-AMD systems

Catalin Marinas (1):
cpuidle: Do not access cpuidle_devices when !CONFIG_CPU_IDLE

Chen-Yu Tsai (2):
ARM: dts: sun6i: yones-toptech-bs1078-v2: Drop constraints on dc1sw regulator
ARM: dts: sun6i: primo81: Drop constraints on dc1sw regulator

Chris Wilson (3):

      locking/ww_mutex: Report recursive ww_mutex locking early
      drm/i915: Update ifdeffery for mutex->owner
      drm: Wrap direct calls to driver->gem_free_object from CMA

Christian Borntraeger (1):
KVM: s390/mm: Fix CMMA reset during reboot

Christophe JAILLET (1):
ALSA: echoaudio: Fix memory allocation

Colin Pitrat (1):
gpio: sch: Fix Oops on module load on Asus Eee PC 1201

Crestez Dan Leonard (1):
iio: Fix error handling in iio_trigger_attach_poll_func

Cyril Bur (1):
powerpc/tm: Always reclaim in start_thread() for exec() class syscalls

Dan Carpenter (1):
KEYS: potential uninitialized variable

Daniel Borkmann (1):
macsec: set actual real device for xmit when !protect_frames

David Daney (1):
tty: vt: Fix soft lockup in fbcon cursor blink timer.

David Miller (1):
PCI: Fix unaligned accesses in VC code

David S. Miller (1):
packet: Use symmetric hash for PACKET_FANOUT_HASH.

Dmitrii Tcvetkov (1):
drm/nouveau: fix for disabled fbdev emulation

Dmitry Torokhov (1):
tty/vt/keyboard: fix OOB access in do_compute_shiftstate()

Dr. David Alan Gilbert (1):
x86/msr: Use the proper trace point conditional for writes

Eric W. Biederman (3):
mnt: fs_fully_visible test the proper mount for MNT_LOCKED
mnt: Account for MS_RDONLY in fs_fully_visible
mnt: If fs_fully_visible fails call put_filesystem.

Fabio Estevam (1):
ARM: imx6ul: Fix Micrel PHY mask

Felix Fietkau (2):
mac80211: fix fast_tx header alignment
cfg80211: fix proto in ieee80211_data_to_8023 for frames without LLC header

Gavin Shan (1):
powerpc/pseries: Fix PCI config address for DDW

Greg Kroah-Hartman (1):

      Linux 4.6.5

Gregor Boirie (1):
iio:st_pressure: fix sampling gains (bring inline with ABI)

Guilherme G. Piccoli (1):
powerpc/iommu: Remove the dependency on EEH struct in DDW mechanism

H. Peter Anvin (1):
x86, build: copy ldlinux.c32 to image.iso

Haishuang Yan (1):
geneve: fix max_mtu setting

Harvey Hunt (1):
irqchip/mips-gic: Fix IRQs in gic_dev_domain

Herbert Xu (1):
crypto: rsa-pkcs1pad - fix rsa-pkcs1pad request struct

Huang Rui (1):
drm/amd/powerplay: fix incorrect voltage table value for tonga

Hugh Dickins (1):
tmpfs: fix regression hang in fallocate undo

Hui Wang (1):
ALSA: hda/realtek - add new pin definition in alc225 pin quirk table

J. Bruce Fields (3):
nfsd4/rpc: move backchannel create logic into rpc code
SUNRPC: fix xprt leak on xps allocation failure
rpc: share one xps between all backchannels

James Bottomley (1):
53c700: fix BUG on untagged commands

James Hogan (1):
MIPS: KVM: Fix modular KVM under QEMU

James Morse (2):
KVM: arm/arm64: Stop leaking vcpu pid references
arm64: kernel: Save and restore UAO and addr_limit on exception entry

Jan Beulich (1):
xen/acpi: allow xen-acpi-processor driver to load on Xen 4.7

Jan Stancek (1):
crypto: qat - make qat_asym_algs.o depend on asn1 headers

Jaroslav Kysela (2):
ALSA: hdac_regmap - fix the register access for runtime PM
ALSA: hda / realtek - add two more Thinkpad IDs (5050,5053) for tpt460 fixup

Jason Gunthorpe (1):
IB/mlx4: Properly initialize GRH TClass and FlowLabel in AHs

Jean-Philippe Brucker (1):
iommu/arm-smmu: Wire up map_sg for arm-smmu-v3

Jeff Mahoney (1):
btrfs: account for non-CoW'd blocks in btrfs_abort_transaction

Jerome Marchand (1):
cifs: dynamic allocation of ntlmssp blob

Jiri Slaby (1):
base: make module_create_drivers_dir race-free

Joerg Roedel (2):
iommu/vt-d: Enable QI on all IOMMUs before setting root entry iommu/amd: Fix unity mapping initialization race

Johan Hovold (1):
Revert "gpiolib: Split GPIO flags parsing and GPIO configuration"

Johannes Berg (1):
cfg80211: remove get/set antenna and tx power warnings

John Keeping (1):
iommu/rockchip: Fix zap cache during device attach

Josh Poimboeuf (1):
perf/x86: Fix 32-bit perf user callgraph collection

Jouni Malinen (1):
mac80211: Fix mesh estab_plinks counting in STA removal case

Junichi Nomura (1):
ipmi: Remove smi_msg from waiting_rcv_msgs list before handle_one_recv_msg()

Kazuki Oikawa (1):
ALSA: usb-audio: Fix quirks code is not called

Kirill A. Shutemov (1):

      UBIFS: Implement ->migratepage()

Larry Finger (1):
rtlwifi: Fix scheduling while atomic error from commit 49f86ec21c01

Linus Walleij (2):
gpio: make library immune to error pointers
iio: accel: kxsd9: fix the usage of spi_w8r8()

Luis de Bethencourt (1):
staging: iio: accel: fix error check

Lukasz Luba (1):
thermal: cpu_cooling: fix improper order during initialization

Lyude (2):
drm/i915/ilk: Don't disable SSC source if it's in use drm/i915/fbc: Disable on HSW by default for now

Maarten Lankhorst (1):

      drm/atomic: Make drm_atomic_legacy_backoff reset crtc->acquire_ctx

Mark Brown (3):
iio:ad7266: Fix broken regulator error handling iio:ad7266: Fix support for optional regulators iio:ad7266: Fix probe deferral for vref

Mark Rutland (1):
arm64: fix dump_instr when PAN and UAO are in use

Martin K. Petersen (1):
sd: Fix rw_max for devices that report an optimal xfer size

Martin KaFai Lau (1):
ipv6: Fix mem leak in rt6i_pcpu

Martin Schwidefsky (1):
s390: fix test_fp_ctl inline assembly contraints

Martin Willi (1):
mac80211_hwsim: Add missing check for HWSIM_ATTR_SIGNAL

Masami Hiramatsu (1):
kprobes/x86: Clear TF bit in fault on single-stepping

Mathieu Larouche (1):
drm/mgag200: Black screen fix for G200e rev 4

Matt Ranostay (5):
iio: proximity: as3935: correct IIO_CHAN_INFO_RAW output
iio: proximity: as3935: remove triggered buffer processing
iio: proximity: as3935: fix buffer stack trashing
iio: humidity: hdc100x: fix IIO_TEMP channel reporting
iio: hudmidity: hdc100x: fix incorrect shifting and scaling

Max Gurtovoy (1):
IB/core: Fix bit curruption in ib_device_cap_flags structure

Maxim Patlasov (1):
ovl: verify upper dentry in ovl_remove_and_whiteout()

Mel Gorman (1):
futex: Calculate the futex key based on a tail page for file-based futexes

Michael Ellerman (1):
powerpc/pseries: Fix IBM_ARCH_VEC_NRCORES_OFFSET since POWER8NVL was added

Michael Holzheu (1):
Revert "s390/kdump: Clear subchannel ID to signal non-CCW/SCSI IPL"

Michael S. Tsirkin (1):
virtio_balloon: fix PFN format for virtio-1

Mika Kahola (1):
drm/i915: Revert DisplayPort fast link training feature

Mike Marciniszyn (1):
IB/rdmavt: Correct qp_priv_alloc() return value test

Miklos Szeredi (5):
vfs: add d_real_inode() helper
af_unix: fix hard linked sockets on overlay
ovl: fix dentry leak for default_permissions
ovl: get_write_access() in truncate
ovl: handle ATTR_KILL*

Nicholas Krause (1):
EDAC: Fix workqueues poll period resetting

Nicolas Iooss (1):
drm/amdgpu: initialize amdgpu_cgs_acpi_eval_object result value

Ocquidant, Sebastien (1):
memory: omap-gpmc: Fix omap gpmc EXTRADELAY timing

Oded Gabbay (2):
drm/amdkfd: unbind only existing processes drm/amdkfd: destroy dbgmgr in notifier release

Oleg Drokin (2):
nfsd: Always lock state exclusively.
nfsd: Extend the mutex holding region around in nfsd4_process_open2()

Oliver Neukum (1):
HID: elo: kill not flush the work

Oscar (1):
usb: common: otg-fsm: add license to usb-otg-fsm

Pali Rohár (3):
hwmon: (dell-smm) Restrict fan control and serial number to CAP_SYS_ADMIN by default
hwmon: (dell-smm) Disallow fan_type() calls on broken machines
hwmon: (dell-smm) Cache fan_type() calls and change fan detection

Paolo Bonzini (1):
locking/static_key: Fix concurrent static_key_slow_inc()

Peter Wu (1):
ALSA: hda - fix use-after-free after module unload

Peter Zijlstra (2):
locking/qspinlock: Fix spin_unlock_wait() some more sched/fair: Fix cfs_rq avg tracking underflow

Quentin Casasnovas (1):
KVM: nVMX: VMX instructions: fix segment checks when L1 is in long mode.

Rex Zhu (4):
drm/amd/powerplay: fix bug that function parameter was incorect. drm/amd/powerplay: need to notify system bios pcie device ready drm/amd/powerplay: fix logic error. drm/amd/powerplay: incorrectly use of the function return value

Richard Weinberger (2):
mm: Export migrate_page_move_mapping and migrate_page_copy
ubi: Make recover_peb power cut aware

Robin Murphy (1):
drm/nouveau/Revert "drm/nouveau/device/pci: set as non-CPU-coherent on ARM64"

Roger Quadros (1):
extcon: palmas: Fix boot up state of VBUS when using GPIO detection

Ross Lagerwall (1):
xen/balloon: Fix declared-but-not-defined warning

Scott Bauer (1):
HID: hiddev: validate num_values for HIDIOCGUSAGES, HIDIOCSUSAGES commands

Sergei Shtylyov (1):
of: irq: fix of_irq_get[_byname]() kernel-doc

Shaokun Zhang (1):
arm64: mm: remove page_mapping check in __sync_icache_dcache

Sinclair Yeh (6):
drm/ttm: Make ttm_bo_mem_compat available
drm/vmwgfx: Add an option to change assumed FB bpp drm/vmwgfx: Work around mode set failure in 2D VMs drm/vmwgfx: Check pin count before attempting to move a buffer drm/vmwgfx: Delay pinning fbdev framebuffer until after mode set drm/vmwgfx: Fix error paths when mapping framebuffer

Srinivas Kandagatla (2):
regulator: qcom_smd: add list_voltage callback
regulator: qcom_smd: add regulator ops for pm8941 lnldo

Stefan Agner (1):
drm/fsl-dcu: use flat regmap cache

Steve Capper (1):
ARM: 8579/1: mm: Fix definition of pmd_mknotpresent

Steve French (2):
Fix reconnect to not defer smb3 session reconnect long after socket reconnect File names with trailing period or space need special case conversion

Steven Rostedt (Red Hat) (1):
tracing: Handle NULL formats in hold_module_trace_bprintk_format()

Takashi Iwai (5):
ALSA: dummy: Fix a use-after-free at closing
ALSA: au88x0: Fix calculation in vortex_wtdma_bufshift()
ALSA: timer: Fix negative queue usage by racy accesses
ALSA: pcm: Free chmap at PCM free callback, too
ALSA: ctl: Stop notification after disconnection

Tejun Heo (3):
writeback: use higher precision calculation in domain_dirty_limits()
percpu: fix synchronization between chunk->map_extend_work and chunk destruction
percpu: fix synchronization between synchronous map extension and chunk destruction

Thomas Hellstrom (1):
drm/vmwgfx: Fix corner case screen target management

Thomas Petazzoni (2):
ARM: dts: armada-38x: fix MBUS_ID for crypto SRAM on Armada 385 Linksys
ARM: mvebu: fix HW I/O coherency related deadlocks

Tomi Valkeinen (2):
drm: add missing drm_mode_set_crtcinfo call
drm: make drm_atomic_set_mode_prop_for_crtc() more reliable

Tony Luck (1):
EDAC, sb_edac: Fix rank lookup on Broadwell

Torsten Hilbrich (1):
ALSA: hda/realtek: Add Lenovo L460 to docking unit fixup

Trond Myklebust (2):
NFS: Fix a double page unlock
NFS: Fix another OPEN_DOWNGRADE bug

Vegard Nossum (1):
apparmor: fix oops, validate buffer size in apparmor_setprocattr()

Ville Syrjälä (1):
drm/i915: Refresh cached DP port register value on resume

Vincent Stehlé (1):
perf/x86/intel/rapl: Fix pmus free during cleanup

Vinod Koul (1):
ALSA: hda - Add PCI ID for Kabylake-H

Vivek Goyal (3):
ovl: Copy up underlying inode's ->i_mode to overlay inode
ovl: Do d_type check only if work dir creation was successful
ovl: warn instead of error if d_type is not supported

WANG Cong (1):
net_sched: fix mirrored packets checksum

Wei Fang (1):

      scsi: fix race between simultaneous decrements of ->host_failed

Weston Andros Adamson (1):
pnfs_nfs: fix _cancel_empty_pagelist

Will Deacon (1):
ARM: 8578/1: mm: ensure pmd_present only checks the valid bit

Wolfram Sang (1):
of: fix autoloading due to broken modalias with no 'compatible'

Woodrow Shen (1):
ALSA: hda - Fix the headset mic jack detection on Dell machine

Xiubo Li (1):
kvm: Fix irq route entries exceeding KVM_MAX_IRQ_ROUTES

Yang Zhang (1):
kvm: vmx: check apicv is active before using VT-d posted interrupt

Yong Li (1):
iio: light apds9960: Add the missing dev.parent

author maintainer
#1 lore raw
Documentation/ABI/testing/sysfs-bus-iio-proximity-as3935 +1 -1
index 6708c5e264aa..33e96f740639 100644
@@ -1,4 +1,4 @@
-What		/sys/bus/iio/devices/iio:deviceX/in_proximity_raw
+What		/sys/bus/iio/devices/iio:deviceX/in_proximity_input
 Date:		March 2014
 KernelVersion:	3.15
 Contact:	Matt Ranostay <[email protected]>
Documentation/scsi/scsi_eh.txt +6 -2
index 8638f61c8c9d..37eca00796ee 100644
@@ -263,19 +263,23 @@ scmd->allowed.
 
  3. scmd recovered
     ACTION: scsi_eh_finish_cmd() is invoked to EH-finish scmd
-	- shost->host_failed--
 	- clear scmd->eh_eflags
 	- scsi_setup_cmd_retry()
 	- move from local eh_work_q to local eh_done_q
     LOCKING: none
+    CONCURRENCY: at most one thread per separate eh_work_q to
+		 keep queue manipulation lockless
 
  4. EH completes
     ACTION: scsi_eh_flush_done_q() retries scmds or notifies upper
-	    layer of failure.
+	    layer of failure. May be called concurrently but must have
+	    a no more than one thread per separate eh_work_q to
+	    manipulate the queue locklessly
 	- scmd is removed from eh_done_q and scmd->eh_entry is cleared
 	- if retry is necessary, scmd is requeued using
           scsi_queue_insert()
 	- otherwise, scsi_finish_command() is invoked for scmd
+	- zero shost->host_failed
     LOCKING: queue or finish function performs appropriate locking
 
 
Makefile +1 -1
index cd374426114a..7d693a825fc7 100644
@@ -1,6 +1,6 @@
 VERSION = 4
 PATCHLEVEL = 6
-SUBLEVEL = 4
+SUBLEVEL = 5
 EXTRAVERSION =
 NAME = Charred Weasel
 
arch/arm/boot/dts/armada-385-linksys.dtsi +2 -2
index 8450944b28e6..22f7a13e20b4 100644
@@ -58,8 +58,8 @@
 	soc {
 		ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000
 			  MBUS_ID(0x01, 0x1d) 0 0xfff00000 0x100000
-			  MBUS_ID(0x09, 0x09) 0 0xf1100000 0x10000
-			  MBUS_ID(0x09, 0x05) 0 0xf1110000 0x10000>;
+			  MBUS_ID(0x09, 0x19) 0 0xf1100000 0x10000
+			  MBUS_ID(0x09, 0x15) 0 0xf1110000 0x10000>;
 
 		internal-regs {
 
arch/arm/boot/dts/sun5i-r8-chip.dts +1 -1
index f6898c6b84d4..c937c85ffb45 100644
@@ -52,7 +52,7 @@
 
 / {
 	model = "NextThing C.H.I.P.";
-	compatible = "nextthing,chip", "allwinner,sun5i-r8";
+	compatible = "nextthing,chip", "allwinner,sun5i-r8", "allwinner,sun5i-a13";
 
 	aliases {
 		i2c0 = &i2c0;
arch/arm/boot/dts/sun6i-a31s-primo81.dts +0 -2
index 68b479b8772c..73c133f5e79c 100644
@@ -176,8 +176,6 @@
 };
 
 &reg_dc1sw {
-	regulator-min-microvolt = <3000000>;
-	regulator-max-microvolt = <3000000>;
 	regulator-name = "vcc-lcd";
 };
 
arch/arm/boot/dts/sun6i-a31s-yones-toptech-bs1078-v2.dts +0 -2
index 360adfb1e9ca..d6ad6196a768 100644
@@ -135,8 +135,6 @@
 
 &reg_dc1sw {
 	regulator-name = "vcc-lcd-usb2";
-	regulator-min-microvolt = <3000000>;
-	regulator-max-microvolt = <3000000>;
 };
 
 &reg_dc5ldo {
arch/arm/include/asm/pgtable-2level.h +1 -0
index aeddd28b3595..92fd2c8a9af0 100644
@@ -193,6 +193,7 @@ static inline pmd_t *pmd_offset(pud_t *pud, unsigned long addr)
 
 #define pmd_large(pmd)		(pmd_val(pmd) & 2)
 #define pmd_bad(pmd)		(pmd_val(pmd) & 2)
+#define pmd_present(pmd)	(pmd_val(pmd))
 
 #define copy_pmd(pmdpd,pmdps)		\
 	do {				\
arch/arm/include/asm/pgtable-3level.h +3 -2
index dc46398bc3a5..74114667d116 100644
@@ -211,6 +211,7 @@ static inline pmd_t *pmd_offset(pud_t *pud, unsigned long addr)
 						: !!(pmd_val(pmd) & (val)))
 #define pmd_isclear(pmd, val)	(!(pmd_val(pmd) & (val)))
 
+#define pmd_present(pmd)	(pmd_isset((pmd), L_PMD_SECT_VALID))
 #define pmd_young(pmd)		(pmd_isset((pmd), PMD_SECT_AF))
 #define pte_special(pte)	(pte_isset((pte), L_PTE_SPECIAL))
 static inline pte_t pte_mkspecial(pte_t pte)
@@ -249,10 +250,10 @@ PMD_BIT_FUNC(mkyoung,   |= PMD_SECT_AF);
 #define pfn_pmd(pfn,prot)	(__pmd(((phys_addr_t)(pfn) << PAGE_SHIFT) | pgprot_val(prot)))
 #define mk_pmd(page,prot)	pfn_pmd(page_to_pfn(page),prot)
 
-/* represent a notpresent pmd by zero, this is used by pmdp_invalidate */
+/* represent a notpresent pmd by faulting entry, this is used by pmdp_invalidate */
 static inline pmd_t pmd_mknotpresent(pmd_t pmd)
 {
-	return __pmd(0);
+	return __pmd(pmd_val(pmd) & ~L_PMD_SECT_VALID);
 }
 
 static inline pmd_t pmd_modify(pmd_t pmd, pgprot_t newprot)
arch/arm/include/asm/pgtable.h +0 -1
index 348caabb7625..d62204060cbe 100644
@@ -182,7 +182,6 @@ extern pgd_t swapper_pg_dir[PTRS_PER_PGD];
 #define pgd_offset_k(addr)	pgd_offset(&init_mm, addr)
 
 #define pmd_none(pmd)		(!pmd_val(pmd))
-#define pmd_present(pmd)	(pmd_val(pmd))
 
 static inline pte_t *pmd_page_vaddr(pmd_t pmd)
 {
arch/arm/kvm/arm.c +1 -0
index dded1b763c16..72b11d91ede2 100644
@@ -267,6 +267,7 @@ void kvm_arch_vcpu_free(struct kvm_vcpu *vcpu)
 	kvm_timer_vcpu_terminate(vcpu);
 	kvm_vgic_vcpu_destroy(vcpu);
 	kvm_pmu_vcpu_destroy(vcpu);
+	kvm_vcpu_uninit(vcpu);
 	kmem_cache_free(kvm_vcpu_cache, vcpu);
 }
 
arch/arm/mach-imx/mach-imx6ul.c +1 -1
index a38b16b69923..b56de4b8cdf2 100644
@@ -46,7 +46,7 @@ static int ksz8081_phy_fixup(struct phy_device *dev)
 static void __init imx6ul_enet_phy_init(void)
 {
 	if (IS_BUILTIN(CONFIG_PHYLIB))
-		phy_register_fixup_for_uid(PHY_ID_KSZ8081, 0xffffffff,
+		phy_register_fixup_for_uid(PHY_ID_KSZ8081, MICREL_PHY_ID_MASK,
 					   ksz8081_phy_fixup);
 }
 
arch/arm/mach-mvebu/coherency.c +8 -14
index 7e989d61159c..474abff7e855 100644
@@ -162,22 +162,16 @@ exit:
 }
 
 /*
- * This ioremap hook is used on Armada 375/38x to ensure that PCIe
- * memory areas are mapped as MT_UNCACHED instead of MT_DEVICE. This
- * is needed as a workaround for a deadlock issue between the PCIe
- * interface and the cache controller.
+ * This ioremap hook is used on Armada 375/38x to ensure that all MMIO
+ * areas are mapped as MT_UNCACHED instead of MT_DEVICE. This is
+ * needed for the HW I/O coherency mechanism to work properly without
+ * deadlock.
  */
 static void __iomem *
-armada_pcie_wa_ioremap_caller(phys_addr_t phys_addr, size_t size,
-			      unsigned int mtype, void *caller)
+armada_wa_ioremap_caller(phys_addr_t phys_addr, size_t size,
+			 unsigned int mtype, void *caller)
 {
-	struct resource pcie_mem;
-
-	mvebu_mbus_get_pcie_mem_aperture(&pcie_mem);
-
-	if (pcie_mem.start <= phys_addr && (phys_addr + size) <= pcie_mem.end)
-		mtype = MT_UNCACHED;
-
+	mtype = MT_UNCACHED;
 	return __arm_ioremap_caller(phys_addr, size, mtype, caller);
 }
 
@@ -186,7 +180,7 @@ static void __init armada_375_380_coherency_init(struct device_node *np)
 	struct device_node *cache_dn;
 
 	coherency_cpu_base = of_iomap(np, 0);
-	arch_ioremap_caller = armada_pcie_wa_ioremap_caller;
+	arch_ioremap_caller = armada_wa_ioremap_caller;
 
 	/*
 	 * We should switch the PL310 to I/O coherency mode only if
arch/arm64/include/asm/ptrace.h +2 -0
index a307eb6e7fa8..7f94755089e2 100644
@@ -117,6 +117,8 @@ struct pt_regs {
 	};
 	u64 orig_x0;
 	u64 syscallno;
+	u64 orig_addr_limit;
+	u64 unused;	// maintain 16 byte alignment
 };
 
 #define arch_has_single_step()	(1)
arch/arm64/kernel/asm-offsets.c +1 -0
index 3ae6b310ac9b..1abcd8829f3b 100644
@@ -59,6 +59,7 @@ int main(void)
   DEFINE(S_PC,			offsetof(struct pt_regs, pc));
   DEFINE(S_ORIG_X0,		offsetof(struct pt_regs, orig_x0));
   DEFINE(S_SYSCALLNO,		offsetof(struct pt_regs, syscallno));
+  DEFINE(S_ORIG_ADDR_LIMIT,	offsetof(struct pt_regs, orig_addr_limit));
   DEFINE(S_FRAME_SIZE,		sizeof(struct pt_regs));
   BLANK();
   DEFINE(MM_CONTEXT_ID,		offsetof(struct mm_struct, context.id.counter));
arch/arm64/kernel/entry.S +17 -2
index 12e8d2bcb3f9..6c3b7345a6c4 100644
@@ -28,6 +28,7 @@
 #include <asm/errno.h>
 #include <asm/esr.h>
 #include <asm/irq.h>
+#include <asm/memory.h>
 #include <asm/thread_info.h>
 #include <asm/unistd.h>
 
@@ -97,7 +98,14 @@
 	mov	x29, xzr			// fp pointed to user-space
 	.else
 	add	x21, sp, #S_FRAME_SIZE
-	.endif
+	get_thread_info tsk
+	/* Save the task's original addr_limit and set USER_DS (TASK_SIZE_64) */
+	ldr	x20, [tsk, #TI_ADDR_LIMIT]
+	str	x20, [sp, #S_ORIG_ADDR_LIMIT]
+	mov	x20, #TASK_SIZE_64
+	str	x20, [tsk, #TI_ADDR_LIMIT]
+	ALTERNATIVE(nop, SET_PSTATE_UAO(0), ARM64_HAS_UAO, CONFIG_ARM64_UAO)
+	.endif /* \el == 0 */
 	mrs	x22, elr_el1
 	mrs	x23, spsr_el1
 	stp	lr, x21, [sp, #S_LR]
@@ -128,6 +136,14 @@
 	.endm
 
 	.macro	kernel_exit, el
+	.if	\el != 0
+	/* Restore the task's original addr_limit. */
+	ldr	x20, [sp, #S_ORIG_ADDR_LIMIT]
+	str	x20, [tsk, #TI_ADDR_LIMIT]
+
+	/* No need to restore UAO, it will be restored from SPSR_EL1 */
+	.endif
+
 	ldp	x21, x22, [sp, #S_PC]		// load ELR, SPSR
 	.if	\el == 0
 	ct_user_enter
@@ -406,7 +422,6 @@ el1_irq:
 	bl	trace_hardirqs_off
 #endif
 
-	get_thread_info tsk
 	irq_handler
 
 #ifdef CONFIG_PREEMPT
arch/arm64/kernel/traps.c +13 -13
index c5392081b49b..58651a9dfcf8 100644
@@ -64,8 +64,7 @@ static void dump_mem(const char *lvl, const char *str, unsigned long bottom,
 
 	/*
 	 * We need to switch to kernel mode so that we can use __get_user
-	 * to safely read from kernel space.  Note that we now dump the
-	 * code first, just in case the backtrace kills us.
+	 * to safely read from kernel space.
 	 */
 	fs = get_fs();
 	set_fs(KERNEL_DS);
@@ -111,21 +110,12 @@ static void dump_backtrace_entry(unsigned long where)
 	print_ip_sym(where);
 }
 
-static void dump_instr(const char *lvl, struct pt_regs *regs)
+static void __dump_instr(const char *lvl, struct pt_regs *regs)
 {
 	unsigned long addr = instruction_pointer(regs);
-	mm_segment_t fs;
 	char str[sizeof("00000000 ") * 5 + 2 + 1], *p = str;
 	int i;
 
-	/*
-	 * We need to switch to kernel mode so that we can use __get_user
-	 * to safely read from kernel space.  Note that we now dump the
-	 * code first, just in case the backtrace kills us.
-	 */
-	fs = get_fs();
-	set_fs(KERNEL_DS);
-
 	for (i = -4; i < 1; i++) {
 		unsigned int val, bad;
 
@@ -139,8 +129,18 @@ static void dump_instr(const char *lvl, struct pt_regs *regs)
 		}
 	}
 	printk("%sCode: %s\n", lvl, str);
+}
 
-	set_fs(fs);
+static void dump_instr(const char *lvl, struct pt_regs *regs)
+{
+	if (!user_mode(regs)) {
+		mm_segment_t fs = get_fs();
+		set_fs(KERNEL_DS);
+		__dump_instr(lvl, regs);
+		set_fs(fs);
+	} else {
+		__dump_instr(lvl, regs);
+	}
 }
 
 static void dump_backtrace(struct pt_regs *regs, struct task_struct *tsk)
arch/arm64/mm/fault.c +2 -1
index 10b79e9e87d1..e22849a90557 100644
@@ -284,7 +284,8 @@ static int __kprobes do_page_fault(unsigned long addr, unsigned int esr,
 	}
 
 	if (permission_fault(esr) && (addr < USER_DS)) {
-		if (get_fs() == KERNEL_DS)
+		/* regs->orig_addr_limit may be 0 if we entered from EL0 */
+		if (regs->orig_addr_limit == KERNEL_DS)
 			die("Accessing user space memory with fs=KERNEL_DS", regs, esr);
 
 		if (!search_exception_tables(regs->pc))
arch/arm64/mm/flush.c +0 -4
index dbd12ea8ce68..43a76b07eb32 100644
@@ -71,10 +71,6 @@ void __sync_icache_dcache(pte_t pte, unsigned long addr)
 {
 	struct page *page = pte_page(pte);
 
-	/* no flushing needed for anonymous pages */
-	if (!page_mapping(page))
-		return;
-
 	if (!test_and_set_bit(PG_dcache_clean, &page->flags))
 		sync_icache_aliases(page_address(page),
 				    PAGE_SIZE << compound_order(page));
arch/mips/include/asm/kvm_host.h +1 -0
index 942b8f6bf35b..1907ab379fad 100644
@@ -336,6 +336,7 @@ struct kvm_mips_tlb {
 #define KVM_MIPS_GUEST_TLB_SIZE	64
 struct kvm_vcpu_arch {
 	void *host_ebase, *guest_ebase;
+	int (*vcpu_run)(struct kvm_run *run, struct kvm_vcpu *vcpu);
 	unsigned long host_stack;
 	unsigned long host_gp;
 
arch/mips/kvm/interrupt.h +1 -0
index 4ab4bdfad703..2143884709e4 100644
@@ -28,6 +28,7 @@
 #define MIPS_EXC_MAX                12
 /* XXXSL More to follow */
 
+extern char __kvm_mips_vcpu_run_end[];
 extern char mips32_exception[], mips32_exceptionEnd[];
 extern char mips32_GuestException[], mips32_GuestExceptionEnd[];
 
arch/mips/kvm/locore.S +1 -0
index 81687ab1b523..fc93a08b6954 100644
@@ -227,6 +227,7 @@ FEXPORT(__kvm_mips_load_k0k1)
 
 	/* Jump to guest */
 	eret
+EXPORT(__kvm_mips_vcpu_run_end)
 
 VECTOR(MIPSX(exception), unknown)
 /* Find out what mode we came from and jump to the proper handler. */
arch/mips/kvm/mips.c +10 -1
index 70ef1a43c114..e223cb3d9e81 100644
@@ -314,6 +314,15 @@ struct kvm_vcpu *kvm_arch_vcpu_create(struct kvm *kvm, unsigned int id)
 	memcpy(gebase + offset, mips32_GuestException,
 	       mips32_GuestExceptionEnd - mips32_GuestException);
 
+#ifdef MODULE
+	offset += mips32_GuestExceptionEnd - mips32_GuestException;
+	memcpy(gebase + offset, (char *)__kvm_mips_vcpu_run,
+	       __kvm_mips_vcpu_run_end - (char *)__kvm_mips_vcpu_run);
+	vcpu->arch.vcpu_run = gebase + offset;
+#else
+	vcpu->arch.vcpu_run = __kvm_mips_vcpu_run;
+#endif
+
 	/* Invalidate the icache for these ranges */
 	local_flush_icache_range((unsigned long)gebase,
 				(unsigned long)gebase + ALIGN(size, PAGE_SIZE));
@@ -403,7 +412,7 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run *run)
 	/* Disable hardware page table walking while in guest */
 	htw_stop();
 
-	r = __kvm_mips_vcpu_run(run, vcpu);
+	r = vcpu->arch.vcpu_run(run, vcpu);
 
 	/* Re-enable HTW before enabling interrupts */
 	htw_start();
arch/powerpc/kernel/process.c +10 -0
index b8500b4ac7fe..bec85055fc42 100644
@@ -1501,6 +1501,16 @@ void start_thread(struct pt_regs *regs, unsigned long start, unsigned long sp)
 		current->thread.regs = regs - 1;
 	}
 
+#ifdef CONFIG_PPC_TRANSACTIONAL_MEM
+	/*
+	 * Clear any transactional state, we're exec()ing. The cause is
+	 * not important as there will never be a recheckpoint so it's not
+	 * user visible.
+	 */
+	if (MSR_TM_SUSPENDED(mfmsr()))
+		tm_reclaim_current(0);
+#endif
+
 	memset(regs->gpr, 0, sizeof(regs->gpr));
 	regs->ctr = 0;
 	regs->link = 0;
arch/powerpc/kernel/prom_init.c +1 -1
index ccd2037c797f..6ee4b72cda42 100644
@@ -719,7 +719,7 @@ unsigned char ibm_architecture_vec[] = {
 	 * must match by the macro below. Update the definition if
 	 * the structure layout changes.
 	 */
-#define IBM_ARCH_VEC_NRCORES_OFFSET	125
+#define IBM_ARCH_VEC_NRCORES_OFFSET	133
 	W(NR_CPUS),			/* number of cores supported */
 	0,
 	0,
arch/powerpc/platforms/pseries/iommu.c +12 -12
index bd98ce2be17b..3e8865b187de 100644
@@ -912,7 +912,8 @@ machine_arch_initcall(pseries, find_existing_ddw_windows);
 static int query_ddw(struct pci_dev *dev, const u32 *ddw_avail,
 			struct ddw_query_response *query)
 {
-	struct eeh_dev *edev;
+	struct device_node *dn;
+	struct pci_dn *pdn;
 	u32 cfg_addr;
 	u64 buid;
 	int ret;
@@ -923,11 +924,10 @@ static int query_ddw(struct pci_dev *dev, const u32 *ddw_avail,
 	 * Retrieve them from the pci device, not the node with the
 	 * dma-window property
 	 */
-	edev = pci_dev_to_eeh_dev(dev);
-	cfg_addr = edev->config_addr;
-	if (edev->pe_config_addr)
-		cfg_addr = edev->pe_config_addr;
-	buid = edev->phb->buid;
+	dn = pci_device_to_OF_node(dev);
+	pdn = PCI_DN(dn);
+	buid = pdn->phb->buid;
+	cfg_addr = ((pdn->busno << 16) | (pdn->devfn << 8));
 
 	ret = rtas_call(ddw_avail[0], 3, 5, (u32 *)query,
 		  cfg_addr, BUID_HI(buid), BUID_LO(buid));
@@ -941,7 +941,8 @@ static int create_ddw(struct pci_dev *dev, const u32 *ddw_avail,
 			struct ddw_create_response *create, int page_shift,
 			int window_shift)
 {
-	struct eeh_dev *edev;
+	struct device_node *dn;
+	struct pci_dn *pdn;
 	u32 cfg_addr;
 	u64 buid;
 	int ret;
@@ -952,11 +953,10 @@ static int create_ddw(struct pci_dev *dev, const u32 *ddw_avail,
 	 * Retrieve them from the pci device, not the node with the
 	 * dma-window property
 	 */
-	edev = pci_dev_to_eeh_dev(dev);
-	cfg_addr = edev->config_addr;
-	if (edev->pe_config_addr)
-		cfg_addr = edev->pe_config_addr;
-	buid = edev->phb->buid;
+	dn = pci_device_to_OF_node(dev);
+	pdn = PCI_DN(dn);
+	buid = pdn->phb->buid;
+	cfg_addr = ((pdn->busno << 16) | (pdn->devfn << 8));
 
 	do {
 		/* extra outputs are LIOBN and dma-addr (hi, lo) */
arch/s390/include/asm/fpu/api.h +1 -1
index 5e04f3cbd320..8ae236b0f80b 100644
@@ -22,7 +22,7 @@ static inline int test_fp_ctl(u32 fpc)
 		"	la	%0,0\n"
 		"1:\n"
 		EX_TABLE(0b,1b)
-		: "=d" (rc), "=d" (orig_fpc)
+		: "=d" (rc), "=&d" (orig_fpc)
 		: "d" (fpc), "0" (-EINVAL));
 	return rc;
 }
arch/s390/kernel/ipl.c +0 -7
index f20abdb5630a..d14069d4b88d 100644
@@ -2064,12 +2064,5 @@ void s390_reset_system(void)
 	S390_lowcore.program_new_psw.addr =
 		(unsigned long) s390_base_pgm_handler;
 
-	/*
-	 * Clear subchannel ID and number to signal new kernel that no CCW or
-	 * SCSI IPL has been done (for kexec and kdump)
-	 */
-	S390_lowcore.subchannel_id = 0;
-	S390_lowcore.subchannel_nr = 0;
-
 	do_reset_calls();
 }
arch/s390/mm/pgtable.c +1 -1
index 4324b87f9398..9f0ce0e6eeb4 100644
@@ -437,7 +437,7 @@ void ptep_zap_unused(struct mm_struct *mm, unsigned long addr,
 	pgste = pgste_get_lock(ptep);
 	pgstev = pgste_val(pgste);
 	pte = *ptep;
-	if (pte_swap(pte) &&
+	if (!reset && pte_swap(pte) &&
 	    ((pgstev & _PGSTE_GPS_USAGE_MASK) == _PGSTE_GPS_USAGE_UNUSED ||
 	     (pgstev & _PGSTE_GPS_ZERO))) {
 		ptep_zap_swap_entry(mm, pte_to_swp_entry(pte));
arch/x86/boot/Makefile +3 -0
index b1ef9e489084..b67f9e8b93a6 100644
@@ -171,6 +171,9 @@ isoimage: $(obj)/bzImage
 	for i in lib lib64 share end ; do \
 		if [ -f /usr/$$i/syslinux/isolinux.bin ] ; then \
 			cp /usr/$$i/syslinux/isolinux.bin $(obj)/isoimage ; \
+			if [ -f /usr/$$i/syslinux/ldlinux.c32 ]; then \
+				cp /usr/$$i/syslinux/ldlinux.c32 $(obj)/isoimage ; \
+			fi ; \
 			break ; \
 		fi ; \
 		if [ $$i = end ] ; then exit 1 ; fi ; \
arch/x86/events/core.c +6 -5
index 041e442a3e28..7eb806ca6b03 100644
@@ -2313,7 +2313,7 @@ void
 perf_callchain_user(struct perf_callchain_entry *entry, struct pt_regs *regs)
 {
 	struct stack_frame frame;
-	const void __user *fp;
+	const unsigned long __user *fp;
 
 	if (perf_guest_cbs && perf_guest_cbs->is_in_guest()) {
 		/* TODO: We don't support guest os callchain now */
@@ -2326,7 +2326,7 @@ perf_callchain_user(struct perf_callchain_entry *entry, struct pt_regs *regs)
 	if (regs->flags & (X86_VM_MASK | PERF_EFLAGS_VM))
 		return;
 
-	fp = (void __user *)regs->bp;
+	fp = (unsigned long __user *)regs->bp;
 
 	perf_callchain_store(entry, regs->ip);
 
@@ -2339,16 +2339,17 @@ perf_callchain_user(struct perf_callchain_entry *entry, struct pt_regs *regs)
 	pagefault_disable();
 	while (entry->nr < PERF_MAX_STACK_DEPTH) {
 		unsigned long bytes;
+
 		frame.next_frame	     = NULL;
 		frame.return_address = 0;
 
-		if (!access_ok(VERIFY_READ, fp, 16))
+		if (!access_ok(VERIFY_READ, fp, sizeof(*fp) * 2))
 			break;
 
-		bytes = __copy_from_user_nmi(&frame.next_frame, fp, 8);
+		bytes = __copy_from_user_nmi(&frame.next_frame, fp, sizeof(*fp));
 		if (bytes != 0)
 			break;
-		bytes = __copy_from_user_nmi(&frame.return_address, fp+8, 8);
+		bytes = __copy_from_user_nmi(&frame.return_address, fp + 1, sizeof(*fp));
 		if (bytes != 0)
 			break;
 
arch/x86/events/intel/rapl.c +1 -1
index 1705c9d75e44..78ee9ebe38dd 100644
@@ -665,7 +665,7 @@ static void __init cleanup_rapl_pmus(void)
 	int i;
 
 	for (i = 0; i < rapl_pmus->maxpkg; i++)
-		kfree(rapl_pmus->pmus + i);
+		kfree(rapl_pmus->pmus[i]);
 	kfree(rapl_pmus);
 }
 
arch/x86/include/asm/msr.h +2 -2
index 7a79ee2778b3..33c709ca2666 100644
@@ -112,7 +112,7 @@ static inline void native_write_msr(unsigned int msr,
 				    unsigned low, unsigned high)
 {
 	asm volatile("wrmsr" : : "c" (msr), "a"(low), "d" (high) : "memory");
-	if (msr_tracepoint_active(__tracepoint_read_msr))
+	if (msr_tracepoint_active(__tracepoint_write_msr))
 		do_trace_write_msr(msr, ((u64)high << 32 | low), 0);
 }
 
@@ -131,7 +131,7 @@ notrace static inline int native_write_msr_safe(unsigned int msr,
 		     : "c" (msr), "0" (low), "d" (high),
 		       [fault] "i" (-EIO)
 		     : "memory");
-	if (msr_tracepoint_active(__tracepoint_read_msr))
+	if (msr_tracepoint_active(__tracepoint_write_msr))
 		do_trace_write_msr(msr, ((u64)high << 32 | low), err);
 	return err;
 }
arch/x86/kernel/amd_nb.c +2 -2
index a147e676fc7b..e991d5c8bb3a 100644
@@ -71,8 +71,8 @@ int amd_cache_northbridges(void)
 	while ((misc = next_northbridge(misc, amd_nb_misc_ids)) != NULL)
 		i++;
 
-	if (i == 0)
-		return 0;
+	if (!i)
+		return -ENODEV;
 
 	nb = kzalloc(i * sizeof(struct amd_northbridge), GFP_KERNEL);
 	if (!nb)
arch/x86/kernel/kprobes/core.c +12 -0
index ae703acb85c1..44bcd5779ec1 100644
@@ -960,7 +960,19 @@ int kprobe_fault_handler(struct pt_regs *regs, int trapnr)
 		 * normal page fault.
 		 */
 		regs->ip = (unsigned long)cur->addr;
+		/*
+		 * Trap flag (TF) has been set here because this fault
+		 * happened where the single stepping will be done.
+		 * So clear it by resetting the current kprobe:
+		 */
+		regs->flags &= ~X86_EFLAGS_TF;
+
+		/*
+		 * If the TF flag was set before the kprobe hit,
+		 * don't touch it:
+		 */
 		regs->flags |= kcb->kprobe_old_flags;
+
 		if (kcb->kprobe_status == KPROBE_REENTER)
 			restore_previous_kprobe(kcb);
 		else
arch/x86/kvm/vmx.c +21 -17
index faf52bac1416..c4217a23a98d 100644
@@ -2072,7 +2072,8 @@ static void vmx_vcpu_pi_load(struct kvm_vcpu *vcpu, int cpu)
 	unsigned int dest;
 
 	if (!kvm_arch_has_assigned_device(vcpu->kvm) ||
-		!irq_remapping_cap(IRQ_POSTING_CAP))
+		!irq_remapping_cap(IRQ_POSTING_CAP)  ||
+		!kvm_vcpu_apicv_active(vcpu))
 		return;
 
 	do {
@@ -2180,7 +2181,8 @@ static void vmx_vcpu_pi_put(struct kvm_vcpu *vcpu)
 	struct pi_desc *pi_desc = vcpu_to_pi_desc(vcpu);
 
 	if (!kvm_arch_has_assigned_device(vcpu->kvm) ||
-		!irq_remapping_cap(IRQ_POSTING_CAP))
+		!irq_remapping_cap(IRQ_POSTING_CAP)  ||
+		!kvm_vcpu_apicv_active(vcpu))
 		return;
 
 	/* Set SN when the vCPU is preempted */
@@ -6657,7 +6659,13 @@ static int get_vmx_mem_address(struct kvm_vcpu *vcpu,
 
 	/* Checks for #GP/#SS exceptions. */
 	exn = false;
-	if (is_protmode(vcpu)) {
+	if (is_long_mode(vcpu)) {
+		/* Long mode: #GP(0)/#SS(0) if the memory address is in a
+		 * non-canonical form. This is the only check on the memory
+		 * destination for long mode!
+		 */
+		exn = is_noncanonical_address(*ret);
+	} else if (is_protmode(vcpu)) {
 		/* Protected mode: apply checks for segment validity in the
 		 * following order:
 		 * - segment type check (#GP(0) may be thrown)
@@ -6674,17 +6682,10 @@ static int get_vmx_mem_address(struct kvm_vcpu *vcpu,
 			 * execute-only code segment
 			 */
 			exn = ((s.type & 0xa) == 8);
-	}
-	if (exn) {
-		kvm_queue_exception_e(vcpu, GP_VECTOR, 0);
-		return 1;
-	}
-	if (is_long_mode(vcpu)) {
-		/* Long mode: #GP(0)/#SS(0) if the memory address is in a
-		 * non-canonical form. This is an only check for long mode.
-		 */
-		exn = is_noncanonical_address(*ret);
-	} else if (is_protmode(vcpu)) {
+		if (exn) {
+			kvm_queue_exception_e(vcpu, GP_VECTOR, 0);
+			return 1;
+		}
 		/* Protected mode: #GP(0)/#SS(0) if the segment is unusable.
 		 */
 		exn = (s.unusable != 0);
@@ -10702,7 +10703,8 @@ static int vmx_pre_block(struct kvm_vcpu *vcpu)
 	struct pi_desc *pi_desc = vcpu_to_pi_desc(vcpu);
 
 	if (!kvm_arch_has_assigned_device(vcpu->kvm) ||
-		!irq_remapping_cap(IRQ_POSTING_CAP))
+		!irq_remapping_cap(IRQ_POSTING_CAP)  ||
+		!kvm_vcpu_apicv_active(vcpu))
 		return 0;
 
 	vcpu->pre_pcpu = vcpu->cpu;
@@ -10768,7 +10770,8 @@ static void vmx_post_block(struct kvm_vcpu *vcpu)
 	unsigned long flags;
 
 	if (!kvm_arch_has_assigned_device(vcpu->kvm) ||
-		!irq_remapping_cap(IRQ_POSTING_CAP))
+		!irq_remapping_cap(IRQ_POSTING_CAP)  ||
+		!kvm_vcpu_apicv_active(vcpu))
 		return;
 
 	do {
@@ -10821,7 +10824,8 @@ static int vmx_update_pi_irte(struct kvm *kvm, unsigned int host_irq,
 	int idx, ret = -EINVAL;
 
 	if (!kvm_arch_has_assigned_device(kvm) ||
-		!irq_remapping_cap(IRQ_POSTING_CAP))
+		!irq_remapping_cap(IRQ_POSTING_CAP) ||
+		!kvm_vcpu_apicv_active(kvm->vcpus[0]))
 		return 0;
 
 	idx = srcu_read_lock(&kvm->irq_srcu);
crypto/rsa-pkcs1pad.c +2 -2
index ead8dc0d084e..8ba426635b1b 100644
@@ -102,10 +102,10 @@ struct pkcs1pad_inst_ctx {
 };
 
 struct pkcs1pad_request {
-	struct akcipher_request child_req;
-
 	struct scatterlist in_sg[3], out_sg[2];
 	uint8_t *in_buf, *out_buf;
+
+	struct akcipher_request child_req;
 };
 
 static int pkcs1pad_set_pub_key(struct crypto_akcipher *tfm, const void *key,
drivers/ata/libata-eh.c +1 -1
index 961acc788f44..91a9e6af2ec4 100644
@@ -606,7 +606,7 @@ void ata_scsi_error(struct Scsi_Host *host)
 	ata_scsi_port_error_handler(host, ap);
 
 	/* finish or retry handled scmd's and clean up */
-	WARN_ON(host->host_failed || !list_empty(&eh_work_q));
+	WARN_ON(!list_empty(&eh_work_q));
 
 	DPRINTK("EXIT\n");
 }
drivers/base/module.c +5 -3
index db930d3ee312..2a215780eda2 100644
@@ -24,10 +24,12 @@ static char *make_driver_name(struct device_driver *drv)
 
 static void module_create_drivers_dir(struct module_kobject *mk)
 {
-	if (!mk || mk->drivers_dir)
-		return;
+	static DEFINE_MUTEX(drivers_dir_mutex);
 
-	mk->drivers_dir = kobject_create_and_add("drivers", &mk->kobj);
+	mutex_lock(&drivers_dir_mutex);
+	if (mk && !mk->drivers_dir)
+		mk->drivers_dir = kobject_create_and_add("drivers", &mk->kobj);
+	mutex_unlock(&drivers_dir_mutex);
 }
 
 void module_add_driver(struct module *mod, struct device_driver *drv)
drivers/char/ipmi/ipmi_msghandler.c +6 -2
index 94fb407d8561..44b1bd6baa38 100644
@@ -3820,6 +3820,7 @@ static void handle_new_recv_msgs(ipmi_smi_t intf)
 	while (!list_empty(&intf->waiting_rcv_msgs)) {
 		smi_msg = list_entry(intf->waiting_rcv_msgs.next,
 				     struct ipmi_smi_msg, link);
+		list_del(&smi_msg->link);
 		if (!run_to_completion)
 			spin_unlock_irqrestore(&intf->waiting_rcv_msgs_lock,
 					       flags);
@@ -3829,11 +3830,14 @@ static void handle_new_recv_msgs(ipmi_smi_t intf)
 		if (rv > 0) {
 			/*
 			 * To preserve message order, quit if we
-			 * can't handle a message.
+			 * can't handle a message.  Add the message
+			 * back at the head, this is safe because this
+			 * tasklet is the only thing that pulls the
+			 * messages.
 			 */
+			list_add(&smi_msg->link, &intf->waiting_rcv_msgs);
 			break;
 		} else {
-			list_del(&smi_msg->link);
 			if (rv == 0)
 				/* Message handled */
 				ipmi_free_smi_msg(smi_msg);
drivers/crypto/qat/qat_common/Makefile +1 -0
index 29c7c53d2845..92561c87f349 100644
@@ -2,6 +2,7 @@ $(obj)/qat_rsapubkey-asn1.o: $(obj)/qat_rsapubkey-asn1.c \
 			     $(obj)/qat_rsapubkey-asn1.h
 $(obj)/qat_rsaprivkey-asn1.o: $(obj)/qat_rsaprivkey-asn1.c \
 			      $(obj)/qat_rsaprivkey-asn1.h
+$(obj)/qat_asym_algs.o: $(obj)/qat_rsapubkey-asn1.h $(obj)/qat_rsaprivkey-asn1.h
 
 clean-files += qat_rsapubkey-asn1.c qat_rsapubkey-asn1.h
 clean-files += qat_rsaprivkey-asn1.c qat_rsaprivkey-asn1.h
drivers/edac/edac_mc.c +2 -1
index 1472f48c8ac6..ff51b51d2fd4 100644
@@ -565,7 +565,8 @@ void edac_mc_reset_delay_period(unsigned long value)
 	list_for_each(item, &mc_devices) {
 		mci = list_entry(item, struct mem_ctl_info, link);
 
-		edac_mod_work(&mci->work, value);
+		if (mci->op_state == OP_RUNNING_POLL)
+			edac_mod_work(&mci->work, value);
 	}
 	mutex_unlock(&mem_ctls_mutex);
 }
drivers/edac/sb_edac.c +8 -5
index 8bf745d2da7e..b274fa2ffdec 100644
@@ -239,8 +239,11 @@ static const u32 rir_offset[MAX_RIR_RANGES][MAX_RIR_WAY] = {
 	{ 0x1a0, 0x1a4, 0x1a8, 0x1ac, 0x1b0, 0x1b4, 0x1b8, 0x1bc },
 };
 
-#define RIR_RNK_TGT(reg)		GET_BITFIELD(reg, 16, 19)
-#define RIR_OFFSET(reg)		GET_BITFIELD(reg,  2, 14)
+#define RIR_RNK_TGT(type, reg) (((type) == BROADWELL) ? \
+	GET_BITFIELD(reg, 20, 23) : GET_BITFIELD(reg, 16, 19))
+
+#define RIR_OFFSET(type, reg) (((type) == HASWELL || (type) == BROADWELL) ? \
+	GET_BITFIELD(reg,  2, 15) : GET_BITFIELD(reg,  2, 14))
 
 /* Device 16, functions 2-7 */
 
@@ -1916,14 +1919,14 @@ static void get_memory_layout(const struct mem_ctl_info *mci)
 				pci_read_config_dword(pvt->pci_tad[i],
 						      rir_offset[j][k],
 						      &reg);
-				tmp_mb = RIR_OFFSET(reg) << 6;
+				tmp_mb = RIR_OFFSET(pvt->info.type, reg) << 6;
 
 				gb = div_u64_rem(tmp_mb, 1024, &mb);
 				edac_dbg(0, "CH#%d RIR#%d INTL#%d, offset %u.%03u GB (0x%016Lx), tgt: %d, reg=0x%08x\n",
 					 i, j, k,
 					 gb, (mb*1000)/1024,
 					 ((u64)tmp_mb) << 20L,
-					 (u32)RIR_RNK_TGT(reg),
+					 (u32)RIR_RNK_TGT(pvt->info.type, reg),
 					 reg);
 			}
 		}
@@ -2256,7 +2259,7 @@ static int get_memory_error_data(struct mem_ctl_info *mci,
 	pci_read_config_dword(pvt->pci_tad[ch_add + base_ch],
 			      rir_offset[n_rir][idx],
 			      &reg);
-	*rank = RIR_RNK_TGT(reg);
+	*rank = RIR_RNK_TGT(pvt->info.type, reg);
 
 	edac_dbg(0, "RIR#%d: channel address 0x%08Lx < 0x%08Lx, RIR interleave %d, index %d\n",
 		 n_rir,
drivers/extcon/extcon-palmas.c +2 -0
index 8b3226dca1d9..caff46c0e214 100644
@@ -360,6 +360,8 @@ static int palmas_usb_probe(struct platform_device *pdev)
 
 	palmas_enable_irq(palmas_usb);
 	/* perform initial detection */
+	if (palmas_usb->enable_gpio_vbus_detection)
+		palmas_vbus_irq_handler(palmas_usb->gpio_vbus_irq, palmas_usb);
 	palmas_gpio_id_detect(&palmas_usb->wq_detectid.work);
 	device_set_wakeup_capable(&pdev->dev, true);
 	return 0;
drivers/gpio/gpio-sch.c +10 -11
index e85e7539cf5d..eb43ae4835c1 100644
@@ -61,9 +61,8 @@ static unsigned sch_gpio_bit(struct sch_gpio *sch, unsigned gpio)
 	return gpio % 8;
 }
 
-static int sch_gpio_reg_get(struct gpio_chip *gc, unsigned gpio, unsigned reg)
+static int sch_gpio_reg_get(struct sch_gpio *sch, unsigned gpio, unsigned reg)
 {
-	struct sch_gpio *sch = gpiochip_get_data(gc);
 	unsigned short offset, bit;
 	u8 reg_val;
 
@@ -75,10 +74,9 @@ static int sch_gpio_reg_get(struct gpio_chip *gc, unsigned gpio, unsigned reg)
 	return reg_val;
 }
 
-static void sch_gpio_reg_set(struct gpio_chip *gc, unsigned gpio, unsigned reg,
+static void sch_gpio_reg_set(struct sch_gpio *sch, unsigned gpio, unsigned reg,
 			     int val)
 {
-	struct sch_gpio *sch = gpiochip_get_data(gc);
 	unsigned short offset, bit;
 	u8 reg_val;
 
@@ -98,14 +96,15 @@ static int sch_gpio_direction_in(struct gpio_chip *gc, unsigned gpio_num)
 	struct sch_gpio *sch = gpiochip_get_data(gc);
 
 	spin_lock(&sch->lock);
-	sch_gpio_reg_set(gc, gpio_num, GIO, 1);
+	sch_gpio_reg_set(sch, gpio_num, GIO, 1);
 	spin_unlock(&sch->lock);
 	return 0;
 }
 
 static int sch_gpio_get(struct gpio_chip *gc, unsigned gpio_num)
 {
-	return sch_gpio_reg_get(gc, gpio_num, GLV);
+	struct sch_gpio *sch = gpiochip_get_data(gc);
+	return sch_gpio_reg_get(sch, gpio_num, GLV);
 }
 
 static void sch_gpio_set(struct gpio_chip *gc, unsigned gpio_num, int val)
@@ -113,7 +112,7 @@ static void sch_gpio_set(struct gpio_chip *gc, unsigned gpio_num, int val)
 	struct sch_gpio *sch = gpiochip_get_data(gc);
 
 	spin_lock(&sch->lock);
-	sch_gpio_reg_set(gc, gpio_num, GLV, val);
+	sch_gpio_reg_set(sch, gpio_num, GLV, val);
 	spin_unlock(&sch->lock);
 }
 
@@ -123,7 +122,7 @@ static int sch_gpio_direction_out(struct gpio_chip *gc, unsigned gpio_num,
 	struct sch_gpio *sch = gpiochip_get_data(gc);
 
 	spin_lock(&sch->lock);
-	sch_gpio_reg_set(gc, gpio_num, GIO, 0);
+	sch_gpio_reg_set(sch, gpio_num, GIO, 0);
 	spin_unlock(&sch->lock);
 
 	/*
@@ -182,13 +181,13 @@ static int sch_gpio_probe(struct platform_device *pdev)
 		 * GPIO7 is configured by the CMC as SLPIOVR
 		 * Enable GPIO[9:8] core powered gpios explicitly
 		 */
-		sch_gpio_reg_set(&sch->chip, 8, GEN, 1);
-		sch_gpio_reg_set(&sch->chip, 9, GEN, 1);
+		sch_gpio_reg_set(sch, 8, GEN, 1);
+		sch_gpio_reg_set(sch, 9, GEN, 1);
 		/*
 		 * SUS_GPIO[2:0] enabled by default
 		 * Enable SUS_GPIO3 resume powered gpio explicitly
 		 */
-		sch_gpio_reg_set(&sch->chip, 13, GEN, 1);
+		sch_gpio_reg_set(sch, 13, GEN, 1);
 		break;
 
 	case PCI_DEVICE_ID_INTEL_ITC_LPC:
drivers/gpio/gpiolib-legacy.c +4 -4
index 3a5c7011ad3b..8b830996fe02 100644
@@ -28,6 +28,10 @@ int gpio_request_one(unsigned gpio, unsigned long flags, const char *label)
 	if (!desc && gpio_is_valid(gpio))
 		return -EPROBE_DEFER;
 
+	err = gpiod_request(desc, label);
+	if (err)
+		return err;
+
 	if (flags & GPIOF_OPEN_DRAIN)
 		set_bit(FLAG_OPEN_DRAIN, &desc->flags);
 
@@ -37,10 +41,6 @@ int gpio_request_one(unsigned gpio, unsigned long flags, const char *label)
 	if (flags & GPIOF_ACTIVE_LOW)
 		set_bit(FLAG_ACTIVE_LOW, &desc->flags);
 
-	err = gpiod_request(desc, label);
-	if (err)
-		return err;
-
 	if (flags & GPIOF_DIR_IN)
 		err = gpiod_direction_input(desc);
 	else
drivers/gpio/gpiolib.c +27 -39

146 lines not on this page · raw message

drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c +1 -1
index 6043dc7c3a94..3e21732f22e3 100644
@@ -880,7 +880,7 @@ static int amdgpu_cgs_acpi_eval_object(void *cgs_device,
 	struct cgs_acpi_method_argument *argument = NULL;
 	uint32_t i, count;
 	acpi_status status;
-	int result;
+	int result = 0;
 	uint32_t func_no = 0xFFFFFFFF;
 
 	handle = ACPI_HANDLE(&adev->pdev->dev);
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +2 -1
index b04337de65d1..d78739d2952d 100644
@@ -448,7 +448,8 @@ static int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_file
 			dev_info.max_memory_clock = adev->pm.default_mclk * 10;
 		}
 		dev_info.enabled_rb_pipes_mask = adev->gfx.config.backend_enable_mask;
-		dev_info.num_rb_pipes = adev->gfx.config.num_rbs;
+		dev_info.num_rb_pipes = adev->gfx.config.max_backends_per_se *
+			adev->gfx.config.max_shader_engines;
 		dev_info.num_hw_gfx_contexts = adev->gfx.config.max_hw_contexts;
 		dev_info._pad = 0;
 		dev_info.ids_flags = 0;
drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c +1 -1
index bb8709066fd8..d2216f83bd7a 100644
@@ -5074,7 +5074,7 @@ static int gfx_v7_0_eop_irq(struct amdgpu_device *adev,
 	case 2:
 		for (i = 0; i < adev->gfx.num_compute_rings; i++) {
 			ring = &adev->gfx.compute_ring[i];
-			if ((ring->me == me_id) & (ring->pipe == pipe_id))
+			if ((ring->me == me_id) && (ring->pipe == pipe_id))
 				amdgpu_fence_process(ring);
 		}
 		break;
drivers/gpu/drm/amd/amdkfd/kfd_process.c +43 -27

98 lines not on this page · raw message

drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c +5 -1
index fa208ada6892..efb77eda7508 100644
@@ -306,10 +306,14 @@ int phm_store_dal_configuration_data(struct pp_hwmgr *hwmgr,
 {
 	PHM_FUNC_CHECK(hwmgr);
 
-	if (hwmgr->hwmgr_func->store_cc6_data == NULL)
+	if (display_config == NULL)
 		return -EINVAL;
 
 	hwmgr->display_config = *display_config;
+
+	if (hwmgr->hwmgr_func->store_cc6_data == NULL)
+		return -EINVAL;
+
 	/* to do pass other display configuration in furture */
 
 	if (hwmgr->hwmgr_func->store_cc6_data)
drivers/gpu/drm/amd/powerplay/hwmgr/pp_acpi.c +16 -2
index 7b2d5000292d..7cce483b0859 100644
@@ -21,6 +21,20 @@ bool acpi_atcs_functions_supported(void *device, uint32_t index)
 	return result == 0 ? (output_buf.function_bits & (1 << (index - 1))) != 0 : false;
 }
 
+bool acpi_atcs_notify_pcie_device_ready(void *device)
+{
+	int32_t temp_buffer = 1;
+
+	return cgs_call_acpi_method(device, CGS_ACPI_METHOD_ATCS,
+				ATCS_FUNCTION_PCIE_DEVICE_READY_NOTIFICATION,
+						&temp_buffer,
+						NULL,
+						0,
+						sizeof(temp_buffer),
+						0);
+}
+
+
 int acpi_pcie_perf_request(void *device, uint8_t perf_req, bool advertise)
 {
 	struct atcs_pref_req_input atcs_input;
@@ -29,7 +43,7 @@ int acpi_pcie_perf_request(void *device, uint8_t perf_req, bool advertise)
 	int result;
 	struct cgs_system_info info = {0};
 
-	if (!acpi_atcs_functions_supported(device, ATCS_FUNCTION_PCIE_PERFORMANCE_REQUEST))
+	if( 0 != acpi_atcs_notify_pcie_device_ready(device))
 		return -EINVAL;
 
 	info.size = sizeof(struct cgs_system_info);
@@ -54,7 +68,7 @@ int acpi_pcie_perf_request(void *device, uint8_t perf_req, bool advertise)
 						ATCS_FUNCTION_PCIE_PERFORMANCE_REQUEST,
 						&atcs_input,
 						&atcs_output,
-						0,
+						1,
 						sizeof(atcs_input),
 						sizeof(atcs_output));
 		if (result != 0)
drivers/gpu/drm/amd/powerplay/hwmgr/tonga_hwmgr.c +1 -1
index 0d5d8372953e..aae2e8ec0542 100644
@@ -1298,7 +1298,7 @@ static int tonga_populate_smc_mvdd_table(struct pp_hwmgr *hwmgr,
 			table->Smio[count] |=
 				data->mvdd_voltage_table.entries[count].smio_low;
 		}
-		table->SmioMask2 = data->vddci_voltage_table.mask_low;
+		table->SmioMask2 = data->mvdd_voltage_table.mask_low;
 
 		CONVERT_FROM_HOST_TO_SMC_UL(table->MvddLevelCount);
 	}
drivers/gpu/drm/amd/powerplay/hwmgr/tonga_processpptables.c +1 -1
index b156481b50e8..17766e8da0ca 100644
@@ -299,7 +299,7 @@ static int init_dpm_2_parameters(
 			(((unsigned long)powerplay_table) + le16_to_cpu(powerplay_table->usPPMTableOffset));
 
 		if (0 != powerplay_table->usPPMTableOffset) {
-			if (1 == get_platform_power_management_table(hwmgr, atom_ppm_table)) {
+			if (get_platform_power_management_table(hwmgr, atom_ppm_table) == 0) {
 				phm_cap_set(hwmgr->platform_descriptor.platformCaps,
 					PHM_PlatformCaps_EnablePlatformPowerManagement);
 			}
drivers/gpu/drm/amd/powerplay/inc/pp_acpi.h +1 -0
index 3bd5e69b9045..3df5de2cdab0 100644
@@ -26,3 +26,4 @@ extern bool acpi_atcs_functions_supported(void *device,
 extern int acpi_pcie_perf_request(void *device,
 						uint8_t perf_req,
 						bool advertise);
+extern bool acpi_atcs_notify_pcie_device_ready(void *device);
drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c +2 -0
index d65dcaee3832..6d9c0f5bcba6 100644
@@ -335,6 +335,8 @@ atmel_hlcdc_plane_update_pos_and_size(struct atmel_hlcdc_plane *plane,
 
 		atmel_hlcdc_layer_update_cfg(&plane->layer, 13, 0xffffffff,
 					     factor_reg);
+	} else {
+		atmel_hlcdc_layer_update_cfg(&plane->layer, 13, 0xffffffff, 0);
 	}
 }
 
drivers/gpu/drm/drm_atomic.c +28 -2
index d307d9627887..080a09014580 100644
@@ -354,6 +354,8 @@ int drm_atomic_set_mode_prop_for_crtc(struct drm_crtc_state *state,
 	drm_property_unreference_blob(state->mode_blob);
 	state->mode_blob = NULL;
 
+	memset(&state->mode, 0, sizeof(state->mode));
+
 	if (blob) {
 		if (blob->length != sizeof(struct drm_mode_modeinfo) ||
 		    drm_mode_convert_umode(&state->mode,
@@ -366,7 +368,6 @@ int drm_atomic_set_mode_prop_for_crtc(struct drm_crtc_state *state,
 		DRM_DEBUG_ATOMIC("Set [MODE:%s] for CRTC state %p\n",
 				 state->mode.name, state);
 	} else {
-		memset(&state->mode, 0, sizeof(state->mode));
 		state->enable = false;
 		DRM_DEBUG_ATOMIC("Set [NOMODE] for CRTC state %p\n",
 				 state);
@@ -1287,14 +1288,39 @@ EXPORT_SYMBOL(drm_atomic_add_affected_planes);
  */
 void drm_atomic_legacy_backoff(struct drm_atomic_state *state)
 {
+	struct drm_device *dev = state->dev;
+	unsigned crtc_mask = 0;
+	struct drm_crtc *crtc;
 	int ret;
+	bool global = false;
+
+	drm_for_each_crtc(crtc, dev) {
+		if (crtc->acquire_ctx != state->acquire_ctx)
+			continue;
+
+		crtc_mask |= drm_crtc_mask(crtc);
+		crtc->acquire_ctx = NULL;
+	}
+
+	if (WARN_ON(dev->mode_config.acquire_ctx == state->acquire_ctx)) {
+		global = true;
+
+		dev->mode_config.acquire_ctx = NULL;
+	}
 
 retry:
 	drm_modeset_backoff(state->acquire_ctx);
 
-	ret = drm_modeset_lock_all_ctx(state->dev, state->acquire_ctx);
+	ret = drm_modeset_lock_all_ctx(dev, state->acquire_ctx);
 	if (ret)
 		goto retry;
+
+	drm_for_each_crtc(crtc, dev)
+		if (drm_crtc_mask(crtc) & crtc_mask)
+			crtc->acquire_ctx = state->acquire_ctx;
+
+	if (global)
+		dev->mode_config.acquire_ctx = state->acquire_ctx;
 }
 EXPORT_SYMBOL(drm_atomic_legacy_backoff);
 
drivers/gpu/drm/drm_crtc.c +0 -2
index f30de8053545..691a1b939c1c 100644
@@ -2800,8 +2800,6 @@ int drm_mode_setcrtc(struct drm_device *dev, void *data,
 			goto out;
 		}
 
-		drm_mode_set_crtcinfo(mode, CRTC_INTERLACE_HALVE_V);
-
 		/*
 		 * Check whether the primary plane supports the fb pixel format.
 		 * Drivers not implementing the universal planes API use a
drivers/gpu/drm/drm_dp_mst_topology.c +3 -5
index 71ea0521ea96..ccfe7e72d8fc 100644
@@ -2908,11 +2908,9 @@ static void drm_dp_destroy_connector_work(struct work_struct *work)
 		drm_dp_port_teardown_pdt(port, port->pdt);
 
 		if (!port->input && port->vcpi.vcpi > 0) {
-			if (mgr->mst_state) {
-				drm_dp_mst_reset_vcpi_slots(mgr, port);
-				drm_dp_update_payload_part1(mgr);
-				drm_dp_mst_put_payload_id(mgr, port->vcpi.vcpi);
-			}
+			drm_dp_mst_reset_vcpi_slots(mgr, port);
+			drm_dp_update_payload_part1(mgr);
+			drm_dp_mst_put_payload_id(mgr, port->vcpi.vcpi);
 		}
 
 		kref_put(&port->kref, drm_dp_free_mst_port);
drivers/gpu/drm/drm_fb_cma_helper.c +1 -1
index bb88e3df9257..e619b00c7343 100644
@@ -301,7 +301,7 @@ static int drm_fbdev_cma_create(struct drm_fb_helper *helper,
 err_fb_info_destroy:
 	drm_fb_helper_release_fbi(helper);
 err_gem_free_object:
-	dev->driver->gem_free_object(&obj->base);
+	drm_gem_object_unreference_unlocked(&obj->base);
 	return ret;
 }
 
drivers/gpu/drm/drm_gem_cma_helper.c +3 -9
index 1f500a1b9969..d988ca0b597a 100644
@@ -121,7 +121,7 @@ struct drm_gem_cma_object *drm_gem_cma_create(struct drm_device *drm,
 	return cma_obj;
 
 error:
-	drm->driver->gem_free_object(&cma_obj->base);
+	drm_gem_object_unreference_unlocked(&cma_obj->base);
 	return ERR_PTR(ret);
 }
 EXPORT_SYMBOL_GPL(drm_gem_cma_create);
@@ -162,18 +162,12 @@ drm_gem_cma_create_with_handle(struct drm_file *file_priv,
 	 * and handle has the id what user can see.
 	 */
 	ret = drm_gem_handle_create(file_priv, gem_obj, handle);
-	if (ret)
-		goto err_handle_create;
-
 	/* drop reference from allocate - handle holds it now. */
 	drm_gem_object_unreference_unlocked(gem_obj);
+	if (ret)
+		return ERR_PTR(ret);
 
 	return cma_obj;
-
-err_handle_create:
-	drm->driver->gem_free_object(gem_obj);
-
-	return ERR_PTR(ret);
 }
 
 /**
drivers/gpu/drm/drm_modes.c +2 -0
index f7448a5e95a9..5d0fc2644352 100644
@@ -1518,6 +1518,8 @@ int drm_mode_convert_umode(struct drm_display_mode *out,
 	if (out->status != MODE_OK)
 		goto out;
 
+	drm_mode_set_crtcinfo(out, CRTC_INTERLACE_HALVE_V);
+
 	ret = 0;
 
 out:
drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c +2 -1
index e8d9337a66d8..77886f1182f1 100644
@@ -40,9 +40,10 @@ static const struct regmap_config fsl_dcu_regmap_config = {
 	.reg_bits = 32,
 	.reg_stride = 4,
 	.val_bits = 32,
-	.cache_type = REGCACHE_RBTREE,
+	.cache_type = REGCACHE_FLAT,
 
 	.volatile_reg = fsl_dcu_drm_is_volatile_reg,
+	.max_register = 0x11fc,
 };
 
 static int fsl_dcu_drm_irq_init(struct drm_device *dev)
drivers/gpu/drm/i915/i915_gem_shrinker.c +1 -1
index d3c473ffb90a..3af40616bf8b 100644
@@ -39,7 +39,7 @@ static bool mutex_is_locked_by(struct mutex *mutex, struct task_struct *task)
 	if (!mutex_is_locked(mutex))
 		return false;
 
-#if defined(CONFIG_SMP) || defined(CONFIG_DEBUG_MUTEXES)
+#if defined(CONFIG_DEBUG_MUTEXES) || defined(CONFIG_MUTEX_SPIN_ON_OWNER)
 	return mutex->owner == task;
 #else
 	/* Since UP may be pre-empted, we cannot assume that we own the lock */
drivers/gpu/drm/i915/intel_display.c +34 -14

86 lines not on this page · raw message

drivers/gpu/drm/i915/intel_dp.c +5 -6
index 412a34c39522..69054ef978fa 100644
@@ -4942,13 +4942,15 @@ static void intel_edp_panel_vdd_sanitize(struct intel_dp *intel_dp)
 
 void intel_dp_encoder_reset(struct drm_encoder *encoder)
 {
-	struct intel_dp *intel_dp;
+	struct drm_i915_private *dev_priv = to_i915(encoder->dev);
+	struct intel_dp *intel_dp = enc_to_intel_dp(encoder);
+
+	if (!HAS_DDI(dev_priv))
+		intel_dp->DP = I915_READ(intel_dp->output_reg);
 
 	if (to_intel_encoder(encoder)->type != INTEL_OUTPUT_EDP)
 		return;
 
-	intel_dp = enc_to_intel_dp(encoder);
-
 	pps_lock(intel_dp);
 
 	/*
@@ -5020,9 +5022,6 @@ intel_dp_hpd_pulse(struct intel_digital_port *intel_dig_port, bool long_hpd)
 	intel_display_power_get(dev_priv, power_domain);
 
 	if (long_hpd) {
-		/* indicate that we need to restart link training */
-		intel_dp->train_set_valid = false;
-
 		if (!intel_digital_port_connected(dev_priv, intel_dig_port))
 			goto mst_fail;
 
drivers/gpu/drm/i915/intel_dp_link_training.c +2 -23
index 0b8eefc2acc5..926a1e6ea2f6 100644
@@ -85,8 +85,7 @@ static bool
 intel_dp_reset_link_train(struct intel_dp *intel_dp,
 			uint8_t dp_train_pat)
 {
-	if (!intel_dp->train_set_valid)
-		memset(intel_dp->train_set, 0, sizeof(intel_dp->train_set));
+	memset(intel_dp->train_set, 0, sizeof(intel_dp->train_set));
 	intel_dp_set_signal_levels(intel_dp);
 	return intel_dp_set_link_train(intel_dp, dp_train_pat);
 }
@@ -161,22 +160,6 @@ intel_dp_link_training_clock_recovery(struct intel_dp *intel_dp)
 			break;
 		}
 
-		/*
-		 * if we used previously trained voltage and pre-emphasis values
-		 * and we don't get clock recovery, reset link training values
-		 */
-		if (intel_dp->train_set_valid) {
-			DRM_DEBUG_KMS("clock recovery not ok, reset");
-			/* clear the flag as we are not reusing train set */
-			intel_dp->train_set_valid = false;
-			if (!intel_dp_reset_link_train(intel_dp,
-						       DP_TRAINING_PATTERN_1 |
-						       DP_LINK_SCRAMBLING_DISABLE)) {
-				DRM_ERROR("failed to enable link training\n");
-				return;
-			}
-			continue;
-		}
 
 		/* Check to see if we've tried the max voltage */
 		for (i = 0; i < intel_dp->lane_count; i++)
@@ -284,7 +267,6 @@ intel_dp_link_training_channel_equalization(struct intel_dp *intel_dp)
 		/* Make sure clock is still ok */
 		if (!drm_dp_clock_recovery_ok(link_status,
 					      intel_dp->lane_count)) {
-			intel_dp->train_set_valid = false;
 			intel_dp_link_training_clock_recovery(intel_dp);
 			intel_dp_set_link_train(intel_dp,
 						training_pattern |
@@ -301,7 +283,6 @@ intel_dp_link_training_channel_equalization(struct intel_dp *intel_dp)
 
 		/* Try 5 times, then try clock recovery if that fails */
 		if (tries > 5) {
-			intel_dp->train_set_valid = false;
 			intel_dp_link_training_clock_recovery(intel_dp);
 			intel_dp_set_link_train(intel_dp,
 						training_pattern |
@@ -322,10 +303,8 @@ intel_dp_link_training_channel_equalization(struct intel_dp *intel_dp)
 
 	intel_dp_set_idle_link_train(intel_dp);
 
-	if (channel_eq) {
-		intel_dp->train_set_valid = true;
+	if (channel_eq)
 		DRM_DEBUG_KMS("Channel EQ done. DP Training successful\n");
-	}
 }
 
 void intel_dp_stop_link_train(struct intel_dp *intel_dp)
drivers/gpu/drm/i915/intel_drv.h +0 -2
index 3a30b37d6885..8dd2cc56451f 100644
@@ -811,8 +811,6 @@ struct intel_dp {
 	/* This is called before a link training is starterd */
 	void (*prepare_link_retrain)(struct intel_dp *intel_dp);
 
-	bool train_set_valid;
-
 	/* Displayport compliance testing */
 	unsigned long compliance_test_type;
 	unsigned long compliance_test_data;
drivers/gpu/drm/i915/intel_fbc.c +1 -2
index 0f0492f4a357..28f4407722a1 100644
@@ -823,8 +823,7 @@ static bool intel_fbc_can_choose(struct intel_crtc *crtc)
 {
 	struct drm_i915_private *dev_priv = crtc->base.dev->dev_private;
 	struct intel_fbc *fbc = &dev_priv->fbc;
-	bool enable_by_default = IS_HASWELL(dev_priv) ||
-				 IS_BROADWELL(dev_priv);
+	bool enable_by_default = IS_BROADWELL(dev_priv);
 
 	if (intel_vgpu_active(dev_priv->dev)) {
 		fbc->no_fbc_reason = "VGPU is active";
drivers/gpu/drm/mgag200/mgag200_mode.c +9 -1
index 14e64e08909e..d347dca17267 100644
@@ -182,7 +182,7 @@ static int mga_g200se_set_plls(struct mga_device *mdev, long clock)
 			}
 		}
 
-		fvv = pllreffreq * testn / testm;
+		fvv = pllreffreq * (n + 1) / (m + 1);
 		fvv = (fvv - 800000) / 50000;
 
 		if (fvv > 15)
@@ -202,6 +202,14 @@ static int mga_g200se_set_plls(struct mga_device *mdev, long clock)
 	WREG_DAC(MGA1064_PIX_PLLC_M, m);
 	WREG_DAC(MGA1064_PIX_PLLC_N, n);
 	WREG_DAC(MGA1064_PIX_PLLC_P, p);
+
+	if (mdev->unique_rev_id >= 0x04) {
+		WREG_DAC(0x1a, 0x09);
+		msleep(20);
+		WREG_DAC(0x1a, 0x01);
+
+	}
+
 	return 0;
 }
 
drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/disp.h +3 -2
index db10c11f0595..c5a6ebd5a478 100644
@@ -25,7 +25,8 @@ u16 nvbios_outp_match(struct nvkm_bios *, u16 type, u16 mask,
 		      u8 *ver, u8 *hdr, u8 *cnt, u8 *len, struct nvbios_outp *);
 
 struct nvbios_ocfg {
-	u16 match;
+	u8  proto;
+	u8  flags;
 	u16 clkcmp[2];
 };
 
@@ -33,7 +34,7 @@ u16 nvbios_ocfg_entry(struct nvkm_bios *, u16 outp, u8 idx,
 		      u8 *ver, u8 *hdr, u8 *cnt, u8 *len);
 u16 nvbios_ocfg_parse(struct nvkm_bios *, u16 outp, u8 idx,
 		      u8 *ver, u8 *hdr, u8 *cnt, u8 *len, struct nvbios_ocfg *);
-u16 nvbios_ocfg_match(struct nvkm_bios *, u16 outp, u16 type,
+u16 nvbios_ocfg_match(struct nvkm_bios *, u16 outp, u8 proto, u8 flags,
 		      u8 *ver, u8 *hdr, u8 *cnt, u8 *len, struct nvbios_ocfg *);
 u16 nvbios_oclk_match(struct nvkm_bios *, u16 cmp, u32 khz);
 #endif
drivers/gpu/drm/nouveau/nouveau_fbcon.c +2 -0
index 59f27e774acb..e40a1b07a014 100644
@@ -557,6 +557,8 @@ nouveau_fbcon_init(struct drm_device *dev)
 	if (ret)
 		goto fini;
 
+	if (fbcon->helper.fbdev)
+		fbcon->helper.fbdev->pixmap.buf_align = 4;
 	return 0;
 
 fini:
drivers/gpu/drm/nouveau/nv04_fbcon.c +2 -5
index 789dc2993b0d..8f715feadf56 100644
@@ -82,7 +82,6 @@ nv04_fbcon_imageblit(struct fb_info *info, const struct fb_image *image)
 	uint32_t fg;
 	uint32_t bg;
 	uint32_t dsize;
-	uint32_t width;
 	uint32_t *data = (uint32_t *)image->data;
 	int ret;
 
@@ -93,9 +92,6 @@ nv04_fbcon_imageblit(struct fb_info *info, const struct fb_image *image)
 	if (ret)
 		return ret;
 
-	width = ALIGN(image->width, 8);
-	dsize = ALIGN(width * image->height, 32) >> 5;
-
 	if (info->fix.visual == FB_VISUAL_TRUECOLOR ||
 	    info->fix.visual == FB_VISUAL_DIRECTCOLOR) {
 		fg = ((uint32_t *) info->pseudo_palette)[image->fg_color];
@@ -111,10 +107,11 @@ nv04_fbcon_imageblit(struct fb_info *info, const struct fb_image *image)
 			 ((image->dx + image->width) & 0xffff));
 	OUT_RING(chan, bg);
 	OUT_RING(chan, fg);
-	OUT_RING(chan, (image->height << 16) | width);
+	OUT_RING(chan, (image->height << 16) | image->width);
 	OUT_RING(chan, (image->height << 16) | image->width);
 	OUT_RING(chan, (image->dy << 16) | (image->dx & 0xffff));
 
+	dsize = ALIGN(image->width * image->height, 32) >> 5;
 	while (dsize) {
 		int iter_len = dsize > 128 ? 128 : dsize;
 
drivers/gpu/drm/nouveau/nv50_fbcon.c +2 -4
index e05499d6ed83..a4e259a00430 100644
@@ -95,7 +95,7 @@ nv50_fbcon_imageblit(struct fb_info *info, const struct fb_image *image)
 	struct nouveau_fbdev *nfbdev = info->par;
 	struct nouveau_drm *drm = nouveau_drm(nfbdev->dev);
 	struct nouveau_channel *chan = drm->channel;
-	uint32_t width, dwords, *data = (uint32_t *)image->data;
+	uint32_t dwords, *data = (uint32_t *)image->data;
 	uint32_t mask = ~(~0 >> (32 - info->var.bits_per_pixel));
 	uint32_t *palette = info->pseudo_palette;
 	int ret;
@@ -107,9 +107,6 @@ nv50_fbcon_imageblit(struct fb_info *info, const struct fb_image *image)
 	if (ret)
 		return ret;
 
-	width = ALIGN(image->width, 32);
-	dwords = (width * image->height) >> 5;
-
 	BEGIN_NV04(chan, NvSub2D, 0x0814, 2);
 	if (info->fix.visual == FB_VISUAL_TRUECOLOR ||
 	    info->fix.visual == FB_VISUAL_DIRECTCOLOR) {
@@ -128,6 +125,7 @@ nv50_fbcon_imageblit(struct fb_info *info, const struct fb_image *image)
 	OUT_RING(chan, 0);
 	OUT_RING(chan, image->dy);
 
+	dwords = ALIGN(image->width * image->height, 32) >> 5;
 	while (dwords) {
 		int push = dwords > 2047 ? 2047 : dwords;
 
drivers/gpu/drm/nouveau/nvc0_fbcon.c +2 -4
index c97395b4a312..f28315e865a5 100644
@@ -95,7 +95,7 @@ nvc0_fbcon_imageblit(struct fb_info *info, const struct fb_image *image)
 	struct nouveau_fbdev *nfbdev = info->par;
 	struct nouveau_drm *drm = nouveau_drm(nfbdev->dev);
 	struct nouveau_channel *chan = drm->channel;
-	uint32_t width, dwords, *data = (uint32_t *)image->data;
+	uint32_t dwords, *data = (uint32_t *)image->data;
 	uint32_t mask = ~(~0 >> (32 - info->var.bits_per_pixel));
 	uint32_t *palette = info->pseudo_palette;
 	int ret;
@@ -107,9 +107,6 @@ nvc0_fbcon_imageblit(struct fb_info *info, const struct fb_image *image)
 	if (ret)
 		return ret;
 
-	width = ALIGN(image->width, 32);
-	dwords = (width * image->height) >> 5;
-
 	BEGIN_NVC0(chan, NvSub2D, 0x0814, 2);
 	if (info->fix.visual == FB_VISUAL_TRUECOLOR ||
 	    info->fix.visual == FB_VISUAL_DIRECTCOLOR) {
@@ -128,6 +125,7 @@ nvc0_fbcon_imageblit(struct fb_info *info, const struct fb_image *image)
 	OUT_RING  (chan, 0);
 	OUT_RING  (chan, image->dy);
 
+	dwords = ALIGN(image->width * image->height, 32) >> 5;
 	while (dwords) {
 		int push = dwords > 2047 ? 2047 : dwords;
 
drivers/gpu/drm/nouveau/nvkm/engine/device/pci.c +1 -1
index 18fab3973ce5..62ad0300cfa5 100644
@@ -1614,7 +1614,7 @@ nvkm_device_pci_func = {
 	.fini = nvkm_device_pci_fini,
 	.resource_addr = nvkm_device_pci_resource_addr,
 	.resource_size = nvkm_device_pci_resource_size,
-	.cpu_coherent = !IS_ENABLED(CONFIG_ARM) && !IS_ENABLED(CONFIG_ARM64),
+	.cpu_coherent = !IS_ENABLED(CONFIG_ARM),
 };
 
 int
drivers/gpu/drm/nouveau/nvkm/engine/disp/Kbuild +1 -0
index a74c5dd27dc0..e2a64ed14b22 100644
@@ -18,6 +18,7 @@ nvkm-y += nvkm/engine/disp/piornv50.o
 nvkm-y += nvkm/engine/disp/sornv50.o
 nvkm-y += nvkm/engine/disp/sorg94.o
 nvkm-y += nvkm/engine/disp/sorgf119.o
+nvkm-y += nvkm/engine/disp/sorgm107.o
 nvkm-y += nvkm/engine/disp/sorgm200.o
 nvkm-y += nvkm/engine/disp/dport.o
 
drivers/gpu/drm/nouveau/nvkm/engine/disp/gf119.c +5 -8
index f0314664349c..5dd34382f55a 100644
@@ -76,6 +76,7 @@ exec_lookup(struct nv50_disp *disp, int head, int or, u32 ctrl,
 	mask |= 0x0001 << or;
 	mask |= 0x0100 << head;
 
+
 	list_for_each_entry(outp, &disp->base.outp, head) {
 		if ((outp->info.hasht & 0xff) == type &&
 		    (outp->info.hashm & mask) == mask) {
@@ -155,25 +156,21 @@ exec_clkcmp(struct nv50_disp *disp, int head, int id, u32 pclk, u32 *conf)
 	if (!outp)
 		return NULL;
 
+	*conf = (ctrl & 0x00000f00) >> 8;
 	switch (outp->info.type) {
 	case DCB_OUTPUT_TMDS:
-		*conf = (ctrl & 0x00000f00) >> 8;
 		if (*conf == 5)
 			*conf |= 0x0100;
 		break;
 	case DCB_OUTPUT_LVDS:
-		*conf = disp->sor.lvdsconf;
-		break;
-	case DCB_OUTPUT_DP:
-		*conf = (ctrl & 0x00000f00) >> 8;
+		*conf |= disp->sor.lvdsconf;
 		break;
-	case DCB_OUTPUT_ANALOG:
 	default:
-		*conf = 0x00ff;
 		break;
 	}
 
-	data = nvbios_ocfg_match(bios, data, *conf, &ver, &hdr, &cnt, &len, &info2);
+	data = nvbios_ocfg_match(bios, data, *conf & 0xff, *conf >> 8,
+				 &ver, &hdr, &cnt, &len, &info2);
 	if (data && id < 0xff) {
 		data = nvbios_oclk_match(bios, info2.clkcmp[id], pclk);
 		if (data) {
drivers/gpu/drm/nouveau/nvkm/engine/disp/gm107.c +1 -1
index b6944142d616..f4b9cf8574be 100644
@@ -36,7 +36,7 @@ gm107_disp = {
 	.outp.internal.crt = nv50_dac_output_new,
 	.outp.internal.tmds = nv50_sor_output_new,
 	.outp.internal.lvds = nv50_sor_output_new,
-	.outp.internal.dp = gf119_sor_dp_new,
+	.outp.internal.dp = gm107_sor_dp_new,
 	.dac.nr = 3,
 	.dac.power = nv50_dac_power,
 	.dac.sense = nv50_dac_sense,
drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.c +4 -8
index 4226d2153b9c..fcb1b0c46d64 100644
@@ -387,22 +387,17 @@ exec_clkcmp(struct nv50_disp *disp, int head, int id, u32 pclk, u32 *conf)
 	if (!outp)
 		return NULL;
 
+	*conf = (ctrl & 0x00000f00) >> 8;
 	if (outp->info.location == 0) {
 		switch (outp->info.type) {
 		case DCB_OUTPUT_TMDS:
-			*conf = (ctrl & 0x00000f00) >> 8;
 			if (*conf == 5)
 				*conf |= 0x0100;
 			break;
 		case DCB_OUTPUT_LVDS:
-			*conf = disp->sor.lvdsconf;
+			*conf |= disp->sor.lvdsconf;
 			break;
-		case DCB_OUTPUT_DP:
-			*conf = (ctrl & 0x00000f00) >> 8;
-			break;
-		case DCB_OUTPUT_ANALOG:
 		default:
-			*conf = 0x00ff;
 			break;
 		}
 	} else {
@@ -410,7 +405,8 @@ exec_clkcmp(struct nv50_disp *disp, int head, int id, u32 pclk, u32 *conf)
 		pclk = pclk / 2;
 	}
 
-	data = nvbios_ocfg_match(bios, data, *conf, &ver, &hdr, &cnt, &len, &info2);
+	data = nvbios_ocfg_match(bios, data, *conf & 0xff, *conf >> 8,
+				 &ver, &hdr, &cnt, &len, &info2);
 	if (data && id < 0xff) {
 		data = nvbios_oclk_match(bios, info2.clkcmp[id], pclk);
 		if (data) {
drivers/gpu/drm/nouveau/nvkm/engine/disp/outpdp.h +7 -2
index e9067ba4e179..4e983f6d7032 100644
@@ -62,7 +62,12 @@ int g94_sor_dp_lnk_pwr(struct nvkm_output_dp *, int);
 int gf119_sor_dp_new(struct nvkm_disp *, int, struct dcb_output *,
 		     struct nvkm_output **);
 int gf119_sor_dp_lnk_ctl(struct nvkm_output_dp *, int, int, bool);
+int gf119_sor_dp_drv_ctl(struct nvkm_output_dp *, int, int, int, int);
 
-int  gm200_sor_dp_new(struct nvkm_disp *, int, struct dcb_output *,
-		      struct nvkm_output **);
+int gm107_sor_dp_new(struct nvkm_disp *, int, struct dcb_output *,
+		     struct nvkm_output **);
+int gm107_sor_dp_pattern(struct nvkm_output_dp *, int);
+
+int gm200_sor_dp_new(struct nvkm_disp *, int, struct dcb_output *,
+		     struct nvkm_output **);
 #endif
drivers/gpu/drm/nouveau/nvkm/engine/disp/sorgf119.c +3 -3
index b4b41b135643..49bd5da194e1 100644
@@ -40,8 +40,8 @@ static int
 gf119_sor_dp_pattern(struct nvkm_output_dp *outp, int pattern)
 {
 	struct nvkm_device *device = outp->base.disp->engine.subdev.device;
-	const u32 loff = gf119_sor_loff(outp);
-	nvkm_mask(device, 0x61c110 + loff, 0x0f0f0f0f, 0x01010101 * pattern);
+	const u32 soff = gf119_sor_soff(outp);
+	nvkm_mask(device, 0x61c110 + soff, 0x0f0f0f0f, 0x01010101 * pattern);
 	return 0;
 }
 
@@ -64,7 +64,7 @@ gf119_sor_dp_lnk_ctl(struct nvkm_output_dp *outp, int nr, int bw, bool ef)
 	return 0;
 }
 
-static int
+int
 gf119_sor_dp_drv_ctl(struct nvkm_output_dp *outp,
 		     int ln, int vs, int pe, int pc)
 {
drivers/gpu/drm/nouveau/nvkm/engine/disp/sorgm107.c new file +53 -0

53 lines not on this page · raw message

drivers/gpu/drm/nouveau/nvkm/engine/disp/sorgm200.c +1 -14
index 2cfbef9c344f..c44fa7ea672a 100644
@@ -57,19 +57,6 @@ gm200_sor_dp_lane_map(struct nvkm_device *device, u8 lane)
 }
 
 static int
-gm200_sor_dp_pattern(struct nvkm_output_dp *outp, int pattern)
-{
-	struct nvkm_device *device = outp->base.disp->engine.subdev.device;
-	const u32 soff = gm200_sor_soff(outp);
-	const u32 data = 0x01010101 * pattern;
-	if (outp->base.info.sorconf.link & 1)
-		nvkm_mask(device, 0x61c110 + soff, 0x0f0f0f0f, data);
-	else
-		nvkm_mask(device, 0x61c12c + soff, 0x0f0f0f0f, data);
-	return 0;
-}
-
-static int
 gm200_sor_dp_lnk_pwr(struct nvkm_output_dp *outp, int nr)
 {
 	struct nvkm_device *device = outp->base.disp->engine.subdev.device;
@@ -129,7 +116,7 @@ gm200_sor_dp_drv_ctl(struct nvkm_output_dp *outp,
 
 static const struct nvkm_output_dp_func
 gm200_sor_dp_func = {
-	.pattern = gm200_sor_dp_pattern,
+	.pattern = gm107_sor_dp_pattern,
 	.lnk_pwr = gm200_sor_dp_lnk_pwr,
 	.lnk_ctl = gf119_sor_dp_lnk_ctl,
 	.drv_ctl = gm200_sor_dp_drv_ctl,
drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c +28 -9
index b2de290da16f..b0c721616c4e 100644
@@ -942,22 +942,41 @@ gf100_gr_trap_gpc_rop(struct gf100_gr *gr, int gpc)
 }
 
 static const struct nvkm_enum gf100_mp_warp_error[] = {
-	{ 0x00, "NO_ERROR" },
-	{ 0x01, "STACK_MISMATCH" },
+	{ 0x01, "STACK_ERROR" },
+	{ 0x02, "API_STACK_ERROR" },
+	{ 0x03, "RET_EMPTY_STACK_ERROR" },
+	{ 0x04, "PC_WRAP" },
 	{ 0x05, "MISALIGNED_PC" },
-	{ 0x08, "MISALIGNED_GPR" },
-	{ 0x09, "INVALID_OPCODE" },
-	{ 0x0d, "GPR_OUT_OF_BOUNDS" },
-	{ 0x0e, "MEM_OUT_OF_BOUNDS" },
-	{ 0x0f, "UNALIGNED_MEM_ACCESS" },
+	{ 0x06, "PC_OVERFLOW" },
+	{ 0x07, "MISALIGNED_IMMC_ADDR" },
+	{ 0x08, "MISALIGNED_REG" },
+	{ 0x09, "ILLEGAL_INSTR_ENCODING" },
+	{ 0x0a, "ILLEGAL_SPH_INSTR_COMBO" },
+	{ 0x0b, "ILLEGAL_INSTR_PARAM" },
+	{ 0x0c, "INVALID_CONST_ADDR" },
+	{ 0x0d, "OOR_REG" },
+	{ 0x0e, "OOR_ADDR" },
+	{ 0x0f, "MISALIGNED_ADDR" },
 	{ 0x10, "INVALID_ADDR_SPACE" },
-	{ 0x11, "INVALID_PARAM" },
+	{ 0x11, "ILLEGAL_INSTR_PARAM2" },
+	{ 0x12, "INVALID_CONST_ADDR_LDC" },
+	{ 0x13, "GEOMETRY_SM_ERROR" },
+	{ 0x14, "DIVERGENT" },
+	{ 0x15, "WARP_EXIT" },
 	{}
 };
 
 static const struct nvkm_bitfield gf100_mp_global_error[] = {
+	{ 0x00000001, "SM_TO_SM_FAULT" },
+	{ 0x00000002, "L1_ERROR" },
 	{ 0x00000004, "MULTIPLE_WARP_ERRORS" },
-	{ 0x00000008, "OUT_OF_STACK_SPACE" },
+	{ 0x00000008, "PHYSICAL_STACK_OVERFLOW" },
+	{ 0x00000010, "BPT_INT" },
+	{ 0x00000020, "BPT_PAUSE" },
+	{ 0x00000040, "SINGLE_STEP_COMPLETE" },
+	{ 0x20000000, "ECC_SEC_ERROR" },
+	{ 0x40000000, "ECC_DED_ERROR" },
+	{ 0x80000000, "TIMEOUT" },
 	{}
 };
 
drivers/gpu/drm/nouveau/nvkm/subdev/bios/disp.c +5 -3
index a5e92135cd77..9efb1b48cd54 100644
@@ -141,7 +141,8 @@ nvbios_ocfg_parse(struct nvkm_bios *bios, u16 outp, u8 idx,
 {
 	u16 data = nvbios_ocfg_entry(bios, outp, idx, ver, hdr, cnt, len);
 	if (data) {
-		info->match     = nvbios_rd16(bios, data + 0x00);
+		info->proto     = nvbios_rd08(bios, data + 0x00);
+		info->flags     = nvbios_rd16(bios, data + 0x01);
 		info->clkcmp[0] = nvbios_rd16(bios, data + 0x02);
 		info->clkcmp[1] = nvbios_rd16(bios, data + 0x04);
 	}
@@ -149,12 +150,13 @@ nvbios_ocfg_parse(struct nvkm_bios *bios, u16 outp, u8 idx,
 }
 
 u16
-nvbios_ocfg_match(struct nvkm_bios *bios, u16 outp, u16 type,
+nvbios_ocfg_match(struct nvkm_bios *bios, u16 outp, u8 proto, u8 flags,
 		  u8 *ver, u8 *hdr, u8 *cnt, u8 *len, struct nvbios_ocfg *info)
 {
 	u16 data, idx = 0;
 	while ((data = nvbios_ocfg_parse(bios, outp, idx++, ver, hdr, cnt, len, info))) {
-		if (info->match == type)
+		if ((info->proto == proto || info->proto == 0xff) &&
+		    (info->flags == flags))
 			break;
 	}
 	return data;
drivers/gpu/drm/nouveau/nvkm/subdev/ltc/gm107.c +3 -3
index e292f5679418..389fb13a1998 100644
@@ -69,11 +69,11 @@ gm107_ltc_zbc_clear_depth(struct nvkm_ltc *ltc, int i, const u32 depth)
 }
 
 static void
-gm107_ltc_lts_isr(struct nvkm_ltc *ltc, int c, int s)
+gm107_ltc_intr_lts(struct nvkm_ltc *ltc, int c, int s)
 {
 	struct nvkm_subdev *subdev = &ltc->subdev;
 	struct nvkm_device *device = subdev->device;
-	u32 base = 0x140000 + (c * 0x2000) + (s * 0x200);
+	u32 base = 0x140400 + (c * 0x2000) + (s * 0x200);
 	u32 stat = nvkm_rd32(device, base + 0x00c);
 
 	if (stat) {
@@ -92,7 +92,7 @@ gm107_ltc_intr(struct nvkm_ltc *ltc)
 	while (mask) {
 		u32 s, c = __ffs(mask);
 		for (s = 0; s < ltc->lts_nr; s++)
-			gm107_ltc_lts_isr(ltc, c, s);
+			gm107_ltc_intr_lts(ltc, c, s);
 		mask &= ~(1 << c);
 	}
 }
drivers/gpu/drm/nouveau/nvkm/subdev/ltc/gm200.c +1 -1
index 2a29bfd5125a..e18e0dc19ec8 100644
@@ -46,7 +46,7 @@ static const struct nvkm_ltc_func
 gm200_ltc = {
 	.oneinit = gm200_ltc_oneinit,
 	.init = gm200_ltc_init,
-	.intr = gm107_ltc_intr, /*XXX: not validated */
+	.intr = gm107_ltc_intr,
 	.cbc_clear = gm107_ltc_cbc_clear,
 	.cbc_wait = gm107_ltc_cbc_wait,
 	.zbc = 16,
drivers/gpu/drm/radeon/radeon_device.c +21 -0
index d0826fb0434c..cb2986876738 100644
@@ -630,6 +630,23 @@ void radeon_gtt_location(struct radeon_device *rdev, struct radeon_mc *mc)
 /*
  * GPU helpers function.
  */
+
+/**
+ * radeon_device_is_virtual - check if we are running is a virtual environment
+ *
+ * Check if the asic has been passed through to a VM (all asics).
+ * Used at driver startup.
+ * Returns true if virtual or false if not.
+ */
+static bool radeon_device_is_virtual(void)
+{
+#ifdef CONFIG_X86
+	return boot_cpu_has(X86_FEATURE_HYPERVISOR);
+#else
+	return false;
+#endif
+}
+
 /**
  * radeon_card_posted - check if the hw has already been initialized
  *
@@ -643,6 +660,10 @@ bool radeon_card_posted(struct radeon_device *rdev)
 {
 	uint32_t reg;
 
+	/* for pass through, always force asic_init */
+	if (radeon_device_is_virtual())
+		return false;
+
 	/* required for EFI mode on macbook2,1 which uses an r5xx asic */
 	if (efi_enabled(EFI_BOOT) &&
 	    (rdev->pdev->subsystem_vendor == PCI_VENDOR_ID_APPLE) &&
drivers/gpu/drm/ttm/ttm_bo.c +4 -3
index e3daafa1be13..3e7c9ac50ccd 100644
@@ -1016,9 +1016,9 @@ out_unlock:
 	return ret;
 }
 
-static bool ttm_bo_mem_compat(struct ttm_placement *placement,
-			      struct ttm_mem_reg *mem,
-			      uint32_t *new_flags)
+bool ttm_bo_mem_compat(struct ttm_placement *placement,
+		       struct ttm_mem_reg *mem,
+		       uint32_t *new_flags)
 {
 	int i;
 
@@ -1050,6 +1050,7 @@ static bool ttm_bo_mem_compat(struct ttm_placement *placement,
 
 	return false;
 }
+EXPORT_SYMBOL(ttm_bo_mem_compat);
 
 int ttm_bo_validate(struct ttm_buffer_object *bo,
 			struct ttm_placement *placement,
drivers/gpu/drm/vmwgfx/vmwgfx_dmabuf.c +22 -3
index 299925a1f6c6..eadc981ee79a 100644
@@ -49,6 +49,7 @@ int vmw_dmabuf_pin_in_placement(struct vmw_private *dev_priv,
 {
 	struct ttm_buffer_object *bo = &buf->base;
 	int ret;
+	uint32_t new_flags;
 
 	ret = ttm_write_lock(&dev_priv->reservation_sem, interruptible);
 	if (unlikely(ret != 0))
@@ -60,7 +61,12 @@ int vmw_dmabuf_pin_in_placement(struct vmw_private *dev_priv,
 	if (unlikely(ret != 0))
 		goto err;
 
-	ret = ttm_bo_validate(bo, placement, interruptible, false);
+	if (buf->pin_count > 0)
+		ret = ttm_bo_mem_compat(placement, &bo->mem,
+					&new_flags) == true ? 0 : -EINVAL;
+	else
+		ret = ttm_bo_validate(bo, placement, interruptible, false);
+
 	if (!ret)
 		vmw_bo_pin_reserved(buf, true);
 
@@ -91,6 +97,7 @@ int vmw_dmabuf_pin_in_vram_or_gmr(struct vmw_private *dev_priv,
 {
 	struct ttm_buffer_object *bo = &buf->base;
 	int ret;
+	uint32_t new_flags;
 
 	ret = ttm_write_lock(&dev_priv->reservation_sem, interruptible);
 	if (unlikely(ret != 0))
@@ -102,6 +109,12 @@ int vmw_dmabuf_pin_in_vram_or_gmr(struct vmw_private *dev_priv,
 	if (unlikely(ret != 0))
 		goto err;
 
+	if (buf->pin_count > 0) {
+		ret = ttm_bo_mem_compat(&vmw_vram_gmr_placement, &bo->mem,
+					&new_flags) == true ? 0 : -EINVAL;
+		goto out_unreserve;
+	}
+
 	ret = ttm_bo_validate(bo, &vmw_vram_gmr_placement, interruptible,
 			      false);
 	if (likely(ret == 0) || ret == -ERESTARTSYS)
@@ -161,6 +174,7 @@ int vmw_dmabuf_pin_in_start_of_vram(struct vmw_private *dev_priv,
 	struct ttm_placement placement;
 	struct ttm_place place;
 	int ret = 0;
+	uint32_t new_flags;
 
 	place = vmw_vram_placement.placement[0];
 	place.lpfn = bo->num_pages;
@@ -185,10 +199,15 @@ int vmw_dmabuf_pin_in_start_of_vram(struct vmw_private *dev_priv,
 	 */
 	if (bo->mem.mem_type == TTM_PL_VRAM &&
 	    bo->mem.start < bo->num_pages &&
-	    bo->mem.start > 0)
+	    bo->mem.start > 0 &&
+	    buf->pin_count == 0)
 		(void) ttm_bo_validate(bo, &vmw_sys_placement, false, false);
 
-	ret = ttm_bo_validate(bo, &placement, interruptible, false);
+	if (buf->pin_count > 0)
+		ret = ttm_bo_mem_compat(&placement, &bo->mem,
+					&new_flags) == true ? 0 : -EINVAL;
+	else
+		ret = ttm_bo_validate(bo, &placement, interruptible, false);
 
 	/* For some reason we didn't end up at the start of vram */
 	WARN_ON(ret == 0 && bo->offset != 0);
drivers/gpu/drm/vmwgfx/vmwgfx_drv.c +12 -0
index f2cf9231872a..2a505464c50f 100644
@@ -227,6 +227,7 @@ static int vmw_force_iommu;
 static int vmw_restrict_iommu;
 static int vmw_force_coherent;
 static int vmw_restrict_dma_mask;
+static int vmw_assume_16bpp;
 
 static int vmw_probe(struct pci_dev *, const struct pci_device_id *);
 static void vmw_master_init(struct vmw_master *);
@@ -243,6 +244,8 @@ MODULE_PARM_DESC(force_coherent, "Force coherent TTM pages");
 module_param_named(force_coherent, vmw_force_coherent, int, 0600);
 MODULE_PARM_DESC(restrict_dma_mask, "Restrict DMA mask to 44 bits with IOMMU");
 module_param_named(restrict_dma_mask, vmw_restrict_dma_mask, int, 0600);
+MODULE_PARM_DESC(assume_16bpp, "Assume 16-bpp when filtering modes");
+module_param_named(assume_16bpp, vmw_assume_16bpp, int, 0600);
 
 
 static void vmw_print_capabilities(uint32_t capabilities)
@@ -653,6 +656,8 @@ static int vmw_driver_load(struct drm_device *dev, unsigned long chipset)
 	dev_priv->vram_start = pci_resource_start(dev->pdev, 1);
 	dev_priv->mmio_start = pci_resource_start(dev->pdev, 2);
 
+	dev_priv->assume_16bpp = !!vmw_assume_16bpp;
+
 	dev_priv->enable_fb = enable_fbdev;
 
 	vmw_write(dev_priv, SVGA_REG_ID, SVGA_ID_2);
@@ -699,6 +704,13 @@ static int vmw_driver_load(struct drm_device *dev, unsigned long chipset)
 			vmw_read(dev_priv,
 				 SVGA_REG_SUGGESTED_GBOBJECT_MEM_SIZE_KB);
 
+		/*
+		 * Workaround for low memory 2D VMs to compensate for the
+		 * allocation taken by fbdev
+		 */
+		if (!(dev_priv->capabilities & SVGA_CAP_3D))
+			mem_size *= 2;
+
 		dev_priv->max_mob_pages = mem_size * 1024 / PAGE_SIZE;
 		dev_priv->prim_bb_mem =
 			vmw_read(dev_priv,
drivers/gpu/drm/vmwgfx/vmwgfx_drv.h +1 -0
index 6db358a85b46..cab0c54b46ae 100644
@@ -386,6 +386,7 @@ struct vmw_private {
 	spinlock_t hw_lock;
 	spinlock_t cap_lock;
 	bool has_dx;
+	bool assume_16bpp;
 
 	/*
 	 * VGA registers.
drivers/gpu/drm/vmwgfx/vmwgfx_fb.c +25 -22

59 lines not on this page · raw message

drivers/gpu/drm/vmwgfx/vmwgfx_kms.c +3 -7
index b07543b5cea4..6ccd61d37b78 100644
@@ -1553,14 +1553,10 @@ int vmw_du_connector_fill_modes(struct drm_connector *connector,
 		DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC)
 	};
 	int i;
-	u32 assumed_bpp = 2;
+	u32 assumed_bpp = 4;
 
-	/*
-	 * If using screen objects, then assume 32-bpp because that's what the
-	 * SVGA device is assuming
-	 */
-	if (dev_priv->active_display_unit == vmw_du_screen_object)
-		assumed_bpp = 4;
+	if (dev_priv->assume_16bpp)
+		assumed_bpp = 2;
 
 	if (dev_priv->active_display_unit == vmw_du_screen_target) {
 		max_width  = min(max_width,  dev_priv->stdu_max_width);
drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c +4 -4
index 9ca818fb034c..41932a7c4f79 100644
@@ -399,8 +399,10 @@ static int vmw_stdu_bind_fb(struct vmw_private *dev_priv,
 
 	WARN_ON_ONCE(!stdu->defined);
 
-	if (!vfb->dmabuf && new_fb->width == mode->hdisplay &&
-	    new_fb->height == mode->vdisplay)
+	new_vfbs = (vfb->dmabuf) ? NULL : vmw_framebuffer_to_vfbs(new_fb);
+
+	if (new_vfbs && new_vfbs->surface->base_size.width == mode->hdisplay &&
+	    new_vfbs->surface->base_size.height == mode->vdisplay)
 		new_content_type = SAME_AS_DISPLAY;
 	else if (vfb->dmabuf)
 		new_content_type = SEPARATE_DMA;
@@ -444,7 +446,6 @@ static int vmw_stdu_bind_fb(struct vmw_private *dev_priv,
 			content_srf.mip_levels[0]     = 1;
 			content_srf.multisample_count = 0;
 		} else {
-			new_vfbs = vmw_framebuffer_to_vfbs(new_fb);
 			content_srf = *new_vfbs->surface;
 		}
 
@@ -464,7 +465,6 @@ static int vmw_stdu_bind_fb(struct vmw_private *dev_priv,
 			return ret;
 		}
 	} else if (new_content_type == SAME_AS_DISPLAY) {
-		new_vfbs = vmw_framebuffer_to_vfbs(new_fb);
 		new_display_srf = vmw_surface_reference(new_vfbs->surface);
 	}
 
drivers/hid/hid-elo.c +1 -1
index aad8c162a825..0cd4f7216239 100644
@@ -261,7 +261,7 @@ static void elo_remove(struct hid_device *hdev)
 	struct elo_priv *priv = hid_get_drvdata(hdev);
 
 	hid_hw_stop(hdev);
-	flush_workqueue(wq);
+	cancel_delayed_work_sync(&priv->work);
 	kfree(priv);
 }
 
drivers/hid/hid-multitouch.c +14 -7
index c741f5e50a66..0088979f7281 100644
@@ -61,6 +61,7 @@ MODULE_LICENSE("GPL");
 #define MT_QUIRK_ALWAYS_VALID		(1 << 4)
 #define MT_QUIRK_VALID_IS_INRANGE	(1 << 5)
 #define MT_QUIRK_VALID_IS_CONFIDENCE	(1 << 6)
+#define MT_QUIRK_CONFIDENCE		(1 << 7)
 #define MT_QUIRK_SLOT_IS_CONTACTID_MINUS_ONE	(1 << 8)
 #define MT_QUIRK_NO_AREA		(1 << 9)
 #define MT_QUIRK_IGNORE_DUPLICATES	(1 << 10)
@@ -78,6 +79,7 @@ struct mt_slot {
 	__s32 contactid;	/* the device ContactID assigned to this slot */
 	bool touch_state;	/* is the touch valid? */
 	bool inrange_state;	/* is the finger in proximity of the sensor? */
+	bool confidence_state;  /* is the touch made by a finger? */
 };
 
 struct mt_class {
@@ -503,10 +505,8 @@ static int mt_touch_input_mapping(struct hid_device *hdev, struct hid_input *hi,
 			return 1;
 		case HID_DG_CONFIDENCE:
 			if (cls->name == MT_CLS_WIN_8 &&
-				field->application == HID_DG_TOUCHPAD) {
-				cls->quirks &= ~MT_QUIRK_ALWAYS_VALID;
-				cls->quirks |= MT_QUIRK_VALID_IS_CONFIDENCE;
-			}
+				field->application == HID_DG_TOUCHPAD)
+				cls->quirks |= MT_QUIRK_CONFIDENCE;
 			mt_store_field(usage, td, hi);
 			return 1;
 		case HID_DG_TIPSWITCH:
@@ -619,6 +619,7 @@ static void mt_complete_slot(struct mt_device *td, struct input_dev *input)
 		return;
 
 	if (td->curvalid || (td->mtclass.quirks & MT_QUIRK_ALWAYS_VALID)) {
+		int active;
 		int slotnum = mt_compute_slot(td, input);
 		struct mt_slot *s = &td->curdata;
 		struct input_mt *mt = input->mt;
@@ -633,10 +634,14 @@ static void mt_complete_slot(struct mt_device *td, struct input_dev *input)
 				return;
 		}
 
+		if (!(td->mtclass.quirks & MT_QUIRK_CONFIDENCE))
+			s->confidence_state = 1;
+		active = (s->touch_state || s->inrange_state) &&
+							s->confidence_state;
+
 		input_mt_slot(input, slotnum);
-		input_mt_report_slot_state(input, MT_TOOL_FINGER,
-			s->touch_state || s->inrange_state);
-		if (s->touch_state || s->inrange_state) {
+		input_mt_report_slot_state(input, MT_TOOL_FINGER, active);
+		if (active) {
 			/* this finger is in proximity of the sensor */
 			int wide = (s->w > s->h);
 			/* divided by two to match visual scale of touch */
@@ -701,6 +706,8 @@ static void mt_process_mt_event(struct hid_device *hid, struct hid_field *field,
 			td->curdata.touch_state = value;
 			break;
 		case HID_DG_CONFIDENCE:
+			if (quirks & MT_QUIRK_CONFIDENCE)
+				td->curdata.confidence_state = value;
 			if (quirks & MT_QUIRK_VALID_IS_CONFIDENCE)
 				td->curvalid = value;
 			break;
drivers/hid/usbhid/hiddev.c +5 -5
index 2f1ddca6f2e0..700145b15088 100644
@@ -516,13 +516,13 @@ static noinline int hiddev_ioctl_usage(struct hiddev *hiddev, unsigned int cmd,
 					goto inval;
 			} else if (uref->usage_index >= field->report_count)
 				goto inval;
-
-			else if ((cmd == HIDIOCGUSAGES || cmd == HIDIOCSUSAGES) &&
-				 (uref_multi->num_values > HID_MAX_MULTI_USAGES ||
-				  uref->usage_index + uref_multi->num_values > field->report_count))
-				goto inval;
 		}
 
+		if ((cmd == HIDIOCGUSAGES || cmd == HIDIOCSUSAGES) &&
+		    (uref_multi->num_values > HID_MAX_MULTI_USAGES ||
+		     uref->usage_index + uref_multi->num_values > field->report_count))
+			goto inval;
+
 		switch (cmd) {
 		case HIDIOCGUSAGE:
 			uref->value = field->value[uref->usage_index];
drivers/hwmon/dell-smm-hwmon.c +57 -23

174 lines not on this page · raw message

drivers/iio/accel/kxsd9.c +2 -2
index 923f56598d4b..3a9f106787d2 100644
@@ -81,7 +81,7 @@ static int kxsd9_write_scale(struct iio_dev *indio_dev, int micro)
 
 	mutex_lock(&st->buf_lock);
 	ret = spi_w8r8(st->us, KXSD9_READ(KXSD9_REG_CTRL_C));
-	if (ret)
+	if (ret < 0)
 		goto error_ret;
 	st->tx[0] = KXSD9_WRITE(KXSD9_REG_CTRL_C);
 	st->tx[1] = (ret & ~KXSD9_FS_MASK) | i;
@@ -163,7 +163,7 @@ static int kxsd9_read_raw(struct iio_dev *indio_dev,
 		break;
 	case IIO_CHAN_INFO_SCALE:
 		ret = spi_w8r8(st->us, KXSD9_READ(KXSD9_REG_CTRL_C));
-		if (ret)
+		if (ret < 0)
 			goto error_ret;
 		*val2 = kxsd9_micro_scales[ret & KXSD9_FS_MASK];
 		ret = IIO_VAL_INT_PLUS_MICRO;
drivers/iio/adc/ad7266.c +5 -2
index 21e19b60e2b9..2123f0ac2e2a 100644
@@ -396,8 +396,8 @@ static int ad7266_probe(struct spi_device *spi)
 
 	st = iio_priv(indio_dev);
 
-	st->reg = devm_regulator_get(&spi->dev, "vref");
-	if (!IS_ERR_OR_NULL(st->reg)) {
+	st->reg = devm_regulator_get_optional(&spi->dev, "vref");
+	if (!IS_ERR(st->reg)) {
 		ret = regulator_enable(st->reg);
 		if (ret)
 			return ret;
@@ -408,6 +408,9 @@ static int ad7266_probe(struct spi_device *spi)
 
 		st->vref_mv = ret / 1000;
 	} else {
+		/* Any other error indicates that the regulator does exist */
+		if (PTR_ERR(st->reg) != -ENODEV)
+			return PTR_ERR(st->reg);
 		/* Use internal reference */
 		st->vref_mv = 2500;
 	}
drivers/iio/humidity/hdc100x.c +10 -10
index fa4767613173..a03832a5fc95 100644
@@ -55,7 +55,7 @@ static const struct {
 	},
 	{ /* IIO_HUMIDITYRELATIVE channel */
 		.shift = 8,
-		.mask = 2,
+		.mask = 3,
 	},
 };
 
@@ -164,14 +164,14 @@ static int hdc100x_get_measurement(struct hdc100x_data *data,
 		dev_err(&client->dev, "cannot read high byte measurement");
 		return ret;
 	}
-	val = ret << 6;
+	val = ret << 8;
 
 	ret = i2c_smbus_read_byte(client);
 	if (ret < 0) {
 		dev_err(&client->dev, "cannot read low byte measurement");
 		return ret;
 	}
-	val |= ret >> 2;
+	val |= ret;
 
 	return val;
 }
@@ -211,18 +211,18 @@ static int hdc100x_read_raw(struct iio_dev *indio_dev,
 		return IIO_VAL_INT_PLUS_MICRO;
 	case IIO_CHAN_INFO_SCALE:
 		if (chan->type == IIO_TEMP) {
-			*val = 165;
-			*val2 = 65536 >> 2;
+			*val = 165000;
+			*val2 = 65536;
 			return IIO_VAL_FRACTIONAL;
 		} else {
-			*val = 0;
-			*val2 = 10000;
-			return IIO_VAL_INT_PLUS_MICRO;
+			*val = 100;
+			*val2 = 65536;
+			return IIO_VAL_FRACTIONAL;
 		}
 		break;
 	case IIO_CHAN_INFO_OFFSET:
-		*val = -3971;
-		*val2 = 879096;
+		*val = -15887;
+		*val2 = 515151;
 		return IIO_VAL_INT_PLUS_MICRO;
 	default:
 		return -EINVAL;
drivers/iio/industrialio-trigger.c +18 -5
index ae2806aafb72..0c52dfe64977 100644
@@ -210,22 +210,35 @@ static int iio_trigger_attach_poll_func(struct iio_trigger *trig,
 
 	/* Prevent the module from being removed whilst attached to a trigger */
 	__module_get(pf->indio_dev->info->driver_module);
+
+	/* Get irq number */
 	pf->irq = iio_trigger_get_irq(trig);
+	if (pf->irq < 0)
+		goto out_put_module;
+
+	/* Request irq */
 	ret = request_threaded_irq(pf->irq, pf->h, pf->thread,
 				   pf->type, pf->name,
 				   pf);
-	if (ret < 0) {
-		module_put(pf->indio_dev->info->driver_module);
-		return ret;
-	}
+	if (ret < 0)
+		goto out_put_irq;
 
+	/* Enable trigger in driver */
 	if (trig->ops && trig->ops->set_trigger_state && notinuse) {
 		ret = trig->ops->set_trigger_state(trig, true);
 		if (ret < 0)
-			module_put(pf->indio_dev->info->driver_module);
+			goto out_free_irq;
 	}
 
 	return ret;
+
+out_free_irq:
+	free_irq(pf->irq, pf);
+out_put_irq:
+	iio_trigger_put_irq(trig, pf->irq);
+out_put_module:
+	module_put(pf->indio_dev->info->driver_module);
+	return ret;
 }
 
 static int iio_trigger_detach_poll_func(struct iio_trigger *trig,
drivers/iio/light/apds9960.c +1 -0
index a6af56ad10e1..6443aad809b2 100644
@@ -1006,6 +1006,7 @@ static int apds9960_probe(struct i2c_client *client,
 
 	iio_device_attach_buffer(indio_dev, buffer);
 
+	indio_dev->dev.parent = &client->dev;
 	indio_dev->info = &apds9960_info;
 	indio_dev->name = APDS9960_DRV_NAME;
 	indio_dev->channels = apds9960_channels;
drivers/iio/pressure/st_pressure_core.c +50 -30

179 lines not on this page · raw message

drivers/iio/proximity/as3935.c +12 -5
index f4d29d5dbd5f..e2f926cdcad2 100644
@@ -64,6 +64,7 @@ struct as3935_state {
 	struct delayed_work work;
 
 	u32 tune_cap;
+	u8 buffer[16]; /* 8-bit data + 56-bit padding + 64-bit timestamp */
 	u8 buf[2] ____cacheline_aligned;
 };
 
@@ -72,7 +73,8 @@ static const struct iio_chan_spec as3935_channels[] = {
 		.type           = IIO_PROXIMITY,
 		.info_mask_separate =
 			BIT(IIO_CHAN_INFO_RAW) |
-			BIT(IIO_CHAN_INFO_PROCESSED),
+			BIT(IIO_CHAN_INFO_PROCESSED) |
+			BIT(IIO_CHAN_INFO_SCALE),
 		.scan_index     = 0,
 		.scan_type = {
 			.sign           = 'u',
@@ -181,7 +183,12 @@ static int as3935_read_raw(struct iio_dev *indio_dev,
 		/* storm out of range */
 		if (*val == AS3935_DATA_MASK)
 			return -EINVAL;
-		*val *= 1000;
+
+		if (m == IIO_CHAN_INFO_PROCESSED)
+			*val *= 1000;
+		break;
+	case IIO_CHAN_INFO_SCALE:
+		*val = 1000;
 		break;
 	default:
 		return -EINVAL;
@@ -206,10 +213,10 @@ static irqreturn_t as3935_trigger_handler(int irq, void *private)
 	ret = as3935_read(st, AS3935_DATA, &val);
 	if (ret)
 		goto err_read;
-	val &= AS3935_DATA_MASK;
-	val *= 1000;
 
-	iio_push_to_buffers_with_timestamp(indio_dev, &val, pf->timestamp);
+	st->buffer[0] = val & AS3935_DATA_MASK;
+	iio_push_to_buffers_with_timestamp(indio_dev, &st->buffer,
+					   pf->timestamp);
 err_read:
 	iio_trigger_notify_done(indio_dev->trig);
 
drivers/infiniband/core/cm.c +2 -2
index 1d92e091e22e..c99525512b34 100644
@@ -3452,14 +3452,14 @@ static int cm_establish(struct ib_cm_id *cm_id)
 	work->cm_event.event = IB_CM_USER_ESTABLISHED;
 
 	/* Check if the device started its remove_one */
-	spin_lock_irq(&cm.lock);
+	spin_lock_irqsave(&cm.lock, flags);
 	if (!cm_dev->going_down) {
 		queue_delayed_work(cm.wq, &work->work, 0);
 	} else {
 		kfree(work);
 		ret = -ENODEV;
 	}
-	spin_unlock_irq(&cm.lock);
+	spin_unlock_irqrestore(&cm.lock, flags);
 
 out:
 	return ret;
drivers/infiniband/hw/mlx4/ah.c +1 -1
index 105246fba2e7..5fc623362731 100644
@@ -47,6 +47,7 @@ static struct ib_ah *create_ib_ah(struct ib_pd *pd, struct ib_ah_attr *ah_attr,
 
 	ah->av.ib.port_pd = cpu_to_be32(to_mpd(pd)->pdn | (ah_attr->port_num << 24));
 	ah->av.ib.g_slid  = ah_attr->src_path_bits;
+	ah->av.ib.sl_tclass_flowlabel = cpu_to_be32(ah_attr->sl << 28);
 	if (ah_attr->ah_flags & IB_AH_GRH) {
 		ah->av.ib.g_slid   |= 0x80;
 		ah->av.ib.gid_index = ah_attr->grh.sgid_index;
@@ -64,7 +65,6 @@ static struct ib_ah *create_ib_ah(struct ib_pd *pd, struct ib_ah_attr *ah_attr,
 		       !(1 << ah->av.ib.stat_rate & dev->caps.stat_rate_support))
 			--ah->av.ib.stat_rate;
 	}
-	ah->av.ib.sl_tclass_flowlabel = cpu_to_be32(ah_attr->sl << 28);
 
 	return &ah->ibah;
 }
drivers/infiniband/sw/rdmavt/qp.c +3 -1
index a9e3bcc522c4..a0ecf08b2b86 100644
@@ -683,8 +683,10 @@ struct ib_qp *rvt_create_qp(struct ib_pd *ibpd,
 		 * initialization that is needed.
 		 */
 		priv = rdi->driver_f.qp_priv_alloc(rdi, qp, gfp);
-		if (!priv)
+		if (IS_ERR(priv)) {
+			ret = priv;
 			goto bail_qp;
+		}
 		qp->priv = priv;
 		qp->timeout_jiffies =
 			usecs_to_jiffies((4096UL * (1UL << qp->timeout)) /
drivers/iommu/amd_iommu_init.c +12 -2
index bf4959f4225b..94f1bf772ec9 100644
@@ -1363,13 +1363,23 @@ static int __init amd_iommu_init_pci(void)
 			break;
 	}
 
+	/*
+	 * Order is important here to make sure any unity map requirements are
+	 * fulfilled. The unity mappings are created and written to the device
+	 * table during the amd_iommu_init_api() call.
+	 *
+	 * After that we call init_device_table_dma() to make sure any
+	 * uninitialized DTE will block DMA, and in the end we flush the caches
+	 * of all IOMMUs to make sure the changes to the device table are
+	 * active.
+	 */
+	ret = amd_iommu_init_api();
+
 	init_device_table_dma();
 
 	for_each_iommu(iommu)
 		iommu_flush_all_caches(iommu);
 
-	ret = amd_iommu_init_api();
-
 	if (!ret)
 		print_iommu_info();
 
drivers/iommu/arm-smmu-v3.c +1 -0
index 4ff73ff64e49..3e20208d6fdb 100644
@@ -1942,6 +1942,7 @@ static struct iommu_ops arm_smmu_ops = {
 	.attach_dev		= arm_smmu_attach_dev,
 	.map			= arm_smmu_map,
 	.unmap			= arm_smmu_unmap,
+	.map_sg			= default_iommu_map_sg,
 	.iova_to_phys		= arm_smmu_iova_to_phys,
 	.add_device		= arm_smmu_add_device,
 	.remove_device		= arm_smmu_remove_device,
drivers/iommu/intel-iommu.c +12 -5
index e1852e845d21..ae364e07840c 100644
@@ -3169,11 +3169,6 @@ static int __init init_dmars(void)
 			}
 		}
 
-		iommu_flush_write_buffer(iommu);
-		iommu_set_root_entry(iommu);
-		iommu->flush.flush_context(iommu, 0, 0, 0, DMA_CCMD_GLOBAL_INVL);
-		iommu->flush.flush_iotlb(iommu, 0, 0, 0, DMA_TLB_GLOBAL_FLUSH);
-
 		if (!ecap_pass_through(iommu->ecap))
 			hw_pass_through = 0;
 #ifdef CONFIG_INTEL_IOMMU_SVM
@@ -3182,6 +3177,18 @@ static int __init init_dmars(void)
 #endif
 	}
 
+	/*
+	 * Now that qi is enabled on all iommus, set the root entry and flush
+	 * caches. This is required on some Intel X58 chipsets, otherwise the
+	 * flush_context function will loop forever and the boot hangs.
+	 */
+	for_each_active_iommu(iommu, drhd) {
+		iommu_flush_write_buffer(iommu);
+		iommu_set_root_entry(iommu);
+		iommu->flush.flush_context(iommu, 0, 0, 0, DMA_CCMD_GLOBAL_INVL);
+		iommu->flush.flush_iotlb(iommu, 0, 0, 0, DMA_TLB_GLOBAL_FLUSH);
+	}
+
 	if (iommu_pass_through)
 		iommu_identity_mapping |= IDENTMAP_ALL;
 
drivers/iommu/rockchip-iommu.c +1 -1
index 5710a06c3049..0ea8d9a24de0 100644
@@ -815,7 +815,7 @@ static int rk_iommu_attach_device(struct iommu_domain *domain,
 	dte_addr = virt_to_phys(rk_domain->dt);
 	for (i = 0; i < iommu->num_mmu; i++) {
 		rk_iommu_write(iommu->bases[i], RK_MMU_DTE_ADDR, dte_addr);
-		rk_iommu_command(iommu->bases[i], RK_MMU_CMD_ZAP_CACHE);
+		rk_iommu_base_command(iommu->bases[i], RK_MMU_CMD_ZAP_CACHE);
 		rk_iommu_write(iommu->bases[i], RK_MMU_INT_MASK, RK_MMU_IRQ_MASK);
 	}
 
drivers/irqchip/irq-mips-gic.c +11 -1
index 4dffccf532a2..40fb1209d512 100644
@@ -734,6 +734,12 @@ static int gic_irq_domain_alloc(struct irq_domain *d, unsigned int virq,
 		/* verify that it doesn't conflict with an IPI irq */
 		if (test_bit(spec->hwirq, ipi_resrv))
 			return -EBUSY;
+
+		hwirq = GIC_SHARED_TO_HWIRQ(spec->hwirq);
+
+		return irq_domain_set_hwirq_and_chip(d, virq, hwirq,
+						     &gic_level_irq_controller,
+						     NULL);
 	} else {
 		base_hwirq = find_first_bit(ipi_resrv, gic_shared_intrs);
 		if (base_hwirq == gic_shared_intrs) {
@@ -855,10 +861,14 @@ static int gic_dev_domain_alloc(struct irq_domain *d, unsigned int virq,
 						    &gic_level_irq_controller,
 						    NULL);
 		if (ret)
-			return ret;
+			goto error;
 	}
 
 	return 0;
+
+error:
+	irq_domain_free_irqs_parent(d, virq, nr_irqs);
+	return ret;
 }
 
 void gic_dev_domain_free(struct irq_domain *d, unsigned int virq,
drivers/media/usb/uvc/uvc_v4l2.c +18 -21
index d7723ce772b3..12690c1ea8f8 100644
@@ -1408,47 +1408,44 @@ static int uvc_v4l2_put_xu_query(const struct uvc_xu_control_query *kp,
 static long uvc_v4l2_compat_ioctl32(struct file *file,
 		     unsigned int cmd, unsigned long arg)
 {
+	struct uvc_fh *handle = file->private_data;
 	union {
 		struct uvc_xu_control_mapping xmap;
 		struct uvc_xu_control_query xqry;
 	} karg;
 	void __user *up = compat_ptr(arg);
-	mm_segment_t old_fs;
 	long ret;
 
 	switch (cmd) {
 	case UVCIOC_CTRL_MAP32:
-		cmd = UVCIOC_CTRL_MAP;
 		ret = uvc_v4l2_get_xu_mapping(&karg.xmap, up);
+		if (ret)
+			return ret;
+		ret = uvc_ioctl_ctrl_map(handle->chain, &karg.xmap);
+		if (ret)
+			return ret;
+		ret = uvc_v4l2_put_xu_mapping(&karg.xmap, up);
+		if (ret)
+			return ret;
+
 		break;
 
 	case UVCIOC_CTRL_QUERY32:
-		cmd = UVCIOC_CTRL_QUERY;
 		ret = uvc_v4l2_get_xu_query(&karg.xqry, up);
+		if (ret)
+			return ret;
+		ret = uvc_xu_ctrl_query(handle->chain, &karg.xqry);
+		if (ret)
+			return ret;
+		ret = uvc_v4l2_put_xu_query(&karg.xqry, up);
+		if (ret)
+			return ret;
 		break;
 
 	default:
 		return -ENOIOCTLCMD;
 	}
 
-	old_fs = get_fs();
-	set_fs(KERNEL_DS);
-	ret = video_ioctl2(file, cmd, (unsigned long)&karg);
-	set_fs(old_fs);
-
-	if (ret < 0)
-		return ret;
-
-	switch (cmd) {
-	case UVCIOC_CTRL_MAP:
-		ret = uvc_v4l2_put_xu_mapping(&karg.xmap, up);
-		break;
-
-	case UVCIOC_CTRL_QUERY:
-		ret = uvc_v4l2_put_xu_query(&karg.xqry, up);
-		break;
-	}
-
 	return ret;
 }
 #endif
drivers/memory/omap-gpmc.c +1 -1
index 21825ddce4a3..859b4a1d11e4 100644
@@ -394,7 +394,7 @@ static void gpmc_cs_bool_timings(int cs, const struct gpmc_bool_timings *p)
 	gpmc_cs_modify_reg(cs, GPMC_CS_CONFIG4,
 			   GPMC_CONFIG4_OEEXTRADELAY, p->oe_extra_delay);
 	gpmc_cs_modify_reg(cs, GPMC_CS_CONFIG4,
-			   GPMC_CONFIG4_OEEXTRADELAY, p->we_extra_delay);
+			   GPMC_CONFIG4_WEEXTRADELAY, p->we_extra_delay);
 	gpmc_cs_modify_reg(cs, GPMC_CS_CONFIG6,
 			   GPMC_CONFIG6_CYCLE2CYCLESAMECSEN,
 			   p->cycle2cyclesamecsen);
drivers/mtd/ubi/eba.c +15 -7
index 96fddb016bf1..4dd0391d2942 100644
@@ -575,6 +575,7 @@ static int recover_peb(struct ubi_device *ubi, int pnum, int vol_id, int lnum,
 	int err, idx = vol_id2idx(ubi, vol_id), new_pnum, data_size, tries = 0;
 	struct ubi_volume *vol = ubi->volumes[idx];
[… more lines in the raw message]

Lines of this file are not shown. View the raw message.

drivers/net/geneve.c +7 -2
index 9fcb4898fb68..c70e51567eed 100644

Lines of this file are not shown. View the raw message.

drivers/net/macsec.c +1 -0
index 9e803bbcc0b6..8f3c55d03d5d 100644

Lines of this file are not shown. View the raw message.

drivers/net/usb/cdc_ncm.c +7 -0
index 2fb31edab125..d4425c565839 100644

Lines of this file are not shown. View the raw message.

drivers/net/wireless/mac80211_hwsim.c +1 -0
index e85e0737771c..06664baa43d9 100644

Lines of this file are not shown. View the raw message.

drivers/net/wireless/realtek/rtlwifi/core.c +3 -3
index 0f48048b8654..3a0faa8fe9d4 100644

Lines of this file are not shown. View the raw message.

drivers/of/irq.c +10 -9
index e7bfc175b8e1..6ec743faabe8 100644

Lines of this file are not shown. View the raw message.

drivers/pci/vc.c +2 -2
index dfbab61a1b47..1fa3a3219c45 100644

Lines of this file are not shown. View the raw message.

drivers/regulator/qcom_smd-regulator.c +13 -1
index 56a17ec5b5ef..6c7fe4778793 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/53c700.c +2 -2
index d4c285688ce9..3ddc85e6efd6 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/scsi_error.c +3 -1
index 984ddcb4786d..1b9c049bd5c5 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/sd.c +4 -4
index f52b74cf8d1e..41c3a2c4f112 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/sd.h +5 -0
index 654630bb7d0e..765a6f1ac1b7 100644

Lines of this file are not shown. View the raw message.

drivers/staging/iio/accel/sca3000_core.c +1 -1
index a8f533af9eca..ec12181822e6 100644

Lines of this file are not shown. View the raw message.

drivers/thermal/cpu_cooling.c +8 -8
index 6ceac4f2d4b2..5b4b47ed948b 100644

Lines of this file are not shown. View the raw message.

drivers/tty/vt/keyboard.c +9 -21
index f973bfce5d08..1e93a37e27f0 100644

Lines of this file are not shown. View the raw message.

drivers/tty/vt/vt.c +1 -0
index bd523adb9643..e9e29ded3f30 100644

Lines of this file are not shown. View the raw message.

drivers/usb/common/usb-otg-fsm.c +2 -0
index 504708f59b93..6c6040c22c7a 100644

Lines of this file are not shown. View the raw message.

drivers/usb/core/hcd.c +7 -10
index 980fc5774151..2d107d0f61b0 100644

Lines of this file are not shown. View the raw message.

drivers/usb/dwc2/core.h +27 -0
index 3c58d633ce80..dec0b21fc626 100644

Lines of this file are not shown. View the raw message.

drivers/virtio/virtio_balloon.c +12 -8
index 7b6d74f0c72f..476c0e3a7150 100644

Lines of this file are not shown. View the raw message.

drivers/xen/balloon.c +13 -15
index d46839f51e73..e4db19e88ab1 100644

Lines of this file are not shown. View the raw message.

drivers/xen/xen-acpi-processor.c +3 -32
index 076970a54f89..4ce10bcca18b 100644

Lines of this file are not shown. View the raw message.

fs/btrfs/ctree.c +4 -1
index ec7928a27aaa..234707cc419c 100644

Lines of this file are not shown. View the raw message.

fs/btrfs/extent-tree.c +1 -1
index 84e060eb0de8..78f1b57d0b46 100644

Lines of this file are not shown. View the raw message.

fs/btrfs/super.c +1 -1
index 00b8f37cc306..d7c138f42bdf 100644

Lines of this file are not shown. View the raw message.

fs/btrfs/transaction.h +1 -1
index 72be51f7ca2f..c0b501a5a353 100644

Lines of this file are not shown. View the raw message.

fs/cifs/cifs_unicode.c +29 -4
index 5a53ac6b1e02..02b071bf3732 100644

Lines of this file are not shown. View the raw message.

fs/cifs/cifs_unicode.h +2 -0
index bdc52cb9a676..479bc0a941f3 100644

Lines of this file are not shown. View the raw message.

fs/cifs/connect.c +3 -1
index 6f62ac821a84..34cbc582e8d7 100644

Lines of this file are not shown. View the raw message.

fs/cifs/ntlmssp.h +1 -1
index 848249fa120f..3079b38f0afb 100644

Lines of this file are not shown. View the raw message.

fs/cifs/sess.c +42 -34

76 lines not on this page · raw message

fs/cifs/smb2pdu.c +29 -8
index 8f38e33d365b..29e06db5f187 100644

Lines of this file are not shown. View the raw message.

fs/namei.c +4 -4
index 30145f8f21ed..aaa3b693ec0b 100644

Lines of this file are not shown. View the raw message.

fs/namespace.c +8 -2
index 4fb1691b4355..783004af5707 100644

Lines of this file are not shown. View the raw message.

fs/nfs/dir.c +1 -1
index 33eb81738d03..a7dd1fee8f13 100644

Lines of this file are not shown. View the raw message.

fs/nfs/nfs4proc.c +2 -3
index 327b8c34d360..de2523f5e7c9 100644

Lines of this file are not shown. View the raw message.

fs/nfs/pnfs_nfs.c +10 -2
index 776dccbc306d..dcb70001ae2c 100644

Lines of this file are not shown. View the raw message.

fs/nfs/read.c +2 -2
index 6776d7a7839e..572e5b3b06f1 100644

Lines of this file are not shown. View the raw message.

fs/nfsd/nfs2acl.c +10 -10
index 1580ea6fd64d..d08cd88155c7 100644

Lines of this file are not shown. View the raw message.

fs/nfsd/nfs3acl.c +7 -9
index 01df4cd7c753..0c890347cde3 100644

Lines of this file are not shown. View the raw message.

fs/nfsd/nfs4acl.c +8 -8
index 6adabd6049b7..71292a0d6f09 100644

Lines of this file are not shown. View the raw message.

fs/nfsd/nfs4callback.c +1 -17
index 7389cb1d7409..04c68d900324 100644

Lines of this file are not shown. View the raw message.

fs/nfsd/nfs4state.c +30 -20

50 lines not on this page · raw message

fs/nfsd/state.h +1 -1
index c050c53036a6..c89d7b55fb9a 100644

Lines of this file are not shown. View the raw message.

fs/overlayfs/dir.c +24 -30

54 lines not on this page · raw message

fs/overlayfs/inode.c +30 -5
index a4ff5d0d7db9..d46fa609e803 100644

Lines of this file are not shown. View the raw message.

fs/overlayfs/overlayfs.h +1 -0
index 6a7090f4a441..294ccc0c1fc7 100644

Lines of this file are not shown. View the raw message.

fs/overlayfs/super.c +13 -8
index 791235e03d17..7952a50f0a72 100644

Lines of this file are not shown. View the raw message.

fs/posix_acl.c +23 -19

42 lines not on this page · raw message

fs/ubifs/file.c +24 -0
index 446753d8ac34..5b5ec8d0f324 100644

Lines of this file are not shown. View the raw message.

include/asm-generic/qspinlock.h +17 -36

53 lines not on this page · raw message

include/drm/ttm/ttm_bo_api.h +14 -0
index 055a08ddac02..a74c49d7c0fc 100644

Lines of this file are not shown. View the raw message.

include/linux/cpuidle.h +3 -0
index 786ad32631a6..07b83d32f66c 100644

Lines of this file are not shown. View the raw message.

include/linux/dcache.h +12 -0
index 7e9422cb5989..ad5d582f9b14 100644

Lines of this file are not shown. View the raw message.

include/linux/jump_label.h +13 -3
index 0536524bb9eb..68904469fba1 100644

Lines of this file are not shown. View the raw message.

include/linux/skbuff.h +20 -0
index 15d0df943466..794b924e9669 100644

Lines of this file are not shown. View the raw message.

include/linux/sunrpc/clnt.h +0 -2
index 9a7ddbaf116e..14d70f59f0c2 100644

Lines of this file are not shown. View the raw message.

include/linux/sunrpc/svc_xprt.h +1 -0
index b7dabc4baafd..79ba50856707 100644

Lines of this file are not shown. View the raw message.

include/linux/sunrpc/xprt.h +1 -0
index fb0d212e0d3a..9f51e1df3023 100644

Lines of this file are not shown. View the raw message.

include/linux/usb/ehci_def.h +2 -2
index 966889a20ea3..e479033bd782 100644

Lines of this file are not shown. View the raw message.

include/rdma/ib_verbs.h +1 -1
index fb2cef4e9747..b8334a637095 100644

Lines of this file are not shown. View the raw message.

include/rdma/rdma_vt.h +3 -1
index a8696551abb1..6ee9d97004d5 100644

Lines of this file are not shown. View the raw message.

kernel/futex.c +11 -3
index c20f06f38ef3..6555d5459e98 100644

Lines of this file are not shown. View the raw message.

kernel/jump_label.c +33 -3
index 05254eeb4b4e..4b353e0be121 100644

Lines of this file are not shown. View the raw message.

kernel/locking/mutex.c +6 -3
index e364b424b019..79d2d765a75f 100644

Lines of this file are not shown. View the raw message.

kernel/locking/qspinlock.c +60 -0

60 lines not on this page · raw message

kernel/sched/fair.c +25 -8
index e7dd0ec169be..eeaf920f46b9 100644

Lines of this file are not shown. View the raw message.

kernel/sched/idle.c +1 -1
index bd12c6c714ec..c5aeedf4e93a 100644

Lines of this file are not shown. View the raw message.

kernel/trace/trace_printk.c +6 -1
index f96f0383f6c6..ad1d6164e946 100644

Lines of this file are not shown. View the raw message.

mm/migrate.c +2 -0
index f9dfb18a4eba..bdf3410bb4fa 100644

Lines of this file are not shown. View the raw message.

mm/page-writeback.c +12 -9
index bc5149d5ec38..e389f0a998f1 100644

Lines of this file are not shown. View the raw message.

mm/percpu.c +44 -29

73 lines not on this page · raw message

mm/shmem.c +5 -3
index 719bd6b88d98..9ca09f52fef5 100644

Lines of this file are not shown. View the raw message.

net/core/flow_dissector.c +43 -0

43 lines not on this page · raw message

net/core/skbuff.c +0 -18
index e561f9f07d6d..59bf4d77154f 100644

Lines of this file are not shown. View the raw message.

net/ipv6/ip6_fib.c +1 -0
index ea071fad67a0..c26fac26b23c 100644

Lines of this file are not shown. View the raw message.

net/mac80211/mesh.c +9 -2
index d32cefcb63b0..34a5712d467f 100644

Lines of this file are not shown. View the raw message.

net/mac80211/sta_info.h +1 -1
index 62193f4bc37b..ba7ce53ec615 100644

Lines of this file are not shown. View the raw message.

net/packet/af_packet.c +1 -1
index 18d0becbc46d..8012f67ca5ae 100644

Lines of this file are not shown. View the raw message.

net/sched/act_mirred.c +1 -1
index 8f3948dd38b8..934336e12a65 100644

Lines of this file are not shown. View the raw message.

net/sunrpc/clnt.c +25 -6
index 7e0c9bf22df8..837dd910a252 100644

Lines of this file are not shown. View the raw message.

net/sunrpc/svc_xprt.c +2 -0
index 7422f28818b2..7231cb413a2c 100644

Lines of this file are not shown. View the raw message.

net/sunrpc/xprtsock.c +1 -0
index 65e759569e48..e9e5dd0dc8f4 100644

Lines of this file are not shown. View the raw message.

net/unix/af_unix.c +3 -3
index 8269da73e9e5..7748199b3568 100644

Lines of this file are not shown. View the raw message.

net/wireless/core.c +0 -2
index 9f1c4aa851ef..c878045d146a 100644

Lines of this file are not shown. View the raw message.

net/wireless/util.c +1 -1
index 9f440a9de63b..47b917841623 100644

Lines of this file are not shown. View the raw message.

scripts/mod/file2alias.c +1 -1
index a9155077feef..fec75786f75b 100644

Lines of this file are not shown. View the raw message.

security/apparmor/lsm.c +19 -17
index dec607c17b64..5ee820111027 100644

Lines of this file are not shown. View the raw message.

security/keys/key.c +1 -1
index b28755131687..af7f6821d26b 100644

Lines of this file are not shown. View the raw message.

sound/core/control.c +2 -0
index a85d45595d02..b4fe9b002512 100644

Lines of this file are not shown. View the raw message.

sound/core/pcm.c +10 -4
index 308c9ecf73db..8e980aa678d0 100644

Lines of this file are not shown. View the raw message.

sound/core/timer.c +1 -1
index 6469bedda2f3..23b73f6ac040 100644

Lines of this file are not shown. View the raw message.

sound/drivers/dummy.c +1 -0
index c0f8f613f1f1..172dacd925f5 100644

Lines of this file are not shown. View the raw message.

sound/hda/hdac_regmap.c +2 -2
index 87041ddd29cb..47a358fab132 100644

Lines of this file are not shown. View the raw message.

sound/pci/au88x0/au88x0_core.c +2 -3
index 4667c3232b7f..74177189063c 100644

Lines of this file are not shown. View the raw message.

sound/pci/echoaudio/echoaudio.c +2 -2
index 1cb85aeb0cea..286f5e3686a3 100644

Lines of this file are not shown. View the raw message.

sound/pci/hda/hda_generic.c +2 -0
index dfaf1a93fb8a..d77cc76aadab 100644

Lines of this file are not shown. View the raw message.

sound/pci/hda/hda_intel.c +10 -2
index 94089fc71884..6f8ea13323c1 100644

Lines of this file are not shown. View the raw message.

sound/pci/hda/patch_realtek.c +21 -1
index 0fe18ede3e85..abcb5a6a1cd9 100644

Lines of this file are not shown. View the raw message.

sound/usb/card.c +1 -1
index 3fc63583a537..2d493501b7f6 100644

Lines of this file are not shown. View the raw message.

virt/kvm/kvm_main.c +1 -1
index 4fd482fb9260..7cb12249baa5 100644

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Part of the diff is not shown here. View the raw message.