Linux 4.9.30
Greg KH
maintainerI'm announcing the release of the 4.9.30 kernel.
All users of the 4.9 kernel series must upgrade.
The updated 4.9.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.9.y
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Documentation/arm64/tagged-pointers.txt | 62 ++++-- Makefile | 2 arch/alpha/kernel/osf_sys.c | 6 arch/arm/boot/dts/at91-sama5d3_xplained.dts | 5 arch/arm/boot/dts/imx6sx-sdb.dts | 17 - arch/arm/boot/dts/tegra20-paz00.dts | 1 arch/arm/include/asm/kvm_coproc.h | 3 arch/arm/include/asm/module.h | 9 arch/arm/kernel/module-plts.c | 87 ++++++--- arch/arm/kernel/module.lds | 1 arch/arm/kvm/coproc.c | 77 ++++++-- arch/arm/kvm/handle_exit.c | 4 arch/arm/kvm/hyp/Makefile | 2 arch/arm/kvm/hyp/switch.c | 4 arch/arm/mm/proc-v7m.S | 4 arch/arm64/boot/dts/hisilicon/hi6220.dtsi | 3 arch/arm64/include/asm/barrier.h | 20 +- arch/arm64/include/asm/cmpxchg.h | 2 arch/arm64/include/asm/uaccess.h | 3 arch/arm64/kernel/armv8_deprecated.c | 3 arch/arm64/kvm/hyp/Makefile | 2 arch/metag/include/asm/uaccess.h | 49 +++-- arch/mips/Kconfig | 1 arch/powerpc/include/asm/mmu_context.h | 17 + arch/powerpc/kernel/eeh_driver.c | 19 +- arch/powerpc/kernel/exceptions-64e.S | 12 + arch/powerpc/kernel/mce.c | 2 arch/powerpc/kernel/process.c | 19 ++ arch/powerpc/kernel/traps.c | 4 arch/powerpc/mm/mmu_context_iommu.c | 4 arch/powerpc/platforms/pseries/dlpar.c | 1 arch/s390/kernel/crash_dump.c | 15 + arch/s390/kernel/entry.S | 21 +- arch/um/kernel/initrd.c | 4 arch/um/kernel/um_arch.c | 6 arch/x86/include/asm/uaccess.h | 6 arch/x86/kernel/fpu/init.c | 1 arch/x86/kvm/x86.c | 43 +++- drivers/char/lp.c | 6 drivers/char/mem.c | 5 drivers/char/tpm/tpm_crb.c | 3 drivers/char/tpm/tpm_i2c_nuvoton.c | 24 +- drivers/char/tpm/tpm_tis_core.c | 6 drivers/char/tpm/tpm_tis_spi.c | 160 +++++++---------- drivers/gpio/gpio-omap.c | 23 +- drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 29 --- drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 29 --- drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 36 +-- drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 29 --- drivers/gpu/drm/drm_edid.c | 8 drivers/gpu/drm/i915/i915_gem_stolen.c | 5 drivers/gpu/drm/nouveau/nvkm/subdev/therm/base.c | 2 drivers/gpu/drm/nouveau/nvkm/subdev/therm/fan.c | 2 drivers/gpu/drm/nouveau/nvkm/subdev/therm/fantog.c | 2 drivers/gpu/drm/nouveau/nvkm/subdev/therm/temp.c | 2 drivers/gpu/drm/nouveau/nvkm/subdev/timer/base.c | 59 ++++-- drivers/gpu/drm/nouveau/nvkm/subdev/timer/nv04.c | 2 drivers/iio/common/hid-sensors/hid-sensor-attributes.c | 26 ++ drivers/iio/common/hid-sensors/hid-sensor-trigger.c | 20 +- drivers/iio/dac/ad7303.c | 6 drivers/iio/pressure/bmp280-core.c | 11 - drivers/iio/proximity/as3935.c | 3 drivers/infiniband/core/addr.c | 4 drivers/infiniband/hw/hfi1/file_ops.c | 5 drivers/infiniband/hw/hfi1/init.c | 1 drivers/infiniband/hw/hfi1/user_exp_rcv.c | 32 +-- drivers/infiniband/hw/hfi1/user_exp_rcv.h | 1 drivers/infiniband/hw/mlx5/mr.c | 2 drivers/iommu/intel-iommu.c | 5 drivers/md/Kconfig | 1 drivers/md/dm-bufio.c | 35 ++- drivers/md/dm-cache-metadata.c | 12 - drivers/md/dm-mpath.c | 17 + drivers/md/dm-thin-metadata.c | 4 drivers/md/md.c | 5 drivers/md/persistent-data/dm-btree.c | 8 drivers/md/persistent-data/dm-space-map-disk.c | 15 + drivers/md/raid5.c | 6 drivers/media/dvb-frontends/cxd2841er.c | 4 drivers/media/platform/s5p-mfc/s5p_mfc.c | 13 - drivers/media/rc/mceusb.c | 4 drivers/media/usb/cx231xx/cx231xx-audio.c | 42 +++- drivers/media/usb/cx231xx/cx231xx-cards.c | 45 ++++ drivers/media/usb/dvb-usb/dib0700_core.c | 3 drivers/media/usb/dvb-usb/dibusb-mc-common.c | 2 drivers/media/usb/dvb-usb/digitv.c | 3 drivers/media/usb/dvb-usb/dw2102.c | 54 +++++ drivers/media/usb/dvb-usb/ttusb2.c | 19 ++ drivers/media/usb/gspca/konica.c | 3 drivers/media/usb/usbvision/usbvision-video.c | 9 drivers/media/usb/zr364xx/zr364xx.c | 8 drivers/misc/cxl/pci.c | 34 ++- drivers/mtd/nand/nand_base.c | 70 +++++++ drivers/mtd/nand/omap2.c | 9 drivers/mtd/nand/orion_nand.c | 42 ++-- drivers/net/irda/irda-usb.c | 2 drivers/net/wireless/ath/ath9k/hif_usb.c | 4 drivers/net/wireless/marvell/mwifiex/cfg80211.c | 4 drivers/net/wireless/marvell/mwifiex/pcie.c | 7 drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c | 122 +++++++++++- drivers/net/wireless/realtek/rtlwifi/rtl8821ae/reg.h | 1 drivers/nvdimm/bus.c | 5 drivers/nvme/host/pci.c | 7 drivers/of/address.c | 2 drivers/of/fdt.c | 3 drivers/of/of_numa.c | 2 drivers/pci/host/pci-hyperv.c | 13 - drivers/pci/pci-sysfs.c | 10 - drivers/pci/pci.c | 9 drivers/pci/proc.c | 21 +- drivers/regulator/rk808-regulator.c | 2 drivers/regulator/tps65023-regulator.c | 3 drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c | 114 +++++++++--- drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.h | 2 drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c | 24 +- drivers/staging/rtl8192e/rtl819x_TSProc.c | 15 - drivers/usb/class/cdc-acm.c | 13 - drivers/usb/core/devio.c | 14 - drivers/usb/core/hcd.c | 4 drivers/usb/core/hub.c | 19 +- drivers/usb/core/urb.c | 2 drivers/usb/dwc3/gadget.c | 9 drivers/usb/host/ohci-hcd.c | 3 drivers/usb/host/ohci-pci.c | 16 + drivers/usb/host/ohci.h | 1 drivers/usb/host/xhci-mem.c | 4 drivers/usb/host/xhci-pci.c | 7 drivers/usb/host/xhci-plat.c | 2 drivers/usb/misc/chaoskey.c | 2 drivers/usb/misc/iowarrior.c | 2 drivers/usb/misc/legousbtower.c | 38 ++-- drivers/usb/musb/musb_host.c | 9 drivers/usb/musb/tusb6010_omap.c | 13 - drivers/usb/serial/ftdi_sio.c | 10 - drivers/usb/serial/ftdi_sio_ids.h | 2 drivers/usb/serial/io_ti.c | 5 drivers/usb/serial/mct_u232.c | 2 drivers/usb/serial/option.c | 8 drivers/usb/serial/qcserial.c | 2 drivers/usb/storage/ene_ub6250.c | 90 +++++---- drivers/uwb/i1480/dfu/usb.c | 5 drivers/watchdog/pcwd_usb.c | 3 fs/crypto/fname.c | 2 fs/ext4/namei.c | 4 fs/f2fs/dir.c | 37 ++- fs/f2fs/f2fs.h | 3 fs/f2fs/hash.c | 7 fs/f2fs/inline.c | 4 fs/nfs/nfs4proc.c | 4 fs/nfs/pagelist.c | 15 + fs/nfs/write.c | 2 fs/nfsd/nfs4proc.c | 3 fs/nfsd/nfs4xdr.c | 8 fs/notify/fanotify/fanotify_user.c | 26 +- fs/proc/generic.c | 1 include/linux/hid-sensor-hub.h | 2 include/linux/kprobes.h | 4 kernel/fork.c | 10 - kernel/irq/chip.c | 2 kernel/kprobes.c | 2 kernel/pid_namespace.c | 2 kernel/trace/trace_kprobe.c | 5 net/ipx/af_ipx.c | 5 security/integrity/ima/ima_appraise.c | 5 sound/hda/hdac_controller.c | 4 sound/soc/codecs/cs4271.c | 2 166 files changed, 1650 insertions(+), 722 deletions(-)
Al Viro (1):
osf_wait4(): fix infoleak
Alan Stern (1):
USB: ene_usb6250: fix DMA to the stack
Alexander Couzens (1):
mtd: nand: add ooblayout for old hamming layout
Alexander Steffen (1):
tpm_tis_core: Choose appropriate timeout for reading burstcount
Alexander Sverdlin (1):
ASoC: cs4271: configure reset GPIO as output
Alexey Kardashevskiy (1):
powerpc/iommu: Do not call PageTransHuge() on tail pages
Alyssa Milburn (4):
ttusb2: limit messages to buffer size
zr364xx: enforce minimum size when reading header
digitv: limit messages to buffer size
dw2102: limit messages to buffer size
Amir Goldstein (1):
fanotify: don't expose EOPENSTALE to userspace
Andreas Klinger (1):
IIO: bmp280-core.c: fix error in humidity calculation
Andrey Korolyov (1):
USB: serial: ftdi_sio: add Olimex ARM-USB-TINY(H) PIDs
Anthony Mallet (1):
USB: serial: ftdi_sio: fix setting latency for unprivileged users
Ard Biesheuvel (1):
ARM: 8662/1: module: split core and init PLT sections
Ari Kauppi (1):
nfsd: fix undefined behavior in nfsd4_layout_verify
Bart Van Assche (1):
dm mpath: split and rename activate_path() to prepare for its expanded use
Ben Hutchings (1):
dvb-usb-dibusb-mc-common: Add MODULE_LICENSE
Ben Skeggs (5):
drm/nouveau/therm: remove ineffective workarounds for alarm bugs drm/nouveau/tmr: ack interrupt before processing alarms drm/nouveau/tmr: fix corruption of the pending list when rescheduling an alarm drm/nouveau/tmr: avoid processing completed alarms when adding a new one drm/nouveau/tmr: handle races with hw when updating the next alarm time
Benjamin Coddington (1):
NFS: Use GFP_NOIO for two allocations in writeback
Bjørn Mork (1):
USB: serial: qcserial: add more Lenovo EM74xx device IDs
Brian Norris (2):
mwifiex: MAC randomization should not be persistent
mwifiex: pcie: fix cmd_buf use-after-free in remove/reset
Bryant G. Ly (1):
ibmvscsis: Do not send aborted task response
Chris Wilson (1):
drm/i915/gvt: Disable access to stolen memory as a guest
Dan Carpenter (1):
ipx: call ipxitf_put() in ioctl error path
Daniel Glöckner (1):
ima: accept previously set IMA_NEW_FILE
Daniel Lezcano (1):
arm64: dts: hi6220: Reset the mmc hosts
Daniel Micay (1):
stackprotector: Increase the per-task stack canary's random range from 32 bits to 64 bits on 64-bit platforms
Daniel Scheller (1):
dvb-frontends/cxd2841er: define symbol_rate_min/max in T/C fe-ops
Daniele Palmas (1):
usb: serial: option: add Telit ME910 support
David Gibson (1):
powerpc/mm: Ensure IRQs are off in switch_mm()
David Rivshin (1):
gpio: omap: return error if requested debounce time is not possible
David Woodhouse (3):
PCI: Fix pci_mmap_fits() for HAVE_PCI_RESOURCE_TO_USER platforms
PCI: Fix another sanity check bug in /proc/pci mmap
PCI: Only allow WC mmap on prefetchable resources
Dennis Yang (1):
md: update slab_cache before releasing new stripes when stripes resizing
Dmitry Tunin (1):
ath9k_htc: Add support of AirTies 1eda:2315 AR9271 device
Eric Biggers (1):
fscrypt: avoid collisions when presenting long encrypted filenames
Eric W. Biederman (1):
pid_ns: Sleep in TASK_INTERRUPTIBLE in zap_pid_ns_processes
Fred Isaman (1):
NFS: Fix use after free in write error path
Gerd Hoffmann (1):
ohci-pci: add qemu quirk
Greg Kroah-Hartman (1):
Linux 4.9.30
Huacai Chen (1):
MIPS: Loongson-3: Select MIPS_L1_CACHE_SHIFT_6
J. Bruce Fields (1):
nfsd: encoders mustn't use unitialized values in error cases
Jaegeuk Kim (1):
f2fs: check entire encrypted bigname when finding a dentry
James Hogan (2):
metag/uaccess: Fix access_ok() metag/uaccess: Check access_ok in strncpy_from_user
Jeeja KP (1):
ALSA: hda: Fix cpu lockup when stopping the cmd dmas
Jerry Snitselaar (1):
tpm_crb: check for bad response size
Joe Thornber (2):
dm thin metadata: call precommit before saving the roots dm space map disk: fix some book keeping in the disk space map
Johan Hovold (18):
watchdog: pcwd_usb: fix NULL-deref at probe
ath9k_htc: fix NULL-deref at probe
of: fdt: add missing allocation-failure check
USB: chaoskey: fix Alea quirk on big-endian hosts
net: irda: irda-usb: fix firmware name on big-endian hosts
usbvision: fix NULL-deref at probe
mceusb: fix NULL-deref at probe
USB: iowarrior: fix info ioctl on big-endian hosts
USB: serial: mct_u232: fix big-endian baud-rate handling
USB: serial: io_ti: fix div-by-zero in set_termios
USB: hub: fix SS hub-descriptor handling
USB: hub: fix non-SS hub-descriptor handling
gspca: konica: add missing endpoint sanity check
dib0700: fix NULL-deref at probe
cx231xx-audio: fix init error path
cx231xx-audio: fix NULL-deref at probe
cx231xx-cards: fix NULL-deref at probe
uwb: fix device quirk on big-endian hosts
Jon Derrick (1):
nvme: unmap CMB and remove sysfs file in reset path
Julius Werner (1):
drivers: char: mem: Check for address space wraparound with mmap()
K. Y. Srinivasan (2):
PCI: hv: Allocate interrupt descriptors with GFP_ATOMIC
PCI: hv: Specify CPU_AFFINITY_ALL for MSI affinity when >= 32 CPUs
KarimAllah Ahmed (1):
iommu/vt-d: Flush the IOTLB to get rid of the initial kdump mappings
Kirill Tkhai (1):
pid_ns: Fix race between setns'ed fork() and zap_pid_ns_processes()
Kristina Martsenko (1):
arm64: documentation: document tagged pointer stack constraints
Larry Finger (1):
rtlwifi: rtl8821ae: setup 8812ae RFE according to device type
Leonard Crestez (1):
ARM: dts: imx6sx-sdb: Remove OPP override
Linus Torvalds (1):
x86: fix 32-bit case of __get_user_asm_u64()
LiuHailong (1):
powerpc/64e: Fix hang when debugging programs with relocated kernel
Ludovic Desroches (2):
ARM: dts: at91: sama5d3_xplained: fix ADC vref
ARM: dts: at91: sama5d3_xplained: not all ADC channels are available
Lukas Wunner (1):
PCI: Freeze PME scan before suspending devices
Mahesh Salgaonkar (1):
powerpc/book3s/mce: Move add_taint() later in virtual mode
Maksim Salau (2):
usb: misc: legousbtower: Fix buffers on stack
usb: misc: legousbtower: Fix memory leak
Malcolm Priestley (4):
staging: rtl8192e: rtl92e_fill_tx_desc fix write to mapped out memory.
staging: rtl8192e: fix 2 byte alignment of register BSSIDR.
staging: rtl8192e: rtl92e_get_eeprom_size Fix read size of EPROM_CMD.
staging: rtl8192e: GetTs Fix invalid TID 7 warning.
Marc Dietrich (1):
ARM: tegra: paz00: Mark panel regulator as enabled on boot
Marc Zyngier (2):
arm64: KVM: Do not use stack-protector to compile EL2 code
arm: KVM: Do not use stack-protector to compile HYP code
Marek Szyprowski (2):
s5p-mfc: Fix race between interrupt routine and device functions
s5p-mfc: Fix unbalanced call to clock management
Mario Kleiner (4):
drm/amdgpu: Make display watermark calculations more accurate drm/amdgpu: Avoid overflows/divide-by-zero in latency_watermark calculations. drm/amdgpu: Add missing lb_vblank_lead_lines setup to DCE-6 path. drm/edid: Add 10 bpc quirk for LGD 764 panel in HP zBook 17 G2
Mark Rutland (4):
arm64: xchg: hazard against entire exchange variable
arm64: ensure extension of smp_store_release value
arm64: armv8_deprecated: ensure extension of addr
arm64: uaccess: ensure extension of access_ok() addr
Martin Schwidefsky (1):
s390/cputime: fix incorrect system time
Masami Hiramatsu (1):
um: Fix to call read_initrd after init_bootmem
Mathias Nyman (1):
xhci: apply PME_STUCK_QUIRK and MISSING_CAS quirk for Denverton
Matt Ranostay (1):
iio: proximity: as3935: fix as3935_write
Matthias Lange (1):
xhci: remove GFP_DMA flag from allocation
Michael Holzheu (1):
s390/kdump: Add final note
Michael J. Ruhl (2):
IB/hfi1: Return an error on memory allocation failure IB/hfi1: Fix a subcontext memory leak
Michael Neuling (1):
powerpc/tm: Fix FP and VMX register corruption
Mike Snitzer (1):
dm cache metadata: fail operations if fail_io mode has been established
Mikulas Patocka (4):
dm raid: select the Kconfig option CONFIG_MD_RAID0
dm bufio: avoid a possible ABBA deadlock
dm bufio: check new buffer allocation watermark every 30 seconds dm bufio: make the parameter "retain_bytes" unsigned long
Nayna Jain (2):
tpm: msleep() delays - replace with usleep_range() in i2c nuvoton driver
tpm: add sleep only for retry in i2c_nuvoton_write_status()
NeilBrown (1):
md: MD_CLOSING needs to be cleared after called md_set_readonly or do_md_stop
Paolo Abeni (1):
infiniband: call ipv6 route lookup via the stub interface
Pavel Roskin (1):
iio: dac: ad7303: fix channel description
Peter Chen (1):
usb: host: xhci-mem: allocate zeroed Scratchpad Buffer
Peter Huewe (5):
tpm_tis_spi: Use single function to transfer data
tpm_tis_spi: Abort transfer when too many wait states are signaled
tpm_tis_spi: Check correct byte for wait state indicator
tpm_tis_spi: Remove limitation of transfers to MAX_SPI_FRAMESIZE bytes
tpm_tis_spi: Add small delay after last transfer
Peter Ujfalusi (1):
usb: musb: tusb6010_omap: Do not reset the other direction's packet size
Richard Cochran (1):
regulator: tps65023: Fix inverted core enable logic.
Rob Herring (1):
of: fix sparse warning in of_pci_range_parser_one
Roger Quadros (1):
mtd: nand: omap2: Fix partition creation via cmdline mtdparts
Russell Currey (1):
powerpc/eeh: Avoid use after free in eeh_handle_special_event()
Sagi Grimberg (1):
mlx5: Fix mlx5_ib_map_mr_sg mr length
Simon Baatz (1):
mtd: nand: orion: fix clk handling
Srinivas Pandruvada (1):
iio: hid-sensor: Store restore poll and hysteresis on S3
Takashi Iwai (1):
proc: Fix unbalanced hard link numbers
Thinh Nguyen (1):
usb: dwc3: gadget: Prevent losing events in event cache
Thomas Gleixner (2):
genirq: Fix chained interrupt data ordering tracing/kprobes: Enforce kprobes teardown after testing
Thomas Petazzoni (1):
usb: host: xhci-plat: propagate return value of platform_get_irq()
Tobias Herzog (1):
cdc-acm: fix possible invalid access when processing notification
Tony Lindgren (1):
usb: musb: Fix trying to suspend while active for OTG configurations
Toshi Kani (1):
libnvdimm: fix clear length of nvdimm_forget_poison()
Trond Myklebust (1):
NFSv4: Fix a hang in OPEN related to server reboot
Tyrel Datwyler (2):
of: fix "/cpus" reference leak in of_numa_parse_cpu_nodes() powerpc/pseries: Fix of_node_put() underflow during DLPAR remove
Vaibhav Jain (2):
cxl: Force context lock during EEH flow
cxl: Route eeh events to all drivers in cxl_pci_error_detected()
Vamsi Krishna Samavedam (1):
USB: core: replace %p with %pK
Vinothkumar Raja (1):
dm btree: fix for dm_btree_find_lowest_key()
Vladimir Murzin (1):
ARM: 8670/1: V7M: Do not corrupt vector table around v7m_invalidate_l1 call
Wadim Egorov (1):
regulator: rk808: Fix RK818 LDO2
Wanpeng Li (3):
KVM: x86: Fix load damaged SSEx MXCSR register
KVM: x86: Fix potential preemption when get the current kvmclock timestamp
KVM: X86: Fix read out-of-bounds vulnerability in kvm pio emulation
Willy Tarreau (1):
char: lp: fix possible integer overflow in lp_setup()
Zhichao Huang (1):
KVM: arm: plug potential guest hardware debug leakage
Greg KH
maintainerDocumentation/arm64/tagged-pointers.txt +47 -15
@@ -11,24 +11,56 @@ in AArch64 Linux. The kernel configures the translation tables so that translations made via TTBR0 (i.e. userspace mappings) have the top byte (bits 63:56) of the virtual address ignored by the translation hardware. This frees up -this byte for application use, with the following caveats: +this byte for application use. - (1) The kernel requires that all user addresses passed to EL1 - are tagged with tag 0x00. This means that any syscall - parameters containing user virtual addresses *must* have - their top byte cleared before trapping to the kernel. - (2) Non-zero tags are not preserved when delivering signals. - This means that signal handlers in applications making use - of tags cannot rely on the tag information for user virtual - addresses being maintained for fields inside siginfo_t. - One exception to this rule is for signals raised in response - to watchpoint debug exceptions, where the tag information - will be preserved. +Passing tagged addresses to the kernel +-------------------------------------- - (3) Special care should be taken when using tagged pointers, - since it is likely that C compilers will not hazard two - virtual addresses differing only in the upper byte. +All interpretation of userspace memory addresses by the kernel assumes +an address tag of 0x00. + +This includes, but is not limited to, addresses found in: + + - pointer arguments to system calls, including pointers in structures + passed to system calls, + + - the stack pointer (sp), e.g. when interpreting it to deliver a + signal, + + - the frame pointer (x29) and frame records, e.g. when interpreting + them to generate a backtrace or call graph. + +Using non-zero address tags in any of these locations may result in an +error code being returned, a (fatal) signal being raised, or other modes +of failure. + +For these reasons, passing non-zero address tags to the kernel via +system calls is forbidden, and using a non-zero address tag for sp is +strongly discouraged. + +Programs maintaining a frame pointer and frame records that use non-zero +address tags may suffer impaired or inaccurate debug and profiling +visibility. + + +Preserving tags +--------------- + +Non-zero tags are not preserved when delivering signals. This means that +signal handlers in applications making use of tags cannot rely on the +tag information for user virtual addresses being maintained for fields +inside siginfo_t. One exception to this rule is for signals raised in +response to watchpoint debug exceptions, where the tag information will +be preserved. The architecture prevents the use of a tagged PC, so the upper byte will be set to a sign-extension of bit 55 on exception return. + + +Other considerations +-------------------- + +Special care should be taken when using tagged pointers, since it is +likely that C compilers will not hazard two virtual addresses differing +only in the upper byte.
Makefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 4 PATCHLEVEL = 9 -SUBLEVEL = 29 +SUBLEVEL = 30 EXTRAVERSION = NAME = Roaring Lionus
arch/alpha/kernel/osf_sys.c +4 -2
@@ -1188,8 +1188,10 @@ SYSCALL_DEFINE4(osf_wait4, pid_t, pid, int __user *, ustatus, int, options,if (!access_ok (VERIFY_WRITE , ur,sizeof (*ur)))return -EFAULT ; - err =0 ; - err |=put_user (status, ustatus); + err =put_user (status, ustatus); +if (ret <0 ) +return err ? err : ret; + err |=__put_user (r.ru_utime.tv_sec, &ur->ru_utime.tv_sec); err |=__put_user (r.ru_utime.tv_usec, &ur->ru_utime.tv_usec); err |=__put_user (r.ru_stime.tv_sec, &ur->ru_stime.tv_sec);
arch/arm/boot/dts/at91-sama5d3_xplained.dts +2 -3
@@ -162,9 +162,10 @@ }; adc0: adc@f8018000 { + atmel,adc-vref = <3300>; + atmel,adc-channels-used = <0xfe>; pinctrl-0 = < &pinctrl_adc0_adtrg - &pinctrl_adc0_ad0 &pinctrl_adc0_ad1 &pinctrl_adc0_ad2 &pinctrl_adc0_ad3
@@ -172,8 +173,6 @@ &pinctrl_adc0_ad5 &pinctrl_adc0_ad6 &pinctrl_adc0_ad7 - &pinctrl_adc0_ad8 - &pinctrl_adc0_ad9 >; status = "okay"; };
arch/arm/boot/dts/imx6sx-sdb.dts +0 -17
@@ -12,23 +12,6 @@ model = "Freescale i.MX6 SoloX SDB RevB Board"; }; -&cpu0 { - operating-points = < - /* kHz uV */ - 996000 1250000 - 792000 1175000 - 396000 1175000 - 198000 1175000 - >; - fsl,soc-operating-points = < - /* ARM kHz SOC uV */ - 996000 1250000 - 792000 1175000 - 396000 1175000 - 198000 1175000 - >; -}; - &i2c1 { clock-frequency = <100000>; pinctrl-names = "default";
arch/arm/boot/dts/tegra20-paz00.dts +1 -0
@@ -569,6 +569,7 @@ regulator-name = "+3VS,vdd_pnl"; regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; + regulator-boot-on; gpio = <&gpio TEGRA_GPIO(A, 4) GPIO_ACTIVE_HIGH>; enable-active-high; };
arch/arm/include/asm/kvm_coproc.h +2 -1
@@ -31,7 +31,8 @@ void kvm_register_target_coproc_table(struct kvm_coproc_target_table *table);int kvm_handle_cp10_id (struct kvm_vcpu *vcpu,struct kvm_run *run);int kvm_handle_cp_0_13_access (struct kvm_vcpu *vcpu,struct kvm_run *run);int kvm_handle_cp14_load_store (struct kvm_vcpu *vcpu,struct kvm_run *run); -int kvm_handle_cp14_access (struct kvm_vcpu *vcpu,struct kvm_run *run); +int kvm_handle_cp14_32 (struct kvm_vcpu *vcpu,struct kvm_run *run); +int kvm_handle_cp14_64 (struct kvm_vcpu *vcpu,struct kvm_run *run);int kvm_handle_cp15_32 (struct kvm_vcpu *vcpu,struct kvm_run *run);int kvm_handle_cp15_64 (struct kvm_vcpu *vcpu,struct kvm_run *run);
arch/arm/include/asm/module.h +7 -2
@@ -18,13 +18,18 @@ enum { };#endif +struct mod_plt_sec { +struct elf32_shdr *plt; +int plt_count; +}; +struct mod_arch_specific {#ifdef CONFIG_ARM_UNWIND struct unwind_table *unwind[ARM_SEC_MAX ];#endif #ifdef CONFIG_ARM_MODULE_PLTS -struct elf32_shdr *plt; -int plt_count; +struct mod_plt_sec core; +struct mod_plt_sec init;#endif };
arch/arm/kernel/module-plts.c +60 -27
154 lines not on this page · raw message
arch/arm/kernel/module.lds +1 -0
@@ -1,3 +1,4 @@ SECTIONS { .plt : { BYTE(0) } + .init.plt : { BYTE(0) } }
arch/arm/kvm/coproc.c +59 -18
113 lines not on this page · raw message
arch/arm/kvm/handle_exit.c +2 -2
@@ -83,9 +83,9 @@ static exit_handle_fn arm_exit_handlers[] = { [HSR_EC_WFI] = kvm_handle_wfx, [HSR_EC_CP15_32] = kvm_handle_cp15_32, [HSR_EC_CP15_64] = kvm_handle_cp15_64, - [HSR_EC_CP14_MR] = kvm_handle_cp14_access, + [HSR_EC_CP14_MR] = kvm_handle_cp14_32, [HSR_EC_CP14_LS] = kvm_handle_cp14_load_store, - [HSR_EC_CP14_64] = kvm_handle_cp14_access, + [HSR_EC_CP14_64] = kvm_handle_cp14_64, [HSR_EC_CP_0_13] = kvm_handle_cp_0_13_access, [HSR_EC_CP10_ID] = kvm_handle_cp10_id, [HSR_EC_HVC] = handle_hvc,
arch/arm/kvm/hyp/Makefile +2 -0
@@ -2,6 +2,8 @@ # Makefile for Kernel-based Virtual Machine module, HYP part # +ccflags-y += -fno-stack-protector + KVM=../../../../virt/kvm obj-$(CONFIG_KVM_ARM_HOST) += $(KVM)/arm/hyp/vgic-v2-sr.o
arch/arm/kvm/hyp/switch.c +3 -1
@@ -48,7 +48,9 @@ static void __hyp_text __activate_traps(struct kvm_vcpu *vcpu, u32 *fpexc_host)write_sysreg (HSTR_T (15 ),HSTR );write_sysreg (HCPTR_TTA |HCPTR_TCP (10 ) |HCPTR_TCP (11 ),HCPTR ); val =read_sysreg (HDCR ); -write_sysreg (val |HDCR_TPM |HDCR_TPMCR ,HDCR ); + val |=HDCR_TPM |HDCR_TPMCR ;/* trap performance monitors */ + val |=HDCR_TDRA |HDCR_TDOSA |HDCR_TDA ;/* trap debug regs */ +write_sysreg (val,HDCR ); } static void __hyp_text __deactivate_traps(struct kvm_vcpu *vcpu)
arch/arm/mm/proc-v7m.S +2 -2
@@ -147,10 +147,10 @@ __v7m_setup_cont: @ Configure caches (if implemented) teq r8, #0 - stmneia r12, {r0-r6, lr} @ v7m_invalidate_l1 touches r0-r6 + stmneia sp, {r0-r6, lr} @ v7m_invalidate_l1 touches r0-r6 blne v7m_invalidate_l1 teq r8, #0 @ re-evalutae condition - ldmneia r12, {r0-r6, lr} + ldmneia sp, {r0-r6, lr} @ Configure the System Control Register to ensure 8-byte stack alignment @ Note the STKALIGN bit is either RW or RAO.
arch/arm64/boot/dts/hisilicon/hi6220.dtsi +3 -0
@@ -772,6 +772,7 @@ clocks = <&sys_ctrl 2>, <&sys_ctrl 1>; clock-names = "ciu", "biu"; resets = <&sys_ctrl PERIPH_RSTDIS0_MMC0>; + reset-names = "reset"; bus-width = <0x8>; vmmc-supply = <&ldo19>; pinctrl-names = "default";
@@ -795,6 +796,7 @@ clocks = <&sys_ctrl 4>, <&sys_ctrl 3>; clock-names = "ciu", "biu"; resets = <&sys_ctrl PERIPH_RSTDIS0_MMC1>; + reset-names = "reset"; vqmmc-supply = <&ldo7>; vmmc-supply = <&ldo10>; bus-width = <0x4>;
@@ -813,6 +815,7 @@ clocks = <&sys_ctrl HI6220_MMC2_CIUCLK>, <&sys_ctrl HI6220_MMC2_CLK>; clock-names = "ciu", "biu"; resets = <&sys_ctrl PERIPH_RSTDIS0_MMC2>; + reset-names = "reset"; bus-width = <0x4>; broken-cd; pinctrl-names = "default", "idle";
arch/arm64/include/asm/barrier.h +15 -5
@@ -42,25 +42,35 @@#define __smp_rmb () dmb(ishld)#define __smp_wmb () dmb(ishst) -#define __smp_store_release (p, v) \ +#define __smp_store_release (p, v) \ do { \ + union { typeof(*p) __val; char __c[1]; } __u = \ + { .__val = (__force typeof(*p)) (v) }; \ compiletime_assert_atomic_type(*p); \ switch (sizeof(*p)) { \ case 1: \ asm volatile ("stlrb %w1, %0" \ - : "=Q" (*p) : "r" (v) : "memory"); \ + : "=Q" (*p) \ + : "r" (*(__u8 *)__u.__c) \ + : "memory"); \ break; \ case 2: \ asm volatile ("stlrh %w1, %0" \ - : "=Q" (*p) : "r" (v) : "memory"); \ + : "=Q" (*p) \ + : "r" (*(__u16 *)__u.__c) \ + : "memory"); \ break; \ case 4: \ asm volatile ("stlr %w1, %0" \ - : "=Q" (*p) : "r" (v) : "memory"); \ + : "=Q" (*p) \ + : "r" (*(__u32 *)__u.__c) \ + : "memory"); \ break; \ case 8: \ asm volatile ("stlr %1, %0" \ - : "=Q" (*p) : "r" (v) : "memory"); \ + : "=Q" (*p) \ + : "r" (*(__u64 *)__u.__c) \ + : "memory"); \ break; \ } \ } while (0)
arch/arm64/include/asm/cmpxchg.h +1 -1
@@ -46,7 +46,7 @@ static inline unsigned long __xchg_case_##name(unsigned long x, \ " swp" #acq_lse #rel #sz "\t%" #w "3, %" #w "0, %2\n" \ __nops(3) \ " " #nop_lse) \ - : "=&r" (ret), "=&r" (tmp), "+Q" (*(u8 *)ptr) \ + : "=&r" (ret), "=&r" (tmp), "+Q" (*(unsigned long *)ptr) \ : "r" (x) \ : cl); \ \
arch/arm64/include/asm/uaccess.h +2 -1
@@ -93,11 +93,12 @@ static inline void set_fs(mm_segment_t fs)*/ #define __range_ok (addr, size) \ ({ \ + unsigned long __addr = (unsigned long __force)(addr); \ unsigned long flag, roksum; \ __chk_user_ptr(addr); \ asm("adds %1, %1, %3; ccmp %1, %4, #2, cc; cset %0, ls" \ : "=&r" (flag), "=&r" (roksum) \ - : "1" (addr), "Ir" (size), \ + : "1" (__addr), "Ir" (size), \ "r" (current_thread_info()->addr_limit) \ : "cc"); \ flag; \
arch/arm64/kernel/armv8_deprecated.c +2 -1
@@ -309,7 +309,8 @@ static void __init register_insn_emulation_sysctl(struct ctl_table *table)ALTERNATIVE ("nop" ,SET_PSTATE_PAN (1 ),ARM64_HAS_PAN , \CONFIG_ARM64_PAN ) \ : "=&r" (res), "+r" (data), "=&r" (temp), "=&r" (temp2) \ -: " r" (addr), " i" (-EAGAIN), " i" (-EFAULT), \ +: " r" ((unsigned long)addr), " i" (-EAGAIN), \ +" i" (-EFAULT), \ " i" (__SWP_LL_SC_LOOPS) \ : "memory")
arch/arm64/kvm/hyp/Makefile +2 -0
@@ -2,6 +2,8 @@ # Makefile for Kernel-based Virtual Machine module, HYP part # +ccflags-y += -fno-stack-protector + KVM=../../../../virt/kvm obj-$(CONFIG_KVM_ARM_HOST) += $(KVM)/arm/hyp/vgic-v2-sr.o
arch/metag/include/asm/uaccess.h +31 -18
63 lines not on this page · raw message
arch/mips/Kconfig +1 -0
@@ -1368,6 +1368,7 @@ config CPU_LOONGSON3 select WEAK_ORDERING select WEAK_REORDERING_BEYOND_LLSC select MIPS_PGD_C0_CONTEXT + select MIPS_L1_CACHE_SHIFT_6 select GPIOLIB help The Loongson 3 processor implements the MIPS64R2 instruction
arch/powerpc/include/asm/mmu_context.h +15 -2
@@ -70,8 +70,9 @@ extern void drop_cop(unsigned long acop, struct mm_struct *mm);* switch_mm is the entry point called from the architecture independent * code in kernel/sched/core.c */ -static inline void switch_mm (struct mm_struct *prev,struct mm_struct *next, -struct task_struct *tsk) +static inline void switch_mm_irqs_off (struct mm_struct *prev, +struct mm_struct *next, +struct task_struct *tsk) {/* Mark this context has been used on the new CPU */ if (!cpumask_test_cpu (smp_processor_id (),mm_cpumask (next)))
@@ -110,6 +111,18 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next,switch_mmu_context (prev, next, tsk); } +static inline void switch_mm (struct mm_struct *prev,struct mm_struct *next, +struct task_struct *tsk) +{ +unsigned long flags; + +local_irq_save (flags); +switch_mm_irqs_off (prev, next, tsk); +local_irq_restore (flags); +} +#define switch_mm_irqs_off switch_mm_irqs_off + +#define deactivate_mm (tsk,mm) do { } while (0)/*
arch/powerpc/kernel/eeh_driver.c +15 -4
@@ -724,7 +724,7 @@ static int eeh_reset_device(struct eeh_pe *pe, struct pci_bus *bus,*/ #define MAX_WAIT_FOR_RECOVERY 300 -static void eeh_handle_normal_event (struct eeh_pe *pe) +static bool eeh_handle_normal_event (struct eeh_pe *pe) {struct pci_bus *frozen_bus;struct eeh_dev *edev, *tmp;
@@ -736,7 +736,7 @@ static void eeh_handle_normal_event(struct eeh_pe *pe)if (!frozen_bus) {pr_err ("%s: Cannot find PCI bus for PHB#%d-PE#%x\n" , __func__, pe->phb->global_number, pe->addr); -return ; +return false; }eeh_pe_update_time_stamp (pe);
@@ -870,7 +870,7 @@ static void eeh_handle_normal_event(struct eeh_pe *pe)pr_info ("EEH: Notify device driver to resume\n" );eeh_pe_dev_traverse (pe, eeh_report_resume,NULL ); -return ; +return false; excess_failures:/*
@@ -915,8 +915,12 @@ static void eeh_handle_normal_event(struct eeh_pe *pe)pci_lock_rescan_remove ();pci_hp_remove_devices (frozen_bus);pci_unlock_rescan_remove (); + +/* The passed PE should no longer be used */ +return true; } } +return false; }static void eeh_handle_special_event (void )
@@ -982,7 +986,14 @@ static void eeh_handle_special_event(void)*/ if (rc ==EEH_NEXT_ERR_FROZEN_PE || rc ==EEH_NEXT_ERR_FENCED_PHB ) { -eeh_handle_normal_event (pe); +/* +* eeh_handle_normal_event() can make the PE stale if it +* determines that the PE cannot possibly be recovered. +* Don't modify the PE state if that's the case. +*/ +if (eeh_handle_normal_event (pe)) +continue ; +eeh_pe_state_clear (pe,EEH_PE_RECOVERING ); }else {pci_lock_rescan_remove ();
arch/powerpc/kernel/exceptions-64e.S +12 -0
@@ -735,8 +735,14 @@ END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC) andis. r15,r14,(DBSR_IC|DBSR_BT)@h beq+ 1f +#ifdef CONFIG_RELOCATABLE + ld r15,PACATOC(r13) + ld r14,interrupt_base_book3e@got(r15) + ld r15,__end_interrupts@got(r15) +#else LOAD_REG_IMMEDIATE(r14,interrupt_base_book3e) LOAD_REG_IMMEDIATE(r15,__end_interrupts) +#endif cmpld cr0,r10,r14 cmpld cr1,r10,r15 blt+ cr0,1f
@@ -799,8 +805,14 @@ kernel_dbg_exc: andis. r15,r14,(DBSR_IC|DBSR_BT)@h beq+ 1f +#ifdef CONFIG_RELOCATABLE + ld r15,PACATOC(r13) + ld r14,interrupt_base_book3e@got(r15) + ld r15,__end_interrupts@got(r15) +#else LOAD_REG_IMMEDIATE(r14,interrupt_base_book3e) LOAD_REG_IMMEDIATE(r15,__end_interrupts) +#endif cmpld cr0,r10,r14 cmpld cr1,r10,r15 blt+ cr0,1f
arch/powerpc/kernel/mce.c +2 -0
@@ -205,6 +205,8 @@ static void machine_check_process_queued_event(struct irq_work *work) {int index; +add_taint (TAINT_MACHINE_CHECK ,LOCKDEP_NOW_UNRELIABLE ); +/* * For now just print it to console. * TODO: log this error event to FSP or nvram.
arch/powerpc/kernel/process.c +19 -0
@@ -839,6 +839,25 @@ static void tm_reclaim_thread(struct thread_struct *thr,if (!MSR_TM_SUSPENDED (mfmsr ()))return ; +/* +* If we are in a transaction and FP is off then we can't have +* used FP inside that transaction. Hence the checkpointed +* state is the same as the live state. We need to copy the +* live state to the checkpointed state so that when the +* transaction is restored, the checkpointed state is correct +* and the aborted transaction sees the correct state. We use +* ckpt_regs.msr here as that's what tm_reclaim will use to +* determine if it's going to write the checkpointed state or +* not. So either this will write the checkpointed registers, +* or reclaim will. Similarly for VMX. +*/ +if ((thr->ckpt_regs.msr &MSR_FP ) ==0 ) +memcpy (&thr->ckfp_state, &thr->fp_state, +sizeof (struct thread_fp_state )); +if ((thr->ckpt_regs.msr &MSR_VEC ) ==0 ) +memcpy (&thr->ckvr_state, &thr->vr_state, +sizeof (struct thread_vr_state )); +giveup_all (container_of(thr ,struct task_struct ,thread ));tm_reclaim (thr, thr->ckpt_regs.msr, cause);
arch/powerpc/kernel/traps.c +2 -2
@@ -302,8 +302,6 @@ long machine_check_early(struct pt_regs *regs)__this_cpu_inc (irq_stat.mce_exceptions); -add_taint (TAINT_MACHINE_CHECK ,LOCKDEP_NOW_UNRELIABLE ); -if (cur_cpu_spec && cur_cpu_spec->machine_check_early) handled = cur_cpu_spec->machine_check_early (regs);return handled;
@@ -737,6 +735,8 @@ void machine_check_exception(struct pt_regs *regs)__this_cpu_inc (irq_stat.mce_exceptions); +add_taint (TAINT_MACHINE_CHECK ,LOCKDEP_NOW_UNRELIABLE ); +/* See if any machine dependent calls. In theory, we would want * to call the CPU first, and call the ppc_md. one if the CPU * one returns a positive number. However there is existing code
arch/powerpc/mm/mmu_context_iommu.c +2 -2
@@ -81,7 +81,7 @@ struct page *new_iommu_non_cma_page(struct page *page, unsigned long private,gfp_t gfp_mask =GFP_USER ;struct page *new_page; -if (PageHuge (page) ||PageTransHuge (page) ||PageCompound (page)) +if (PageCompound (page))return NULL ;if (PageHighMem (page))
@@ -100,7 +100,7 @@ static int mm_iommu_move_page_from_cma(struct page *page)LIST_HEAD (cma_migrate_pages);/* Ignore huge pages for now */ -if (PageHuge (page) ||PageTransHuge (page) ||PageCompound (page)) +if (PageCompound (page))return -EBUSY ;lru_add_drain ();
arch/powerpc/platforms/pseries/dlpar.c +0 -1
@@ -288,7 +288,6 @@ int dlpar_detach_node(struct device_node *dn)if (rc)return rc; -of_node_put (dn);/* Must decrement the refcount */ return 0 ; }
arch/s390/kernel/crash_dump.c +15 -0
@@ -427,6 +427,20 @@ static void *nt_vmcoreinfo(void *ptr) }/* +* Initialize final note (needed for /proc/vmcore code) +*/ +static void *nt_final (void *ptr) +{ +Elf64_Nhdr *note; + + note = (Elf64_Nhdr *) ptr; + note->n_namesz =0 ; + note->n_descsz =0 ; + note->n_type =0 ; +return PTR_ADD (ptr,sizeof (Elf64_Nhdr)); +} + +/* * Initialize ELF header (new kernel) */ static void *ehdr_init (Elf64_Ehdr *ehdr,int mem_chunk_cnt)
@@ -513,6 +527,7 @@ static void *notes_init(Elf64_Phdr *phdr, void *ptr, u64 notes_offset)if (sa->prefix !=0 ) ptr =fill_cpu_elf_notes (ptr, cpu++, sa); ptr =nt_vmcoreinfo (ptr); + ptr =nt_final (ptr);memset (phdr,0 ,sizeof (*phdr)); phdr->p_type =PT_NOTE ; phdr->p_offset = notes_offset;
arch/s390/kernel/entry.S +18 -3
@@ -321,6 +321,7 @@ ENTRY(system_call) lg %r14,__LC_VDSO_PER_CPU lmg %r0,%r10,__PT_R0(%r11) mvc __LC_RETURN_PSW(16),__PT_PSW(%r11) +.Lsysc_exit_timer: stpt __LC_EXIT_TIMER mvc __VDSO_ECTG_BASE(16,%r14),__LC_EXIT_TIMER lmg %r11,%r15,__PT_R11(%r11)
@@ -606,6 +607,7 @@ ENTRY(io_int_handler) lg %r14,__LC_VDSO_PER_CPU lmg %r0,%r10,__PT_R0(%r11) mvc __LC_RETURN_PSW(16),__PT_PSW(%r11) +.Lio_exit_timer: stpt __LC_EXIT_TIMER mvc __VDSO_ECTG_BASE(16,%r14),__LC_EXIT_TIMER lmg %r11,%r15,__PT_R11(%r11)
@@ -1135,15 +1137,23 @@ cleanup_critical: br %r14 .Lcleanup_sysc_restore: + # check if stpt has been executed clg %r9,BASED(.Lcleanup_sysc_restore_insn) + jh 0f + mvc __LC_EXIT_TIMER(8),__LC_ASYNC_ENTER_TIMER + cghi %r11,__LC_SAVE_AREA_ASYNC je 0f + mvc __LC_EXIT_TIMER(8),__LC_MCCK_ENTER_TIMER +0: clg %r9,BASED(.Lcleanup_sysc_restore_insn+8) + je 1f lg %r9,24(%r11) # get saved pointer to pt_regs mvc __LC_RETURN_PSW(16),__PT_PSW(%r9) mvc 0(64,%r11),__PT_R8(%r9) lmg %r0,%r7,__PT_R0(%r9) -0: lmg %r8,%r9,__LC_RETURN_PSW +1: lmg %r8,%r9,__LC_RETURN_PSW br %r14 .Lcleanup_sysc_restore_insn: + .quad .Lsysc_exit_timer .quad .Lsysc_done - 4 .Lcleanup_io_tif:
@@ -1151,15 +1161,20 @@ cleanup_critical: br %r14 .Lcleanup_io_restore: + # check if stpt has been executed clg %r9,BASED(.Lcleanup_io_restore_insn) - je 0f + jh 0f + mvc __LC_EXIT_TIMER(8),__LC_MCCK_ENTER_TIMER +0: clg %r9,BASED(.Lcleanup_io_restore_insn+8) + je 1f lg %r9,24(%r11) # get saved r11 pointer to pt_regs mvc __LC_RETURN_PSW(16),__PT_PSW(%r9) mvc 0(64,%r11),__PT_R8(%r9) lmg %r0,%r7,__PT_R0(%r9) -0: lmg %r8,%r9,__LC_RETURN_PSW +1: lmg %r8,%r9,__LC_RETURN_PSW br %r14 .Lcleanup_io_restore_insn: + .quad .Lio_exit_timer .quad .Lio_done - 4 .Lcleanup_idle:
arch/um/kernel/initrd.c +1 -3
@@ -14,7 +14,7 @@static char *initrd__initdata =NULL ;static int load_initrd (char *filename,void *buf,int size); -static int __init read_initrd (void ) +int __init read_initrd (void ) {void *area;long long size;
@@ -46,8 +46,6 @@ static int __init read_initrd(void)return 0 ; } -__uml_postsetup (read_initrd); -static int __init uml_initrd_setup (char *line,int *add) { initrd = line;
arch/um/kernel/um_arch.c +6 -0
@@ -336,11 +336,17 @@ int __init linux_main(int argc, char **argv)return start_uml (); } +int __init __weak read_initrd (void ) +{ +return 0 ; +} +void __init setup_arch (char **cmdline_p) {stack_protections ((unsigned long ) &init_thread_info);setup_physmem (uml_physmem, uml_reserved, physmem_size, highmem);mem_total_pages (physmem_size, iomem_size, highmem); +read_initrd ();paging_init ();strlcpy (boot_command_line, command_line,COMMAND_LINE_SIZE );
arch/x86/include/asm/uaccess.h +3 -3
@@ -315,10 +315,10 @@ do { \#define __get_user_asm_u64 (x, ptr, retval, errret) \ ({ \ __typeof__(ptr) __ptr = (ptr); \ - asm volatile(ASM_STAC "\n" \ + asm volatile("\n" \ "1: movl %2,%%eax\n" \ "2: movl %3,%%edx\n" \ - "3: " ASM_CLAC "\n" \ + "3:\n" \ ".section .fixup,\"ax\"\n" \ "4: mov %4,%0\n" \ " xorl %%eax,%%eax\n" \
@@ -327,7 +327,7 @@ do { \".previous\n" \ _ASM_EXTABLE(1b, 4b) \_ASM_EXTABLE (2b ,4b ) \ - : "=r" (retval), "=A"(x) \ + : "=r" (retval), "=&A"(x) \: " m" (__m(__ptr)), " m" __m(((u32 *)(__ptr)) + 1), \ "i" (errret), "0" (retval)); \ })
arch/x86/kernel/fpu/init.c +1 -0
@@ -101,6 +101,7 @@ static void fpu__init_system_early_generic(struct cpuinfo_x86 *c)* Boot time FPU feature detection code: */ unsigned int mxcsr_feature_mask__read_mostly =0xffffffffu ; +EXPORT_SYMBOL_GPL (mxcsr_feature_mask);static void __init fpu__init_system_mxcsr (void ) {
arch/x86/kvm/x86.c +31 -12
91 lines not on this page · raw message
drivers/char/lp.c +5 -1
@@ -859,7 +859,11 @@ static int __init lp_setup (char *str) }else if (!strcmp (str,"auto" )) { parport_nr[0 ] =LP_PARPORT_AUTO ; }else if (!strcmp (str,"none" )) { - parport_nr[parport_ptr++] =LP_PARPORT_NONE ; +if (parport_ptr <LP_NO ) + parport_nr[parport_ptr++] =LP_PARPORT_NONE ; +else +printk (KERN_INFO "lp: too many ports, %s ignored.\n" , + str); }else if (!strcmp (str,"reset" )) { reset =1 ; }
drivers/char/mem.c +5 -0
@@ -340,6 +340,11 @@ static const struct vm_operations_struct mmap_mem_ops = {static int mmap_mem (struct file *file,struct vm_area_struct *vma) {size_t size = vma->vm_end - vma->vm_start; +phys_addr_t offset = (phys_addr_t )vma->vm_pgoff <<PAGE_SHIFT ; + +/* It's illegal to wrap around the end of the physical address space. */ +if (offset + (phys_addr_t )size < offset) +return -EINVAL ;if (!valid_mmap_phys_addr_range (vma->vm_pgoff, size))return -EINVAL ;
drivers/char/tpm/tpm_crb.c +1 -2
@@ -111,8 +111,7 @@ static int crb_recv(struct tpm_chip *chip, u8 *buf, size_t count)memcpy_fromio (buf, priv->rsp,6 ); expected =be32_to_cpup ((__be32 *) &buf[2 ]); - -if (expected > count) +if (expected > count || expected <6 )return -EIO ;memcpy_fromio (&buf[6 ], &priv->rsp[6 ], expected -6 );
drivers/char/tpm/tpm_i2c_nuvoton.c +16 -8
@@ -49,9 +49,10 @@*/ #define TPM_I2C_MAX_BUF_SIZE 32#define TPM_I2C_RETRY_COUNT 32 -#define TPM_I2C_BUS_DELAY 1/* msec */ -#define TPM_I2C_RETRY_DELAY_SHORT 2/* msec */ -#define TPM_I2C_RETRY_DELAY_LONG 10/* msec */ +#define TPM_I2C_BUS_DELAY 1000/* usec */ +#define TPM_I2C_RETRY_DELAY_SHORT (2 * 1000)/* usec */ +#define TPM_I2C_RETRY_DELAY_LONG (10 * 1000)/* usec */ +#define TPM_I2C_DELAY_RANGE 300/* usec */ #define OF_IS_TPM2 ((void *)1)#define I2C_IS_TPM2 1
@@ -123,7 +124,9 @@ static s32 i2c_nuvoton_write_status(struct i2c_client *client, u8 data)/* this causes the current command to be aborted */ for (i =0 , status =-1 ; i <TPM_I2C_RETRY_COUNT && status <0 ; i++) { status =i2c_nuvoton_write_buf (client,TPM_STS ,1 , &data); -msleep (TPM_I2C_BUS_DELAY ); +if (status <0 ) +usleep_range (TPM_I2C_BUS_DELAY ,TPM_I2C_BUS_DELAY + +TPM_I2C_DELAY_RANGE ); }return status; }
@@ -160,7 +163,8 @@ static int i2c_nuvoton_get_burstcount(struct i2c_client *client, burst_count =min_t (u8,TPM_I2C_MAX_BUF_SIZE , data);break ; } -msleep (TPM_I2C_BUS_DELAY ); +usleep_range (TPM_I2C_BUS_DELAY ,TPM_I2C_BUS_DELAY + +TPM_I2C_DELAY_RANGE ); }while (time_before (jiffies, stop));return burst_count;
@@ -203,13 +207,17 @@ static int i2c_nuvoton_wait_for_stat(struct tpm_chip *chip, u8 mask, u8 value,return 0 ;/* use polling to wait for the event */ - ten_msec = jiffies +msecs_to_jiffies (TPM_I2C_RETRY_DELAY_LONG ); + ten_msec = jiffies +usecs_to_jiffies (TPM_I2C_RETRY_DELAY_LONG ); stop = jiffies + timeout; do { if (time_before(jiffies, ten_msec)) - msleep(TPM_I2C_RETRY_DELAY_SHORT); + usleep_range(TPM_I2C_RETRY_DELAY_SHORT, + TPM_I2C_RETRY_DELAY_SHORT + + TPM_I2C_DELAY_RANGE); else - msleep(TPM_I2C_RETRY_DELAY_LONG); + usleep_range(TPM_I2C_RETRY_DELAY_LONG, + TPM_I2C_RETRY_DELAY_LONG + + TPM_I2C_DELAY_RANGE); status_valid = i2c_nuvoton_check_status(chip, mask, value); if (status_valid)
drivers/char/tpm/tpm_tis_core.c +4 -2
@@ -160,8 +160,10 @@ static int get_burstcount(struct tpm_chip *chip)u32 value;/* wait for burstcount */ -/* which timeout value, spec has 2 answers (c & d) */ - stop = jiffies + chip->timeout_d; +if (chip->flags &TPM_CHIP_FLAG_TPM2 ) + stop = jiffies + chip->timeout_a; +else + stop = jiffies + chip->timeout_d; do { rc = tpm_tis_read32(priv, TPM_STS(priv->locality), &value); if (rc < 0)
drivers/char/tpm/tpm_tis_spi.c +68 -92
198 lines not on this page · raw message
drivers/gpio/gpio-omap.c +17 -6
@@ -208,9 +208,11 @@ static inline void omap_gpio_dbck_disable(struct gpio_bank *bank)* OMAP's debounce time is in 31us steps * <debounce time> = (GPIO_DEBOUNCINGTIME[7:0].DEBOUNCETIME + 1) x 31 * so we need to convert and round up to the closest unit. +* +* Return: 0 on success, negative error otherwise. */ -static void omap2_set_gpio_debounce (struct gpio_bank *bank,unsigned offset, -unsigned debounce) +static int omap2_set_gpio_debounce (struct gpio_bank *bank,unsigned offset, +unsigned debounce) {void __iomem *reg;u32 val;
@@ -218,11 +220,12 @@ static void omap2_set_gpio_debounce(struct gpio_bank *bank, unsigned offset,bool enable = !!debounce;if (!bank->dbck_flag) -return ; +return -ENOTSUPP ;if (enable) { debounce =DIV_ROUND_UP (debounce,31 ) -1 ; - debounce &=OMAP4_GPIO_DEBOUNCINGTIME_MASK ; +if ((debounce &OMAP4_GPIO_DEBOUNCINGTIME_MASK ) != debounce) +return -EINVAL ; } l =BIT (offset);
@@ -255,6 +258,8 @@ static void omap2_set_gpio_debounce(struct gpio_bank *bank, unsigned offset, bank->context.debounce = debounce; bank->context.debounce_en = val; } + +return 0 ; }/**
@@ -964,14 +969,20 @@ static int omap_gpio_debounce(struct gpio_chip *chip, unsigned offset, {struct gpio_bank *bank;unsigned long flags; +int ret; bank =gpiochip_get_data (chip);raw_spin_lock_irqsave (&bank->lock, flags); -omap2_set_gpio_debounce (bank, offset, debounce); + ret =omap2_set_gpio_debounce (bank, offset, debounce);raw_spin_unlock_irqrestore (&bank->lock, flags); -return 0 ; +if (ret) +dev_info (chip->parent, +"Could not set line %u debounce to %u microseconds (%d)" , + offset, debounce, ret); + +return ret; }static void omap_gpio_set (struct gpio_chip *chip,unsigned offset,int value)
drivers/gpu/drm/amd/amdgpu/dce_v10_0.c +8 -21
@@ -1173,23 +1173,10 @@ static u32 dce_v10_0_latency_watermark(struct dce10_wm_params *wm) a.full =dfixed_const (available_bandwidth); b.full =dfixed_const (wm->num_heads); a.full =dfixed_div (a, b); + tmp =div_u64 ((u64 ) dmif_size * (u64 ) wm->disp_clk, mc_latency +512 ); + tmp =min (dfixed_trunc (a), tmp); - b.full =dfixed_const (mc_latency +512 ); - c.full =dfixed_const (wm->disp_clk); - b.full =dfixed_div (b, c); - - c.full =dfixed_const (dmif_size); - b.full =dfixed_div (c, b); - - tmp =min (dfixed_trunc (a),dfixed_trunc (b)); - - b.full =dfixed_const (1000 ); - c.full =dfixed_const (wm->disp_clk); - b.full =dfixed_div (c, b); - c.full =dfixed_const (wm->bytes_per_pixel); - b.full =dfixed_mul (b, c); - - lb_fill_bw =min (tmp,dfixed_trunc (b)); + lb_fill_bw =min (tmp, wm->disp_clk * wm->bytes_per_pixel /1000 ); a.full =dfixed_const (max_src_lines_per_dst_line * wm->src_width * wm->bytes_per_pixel); b.full =dfixed_const (1000 );
@@ -1297,14 +1284,14 @@ static void dce_v10_0_program_watermarks(struct amdgpu_device *adev, {struct drm_display_mode *mode = &amdgpu_crtc->base.mode;struct dce10_wm_params wm_low, wm_high; -u32 pixel_period; +u32 active_time;u32 line_time =0 ;u32 latency_watermark_a =0 , latency_watermark_b =0 ;u32 tmp, wm_mask, lb_vblank_lead_lines =0 ;if (amdgpu_crtc->base.enabled && num_heads && mode) { - pixel_period =1000000 / (u32 )mode->clock; - line_time =min ((u32 )mode->crtc_htotal * pixel_period, (u32 )65535 ); + active_time =1000000UL * (u32 )mode->crtc_hdisplay / (u32 )mode->clock; + line_time =min ((u32) (1000000UL * (u32 )mode->crtc_htotal / (u32 )mode->clock), (u32 )65535 );/* watermark for high clocks */ if (adev->pm.dpm_enabled) {
@@ -1319,7 +1306,7 @@ static void dce_v10_0_program_watermarks(struct amdgpu_device *adev, wm_high.disp_clk = mode->clock; wm_high.src_width = mode->crtc_hdisplay; - wm_high.active_time = mode->crtc_hdisplay * pixel_period; + wm_high.active_time = active_time; wm_high.blank_time = line_time - wm_high.active_time; wm_high.interlaced = false;if (mode->flags &DRM_MODE_FLAG_INTERLACE )
@@ -1358,7 +1345,7 @@ static void dce_v10_0_program_watermarks(struct amdgpu_device *adev, wm_low.disp_clk = mode->clock; wm_low.src_width = mode->crtc_hdisplay; - wm_low.active_time = mode->crtc_hdisplay * pixel_period; + wm_low.active_time = active_time; wm_low.blank_time = line_time - wm_low.active_time; wm_low.interlaced = false;if (mode->flags &DRM_MODE_FLAG_INTERLACE )
drivers/gpu/drm/amd/amdgpu/dce_v11_0.c +8 -21
@@ -1140,23 +1140,10 @@ static u32 dce_v11_0_latency_watermark(struct dce10_wm_params *wm) a.full =dfixed_const (available_bandwidth); b.full =dfixed_const (wm->num_heads); a.full =dfixed_div (a, b); + tmp =div_u64 ((u64 ) dmif_size * (u64 ) wm->disp_clk, mc_latency +512 ); + tmp =min (dfixed_trunc (a), tmp); - b.full =dfixed_const (mc_latency +512 ); - c.full =dfixed_const (wm->disp_clk); - b.full =dfixed_div (b, c); - - c.full =dfixed_const (dmif_size); - b.full =dfixed_div (c, b); - - tmp =min (dfixed_trunc (a),dfixed_trunc (b)); - - b.full =dfixed_const (1000 ); - c.full =dfixed_const (wm->disp_clk); - b.full =dfixed_div (c, b); - c.full =dfixed_const (wm->bytes_per_pixel); - b.full =dfixed_mul (b, c); - - lb_fill_bw =min (tmp,dfixed_trunc (b)); + lb_fill_bw =min (tmp, wm->disp_clk * wm->bytes_per_pixel /1000 ); a.full =dfixed_const (max_src_lines_per_dst_line * wm->src_width * wm->bytes_per_pixel); b.full =dfixed_const (1000 );
@@ -1264,14 +1251,14 @@ static void dce_v11_0_program_watermarks(struct amdgpu_device *adev, {struct drm_display_mode *mode = &amdgpu_crtc->base.mode;struct dce10_wm_params wm_low, wm_high; -u32 pixel_period; +u32 active_time;u32 line_time =0 ;u32 latency_watermark_a =0 , latency_watermark_b =0 ;u32 tmp, wm_mask, lb_vblank_lead_lines =0 ;if (amdgpu_crtc->base.enabled && num_heads && mode) { - pixel_period =1000000 / (u32 )mode->clock; - line_time =min ((u32 )mode->crtc_htotal * pixel_period, (u32 )65535 ); + active_time =1000000UL * (u32 )mode->crtc_hdisplay / (u32 )mode->clock; + line_time =min ((u32) (1000000UL * (u32 )mode->crtc_htotal / (u32 )mode->clock), (u32 )65535 );/* watermark for high clocks */ if (adev->pm.dpm_enabled) {
@@ -1286,7 +1273,7 @@ static void dce_v11_0_program_watermarks(struct amdgpu_device *adev, wm_high.disp_clk = mode->clock; wm_high.src_width = mode->crtc_hdisplay; - wm_high.active_time = mode->crtc_hdisplay * pixel_period; + wm_high.active_time = active_time; wm_high.blank_time = line_time - wm_high.active_time; wm_high.interlaced = false;if (mode->flags &DRM_MODE_FLAG_INTERLACE )
@@ -1325,7 +1312,7 @@ static void dce_v11_0_program_watermarks(struct amdgpu_device *adev, wm_low.disp_clk = mode->clock; wm_low.src_width = mode->crtc_hdisplay; - wm_low.active_time = mode->crtc_hdisplay * pixel_period; + wm_low.active_time = active_time; wm_low.blank_time = line_time - wm_low.active_time; wm_low.interlaced = false;if (mode->flags &DRM_MODE_FLAG_INTERLACE )
drivers/gpu/drm/amd/amdgpu/dce_v6_0.c +14 -22
@@ -932,23 +932,10 @@ static u32 dce_v6_0_latency_watermark(struct dce6_wm_params *wm) a.full =dfixed_const (available_bandwidth); b.full =dfixed_const (wm->num_heads); a.full =dfixed_div (a, b); + tmp =div_u64 ((u64 ) dmif_size * (u64 ) wm->disp_clk, mc_latency +512 ); + tmp =min (dfixed_trunc (a), tmp); - b.full =dfixed_const (mc_latency +512 ); - c.full =dfixed_const (wm->disp_clk); - b.full =dfixed_div (b, c); - - c.full =dfixed_const (dmif_size); - b.full =dfixed_div (c, b); - - tmp =min (dfixed_trunc (a),dfixed_trunc (b)); - - b.full =dfixed_const (1000 ); - c.full =dfixed_const (wm->disp_clk); - b.full =dfixed_div (c, b); - c.full =dfixed_const (wm->bytes_per_pixel); - b.full =dfixed_mul (b, c); - - lb_fill_bw =min (tmp,dfixed_trunc (b)); + lb_fill_bw =min (tmp, wm->disp_clk * wm->bytes_per_pixel /1000 ); a.full =dfixed_const (max_src_lines_per_dst_line * wm->src_width * wm->bytes_per_pixel); b.full =dfixed_const (1000 );
@@ -1057,18 +1044,18 @@ static void dce_v6_0_program_watermarks(struct amdgpu_device *adev,struct drm_display_mode *mode = &amdgpu_crtc->base.mode;struct dce6_wm_params wm_low, wm_high;u32 dram_channels; -u32 pixel_period; +u32 active_time;u32 line_time =0 ;u32 latency_watermark_a =0 , latency_watermark_b =0 ;u32 priority_a_mark =0 , priority_b_mark =0 ;u32 priority_a_cnt =PRIORITY_OFF ;u32 priority_b_cnt =PRIORITY_OFF ; -u32 tmp, arb_control3; +u32 tmp, arb_control3, lb_vblank_lead_lines =0 ;fixed20_12 a, b, c;if (amdgpu_crtc->base.enabled && num_heads && mode) { - pixel_period =1000000 / (u32 )mode->clock; - line_time =min ((u32 )mode->crtc_htotal * pixel_period, (u32 )65535 ); + active_time =1000000UL * (u32 )mode->crtc_hdisplay / (u32 )mode->clock; + line_time =min ((u32) (1000000UL * (u32 )mode->crtc_htotal / (u32 )mode->clock), (u32 )65535 ); priority_a_cnt =0 ; priority_b_cnt =0 ;
@@ -1087,7 +1074,7 @@ static void dce_v6_0_program_watermarks(struct amdgpu_device *adev, wm_high.disp_clk = mode->clock; wm_high.src_width = mode->crtc_hdisplay; - wm_high.active_time = mode->crtc_hdisplay * pixel_period; + wm_high.active_time = active_time; wm_high.blank_time = line_time - wm_high.active_time; wm_high.interlaced = false;if (mode->flags &DRM_MODE_FLAG_INTERLACE )
@@ -1114,7 +1101,7 @@ static void dce_v6_0_program_watermarks(struct amdgpu_device *adev, wm_low.disp_clk = mode->clock; wm_low.src_width = mode->crtc_hdisplay; - wm_low.active_time = mode->crtc_hdisplay * pixel_period; + wm_low.active_time = active_time; wm_low.blank_time = line_time - wm_low.active_time; wm_low.interlaced = false;if (mode->flags &DRM_MODE_FLAG_INTERLACE )
@@ -1175,6 +1162,8 @@ static void dce_v6_0_program_watermarks(struct amdgpu_device *adev, c.full =dfixed_div (c, a); priority_b_mark =dfixed_trunc (c); priority_b_cnt |= priority_b_mark &PRIORITY_MARK_MASK ; + + lb_vblank_lead_lines =DIV_ROUND_UP (lb_size, mode->crtc_hdisplay); }/* select wm A */
@@ -1204,6 +1193,9 @@ static void dce_v6_0_program_watermarks(struct amdgpu_device *adev,/* save values for DPM */ amdgpu_crtc->line_time = line_time; amdgpu_crtc->wm_high = latency_watermark_a; + +/* Save number of lines the linebuffer leads before the scanout */ + amdgpu_crtc->lb_vblank_lead_lines = lb_vblank_lead_lines; }/* watermark setup */
drivers/gpu/drm/amd/amdgpu/dce_v8_0.c +8 -21
@@ -1094,23 +1094,10 @@ static u32 dce_v8_0_latency_watermark(struct dce8_wm_params *wm) a.full =dfixed_const (available_bandwidth); b.full =dfixed_const (wm->num_heads); a.full =dfixed_div (a, b); + tmp =div_u64 ((u64 ) dmif_size * (u64 ) wm->disp_clk, mc_latency +512 ); + tmp =min (dfixed_trunc (a), tmp); - b.full =dfixed_const (mc_latency +512 ); - c.full =dfixed_const (wm->disp_clk); - b.full =dfixed_div (b, c); - - c.full =dfixed_const (dmif_size); - b.full =dfixed_div (c, b); - - tmp =min (dfixed_trunc (a),dfixed_trunc (b)); - - b.full =dfixed_const (1000 ); - c.full =dfixed_const (wm->disp_clk); - b.full =dfixed_div (c, b); - c.full =dfixed_const (wm->bytes_per_pixel); - b.full =dfixed_mul (b, c); - - lb_fill_bw =min (tmp,dfixed_trunc (b)); + lb_fill_bw =min (tmp, wm->disp_clk * wm->bytes_per_pixel /1000 ); a.full =dfixed_const (max_src_lines_per_dst_line * wm->src_width * wm->bytes_per_pixel); b.full =dfixed_const (1000 );
@@ -1218,14 +1205,14 @@ static void dce_v8_0_program_watermarks(struct amdgpu_device *adev, {struct drm_display_mode *mode = &amdgpu_crtc->base.mode;struct dce8_wm_params wm_low, wm_high; -u32 pixel_period; +u32 active_time;u32 line_time =0 ;u32 latency_watermark_a =0 , latency_watermark_b =0 ;u32 tmp, wm_mask, lb_vblank_lead_lines =0 ;if (amdgpu_crtc->base.enabled && num_heads && mode) { - pixel_period =1000000 / (u32 )mode->clock; - line_time =min ((u32 )mode->crtc_htotal * pixel_period, (u32 )65535 ); + active_time =1000000UL * (u32 )mode->crtc_hdisplay / (u32 )mode->clock; + line_time =min ((u32) (1000000UL * (u32 )mode->crtc_htotal / (u32 )mode->clock), (u32 )65535 );/* watermark for high clocks */ if (adev->pm.dpm_enabled) {
@@ -1240,7 +1227,7 @@ static void dce_v8_0_program_watermarks(struct amdgpu_device *adev, wm_high.disp_clk = mode->clock; wm_high.src_width = mode->crtc_hdisplay; - wm_high.active_time = mode->crtc_hdisplay * pixel_period; + wm_high.active_time = active_time; wm_high.blank_time = line_time - wm_high.active_time; wm_high.interlaced = false;if (mode->flags &DRM_MODE_FLAG_INTERLACE )
@@ -1279,7 +1266,7 @@ static void dce_v8_0_program_watermarks(struct amdgpu_device *adev, wm_low.disp_clk = mode->clock; wm_low.src_width = mode->crtc_hdisplay; - wm_low.active_time = mode->crtc_hdisplay * pixel_period; + wm_low.active_time = active_time; wm_low.blank_time = line_time - wm_low.active_time; wm_low.interlaced = false;if (mode->flags &DRM_MODE_FLAG_INTERLACE )
drivers/gpu/drm/drm_edid.c +8 -0
@@ -76,6 +76,8 @@#define EDID_QUIRK_FORCE_12BPC (1 << 9)/* Force 6bpc */ #define EDID_QUIRK_FORCE_6BPC (1 << 10) +/* Force 10bpc */ +#define EDID_QUIRK_FORCE_10BPC (1 << 11)struct detailed_mode_closure {struct drm_connector *connector;
@@ -118,6 +120,9 @@ static const struct edid_quirk { {"FCM" ,13600 ,EDID_QUIRK_PREFER_LARGE_75 | EDID_QUIRK_DETAILED_IN_CM }, +/* LGD panel of HP zBook 17 G2, eDP 10 bpc, but reports unknown bpc */ + { "LGD", 764, EDID_QUIRK_FORCE_10BPC }, +/* LG Philips LCD LP154W01-A5 */ { "LPL", 0, EDID_QUIRK_DETAILED_USE_MAXIMUM_SIZE }, { "LPL", 0x2a00, EDID_QUIRK_DETAILED_USE_MAXIMUM_SIZE },
@@ -4105,6 +4110,9 @@ int drm_add_edid_modes(struct drm_connector *connector, struct edid *edid)if (quirks &EDID_QUIRK_FORCE_8BPC ) connector->display_info.bpc =8 ; +if (quirks &EDID_QUIRK_FORCE_10BPC ) + connector->display_info.bpc =10 ; +if (quirks &EDID_QUIRK_FORCE_12BPC ) connector->display_info.bpc =12 ;
drivers/gpu/drm/i915/i915_gem_stolen.c +5 -0
@@ -420,6 +420,11 @@ int i915_gem_init_stolen(struct drm_device *dev)return 0 ; } +if (intel_vgpu_active (dev_priv)) { +DRM_INFO ("iGVT-g active, disabling use of stolen memory\n" ); +return 0 ; + } +#ifdef CONFIG_INTEL_IOMMU if (intel_iommu_gfx_mapped &&INTEL_INFO (dev)->gen <8 ) {DRM_INFO ("DMAR active, disabling use of stolen memory\n" );
drivers/gpu/drm/nouveau/nvkm/subdev/therm/base.c +1 -1
@@ -130,7 +130,7 @@ nvkm_therm_update(struct nvkm_therm *therm, int mode) poll = false; } -if (list_empty (&therm->alarm.head) && poll) +if (poll)nvkm_timer_alarm (tmr,1000000000ULL , &therm->alarm);spin_unlock_irqrestore (&therm->lock, flags);
drivers/gpu/drm/nouveau/nvkm/subdev/therm/fan.c +1 -1
@@ -83,7 +83,7 @@ nvkm_fan_update(struct nvkm_fan *fan, bool immediate, int target)spin_unlock_irqrestore (&fan->lock, flags);/* schedule next fan update, if not at target speed already */ -if (list_empty (&fan->alarm.head) && target != duty) { +if (target != duty) {u16 bump_period = fan->bios.bump_period;u16 slow_down_period = fan->bios.slow_down_period;u64 delay;
drivers/gpu/drm/nouveau/nvkm/subdev/therm/fantog.c +1 -1
@@ -53,7 +53,7 @@ nvkm_fantog_update(struct nvkm_fantog *fan, int percent) duty = !nvkm_gpio_get (gpio,0 ,DCB_GPIO_FAN ,0xff );nvkm_gpio_set (gpio,0 ,DCB_GPIO_FAN ,0xff , duty); -if (list_empty (&fan->alarm.head) && percent != (duty *100 )) { +if (percent != (duty *100 )) {u64 next_change = (percent * fan->period_us) /100 ;if (!duty) next_change = fan->period_us - next_change;
drivers/gpu/drm/nouveau/nvkm/subdev/therm/temp.c +1 -1
@@ -185,7 +185,7 @@ alarm_timer_callback(struct nvkm_alarm *alarm)spin_unlock_irqrestore (&therm->sensor.alarm_program_lock, flags);/* schedule the next poll in one second */ -if (therm->func->temp_get (therm) >=0 &&list_empty (&alarm->head)) +if (therm->func->temp_get (therm) >=0 )nvkm_timer_alarm (tmr,1000000000ULL , alarm); }
drivers/gpu/drm/nouveau/nvkm/subdev/timer/base.c +39 -20
86 lines not on this page · raw message
drivers/gpu/drm/nouveau/nvkm/subdev/timer/nv04.c +1 -1
@@ -76,8 +76,8 @@ nv04_timer_intr(struct nvkm_timer *tmr)u32 stat =nvkm_rd32 (device,NV04_PTIMER_INTR_0 );if (stat &0x00000001 ) { -nvkm_timer_alarm_trigger (tmr);nvkm_wr32 (device,NV04_PTIMER_INTR_0 ,0x00000001 ); +nvkm_timer_alarm_trigger (tmr); stat &= ~0x00000001 ; }
drivers/iio/common/hid-sensors/hid-sensor-attributes.c +24 -2
@@ -217,7 +217,15 @@ int hid_sensor_write_samp_freq_value(struct hid_sensor_common *st,if (ret <0 || value <0 ) ret = -EINVAL ; -return ret; + ret =sensor_hub_get_feature (st->hsdev, + st->poll.report_id, + st->poll.index,sizeof (value), &value); +if (ret <0 || value <0 ) +return -EINVAL ; + + st->poll_interval = value; + +return 0 ; }EXPORT_SYMBOL (hid_sensor_write_samp_freq_value);
@@ -259,7 +267,16 @@ int hid_sensor_write_raw_hyst_value(struct hid_sensor_common *st,if (ret <0 || value <0 ) ret = -EINVAL ; -return ret; + ret =sensor_hub_get_feature (st->hsdev, + st->sensitivity.report_id, + st->sensitivity.index,sizeof (value), + &value); +if (ret <0 || value <0 ) +return -EINVAL ; + + st->raw_hystersis = value; + +return 0 ; }EXPORT_SYMBOL (hid_sensor_write_raw_hyst_value);
@@ -355,6 +372,9 @@ int hid_sensor_get_reporting_interval(struct hid_sensor_hub_device *hsdev,/* Default unit of measure is milliseconds */ if (st->poll.units ==0 ) st->poll.units =HID_USAGE_SENSOR_UNITS_MILLISECOND ; + + st->poll_interval =-1 ; +return 0 ; }
@@ -377,6 +397,8 @@ int hid_sensor_parse_common_attributes(struct hid_sensor_hub_device *hsdev,HID_USAGE_SENSOR_PROY_POWER_STATE , &st->power_state); + st->raw_hystersis =-1 ; + sensor_hub_input_get_attribute_info(hsdev, HID_FEATURE_REPORT, usage_id, HID_USAGE_SENSOR_PROP_SENSITIVITY_ABS,
drivers/iio/common/hid-sensors/hid-sensor-trigger.c +17 -3
@@ -51,6 +51,8 @@ static int _hid_sensor_power_state(struct hid_sensor_common *st, bool state) st->report_state.report_id, st->report_state.index, HID_USAGE_SENSOR_PROP_REPORTING_STATE_ALL_EVENTS_ENUM); + + poll_value =hid_sensor_read_poll_value (st); }else {int val;
@@ -87,9 +89,7 @@ static int _hid_sensor_power_state(struct hid_sensor_common *st, bool state)sensor_hub_get_feature (st->hsdev, st->power_state.report_id, st->power_state.index,sizeof (state_val), &state_val); -if (state) - poll_value =hid_sensor_read_poll_value (st); -if (poll_value >0 ) +if (state && poll_value)msleep_interruptible (poll_value *2 );return 0 ;
@@ -127,6 +127,20 @@ static void hid_sensor_set_power_work(struct work_struct *work)struct hid_sensor_common *attrb =container_of (work, struct hid_sensor_common, work); + +if (attrb->poll_interval >=0 ) +sensor_hub_set_feature (attrb->hsdev, attrb->poll.report_id, + attrb->poll.index, +sizeof (attrb->poll_interval), + &attrb->poll_interval); + +if (attrb->raw_hystersis >=0 ) +sensor_hub_set_feature (attrb->hsdev, + attrb->sensitivity.report_id, + attrb->sensitivity.index, +sizeof (attrb->raw_hystersis), + &attrb->raw_hystersis); +_hid_sensor_power_state (attrb, true); }
drivers/iio/dac/ad7303.c +3 -3
@@ -184,9 +184,9 @@ static const struct iio_chan_spec_ext_info ad7303_ext_info[] = { .address = (chan), \ .scan_type = { \ .sign = 'u', \ - .realbits = '8', \ - .storagebits = '8', \ - .shift = '0', \ + .realbits = 8, \ + .storagebits = 8, \ + .shift = 0, \ }, \ .ext_info = ad7303_ext_info, \ }
drivers/iio/pressure/bmp280-core.c +6 -5
@@ -175,11 +175,12 @@ static u32 bmp280_compensate_humidity(struct bmp280_data *data, }H6 =sign_extend32 (tmp,7 ); - var = ((s32 )data->t_fine) -76800 ; - var = ((((adc_humidity <<14 ) - (H4 <<20 ) - (H5 * var)) +16384 ) >>15 ) - * (((((((var *H6 ) >>10 ) * (((var *H3 ) >>11 ) +32768 )) >>10 ) - +2097152 ) *H2 +8192 ) >>14 ); - var -= ((((var >>15 ) * (var >>15 )) >>7 ) *H1 ) >>4 ; + var = ((s32 )data->t_fine) - (s32 )76800 ; + var = ((((adc_humidity <<14 ) - (H4 <<20 ) - (H5 * var)) + + (s32 )16384 ) >>15 ) * (((((((var *H6 ) >>10 ) + * (((var * (s32 )H3 ) >>11 ) + (s32 )32768 )) >>10 ) + + (s32 )2097152 ) *H2 +8192 ) >>14 ); + var -= ((((var >>15 ) * (var >>15 )) >>7 ) * (s32 )H1 ) >>4 ;return var >>12 ; };
drivers/iio/proximity/as3935.c +1 -2
@@ -50,7 +50,6 @@#define AS3935_TUNE_CAP 0x08#define AS3935_CALIBRATE 0x3D -#define AS3935_WRITE_DATA BIT(15)#define AS3935_READ_DATA BIT(14)#define AS3935_ADDRESS (x) ((x) << 8)
@@ -105,7 +104,7 @@ static int as3935_write(struct as3935_state *st, {u8 *buf = st->buf; - buf[0 ] = (AS3935_WRITE_DATA |AS3935_ADDRESS (reg)) >>8 ; + buf[0 ] =AS3935_ADDRESS (reg) >>8 ; buf[1 ] = val;return spi_write (st->spi, buf,2 );
drivers/infiniband/core/addr.c +2 -2
@@ -444,8 +444,8 @@ static int addr6_resolve(struct sockaddr_in6 *src_in, fl6.saddr = src_in->sin6_addr; fl6.flowi6_oif = addr->bound_dev_if; - dst =ip6_route_output (addr->net,NULL , &fl6); -if ((ret = dst->error)) + ret = ipv6_stub->ipv6_dst_lookup (addr->net,NULL , &dst, &fl6); +if (ret <0 ) goto put; rt = (struct rt6_info *)dst;
drivers/infiniband/hw/hfi1/file_ops.c +4 -1
@@ -751,6 +751,9 @@ static int hfi1_file_close(struct inode *inode, struct file *fp)/* release the cpu */ hfi1_put_proc_affinity (fdata->rec_cpu_num); +/* clean up rcv side */ +hfi1_user_exp_rcv_free (fdata); +/* * Clear any left over, unhandled events so the next process that * gets this context doesn't get confused.
@@ -790,7 +793,7 @@ static int hfi1_file_close(struct inode *inode, struct file *fp) dd->rcd[uctxt->ctxt] =NULL ; -hfi1_user_exp_rcv_free (fdata); +hfi1_user_exp_rcv_grp_free (uctxt);hfi1_clear_ctxt_pkey (dd, uctxt->ctxt); uctxt->rcvwait_to =0 ;
drivers/infiniband/hw/hfi1/init.c +1 -0
@@ -1757,6 +1757,7 @@ int hfi1_setup_eagerbufs(struct hfi1_ctxtdata *rcd) !HFI1_CAP_KGET_MASK(rcd->flags, MULTI_PKT_EGR)) {dd_dev_err (dd,"ctxt%u: Failed to allocate eager buffers\n" , rcd->ctxt); + ret = -ENOMEM ; goto bail_rcvegrbuf_phys; }
drivers/infiniband/hw/hfi1/user_exp_rcv.c +18 -14
@@ -250,36 +250,40 @@ int hfi1_user_exp_rcv_init(struct file *fp)return ret; } +void hfi1_user_exp_rcv_grp_free (struct hfi1_ctxtdata *uctxt) +{ +struct tid_group *grp, *gptr; + +list_for_each_entry_safe (grp, gptr, &uctxt->tid_group_list.list, + list) { +list_del_init (&grp->list); +kfree (grp); + } +hfi1_clear_tids (uctxt); +} +int hfi1_user_exp_rcv_free (struct hfi1_filedata *fd) {struct hfi1_ctxtdata *uctxt = fd->uctxt; -struct tid_group *grp, *gptr; -if (!test_bit (HFI1_CTXT_SETUP_DONE , &uctxt->event_flags)) -return 0 ;/* * The notifier would have been removed when the process'es mm * was freed. */ -if (fd->handler) +if (fd->handler) {hfi1_mmu_rb_unregister (fd->handler); - -kfree (fd->invalid_tids); - -if (!uctxt->cnt) { + }else {if (!EXP_TID_SET_EMPTY (uctxt->tid_full_list))unlock_exp_tids (uctxt, &uctxt->tid_full_list, fd);if (!EXP_TID_SET_EMPTY (uctxt->tid_used_list))unlock_exp_tids (uctxt, &uctxt->tid_used_list, fd); -list_for_each_entry_safe (grp, gptr, &uctxt->tid_group_list.list, - list) { -list_del_init (&grp->list); -kfree (grp); - } -hfi1_clear_tids (uctxt); } +kfree (fd->invalid_tids); + fd->invalid_tids =NULL ; +kfree (fd->entry_to_rb); + fd->entry_to_rb =NULL ;return 0 ; }
drivers/infiniband/hw/hfi1/user_exp_rcv.h +1 -0
@@ -70,6 +70,7 @@ (tid) |=EXP_TID_SET (field, (value)); \ }while (0 ) +void hfi1_user_exp_rcv_grp_free(struct hfi1_ctxtdata *uctxt);int hfi1_user_exp_rcv_init (struct file *);int hfi1_user_exp_rcv_free (struct hfi1_filedata *);int hfi1_user_exp_rcv_setup (struct file *,struct hfi1_tid_info *);
drivers/infiniband/hw/mlx5/mr.c +1 -1
@@ -1828,7 +1828,7 @@ mlx5_ib_sg_to_klms(struct mlx5_ib_mr *mr, klms[i].va =cpu_to_be64 (sg_dma_address (sg) + sg_offset); klms[i].bcount =cpu_to_be32 (sg_dma_len (sg) - sg_offset); klms[i].key =cpu_to_be32 (lkey); - mr->ibmr.length +=sg_dma_len (sg); + mr->ibmr.length +=sg_dma_len (sg) - sg_offset; sg_offset =0 ; }
drivers/iommu/intel-iommu.c +4 -1
@@ -2049,11 +2049,14 @@ static int domain_context_mapping_one(struct dmar_domain *domain,if (context_copied (context)) {u16 did_old =context_domain_id (context); -if (did_old >=0 && did_old <cap_ndoms (iommu->cap)) +if (did_old >=0 && did_old <cap_ndoms (iommu->cap)) { iommu->flush.flush_context (iommu, did_old, (((u16 )bus) <<8 ) | devfn,DMA_CCMD_MASK_NOBIT ,DMA_CCMD_DEVICE_INVL ); + iommu->flush.flush_iotlb (iommu, did_old,0 ,0 , +DMA_TLB_DSI_FLUSH ); + } } pgd = domain->pgd;
drivers/md/Kconfig +1 -0
@@ -357,6 +357,7 @@ config DM_LOG_USERSPACE config DM_RAID tristate "RAID 1/4/5/6/10 target" depends on BLK_DEV_DM + select MD_RAID0 select MD_RAID1 select MD_RAID10 select MD_RAID456
drivers/md/dm-bufio.c +23 -12
@@ -215,7 +215,7 @@ static DEFINE_SPINLOCK(param_spinlock);* Buffers are freed after this timeout */ static unsigned dm_bufio_max_age =DM_BUFIO_DEFAULT_AGE_SECS ; -static unsigned dm_bufio_retain_bytes =DM_BUFIO_DEFAULT_RETAIN_BYTES ; +static unsigned long dm_bufio_retain_bytes =DM_BUFIO_DEFAULT_RETAIN_BYTES ;static unsigned long dm_bufio_peak_allocated;static unsigned long dm_bufio_allocated_kmem_cache;
@@ -923,10 +923,11 @@ static void __get_memory_limit(struct dm_bufio_client *c, {unsigned long buffers; -if (ACCESS_ONCE (dm_bufio_cache_size) != dm_bufio_cache_size_latch) { -mutex_lock (&dm_bufio_clients_lock); -__cache_size_refresh (); -mutex_unlock (&dm_bufio_clients_lock); +if (unlikely (ACCESS_ONCE (dm_bufio_cache_size) != dm_bufio_cache_size_latch)) { +if (mutex_trylock (&dm_bufio_clients_lock)) { +__cache_size_refresh (); +mutex_unlock (&dm_bufio_clients_lock); + } } buffers = dm_bufio_cache_size_per_client >>
@@ -1540,10 +1541,10 @@ static bool __try_evict_buffer(struct dm_buffer *b, gfp_t gfp)return true; } -static unsigned get_retain_buffers (struct dm_bufio_client *c) +static unsigned long get_retain_buffers (struct dm_bufio_client *c) { -unsigned retain_bytes =ACCESS_ONCE (dm_bufio_retain_bytes); -return retain_bytes / c->block_size; +unsigned long retain_bytes =ACCESS_ONCE (dm_bufio_retain_bytes); +return retain_bytes >> (c->sectors_per_block_bits +SECTOR_SHIFT ); } static unsigned long __scan(struct dm_bufio_client *c, unsigned long nr_to_scan,
@@ -1553,7 +1554,7 @@ static unsigned long __scan(struct dm_bufio_client *c, unsigned long nr_to_scan,struct dm_buffer *b, *tmp;unsigned long freed =0 ;unsigned long count = nr_to_scan; -unsigned retain_target =get_retain_buffers (c); +unsigned long retain_target =get_retain_buffers (c);for (l =0 ; l <LIST_SIZE ; l++) {list_for_each_entry_safe_reverse (b, tmp, &c->lru[l], lru_list) {
@@ -1779,11 +1780,19 @@ static bool older_than(struct dm_buffer *b, unsigned long age_hz)static void __evict_old_buffers (struct dm_bufio_client *c,unsigned long age_hz) {struct dm_buffer *b, *tmp; -unsigned retain_target =get_retain_buffers (c); -unsigned count; +unsigned long retain_target =get_retain_buffers (c); +unsigned long count; +LIST_HEAD (write_list);dm_bufio_lock (c); +__check_watermark (c, &write_list); +if (unlikely (!list_empty (&write_list))) { +dm_bufio_unlock (c); +__flush_write_list (&write_list); +dm_bufio_lock (c); + } + count = c->n_buffers[LIST_CLEAN ] + c->n_buffers[LIST_DIRTY ];list_for_each_entry_safe_reverse (b, tmp, &c->lru[LIST_CLEAN ], lru_list) {if (count <= retain_target)
@@ -1808,6 +1817,8 @@ static void cleanup_old_buffers(void)mutex_lock (&dm_bufio_clients_lock); +__cache_size_refresh (); +list_for_each_entry (c, &dm_bufio_all_clients, client_list)__evict_old_buffers (c, max_age_hz);
@@ -1930,7 +1941,7 @@ MODULE_PARM_DESC(max_cache_size_bytes, "Size of metadata cache");module_param_named (max_age_seconds, dm_bufio_max_age, uint,S_IRUGO |S_IWUSR );MODULE_PARM_DESC (max_age_seconds,"Max age of a buffer in seconds" ); -module_param_named (retain_bytes, dm_bufio_retain_bytes, uint,S_IRUGO |S_IWUSR ); +module_param_named (retain_bytes, dm_bufio_retain_bytes, ulong,S_IRUGO |S_IWUSR );MODULE_PARM_DESC (retain_bytes,"Try to keep at least this many bytes cached in memory" );module_param_named (peak_allocated_bytes, dm_bufio_peak_allocated, ulong,S_IRUGO |S_IWUSR );
drivers/md/dm-cache-metadata.c +8 -4
@@ -1383,17 +1383,19 @@ void dm_cache_metadata_set_stats(struct dm_cache_metadata *cmd,int dm_cache_commit (struct dm_cache_metadata *cmd,bool clean_shutdown) { -int r; +int r = -EINVAL ;flags_mutator mutator = (clean_shutdown ? set_clean_shutdown : clear_clean_shutdown);WRITE_LOCK (cmd); +if (cmd->fail_io) + goto out; + r =__commit_transaction (cmd, mutator);if (r) goto out; r =__begin_transaction (cmd); - out:WRITE_UNLOCK (cmd);return r;
@@ -1405,7 +1407,8 @@ int dm_cache_get_free_metadata_block_count(struct dm_cache_metadata *cmd,int r = -EINVAL ;READ_LOCK (cmd); - r =dm_sm_get_nr_free (cmd->metadata_sm, result); +if (!cmd->fail_io) + r =dm_sm_get_nr_free (cmd->metadata_sm, result);READ_UNLOCK (cmd);return r;
@@ -1417,7 +1420,8 @@ int dm_cache_get_metadata_dev_size(struct dm_cache_metadata *cmd,int r = -EINVAL ;READ_LOCK (cmd); - r =dm_sm_get_nr_blocks (cmd->metadata_sm, result); +if (!cmd->fail_io) + r =dm_sm_get_nr_blocks (cmd->metadata_sm, result);READ_UNLOCK (cmd);return r;
drivers/md/dm-mpath.c +12 -5
@@ -119,7 +119,8 @@ static struct kmem_cache *_mpio_cache;static struct workqueue_struct *kmultipathd, *kmpath_handlerd;static void trigger_event (struct work_struct *work); -static void activate_path (struct work_struct *work); +static void activate_or_offline_path (struct pgpath *pgpath); +static void activate_path_work (struct work_struct *work);static void process_queued_bios (struct work_struct *work);/*-----------------------------------------------
@@ -144,7 +145,7 @@ static struct pgpath *alloc_pgpath(void)if (pgpath) { pgpath->is_active = true; -INIT_DELAYED_WORK (&pgpath->activate_path, activate_path); +INIT_DELAYED_WORK (&pgpath->activate_path, activate_path_work); }return pgpath;
@@ -1515,10 +1516,8 @@ static void pg_init_done(void *data, int errors)spin_unlock_irqrestore (&m->lock, flags); } -static void activate_path (struct work_struct *work) +static void activate_or_offline_path (struct pgpath *pgpath) { -struct pgpath *pgpath = - container_of(work, struct pgpath, activate_path.work);struct request_queue *q =bdev_get_queue (pgpath->path.dev->bdev);if (pgpath->is_active && !blk_queue_dying (q))
@@ -1527,6 +1526,14 @@ static void activate_path(struct work_struct *work)pg_init_done (pgpath,SCSI_DH_DEV_OFFLINED ); } +static void activate_path_work (struct work_struct *work) +{ +struct pgpath *pgpath = + container_of(work, struct pgpath, activate_path.work); + +activate_or_offline_path (pgpath); +} +static int noretry_error (int error) {switch (error) {
drivers/md/dm-thin-metadata.c +2 -2
@@ -485,11 +485,11 @@ static int __write_initial_superblock(struct dm_pool_metadata *pmd)if (r <0 )return r; - r =save_sm_roots (pmd); + r =dm_tm_pre_commit (pmd->tm);if (r <0 )return r; - r =dm_tm_pre_commit (pmd->tm); + r =save_sm_roots (pmd);if (r <0 )return r;
drivers/md/md.c +5 -0
@@ -6752,6 +6752,7 @@ static int md_ioctl(struct block_device *bdev, fmode_t mode,void __user *argp = (void __user *)arg;struct mddev *mddev =NULL ;int ro; +bool did_set_md_closing = false;if (!md_ioctl_valid (cmd))return -ENOTTY ;
@@ -6841,7 +6842,9 @@ static int md_ioctl(struct block_device *bdev, fmode_t mode, err = -EBUSY ; goto out; } +WARN_ON_ONCE (test_bit (MD_CLOSING , &mddev->flags));set_bit (MD_CLOSING , &mddev->flags); + did_set_md_closing = true;mutex_unlock (&mddev->open_mutex);sync_blockdev (bdev); }
@@ -7041,6 +7044,8 @@ static int md_ioctl(struct block_device *bdev, fmode_t mode, mddev->hold_active =0 ;mddev_unlock (mddev); out: +if (did_set_md_closing) +clear_bit (MD_CLOSING , &mddev->flags);return err; }#ifdef CONFIG_COMPAT
drivers/md/persistent-data/dm-btree.c +6 -2
@@ -897,8 +897,12 @@ static int find_key(struct ro_spine *s, dm_block_t block, bool find_highest,else *result_key =le64_to_cpu (ro_node (s)->keys[0 ]); -if (next_block || flags &INTERNAL_NODE ) - block =value64 (ro_node (s), i); +if (next_block || flags &INTERNAL_NODE ) { +if (find_highest) + block =value64 (ro_node (s), i); +else + block =value64 (ro_node (s),0 ); + } }while (flags &INTERNAL_NODE );
drivers/md/persistent-data/dm-space-map-disk.c +14 -1
@@ -142,10 +142,23 @@ static int sm_disk_inc_block(struct dm_space_map *sm, dm_block_t b)static int sm_disk_dec_block (struct dm_space_map *sm,dm_block_t b) { +int r; +uint32_t old_count;enum allocation_event ev; struct sm_disk *smd = container_of(sm, struct sm_disk, sm); -return sm_ll_dec (&smd->ll, b, &ev); + r =sm_ll_dec (&smd->ll, b, &ev); +if (!r && (ev ==SM_FREE )) { +/* +* It's only free if it's also free in the last +* transaction. +*/ + r =sm_ll_lookup (&smd->old_ll, b, &old_count); +if (!r && !old_count) + smd->nr_allocated_this_transaction--; + } + +return r; }static int sm_disk_new_block (struct dm_space_map *sm,dm_block_t *b)
drivers/md/raid5.c +4 -2
@@ -2253,6 +2253,10 @@ static int resize_stripes(struct r5conf *conf, int newsize) err = -ENOMEM ;mutex_unlock (&conf->cache_size_mutex); + + conf->slab_cache = sc; + conf->active_name =1 -conf->active_name; +/* Step 4, return new stripes to service */ while (!list_empty (&newstripes)) { nsh = list_entry(newstripes.next, struct stripe_head, lru);
@@ -2270,8 +2274,6 @@ static int resize_stripes(struct r5conf *conf, int newsize) }/* critical section pass, GFP_NOIO no longer needed */ - conf->slab_cache = sc; - conf->active_name =1 -conf->active_name;if (!err) conf->pool_size = newsize;return err;
drivers/media/dvb-frontends/cxd2841er.c +3 -1
@@ -3852,7 +3852,9 @@ static struct dvb_frontend_ops cxd2841er_t_c_ops = {FE_CAN_MUTE_TS | FE_CAN_2G_MODULATION, .frequency_min = 42000000, - .frequency_max =1002000000 + .frequency_max = 1002000000, + .symbol_rate_min = 870000, + .symbol_rate_max =11700000 }, .init = cxd2841er_init_tc, .sleep = cxd2841er_sleep_tc,
drivers/media/platform/s5p-mfc/s5p_mfc.c +5 -8
@@ -206,6 +206,7 @@ static void s5p_mfc_watchdog_worker(struct work_struct *work) }s5p_mfc_clock_on (); ret =s5p_mfc_init_hw (dev); +s5p_mfc_clock_off ();if (ret)mfc_err ("Failed to reinit FW\n" ); }
@@ -663,9 +664,9 @@ static irqreturn_t s5p_mfc_irq(int irq, void *priv)break ; }s5p_mfc_hw_call (dev->mfc_ops, clear_int_flags, dev); -wake_up_ctx (ctx, reason, err);WARN_ON (test_and_clear_bit (0 , &dev->hw_lock) ==0 );s5p_mfc_clock_off (); +wake_up_ctx (ctx, reason, err);s5p_mfc_hw_call (dev->mfc_ops, try_run, dev); }else {s5p_mfc_handle_frame (ctx, reason, err);
@@ -679,15 +680,11 @@ static irqreturn_t s5p_mfc_irq(int irq, void *priv)case S5P_MFC_R2H_CMD_OPEN_INSTANCE_RET : ctx->inst_no =s5p_mfc_hw_call (dev->mfc_ops, get_inst_no, dev); ctx->state =MFCINST_GOT_INST ; -clear_work_bit (ctx); -wake_up (&ctx->queue); goto irq_cleanup_hw;case S5P_MFC_R2H_CMD_CLOSE_INSTANCE_RET : -clear_work_bit (ctx); ctx->inst_no =MFC_NO_INSTANCE_SET ; ctx->state =MFCINST_FREE ; -wake_up (&ctx->queue); goto irq_cleanup_hw;case S5P_MFC_R2H_CMD_SYS_INIT_RET :
@@ -697,9 +694,9 @@ static irqreturn_t s5p_mfc_irq(int irq, void *priv)if (ctx)clear_work_bit (ctx);s5p_mfc_hw_call (dev->mfc_ops, clear_int_flags, dev); -wake_up_dev (dev, reason, err);clear_bit (0 , &dev->hw_lock);clear_bit (0 , &dev->enter_suspend); +wake_up_dev (dev, reason, err);break ;case S5P_MFC_R2H_CMD_INIT_BUFFERS_RET :
@@ -714,9 +711,7 @@ static irqreturn_t s5p_mfc_irq(int irq, void *priv)break ;case S5P_MFC_R2H_CMD_DPB_FLUSH_RET : -clear_work_bit (ctx); ctx->state =MFCINST_RUNNING ; -wake_up (&ctx->queue); goto irq_cleanup_hw;default :
@@ -735,6 +730,8 @@ static irqreturn_t s5p_mfc_irq(int irq, void *priv)mfc_err ("Failed to unlock hw\n" );s5p_mfc_clock_off (); +clear_work_bit (ctx); +wake_up (&ctx->queue);s5p_mfc_hw_call (dev->mfc_ops, try_run, dev);spin_unlock (&dev->irqlock);
drivers/media/rc/mceusb.c +2 -2
@@ -1332,8 +1332,8 @@ static int mceusb_dev_probe(struct usb_interface *intf, } } } -if (ep_in ==NULL ) { -dev_dbg (&intf->dev,"inbound and/or endpoint not found" ); +if (!ep_in || !ep_out) { +dev_dbg (&intf->dev,"required endpoints not found\n" );return -ENODEV ; }
drivers/media/usb/cx231xx/cx231xx-audio.c +29 -13
74 lines not on this page · raw message
drivers/media/usb/cx231xx/cx231xx-cards.c +40 -5
93 lines not on this page · raw message
drivers/media/usb/dvb-usb/dib0700_core.c +3 -0
@@ -812,6 +812,9 @@ int dib0700_rc_setup(struct dvb_usb_device *d, struct usb_interface *intf)/* Starting in firmware 1.20, the RC info is provided on a bulk pipe */ +if (intf->altsetting[0 ].desc.bNumEndpoints < rc_ep +1 ) +return -ENODEV ; + purb =usb_alloc_urb (0 ,GFP_KERNEL );if (purb ==NULL )return -ENOMEM ;
drivers/media/usb/dvb-usb/dibusb-mc-common.c +2 -0
@@ -12,6 +12,8 @@#include <linux/kconfig.h> #include "dibusb.h" +MODULE_LICENSE ("GPL" ); +/* 3000MC/P stuff */ // Config Adjacent channels Perf -cal22 static struct dibx000_agc_config dib3000p_mt2060_agc_config = {
drivers/media/usb/dvb-usb/digitv.c +3 -0
@@ -33,6 +33,9 @@ static int digitv_ctrl_msg(struct dvb_usb_device *d, wo = (rbuf ==NULL || rlen ==0 );/* write-only */ +if (wlen >4 || rlen >4 ) +return -EIO ; +memset (st->sndbuf,0 ,7 );memset (st->rcvbuf,0 ,7 );
drivers/media/usb/dvb-usb/dw2102.c +54 -0
90 lines not on this page · raw message
drivers/media/usb/dvb-usb/ttusb2.c +19 -0
@@ -78,6 +78,9 @@ static int ttusb2_msg(struct dvb_usb_device *d, u8 cmd,u8 *s, *r =NULL ;int ret =0 ; +if (4 + rlen >64 ) +return -EIO ; + s =kzalloc (wlen+4 ,GFP_KERNEL );if (!s)return -ENOMEM ;
@@ -381,6 +384,22 @@ static int ttusb2_i2c_xfer(struct i2c_adapter *adap,struct i2c_msg msg[],int num write_read = i+1 < num && (msg[i+1 ].flags &I2C_M_RD ); read = msg[i].flags &I2C_M_RD ; +if (3 + msg[i].len >sizeof (obuf)) { +err ("i2c wr len=%d too high" , msg[i].len); +break ; + } +if (write_read) { +if (3 + msg[i+1 ].len >sizeof (ibuf)) { +err ("i2c rd len=%d too high" , msg[i+1 ].len); +break ; + } + }else if (read) { +if (3 + msg[i].len >sizeof (ibuf)) { +err ("i2c rd len=%d too high" , msg[i].len); +break ; + } + } + obuf[0 ] = (msg[i].addr <<1 ) | (write_read | read);if (read) obuf[1 ] =0 ;
drivers/media/usb/gspca/konica.c +3 -0
@@ -188,6 +188,9 @@ static int sd_start(struct gspca_dev *gspca_dev)return -EIO ; } +if (alt->desc.bNumEndpoints <2 ) +return -ENODEV ; + packet_size =le16_to_cpu (alt->endpoint[0 ].desc.wMaxPacketSize); n = gspca_dev->cam.cam_mode[gspca_dev->curr_mode].priv;
drivers/media/usb/usbvision/usbvision-video.c +8 -1
@@ -1506,7 +1506,14 @@ static int usbvision_probe(struct usb_interface *intf, }for (i =0 ; i < usbvision->num_alt; i++) { -u16 tmp =le16_to_cpu (uif->altsetting[i].endpoint[1 ].desc. +u16 tmp; + +if (uif->altsetting[i].desc.bNumEndpoints <2 ) { + ret = -ENODEV ; + goto err_pkt; + } + + tmp =le16_to_cpu (uif->altsetting[i].endpoint[1 ].desc. wMaxPacketSize); usbvision->alt_max_pkt_size[i] = (tmp &0x07ff ) * (((tmp &0x1800 ) >>11 ) +1 );
drivers/media/usb/zr364xx/zr364xx.c +8 -0
@@ -604,6 +604,14 @@ static int zr364xx_read_video_callback(struct zr364xx_camera *cam, ptr = pdest = frm->lpvbits;if (frm->ulState ==ZR364XX_READ_IDLE ) { +if (purb->actual_length <128 ) { +/* header incomplete */ +dev_info (&cam->udev->dev, +"%s: buffer (%d bytes) too small to hold jpeg header. Discarding.\n" , + __func__, purb->actual_length); +return -EINVAL ; + } + frm->ulState =ZR364XX_READ_FRAME ; frm->cur_size =0 ;
drivers/misc/cxl/pci.c +26 -8
@@ -1496,8 +1496,6 @@ static int cxl_configure_adapter(struct cxl *adapter, struct pci_dev *dev)if ((rc =cxl_native_register_psl_err_irq (adapter))) goto err; -/* Release the context lock as adapter is configured */ -cxl_adapter_context_unlock (adapter);return 0 ; err:
@@ -1596,6 +1594,9 @@ static struct cxl *cxl_pci_init_adapter(struct pci_dev *dev)if ((rc =cxl_sysfs_adapter_add (adapter))) goto err_put1; +/* Release the context lock as adapter is configured */ +cxl_adapter_context_unlock (adapter); +return adapter; err_put1:
@@ -1778,7 +1779,7 @@ static pci_ers_result_t cxl_pci_error_detected(struct pci_dev *pdev, {struct cxl *adapter =pci_get_drvdata (pdev);struct cxl_afu *afu; -pci_ers_result_t result =PCI_ERS_RESULT_NEED_RESET ; +pci_ers_result_t result =PCI_ERS_RESULT_NEED_RESET , afu_result;int i;/* At this point, we could still have an interrupt pending.
@@ -1883,16 +1884,26 @@ static pci_ers_result_t cxl_pci_error_detected(struct pci_dev *pdev,for (i =0 ; i < adapter->slices; i++) { afu = adapter->afu[i]; - result =cxl_vphb_error_detected (afu, state); - -/* Only continue if everyone agrees on NEED_RESET */ -if (result !=PCI_ERS_RESULT_NEED_RESET ) -return result; + afu_result =cxl_vphb_error_detected (afu, state);cxl_context_detach_all (afu); cxl_ops->afu_deactivate_mode (afu, afu->current_mode);pci_deconfigure_afu (afu); + +/* Disconnect trumps all, NONE trumps NEED_RESET */ +if (afu_result ==PCI_ERS_RESULT_DISCONNECT ) + result =PCI_ERS_RESULT_DISCONNECT ; +else if ((afu_result ==PCI_ERS_RESULT_NONE ) && + (result ==PCI_ERS_RESULT_NEED_RESET )) + result =PCI_ERS_RESULT_NONE ; } + +/* should take the context lock here */ +if (cxl_adapter_context_lock (adapter) !=0 ) +dev_warn (&adapter->dev, +"Couldn't take context lock with %d active-contexts\n" , +atomic_read (&adapter->contexts_num)); +cxl_deconfigure_adapter (adapter);return result;
@@ -1911,6 +1922,13 @@ static pci_ers_result_t cxl_pci_slot_reset(struct pci_dev *pdev)if (cxl_configure_adapter (adapter, pdev)) goto err; +/* +* Unlock context activation for the adapter. Ideally this should be +* done in cxl_pci_resume but cxlflash module tries to activate the +* master context as part of slot_reset callback. +*/ +cxl_adapter_context_unlock (adapter); +for (i =0 ; i < adapter->slices; i++) { afu = adapter->afu[i];
drivers/mtd/nand/nand_base.c +69 -1
82 lines not on this page · raw message
drivers/mtd/nand/omap2.c +9 -0
@@ -1856,6 +1856,15 @@ static int omap_nand_probe(struct platform_device *pdev) nand_chip->ecc.priv =NULL ;nand_set_flash_node (nand_chip, dev->of_node); +if (!mtd->name) { + mtd->name =devm_kasprintf (&pdev->dev,GFP_KERNEL , +"omap2-nand.%d" , info->gpmc_cs); +if (!mtd->name) { +dev_err (&pdev->dev,"Failed to set MTD name\n" ); +return -ENOMEM ; + } + } + res =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); nand_chip->IO_ADDR_R =devm_ioremap_resource (&pdev->dev, res);if (IS_ERR (nand_chip->IO_ADDR_R))
drivers/mtd/nand/orion_nand.c +21 -21
51 lines not on this page · raw message
drivers/net/wireless/ath/ath9k/hif_usb.c +4 -0
Lines of this file are not shown. View the raw message.
drivers/net/wireless/marvell/mwifiex/cfg80211.c +3 -1
Lines of this file are not shown. View the raw message.
drivers/net/wireless/marvell/mwifiex/pcie.c +7 -0
Lines of this file are not shown. View the raw message.
drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c +106 -16
122 lines not on this page · raw message
drivers/net/wireless/realtek/rtlwifi/rtl8821ae/reg.h +1 -0
Lines of this file are not shown. View the raw message.
drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c +89 -25
114 lines not on this page · raw message
drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.h +2 -0
Lines of this file are not shown. View the raw message.
drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c +15 -9
Lines of this file are not shown. View the raw message.
drivers/staging/rtl8192e/rtl819x_TSProc.c +4 -11
Lines of this file are not shown. View the raw message.
drivers/usb/storage/ene_ub6250.c +55 -35
90 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.