Linux 4.0.5
Greg KH
maintainerI'm announcing the release of the 4.0.5 kernel.
All users of the 4.0 kernel series must upgrade.
The updated 4.0.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.0.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/hwmon/tmp401 | 2 Documentation/serial/tty.txt | 3 Documentation/virtual/kvm/mmu.txt | 18 +++- Makefile | 2 arch/arc/include/asm/atomic.h | 2 arch/arm/boot/dts/Makefile | 2 arch/arm/boot/dts/exynos4412-trats2.dts | 2 arch/arm/boot/dts/imx27.dtsi | 2 arch/arm/kernel/entry-common.S | 4 arch/arm/mach-exynos/pm_domains.c | 4 arch/arm/mach-exynos/sleep.S | 31 +++--- arch/arm/mm/mmu.c | 20 ++-- arch/arm64/net/bpf_jit_comp.c | 2 arch/mips/kernel/elf.c | 32 +++---- arch/parisc/include/asm/elf.h | 4 arch/parisc/kernel/sys_parisc.c | 3 arch/powerpc/kernel/mce.c | 4 arch/powerpc/kernel/vmlinux.lds.S | 1 arch/s390/crypto/ghash_s390.c | 25 ++--- arch/s390/include/asm/pgtable.h | 2 arch/x86/include/asm/kvm_host.h | 3 arch/x86/kernel/cpu/mcheck/mce.c | 7 + arch/x86/kernel/cpu/perf_event_intel_rapl.c | 1 arch/x86/kernel/i387.c | 15 +++ arch/x86/kvm/cpuid.c | 4 arch/x86/kvm/cpuid.h | 8 + arch/x86/kvm/mmu.c | 16 ++- arch/x86/kvm/mmu.h | 4 arch/x86/kvm/paging_tmpl.h | 7 + arch/x86/kvm/svm.c | 1 arch/x86/kvm/vmx.c | 1 arch/x86/kvm/x86.c | 26 ++++- drivers/acpi/osl.c | 6 - drivers/ata/ahci.c | 103 +++++++++++++++++++++-- drivers/ata/libahci.c | 3 drivers/ata/libata-core.c | 34 +++++++ drivers/ata/libata-eh.c | 3 drivers/clk/clk.c | 8 + drivers/clk/samsung/clk-exynos5420.c | 1 drivers/firmware/dmi_scan.c | 7 - drivers/gpio/gpio-kempld.c | 2 drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 2 drivers/gpu/drm/drm_plane_helper.c | 3 drivers/gpu/drm/radeon/atombios_crtc.c | 4 drivers/gpu/drm/radeon/atombios_dp.c | 20 ++-- drivers/gpu/drm/radeon/cik.c | 2 drivers/gpu/drm/radeon/evergreen_hdmi.c | 5 - drivers/gpu/drm/radeon/ni.c | 3 drivers/gpu/drm/radeon/radeon_audio.c | 27 ++---- drivers/gpu/drm/radeon/radeon_connectors.c | 8 - drivers/gpu/drm/radeon/si.c | 2 drivers/hid/hid-logitech-hidpp.c | 20 ---- drivers/hwmon/nct6683.c | 2 drivers/hwmon/nct6775.c | 2 drivers/hwmon/ntc_thermistor.c | 9 ++ drivers/hwmon/tmp401.c | 2 drivers/iio/accel/st_accel_core.c | 1 drivers/iio/adc/axp288_adc.c | 12 +- drivers/iio/adc/cc10001_adc.c | 60 +++++++------ drivers/iio/adc/qcom-spmi-vadc.c | 7 - drivers/iio/adc/xilinx-xadc-core.c | 5 - drivers/iio/adc/xilinx-xadc.h | 6 - drivers/iio/common/st_sensors/st_sensors_core.c | 2 drivers/iio/gyro/st_gyro_core.c | 1 drivers/iio/light/hid-sensor-prox.c | 2 drivers/iio/magnetometer/st_magn_core.c | 1 drivers/iio/pressure/hid-sensor-press.c | 2 drivers/iio/pressure/st_pressure_core.c | 1 drivers/infiniband/core/iwpm_msg.c | 2 drivers/input/mouse/elantech.c | 2 drivers/iommu/amd_iommu_v2.c | 1 drivers/iommu/arm-smmu.c | 30 ------ drivers/lguest/core.c | 2 drivers/md/dm-table.c | 16 ++- drivers/md/dm.c | 17 ++- drivers/md/md.c | 14 +-- drivers/md/raid0.c | 4 drivers/md/raid5.c | 3 drivers/mfd/da9052-core.c | 8 - drivers/mmc/host/atmel-mci.c | 9 +- drivers/mtd/ubi/block.c | 2 drivers/net/wireless/brcm80211/brcmfmac/msgbuf.c | 12 +- drivers/net/wireless/iwlwifi/mvm/d3.c | 13 +- drivers/net/wireless/iwlwifi/pcie/trans.c | 11 +- drivers/net/wireless/rt2x00/rt2800usb.c | 1 drivers/net/wireless/rtlwifi/usb.c | 2 drivers/power/reset/at91-reset.c | 4 drivers/pwm/pwm-img.c | 76 ++++++++++++++-- drivers/regulator/da9052-regulator.c | 5 - drivers/scsi/sd.c | 19 +--- drivers/scsi/storvsc_drv.c | 3 drivers/staging/gdm724x/gdm_mux.c | 16 +-- drivers/staging/vt6655/device_main.c | 40 +++++--- drivers/staging/vt6656/rxtx.c | 14 ++- drivers/target/target_core_pscsi.c | 3 drivers/target/target_core_pscsi.h | 1 drivers/thermal/armada_thermal.c | 6 - drivers/tty/hvc/hvc_xen.c | 2 drivers/tty/n_gsm.c | 5 - drivers/tty/n_hdlc.c | 4 drivers/tty/n_tty.c | 22 ++++ drivers/tty/pty.c | 5 - drivers/tty/tty_buffer.c | 41 ++++++--- drivers/usb/gadget/configfs.c | 1 drivers/usb/host/xhci-ring.c | 7 + drivers/usb/host/xhci.h | 2 drivers/usb/serial/cp210x.c | 1 drivers/usb/serial/pl2303.c | 1 drivers/usb/serial/pl2303.h | 4 drivers/usb/serial/visor.c | 2 drivers/usb/storage/unusual_devs.h | 7 + drivers/xen/events/events_base.c | 12 +- fs/binfmt_elf.c | 2 fs/btrfs/extent-tree.c | 2 fs/btrfs/volumes.c | 1 fs/dcache.c | 8 - fs/exec.c | 3 fs/ext4/ext4_jbd2.c | 6 + fs/ext4/extents.c | 2 fs/ext4/inode.c | 2 fs/fhandle.c | 5 - fs/fs_pin.c | 4 fs/jbd2/recovery.c | 10 ++ fs/jbd2/revoke.c | 18 ++-- fs/jbd2/transaction.c | 25 +++-- fs/kernfs/dir.c | 9 +- fs/namespace.c | 7 + fs/nfsd/blocklayout.c | 11 ++ fs/nfsd/nfs4state.c | 21 ++-- fs/omfs/inode.c | 6 - fs/overlayfs/copy_up.c | 3 fs/overlayfs/dir.c | 33 ++++++- fs/overlayfs/super.c | 10 +- fs/xfs/libxfs/xfs_attr_leaf.c | 8 - fs/xfs/libxfs/xfs_attr_leaf.h | 2 fs/xfs/xfs_attr_inactive.c | 83 ++++++++++-------- fs/xfs/xfs_file.c | 2 fs/xfs/xfs_inode.c | 12 -- include/drm/drm_pciids.h | 1 include/linux/fs_pin.h | 2 include/linux/gfp.h | 2 include/linux/ktime.h | 27 ++++-- include/linux/libata.h | 10 ++ include/linux/memcontrol.h | 4 include/linux/sched/rt.h | 7 - include/linux/tty.h | 2 include/xen/events.h | 2 kernel/locking/rtmutex.c | 12 +- kernel/module.c | 3 kernel/sched/core.c | 31 +++--- kernel/time/hrtimer.c | 14 +-- lib/strnlen_user.c | 3 mm/kmemleak.c | 3 mm/mempolicy.c | 2 net/ceph/osd_client.c | 33 ++++--- net/mac80211/ieee80211_i.h | 3 net/mac80211/rx.c | 5 - net/mac80211/wep.c | 6 - net/sunrpc/auth_gss/gss_rpc_xdr.c | 23 +++-- sound/pci/hda/hda_intel.c | 2 sound/pci/hda/patch_conexant.c | 12 ++ sound/pci/hda/patch_realtek.c | 9 ++ sound/pci/hda/thinkpad_helper.c | 1 sound/soc/codecs/mc13783.c | 4 sound/soc/codecs/uda1380.c | 2 sound/soc/codecs/wm8960.c | 2 sound/soc/codecs/wm8994.c | 2 sound/soc/soc-dapm.c | 11 +- sound/usb/quirks.c | 2 tools/vm/Makefile | 2 170 files changed, 1067 insertions(+), 560 deletions(-)
Al Viro (1):
d_walk() might skip too much
Alban Bedel (1):
iio:st_sensors: Fix oops when probing SPI devices
Alex Deucher (5):
drm/radeon: add new bonaire pci id
drm/radeon: retry dcpd fetch
drm/radeon: don't share plls if monitors differ in audio support drm/radeon/audio: make sure connector is valid in hotplug case Revert "drm/radeon: only mark audio as connected if the monitor supports it (v3)"
Andi Kleen (1):
tools/vm: fix page-flags build
Andrea Arcangeli (1):
kvm: fix crash in kvm_vcpu_reload_apic_access_page
Andrew Morton (1):
fs/binfmt_elf.c:load_elf_binary(): return -EINVAL on zero-length mappings
Andy Grover (1):
target/pscsi: Don't leak scsi_host if hba is VIRTUAL_HOST
Ansgar Hegerfeld (1):
ALSA: hda/realtek - ALC292 dock fix for Thinkpad L450
Anton Blanchard (1):
powerpc: Align TOC to 256 bytes
Ard Biesheuvel (1):
ARM: 8325/1: exynos: move resume code to .text section
Arend van Spriel (1):
brcmfmac: avoid null pointer access when brcmf_msgbuf_get_pktid() fails
Axel Lin (1):
ASoC: mc13783: Fix wrong mask value used in mc13xxx_reg_rmw() calls
Benjamin Tissoires (2):
Revert "HID: logitech-hidpp: support combo keyboard touchpad TK820"
Input: elantech - fix semi-mt protocol for v3 HW
Bob Copeland (1):
omfs: fix sign confusion for bitmap loop counter
Borislav Petkov (1):
x86/mce: Fix MCE severity messages
Chris Lesiak (1):
hwmon: (ntc_thermistor) Ensure iio channel is of type IIO_VOLTAGE
Christian König (2):
drm/radeon: fix VM_CONTEXT*_PAGE_TABLE_END_ADDR handling drm/radeon: partially revert "fix VM_CONTEXT*_PAGE_TABLE_END_ADDR handling"
Christoph Hellwig (2):
nfsd/blocklayout: pretend we can send deviceid notifications
nfsd: fix the check for confirmed openowner in nfs4_preprocess_stateid_op
Dan Williams (1):
ahci: avoton port-disable reset-quirk
Daniel Axtens (1):
powerpc/mce: fix off by one errors in mce event handling
Daniel Vetter (1):
drm/plane-helper: Adapt cursor hack to transitional helpers
Darrick J. Wong (1):
jbd2: fix r_count overflows leading to buffer overflow in journal recovery
Dave Chinner (2):
xfs: xfs_attr_inactive leaves inconsistent attr fork state behind
xfs: xfs_iozero can return positive errno
David Henningsson (2):
ALSA: hda - Add Conexant codecs CX20721, CX20722, CX20723 and CX20724
ALSA: hda - Add headset mic quirk for Dell Inspiron 5548
David Vrabel (1):
xen/events: don't bind non-percpu VIRQs with percpu chip
Dong Aisheng (1):
clk: add missing lock when call clk_core_enable in clk_set_parent
Eric W. Biederman (2):
mnt: Fail collect_mounts when applied to unmounted mounts
fs_pin: Allow for the possibility that m_list or s_list go unused.
Eric Work (1):
md/raid0: fix restore to sector variable in raid0_make_request
Eryu Guan (1):
ext4: check for zero length extent explicitly
Filipe Manana (1):
Btrfs: fix racy system chunk allocation when setting block group ro
Gabriele Mazzotta (2):
libata: Add helper to determine when PHY events should be ignored
libata: Ignore spurious PHY event on LPM policy change
Greg Kroah-Hartman (1):
Linux 4.0.5
Guenter Roeck (3):
hwmon: (tmp401) Do not auto-detect chip on I2C address 0x37
hwmon: (nct6775) Add missing sysfs attribute initialization
hwmon: (nct6683) Add missing sysfs attribute initialization
Haim Dreyfuss (1):
iwlwifi: mvm: Free fw_status after use to avoid memory leak
Hans de Goede (1):
usb-storage: Add NO_WP_DETECT quirk for Lacie 059f:0651 devices
Harald Freudenberger (1):
crypto: s390/ghash - Fix incorrect ghash icv buffer handling.
Helge Deller (1):
parisc,metag: Fix crashes due to stack randomization on stack-grows-upwards architectures
Ilya Dryomov (2):
libceph: request a new osdmap if lingering request maps to no osd Revert "libceph: clear r_req_lru_item in __unregister_linger_request()"
Ingo Molnar (1):
x86/fpu: Disable XSAVES* support for now
Inki Dae (1):
ARM: dts: set display clock correctly for exynos4412-trats2
Ivan T. Ivanov (1):
iio: adc: spmi-vadc: Fix overflow in output value normalization
Jacob Pan (1):
iio/axp288_adc: add missing channel info mask
Jan Kara (1):
lib: Fix strnlen_user() to not touch memory after specified maximum
Janusz Dziedzic (1):
mac80211: move WEP tailroom size check
Jason A. Donenfeld (2):
USB: visor: Match I330 phone more precisely
USB: pl2303: Remove support for Samsung I330
Javier Martinez Canillas (1):
clk: exynos5420: Restore GATE_BUS_TOP on suspend
Jean Delvare (1):
firmware: dmi_scan: Fix ordering of product_uuid
Joe Lawrence (1):
xhci: gracefully handle xhci_irq dead device
Joe Thornber (1):
dm: fix casting bug in dm_merge_bvec()
Johan Hovold (1):
mfd: da9052: Fix broken regulator probe
Johannes Berg (1):
mac80211: don't use napi_gro_receive() outside NAPI context
John Stultz (1):
ktime: Fix ktime_divns to do signed division
Junichi Nomura (1):
dm: fix reload failure of 0 path multipath mapping on blk-mq devices
K. Y. Srinivasan (1):
storvsc: Set the SRB flags correctly when no data transfer is needed
Kevin Cernekee (1):
UBI: block: Add missing cache flushes
Koro Chen (1):
ASoC: dapm: Modify widget stream name according to prefix
Krzysztof Kozlowski (1):
ARM: EXYNOS: Fix dereference of ERR_PTR returned by of_genpd_get_from_provider
Krzysztof Opasiak (1):
usb: gadget: configfs: Fix interfaces array NULL-termination
Larry Finger (1):
rtlwifi: rtl8192cu: Fix kernel deadlock
Liad Kaufman (1):
iwlwifi: pcie: prevent using unmapped memory in fw monitor
Liang Li (1):
kvm/fpu: Enable eager restore kvm FPU for MPX
Luciano Coelho (1):
iwlwifi: mvm: clean net-detect info if device was reset during suspend
Ludovic Desroches (1):
mmc: atmel-mci: fix bad variable type for clkdiv
Lukas Czerner (1):
ext4: fix NULL pointer dereference when journal restart fails
Malcolm Priestley (6):
staging: vt6656: use ieee80211_tx_info to select packet type.
staging: vt6655: device_free_tx_buf use only ieee80211_tx_status_irqsafe
staging: vt6655: implement IEEE80211_TX_STAT_NOACK_TRANSMITTED
staging: vt6655: Fix 80211 control and management status reporting.
staging: vt6655: vnt_tx_packet Correct TX order of OWNED_BY_NIC
staging: vt6655: lock MACvWriteBSSIDAddress.
Mark Edwards (1):
USB: cp210x: add ID for KCF Technologies PRN device
Mark Hounschell (1):
sd: Disable support for 256 byte/sector disks
Mark Rutland (1):
ARM: 8356/1: mm: handle non-pmd-aligned end of RAM
Martin K. Petersen (1):
libata: Blacklist queued TRIM on all Samsung 800-series
Martin Schwidefsky (1):
s390/mm: correct return value of pmd_pfn
Mathias Nyman (2):
xhci: fix isoc endpoint dequeue from advancing too far on transaction error
xhci: Solve full event ring by increasing TRBS_PER_SEGMENT to 256
Mel Gorman (1):
mm, numa: really disable NUMA balancing by default on single node machines
Michael Brunner (1):
gpio: gpio-kempld: Fix get_direction return value
Miklos Szeredi (2):
ovl: don't remove non-empty opaque directory
ovl: mount read-only if workdir can't be created
Nadav Haklai (1):
thermal: armada: Update Armada 380 thermal sensor coefficients
Naidu Tellapati (5):
iio: adc: cc10001: Fix the channel number mapping
iio: adc: cc10001: Fix incorrect use of power-up/power-down register
iio: adc: cc10001: Add delay before setting START bit
iio: adc: cc10001: Fix regulator_get_voltage() return value check
pwm: img: Impose upper and lower timebase steps value
NeilBrown (2):
md/raid5: don't record new size if resize_stripes fails.
md: fix race when unfreezing sync_action
Oded Gabbay (2):
iommu/amd: Fix bug in put_pasid_state_wait
drm/amdkfd: Don't report local memory size
Pan Xinhui (1):
tty/n_gsm.c: fix a memory leak when gsmtty is removed
Paolo Bonzini (2):
Revert "KVM: x86: drop fpu_activate hook"
KVM: MMU: fix CR4.SMEP=1, CR0.WP=0 with shadow pages
Paul Burton (1):
MIPS: fix FP mode selection in lieu of .MIPS.abiflags data
Peter Hurley (1):
pty: Fix input race when closing
Philippe Reynes (1):
ARM: dts: imx27: only map 4 Kbyte for fec registers
Rafael J. Wysocki (1):
ACPI / init: Fix the ordering of acpi_reserve_resources()
Russell King (1):
ARM: fix missing syscall trace exit
Rusty Russell (1):
lguest: fix out-by-one error in address checking.
Sasha Levin (2):
fs, omfs: add NULL terminator in the end up the token list
vfs: read file_handle only once in handle_to_path
Scott Branden (1):
rt2x00: add new rt2800usb device DWA 130
Scott Mayhew (1):
svcrpc: fix potential GSSX_ACCEPT_SEC_CONTEXT decoding failures
Shaohua Li (1):
sched: always use blk_schedule_flush_plug in io_schedule_out
Shawn Guo (1):
ARM: dts: fix imx27 dtb build rule
Srinivas Pandruvada (2):
iio: light: hid-sensor-prox: Fix modifier
iio: pressure: hid-sensor-press: Fix modifier
Stephane Eranian (1):
perf/x86/rapl: Enable Broadwell-U RAPL support
Steven Rostedt (1):
module: Call module notifier on failure after complete_formation()
Sławomir Demeszko (1):
staging: gdm724x: Correction of variable usage after applying ALIGN()
Takashi Iwai (4):
ALSA: usb-audio: Add quirk for MS LifeCam Studio
ALSA: hda - Add headphone quirk for Lifebook E752 Revert "ALSA: hda - Add mute-LED mode control to Thinkpad"
ALSA: hda - Fix noise on AMD radeon 290x controller
Tatyana Nikolova (1):
RDMA/core: Fix for parsing netlink string attribute
Theodore Ts'o (1):
ext4: fix lazytime optimization
Thomas Betker (4):
iio: adc: xilinx: Fix register addresses
iio: adc: xilinx: Fix "vccaux" channel .address
iio: adc: xilinx: Fix VREFP scale
iio: adc: xilinx: Fix VREFN sign
Thomas Gleixner (1):
sched: Handle priority boosted tasks proper in setscheduler()
Vasily Khoruzhick (1):
ASoC: uda1380: Avoid accessing i2c bus when codec is disabled
Vineet Gupta (1):
ARC: unbork !LLSC build
Vittorio G (VittGam) (1):
ALSA: usb-audio: Add quirk for MS LifeCam HD-3000
Vladimir Davydov (2):
gfp: add __GFP_NOACCOUNT
kernfs: do not account ino_ida allocations to memcg
Wei Yongjun (1):
power/reset: at91: fix return value check in at91_reset_platform_probe()
Will Deacon (1):
iommu/arm-smmu: Fix sign-extension of upstream bus addresses at stage 1
Xi Wang (1):
arm64: bpf: fix signedness bug in loading 64-bit immediate
Xiao Guangrong (2):
KVM: MMU: fix smap permission check
KVM: MMU: fix SMAP virtualization
Zidan Wang (2):
ASoC: wm8960: fix "RINPUT3" audio route error
ASoC: wm8994: correct BCLK DIV 348 to 384
Greg KH
maintainerDocumentation/hwmon/tmp401 +1 -1
@@ -20,7 +20,7 @@ Supported chips: Datasheet: http://focus.ti.com/docs/prod/folders/print/tmp432.html * Texas Instruments TMP435 Prefix: 'tmp435' - Addresses scanned: I2C 0x37, 0x48 - 0x4f + Addresses scanned: I2C 0x48 - 0x4f Datasheet: http://focus.ti.com/docs/prod/folders/print/tmp435.html Authors:
Documentation/serial/tty.txt +3 -0
@@ -198,6 +198,9 @@ TTY_IO_ERROR If set, causes all subsequent userspace read/write TTY_OTHER_CLOSED Device is a pty and the other side has closed. +TTY_OTHER_DONE Device is a pty and the other side has closed and + all pending input processing has been completed. + TTY_NO_WRITE_SPLIT Prevent driver from splitting up writes into smaller chunks.
Documentation/virtual/kvm/mmu.txt +14 -4
@@ -169,6 +169,10 @@ Shadow pages contain the following information: Contains the value of cr4.smep && !cr0.wp for which the page is valid (pages for which this is true are different from other pages; see the treatment of cr0.wp=0 below). + role.smap_andnot_wp: + Contains the value of cr4.smap && !cr0.wp for which the page is valid + (pages for which this is true are different from other pages; see the + treatment of cr0.wp=0 below). gfn: Either the guest page table containing the translations shadowed by this page, or the base page frame for linear translations. See role.direct.
@@ -344,10 +348,16 @@ on fault type: (user write faults generate a #PF) -In the first case there is an additional complication if CR4.SMEP is -enabled: since we've turned the page into a kernel page, the kernel may now -execute it. We handle this by also setting spte.nx. If we get a user -fetch or read fault, we'll change spte.u=1 and spte.nx=gpte.nx back. +In the first case there are two additional complications: +- if CR4.SMEP is enabled: since we've turned the page into a kernel page, + the kernel may now execute it. We handle this by also setting spte.nx. + If we get a user fetch or read fault, we'll change spte.u=1 and + spte.nx=gpte.nx back. +- if CR4.SMAP is disabled: since the page has been changed to a kernel + page, it can not be reused when CR4.SMAP is enabled. We set + CR4.SMAP && !CR0.WP into shadow page's role to avoid this case. Note, + here we do not care the case that CR4.SMAP is enabled since KVM will + directly inject #PF to guest due to failed permission check. To prevent an spte that was converted into a kernel page with cr0.wp=0 from being written by the kernel after cr0.wp has changed to 1, we make
Makefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 4 PATCHLEVEL = 0 -SUBLEVEL = 4 +SUBLEVEL = 5 EXTRAVERSION = NAME = Hurr durr I'ma sheep
arch/arc/include/asm/atomic.h +1 -1
@@ -99,7 +99,7 @@ static inline void atomic_##op(int i, atomic_t *v) \atomic_ops_unlock (flags); \ } -#define ATOMIC_OP_RETURN (op, c_op) \ +#define ATOMIC_OP_RETURN (op, c_op, asm_op) \ static inline int atomic_##op##_return(int i, atomic_t *v) \ { \ unsigned long flags; \
arch/arm/boot/dts/Makefile +1 -1
@@ -215,7 +215,7 @@ dtb-$(CONFIG_SOC_IMX25) += \ imx25-eukrea-mbimxsd25-baseboard-dvi-vga.dtb \ imx25-karo-tx25.dtb \ imx25-pdk.dtb -dtb-$(CONFIG_SOC_IMX31) += \ +dtb-$(CONFIG_SOC_IMX27) += \ imx27-apf27.dtb \ imx27-apf27dev.dtb \ imx27-eukrea-mbimxsd27-baseboard.dtb \
arch/arm/boot/dts/exynos4412-trats2.dts +1 -1
@@ -736,7 +736,7 @@ display-timings { timing-0 { - clock-frequency = <0>; + clock-frequency = <57153600>; hactive = <720>; vactive = <1280>; hfront-porch = <5>;
arch/arm/boot/dts/imx27.dtsi +1 -1
@@ -531,7 +531,7 @@ fec: ethernet@1002b000 { compatible = "fsl,imx27-fec"; - reg = <0x1002b000 0x4000>; + reg = <0x1002b000 0x1000>; interrupts = <50>; clocks = <&clks IMX27_CLK_FEC_IPG_GATE>, <&clks IMX27_CLK_FEC_AHB_GATE>;
arch/arm/kernel/entry-common.S +3 -1
@@ -33,7 +33,9 @@ ret_fast_syscall: UNWIND(.fnstart ) UNWIND(.cantunwind ) disable_irq @ disable interrupts - ldr r1, [tsk, #TI_FLAGS] + ldr r1, [tsk, #TI_FLAGS] @ re-check for syscall tracing + tst r1, #_TIF_SYSCALL_WORK + bne __sys_trace_return tst r1, #_TIF_WORK_MASK bne fast_work_pending asm_trace_hardirqs_on
arch/arm/mach-exynos/pm_domains.c +2 -2
@@ -169,7 +169,7 @@ no_clk: args.np = np; args.args_count =0 ; child_domain =of_genpd_get_from_provider (&args); -if (!child_domain) +if (IS_ERR (child_domain))continue ; if (of_parse_phandle_with_args(np, "power-domains",
@@ -177,7 +177,7 @@ no_clk:continue ; parent_domain =of_genpd_get_from_provider (&args); -if (!parent_domain) +if (IS_ERR (parent_domain))continue ;if (pm_genpd_add_subdomain (parent_domain, child_domain))
arch/arm/mach-exynos/sleep.S +16 -15
@@ -23,14 +23,7 @@ #define CPU_MASK 0xff0ffff0 #define CPU_CORTEX_A9 0x410fc090 - /* - * The following code is located into the .data section. This is to - * allow l2x0_regs_phys to be accessed with a relative load while we - * can't rely on any MMU translation. We could have put l2x0_regs_phys - * in the .text section as well, but some setups might insist on it to - * be truly read-only. (Reference from: arch/arm/kernel/sleep.S) - */ - .data + .text .align /*
@@ -69,10 +62,12 @@ ENTRY(exynos_cpu_resume_ns) cmp r0, r1 bne skip_cp15 - adr r0, cp15_save_power + adr r0, _cp15_save_power ldr r1, [r0] - adr r0, cp15_save_diag + ldr r1, [r0, r1] + adr r0, _cp15_save_diag ldr r2, [r0] + ldr r2, [r0, r2] mov r0, #SMC_CMD_C15RESUME dsb smc #0
@@ -118,14 +113,20 @@ skip_l2x0: skip_cp15: b cpu_resume ENDPROC(exynos_cpu_resume_ns) + + .align +_cp15_save_power: + .long cp15_save_power - . +_cp15_save_diag: + .long cp15_save_diag - . +#ifdef CONFIG_CACHE_L2X0 +1: .long l2x0_saved_regs - . +#endif /* CONFIG_CACHE_L2X0 */ + + .data .globl cp15_save_diag cp15_save_diag: .long 0 @ cp15 diagnostic .globl cp15_save_power cp15_save_power: .long 0 @ cp15 power control - -#ifdef CONFIG_CACHE_L2X0 - .align -1: .long l2x0_saved_regs - . -#endif /* CONFIG_CACHE_L2X0 */
arch/arm/mm/mmu.c +10 -10
@@ -1112,22 +1112,22 @@ void __init sanity_check_meminfo(void) }/* -* Find the first non-section-aligned page, and point +* Find the first non-pmd-aligned page, and point * memblock_limit at it. This relies on rounding the -* limit down to be section-aligned, which happens at -* the end of this function. +* limit down to be pmd-aligned, which happens at the +* end of this function. * * With this algorithm, the start or end of almost any -* bank can be non-section-aligned. The only exception -* is that the start of the bank 0 must be section- +* bank can be non-pmd-aligned. The only exception is +* that the start of the bank 0 must be section- * aligned, since otherwise memory would need to be * allocated when mapping the start of bank 0, which * occurs before any free memory is mapped. */ if (!memblock_limit) { -if (!IS_ALIGNED (block_start,SECTION_SIZE )) +if (!IS_ALIGNED (block_start,PMD_SIZE )) memblock_limit = block_start; -else if (!IS_ALIGNED (block_end,SECTION_SIZE )) +else if (!IS_ALIGNED (block_end,PMD_SIZE )) memblock_limit = arm_lowmem_limit; }
@@ -1137,12 +1137,12 @@ void __init sanity_check_meminfo(void) high_memory =__va (arm_lowmem_limit -1 ) +1 ;/* -* Round the memblock limit down to a section size. This +* Round the memblock limit down to a pmd size. This * helps to ensure that we will allocate memory from the -* last full section, which should be mapped. +* last full pmd, which should be mapped. */ if (memblock_limit) - memblock_limit =round_down (memblock_limit,SECTION_SIZE ); + memblock_limit =round_down (memblock_limit,PMD_SIZE );if (!memblock_limit) memblock_limit = arm_lowmem_limit;
arch/arm64/net/bpf_jit_comp.c +1 -1
@@ -487,7 +487,7 @@ emit_cond_jmp:return -EINVAL ; } - imm64 = (u64 )insn1.imm <<32 | imm; + imm64 = (u64 )insn1.imm <<32 | (u32 )imm;emit_a64_mov_i64 (dst, imm64, ctx);return 1 ;
arch/mips/kernel/elf.c +17 -15
@@ -76,14 +76,6 @@ int arch_elf_pt_proc(void *_ehdr, void *_phdr, struct file *elf,/* Lets see if this is an O32 ELF */ if (ehdr32->e_ident[EI_CLASS ] ==ELFCLASS32 ) { -/* FR = 1 for N32 */ -if (ehdr32->e_flags &EF_MIPS_ABI2 ) - state->overall_fp_mode =FP_FR1 ; -else -/* Set a good default FPU mode for O32 */ - state->overall_fp_mode = cpu_has_mips_r6 ? -FP_FRE :FP_FR0 ; -if (ehdr32->e_flags &EF_MIPS_FP64 ) {/* * Set MIPS_ABI_FP_OLD_64 for EF_MIPS_FP64. We will override it
@@ -104,9 +96,6 @@ int arch_elf_pt_proc(void *_ehdr, void *_phdr, struct file *elf, (char *)&abiflags, sizeof(abiflags)); }else { -/* FR=1 is really the only option for 64-bit */ - state->overall_fp_mode =FP_FR1 ; -if (phdr64->p_type !=PT_MIPS_ABIFLAGS )return 0 ;if (phdr64->p_filesz <sizeof (abiflags))
@@ -147,6 +136,7 @@ int arch_check_elf(void *_ehdr, bool has_interpreter,struct elf32_hdr *ehdr = _ehdr;struct mode_req prog_req, interp_req;int fp_abi, interp_fp_abi, abi0, abi1, max_abi; +bool is_mips64;if (!config_enabled (CONFIG_MIPS_O32_FP64_SUPPORT ))return 0 ;
@@ -162,10 +152,22 @@ int arch_check_elf(void *_ehdr, bool has_interpreter, abi0 = abi1 = fp_abi; } -/* ABI limits. O32 = FP_64A, N32/N64 = FP_SOFT */ - max_abi = ((ehdr->e_ident[EI_CLASS ] ==ELFCLASS32 ) && - (!(ehdr->e_flags &EF_MIPS_ABI2 ))) ? -MIPS_ABI_FP_64A :MIPS_ABI_FP_SOFT ; + is_mips64 = (ehdr->e_ident[EI_CLASS ] ==ELFCLASS64 ) || + (ehdr->e_flags &EF_MIPS_ABI2 ); + +if (is_mips64) { +/* MIPS64 code always uses FR=1, thus the default is easy */ + state->overall_fp_mode =FP_FR1 ; + +/* Disallow access to the various FPXX & FP64 ABIs */ + max_abi =MIPS_ABI_FP_SOFT ; + }else { +/* Default to a mode capable of running code expecting FR=0 */ + state->overall_fp_mode = cpu_has_mips_r6 ?FP_FRE :FP_FR0 ; + +/* Allow all ABIs we know about */ + max_abi =MIPS_ABI_FP_64A ; + }if ((abi0 > max_abi && abi0 !=MIPS_ABI_FP_UNKNOWN ) || (abi1 > max_abi && abi1 !=MIPS_ABI_FP_UNKNOWN ))
arch/parisc/include/asm/elf.h +4 -0
@@ -348,6 +348,10 @@ struct pt_regs; /* forward declaration... */#define ELF_HWCAP 0 +#define STACK_RND_MASK (is_32bit_task() ? \ + 0x7ff >> (PAGE_SHIFT - 12) : \ + 0x3ffff >> (PAGE_SHIFT - 12)) +struct mm_struct ;extern unsigned long arch_randomize_brk (struct mm_struct *);#define arch_randomize_brk arch_randomize_brk
arch/parisc/kernel/sys_parisc.c +3 -0
@@ -77,6 +77,9 @@ static unsigned long mmap_upper_limit(void)if (stack_base >STACK_SIZE_MAX ) stack_base =STACK_SIZE_MAX ; +/* Add space for stack randomization. */ + stack_base += (STACK_RND_MASK <<PAGE_SHIFT ); +return PAGE_ALIGN (STACK_TOP - stack_base); }
arch/powerpc/kernel/mce.c +2 -2
@@ -73,7 +73,7 @@ void save_mce_event(struct pt_regs *regs, long handled, uint64_t nip, uint64_t addr) { uint64_t srr1; -int index =__this_cpu_inc_return (mce_nest_count); +int index =__this_cpu_inc_return (mce_nest_count) -1 ;struct machine_check_event *mce =this_cpu_ptr (&mce_event[index]);/*
@@ -184,7 +184,7 @@ void machine_check_queue_event(void)if (!get_mce_event (&evt,MCE_EVENT_RELEASE ))return ; - index =__this_cpu_inc_return (mce_queue_count); + index =__this_cpu_inc_return (mce_queue_count) -1 ;/* If queue is full, just return for now. */ if (index >=MAX_MC_EVT ) {__this_cpu_dec (mce_queue_count);
arch/powerpc/kernel/vmlinux.lds.S +1 -0
@@ -213,6 +213,7 @@ SECTIONS *(.opd) } + . = ALIGN(256); .got : AT(ADDR(.got) - LOAD_OFFSET) { __toc_start = .; #ifndef CONFIG_RELOCATABLE
arch/s390/crypto/ghash_s390.c +13 -12
@@ -16,11 +16,12 @@#define GHASH_DIGEST_SIZE 16struct ghash_ctx { -u8 icv[16 ]; -u8 key[16 ]; +u8 key[GHASH_BLOCK_SIZE ]; };struct ghash_desc_ctx { +u8 icv[GHASH_BLOCK_SIZE ]; +u8 key[GHASH_BLOCK_SIZE ];u8 buffer[GHASH_BLOCK_SIZE ];u32 bytes; };
@@ -28,8 +29,10 @@ struct ghash_desc_ctx {static int ghash_init (struct shash_desc *desc) {struct ghash_desc_ctx *dctx =shash_desc_ctx (desc); +struct ghash_ctx *ctx =crypto_shash_ctx (desc->tfm);memset (dctx,0 ,sizeof (*dctx)); +memcpy (dctx->key, ctx->key,GHASH_BLOCK_SIZE );return 0 ; }
@@ -45,7 +48,6 @@ static int ghash_setkey(struct crypto_shash *tfm, }memcpy (ctx->key, key,GHASH_BLOCK_SIZE ); -memset (ctx->icv,0 ,GHASH_BLOCK_SIZE );return 0 ; }
@@ -54,7 +56,6 @@ static int ghash_update(struct shash_desc *desc, const u8 *src, unsigned int srclen) {struct ghash_desc_ctx *dctx =shash_desc_ctx (desc); -struct ghash_ctx *ctx =crypto_shash_ctx (desc->tfm);unsigned int n;u8 *buf = dctx->buffer;int ret;
@@ -70,7 +71,7 @@ static int ghash_update(struct shash_desc *desc, src += n;if (!dctx->bytes) { - ret =crypt_s390_kimd (KIMD_GHASH , ctx, buf, + ret =crypt_s390_kimd (KIMD_GHASH , dctx, buf,GHASH_BLOCK_SIZE );if (ret !=GHASH_BLOCK_SIZE )return -EIO ;
@@ -79,7 +80,7 @@ static int ghash_update(struct shash_desc *desc, n = srclen & ~(GHASH_BLOCK_SIZE -1 );if (n) { - ret =crypt_s390_kimd (KIMD_GHASH , ctx, src, n); + ret =crypt_s390_kimd (KIMD_GHASH , dctx, src, n);if (ret != n)return -EIO ; src += n;
@@ -94,7 +95,7 @@ static int ghash_update(struct shash_desc *desc,return 0 ; } -static int ghash_flush (struct ghash_ctx *ctx,struct ghash_desc_ctx *dctx) +static int ghash_flush (struct ghash_desc_ctx *dctx) {u8 *buf = dctx->buffer;int ret;
@@ -104,24 +105,24 @@ static int ghash_flush(struct ghash_ctx *ctx, struct ghash_desc_ctx *dctx)memset (pos,0 , dctx->bytes); - ret =crypt_s390_kimd (KIMD_GHASH , ctx, buf,GHASH_BLOCK_SIZE ); + ret =crypt_s390_kimd (KIMD_GHASH , dctx, buf,GHASH_BLOCK_SIZE );if (ret !=GHASH_BLOCK_SIZE )return -EIO ; + + dctx->bytes =0 ; } - dctx->bytes =0 ;return 0 ; }static int ghash_final (struct shash_desc *desc,u8 *dst) {struct ghash_desc_ctx *dctx =shash_desc_ctx (desc); -struct ghash_ctx *ctx =crypto_shash_ctx (desc->tfm);int ret; - ret =ghash_flush (ctx, dctx); + ret =ghash_flush (dctx);if (!ret) -memcpy (dst, ctx->icv,GHASH_BLOCK_SIZE ); +memcpy (dst, dctx->icv,GHASH_BLOCK_SIZE );return ret; }
arch/s390/include/asm/pgtable.h +1 -1
@@ -600,7 +600,7 @@ static inline int pmd_large(pmd_t pmd)return (pmd_val (pmd) & _SEGMENT_ENTRY_LARGE) !=0 ; } -static inline int pmd_pfn (pmd_t pmd) +static inline unsigned long pmd_pfn (pmd_t pmd) {unsigned long origin_mask;
arch/x86/include/asm/kvm_host.h +3 -0
@@ -212,6 +212,7 @@ union kvm_mmu_page_role { unsigned nxe:1; unsigned cr0_wp:1; unsigned smep_andnot_wp:1; + unsigned smap_andnot_wp:1; }; };
@@ -404,6 +405,7 @@ struct kvm_vcpu_arch {struct kvm_mmu_memory_cache mmu_page_header_cache;struct fpu guest_fpu; +bool eager_fpu;u64 xcr0;u64 guest_supported_xcr0;u32 guest_xstate_size;
@@ -735,6 +737,7 @@ struct kvm_x86_ops {void (*cache_reg)(struct kvm_vcpu *vcpu,enum kvm_reg reg);unsigned long (*get_rflags)(struct kvm_vcpu *vcpu);void (*set_rflags)(struct kvm_vcpu *vcpu,unsigned long rflags); +void (*fpu_activate)(struct kvm_vcpu *vcpu);void (*fpu_deactivate)(struct kvm_vcpu *vcpu);void (*tlb_flush)(struct kvm_vcpu *vcpu);
arch/x86/kernel/cpu/mcheck/mce.c +5 -2
@@ -705,6 +705,7 @@ static int mce_no_way_out(struct mce *m, char **msg, unsigned long *validp, struct pt_regs *regs) {int i, ret =0 ; +char *tmp;for (i =0 ; i < mca_cfg.banks; i++) { m->status =mce_rdmsrl (MSR_IA32_MCx_STATUS (i));
@@ -713,9 +714,11 @@ static int mce_no_way_out(struct mce *m, char **msg, unsigned long *validp,if (quirk_no_way_out)quirk_no_way_out (i, m, regs); } -if (mce_severity (m, mca_cfg.tolerant, msg, true) >= -MCE_PANIC_SEVERITY ) + +if (mce_severity (m, mca_cfg.tolerant, &tmp, true) >=MCE_PANIC_SEVERITY ) { + *msg = tmp; ret =1 ; + } }return ret; }
arch/x86/kernel/cpu/perf_event_intel_rapl.c +1 -0
@@ -680,6 +680,7 @@ static int __init rapl_pmu_init(void)break ;case 60 :/* Haswell */ case 69 :/* Haswell-Celeron */ +case 61 :/* Broadwell */ rapl_cntr_mask =RAPL_IDX_HSW ; rapl_pmu_events_group.attrs = rapl_events_hsw_attr;break ;
arch/x86/kernel/i387.c +15 -0
@@ -169,6 +169,21 @@ static void init_thread_xstate(void) xstate_size =sizeof (struct i387_fxsave_struct ); else xstate_size =sizeof (struct i387_fsave_struct ); + +/* +* Quirk: we don't yet handle the XSAVES* instructions +* correctly, as we don't correctly convert between +* standard and compacted format when interfacing +* with user-space - so disable it for now. +* +* The difference is small: with recent CPUs the +* compacted format is only marginally smaller than +* the standard FPU state format. +* +* ( This is easy to backport while we are fixing +* XSAVES* support. ) +*/ +setup_clear_cpu_cap (X86_FEATURE_XSAVES ); }/*
arch/x86/kvm/cpuid.c +4 -0
@@ -16,6 +16,8 @@#include <linux/module.h> #include <linux/vmalloc.h> #include <linux/uaccess.h> +#include <asm/i387.h> /* For use_eager_fpu. Ugh! */ +#include <asm/fpu-internal.h> /* For use_eager_fpu. Ugh! */ #include <asm/user.h> #include <asm/xsave.h> #include "cpuid.h"
@@ -95,6 +97,8 @@ int kvm_update_cpuid(struct kvm_vcpu *vcpu)if (best && (best->eax & (F (XSAVES ) |F (XSAVEC )))) best->ebx =xstate_required_size (vcpu->arch.xcr0, true); + vcpu->arch.eager_fpu =guest_cpuid_has_mpx (vcpu); +/* * The existing code assumes virtual address is 48-bit in the canonical * address checks; exit if it is ever changed.
arch/x86/kvm/cpuid.h +8 -0
@@ -111,4 +111,12 @@ static inline bool guest_cpuid_has_rtm(struct kvm_vcpu *vcpu) best =kvm_find_cpuid_entry (vcpu,7 ,0 ); return best && (best->ebx & bit(X86_FEATURE_RTM)); } + +static inline bool guest_cpuid_has_mpx (struct kvm_vcpu *vcpu) +{ +struct kvm_cpuid_entry2 *best; + + best =kvm_find_cpuid_entry (vcpu,7 ,0 ); +return best && (best->ebx &bit (X86_FEATURE_MPX )); +}#endif
arch/x86/kvm/mmu.c +12 -4
@@ -3736,8 +3736,8 @@ static void reset_rsvds_bits_mask_ept(struct kvm_vcpu *vcpu, } } -void update_permission_bitmask (struct kvm_vcpu *vcpu, -struct kvm_mmu *mmu,bool ept) +static void update_permission_bitmask (struct kvm_vcpu *vcpu, +struct kvm_mmu *mmu,bool ept) {unsigned bit, byte, pfec;u8 map;
@@ -3918,6 +3918,7 @@ static void init_kvm_tdp_mmu(struct kvm_vcpu *vcpu)void kvm_init_shadow_mmu (struct kvm_vcpu *vcpu) {bool smep =kvm_read_cr4_bits (vcpu,X86_CR4_SMEP ); +bool smap =kvm_read_cr4_bits (vcpu,X86_CR4_SMAP );struct kvm_mmu *context = &vcpu->arch.mmu;MMU_WARN_ON (VALID_PAGE (context->root_hpa));
@@ -3936,6 +3937,8 @@ void kvm_init_shadow_mmu(struct kvm_vcpu *vcpu) context->base_role.cr0_wp =is_write_protection (vcpu); context->base_role.smep_andnot_wp = smep && !is_write_protection (vcpu); + context->base_role.smap_andnot_wp + = smap && !is_write_protection (vcpu); }EXPORT_SYMBOL_GPL (kvm_init_shadow_mmu);
@@ -4207,12 +4210,18 @@ void kvm_mmu_pte_write(struct kvm_vcpu *vcpu, gpa_t gpa, const u8 *new, int bytes) {gfn_t gfn = gpa >>PAGE_SHIFT ; -union kvm_mmu_page_role mask = { .word =0 };struct kvm_mmu_page *sp;LIST_HEAD (invalid_list);u64 entry, gentry, *spte;int npte;bool remote_flush, local_flush, zap_page; +union kvm_mmu_page_role mask = (union kvm_mmu_page_role ) { + .cr0_wp =1 , + .cr4_pae =1 , + .nxe =1 , + .smep_andnot_wp =1 , + .smap_andnot_wp =1 , + };/* * If we don't have indirect shadow pages, it means no page is
@@ -4238,7 +4247,6 @@ void kvm_mmu_pte_write(struct kvm_vcpu *vcpu, gpa_t gpa, ++vcpu->kvm->stat.mmu_pte_write;kvm_mmu_audit (vcpu,AUDIT_PRE_PTE_WRITE ); - mask.cr0_wp = mask.cr4_pae = mask.nxe =1 ;for_each_gfn_indirect_valid_sp (vcpu->kvm, sp, gfn) {if (detect_write_misaligned (sp, gpa, bytes) ||detect_write_flooding (sp)) {
arch/x86/kvm/mmu.h +2 -2
@@ -71,8 +71,6 @@ enum {int handle_mmio_page_fault_common (struct kvm_vcpu *vcpu,u64 addr,bool direct);void kvm_init_shadow_mmu (struct kvm_vcpu *vcpu);void kvm_init_shadow_ept_mmu (struct kvm_vcpu *vcpu,bool execonly); -void update_permission_bitmask (struct kvm_vcpu *vcpu,struct kvm_mmu *mmu, -bool ept);static inline unsigned int kvm_mmu_available_pages (struct kvm *kvm) {
@@ -166,6 +164,8 @@ static inline bool permission_fault(struct kvm_vcpu *vcpu, struct kvm_mmu *mmu,int index = (pfec >>1 ) + (smap >> (X86_EFLAGS_AC_BIT -PFERR_RSVD_BIT +1 )); +WARN_ON (pfec &PFERR_RSVD_MASK ); +return (mmu->permissions[index] >> pte_access) &1 ; }
arch/x86/kvm/paging_tmpl.h +7 -0
@@ -718,6 +718,13 @@ static int FNAME(page_fault)(struct kvm_vcpu *vcpu, gva_t addr, u32 error_code, mmu_is_nested(vcpu));if (likely (r !=RET_MMIO_PF_INVALID ))return r; + +/* +* page fault with PFEC.RSVD = 1 is caused by shadow +* page fault, should not be used to walk guest page +* table. +*/ + error_code &= ~PFERR_RSVD_MASK ; }; r =mmu_topup_memory_caches (vcpu);
arch/x86/kvm/svm.c +1 -0
@@ -4374,6 +4374,7 @@ static struct kvm_x86_ops svm_x86_ops = { .cache_reg = svm_cache_reg, .get_rflags = svm_get_rflags, .set_rflags = svm_set_rflags, + .fpu_activate = svm_fpu_activate, .fpu_deactivate = svm_fpu_deactivate, .tlb_flush = svm_flush_tlb,
arch/x86/kvm/vmx.c +1 -0
@@ -10179,6 +10179,7 @@ static struct kvm_x86_ops vmx_x86_ops = { .cache_reg = vmx_cache_reg, .get_rflags = vmx_get_rflags, .set_rflags = vmx_set_rflags, + .fpu_activate = vmx_fpu_activate, .fpu_deactivate = vmx_fpu_deactivate, .tlb_flush = vmx_flush_tlb,
arch/x86/kvm/x86.c +19 -7
@@ -702,8 +702,9 @@ EXPORT_SYMBOL_GPL(kvm_set_xcr);int kvm_set_cr4 (struct kvm_vcpu *vcpu,unsigned long cr4) {unsigned long old_cr4 =kvm_read_cr4 (vcpu); -unsigned long pdptr_bits =X86_CR4_PGE |X86_CR4_PSE | -X86_CR4_PAE |X86_CR4_SMEP ; +unsigned long pdptr_bits =X86_CR4_PGE |X86_CR4_PSE |X86_CR4_PAE | +X86_CR4_SMEP |X86_CR4_SMAP ; +if (cr4 &CR4_RESERVED_BITS )return 1 ;
@@ -744,9 +745,6 @@ int kvm_set_cr4(struct kvm_vcpu *vcpu, unsigned long cr4) (!(cr4 & X86_CR4_PCIDE) && (old_cr4 & X86_CR4_PCIDE)))kvm_mmu_reset_context (vcpu); -if ((cr4 ^ old_cr4) &X86_CR4_SMAP ) -update_permission_bitmask (vcpu, vcpu->arch.walk_mmu, false); -if ((cr4 ^ old_cr4) &X86_CR4_OSXSAVE )kvm_update_cpuid (vcpu);
@@ -6141,6 +6139,8 @@ void kvm_vcpu_reload_apic_access_page(struct kvm_vcpu *vcpu)return ; page =gfn_to_page (vcpu->kvm,APIC_DEFAULT_PHYS_BASE >>PAGE_SHIFT ); +if (is_error_page (page)) +return ; kvm_x86_ops->set_apic_access_page_addr (vcpu,page_to_phys (page));/*
@@ -6996,7 +6996,9 @@ void kvm_put_guest_fpu(struct kvm_vcpu *vcpu)fpu_save_init (&vcpu->arch.guest_fpu);__kernel_fpu_end (); ++vcpu->stat.fpu_reload; -kvm_make_request (KVM_REQ_DEACTIVATE_FPU , vcpu); +if (!vcpu->arch.eager_fpu) +kvm_make_request (KVM_REQ_DEACTIVATE_FPU , vcpu); +trace_kvm_fpu (0 ); }
@@ -7012,11 +7014,21 @@ void kvm_arch_vcpu_free(struct kvm_vcpu *vcpu)struct kvm_vcpu *kvm_arch_vcpu_create (struct kvm *kvm,unsigned int id) { +struct kvm_vcpu *vcpu; +if (check_tsc_unstable () &&atomic_read (&kvm->online_vcpus) !=0 )printk_once (KERN_WARNING "kvm: SMP vm created on host with unstable TSC; " "guest TSC will not be reliable\n" ); -return kvm_x86_ops->vcpu_create (kvm, id); + + vcpu = kvm_x86_ops->vcpu_create (kvm, id); + +/* +* Activate fpu unconditionally in case the guest needs eager FPU. It will be +* deactivated soon if it doesn't. +*/ + kvm_x86_ops->fpu_activate (vcpu); +return vcpu; }int kvm_arch_vcpu_setup (struct kvm_vcpu *vcpu)
drivers/acpi/osl.c +2 -4
@@ -182,7 +182,7 @@ static void __init acpi_request_region (struct acpi_generic_address *gas,request_mem_region (addr, length, desc); } -static int __init acpi_reserve_resources (void ) +static void __init acpi_reserve_resources (void ) {acpi_request_region (&acpi_gbl_FADT.xpm1a_event_block, acpi_gbl_FADT.pm1_event_length,"ACPI PM1a_EVT_BLK" );
@@ -211,10 +211,7 @@ static int __init acpi_reserve_resources(void)if (!(acpi_gbl_FADT.gpe1_block_length &0x1 ))acpi_request_region (&acpi_gbl_FADT.xgpe1_block, acpi_gbl_FADT.gpe1_block_length,"ACPI GPE1_BLK" ); - -return 0 ; } -device_initcall (acpi_reserve_resources);void acpi_os_printf (const char *fmt, ...) {
@@ -1845,6 +1842,7 @@ acpi_status __init acpi_os_initialize(void)acpi_status __init acpi_os_initialize1 (void ) { +acpi_reserve_resources (); kacpid_wq =alloc_workqueue ("kacpid" ,0 ,1 ); kacpi_notify_wq =alloc_workqueue ("kacpi_notify" ,0 ,1 ); kacpi_hotplug_wq =alloc_ordered_workqueue ("kacpi_hotplug" ,0 );
drivers/ata/ahci.c +95 -8
139 lines not on this page · raw message
drivers/ata/libahci.c +1 -2
@@ -1707,8 +1707,7 @@ static void ahci_handle_port_interrupt(struct ata_port *ap,if (unlikely (resetting)) status &= ~PORT_IRQ_BAD_PMP ; -/* if LPM is enabled, PHYRDY doesn't mean anything */ -if (ap->link.lpm_policy >ATA_LPM_MAX_POWER ) { +if (sata_lpm_ignore_phy_events (&ap->link)) { status &= ~PORT_IRQ_PHYRDY ;ahci_scr_write (&ap->link,SCR_ERROR ,SERR_PHYRDY_CHG ); }
drivers/ata/libata-core.c +33 -1
@@ -4214,7 +4214,7 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = { ATA_HORKAGE_ZERO_AFTER_TRIM, }, {"Crucial_CT*MX100*" ,"MU01" ,ATA_HORKAGE_NO_NCQ_TRIM | ATA_HORKAGE_ZERO_AFTER_TRIM, }, - { "Samsung SSD 850 PRO*", NULL, ATA_HORKAGE_NO_NCQ_TRIM | + { "Samsung SSD 8*", NULL, ATA_HORKAGE_NO_NCQ_TRIM | ATA_HORKAGE_ZERO_AFTER_TRIM, },/*
@@ -6728,6 +6728,38 @@ u32 ata_wait_register(struct ata_port *ap, void __iomem *reg, u32 mask, u32 val,return tmp; } +/** +* sata_lpm_ignore_phy_events - test if PHY event should be ignored +* @link: Link receiving the event +* +* Test whether the received PHY event has to be ignored or not. +* +* LOCKING: +* None: +* +* RETURNS: +* True if the event has to be ignored. +*/ +bool sata_lpm_ignore_phy_events (struct ata_link *link) +{ +unsigned long lpm_timeout = link->last_lpm_change + +msecs_to_jiffies (ATA_TMOUT_SPURIOUS_PHY ); + +/* if LPM is enabled, PHYRDY doesn't mean anything */ +if (link->lpm_policy >ATA_LPM_MAX_POWER ) +return true; + +/* ignore the first PHY event after the LPM policy changed +* as it is might be spurious +*/ +if ((link->flags &ATA_LFLAG_CHANGED ) && +time_before (jiffies, lpm_timeout)) +return true; + +return false; +} +EXPORT_SYMBOL_GPL (sata_lpm_ignore_phy_events); +/* * Dummy port_ops */
drivers/ata/libata-eh.c +3 -0
@@ -3489,6 +3489,9 @@ static int ata_eh_set_lpm(struct ata_link *link, enum ata_lpm_policy policy, } } + link->last_lpm_change = jiffies; + link->flags |=ATA_LFLAG_CHANGED ; +return 0 ; fail:
drivers/clk/clk.c +8 -0
@@ -1443,8 +1443,10 @@ static struct clk_core *__clk_set_parent_before(struct clk_core *clk,*/ if (clk->prepare_count) {clk_core_prepare (parent); + flags =clk_enable_lock ();clk_core_enable (parent);clk_core_enable (clk); +clk_enable_unlock (flags); }/* update the clk tree topology */
@@ -1459,13 +1461,17 @@ static void __clk_set_parent_after(struct clk_core *core,struct clk_core *parent, struct clk_core *old_parent) { + unsigned long flags; +/* * Finish the migration of prepare state and undo the changes done * for preventing a race with clk_enable(). */ if (core->prepare_count) { + flags =clk_enable_lock ();clk_core_disable (core);clk_core_disable (old_parent); +clk_enable_unlock (flags);clk_core_unprepare (old_parent); } }
@@ -1489,8 +1495,10 @@ static int __clk_set_parent(struct clk_core *clk, struct clk_core *parent,clk_enable_unlock (flags);if (clk->prepare_count) { + flags =clk_enable_lock ();clk_core_disable (clk);clk_core_disable (parent); +clk_enable_unlock (flags);clk_core_unprepare (parent); }return ret;
drivers/clk/samsung/clk-exynos5420.c +1 -0
@@ -271,6 +271,7 @@ static const struct samsung_clk_reg_dump exynos5420_set_clksrc[] = { { .offset = SRC_MASK_PERIC0, .value = 0x11111110, }, { .offset = SRC_MASK_PERIC1, .value = 0x11111100, }, { .offset = SRC_MASK_ISP, .value = 0x11111000, }, + { .offset = GATE_BUS_TOP, .value = 0xffffffff, }, { .offset = GATE_BUS_DISP1, .value = 0xffffffff, }, { .offset = GATE_IP_PERIC, .value = 0xffffffff, }, };
drivers/firmware/dmi_scan.c +4 -3
@@ -499,18 +499,19 @@ static int __init dmi_present(const u8 *buf) buf +=16 ;if (memcmp (buf,"_DMI_" ,5 ) ==0 &&dmi_checksum (buf,15 )) { +if (smbios_ver) + dmi_ver = smbios_ver; +else + dmi_ver = (buf[14 ] &0xF0 ) <<4 | (buf[14 ] &0x0F ); dmi_num =get_unaligned_le16 (buf +12 ); dmi_len =get_unaligned_le16 (buf +6 ); dmi_base =get_unaligned_le32 (buf +8 );if (dmi_walk_early (dmi_decode) ==0 ) {if (smbios_ver) { - dmi_ver = smbios_ver;pr_info ("SMBIOS %d.%d present.\n" , dmi_ver >>8 , dmi_ver &0xFF ); }else { - dmi_ver = (buf[14 ] &0xF0 ) <<4 | - (buf[14 ] &0x0F );pr_info ("Legacy DMI %d.%d present.\n" , dmi_ver >>8 , dmi_ver &0xFF ); }
drivers/gpio/gpio-kempld.c +1 -1
@@ -117,7 +117,7 @@ static int kempld_gpio_get_direction(struct gpio_chip *chip, unsigned offset) = container_of(chip, struct kempld_gpio_data, chip);struct kempld_device_data *pld = gpio->pld; -return kempld_gpio_get_bit (pld,KEMPLD_GPIO_DIR_NUM (offset), offset); +return !kempld_gpio_get_bit (pld,KEMPLD_GPIO_DIR_NUM (offset), offset); }static int kempld_gpio_pincount (struct kempld_device_data *pld)
drivers/gpu/drm/amd/amdkfd/kfd_topology.c +1 -1
@@ -729,7 +729,7 @@ static ssize_t node_show(struct kobject *kobj, struct attribute *attr, kfd2kgd->get_max_engine_clock_in_mhz ( dev->gpu->kgd));sysfs_show_64bit_prop (buffer,"local_mem_size" , - kfd2kgd->get_vmem_size (dev->gpu->kgd)); + (unsigned long long int )0 ); sysfs_show_32bit_prop(buffer, "fw_version", kfd2kgd->get_fw_version(
drivers/gpu/drm/drm_plane_helper.c +3 -0
@@ -476,6 +476,9 @@ int drm_plane_helper_commit(struct drm_plane *plane,if (!crtc[i])continue ; +if (crtc[i]->cursor == plane) +continue ; +/* There's no other way to figure out whether the crtc is running. */ ret =drm_crtc_vblank_get (crtc[i]);if (ret ==0 ) {
drivers/gpu/drm/radeon/atombios_crtc.c +3 -1
@@ -1789,7 +1789,9 @@ static int radeon_get_shared_nondp_ppll(struct drm_crtc *crtc)if ((crtc->mode.clock == test_crtc->mode.clock) && (adjusted_clock == test_adjusted_clock) && (radeon_crtc->ss_enabled == test_radeon_crtc->ss_enabled) && - (test_radeon_crtc->pll_id !=ATOM_PPLL_INVALID )) + (test_radeon_crtc->pll_id !=ATOM_PPLL_INVALID ) && + (drm_detect_monitor_audio (radeon_connector_edid (test_radeon_crtc->connector)) == +drm_detect_monitor_audio (radeon_connector_edid (radeon_crtc->connector))))return test_radeon_crtc->pll_id; } }
drivers/gpu/drm/radeon/atombios_dp.c +11 -9
@@ -412,19 +412,21 @@ bool radeon_dp_getdpcd(struct radeon_connector *radeon_connector) {struct radeon_connector_atom_dig *dig_connector = radeon_connector->con_priv;u8 msg[DP_DPCD_SIZE ]; -int ret; +int ret, i; - ret =drm_dp_dpcd_read (&radeon_connector->ddc_bus->aux,DP_DPCD_REV , msg, -DP_DPCD_SIZE ); -if (ret >0 ) { -memcpy (dig_connector->dpcd, msg,DP_DPCD_SIZE ); +for (i =0 ; i <7 ; i++) { + ret =drm_dp_dpcd_read (&radeon_connector->ddc_bus->aux,DP_DPCD_REV , msg, +DP_DPCD_SIZE ); +if (ret ==DP_DPCD_SIZE ) { +memcpy (dig_connector->dpcd, msg,DP_DPCD_SIZE ); -DRM_DEBUG_KMS ("DPCD: %*ph\n" , (int )sizeof (dig_connector->dpcd), - dig_connector->dpcd); +DRM_DEBUG_KMS ("DPCD: %*ph\n" , (int )sizeof (dig_connector->dpcd), + dig_connector->dpcd); -radeon_dp_probe_oui (radeon_connector); +radeon_dp_probe_oui (radeon_connector); -return true; +return true; + } } dig_connector->dpcd[0 ] =0 ;return false;
drivers/gpu/drm/radeon/cik.c +1 -1
@@ -5804,7 +5804,7 @@ static int cik_pcie_gart_enable(struct radeon_device *rdev)/* restore context1-15 */ /* set vm size, must be a multiple of 4 */ WREG32 (VM_CONTEXT1_PAGE_TABLE_START_ADDR ,0 ); -WREG32 (VM_CONTEXT1_PAGE_TABLE_END_ADDR , rdev->vm_manager.max_pfn); +WREG32 (VM_CONTEXT1_PAGE_TABLE_END_ADDR , rdev->vm_manager.max_pfn -1 );for (i =1 ; i <16 ; i++) {if (i <8 ) WREG32(VM_CONTEXT0_PAGE_TABLE_BASE_ADDR + (i << 2),
drivers/gpu/drm/radeon/evergreen_hdmi.c +3 -2
@@ -400,7 +400,7 @@ void evergreen_hdmi_enable(struct drm_encoder *encoder, bool enable)if (enable) {struct drm_connector *connector =radeon_get_connector_for_encoder (encoder); -if (drm_detect_monitor_audio (radeon_connector_edid (connector))) { +if (connector &&drm_detect_monitor_audio (radeon_connector_edid (connector))) { WREG32(HDMI_INFOFRAME_CONTROL0 + dig->afmt->offset, HDMI_AVI_INFO_SEND | /* enable AVI info frames */ HDMI_AVI_INFO_CONT | /* required for audio info values to be updated */
@@ -438,7 +438,8 @@ void evergreen_dp_enable(struct drm_encoder *encoder, bool enable)if (!dig || !dig->afmt)return ; -if (enable &&drm_detect_monitor_audio (radeon_connector_edid (connector))) { +if (enable && connector && +drm_detect_monitor_audio (radeon_connector_edid (connector))) {struct drm_connector *connector =radeon_get_connector_for_encoder (encoder);struct radeon_connector *radeon_connector =to_radeon_connector (connector);struct radeon_connector_atom_dig *dig_connector;
drivers/gpu/drm/radeon/ni.c +2 -1
@@ -1272,7 +1272,8 @@ static int cayman_pcie_gart_enable(struct radeon_device *rdev)*/ for (i =1 ; i <8 ; i++) {WREG32 (VM_CONTEXT0_PAGE_TABLE_START_ADDR + (i <<2 ),0 ); -WREG32 (VM_CONTEXT0_PAGE_TABLE_END_ADDR + (i <<2 ), rdev->vm_manager.max_pfn); +WREG32 (VM_CONTEXT0_PAGE_TABLE_END_ADDR + (i <<2 ), + rdev->vm_manager.max_pfn -1 );WREG32 (VM_CONTEXT0_PAGE_TABLE_BASE_ADDR + (i <<2 ), rdev->vm_manager.saved_table_addr[i]); }
drivers/gpu/drm/radeon/radeon_audio.c +12 -15
@@ -460,9 +460,6 @@ void radeon_audio_detect(struct drm_connector *connector,if (!connector || !connector->encoder)return ; -if (!radeon_encoder_is_digital (connector->encoder)) -return ; - rdev = connector->encoder->dev->dev_private;if (!radeon_audio_chipset_supported (rdev))
@@ -471,26 +468,26 @@ void radeon_audio_detect(struct drm_connector *connector, radeon_encoder =to_radeon_encoder (connector->encoder); dig = radeon_encoder->enc_priv; -if (!dig->afmt) -return ; -if (status == connector_status_connected) { -struct radeon_connector *radeon_connector =to_radeon_connector (connector); +struct radeon_connector *radeon_connector; +int sink_type; + +if (!drm_detect_monitor_audio (radeon_connector_edid (connector))) { + radeon_encoder->audio =NULL ; +return ; + } + + radeon_connector =to_radeon_connector (connector); + sink_type =radeon_dp_getsinktype (radeon_connector);if (connector->connector_type == DRM_MODE_CONNECTOR_DisplayPort && -radeon_dp_getsinktype (radeon_connector) == -CONNECTOR_OBJECT_ID_DISPLAYPORT ) + sink_type ==CONNECTOR_OBJECT_ID_DISPLAYPORT ) radeon_encoder->audio = rdev->audio.dp_funcs;else radeon_encoder->audio = rdev->audio.hdmi_funcs; dig->afmt->pin =radeon_audio_get_pin (connector->encoder); -if (drm_detect_monitor_audio (radeon_connector_edid (connector))) { -radeon_audio_enable (rdev, dig->afmt->pin,0xf ); - }else { -radeon_audio_enable (rdev, dig->afmt->pin,0 ); - dig->afmt->pin =NULL ; - } +radeon_audio_enable (rdev, dig->afmt->pin,0xf ); }else {radeon_audio_enable (rdev, dig->afmt->pin,0 ); dig->afmt->pin =NULL ;
drivers/gpu/drm/radeon/radeon_connectors.c +2 -6
@@ -1333,10 +1333,8 @@ out:/* updated in get modes as well since we need to know if it's analog or digital */ radeon_connector_update_scratch_regs (connector, ret); -if (radeon_audio !=0 ) { -radeon_connector_get_edid (connector); +if (radeon_audio !=0 )radeon_audio_detect (connector, ret); - } exit:pm_runtime_mark_last_busy (connector->dev->dev);
@@ -1661,10 +1659,8 @@ radeon_dp_detect(struct drm_connector *connector, bool force)radeon_connector_update_scratch_regs (connector, ret); -if (radeon_audio !=0 ) { -radeon_connector_get_edid (connector); +if (radeon_audio !=0 )radeon_audio_detect (connector, ret); - } out:pm_runtime_mark_last_busy (connector->dev->dev);
drivers/gpu/drm/radeon/si.c +1 -1
@@ -4288,7 +4288,7 @@ static int si_pcie_gart_enable(struct radeon_device *rdev)/* empty context1-15 */ /* set vm size, must be a multiple of 4 */ WREG32 (VM_CONTEXT1_PAGE_TABLE_START_ADDR ,0 ); -WREG32 (VM_CONTEXT1_PAGE_TABLE_END_ADDR , rdev->vm_manager.max_pfn); +WREG32 (VM_CONTEXT1_PAGE_TABLE_END_ADDR , rdev->vm_manager.max_pfn -1 );/* Assign the pt base to something valid for now; the pts used for * the VMs are determined by the application and setup and assigned * on the fly in the vm part of radeon_gart.c
drivers/hid/hid-logitech-hidpp.c +0 -20
@@ -39,7 +39,6 @@ MODULE_AUTHOR("Nestor Lopez Casado <[email protected]>");/* bits 1..20 are reserved for classes */ #define HIDPP_QUIRK_DELAYED_INIT BIT(21)#define HIDPP_QUIRK_WTP_PHYSICAL_BUTTONS BIT(22) -#define HIDPP_QUIRK_MULTI_INPUT BIT(23)/* * There are two hidpp protocols in use, the first version hidpp10 is known
@@ -701,12 +700,6 @@ static int wtp_input_mapping(struct hid_device *hdev, struct hid_input *hi, struct hid_field *field, struct hid_usage *usage, unsigned long **bit, int *max) { - struct hidpp_device *hidpp = hid_get_drvdata(hdev); - -if ((hidpp->quirks &HIDPP_QUIRK_MULTI_INPUT ) && - (field->application ==HID_GD_KEYBOARD )) -return 0 ; - return -1; }
@@ -715,10 +708,6 @@ static void wtp_populate_input(struct hidpp_device *hidpp, {struct wtp_data *wd = hidpp->private_data; -if ((hidpp->quirks &HIDPP_QUIRK_MULTI_INPUT ) && origin_is_hid_core) -/* this is the generic hid-input call */ -return ; -__set_bit (EV_ABS , input_dev->evbit);__set_bit (EV_KEY , input_dev->evbit);__clear_bit (EV_REL , input_dev->evbit);
@@ -1234,10 +1223,6 @@ static int hidpp_probe(struct hid_device *hdev, const struct hid_device_id *id)if (hidpp->quirks &HIDPP_QUIRK_DELAYED_INIT ) connect_mask &= ~HID_CONNECT_HIDINPUT ; -/* Re-enable hidinput for multi-input devices */ -if (hidpp->quirks &HIDPP_QUIRK_MULTI_INPUT ) - connect_mask |=HID_CONNECT_HIDINPUT ; - ret =hid_hw_start (hdev, connect_mask);if (ret) {hid_err (hdev,"%s:hid_hw_start returned error\n" , __func__);
@@ -1285,11 +1270,6 @@ static const struct hid_device_id hidpp_devices[] = {HID_BLUETOOTH_DEVICE (USB_VENDOR_ID_LOGITECH , USB_DEVICE_ID_LOGITECH_T651), .driver_data = HIDPP_QUIRK_CLASS_WTP }, - {/* Keyboard TK820 */ -HID_DEVICE (BUS_USB ,HID_GROUP_LOGITECH_DJ_DEVICE , - USB_VENDOR_ID_LOGITECH, 0x4102), - .driver_data =HIDPP_QUIRK_DELAYED_INIT |HIDPP_QUIRK_MULTI_INPUT | - HIDPP_QUIRK_CLASS_WTP }, { HID_DEVICE(BUS_USB, HID_GROUP_LOGITECH_DJ_DEVICE, USB_VENDOR_ID_LOGITECH, HID_ANY_ID)},
drivers/hwmon/nct6683.c +2 -0
@@ -439,6 +439,7 @@ nct6683_create_attr_group(struct device *dev, struct sensor_template_group *tg, (*t)->dev_attr.attr.name, tg->base + i);if ((*t)->s2) { a2 = &su->u.a2; +sysfs_attr_init (&a2->dev_attr.attr); a2->dev_attr.attr.name = su->name; a2->nr = (*t)->u.s.nr + i; a2->index = (*t)->u.s.index;
@@ -449,6 +450,7 @@ nct6683_create_attr_group(struct device *dev, struct sensor_template_group *tg, *attrs = &a2->dev_attr.attr; }else { a = &su->u.a1; +sysfs_attr_init (&a->dev_attr.attr); a->dev_attr.attr.name = su->name; a->index = (*t)->u.index + i; a->dev_attr.attr.mode =
drivers/hwmon/nct6775.c +2 -0
@@ -994,6 +994,7 @@ nct6775_create_attr_group(struct device *dev, struct sensor_template_group *tg, (*t)->dev_attr.attr.name, tg->base + i);if ((*t)->s2) { a2 = &su->u.a2; +sysfs_attr_init (&a2->dev_attr.attr); a2->dev_attr.attr.name = su->name; a2->nr = (*t)->u.s.nr + i; a2->index = (*t)->u.s.index;
@@ -1004,6 +1005,7 @@ nct6775_create_attr_group(struct device *dev, struct sensor_template_group *tg, *attrs = &a2->dev_attr.attr; }else { a = &su->u.a1; +sysfs_attr_init (&a->dev_attr.attr); a->dev_attr.attr.name = su->name; a->index = (*t)->u.index + i; a->dev_attr.attr.mode =
drivers/hwmon/ntc_thermistor.c +9 -0
@@ -239,8 +239,10 @@ static struct ntc_thermistor_platform_data * ntc_thermistor_parse_dt(struct platform_device *pdev) {struct iio_channel *chan; +enum iio_chan_type type;struct device_node *np = pdev->dev.of_node;struct ntc_thermistor_platform_data *pdata; +int ret;if (!np)return NULL ;
@@ -253,6 +255,13 @@ ntc_thermistor_parse_dt(struct platform_device *pdev)if (IS_ERR (chan))return ERR_CAST (chan); + ret =iio_get_channel_type (chan, &type); +if (ret <0 ) +return ERR_PTR (ret); + +if (type !=IIO_VOLTAGE ) +return ERR_PTR (-EINVAL ); +if (of_property_read_u32 (np,"pullup-uv" , &pdata->pullup_uv))return ERR_PTR (-ENODEV );if (of_property_read_u32 (np,"pullup-ohm" , &pdata->pullup_ohm))
drivers/hwmon/tmp401.c +1 -1
@@ -44,7 +44,7 @@#include <linux/sysfs.h> /* Addresses to scan */ -static const unsigned short normal_i2c[] = {0x37 ,0x48 ,0x49 ,0x4a ,0x4c ,0x4d , +static const unsigned short normal_i2c[] = {0x48 ,0x49 ,0x4a ,0x4c ,0x4d ,0x4e ,0x4f ,I2C_CLIENT_END };enum chips { tmp401, tmp411, tmp431, tmp432, tmp435 };
drivers/iio/accel/st_accel_core.c +1 -0
@@ -465,6 +465,7 @@ int st_accel_common_probe(struct iio_dev *indio_dev) indio_dev->modes =INDIO_DIRECT_MODE ; indio_dev->info = &accel_info; +mutex_init (&adata->tb.buf_lock);st_sensors_power_enable (indio_dev);
drivers/iio/adc/axp288_adc.c +6 -6
@@ -53,39 +53,42 @@ static const struct iio_chan_spec const axp288_adc_channels[] = { .channel = 0, .address = AXP288_TS_ADC_H, .datasheet_name = "TS_PIN", + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), }, { .indexed = 1, .type = IIO_TEMP, .channel = 1, .address = AXP288_PMIC_ADC_H, .datasheet_name = "PMIC_TEMP", + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), }, { .indexed = 1, .type = IIO_TEMP, .channel = 2, .address = AXP288_GP_ADC_H, .datasheet_name = "GPADC", + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), }, { .indexed = 1, .type = IIO_CURRENT, .channel = 3, .address = AXP20X_BATT_CHRG_I_H, .datasheet_name = "BATT_CHG_I", - .info_mask_separate = BIT(IIO_CHAN_INFO_PROCESSED), + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), }, { .indexed = 1, .type = IIO_CURRENT, .channel = 4, .address = AXP20X_BATT_DISCHRG_I_H, .datasheet_name = "BATT_DISCHRG_I", - .info_mask_separate = BIT(IIO_CHAN_INFO_PROCESSED), + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), }, { .indexed = 1, .type = IIO_VOLTAGE, .channel = 5, .address = AXP20X_BATT_V_H, .datasheet_name = "BATT_V", - .info_mask_separate = BIT(IIO_CHAN_INFO_PROCESSED), + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), }, };
@@ -151,9 +154,6 @@ static int axp288_adc_read_raw(struct iio_dev *indio_dev, chan->address))dev_err (&indio_dev->dev,"TS pin restore\n" );break ; -case IIO_CHAN_INFO_PROCESSED : - ret =axp288_adc_read_channel (val, chan->address, info->regmap); -break ;default : ret = -EINVAL ; }
drivers/iio/adc/cc10001_adc.c +34 -26
163 lines not on this page · raw message
drivers/iio/adc/qcom-spmi-vadc.c +4 -3
@@ -18,6 +18,7 @@#include <linux/iio/iio.h> #include <linux/interrupt.h> #include <linux/kernel.h> +#include <linux/math64.h> #include <linux/module.h> #include <linux/of.h> #include <linux/platform_device.h>
@@ -471,11 +472,11 @@ static s32 vadc_calibrate(struct vadc_priv *vadc, const struct vadc_channel_prop *prop, u16 adc_code) {const struct vadc_prescale_ratio *prescale; -s32 voltage; +s64 voltage; voltage = adc_code - vadc->graph[prop->calibration].gnd; voltage *= vadc->graph[prop->calibration].dx; - voltage = voltage / vadc->graph[prop->calibration].dy; + voltage =div64_s64 (voltage, vadc->graph[prop->calibration].dy);if (prop->calibration ==VADC_CALIB_ABSOLUTE ) voltage += vadc->graph[prop->calibration].dx;
@@ -487,7 +488,7 @@ static s32 vadc_calibrate(struct vadc_priv *vadc, voltage = voltage * prescale->den; -return voltage / prescale->num; +return div64_s64 (voltage, prescale->num); }static int vadc_decimation_from_dt (u32 value)
drivers/iio/adc/xilinx-xadc-core.c +3 -2
@@ -856,6 +856,7 @@ static int xadc_read_raw(struct iio_dev *indio_dev,switch (chan->address) {case XADC_REG_VCCINT :case XADC_REG_VCCAUX : +case XADC_REG_VREFP :case XADC_REG_VCCBRAM :case XADC_REG_VCCPINT :case XADC_REG_VCCPAUX :
@@ -996,7 +997,7 @@ static const struct iio_event_spec xadc_voltage_events[] = { .num_event_specs = (_alarm) ? ARRAY_SIZE(xadc_voltage_events) : 0, \ .scan_index = (_scan_index), \ .scan_type = { \ - .sign = 'u', \ + .sign = ((_addr) == XADC_REG_VREFN) ? 's' : 'u', \ .realbits = 12, \ .storagebits = 16, \ .shift = 4, \
@@ -1008,7 +1009,7 @@ static const struct iio_event_spec xadc_voltage_events[] = {static const struct iio_chan_spec xadc_channels[] = {XADC_CHAN_TEMP (0 ,8 ,XADC_REG_TEMP ),XADC_CHAN_VOLTAGE (0 ,9 ,XADC_REG_VCCINT ,"vccint" , true), -XADC_CHAN_VOLTAGE (1 ,10 ,XADC_REG_VCCINT ,"vccaux" , true), +XADC_CHAN_VOLTAGE (1 ,10 ,XADC_REG_VCCAUX ,"vccaux" , true),XADC_CHAN_VOLTAGE (2 ,14 ,XADC_REG_VCCBRAM ,"vccbram" , true),XADC_CHAN_VOLTAGE (3 ,5 ,XADC_REG_VCCPINT ,"vccpint" , true),XADC_CHAN_VOLTAGE (4 ,6 ,XADC_REG_VCCPAUX ,"vccpaux" , true),
drivers/iio/adc/xilinx-xadc.h +3 -3
@@ -145,9 +145,9 @@ static inline int xadc_write_adc_reg(struct xadc *xadc, unsigned int reg,#define XADC_REG_MAX_VCCPINT 0x28#define XADC_REG_MAX_VCCPAUX 0x29#define XADC_REG_MAX_VCCO_DDR 0x2a -#define XADC_REG_MIN_VCCPINT 0x2b -#define XADC_REG_MIN_VCCPAUX 0x2c -#define XADC_REG_MIN_VCCO_DDR 0x2d +#define XADC_REG_MIN_VCCPINT 0x2c +#define XADC_REG_MIN_VCCPAUX 0x2d +#define XADC_REG_MIN_VCCO_DDR 0x2e#define XADC_REG_CONF0 0x40#define XADC_REG_CONF1 0x41
drivers/iio/common/st_sensors/st_sensors_core.c +0 -2
@@ -304,8 +304,6 @@ int st_sensors_init_sensor(struct iio_dev *indio_dev,struct st_sensors_platform_data *of_pdata;int err =0 ; -mutex_init (&sdata->tb.buf_lock); -/* If OF/DT pdata exists, it will take precedence of anything else */ of_pdata =st_sensors_of_probe (indio_dev->dev.parent, pdata);if (of_pdata)
drivers/iio/gyro/st_gyro_core.c +1 -0
@@ -317,6 +317,7 @@ int st_gyro_common_probe(struct iio_dev *indio_dev) indio_dev->modes =INDIO_DIRECT_MODE ; indio_dev->info = &gyro_info; +mutex_init (&gdata->tb.buf_lock);st_sensors_power_enable (indio_dev);
drivers/iio/light/hid-sensor-prox.c +0 -2
@@ -43,8 +43,6 @@ struct prox_state {static const struct iio_chan_spec prox_channels[] = { { .type =IIO_PROXIMITY , - .modified =1 , - .channel2 =IIO_NO_MOD , .info_mask_separate =BIT (IIO_CHAN_INFO_RAW ), .info_mask_shared_by_type =BIT (IIO_CHAN_INFO_OFFSET ) | BIT(IIO_CHAN_INFO_SCALE) |
drivers/iio/magnetometer/st_magn_core.c +1 -0
@@ -369,6 +369,7 @@ int st_magn_common_probe(struct iio_dev *indio_dev) indio_dev->modes =INDIO_DIRECT_MODE ; indio_dev->info = &magn_info; +mutex_init (&mdata->tb.buf_lock);st_sensors_power_enable (indio_dev);
drivers/iio/pressure/hid-sensor-press.c +0 -2
@@ -47,8 +47,6 @@ struct press_state {static const struct iio_chan_spec press_channels[] = { { .type =IIO_PRESSURE , - .modified =1 , - .channel2 =IIO_NO_MOD , .info_mask_separate =BIT (IIO_CHAN_INFO_RAW ), .info_mask_shared_by_type =BIT (IIO_CHAN_INFO_OFFSET ) | BIT(IIO_CHAN_INFO_SCALE) |
drivers/iio/pressure/st_pressure_core.c +1 -0
@@ -417,6 +417,7 @@ int st_press_common_probe(struct iio_dev *indio_dev) indio_dev->modes =INDIO_DIRECT_MODE ; indio_dev->info = &press_info; +mutex_init (&press_data->tb.buf_lock);st_sensors_power_enable (indio_dev);
drivers/infiniband/core/iwpm_msg.c +1 -1
@@ -33,7 +33,7 @@#include "iwpm_util.h" -static const char iwpm_ulib_name[] ="iWarpPortMapperUser" ; +static const char iwpm_ulib_name[IWPM_ULIBNAME_SIZE ] ="iWarpPortMapperUser" ;static int iwpm_ulib_version =3 ;static int iwpm_user_pid =IWPM_PID_UNDEFINED ;static atomic_t echo_nlmsg_seq;
drivers/input/mouse/elantech.c +1 -1
@@ -315,7 +315,7 @@ static void elantech_report_semi_mt_data(struct input_dev *dev, unsigned int x2, unsigned int y2) { elantech_set_slot(dev, 0, num_fingers != 0, x1, y1); -elantech_set_slot (dev,1 , num_fingers ==2 , x2, y2); +elantech_set_slot (dev,1 , num_fingers >=2 , x2, y2); }/*
drivers/iommu/amd_iommu_v2.c +1 -0
@@ -266,6 +266,7 @@ static void put_pasid_state(struct pasid_state *pasid_state)static void put_pasid_state_wait (struct pasid_state *pasid_state) { +atomic_dec (&pasid_state->count);wait_event (pasid_state->wq, !atomic_read (&pasid_state->count));free_pasid_state (pasid_state); }
drivers/iommu/arm-smmu.c +2 -28
@@ -224,14 +224,7 @@#define RESUME_TERMINATE (1 << 0)#define TTBCR2_SEP_SHIFT 15 -#define TTBCR2_SEP_MASK 0x7 - -#define TTBCR2_ADDR_32 0 -#define TTBCR2_ADDR_36 1 -#define TTBCR2_ADDR_40 2 -#define TTBCR2_ADDR_42 3 -#define TTBCR2_ADDR_44 4 -#define TTBCR2_ADDR_48 5 +#define TTBCR2_SEP_UPSTREAM (0x7 << TTBCR2_SEP_SHIFT)#define TTBRn_HI_ASID_SHIFT 16
@@ -783,26 +776,7 @@ static void arm_smmu_init_context_bank(struct arm_smmu_domain *smmu_domain,writel_relaxed (reg, cb_base +ARM_SMMU_CB_TTBCR );if (smmu->version >ARM_SMMU_V1 ) { reg = pgtbl_cfg->arm_lpae_s1_cfg.tcr >>32 ; -switch (smmu->va_size) { -case 32 : - reg |= (TTBCR2_ADDR_32 <<TTBCR2_SEP_SHIFT ); -break ; -case 36 : - reg |= (TTBCR2_ADDR_36 <<TTBCR2_SEP_SHIFT ); -break ; -case 40 : - reg |= (TTBCR2_ADDR_40 <<TTBCR2_SEP_SHIFT ); -break ; -case 42 : - reg |= (TTBCR2_ADDR_42 <<TTBCR2_SEP_SHIFT ); -break ; -case 44 : - reg |= (TTBCR2_ADDR_44 <<TTBCR2_SEP_SHIFT ); -break ; -case 48 : - reg |= (TTBCR2_ADDR_48 <<TTBCR2_SEP_SHIFT ); -break ; - } + reg |=TTBCR2_SEP_UPSTREAM ;writel_relaxed (reg, cb_base +ARM_SMMU_CB_TTBCR2 ); } }else {
drivers/lguest/core.c +1 -1
@@ -173,7 +173,7 @@ static void unmap_switcher(void)bool lguest_address_ok (const struct lguest *lg,unsigned long addr,unsigned long len) { -return (addr+len) /PAGE_SIZE < lg->pfn_limit && (addr+len >= addr); +return addr+len <= lg->pfn_limit *PAGE_SIZE && (addr+len >= addr); }/*
drivers/md/dm-table.c +9 -7
@@ -823,6 +823,12 @@ void dm_consume_args(struct dm_arg_set *as, unsigned num_args) }EXPORT_SYMBOL (dm_consume_args); +static bool __table_type_request_based (unsigned table_type) +{ +return (table_type ==DM_TYPE_REQUEST_BASED || + table_type ==DM_TYPE_MQ_REQUEST_BASED ); +} +static int dm_table_set_type (struct dm_table *t) {unsigned i;
@@ -855,8 +861,7 @@ static int dm_table_set_type(struct dm_table *t)* Determine the type from the live device. * Default to bio-based if device is new. */ -if (live_md_type ==DM_TYPE_REQUEST_BASED || - live_md_type ==DM_TYPE_MQ_REQUEST_BASED ) +if (__table_type_request_based (live_md_type)) request_based =1 ;else bio_based =1 ;
@@ -906,7 +911,7 @@ static int dm_table_set_type(struct dm_table *t) } t->type =DM_TYPE_MQ_REQUEST_BASED ; - }else if (hybrid &&list_empty (devices) && live_md_type !=DM_TYPE_NONE ) { + }else if (list_empty (devices) &&__table_type_request_based (live_md_type)) {/* inherit live MD type */ t->type = live_md_type;
@@ -928,10 +933,7 @@ struct target_type *dm_table_get_immutable_target_type(struct dm_table *t)bool dm_table_request_based (struct dm_table *t) { -unsigned table_type =dm_table_get_type (t); - -return (table_type ==DM_TYPE_REQUEST_BASED || - table_type ==DM_TYPE_MQ_REQUEST_BASED ); +return __table_type_request_based (dm_table_get_type (t)); }bool dm_table_mq_request_based (struct dm_table *t)
drivers/md/dm.c +12 -5
@@ -1642,8 +1642,7 @@ static int dm_merge_bvec(struct request_queue *q,struct mapped_device *md = q->queuedata;struct dm_table *map =dm_get_live_table_fast (md);struct dm_target *ti; -sector_t max_sectors; -int max_size =0 ; +sector_t max_sectors, max_size =0 ;if (unlikely (!map)) goto out;
@@ -1658,8 +1657,16 @@ static int dm_merge_bvec(struct request_queue *q, max_sectors =min (max_io_len (bvm->bi_sector, ti), (sector_t )queue_max_sectors (q)); max_size = (max_sectors <<SECTOR_SHIFT ) - bvm->bi_size; -if (unlikely (max_size <0 ))/* this shouldn't _ever_ happen */ - max_size =0 ; + +/* +* FIXME: this stop-gap fix _must_ be cleaned up (by passing a sector_t +* to the targets' merge function since it holds sectors not bytes). +* Just doing this as an interim fix for stable@ because the more +* comprehensive cleanup of switching to sector_t will impact every +* DM target that implements a ->merge hook. +*/ +if (max_size >INT_MAX ) + max_size =INT_MAX ;/* * merge_bvec_fn() returns number of bytes
@@ -1667,7 +1674,7 @@ static int dm_merge_bvec(struct request_queue *q,* max is precomputed maximal io size */ if (max_size && ti->type->merge) - max_size = ti->type->merge (ti, bvm, biovec, max_size); + max_size = ti->type->merge (ti, bvm, biovec, (int ) max_size);/* * If the target doesn't support merge method and some of the devices * provided their merge_bvec method (we know this by looking for the
drivers/md/md.c +8 -6
@@ -4138,12 +4138,12 @@ action_store(struct mddev *mddev, const char *page, size_t len)if (!mddev->pers || !mddev->pers->sync_request)return -EINVAL ; -if (cmd_match (page,"frozen" )) -set_bit (MD_RECOVERY_FROZEN , &mddev->recovery); -else -clear_bit (MD_RECOVERY_FROZEN , &mddev->recovery);if (cmd_match (page,"idle" ) ||cmd_match (page,"frozen" )) { +if (cmd_match (page,"frozen" )) +set_bit (MD_RECOVERY_FROZEN , &mddev->recovery); +else +clear_bit (MD_RECOVERY_FROZEN , &mddev->recovery);flush_workqueue (md_misc_wq);if (mddev->sync_thread) {set_bit (MD_RECOVERY_INTR , &mddev->recovery);
@@ -4156,16 +4156,17 @@ action_store(struct mddev *mddev, const char *page, size_t len) test_bit(MD_RECOVERY_NEEDED, &mddev->recovery))return -EBUSY ; else if (cmd_match(page, "resync")) - set_bit(MD_RECOVERY_NEEDED, &mddev->recovery); + clear_bit(MD_RECOVERY_FROZEN, &mddev->recovery); else if (cmd_match(page, "recover")) { +clear_bit (MD_RECOVERY_FROZEN , &mddev->recovery);set_bit (MD_RECOVERY_RECOVER , &mddev->recovery); -set_bit (MD_RECOVERY_NEEDED , &mddev->recovery); } else if (cmd_match(page, "reshape")) {int err;if (mddev->pers->start_reshape ==NULL )return -EINVAL ; err =mddev_lock (mddev);if (!err) { +clear_bit (MD_RECOVERY_FROZEN , &mddev->recovery); err = mddev->pers->start_reshape (mddev);mddev_unlock (mddev); }
@@ -4177,6 +4178,7 @@ action_store(struct mddev *mddev, const char *page, size_t len)set_bit (MD_RECOVERY_CHECK , &mddev->recovery); else if (!cmd_match(page, "repair"))return -EINVAL ; +clear_bit (MD_RECOVERY_FROZEN , &mddev->recovery);set_bit (MD_RECOVERY_REQUESTED , &mddev->recovery);set_bit (MD_RECOVERY_SYNC , &mddev->recovery); }
drivers/md/raid0.c +3 -1
@@ -517,6 +517,9 @@ static void raid0_make_request(struct mddev *mddev, struct bio *bio) ? (sector & (chunk_sects-1 )) : sector_div(sector, chunk_sects)); +/* Restore due to sector_div */ + sector = bio->bi_iter.bi_sector; +if (sectors <bio_sectors (bio)) { split =bio_split (bio, sectors,GFP_NOIO , fs_bio_set);bio_chain (split, bio);
@@ -524,7 +527,6 @@ static void raid0_make_request(struct mddev *mddev, struct bio *bio) split = bio; } - sector = bio->bi_iter.bi_sector; zone =find_zone (mddev->private, §or); tmp_dev =map_sector (mddev, zone, sector, §or); split->bi_bdev = tmp_dev->bdev;
drivers/md/raid5.c +2 -1
@@ -1933,7 +1933,8 @@ static int resize_stripes(struct r5conf *conf, int newsize) conf->slab_cache = sc; conf->active_name =1 -conf->active_name; - conf->pool_size = newsize; +if (!err) + conf->pool_size = newsize;return err; }
drivers/mfd/da9052-core.c +4 -4
@@ -433,6 +433,10 @@ EXPORT_SYMBOL_GPL(da9052_adc_read_temp);static const struct mfd_cell da9052_subdev_info[] = { { .name ="da9052-regulator" , + .id =0 , + }, + { + .name ="da9052-regulator" , .id =1 , }, {
@@ -484,10 +488,6 @@ static const struct mfd_cell da9052_subdev_info[] = { .id = 13, }, { - .name = "da9052-regulator", - .id = 14, - }, - { .name = "da9052-onkey", }, {
drivers/mmc/host/atmel-mci.c +7 -2
@@ -1304,7 +1304,7 @@ static void atmci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)if (ios->clock) {unsigned int clock_min = ~0U ; -u32 clkdiv; +int clkdiv;spin_lock_bh (&host->lock);if (!host->mode_reg) {
@@ -1328,7 +1328,12 @@ static void atmci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)/* Calculate clock divider */ if (host->caps.has_odd_clk_div) { clkdiv =DIV_ROUND_UP (host->bus_hz, clock_min) -2 ; -if (clkdiv >511 ) { +if (clkdiv <0 ) { +dev_warn (&mmc->class_dev, +"clock %u too fast; using %lu\n" , + clock_min, host->bus_hz /2 ); + clkdiv =0 ; + }else if (clkdiv >511 ) {dev_warn (&mmc->class_dev,"clock %u too slow; using %lu\n" , clock_min, host->bus_hz / (511 +2 ));
drivers/mtd/ubi/block.c +2 -0
@@ -310,6 +310,8 @@ static void ubiblock_do_work(struct work_struct *work)blk_rq_map_sg (req->q, req, pdu->usgl.sg); ret =ubiblock_read (pdu); +rq_flush_dcache_pages (req); +blk_mq_end_request (req, ret); }
drivers/net/wireless/brcm80211/brcmfmac/msgbuf.c +5 -7
@@ -512,11 +512,9 @@ static int brcmf_msgbuf_query_dcmd(struct brcmf_pub *drvr, int ifidx, msgbuf->rx_pktids, msgbuf->ioctl_resp_pktid);if (msgbuf->ioctl_resp_ret_len !=0 ) { -if (!skb) { -brcmf_err ("Invalid packet id idx recv'd %d\n" , - msgbuf->ioctl_resp_pktid); +if (!skb)return -EBADF ; - } +memcpy (buf, skb->data, (len < msgbuf->ioctl_resp_ret_len) ? len : msgbuf->ioctl_resp_ret_len); }
@@ -875,10 +873,8 @@ brcmf_msgbuf_process_txstatus(struct brcmf_msgbuf *msgbuf, void *buf) flowid -=BRCMF_NROF_H2D_COMMON_MSGRINGS ; skb =brcmf_msgbuf_get_pktid (msgbuf->drvr->bus_if->dev, msgbuf->tx_pktids, idx); -if (!skb) { -brcmf_err ("Invalid packet id idx recv'd %d\n" , idx); +if (!skb)return ; - }set_bit (flowid, msgbuf->txstatus_done_map); commonring = msgbuf->flowrings[flowid];
@@ -1157,6 +1153,8 @@ brcmf_msgbuf_process_rx_complete(struct brcmf_msgbuf *msgbuf, void *buf) skb =brcmf_msgbuf_get_pktid (msgbuf->drvr->bus_if->dev, msgbuf->rx_pktids, idx); +if (!skb) +return ;if (data_offset)skb_pull (skb, data_offset);
drivers/net/wireless/iwlwifi/mvm/d3.c +8 -5
@@ -1742,8 +1742,10 @@ static void iwl_mvm_query_netdetect_reasons(struct iwl_mvm *mvm,int i, j, n_matches, ret; fw_status =iwl_mvm_get_wakeup_status (mvm, vif); -if (!IS_ERR_OR_NULL (fw_status)) +if (!IS_ERR_OR_NULL (fw_status)) { reasons =le32_to_cpu (fw_status->wakeup_reasons); +kfree (fw_status); + }if (reasons &IWL_WOWLAN_WAKEUP_BY_RFKILL_DEASSERTED ) wakeup.rfkill_release = true;
@@ -1860,15 +1862,15 @@ static int __iwl_mvm_resume(struct iwl_mvm *mvm, bool test)/* get the BSS vif pointer again */ vif =iwl_mvm_get_bss_vif (mvm);if (IS_ERR_OR_NULL (vif)) - goto out_unlock; + goto err; ret =iwl_trans_d3_resume (mvm->trans, &d3_status, test);if (ret) - goto out_unlock; + goto err;if (d3_status !=IWL_D3_STATUS_ALIVE ) {IWL_INFO (mvm,"Device was reset during suspend\n" ); - goto out_unlock; + goto err; }/* query SRAM first in case we want event logging */
@@ -1886,7 +1888,8 @@ static int __iwl_mvm_resume(struct iwl_mvm *mvm, bool test)/* has unlocked the mutex, so skip that */ goto out; - out_unlock: +err: +iwl_mvm_free_nd (mvm);mutex_unlock (&mvm->mutex); out:
drivers/net/wireless/iwlwifi/pcie/trans.c +6 -5
@@ -5,8 +5,8 @@* * GPL LICENSE SUMMARY * -* Copyright(c) 2007 - 2014 Intel Corporation. All rights reserved. -* Copyright(c) 2013 - 2014 Intel Mobile Communications GmbH +* Copyright(c) 2007 - 2015 Intel Corporation. All rights reserved. +* Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as
@@ -31,8 +31,8 @@* * BSD LICENSE * -* Copyright(c) 2005 - 2014 Intel Corporation. All rights reserved. -* Copyright(c) 2013 - 2014 Intel Mobile Communications GmbH +* Copyright(c) 2005 - 2015 Intel Corporation. All rights reserved. +* Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH * All rights reserved. * * Redistribution and use in source and binary forms, with or without
@@ -104,7 +104,7 @@ static void iwl_pcie_free_fw_monitor(struct iwl_trans *trans)static void iwl_pcie_alloc_fw_monitor (struct iwl_trans *trans) {struct iwl_trans_pcie *trans_pcie =IWL_TRANS_GET_PCIE_TRANS (trans); -struct page *page; +struct page *page =NULL ;dma_addr_t phys;u32 size;u8 power;
@@ -131,6 +131,7 @@ static void iwl_pcie_alloc_fw_monitor(struct iwl_trans *trans) DMA_FROM_DEVICE);if (dma_mapping_error (trans->dev, phys)) {__free_pages (page, order); + page =NULL ;continue ; } IWL_INFO(trans,
drivers/net/wireless/rt2x00/rt2800usb.c +1 -0
@@ -1040,6 +1040,7 @@ static struct usb_device_id rt2800usb_device_table[] = { { USB_DEVICE(0x07d1, 0x3c17) }, { USB_DEVICE(0x2001, 0x3317) }, { USB_DEVICE(0x2001, 0x3c1b) }, + { USB_DEVICE(0x2001, 0x3c25) },/* Draytek */ { USB_DEVICE(0x07fa, 0x7712) },/* DVICO */
drivers/net/wireless/rtlwifi/usb.c +1 -1
@@ -126,7 +126,7 @@ static int _usbctrl_vendorreq_sync_read(struct usb_device *udev, u8 request, do { status = usb_control_msg(udev, pipe, request, reqtype, value, - index, pdata, len, 0); /*max. timeout*/ + index, pdata, len, 1000); if (status < 0) { /* firmware download is checksumed, don't retry */ if ((value >= FW_8192C_START_ADDRESS &&
drivers/power/reset/at91-reset.c +2 -2
@@ -212,9 +212,9 @@ static int at91_reset_platform_probe(struct platform_device *pdev) res =platform_get_resource (pdev,IORESOURCE_MEM , idx +1 ); at91_ramc_base[idx] =devm_ioremap (&pdev->dev, res->start,resource_size (res)); -if (IS_ERR (at91_ramc_base[idx])) { +if (!at91_ramc_base[idx]) {dev_err (&pdev->dev,"Could not map ram controller address\n" ); -return PTR_ERR (at91_ramc_base[idx]); +return -ENOMEM ; } }
drivers/pwm/pwm-img.c +64 -12
142 lines not on this page · raw message
drivers/regulator/da9052-regulator.c +3 -2
@@ -394,6 +394,7 @@ static inline struct da9052_regulator_info *find_regulator_info(u8 chip_id,static int da9052_regulator_probe (struct platform_device *pdev) { +const struct mfd_cell *cell =mfd_get_cell (pdev);struct regulator_config config = { };struct da9052_regulator *regulator;struct da9052 *da9052;
@@ -409,7 +410,7 @@ static int da9052_regulator_probe(struct platform_device *pdev) regulator->da9052 = da9052; regulator->info =find_regulator_info (regulator->da9052->chip_id, - pdev->id); + cell->id);if (regulator->info ==NULL ) {dev_err (&pdev->dev,"invalid regulator ID specified\n" );return -EINVAL ;
@@ -419,7 +420,7 @@ static int da9052_regulator_probe(struct platform_device *pdev) config.driver_data = regulator; config.regmap = da9052->regmap;if (pdata && pdata->regulators) { - config.init_data = pdata->regulators[pdev->id]; + config.init_data = pdata->regulators[cell->id]; }else {#ifdef CONFIG_OF struct device_node *nproot = da9052->dev->of_node;
drivers/scsi/sd.c +5 -14
@@ -1624,6 +1624,7 @@ static unsigned int sd_completed_bytes(struct scsi_cmnd *scmd) {u64 start_lba =blk_rq_pos (scmd->request);u64 end_lba =blk_rq_pos (scmd->request) + (scsi_bufflen (scmd) /512 ); +u64 factor = scmd->device->sector_size /512 ;u64 bad_lba;int info_valid;/*
@@ -1645,16 +1646,9 @@ static unsigned int sd_completed_bytes(struct scsi_cmnd *scmd)if (scsi_bufflen (scmd) <= scmd->device->sector_size)return 0 ; -if (scmd->device->sector_size <512 ) { -/* only legitimate sector_size here is 256 */ - start_lba <<=1 ; - end_lba <<=1 ; - }else { -/* be careful ... don't want any overflows */ -unsigned int factor = scmd->device->sector_size /512 ; -do_div (start_lba, factor); -do_div (end_lba, factor); - } +/* be careful ... don't want any overflows */ +do_div (start_lba, factor); +do_div (end_lba, factor);/* The bad lba was reported incorrectly, we have no idea where * the error is.
@@ -2212,8 +2206,7 @@ got_data:if (sector_size !=512 && sector_size !=1024 && sector_size !=2048 && - sector_size !=4096 && - sector_size !=256 ) { + sector_size !=4096 ) {sd_printk (KERN_NOTICE , sdkp,"Unsupported sector size %d.\n" , sector_size);/*
@@ -2268,8 +2261,6 @@ got_data: sdkp->capacity <<=2 ; else if (sector_size == 1024) sdkp->capacity <<= 1; - else if (sector_size == 256) - sdkp->capacity >>= 1; blk_queue_physical_block_size(sdp->request_queue, sdkp->physical_block_size);
drivers/scsi/storvsc_drv.c +1 -2
@@ -1565,8 +1565,7 @@ static int storvsc_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *scmnd)break ;default : vm_srb->data_in =UNKNOWN_TYPE ; - vm_srb->win8_extension.srb_flags |= (SRB_FLAGS_DATA_IN | -SRB_FLAGS_DATA_OUT ); + vm_srb->win8_extension.srb_flags |=SRB_FLAGS_NO_DATA_TRANSFER ;break ; }
drivers/staging/gdm724x/gdm_mux.c +7 -9
@@ -158,7 +158,7 @@ static int up_to_host(struct mux_rx *r)unsigned int start_flag;unsigned int payload_size;unsigned short packet_type; -int dummy_cnt; +int total_len;u32 packet_size_sum = r->offset;int index;int ret =TO_HOST_INVALID_PACKET ;
@@ -176,10 +176,10 @@ static int up_to_host(struct mux_rx *r)break ; } - dummy_cnt =ALIGN (MUX_HEADER_SIZE + payload_size,4 ); + total_len =ALIGN (MUX_HEADER_SIZE + payload_size,4 );if (len - packet_size_sum < -MUX_HEADER_SIZE + payload_size + dummy_cnt) { + total_len) {pr_err ("invalid payload : %d %d %04x\n" , payload_size, len, packet_type);break ;
@@ -202,7 +202,7 @@ static int up_to_host(struct mux_rx *r)break ; } - packet_size_sum +=MUX_HEADER_SIZE + payload_size + dummy_cnt; + packet_size_sum += total_len;if (len - packet_size_sum <=MUX_HEADER_SIZE +2 ) { ret = r->callback(NULL, 0,
@@ -361,7 +361,6 @@ static int gdm_mux_send(void *priv_dev, void *data, int len, int tty_index,struct mux_pkt_header *mux_header;struct mux_tx *t =NULL ;static u32 seq_num =1 ; -int dummy_cnt;int total_len;int ret;unsigned long flags;
@@ -374,9 +373,7 @@ static int gdm_mux_send(void *priv_dev, void *data, int len, int tty_index,spin_lock_irqsave (&mux_dev->write_lock, flags); - dummy_cnt =ALIGN (MUX_HEADER_SIZE + len,4 ); - - total_len = len +MUX_HEADER_SIZE + dummy_cnt; + total_len =ALIGN (MUX_HEADER_SIZE + len,4 ); t =alloc_mux_tx (total_len);if (!t) {
@@ -392,7 +389,8 @@ static int gdm_mux_send(void *priv_dev, void *data, int len, int tty_index, mux_header->packet_type =__cpu_to_le16 (packet_type[tty_index]);memcpy (t->buf+MUX_HEADER_SIZE , data, len); -memset (t->buf+MUX_HEADER_SIZE +len,0 , dummy_cnt); +memset (t->buf+MUX_HEADER_SIZE +len,0 , total_len -MUX_HEADER_SIZE - + len); t->len = total_len; t->callback = cb;
drivers/staging/vt6655/device_main.c +24 -16
@@ -911,7 +911,11 @@ static int vnt_int_report_rate(struct vnt_private *priv,if (!(tsr1 &TSR1_TERR )) { info->status.rates[0 ].idx = idx; - info->flags |=IEEE80211_TX_STAT_ACK ; + +if (info->flags &IEEE80211_TX_CTL_NO_ACK ) + info->flags |=IEEE80211_TX_STAT_NOACK_TRANSMITTED ; +else + info->flags |=IEEE80211_TX_STAT_ACK ; }return 0 ;
@@ -936,9 +940,6 @@ static int device_tx_srv(struct vnt_private *pDevice, unsigned int uIdx)//Only the status of first TD in the chain is correct if (pTD->m_td1TD1.byTCR &TCR_STP ) {if ((pTD->pTDInfo->byFlags &TD_FLAGS_NETIF_SKB ) !=0 ) { - -vnt_int_report_rate (pDevice, pTD->pTDInfo, byTsr0, byTsr1); -if (!(byTsr1 &TSR1_TERR )) {if (byTsr0 !=0 ) { pr_debug(" Tx[%d] OK but has error. tsr1[%02X] tsr0[%02X]\n",
@@ -957,6 +958,9 @@ static int device_tx_srv(struct vnt_private *pDevice, unsigned int uIdx) (int)uIdx, byTsr1, byTsr0); } } + +vnt_int_report_rate (pDevice, pTD->pTDInfo, byTsr0, byTsr1); +device_free_tx_buf (pDevice, pTD); pDevice->iTDUsed[uIdx]--; }
@@ -988,10 +992,8 @@ static void device_free_tx_buf(struct vnt_private *pDevice, PSTxDesc pDesc) PCI_DMA_TODEVICE); } -if (pTDInfo->byFlags &TD_FLAGS_NETIF_SKB ) +if (skb)ieee80211_tx_status_irqsafe (pDevice->hw, skb); -else -dev_kfree_skb_irq (skb); pTDInfo->skb_dma =0 ; pTDInfo->skb =NULL ;
@@ -1201,14 +1203,6 @@ static int vnt_tx_packet(struct vnt_private *priv, struct sk_buff *skb)if (dma_idx ==TYPE_AC0DMA ) head_td->pTDInfo->byFlags =TD_FLAGS_NETIF_SKB ; - priv->iTDUsed[dma_idx]++; - -/* Take ownership */ -wmb (); - head_td->m_td0TD0.f1Owner =OWNED_BY_NIC ; - -/* get Next */ -wmb (); priv->apCurrTD[dma_idx] = head_td->next;spin_unlock_irqrestore (&priv->lock, flags);
@@ -1229,11 +1223,18 @@ static int vnt_tx_packet(struct vnt_private *priv, struct sk_buff *skb) head_td->buff_addr =cpu_to_le32 (head_td->pTDInfo->skb_dma); +/* Poll Transmit the adapter */ +wmb (); + head_td->m_td0TD0.f1Owner =OWNED_BY_NIC ; +wmb ();/* second memory barrier */ +if (head_td->pTDInfo->byFlags &TD_FLAGS_NETIF_SKB )MACvTransmitAC0 (priv->PortOffset);else MACvTransmit0 (priv->PortOffset); + priv->iTDUsed[dma_idx]++; +spin_unlock_irqrestore (&priv->lock, flags);return 0 ;
@@ -1413,9 +1414,16 @@ static void vnt_bss_info_changed(struct ieee80211_hw *hw, priv->current_aid = conf->aid; -if (changed &BSS_CHANGED_BSSID ) +if (changed &BSS_CHANGED_BSSID ) { +unsigned long flags; + +spin_lock_irqsave (&priv->lock, flags); +MACvWriteBSSIDAddress (priv->PortOffset, (u8 *)conf->bssid); +spin_unlock_irqrestore (&priv->lock, flags); + } +if (changed &BSS_CHANGED_BASIC_RATES ) { priv->basic_rates = conf->basic_rates;
drivers/staging/vt6656/rxtx.c +11 -3
@@ -805,10 +805,18 @@ int vnt_tx_packet(struct vnt_private *priv, struct sk_buff *skb)vnt_schedule_command (priv,WLAN_CMD_SETPOWER ); } -if (current_rate >RATE_11M ) - pkt_type = priv->packet_type; -else +if (current_rate >RATE_11M ) { +if (info->band ==IEEE80211_BAND_5GHZ ) { + pkt_type =PK_TYPE_11A ; + }else { +if (tx_rate->flags &IEEE80211_TX_RC_USE_CTS_PROTECT ) + pkt_type =PK_TYPE_11GB ; +else + pkt_type =PK_TYPE_11GA ; + } + }else { pkt_type =PK_TYPE_11B ; + }spin_lock_irqsave (&priv->lock, flags);
drivers/target/target_core_pscsi.c +3 -0
@@ -521,6 +521,7 @@ static int pscsi_configure_device(struct se_device *dev) " pdv_host_id: %d\n", pdv->pdv_host_id);return -EINVAL ; } + pdv->pdv_lld_host = sh; } }else {if (phv->phv_mode ==PHV_VIRTUAL_HOST_ID ) {
@@ -603,6 +604,8 @@ static void pscsi_free_device(struct se_device *dev)if ((phv->phv_mode ==PHV_LLD_SCSI_HOST_NO ) && (phv->phv_lld_host !=NULL ))scsi_host_put (phv->phv_lld_host); +else if (pdv->pdv_lld_host) +scsi_host_put (pdv->pdv_lld_host);if ((sd->type ==TYPE_DISK ) || (sd->type ==TYPE_ROM ))scsi_device_put (sd);
drivers/target/target_core_pscsi.h +1 -0
@@ -45,6 +45,7 @@ struct pscsi_dev_virt {int pdv_lun_id;struct block_device *pdv_bd;struct scsi_device *pdv_sd; +struct Scsi_Host *pdv_lld_host; }____cacheline_aligned ; typedef enum phv_modes {
drivers/thermal/armada_thermal.c +3 -3
@@ -224,9 +224,9 @@ static const struct armada_thermal_data armada380_data = { .is_valid_shift = 10, .temp_shift = 0, .temp_mask = 0x3ff, - .coef_b = 1169498786UL, - .coef_m = 2000000UL, - .coef_div = 4289, + .coef_b = 2931108200UL, + .coef_m = 5000000UL, + .coef_div = 10502, .inverted = true, };
drivers/tty/hvc/hvc_xen.c +1 -1
@@ -289,7 +289,7 @@ static int xen_initial_domain_console_init(void)return -ENOMEM ; } - info->irq =bind_virq_to_irq (VIRQ_CONSOLE ,0 ); + info->irq =bind_virq_to_irq (VIRQ_CONSOLE ,0 , false); info->vtermno =HVC_COOKIE ;spin_lock (&xencons_lock);
drivers/tty/n_gsm.c +2 -3
@@ -3170,7 +3170,7 @@ static int gsmtty_break_ctl(struct tty_struct *tty, int state)return gsmtty_modem_update (dlci, encode); } -static void gsmtty_remove (struct tty_driver *driver,struct tty_struct *tty) +static void gsmtty_cleanup (struct tty_struct *tty) {struct gsm_dlci *dlci = tty->driver_data;struct gsm_mux *gsm = dlci->gsm;
@@ -3178,7 +3178,6 @@ static void gsmtty_remove(struct tty_driver *driver, struct tty_struct *tty)dlci_put (dlci);dlci_put (gsm->dlci[0 ]);mux_put (gsm); - driver->ttys[tty->index] =NULL ; }/* Virtual ttys for the demux */
@@ -3199,7 +3198,7 @@ static const struct tty_operations gsmtty_ops = { .tiocmget = gsmtty_tiocmget, .tiocmset = gsmtty_tiocmset, .break_ctl = gsmtty_break_ctl, - .remove = gsmtty_remove, + .cleanup = gsmtty_cleanup, };
drivers/tty/n_hdlc.c +2 -2
@@ -600,7 +600,7 @@ static ssize_t n_hdlc_tty_read(struct tty_struct *tty, struct file *file,add_wait_queue (&tty->read_wait, &wait);for (;;) { -if (test_bit (TTY_OTHER_CLOSED , &tty->flags)) { +if (test_bit (TTY_OTHER_DONE , &tty->flags)) { ret = -EIO ;break ; }
@@ -828,7 +828,7 @@ static unsigned int n_hdlc_tty_poll(struct tty_struct *tty, struct file *filp,/* set bits for operations that won't block */ if (n_hdlc->rx_buf_list.head) mask |=POLLIN |POLLRDNORM ;/* readable */ -if (test_bit (TTY_OTHER_CLOSED , &tty->flags)) +if (test_bit (TTY_OTHER_DONE , &tty->flags)) mask |=POLLHUP ;if (tty_hung_up_p (filp)) mask |=POLLHUP ;
drivers/tty/n_tty.c +18 -4
@@ -1949,6 +1949,18 @@ static inline int input_available_p(struct tty_struct *tty, int poll)return ldata->commit_head - ldata->read_tail >= amt; } +static inline int check_other_done (struct tty_struct *tty) +{ +int done =test_bit (TTY_OTHER_DONE , &tty->flags); +if (done) { +/* paired with cmpxchg() in check_other_closed(); ensures +* read buffer head index is not stale +*/ +smp_mb__after_atomic (); + } +return done; +} +/** * copy_from_read_buf - copy read data directly * @tty: terminal device
@@ -2167,7 +2179,7 @@ static ssize_t n_tty_read(struct tty_struct *tty, struct file *file,struct n_tty_data *ldata = tty->disc_data;unsigned char __user *b = buf;DEFINE_WAIT_FUNC (wait, woken_wake_function); -int c; +int c, done;int minimum, time;ssize_t retval =0 ;long timeout;
@@ -2235,8 +2247,10 @@ static ssize_t n_tty_read(struct tty_struct *tty, struct file *file, ((minimum - (b - buf)) >= 1)) ldata->minimum_to_wake = (minimum - (b - buf)); + done =check_other_done (tty); +if (!input_available_p (tty,0 )) { -if (test_bit (TTY_OTHER_CLOSED , &tty->flags)) { +if (done) { retval = -EIO ;break ; }
@@ -2443,12 +2457,12 @@ static unsigned int n_tty_poll(struct tty_struct *tty, struct file *file,poll_wait (file, &tty->read_wait, wait);poll_wait (file, &tty->write_wait, wait); +if (check_other_done (tty)) + mask |=POLLHUP ;if (input_available_p (tty,1 )) mask |=POLLIN |POLLRDNORM ;if (tty->packet && tty->link->ctrl_status) mask |=POLLPRI |POLLIN |POLLRDNORM ; -if (test_bit (TTY_OTHER_CLOSED , &tty->flags)) - mask |=POLLHUP ;if (tty_hung_up_p (file)) mask |=POLLHUP ;if (!(mask & (POLLHUP |POLLIN |POLLRDNORM ))) {
drivers/tty/pty.c +3 -2
@@ -53,9 +53,8 @@ static void pty_close(struct tty_struct *tty, struct file *filp)/* Review - krefs on tty_link ?? */ if (!tty->link)return ; -tty_flush_to_ldisc (tty->link);set_bit (TTY_OTHER_CLOSED , &tty->link->flags); -wake_up_interruptible (&tty->link->read_wait); +tty_flip_buffer_push (tty->link->port);wake_up_interruptible (&tty->link->write_wait);if (tty->driver->subtype ==PTY_TYPE_MASTER ) {set_bit (TTY_OTHER_CLOSED , &tty->flags);
@@ -243,7 +242,9 @@ static int pty_open(struct tty_struct *tty, struct file *filp) goto out;clear_bit (TTY_IO_ERROR , &tty->flags); +/* TTY_OTHER_CLOSED must be cleared before TTY_OTHER_DONE */ clear_bit (TTY_OTHER_CLOSED , &tty->link->flags); +clear_bit (TTY_OTHER_DONE , &tty->link->flags);set_bit (TTY_THROTTLED , &tty->flags);return 0 ;
drivers/tty/tty_buffer.c +27 -14
66 lines not on this page · raw message
drivers/usb/gadget/configfs.c +1 -0
@@ -1295,6 +1295,7 @@ static void purge_configs_funcs(struct gadget_info *gi) } } c->next_interface_id =0 ; +memset (c->interface,0 ,sizeof (c->interface)); c->superspeed =0 ; c->highspeed =0 ; c->fullspeed =0 ;
drivers/usb/host/xhci-ring.c +6 -1
@@ -2026,8 +2026,13 @@ static int process_isoc_td(struct xhci_hcd *xhci, struct xhci_td *td,break ;case COMP_DEV_ERR :case COMP_STALL : + frame->status = -EPROTO ; + skip_td = true; +break ;case COMP_TX_ERR : frame->status = -EPROTO ; +if (event_trb != td->last_trb) +return 0 ; skip_td = true;break ;case COMP_STOP :
@@ -2640,7 +2645,7 @@ irqreturn_t xhci_irq(struct usb_hcd *hcd)xhci_halt (xhci); hw_died:spin_unlock (&xhci->lock); -return -ESHUTDOWN ; +return IRQ_HANDLED ; }/*
drivers/usb/host/xhci.h +1 -1
@@ -1267,7 +1267,7 @@ union xhci_trb {* since the command ring is 64-byte aligned. * It must also be greater than 16. */ -#define TRBS_PER_SEGMENT 64 +#define TRBS_PER_SEGMENT 256/* Allow two commands + a link TRB, along with any reserved command TRBs */ #define MAX_RSVD_CMD_TRBS (TRBS_PER_SEGMENT - 3)#define TRB_SEGMENT_SIZE (TRBS_PER_SEGMENT*16)
drivers/usb/serial/cp210x.c +1 -0
@@ -127,6 +127,7 @@ static const struct usb_device_id id_table[] = { { USB_DEVICE(0x10C4, 0x88A5) }, /* Planet Innovation Ingeni ZigBee USB Device */ { USB_DEVICE(0x10C4, 0x8946) }, /* Ketra N1 Wireless Interface */ { USB_DEVICE(0x10C4, 0x8977) }, /* CEL MeshWorks DevKit Device */ + { USB_DEVICE(0x10C4, 0x8998) }, /* KCF Technologies PRN */ { USB_DEVICE(0x10C4, 0xEA60) }, /* Silicon Labs factory default */ { USB_DEVICE(0x10C4, 0xEA61) }, /* Silicon Labs factory default */ { USB_DEVICE(0x10C4, 0xEA70) }, /* Silicon Labs factory default */
drivers/usb/serial/pl2303.c +0 -1
@@ -61,7 +61,6 @@ static const struct usb_device_id id_table[] = { { USB_DEVICE(DCU10_VENDOR_ID, DCU10_PRODUCT_ID) }, { USB_DEVICE(SITECOM_VENDOR_ID, SITECOM_PRODUCT_ID) }, { USB_DEVICE(ALCATEL_VENDOR_ID, ALCATEL_PRODUCT_ID) }, - { USB_DEVICE(SAMSUNG_VENDOR_ID, SAMSUNG_PRODUCT_ID) }, { USB_DEVICE(SIEMENS_VENDOR_ID, SIEMENS_PRODUCT_ID_SX1), .driver_info = PL2303_QUIRK_UART_STATE_IDX0 }, { USB_DEVICE(SIEMENS_VENDOR_ID, SIEMENS_PRODUCT_ID_X65),
drivers/usb/serial/pl2303.h +0 -4
@@ -62,10 +62,6 @@#define ALCATEL_VENDOR_ID 0x11f7#define ALCATEL_PRODUCT_ID 0x02df -/* Samsung I330 phone cradle */ -#define SAMSUNG_VENDOR_ID 0x04e8 -#define SAMSUNG_PRODUCT_ID 0x8001 -#define SIEMENS_VENDOR_ID 0x11f5#define SIEMENS_PRODUCT_ID_SX1 0x0001#define SIEMENS_PRODUCT_ID_X65 0x0003
drivers/usb/serial/visor.c +1 -1
@@ -95,7 +95,7 @@ static const struct usb_device_id id_table[] = { .driver_info = (kernel_ulong_t)&palm_os_4_probe }, { USB_DEVICE(ACER_VENDOR_ID, ACER_S10_ID), .driver_info = (kernel_ulong_t)&palm_os_4_probe }, - { USB_DEVICE(SAMSUNG_VENDOR_ID, SAMSUNG_SCH_I330_ID), + { USB_DEVICE_INTERFACE_CLASS(SAMSUNG_VENDOR_ID, SAMSUNG_SCH_I330_ID, 0xff), .driver_info = (kernel_ulong_t)&palm_os_4_probe }, { USB_DEVICE(SAMSUNG_VENDOR_ID, SAMSUNG_SPH_I500_ID), .driver_info = (kernel_ulong_t)&palm_os_4_probe },
drivers/usb/storage/unusual_devs.h +7 -0
@@ -766,6 +766,13 @@ UNUSUAL_DEV( 0x059f, 0x0643, 0x0000, 0x0000, USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_GO_SLOW ), +/* Reported by Christian Schaller <[email protected]> */ +UNUSUAL_DEV (0x059f ,0x0651 ,0x0000 ,0x0000 , +"LaCie" , +"External HDD" , +USB_SC_DEVICE ,USB_PR_DEVICE ,NULL , + US_FL_NO_WP_DETECT ), +/* Submitted by Joel Bourquard <[email protected]> * Some versions of this device need the SubClass and Protocol overrides * while others don't.
drivers/xen/events/events_base.c +8 -4
@@ -957,7 +957,7 @@ unsigned xen_evtchn_nr_channels(void) }EXPORT_SYMBOL_GPL (xen_evtchn_nr_channels); -int bind_virq_to_irq (unsigned int virq,unsigned int cpu) +int bind_virq_to_irq (unsigned int virq,unsigned int cpu,bool percpu) {struct evtchn_bind_virq bind_virq;int evtchn, irq, ret;
@@ -971,8 +971,12 @@ int bind_virq_to_irq(unsigned int virq, unsigned int cpu)if (irq <0 ) goto out; -irq_set_chip_and_handler_name (irq, &xen_percpu_chip, - handle_percpu_irq,"virq" ); +if (percpu) +irq_set_chip_and_handler_name (irq, &xen_percpu_chip, + handle_percpu_irq,"virq" ); +else +irq_set_chip_and_handler_name (irq, &xen_dynamic_chip, + handle_edge_irq,"virq" ); bind_virq.virq = virq; bind_virq.vcpu = cpu;
@@ -1062,7 +1066,7 @@ int bind_virq_to_irqhandler(unsigned int virq, unsigned int cpu, {int irq, retval; - irq =bind_virq_to_irq (virq, cpu); + irq =bind_virq_to_irq (virq, cpu, irqflags &IRQF_PERCPU );if (irq <0 )return irq; retval =request_irq (irq, handler, irqflags, devname, dev_id);
fs/binfmt_elf.c +1 -1
@@ -928,7 +928,7 @@ static int load_elf_binary(struct linux_binprm *bprm) total_size =total_mapping_size (elf_phdata, loc->elf_ex.e_phnum);if (!total_size) { - error = -EINVAL ; + retval = -EINVAL ; goto out_free_dentry; } }
fs/btrfs/extent-tree.c +2 -0
@@ -8548,7 +8548,9 @@ int btrfs_set_block_group_ro(struct btrfs_root *root, out:if (cache->flags &BTRFS_BLOCK_GROUP_SYSTEM ) { alloc_flags =update_block_group_flags (root, cache->flags); +lock_chunks (root->fs_info->chunk_root);check_system_chunk (trans, root, alloc_flags); +unlock_chunks (root->fs_info->chunk_root); }btrfs_end_transaction (trans, root);
fs/btrfs/volumes.c +1 -0
@@ -4626,6 +4626,7 @@ int btrfs_alloc_chunk(struct btrfs_trans_handle *trans, {u64 chunk_offset; +ASSERT (mutex_is_locked (&extent_root->fs_info->chunk_mutex)); chunk_offset =find_next_chunk (extent_root->fs_info);return __btrfs_alloc_chunk (trans, extent_root, chunk_offset, type); }
fs/dcache.c +4 -4
@@ -1205,13 +1205,13 @@ ascend:/* might go back up the wrong parent if we have had a rename. */ if (need_seqretry (&rename_lock, seq)) goto rename_retry; - next = child->d_child.next; -while (unlikely (child->d_flags &DCACHE_DENTRY_KILLED )) { +/* go into the first sibling still alive */ +do { + next = child->d_child.next;if (next == &this_parent->d_subdirs) goto ascend; child = list_entry(next, struct dentry, d_child); - next = next->next; - } + }while (unlikely (child->d_flags &DCACHE_DENTRY_KILLED ));rcu_read_unlock (); goto resume; }
fs/exec.c +3 -0
@@ -659,6 +659,9 @@ int setup_arg_pages(struct linux_binprm *bprm,if (stack_base >STACK_SIZE_MAX ) stack_base =STACK_SIZE_MAX ; +/* Add space for stack randomization. */ + stack_base += (STACK_RND_MASK <<PAGE_SHIFT ); +/* Make sure we didn't let the argument array grow too large. */ if (vma->vm_end - vma->vm_start > stack_base)return -ENOMEM ;
fs/ext4/ext4_jbd2.c +6 -0
@@ -87,6 +87,12 @@ int __ext4_journal_stop(const char *where, unsigned int line, handle_t *handle)ext4_put_nojournal (handle);return 0 ; } + +if (!handle->h_transaction) { + err =jbd2_journal_stop (handle); +return handle->h_err ? handle->h_err : err; + } + sb = handle->h_transaction->t_journal->j_private; err = handle->h_err; rc =jbd2_journal_stop (handle);
fs/ext4/extents.c +1 -1
@@ -377,7 +377,7 @@ static int ext4_valid_extent(struct inode *inode, struct ext4_extent *ext)ext4_lblk_t lblock =le32_to_cpu (ext->ee_block);ext4_lblk_t last = lblock + len -1 ; -if (lblock > last) +if (len ==0 || lblock > last)return 0 ;return ext4_data_block_valid (EXT4_SB (inode->i_sb), block, len); }
fs/ext4/inode.c +1 -1
@@ -4233,7 +4233,7 @@ static void ext4_update_other_inodes_time(struct super_block *sb,int inode_size =EXT4_INODE_SIZE (sb); oi.orig_ino = orig_ino; - ino = orig_ino & ~(inodes_per_block -1 ); + ino = (orig_ino & ~(inodes_per_block -1 )) +1 ;for (i =0 ; i < inodes_per_block; i++, ino++, buf += inode_size) {if (ino == orig_ino)continue ;
fs/fhandle.c +3 -2
@@ -195,8 +195,9 @@ static int handle_to_path(int mountdirfd, struct file_handle __user *ufh, goto out_err; }/* copy the full handle */ -if (copy_from_user (handle, ufh, -sizeof (struct file_handle ) + + *handle = f_handle; +if (copy_from_user (&handle->f_handle, + &ufh->f_handle, f_handle.handle_bytes)) { retval = -EFAULT ; goto out_handle;
fs/fs_pin.c +2 -2
@@ -9,8 +9,8 @@ static DEFINE_SPINLOCK(pin_lock);void pin_remove (struct fs_pin *pin) {spin_lock (&pin_lock); -hlist_del (&pin->m_list); -hlist_del (&pin->s_list); +hlist_del_init (&pin->m_list); +hlist_del_init (&pin->s_list);spin_unlock (&pin_lock);spin_lock_irq (&pin->wait.lock); pin->done =1 ;
fs/jbd2/recovery.c +9 -1
@@ -842,15 +842,23 @@ static int scan_revoke_records(journal_t *journal, struct buffer_head *bh, {jbd2_journal_revoke_header_t *header;int offset, max; +int csum_size =0 ; +__u32 rcount;int record_len =4 ; header = (jbd2_journal_revoke_header_t *) bh->b_data; offset =sizeof (jbd2_journal_revoke_header_t); - max =be32_to_cpu (header->r_count); + rcount =be32_to_cpu (header->r_count);if (!jbd2_revoke_block_csum_verify (journal, header))return -EINVAL ; +if (jbd2_journal_has_csum_v2or3 (journal)) + csum_size =sizeof (struct jbd2_journal_revoke_tail ); +if (rcount > journal->j_blocksize - csum_size) +return -EINVAL ; + max = rcount; +if (JBD2_HAS_INCOMPAT_FEATURE (journal,JBD2_FEATURE_INCOMPAT_64BIT )) record_len =8 ;
fs/jbd2/revoke.c +10 -8
@@ -577,7 +577,7 @@ static void write_one_revoke_record(journal_t *journal, {int csum_size =0 ;struct buffer_head *descriptor; -int offset; +int sz, offset;journal_header_t *header;/* If we are already aborting, this all becomes a noop. We
@@ -594,9 +594,14 @@ static void write_one_revoke_record(journal_t *journal,if (jbd2_journal_has_csum_v2or3 (journal)) csum_size =sizeof (struct jbd2_journal_revoke_tail ); +if (JBD2_HAS_INCOMPAT_FEATURE (journal,JBD2_FEATURE_INCOMPAT_64BIT )) + sz =8 ; +else + sz =4 ; +/* Make sure we have a descriptor with space left for the record */ if (descriptor) { -if (offset >= journal->j_blocksize - csum_size) { +if (offset + sz > journal->j_blocksize - csum_size) {flush_descriptor (journal, descriptor, offset, write_op); descriptor =NULL ; }
@@ -619,16 +624,13 @@ static void write_one_revoke_record(journal_t *journal, *descriptorp = descriptor; } -if (JBD2_HAS_INCOMPAT_FEATURE (journal,JBD2_FEATURE_INCOMPAT_64BIT )) { +if (JBD2_HAS_INCOMPAT_FEATURE (journal,JBD2_FEATURE_INCOMPAT_64BIT )) * ((__be64 *)(&descriptor->b_data[offset])) =cpu_to_be64 (record->blocknr); - offset +=8 ; - - }else { +else * ((__be32 *)(&descriptor->b_data[offset])) =cpu_to_be32 (record->blocknr); - offset +=4 ; - } + offset += sz; *offsetp = offset; }
fs/jbd2/transaction.c +16 -9
@@ -551,7 +551,6 @@ int jbd2_journal_extend(handle_t *handle, int nblocks)int result;int wanted; -WARN_ON (!transaction);if (is_handle_aborted (handle))return -EROFS ; journal = transaction->t_journal;
@@ -627,7 +626,6 @@ int jbd2__journal_restart(handle_t *handle, int nblocks, gfp_t gfp_mask)tid_t tid;int need_to_start, ret; -WARN_ON (!transaction);/* If we've had an abort of any type, don't even think about * actually doing the restart! */ if (is_handle_aborted (handle))
@@ -785,7 +783,6 @@ do_get_write_access(handle_t *handle, struct journal_head *jh,int need_copy =0 ;unsigned long start_lock, time_lock; -WARN_ON (!transaction);if (is_handle_aborted (handle))return -EROFS ; journal = transaction->t_journal;
@@ -1051,7 +1048,6 @@ int jbd2_journal_get_create_access(handle_t *handle, struct buffer_head *bh)int err;jbd_debug (5 ,"journal_head %p\n" , jh); -WARN_ON (!transaction); err = -EROFS ;if (is_handle_aborted (handle)) goto out;
@@ -1266,7 +1262,6 @@ int jbd2_journal_dirty_metadata(handle_t *handle, struct buffer_head *bh)struct journal_head *jh;int ret =0 ; -WARN_ON (!transaction);if (is_handle_aborted (handle))return -EROFS ; journal = transaction->t_journal;
@@ -1397,7 +1392,6 @@ int jbd2_journal_forget (handle_t *handle, struct buffer_head *bh)int err =0 ;int was_modified =0 ; -WARN_ON (!transaction);if (is_handle_aborted (handle))return -EROFS ; journal = transaction->t_journal;
@@ -1530,8 +1524,22 @@ int jbd2_journal_stop(handle_t *handle)tid_t tid;pid_t pid; -if (!transaction) - goto free_and_exit; +if (!transaction) { +/* +* Handle is already detached from the transaction so +* there is nothing to do other than decrease a refcount, +* or free the handle if refcount drops to zero +*/ +if (--handle->h_ref >0 ) { +jbd_debug (4 ,"h_ref %d -> %d\n" , handle->h_ref +1 , + handle->h_ref); +return err; + }else { +if (handle->h_rsv_handle) +jbd2_free_handle (handle->h_rsv_handle); + goto free_and_exit; + } + } journal = transaction->t_journal;J_ASSERT (journal_current_handle () == handle);
@@ -2373,7 +2381,6 @@ int jbd2_journal_file_inode(handle_t *handle, struct jbd2_inode *jinode)transaction_t *transaction = handle->h_transaction;journal_t *journal; -WARN_ON (!transaction);if (is_handle_aborted (handle))return -EROFS ; journal = transaction->t_journal;
fs/kernfs/dir.c +8 -1
@@ -518,7 +518,14 @@ static struct kernfs_node *__kernfs_new_node(struct kernfs_root *root,if (!kn) goto err_out1; - ret =ida_simple_get (&root->ino_ida,1 ,0 ,GFP_KERNEL ); +/* +* If the ino of the sysfs entry created for a kmem cache gets +* allocated from an ida layer, which is accounted to the memcg that +* owns the cache, the memcg will get pinned forever. So do not account +* ino ida allocations. +*/ + ret =ida_simple_get (&root->ino_ida,1 ,0 , +GFP_KERNEL | __GFP_NOACCOUNT);if (ret <0 ) goto err_out2; kn->ino = ret;
fs/namespace.c +5 -2
@@ -1709,8 +1709,11 @@ struct vfsmount *collect_mounts(struct path *path) {struct mount *tree;namespace_lock (); - tree =copy_tree (real_mount (path->mnt), path->dentry, -CL_COPY_ALL |CL_PRIVATE ); +if (!check_mnt (real_mount (path->mnt))) + tree =ERR_PTR (-EINVAL ); +else + tree =copy_tree (real_mount (path->mnt), path->dentry, +CL_COPY_ALL |CL_PRIVATE );namespace_unlock ();if (IS_ERR (tree))return ERR_CAST (tree);
fs/nfsd/blocklayout.c +11 -0
@@ -181,6 +181,17 @@ nfsd4_block_proc_layoutcommit(struct inode *inode, }const struct nfsd4_layout_ops bl_layout_ops = { +/* +* Pretend that we send notification to the client. This is a blatant +* lie to force recent Linux clients to cache our device IDs. +* We rarely ever change the device ID, so the harm of leaking deviceids +* for a while isn't too bad. Unfortunately RFC5661 is a complete mess +* in this regard, but I filed errata 4119 for this a while ago, and +* hopefully the Linux client will eventually start caching deviceids +* without this again. +*/ + .notify_types = +NOTIFY_DEVICEID4_DELETE |NOTIFY_DEVICEID4_CHANGE , .proc_getdeviceinfo = nfsd4_block_proc_getdeviceinfo, .encode_getdeviceinfo = nfsd4_block_encode_getdeviceinfo, .proc_layoutget = nfsd4_block_proc_layoutget,
fs/nfsd/nfs4state.c +11 -10
@@ -4386,10 +4386,17 @@ static __be32 check_stateid_generation(stateid_t *in, stateid_t *ref, bool has_sreturn nfserr_old_stateid; } +static __be32 nfsd4_check_openowner_confirmed (struct nfs4_ol_stateid *ols) +{ +if (ols->st_stateowner->so_is_open_owner && + !(openowner (ols->st_stateowner)->oo_flags &NFS4_OO_CONFIRMED )) +return nfserr_bad_stateid; +return nfs_ok; +} +static __be32 nfsd4_validate_stateid (struct nfs4_client *cl,stateid_t *stateid) {struct nfs4_stid *s; -struct nfs4_ol_stateid *ols;__be32 status = nfserr_bad_stateid;if (ZERO_STATEID (stateid) ||ONE_STATEID (stateid))
@@ -4419,13 +4426,7 @@ static __be32 nfsd4_validate_stateid(struct nfs4_client *cl, stateid_t *stateid)break ;case NFS4_OPEN_STID :case NFS4_LOCK_STID : - ols =openlockstateid (s); -if (ols->st_stateowner->so_is_open_owner - && !(openowner (ols->st_stateowner)->oo_flags - &NFS4_OO_CONFIRMED )) - status = nfserr_bad_stateid; -else - status = nfs_ok; + status =nfsd4_check_openowner_confirmed (openlockstateid (s));break ;default :printk ("unknown stateid type %x\n" , s->sc_type);
@@ -4517,8 +4518,8 @@ nfs4_preprocess_stateid_op(struct net *net, struct nfsd4_compound_state *cstate, status =nfs4_check_fh (current_fh, stp);if (status) goto out;
Lines of this file are not shown. View the raw message.
fs/xfs/xfs_attr_inactive.c +49 -34
83 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.