Linux 4.4.16
Greg KH
maintainerI'm announcing the release of the 4.4.16 kernel.
All users of the 4.4 kernel series must upgrade.
The updated 4.4.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.4.y
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Documentation/ABI/testing/sysfs-bus-iio-proximity-as3935 | 2 Documentation/scsi/scsi_eh.txt | 8 - Makefile | 2 arch/arc/Kconfig | 2 arch/arc/kernel/setup.c | 4 arch/arm/boot/dts/armada-385-linksys.dtsi | 4 arch/arm/boot/dts/sun5i-r8-chip.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/mach-imx/mach-imx6ul.c | 2 arch/arm/mach-mvebu/coherency.c | 22 +- arch/arm64/include/asm/ptrace.h | 33 ---- arch/arm64/kernel/ptrace.c | 81 ++++++++++ arch/arm64/kernel/signal.c | 4 arch/arm64/kernel/signal32.c | 2 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/x86/boot/Makefile | 3 arch/x86/kernel/amd_nb.c | 4 arch/x86/kernel/cpu/perf_event_intel.c | 2 arch/x86/kernel/kprobes/core.c | 12 + arch/x86/kvm/vmx.c | 23 +-- 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/sb_edac.c | 13 + drivers/gpio/gpiolib-legacy.c | 8 - drivers/gpio/gpiolib.c | 52 ++---- drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 2 drivers/gpu/drm/amd/amdkfd/kfd_process.c | 70 +++++---- drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c | 2 drivers/gpu/drm/drm_atomic.c | 3 drivers/gpu/drm/drm_crtc.c | 2 drivers/gpu/drm/drm_dp_mst_topology.c | 8 - drivers/gpu/drm/drm_modes.c | 2 drivers/gpu/drm/i915/i915_gem_shrinker.c | 2 drivers/gpu/drm/i915/i915_reg.h | 2 drivers/gpu/drm/i915/intel_display.c | 50 ++++-- drivers/gpu/drm/i915/intel_dp.c | 36 ---- drivers/gpu/drm/i915/intel_drv.h | 1 drivers/gpu/drm/mgag200/mgag200_mode.c | 10 + 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/disp/sorgf119.c | 4 drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c | 37 +++- 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/hid/hid-elo.c | 2 drivers/hid/hid-multitouch.c | 18 +- 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/iommu/amd_iommu_init.c | 14 + drivers/iommu/arm-smmu-v3.c | 1 drivers/iommu/intel-iommu.c | 17 +- drivers/media/usb/uvc/uvc_v4l2.c | 39 ++--- drivers/memory/omap-gpmc.c | 2 drivers/mtd/ubi/eba.c | 22 +- drivers/net/usb/cdc_ncm.c | 7 drivers/net/wireless/mac80211_hwsim.c | 1 drivers/of/irq.c | 19 +- drivers/scsi/53c700.c | 4 drivers/scsi/scsi_error.c | 4 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/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/namespace.c | 10 + fs/nfs/dir.c | 2 fs/nfs/nfs4proc.c | 5 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 | 113 ++++++++------- fs/overlayfs/inode.c | 3 fs/overlayfs/overlayfs.h | 1 fs/posix_acl.c | 41 +++-- fs/ubifs/file.c | 24 +++ include/asm-generic/qspinlock.h | 53 ++----- include/drm/ttm/ttm_bo_api.h | 14 + include/linux/dcache.h | 12 + include/linux/jump_label.h | 16 +- include/linux/skbuff.h | 20 ++ include/linux/sunrpc/clnt.h | 2 include/linux/usb/ehci_def.h | 4 kernel/jump_label.c | 36 ++++ kernel/locking/mutex.c | 9 - kernel/locking/qspinlock.c | 60 +++++++ kernel/sched/fair.c | 33 +++- 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 | 12 + net/unix/af_unix.c | 6 scripts/mod/file2alias.c | 2 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/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 ++ virt/kvm/kvm_main.c | 2 156 files changed, 1475 insertions(+), 845 deletions(-)
Al Viro (1):
make nfs_atomic_open() call d_drop() on all ->open_context() errors.
Alan Stern (1):
USB: EHCI: declare hostpc register as zero-length array
Alex Deucher (2):
drm/radeon: fix asic initialization for virtualized environments drm/amdgpu/gfx7: fix broken condition check
Alison Schofield (1):
iio: humidity: hdc100x: correct humidity integration time mask
Allen Hung (1):
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.
Andrey Ryabinin (1):
perf/x86: Fix undefined shift on 32-bit kernels
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 (4):
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/fbcon: fix out-of-bounds memory accesses 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
Chris Wilson (2):
locking/ww_mutex: Report recursive ww_mutex locking early drm/i915: Update ifdeffery for mutex->owner
Christophe JAILLET (1):
ALSA: echoaudio: Fix memory allocation
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
David Daney (1):
tty: vt: Fix soft lockup in fbcon cursor blink timer.
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()
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 (1):
mac80211: fix fast_tx header alignment
Gavin Shan (1):
powerpc/pseries: Fix PCI config address for DDW
Greg Kroah-Hartman (1):
Linux 4.4.16
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
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 (1):
nfsd4/rpc: move backchannel create logic into rpc code
James Bottomley (1):
53c700: fix BUG on untagged commands
James Hogan (1):
MIPS: KVM: Fix modular KVM under QEMU
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 (1):
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"
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()
Kirill A. Shutemov (1):
UBIFS: Implement ->migratepage()
Linus Walleij (1):
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 (1):
drm/i915/ilk: Don't disable SSC source if it's in use
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: Rework valid_user_regs
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
Maxim Patlasov (1):
ovl: verify upper dentry in ovl_remove_and_whiteout()
Michael Ellerman (1):
powerpc/pseries: Fix IBM_ARCH_VEC_NRCORES_OFFSET since POWER8NVL was added
Michael S. Tsirkin (1):
virtio_balloon: fix PFN format for virtio-1
Mika Kahola (1):
drm/i915: Revert DisplayPort fast link training feature
Miklos Szeredi (3):
vfs: add d_real_inode() helper
af_unix: fix hard linked sockets on overlay
ovl: verify upper dentry before unlink and rename
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.
Richard Weinberger (2):
mm: Export migrate_page_move_mapping and migrate_page_copy
ubi: Make recover_peb power cut aware
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
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
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 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 (1):
NFS: Fix another OPEN_DOWNGRADE bug
Ville Syrjälä (2):
drm/i915: Refresh cached DP port register value on resume drm/i915: Update CDCLK_FREQ register on BDW after changing cdclk frequency
Vineet Gupta (2):
ARCv2: Check for LL-SC livelock only if LLSC is enabled
ARCv2: LLSC: software backoff is NOT needed starting HS2.1c
Vinod Koul (1):
ALSA: hda - Add PCI ID for Kabylake-H
Vivek Goyal (1):
ovl: Copy up underlying inode's ->i_mode to overlay inode
WANG Cong (1):
net_sched: fix mirrored packets checksum
Wei Fang (1):
scsi: fix race between simultaneous decrements of ->host_failed
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
Yong Li (1):
iio: light apds9960: Add the missing dev.parent
Greg KH
maintainerDocumentation/ABI/testing/sysfs-bus-iio-proximity-as3935 +1 -1
@@ -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
@@ -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
@@ -1,6 +1,6 @@ VERSION = 4 PATCHLEVEL = 4 -SUBLEVEL = 15 +SUBLEVEL = 16 EXTRAVERSION = NAME = Blurry Fish Butt
arch/arc/Kconfig +1 -1
@@ -387,7 +387,7 @@ config ARC_HAS_LLSC config ARC_STAR_9000923308 bool "Workaround for llock/scond livelock" - default y + default n depends on ISA_ARCV2 && SMP && ARC_HAS_LLSC config ARC_HAS_SWAPE
arch/arc/kernel/setup.c +0 -4
@@ -332,10 +332,6 @@ static void arc_chk_core_config(void)pr_warn ("CONFIG_ARC_FPU_SAVE_RESTORE needed for working apps\n" ); else if (!cpu->extn.fpu_dp && fpu_enabled)panic ("FPU non-existent, disable CONFIG_ARC_FPU_SAVE_RESTORE\n" ); - -if (is_isa_arcv2 () &&IS_ENABLED (CONFIG_SMP ) && cpu->isa.atomic && - !IS_ENABLED (CONFIG_ARC_STAR_9000923308 )) -panic ("llock/scond livelock workaround missing\n" ); }/*
arch/arm/boot/dts/armada-385-linksys.dtsi +2 -2
@@ -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
@@ -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/include/asm/pgtable-2level.h +1 -0
@@ -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
@@ -212,6 +212,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)
@@ -257,10 +258,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
@@ -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/mach-imx/mach-imx6ul.c +1 -1
@@ -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
@@ -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 +4 -29
@@ -58,6 +58,7 @@#define COMPAT_PSR_Z_BIT 0x40000000#define COMPAT_PSR_N_BIT 0x80000000#define COMPAT_PSR_IT_MASK 0x0600fc00/* If-Then execution state mask */ +#define COMPAT_PSR_GE_MASK 0x000f0000#ifdef CONFIG_CPU_BIG_ENDIAN #define COMPAT_PSR_ENDSTATE COMPAT_PSR_E_BIT
@@ -151,35 +152,9 @@ static inline unsigned long regs_return_value(struct pt_regs *regs)return regs->regs[0 ]; } -/* -* Are the current registers suitable for user mode? (used to maintain -* security in signal handlers) -*/ -static inline int valid_user_regs (struct user_pt_regs *regs) -{ -if (user_mode (regs) && (regs->pstate &PSR_I_BIT ) ==0 ) { - regs->pstate &= ~(PSR_F_BIT |PSR_A_BIT ); - -/* The T bit is reserved for AArch64 */ -if (!(regs->pstate &PSR_MODE32_BIT )) - regs->pstate &= ~COMPAT_PSR_T_BIT ; - -return 1 ; - } - -/* -* Force PSR to something logical... -*/ - regs->pstate &= PSR_f | PSR_s | (PSR_x & ~PSR_A_BIT ) | \ -COMPAT_PSR_T_BIT |PSR_MODE32_BIT ; - -if (!(regs->pstate &PSR_MODE32_BIT )) { - regs->pstate &= ~COMPAT_PSR_T_BIT ; - regs->pstate |= PSR_MODE_EL0t; - } - -return 0 ; -} +/* We must avoid circular header include via sched.h */ +struct task_struct ; +int valid_user_regs (struct user_pt_regs *regs,struct task_struct *task);#define instruction_pointer (regs) ((unsigned long)(regs)->pc)
arch/arm64/kernel/ptrace.c +79 -2
102 lines not on this page · raw message
arch/arm64/kernel/signal.c +2 -2
@@ -115,7 +115,7 @@ static int restore_sigframe(struct pt_regs *regs,*/ regs->syscallno = ~0UL ; - err |= !valid_user_regs (®s->user_regs); + err |= !valid_user_regs (®s->user_regs, current);if (err ==0 ) { struct fpsimd_context *fpsimd_ctx =
@@ -307,7 +307,7 @@ static void handle_signal(struct ksignal *ksig, struct pt_regs *regs)/* * Check that the resulting registers are actually sane. */ - ret |= !valid_user_regs (®s->user_regs); + ret |= !valid_user_regs (®s->user_regs, current);/* * Fast forward the stepping logic so we step into the signal
arch/arm64/kernel/signal32.c +1 -1
@@ -356,7 +356,7 @@ static int compat_restore_sigframe(struct pt_regs *regs,*/ regs->syscallno = ~0UL ; - err |= !valid_user_regs (®s->user_regs); + err |= !valid_user_regs (®s->user_regs, current); aux = (struct compat_aux_sigframe __user *) sf->uc.uc_regspace;if (err ==0 )
arch/mips/include/asm/kvm_host.h +1 -0
@@ -372,6 +372,7 @@ struct kvm_mips_tlb {#define KVM_MIPS_GUEST_TLB_SIZE 64struct 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
@@ -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
@@ -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
@@ -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
@@ -1239,6 +1239,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
@@ -718,7 +718,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 133W (NR_CPUS ),/* number of cores supported */ 0 , 0,
arch/powerpc/platforms/pseries/iommu.c +12 -12
@@ -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
@@ -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/x86/boot/Makefile +3 -0
@@ -162,6 +162,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/kernel/amd_nb.c +2 -2
@@ -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/cpu/perf_event_intel.c +1 -1
@@ -3601,7 +3601,7 @@ __init int intel_pmu_init(void) c->idxmsk64 |= (1ULL << x86_pmu.num_counters) -1 ; } c->idxmsk64 &= - ~(~0UL << (INTEL_PMC_IDX_FIXED + x86_pmu.num_counters_fixed)); + ~(~0ULL << (INTEL_PMC_IDX_FIXED + x86_pmu.num_counters_fixed)); c->weight =hweight64 (c->idxmsk64); } }
arch/x86/kernel/kprobes/core.c +12 -0
@@ -959,7 +959,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 +11 -12
@@ -6579,7 +6579,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)
@@ -6596,17 +6602,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 );
drivers/ata/libata-eh.c +1 -1
@@ -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
@@ -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
@@ -3819,6 +3819,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);
@@ -3828,11 +3829,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
@@ -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_rsapvivkey-asn1.h
drivers/edac/sb_edac.c +8 -5
@@ -218,8 +218,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 */
@@ -1175,14 +1178,14 @@ static void get_memory_layout(const struct mem_ctl_info *mci)pci_read_config_dword (pvt->pci_tad[i], rir_offset[j][k], ®); - 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); } }
@@ -1512,7 +1515,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], ®); - *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/gpio/gpiolib-legacy.c +4 -4
@@ -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 +16 -36
112 lines not on this page · raw message
drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c +1 -1
@@ -5463,7 +5463,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/atmel-hlcdc/atmel_hlcdc_plane.c +2 -0
@@ -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 +2 -1
@@ -367,6 +367,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,
@@ -379,7 +381,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);
drivers/gpu/drm/drm_crtc.c +0 -2
@@ -2682,8 +2682,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
@@ -2874,11 +2874,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_modes.c +2 -0
@@ -1487,6 +1487,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/i915/i915_gem_shrinker.c +1 -1
@@ -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/i915_reg.h +2 -0
@@ -7357,6 +7357,8 @@ enum skl_disp_power_wells {#define TRANS_CLK_SEL_DISABLED (0x0<<29)#define TRANS_CLK_SEL_PORT (x) (((x)+1)<<29) +#define CDCLK_FREQ 0x46200 +#define TRANSA_MSA_MISC 0x60410#define TRANSB_MSA_MISC 0x61410#define TRANSC_MSA_MISC 0x62410
drivers/gpu/drm/i915/intel_display.c +36 -14
94 lines not on this page · raw message
drivers/gpu/drm/i915/intel_dp.c +7 -29
@@ -3628,8 +3628,7 @@ static bool intel_dp_reset_link_train(struct intel_dp *intel_dp, uint32_t *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,DP );return intel_dp_set_link_train (intel_dp,DP , dp_train_pat); }
@@ -3746,22 +3745,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 , -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++)
@@ -3854,7 +3837,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, &DP, training_pattern |
@@ -3871,7 +3853,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, &DP, training_pattern |
@@ -3893,10 +3874,8 @@ intel_dp_link_training_channel_equalization(struct intel_dp *intel_dp) intel_dp->DP =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)
@@ -5079,13 +5058,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);/*
@@ -5157,9 +5138,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_drv.h +0 -1
@@ -783,7 +783,6 @@ struct intel_dp {bool has_aux_irq, int send_bytes, uint32_t aux_clock_divider); -bool train_set_valid;/* Displayport compliance testing */ unsigned long compliance_test_type;
drivers/gpu/drm/mgag200/mgag200_mode.c +9 -1
@@ -194,7 +194,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 )
@@ -214,6 +214,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/nouveau_fbcon.c +2 -0
@@ -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
@@ -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
@@ -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
@@ -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/disp/sorgf119.c +2 -2
@@ -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 ; }
drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c +28 -9
@@ -874,22 +874,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/radeon/radeon_device.c +21 -0
@@ -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
@@ -1004,9 +1004,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;
@@ -1038,6 +1038,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
@@ -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
@@ -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)
@@ -652,6 +655,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 );
@@ -698,6 +703,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
@@ -387,6 +387,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
@@ -1538,14 +1538,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/hid/hid-elo.c +1 -1
@@ -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 +15 -3
@@ -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 {
@@ -502,6 +504,9 @@ static int mt_touch_input_mapping(struct hid_device *hdev, struct hid_input *hi,mt_store_field (usage, td, hi);return 1 ;case HID_DG_CONFIDENCE : +if (cls->name ==MT_CLS_WIN_8 && + field->application ==HID_DG_TOUCHPAD ) + cls->quirks |=MT_QUIRK_CONFIDENCE ;mt_store_field (usage, td, hi);return 1 ;case HID_DG_TIPSWITCH :
@@ -614,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;
@@ -628,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 */
@@ -696,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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -1005,6 +1005,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
@@ -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
@@ -3430,14 +3430,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
@@ -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/iommu/amd_iommu_init.c +12 -2
@@ -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
@@ -1919,6 +1919,7 @@ static struct iommu_ops arm_smmu_ops = { .detach_dev = arm_smmu_detach_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
@@ -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/media/usb/uvc/uvc_v4l2.c +18 -21
@@ -1388,47 +1388,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
@@ -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
@@ -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];struct ubi_vid_hdr *vid_hdr; +uint32_t crc; vid_hdr =ubi_zalloc_vid_hdr (ubi,GFP_NOFS );if (!vid_hdr)
@@ -599,14 +600,8 @@ retry: goto out_put; } - vid_hdr->sqnum =cpu_to_be64 (ubi_next_sqnum (ubi)); - err =ubi_io_write_vid_hdr (ubi, new_pnum, vid_hdr); -if (err) { -up_read (&ubi->fm_eba_sem); - goto write_error; - } +ubi_assert (vid_hdr->vol_type ==UBI_VID_DYNAMIC ); - data_size = offset + len;mutex_lock (&ubi->buf_mutex);memset (ubi->peb_buf + offset,0xFF , len);
@@ -621,6 +616,19 @@ retry:memcpy (ubi->peb_buf + offset, buf, len); + data_size = offset + len; + crc =crc32 (UBI_CRC32_INIT , ubi->peb_buf, data_size); + vid_hdr->sqnum =cpu_to_be64 (ubi_next_sqnum (ubi)); + vid_hdr->copy_flag =1 ; + vid_hdr->data_size =cpu_to_be32 (data_size); + vid_hdr->data_crc =cpu_to_be32 (crc); + err =ubi_io_write_vid_hdr (ubi, new_pnum, vid_hdr); +if (err) { +mutex_unlock (&ubi->buf_mutex); +up_read (&ubi->fm_eba_sem); + goto write_error; + } + err =ubi_io_write_data (ubi, ubi->peb_buf, new_pnum,0 , data_size);if (err) {mutex_unlock (&ubi->buf_mutex);
drivers/net/usb/cdc_ncm.c +7 -0
@@ -809,6 +809,13 @@ int cdc_ncm_bind_common(struct usbnet *dev, struct usb_interface *intf, u8 data_if (cdc_ncm_init (dev)) goto error2; +/* Some firmwares need a pause here or they will silently fail +* to set up the interface properly. This value was decided +* empirically on a Sierra Wireless MC7455 running 02.08.02.00 +* firmware. +*/ +usleep_range (10000 ,20000 ); +/* configure data interface */ temp =usb_set_interface (dev->udev, iface_no, data_altsetting);if (temp) {
drivers/net/wireless/mac80211_hwsim.c +1 -0
@@ -2723,6 +2723,7 @@ static int hwsim_tx_info_frame_received_nl(struct sk_buff *skb_2,if (!info->attrs[HWSIM_ATTR_ADDR_TRANSMITTER ] || !info->attrs[HWSIM_ATTR_FLAGS ] || !info->attrs[HWSIM_ATTR_COOKIE ] || + !info->attrs[HWSIM_ATTR_SIGNAL ] || !info->attrs[HWSIM_ATTR_TX_INFO ]) goto out;
drivers/of/irq.c +10 -9
@@ -386,13 +386,13 @@ int of_irq_to_resource(struct device_node *dev, int index, struct resource *r)EXPORT_SYMBOL_GPL (of_irq_to_resource);/** -* of_irq_get - Decode a node's IRQ and return it as a Linux irq number +* of_irq_get - Decode a node's IRQ and return it as a Linux IRQ number * @dev: pointer to device tree node -* @index: zero-based index of the irq -* -* Returns Linux irq number on success, or -EPROBE_DEFER if the irq domain -* is not yet created. +* @index: zero-based index of the IRQ * +* Returns Linux IRQ number on success, or 0 on the IRQ mapping failure, or +* -EPROBE_DEFER if the IRQ domain is not yet created, or error code in case +* of any other failure. */ int of_irq_get (struct device_node *dev,int index) {
@@ -413,12 +413,13 @@ int of_irq_get(struct device_node *dev, int index)EXPORT_SYMBOL_GPL (of_irq_get);/** -* of_irq_get_byname - Decode a node's IRQ and return it as a Linux irq number +* of_irq_get_byname - Decode a node's IRQ and return it as a Linux IRQ number * @dev: pointer to device tree node -* @name: irq name +* @name: IRQ name * -* Returns Linux irq number on success, or -EPROBE_DEFER if the irq domain -* is not yet created, or error code in case of any other failure. +* Returns Linux IRQ number on success, or 0 on the IRQ mapping failure, or +* -EPROBE_DEFER if the IRQ domain is not yet created, or error code in case +* of any other failure. */ int of_irq_get_byname (struct device_node *dev,const char *name) {
drivers/scsi/53c700.c +2 -2
@@ -1122,7 +1122,7 @@ process_script_interrupt(__u32 dsps, __u32 dsp, struct scsi_cmnd *SCp, }else {struct scsi_cmnd *SCp; - SCp =scsi_host_find_tag (SDp->host,SCSI_NO_TAG ); + SCp = SDp->current_cmnd;if (unlikely (SCp ==NULL )) {sdev_printk (KERN_ERR , SDp,"no saved request for untagged cmd\n" );
@@ -1826,7 +1826,7 @@ NCR_700_queuecommand_lck(struct scsi_cmnd *SCp, void (*done)(struct scsi_cmnd *) slot->tag, slot); }else { slot->tag =SCSI_NO_TAG ; -/* must populate current_cmnd for scsi_host_find_tag to work */ +/* save current command for reselection */ SCp->device->current_cmnd = SCp; }/* sanity check: some of the commands generated by the mid-layer
drivers/scsi/scsi_error.c +3 -1
@@ -1127,7 +1127,6 @@ static int scsi_eh_action(struct scsi_cmnd *scmd, int rtn)*/ void scsi_eh_finish_cmd (struct scsi_cmnd *scmd,struct list_head *done_q) { - scmd->device->host->host_failed--; scmd->eh_eflags =0 ;list_move_tail (&scmd->eh_entry, done_q); }
@@ -2226,6 +2225,9 @@ int scsi_error_handler(void *data)else scsi_unjam_host (shost); +/* All scmds have been handled */ + shost->host_failed =0 ; +/* * Note - if the above fails completely, the action is to take * individual devices offline and flush the queue of any
drivers/staging/iio/accel/sca3000_core.c +1 -1
@@ -595,7 +595,7 @@ static ssize_t sca3000_read_frequency(struct device *dev, goto error_ret_mut; ret =sca3000_read_ctrl_reg (st,SCA3000_REG_CTRL_SEL_OUT_CTRL );mutex_unlock (&st->lock); -if (ret) +if (ret <0 ) goto error_ret; val = ret;if (base_freq >0 )
drivers/thermal/cpu_cooling.c +8 -8
@@ -857,14 +857,6 @@ __cpufreq_cooling_register(struct device_node *np, goto free_power_table; } -snprintf (dev_name,sizeof (dev_name),"thermal-cpufreq-%d" , - cpufreq_dev->id); - - cool_dev =thermal_of_cooling_device_register (np, dev_name, cpufreq_dev, - &cpufreq_cooling_ops); -if (IS_ERR (cool_dev)) - goto remove_idr; -/* Fill freq-table in descending order of frequencies */ for (i =0 , freq =-1 ; i <= cpufreq_dev->max_level; i++) { freq =find_next_max (table, freq);
@@ -877,6 +869,14 @@ __cpufreq_cooling_register(struct device_node *np,pr_debug ("%s: freq:%u KHz\n" , __func__, freq); } +snprintf (dev_name,sizeof (dev_name),"thermal-cpufreq-%d" , + cpufreq_dev->id); + + cool_dev =thermal_of_cooling_device_register (np, dev_name, cpufreq_dev, + &cpufreq_cooling_ops); +if (IS_ERR (cool_dev)) + goto remove_idr; + cpufreq_dev->clipped_freq = cpufreq_dev->freq_table[0 ]; cpufreq_dev->cool_dev = cool_dev;
drivers/tty/vt/keyboard.c +9 -21
@@ -366,34 +366,22 @@ static void to_utf8(struct vc_data *vc, uint c)static void do_compute_shiftstate (void ) { -unsigned int i, j, k, sym, val; +unsigned int k, sym, val; shift_state =0 ;memset (shift_down,0 ,sizeof (shift_down)); -for (i =0 ; i <ARRAY_SIZE (key_down); i++) { - -if (!key_down[i]) +for_each_set_bit (k, key_down,min (NR_KEYS ,KEY_CNT )) { + sym =U (key_maps[0 ][k]); +if (KTYP (sym) !=KT_SHIFT &&KTYP (sym) !=KT_SLOCK )continue ; - k = i *BITS_PER_LONG ; - -for (j =0 ; j <BITS_PER_LONG ; j++, k++) { - -if (!test_bit (k, key_down)) -continue ; + val =KVAL (sym); +if (val ==KVAL (K_CAPSSHIFT )) + val =KVAL (K_SHIFT ); - sym =U (key_maps[0 ][k]); -if (KTYP (sym) !=KT_SHIFT &&KTYP (sym) !=KT_SLOCK ) -continue ; - - val =KVAL (sym); -if (val ==KVAL (K_CAPSSHIFT )) - val =KVAL (K_SHIFT ); - - shift_down[val]++; - shift_state |= (1 << val); - } + shift_down[val]++; + shift_state |=BIT (val); } }
drivers/tty/vt/vt.c +1 -0
@@ -750,6 +750,7 @@ static void visual_init(struct vc_data *vc, int num, int init) vc->vc_complement_mask =0 ; vc->vc_can_do_color =0 ; vc->vc_panic_force_write = false; + vc->vc_cur_blink_ms =DEFAULT_CURSOR_BLINK_MS ; vc->vc_sw->con_init (vc, init);if (!vc->vc_complement_mask) vc->vc_complement_mask = vc->vc_can_do_color ?0x7700 :0x0800 ;
drivers/usb/common/usb-otg-fsm.c +2 -0
@@ -21,6 +21,7 @@* 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include <linux/module.h> #include <linux/kernel.h> #include <linux/types.h> #include <linux/mutex.h>
@@ -365,3 +366,4 @@ int otg_statemachine(struct otg_fsm *fsm)return state_changed; }EXPORT_SYMBOL_GPL (otg_statemachine); +MODULE_LICENSE ("GPL" );
drivers/usb/dwc2/core.h +27 -0
@@ -44,6 +44,17 @@#include <linux/usb/phy.h> #include "hw.h" +#ifdef CONFIG_MIPS +/* +* There are some MIPS machines that can run in either big-endian +* or little-endian mode and that use the dwc2 register without +* a byteswap in both ways. +* Unlike other architectures, MIPS apparently does not require a +* barrier before the __raw_writel() to synchronize with DMA but does +* require the barrier after the __raw_writel() to serialize a set of +* writes. This set of operations was added specifically for MIPS and +* should only be used there. +*/ static inline u32 dwc2_readl (const void __iomem *addr) {u32 value =__raw_readl (addr);
@@ -70,6 +81,22 @@ static inline void dwc2_writel(u32 value, void __iomem *addr)pr_info ("INFO:: wrote %08x to %p\n" , value, addr); #endif } +#else +/* Normal architectures just use readl/write */ +static inline u32 dwc2_readl (const void __iomem *addr) +{ +return readl (addr); +} + +static inline void dwc2_writel (u32 value,void __iomem *addr) +{ +writel (value, addr); + +#ifdef DWC2_LOG_WRITES +pr_info ("info:: wrote %08x to %p\n" , value, addr); +#endif +} +#endif /* Maximum number of Endpoints/HostChannels */ #define MAX_EPS_CHANNELS 16
drivers/virtio/virtio_balloon.c +12 -8
@@ -73,7 +73,7 @@ struct virtio_balloon {/* The array of pfns we tell the Host about. */ unsigned int num_pfns; -u32 pfns[VIRTIO_BALLOON_ARRAY_PFNS_MAX ]; +__virtio32 pfns[VIRTIO_BALLOON_ARRAY_PFNS_MAX ];/* Memory statistics */ int need_stats_update;
@@ -125,14 +125,16 @@ static void tell_host(struct virtio_balloon *vb, struct virtqueue *vq)wait_event (vb->acked,virtqueue_get_buf (vq, &len)); } -static void set_page_pfns (u32 pfns[],struct page *page) +static void set_page_pfns (struct virtio_balloon *vb, +__virtio32 pfns[],struct page *page) {unsigned int i;/* Set balloon pfns pointing at this page. * Note that the first pfn points at start of the page. */ for (i =0 ; i <VIRTIO_BALLOON_PAGES_PER_PAGE ; i++) - pfns[i] =page_to_balloon_pfn (page) + i; + pfns[i] =cpu_to_virtio32 (vb->vdev, +page_to_balloon_pfn (page) + i); }static void fill_balloon (struct virtio_balloon *vb,size_t num)
@@ -155,7 +157,7 @@ static void fill_balloon(struct virtio_balloon *vb, size_t num)msleep (200 );break ; } -set_page_pfns (vb->pfns + vb->num_pfns, page); +set_page_pfns (vb, vb->pfns + vb->num_pfns, page); vb->num_pages +=VIRTIO_BALLOON_PAGES_PER_PAGE ;if (!virtio_has_feature (vb->vdev,VIRTIO_BALLOON_F_DEFLATE_ON_OOM ))
@@ -171,10 +173,12 @@ static void fill_balloon(struct virtio_balloon *vb, size_t num)static void release_pages_balloon (struct virtio_balloon *vb) {unsigned int i; +struct page *page;/* Find pfns pointing at start of each page, get pages and free them. */ for (i =0 ; i < vb->num_pfns; i +=VIRTIO_BALLOON_PAGES_PER_PAGE ) { -struct page *page =balloon_pfn_to_page (vb->pfns[i]); + page =balloon_pfn_to_page (virtio32_to_cpu (vb->vdev, + vb->pfns[i]));if (!virtio_has_feature (vb->vdev,VIRTIO_BALLOON_F_DEFLATE_ON_OOM ))adjust_managed_page_count (page,1 );
@@ -197,7 +201,7 @@ static unsigned leak_balloon(struct virtio_balloon *vb, size_t num) page =balloon_page_dequeue (vb_dev_info);if (!page)break ; -set_page_pfns (vb->pfns + vb->num_pfns, page); +set_page_pfns (vb, vb->pfns + vb->num_pfns, page); vb->num_pages -=VIRTIO_BALLOON_PAGES_PER_PAGE ; }
@@ -465,13 +469,13 @@ static int virtballoon_migratepage(struct balloon_dev_info *vb_dev_info,__count_vm_event (BALLOON_MIGRATE );spin_unlock_irqrestore (&vb_dev_info->pages_lock, flags); vb->num_pfns =VIRTIO_BALLOON_PAGES_PER_PAGE ; -set_page_pfns (vb->pfns, newpage); +set_page_pfns (vb, vb->pfns, newpage);tell_host (vb, vb->inflate_vq);/* balloon's page migration 2nd step -- deflate "page" */ balloon_page_delete (page); vb->num_pfns =VIRTIO_BALLOON_PAGES_PER_PAGE ; -set_page_pfns (vb->pfns, page); +set_page_pfns (vb, vb->pfns, page);tell_host (vb, vb->deflate_vq);mutex_unlock (&vb->balloon_lock);
drivers/xen/balloon.c +13 -15
@@ -152,8 +152,6 @@ static DECLARE_WAIT_QUEUE_HEAD(balloon_wq);static void balloon_process (struct work_struct *work); static DECLARE_DELAYED_WORK(balloon_worker, balloon_process); -static void release_memory_resource (struct resource *resource); -/* When ballooning out (allocating memory to return to Xen) we don't really want the kernel to try too hard since that can trigger the oom killer. */ #define GFP_BALLOON \
@@ -249,6 +247,19 @@ static enum bp_state update_schedule(enum bp_state state) }#ifdef CONFIG_XEN_BALLOON_MEMORY_HOTPLUG +static void release_memory_resource (struct resource *resource) +{ +if (!resource) +return ; + +/* +* No need to reset region to identity mapped since we now +* know that no I/O can be in this region +*/ +release_resource (resource); +kfree (resource); +} +static struct resource *additional_memory_resource (phys_addr_t size) {struct resource *res;
@@ -287,19 +298,6 @@ static struct resource *additional_memory_resource(phys_addr_t size)return res; } -static void release_memory_resource (struct resource *resource) -{ -if (!resource) -return ; - -/* -* No need to reset region to identity mapped since we now -* know that no I/O can be in this region -*/ -release_resource (resource); -kfree (resource); -} -static enum bp_state reserve_additional_memory (void ) {long credit;
drivers/xen/xen-acpi-processor.c +3 -32
@@ -423,36 +423,7 @@ upload:return 0 ; } -static int __init check_prereq (void ) -{ -struct cpuinfo_x86 *c = &cpu_data (0 ); - -if (!xen_initial_domain ()) -return -ENODEV ; - -if (!acpi_gbl_FADT.smi_command) -return -ENODEV ; - -if (c->x86_vendor ==X86_VENDOR_INTEL ) { -if (!cpu_has (c,X86_FEATURE_EST )) -return -ENODEV ; -return 0 ; - } -if (c->x86_vendor ==X86_VENDOR_AMD ) { -/* Copied from powernow-k8.h, can't include ../cpufreq/powernow -* as we get compile warnings for the static functions. -*/ -#define CPUID_FREQ_VOLT_CAPABILITIES 0x80000007 -#define USE_HW_PSTATE 0x00000080 -u32 eax, ebx, ecx, edx; -cpuid (CPUID_FREQ_VOLT_CAPABILITIES , &eax, &ebx, &ecx, &edx); -if ((edx &USE_HW_PSTATE ) !=USE_HW_PSTATE ) -return -ENODEV ; -return 0 ; - } -return -ENODEV ; -}/* acpi_perf_data is a pointer to percpu data. */ static struct acpi_processor_performance __percpu *acpi_perf_data;
@@ -509,10 +480,10 @@ struct notifier_block xen_acpi_processor_resume_nb = {static int __init xen_acpi_processor_init (void ) {unsigned int i; -int rc =check_prereq (); +int rc; -if (rc) -return rc; +if (!xen_initial_domain ()) +return -ENODEV ; nr_acpi_bits =get_max_acpi_id () +1 ; acpi_ids_done =kcalloc (BITS_TO_LONGS (nr_acpi_bits),sizeof (unsigned long ),GFP_KERNEL );
fs/btrfs/ctree.c +4 -1
@@ -1551,6 +1551,7 @@ noinline int btrfs_cow_block(struct btrfs_trans_handle *trans, trans->transid, root->fs_info->generation);if (!should_cow_block (trans, root, buf)) { + trans->dirty = true; *cow_ret = buf;return 0 ; }
@@ -2773,8 +2774,10 @@ again:* then we don't want to set the path blocking, * so we test it here */ -if (!should_cow_block (trans, root, b)) +if (!should_cow_block (trans, root, b)) { + trans->dirty = true; goto cow_done; + }/* * must have write locks on this node and the
fs/btrfs/extent-tree.c +1 -1
@@ -7856,7 +7856,7 @@ btrfs_init_new_buffer(struct btrfs_trans_handle *trans, struct btrfs_root *root,set_extent_dirty (&trans->transaction->dirty_pages, buf->start, buf->start + buf->len -1 ,GFP_NOFS ); } - trans->blocks_used++; + trans->dirty = true;/* this returns a buffer locked for blocking */ return buf; }
fs/btrfs/super.c +1 -1
@@ -239,7 +239,7 @@ void __btrfs_abort_transaction(struct btrfs_trans_handle *trans, trans->aborted = errno;/* Nothing used. The other threads that have joined this * transaction may be able to continue. */ -if (!trans->blocks_used &&list_empty (&trans->new_bgs)) { +if (!trans->dirty &&list_empty (&trans->new_bgs)) {const char *errstr; errstr =btrfs_decode_error (errno);
fs/btrfs/transaction.h +1 -1
@@ -110,7 +110,6 @@ struct btrfs_trans_handle {u64 chunk_bytes_reserved;unsigned long use_count;unsigned long blocks_reserved; -unsigned long blocks_used;unsigned long delayed_ref_updates;struct btrfs_transaction *transaction;struct btrfs_block_rsv *block_rsv;
@@ -121,6 +120,7 @@ struct btrfs_trans_handle {bool can_flush_pending_bgs;bool reloc_reserved;bool sync; +bool dirty;unsigned int type;/* * this root is only needed to validate that the root passed to
fs/cifs/cifs_unicode.c +29 -4
@@ -101,6 +101,12 @@ convert_sfm_char(const __u16 src_char, char *target)case SFM_SLASH : *target ='\\' ;break ; +case SFM_SPACE : + *target =' ' ; +break ; +case SFM_PERIOD : + *target ='.' ; +break ;default :return false; }
@@ -404,7 +410,7 @@ static __le16 convert_to_sfu_char(char src_char)return dest_char; } -static __le16 convert_to_sfm_char (char src_char) +static __le16 convert_to_sfm_char (char src_char,bool end_of_string) {__le16 dest_char;
@@ -427,6 +433,18 @@ static __le16 convert_to_sfm_char(char src_char)case '|' : dest_char =cpu_to_le16 (SFM_PIPE );break ; +case '.' : +if (end_of_string) + dest_char =cpu_to_le16 (SFM_PERIOD ); +else + dest_char =0 ; +break ; +case ' ' : +if (end_of_string) + dest_char =cpu_to_le16 (SFM_SPACE ); +else + dest_char =0 ; +break ;default : dest_char =0 ; }
@@ -469,9 +487,16 @@ cifsConvertToUTF16(__le16 *target, const char *source, int srclen,/* see if we must remap this char */ if (map_chars ==SFU_MAP_UNI_RSVD ) dst_char =convert_to_sfu_char (src_char); -else if (map_chars ==SFM_MAP_UNI_RSVD ) - dst_char =convert_to_sfm_char (src_char); -else +else if (map_chars ==SFM_MAP_UNI_RSVD ) { +bool end_of_string; + +if (i == srclen -1 ) + end_of_string = true; +else + end_of_string = false; + + dst_char =convert_to_sfm_char (src_char, end_of_string); + }else dst_char =0 ;/* * FIXME: We can not handle remapping backslash (UNI_SLASH)
fs/cifs/cifs_unicode.h +2 -0
@@ -64,6 +64,8 @@#define SFM_LESSTHAN ((__u16) 0xF023)#define SFM_PIPE ((__u16) 0xF027)#define SFM_SLASH ((__u16) 0xF026) +#define SFM_PERIOD ((__u16) 0xF028) +#define SFM_SPACE ((__u16) 0xF029)/* * Mapping mechanism to use when one of the seven reserved characters is
fs/cifs/connect.c +3 -1
@@ -425,7 +425,9 @@ cifs_echo_request(struct work_struct *work)* server->ops->need_neg() == true. Also, no need to ping if * we got a response recently. */ -if (!server->ops->need_neg || server->ops->need_neg (server) || + +if (server->tcpStatus == CifsNeedReconnect || + server->tcpStatus == CifsExiting || server->tcpStatus == CifsNew || (server->ops->can_echo && !server->ops->can_echo (server)) ||time_before (jiffies, server->lstrp +SMB_ECHO_INTERVAL -HZ )) goto requeue_echo;
fs/cifs/ntlmssp.h +1 -1
@@ -133,6 +133,6 @@ typedef struct _AUTHENTICATE_MESSAGE {int decode_ntlmssp_challenge (char *bcc_ptr,int blob_len,struct cifs_ses *ses);void build_ntlmssp_negotiate_blob (unsigned char *pbuffer,struct cifs_ses *ses); -int build_ntlmssp_auth_blob (unsigned char *pbuffer,u16 *buflen, +int build_ntlmssp_auth_blob (unsigned char **pbuffer,u16 *buflen,struct cifs_ses *ses,const struct nls_table *nls_cp);
fs/cifs/sess.c +42 -34
160 lines not on this page · raw message
fs/cifs/smb2pdu.c +29 -8
@@ -591,7 +591,7 @@ SMB2_sess_setup(const unsigned int xid, struct cifs_ses *ses,u16 blob_length =0 ;struct key *spnego_key =NULL ;
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/overlayfs/dir.c +62 -51
113 lines not on this page · raw message
fs/posix_acl.c +23 -18
41 lines not on this page · raw message
include/asm-generic/qspinlock.h +17 -36
53 lines not on this page · raw message
kernel/locking/qspinlock.c +60 -0
60 lines not on this page · raw message
mm/percpu.c +44 -29
73 lines not on this page · raw message
net/core/flow_dissector.c +43 -0
43 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.