Linux 4.20.1
Greg KH
maintainerI'm announcing the release of the 4.20.1 kernel.
All users of the 4.20 kernel series must upgrade.
The updated 4.20.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.20.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/admin-guide/kernel-parameters.txt | 3 Documentation/admin-guide/l1tf.rst | 6 Makefile | 2 arch/arc/Kconfig | 1 arch/arm/boot/dts/exynos5422-odroidxu3-audio.dtsi | 9 arch/arm/boot/dts/exynos5422-odroidxu4.dts | 9 arch/arm64/include/asm/kvm_arm.h | 2 arch/arm64/include/asm/unistd.h | 5 arch/arm64/kernel/sys_compat.c | 11 arch/arm64/kernel/syscall.c | 9 arch/arm64/kvm/hyp/tlb.c | 35 - arch/mips/boot/compressed/calc_vmlinuz_load_addr.c | 7 arch/mips/cavium-octeon/executive/cvmx-helper.c | 3 arch/mips/include/asm/atomic.h | 2 arch/mips/include/asm/cpu-info.h | 2 arch/mips/include/asm/mach-loongson64/mmzone.h | 1 arch/mips/include/asm/mmu.h | 2 arch/mips/include/asm/mmu_context.h | 10 arch/mips/include/asm/mmzone.h | 13 arch/mips/include/asm/pgtable-64.h | 5 arch/mips/include/asm/r4kcache.h | 22 arch/mips/kernel/vdso.c | 4 arch/mips/math-emu/dsemul.c | 38 - arch/mips/mm/c-r3k.c | 2 arch/mips/mm/c-r4k.c | 44 + arch/parisc/mm/init.c | 4 arch/powerpc/kernel/security.c | 2 arch/powerpc/kernel/signal_32.c | 18 arch/powerpc/kernel/signal_64.c | 20 arch/powerpc/kvm/book3s_64_mmu_hv.c | 3 arch/powerpc/kvm/book3s_hv.c | 17 arch/s390/pci/pci_clp.c | 2 arch/x86/include/asm/kvm_host.h | 2 arch/x86/kernel/cpu/bugs.c | 3 arch/x86/kvm/vmx.c | 7 arch/x86/mm/init.c | 2 arch/x86/mm/init_64.c | 6 crypto/cfb.c | 2 crypto/tcrypt.c | 5 crypto/testmgr.c | 7 crypto/testmgr.h | 76 ++ drivers/android/binder.c | 63 ++ drivers/base/platform-msi.c | 6 drivers/char/tpm/tpm-interface.c | 15 drivers/char/tpm/tpm_i2c_nuvoton.c | 11 drivers/clk/rockchip/clk-rk3188.c | 2 drivers/clk/sunxi-ng/ccu_nm.c | 18 drivers/clocksource/Kconfig | 1 drivers/clocksource/arc_timer.c | 22 drivers/crypto/cavium/nitrox/nitrox_algs.c | 12 drivers/crypto/cavium/nitrox/nitrox_lib.c | 22 drivers/crypto/cavium/nitrox/nitrox_req.h | 7 drivers/crypto/chelsio/chcr_ipsec.c | 5 drivers/gpu/drm/i915/i915_gem_execbuffer.c | 1 drivers/gpu/drm/udl/udl_main.c | 7 drivers/gpu/drm/v3d/v3d_debugfs.c | 11 drivers/infiniband/hw/hfi1/verbs.c | 2 drivers/input/mouse/elan_i2c_core.c | 1 drivers/input/touchscreen/atmel_mxt_ts.c | 4 drivers/iommu/arm-smmu-v3.c | 8 drivers/isdn/capi/kcapi.c | 4 drivers/media/cec/cec-adap.c | 27 - drivers/media/cec/cec-pin.c | 5 drivers/media/common/v4l2-tpg/v4l2-tpg-core.c | 2 drivers/media/common/videobuf2/videobuf2-core.c | 3 drivers/media/i2c/imx274.c | 7 drivers/media/i2c/ov5640.c | 17 drivers/media/platform/vim2m.c | 3 drivers/media/platform/vivid/vivid-vid-cap.c | 2 drivers/media/rc/rc-main.c | 6 drivers/media/usb/dvb-usb-v2/usb_urb.c | 5 drivers/media/v4l2-core/v4l2-fwnode.c | 4 drivers/misc/ocxl/config.c | 2 drivers/misc/ocxl/link.c | 2 drivers/mtd/nand/raw/marvell_nand.c | 17 drivers/mtd/nand/raw/nand_jedec.c | 2 drivers/mtd/nand/raw/omap2.c | 2 drivers/mtd/spi-nor/Kconfig | 2 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 14 drivers/net/ethernet/ibm/ibmveth.c | 6 drivers/net/hamradio/6pack.c | 16 drivers/net/tap.c | 3 drivers/net/wan/x25_asy.c | 2 drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 11 drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.h | 2 drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c | 2 drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c | 8 drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 50 + drivers/rtc/rtc-m41t80.c | 2 drivers/spi/spi-bcm2835.c | 16 drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c | 1 drivers/staging/wilc1000/wilc_sdio.c | 1 drivers/tty/serial/xilinx_uartps.c | 4 drivers/usb/Kconfig | 4 drivers/usb/class/cdc-acm.c | 10 drivers/usb/class/cdc-acm.h | 1 drivers/usb/common/Makefile | 1 drivers/usb/common/roles.c | 314 ------------ drivers/usb/dwc2/hcd.h | 2 drivers/usb/dwc2/hcd_queue.c | 19 drivers/usb/dwc2/params.c | 1 drivers/usb/dwc3/dwc3-pci.c | 8 drivers/usb/host/r8a66597-hcd.c | 5 drivers/usb/roles/Kconfig | 13 drivers/usb/roles/Makefile | 4 drivers/usb/roles/class.c | 314 ++++++++++++ drivers/usb/serial/option.c | 4 drivers/usb/serial/pl2303.c | 5 drivers/usb/serial/pl2303.h | 5 fs/btrfs/btrfs_inode.h | 6 fs/btrfs/ctree.c | 29 - fs/btrfs/dev-replace.c | 6 fs/btrfs/extent-tree.c | 4 fs/btrfs/inode.c | 20 fs/btrfs/scrub.c | 35 + fs/btrfs/tree-log.c | 16 fs/cifs/file.c | 12 fs/cifs/smb2maperror.c | 4 fs/cifs/smb2ops.c | 4 fs/ext4/ext4.h | 17 fs/ext4/ialloc.c | 2 fs/ext4/inline.c | 5 fs/ext4/inode.c | 63 +- fs/ext4/ioctl.c | 2 fs/ext4/migrate.c | 36 - fs/ext4/namei.c | 4 fs/ext4/resize.c | 79 +-- fs/ext4/super.c | 55 +- fs/ext4/xattr.c | 83 +-- fs/f2fs/data.c | 4 fs/f2fs/node.c | 4 fs/f2fs/super.c | 13 fs/f2fs/xattr.c | 18 fs/file.c | 29 + include/linux/fdtable.h | 1 include/linux/msi.h | 2 include/linux/ptr_ring.h | 2 include/media/cec.h | 1 include/net/ip_tunnels.h | 20 include/net/sock.h | 38 + include/trace/events/ext4.h | 20 kernel/cgroup/cgroup.c | 29 - kernel/panic.c | 6 net/ax25/af_ax25.c | 11 net/ax25/ax25_dev.c | 2 net/compat.c | 15 net/core/sock.c | 15 net/ieee802154/6lowpan/tx.c | 3 net/ipv4/ip_gre.c | 9 net/ipv4/ip_tunnel.c | 9 net/ipv4/ip_vti.c | 12 net/ipv6/ip6_gre.c | 10 net/ipv6/ip6_tunnel.c | 10 net/ipv6/ip6_vti.c | 8 net/ipv6/ip6mr.c | 17 net/ipv6/sit.c | 3 net/netrom/af_netrom.c | 15 net/packet/af_packet.c | 4 net/sunrpc/svcsock.c | 2 net/tipc/bearer.c | 1 security/keys/keyctl_pkey.c | 2 sound/core/pcm.c | 2 sound/firewire/amdtp-stream-trace.h | 4 sound/firewire/amdtp-stream.c | 4 sound/firewire/fireface/ff-protocol-ff400.c | 2 sound/pci/emu10k1/emufx.c | 5 sound/pci/hda/hda_tegra.c | 2 sound/pci/hda/patch_conexant.c | 1 sound/pci/hda/patch_realtek.c | 3 sound/pci/rme9652/hdsp.c | 10 sound/soc/intel/boards/cht_bsw_max98090_ti.c | 14 sound/synth/emux/emux_hwdep.c | 7 tools/lib/traceevent/event-parse.c | 1 tools/perf/arch/common.c | 10 tools/perf/arch/common.h | 1 tools/perf/builtin-script.c | 12 tools/perf/util/env.c | 2 tools/perf/util/event.c | 29 + tools/perf/util/machine.c | 27 + tools/perf/util/machine.h | 3 tools/perf/util/pmu.c | 8 tools/perf/util/scripting-engines/trace-event-python.c | 16 tools/perf/util/session.c | 4 tools/perf/util/thread.h | 4 virt/kvm/arm/arm.c | 23 virt/kvm/arm/vgic/vgic-mmio.c | 44 - virt/kvm/arm/vgic/vgic.c | 6 187 files changed, 1790 insertions(+), 872 deletions(-)
Aaro Koskinen (1):
MIPS: OCTEON: mark RGMII interface disabled on OCTEON III
Adrian Hunter (4):
perf machine: Record if a arch has a single user/kernel address space perf thread: Add fallback functions for cases where cpumode is insufficient perf tools: Use fallback for sample_addr_correlates_sym() cases perf script: Use fallbacks for branch stacks
Alexey Brodkin (1):
clocksource/drivers/arc_timer: Utilize generic sched_clock
Anand Jain (2):
btrfs: dev-replace: go back to suspended state if target device is missing
btrfs: dev-replace: go back to suspend state if another EXCL_OP is running
Arnaldo Carvalho de Melo (1):
perf env: Also consider env->arch == NULL as local operation
Arnd Bergmann (1):
mtd: atmel-quadspi: disallow building on ebsa110
Atul Gupta (1):
crypto: chcr - small packet Tx stalls the queue
Ben Hutchings (1):
perf pmu: Suppress potential format-truncation warning
Boris Brezillon (2):
mtd: rawnand: Fix JEDEC detection
mtd: rawnand: omap2: Pass the parent of pdev to dma_request_chan()
Breno Leitao (1):
powerpc/tm: Unset MSR[TS] if not recheckpointing
Christoffer Dall (2):
KVM: arm/arm64: vgic-v2: Set active_source to 0 when restoring state
KVM: arm/arm64: Fix VMID alloc race by reverting to lock-less
Colin Ian King (1):
staging: wilc1000: fix missing read_write setting when reading data
Cong Wang (5):
ax25: fix a use-after-free in ax25_fillin_cb()
netrom: fix locking in nr_find_socket() net/wan: fix a double free in x25_asy_open_tty()
ptr_ring: wrap back ->producer in __ptr_ring_swap_queue()
tipc: fix a double free in tipc_enable_bearer()
Dan Carpenter (1):
staging: bcm2835-audio: double free in init error path
Dan Williams (1):
x86/mm: Drop usage of __flush_tlb_all() in kernel_physical_mapping_init()
Deepa Dinamani (1):
sock: Make sock->sk_stamp thread-safe
Diana Craciun (1):
powerpc/fsl: Fix spectre_v2 mitigations reporting
Dmitry Eremin-Solenikov (2):
crypto: testmgr - add AES-CFB tests
crypto: cfb - fix decryption
Eric Anholt (1):
drm/v3d: Skip debugfs dumping GCA on platforms without GCA.
Eric Biggers (1):
KEYS: fix parsing invalid pkey info string
Eric Dumazet (2):
net/hamradio/6pack: use mod_timer() to rearm timers
isdn: fix kernel-infoleak in capi_unlocked_ioctl
Eugeniy Paltsev (1):
DRM: UDL: get rid of useless vblank initialization
Filipe Manana (3):
Btrfs: fix deadlock with memory reclaim during scrub
Btrfs: fix fsync of files with multiple hard links in new directories
Btrfs: send, fix race with transaction commits that create snapshots
Georgy A Bystrenin (1):
CIFS: Fix error mapping for SMB2_LOCK command which caused OFD lock problem
Greg Kroah-Hartman (1):
Linux 4.20.1
Greg Kurz (2):
ocxl: Fix endiannes bug in ocxl_link_update_pe()
ocxl: Fix endiannes bug in read_afu_name()
Gustavo A. R. Silva (5):
ALSA: rme9652: Fix potential Spectre v1 vulnerability
ALSA: emu10k1: Fix potential Spectre v1 vulnerabilities
ALSA: pcm: Fix potential Spectre v1 vulnerability
ALSA: emux: Fix potential Spectre v1 vulnerabilities
KVM: arm/arm64: vgic: Fix off-by-one bug in vgic_get_irq()
Hans Verkuil (6):
media: cec: keep track of outstanding transmits
media: cec-pin: fix broken tx_ignore_nack_until_eom error injection
media: vivid: free bitmap_cap when updating std/timings/etc.
media: vim2m: use cancel_delayed_work_sync instead of flush_schedule_work
media: vb2: check memory model for VIDIOC_CREATE_BUFS
media: v4l2-tpg: array index could become negative
Hans de Goede (2):
ASoC: intel: cht_bsw_max98090_ti: Add pmc_plt_clk_0 quirk for Chromebook Clapper
ASoC: intel: cht_bsw_max98090_ti: Add pmc_plt_clk_0 quirk for Chromebook Gnawty
Heikki Krogerus (1):
usb: roles: Add a description for the class to Kconfig
Helge Deller (1):
parisc: Remap hugepage-aligned pages in set_kernel_text_rw()
Huacai Chen (4):
MIPS: c-r4k: Add r4k_blast_scache_node for Loongson-3
MIPS: Ensure pmd_present() returns false after pmd_mknotpresent()
MIPS: Align kernel load address to 64KB
MIPS: Fix a R10000_LLSC_WAR logic in atomic.h
Ihab Zhaika (1):
iwlwifi: add new cards for 9560, 9462, 9461 and killer series
Ivan Mironov (1):
bnx2x: Fix NULL pointer dereference in bnx2x_del_all_vlans() on some hw
Jacopo Mondi (1):
media: ov5640: Fix set format regression
Jaegeuk Kim (2):
f2fs: fix missing unlock(sbi->gc_mutex)
f2fs: sanity check of xattr entry size
Jernej Skrabec (1):
clk: sunxi-ng: Use u64 for calculation of NM rate
Jia Zhu (1):
f2fs: fix to update new block address correctly for OPU
Jia-Ju Bai (1):
usb: r8a66597: Fix a possible concurrency use-after-free bug in r8a66597_endpoint_disable()
Jian-Hong Pan (1):
ALSA: hda/realtek: Enable the headset mic auto detection for ASUS laptops
Johan Jonker (1):
clk: rockchip: fix typo in rk3188 spdif_frac parent
Josef Bacik (1):
btrfs: run delayed items before dropping the snapshot
Julien Thierry (1):
KVM: arm/arm64: vgic: Do not cond_resched_lock() with IRQs disabled
Jörgen Storvist (1):
USB: serial: option: add Fibocom NL678 series
Linus Torvalds (1):
i915: fix missing user_access_end() in page fault exception case
Long Li (2):
CIFS: return correct errors when pinning memory failed for direct I/O
CIFS: use the correct length when pinning memory for direct I/O for write
Lu Fengqi (1):
btrfs: skip file_extent generation check for free_space_inode in run_delalloc_nocow
Luca Ceresoli (1):
media: imx274: fix stack corruption in imx274_read_reg
Lukas Wunner (4):
spi: bcm2835: Fix race on DMA termination
spi: bcm2835: Fix book-keeping of DMA termination
spi: bcm2835: Avoid finishing transfer prematurely in IRQ mode
spi: bcm2835: Unbreak the build of esoteric configs
Lyude Paul (1):
brcmfmac: Fix out of bounds memory access during fw load
Maciej W. Rozycki (1):
rtc: m41t80: Correct alarm month range with RTC reads
Macpaul Lin (1):
cdc-acm: fix abnormal DATA RX issue for Mediatek Preloader.
Malcolm Priestley (1):
media: dvb-usb-v2: Fix incorrect use of transfer_flags URB_FREE_BUFFER
Mantas Mikulėnas (1):
ALSA: hda: add mute LED support for HP EliteBook 840 G4
Marc Zyngier (3):
arm64: KVM: Make VHE Stage-2 TLB invalidation operations non-interruptible arm/arm64: KVM: vgic: Force VM halt when changing the active state of GICv3 PPIs/SGIs
KVM: arm/arm64: vgic: Cap SPIs to the VM-defined maximum
Martin Blumenstingl (2):
usb: dwc2: disable power_down on Amlogic devices
f2fs: fix validation of the block count in sanity_check_raw_super
Maurizio Lombardi (1):
ext4: missing unlock/put_page() in ext4_try_to_write_inline_data()
Michael J. Ruhl (1):
IB/hfi1: Incorrect sizing of sge for PIO will OOPs
Michal Hocko (1):
x86/speculation/l1tf: Drop the swap storage limit restriction when l1tf=off
Miquel Raynal (2):
mtd: rawnand: marvell: prevent timeouts on a loaded machine
platform-msi: Free descriptors in platform_msi_domain_free()
Nava kishore Manne (1):
serial: uartps: Fix interrupt mask issue to handle the RX interrupts properly
Ondrej Jirman (1):
media: v4l2-fwnode: Fix setting V4L2_MBUS_DATA_ACTIVE_HIGH/LOW flag
Pan Bian (2):
ext4: fix possible use after free in ext4_quota_enable
f2fs: read page index before freeing
Patrick Dreyer (1):
Input: elan_i2c - add ACPI ID for touchpad in ASUS Aspire F5-573G
Paul Aurich (1):
smb3: fix large reads on encrypted connections
Paul Burton (3):
MIPS: math-emu: Write-protect delay slot emulation pages
MIPS: Expand MIPS32 ASIDs to 64 bits
MIPS: Only include mmzone.h when CONFIG_NEED_MULTIPLE_NODES=y
Paul Mackerras (1):
KVM: PPC: Book3S HV: Fix race between kvm_unmap_hva_range and MMU mode switch
Robin Murphy (1):
iommu/arm-smmu-v3: Fix big-endian CMD_SYNC writes
Sameer Pujar (1):
ALSA: hda/tegra: clear pending irq handlers
Sanjeev Chugh (1):
Input: atmel_mxt_ts - don't try to free unallocated kernel memory
Scott Chen (1):
USB: serial: pl2303: add ids for Hewlett-Packard HP POS pole displays
Sean Christopherson (2):
KVM: x86: Use jmp to invoke kvm_spurious_fault() from .fixup
KVM: nVMX: Free the VMREAD/VMWRITE bitmaps if alloc_kvm_area() fails
Sean Young (1):
media: rc: cec devices do not have a lirc chardev
Sebastian Ott (1):
s390/pci: fix sleeping in atomic during hotplug
Sergey Senozhatsky (1):
panic: avoid deadlocks in re-entrant console drivers
Stephan Gerhold (1):
Revert "usb: dwc3: pci: Use devm functions to get the phy GPIOs"
Steven Rostedt (VMware) (1):
tools lib traceevent: Fix processing of dereferenced args in bprintk events
Stijn Tintel (1):
brcmfmac: fix roamoff=1 modparam
Sylwester Nawrocki (1):
ARM: dts: exynos: Specify I2S assigned clocks in proper node
Takashi Sakamoto (4):
ALSA: fireface: fix for state to fetch PCM frames
ALSA: firewire-lib: fix wrong handling payload_length as payload_quadlet
ALSA: firewire-lib: fix wrong assignment for 'out_packet_without_header' tracepoint
ALSA: firewire-lib: use the same print format for 'without_header' tracepoints
Tejun Heo (1):
cgroup: fix CSS_TASK_ITER_PROCS
Terin Stock (1):
usb: dwc2: host: use hrtimer for NAK retries
Theodore Ts'o (5):
ext4: add ext4_sb_bread() to disambiguate ENOMEM cases
ext4: include terminating u32 in size of xattr entries when expanding inodes
ext4: avoid declaring fs inconsistent due to invalid file handles
ext4: force inode writes when nfsd calls commit_metadata()
ext4: check for shutdown and r/o file system in ext4_write_inode()
Todd Kjos (1):
binder: fix use-after-free due to ksys_close() during fdget()
Tomas Winkler (2):
tpm: tpm_try_transmit() refactor error flow.
tpm: tpm_i2c_nuvoton: use correct command duration for TPM 2.x
Tyrel Datwyler (1):
ibmveth: fix DMA unmap error in ibmveth_xmit_start error path
Wandrille RONCE (1):
ALSA: hda/realtek: Enable audio jacks of ASUS UX391UA with ALC294
Wenwen Wang (1):
crypto: cavium/nitrox - fix a DMA pool free failure
Will Deacon (3):
arm64: KVM: Avoid setting the upper 32 bits of VTCR_EL2 to 1
arm64: compat: Avoid sending SIGILL for unallocated syscall numbers
arm64: compat: Don't pull syscall number from regs in arm_compat_syscall
Willem de Bruijn (4):
tap: call skb_probe_transport_header after setting skb->dev
ieee802154: lowpan_header_create check must check daddr
ip: validate header length on virtual device xmit
packet: validate address length if non-zero
ruippan (潘睿) (1):
ext4: fix EXT4_IOC_GROUP_ADD ioctl
Greg KH
maintainerDocumentation/admin-guide/kernel-parameters.txt +3 -0
@@ -2096,6 +2096,9 @@ off Disables hypervisor mitigations and doesn't emit any warnings. + It also drops the swap size and available + RAM limit restriction on both hypervisor and + bare metal. Default is 'flush'.
Documentation/admin-guide/l1tf.rst +5 -1
@@ -405,6 +405,9 @@ time with the option "l1tf=". The valid arguments for this option are: off Disables hypervisor mitigations and doesn't emit any warnings. + It also drops the swap size and available RAM limit restrictions + on both hypervisor and bare metal. + ============ ============================================================= The default is 'flush'. For details about L1D flushing see :ref:`l1d_flush`.
@@ -576,7 +579,8 @@ Default mitigations The kernel default mitigations for vulnerable processors are: - PTE inversion to protect against malicious user space. This is done - unconditionally and cannot be controlled. + unconditionally and cannot be controlled. The swap storage is limited + to ~16TB. - L1D conditional flushing on VMENTER when EPT is enabled for a guest.
Makefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 4 PATCHLEVEL = 20 -SUBLEVEL = 0 +SUBLEVEL = 1 EXTRAVERSION = NAME = Shy Crocodile
arch/arc/Kconfig +1 -0
@@ -26,6 +26,7 @@ config ARC select GENERIC_IRQ_SHOW select GENERIC_PCI_IOMAP select GENERIC_PENDING_IRQ if SMP + select GENERIC_SCHED_CLOCK select GENERIC_SMP_IDLE_THREAD select HAVE_ARCH_KGDB select HAVE_ARCH_TRACEHOOK
arch/arm/boot/dts/exynos5422-odroidxu3-audio.dtsi +4 -5
@@ -26,8 +26,7 @@ "Speakers", "SPKL", "Speakers", "SPKR"; - assigned-clocks = <&i2s0 CLK_I2S_RCLK_SRC>, - <&clock CLK_MOUT_EPLL>, + assigned-clocks = <&clock CLK_MOUT_EPLL>, <&clock CLK_MOUT_MAU_EPLL>, <&clock CLK_MOUT_USER_MAU_EPLL>, <&clock_audss EXYNOS_MOUT_AUDSS>,
@@ -36,8 +35,7 @@ <&clock_audss EXYNOS_DOUT_AUD_BUS>, <&clock_audss EXYNOS_DOUT_I2S>; - assigned-clock-parents = <&clock_audss EXYNOS_SCLK_I2S>, - <&clock CLK_FOUT_EPLL>, + assigned-clock-parents = <&clock CLK_FOUT_EPLL>, <&clock CLK_MOUT_EPLL>, <&clock CLK_MOUT_MAU_EPLL>, <&clock CLK_MAU_EPLL>,
@@ -48,7 +46,6 @@ <0>, <0>, <0>, - <0>, <196608001>, <(196608002 / 2)>, <196608000>;
@@ -84,4 +81,6 @@ &i2s0 { status = "okay"; + assigned-clocks = <&i2s0 CLK_I2S_RCLK_SRC>; + assigned-clock-parents = <&clock_audss EXYNOS_SCLK_I2S>; };
arch/arm/boot/dts/exynos5422-odroidxu4.dts +4 -5
@@ -33,8 +33,7 @@ compatible = "samsung,odroid-xu3-audio"; model = "Odroid-XU4"; - assigned-clocks = <&i2s0 CLK_I2S_RCLK_SRC>, - <&clock CLK_MOUT_EPLL>, + assigned-clocks = <&clock CLK_MOUT_EPLL>, <&clock CLK_MOUT_MAU_EPLL>, <&clock CLK_MOUT_USER_MAU_EPLL>, <&clock_audss EXYNOS_MOUT_AUDSS>,
@@ -43,8 +42,7 @@ <&clock_audss EXYNOS_DOUT_AUD_BUS>, <&clock_audss EXYNOS_DOUT_I2S>; - assigned-clock-parents = <&clock_audss EXYNOS_SCLK_I2S>, - <&clock CLK_FOUT_EPLL>, + assigned-clock-parents = <&clock CLK_FOUT_EPLL>, <&clock CLK_MOUT_EPLL>, <&clock CLK_MOUT_MAU_EPLL>, <&clock CLK_MAU_EPLL>,
@@ -55,7 +53,6 @@ <0>, <0>, <0>, - <0>, <196608001>, <(196608002 / 2)>, <196608000>;
@@ -79,6 +76,8 @@ &i2s0 { status = "okay"; + assigned-clocks = <&i2s0 CLK_I2S_RCLK_SRC>; + assigned-clock-parents = <&clock_audss EXYNOS_SCLK_I2S>; }; &pwm {
arch/arm64/include/asm/kvm_arm.h +1 -1
@@ -104,7 +104,7 @@ TCR_EL2_ORGN0_MASK | TCR_EL2_IRGN0_MASK | TCR_EL2_T0SZ_MASK)/* VTCR_EL2 Registers bits */ -#define VTCR_EL2_RES1 (1 << 31) +#define VTCR_EL2_RES1 (1U << 31)#define VTCR_EL2_HD (1 << 22)#define VTCR_EL2_HA (1 << 21)#define VTCR_EL2_PS_SHIFT TCR_EL2_PS_SHIFT
arch/arm64/include/asm/unistd.h +3 -2
@@ -40,8 +40,9 @@* The following SVCs are ARM private. */ #define __ARM_NR_COMPAT_BASE 0x0f0000 -#define __ARM_NR_compat_cacheflush (__ARM_NR_COMPAT_BASE+2) -#define __ARM_NR_compat_set_tls (__ARM_NR_COMPAT_BASE+5) +#define __ARM_NR_compat_cacheflush (__ARM_NR_COMPAT_BASE + 2) +#define __ARM_NR_compat_set_tls (__ARM_NR_COMPAT_BASE + 5) +#define __ARM_NR_COMPAT_END (__ARM_NR_COMPAT_BASE + 0x800)#define __NR_compat_syscalls 399#endif
arch/arm64/kernel/sys_compat.c +5 -6
@@ -66,12 +66,11 @@ do_compat_cache_op(unsigned long start, unsigned long end, int flags)/* * Handle all unrecognised system calls. */ -long compat_arm_syscall (struct pt_regs *regs) +long compat_arm_syscall (struct pt_regs *regs,int scno) { -unsigned int no = regs->regs[7 ];void __user *addr; -switch (no) { +switch (scno) {/* * Flush a region from virtual address 'r0' to virtual address 'r1' * _exclusive_. There is no alignment requirement on either address;
@@ -102,12 +101,12 @@ long compat_arm_syscall(struct pt_regs *regs)default :/* -* Calls 9f00xx..9f07ff are defined to return -ENOSYS +* Calls 0xf0xxx..0xf07ff are defined to return -ENOSYS * if not implemented, rather than raising SIGILL. This * way the calling program can gracefully determine whether * a feature is supported. */ -if ((no &0xffff ) <=0x7ff ) +if (scno < __ARM_NR_COMPAT_END)return -ENOSYS ;break ; }
@@ -116,6 +115,6 @@ long compat_arm_syscall(struct pt_regs *regs) (compat_thumb_mode (regs) ?2 :4 );arm64_notify_die ("Oops - bad compat syscall(2)" , regs, -SIGILL ,ILL_ILLTRP , addr, no); +SIGILL ,ILL_ILLTRP , addr, scno);return 0 ; }
arch/arm64/kernel/syscall.c +4 -5
@@ -13,16 +13,15 @@#include <asm/thread_info.h> #include <asm/unistd.h> -long compat_arm_syscall (struct pt_regs *regs); - +long compat_arm_syscall (struct pt_regs *regs,int scno);long sys_ni_syscall (void ); -asmlinkage long do_ni_syscall (struct pt_regs *regs) +static long do_ni_syscall (struct pt_regs *regs,int scno) {#ifdef CONFIG_COMPAT long ret;if (is_compat_task ()) { - ret =compat_arm_syscall (regs); + ret =compat_arm_syscall (regs, scno);if (ret != -ENOSYS )return ret; }
@@ -47,7 +46,7 @@ static void invoke_syscall(struct pt_regs *regs, unsigned int scno, syscall_fn = syscall_table[array_index_nospec (scno, sc_nr)]; ret =__invoke_syscall (regs, syscall_fn); }else { - ret =do_ni_syscall (regs); + ret =do_ni_syscall (regs, scno); } regs->regs[0 ] = ret;
arch/arm64/kvm/hyp/tlb.c +25 -10
@@ -15,14 +15,19 @@* along with this program. If not, see <http://www.gnu.org/licenses/>. */ +#include <linux/irqflags.h> +#include <asm/kvm_hyp.h> #include <asm/kvm_mmu.h> #include <asm/tlbflush.h> -static void __hyp_text __tlb_switch_to_guest_vhe(struct kvm *kvm) +static void __hyp_text __tlb_switch_to_guest_vhe(struct kvm *kvm, +unsigned long *flags) {u64 val; +local_irq_save (*flags); +/* * With VHE enabled, we have HCR_EL2.{E2H,TGE} = {1,1}, and * most TLB operations target EL2/EL0. In order to affect the
@@ -37,7 +42,8 @@ static void __hyp_text __tlb_switch_to_guest_vhe(struct kvm *kvm)isb (); } -static void __hyp_text __tlb_switch_to_guest_nvhe(struct kvm *kvm) +static void __hyp_text __tlb_switch_to_guest_nvhe(struct kvm *kvm, +unsigned long *flags) {__load_guest_stage2 (kvm);isb ();
@@ -48,7 +54,8 @@ static hyp_alternate_select(__tlb_switch_to_guest, __tlb_switch_to_guest_vhe, ARM64_HAS_VIRT_HOST_EXTN); -static void __hyp_text __tlb_switch_to_host_vhe(struct kvm *kvm) +static void __hyp_text __tlb_switch_to_host_vhe(struct kvm *kvm, +unsigned long flags) {/* * We're done with the TLB operation, let's restore the host's
@@ -56,9 +63,12 @@ static void __hyp_text __tlb_switch_to_host_vhe(struct kvm *kvm)*/ write_sysreg (0 , vttbr_el2);write_sysreg (HCR_HOST_VHE_FLAGS , hcr_el2); +isb (); +local_irq_restore (flags); } -static void __hyp_text __tlb_switch_to_host_nvhe(struct kvm *kvm) +static void __hyp_text __tlb_switch_to_host_nvhe(struct kvm *kvm, +unsigned long flags) {write_sysreg (0 , vttbr_el2); }
@@ -70,11 +80,13 @@ static hyp_alternate_select(__tlb_switch_to_host, void __hyp_text __kvm_tlb_flush_vmid_ipa(struct kvm *kvm, phys_addr_t ipa) { +unsigned long flags; +dsb (ishst);/* Switch to requested VMID */ kvm =kern_hyp_va (kvm); -__tlb_switch_to_guest ()(kvm); +__tlb_switch_to_guest ()(kvm, &flags);/* * We could do so much better if we had the VA as well.
@@ -117,36 +129,39 @@ void __hyp_text __kvm_tlb_flush_vmid_ipa(struct kvm *kvm, phys_addr_t ipa)if (!has_vhe () &&icache_is_vpipt ())__flush_icache_all (); -__tlb_switch_to_host ()(kvm); +__tlb_switch_to_host ()(kvm, flags); } void __hyp_text __kvm_tlb_flush_vmid(struct kvm *kvm) { +unsigned long flags; +dsb (ishst);/* Switch to requested VMID */ kvm =kern_hyp_va (kvm); -__tlb_switch_to_guest ()(kvm); +__tlb_switch_to_guest ()(kvm, &flags);__tlbi (vmalls12e1is);dsb (ish);isb (); -__tlb_switch_to_host ()(kvm); +__tlb_switch_to_host ()(kvm, flags); } void __hyp_text __kvm_tlb_flush_local_vmid(struct kvm_vcpu *vcpu) {struct kvm *kvm =kern_hyp_va (kern_hyp_va (vcpu)->kvm); +unsigned long flags;/* Switch to requested VMID */ -__tlb_switch_to_guest ()(kvm); +__tlb_switch_to_guest ()(kvm, &flags);__tlbi (vmalle1);dsb (nsh);isb (); -__tlb_switch_to_host ()(kvm); +__tlb_switch_to_host ()(kvm, flags); } void __hyp_text __kvm_flush_vm_context(void)
arch/mips/boot/compressed/calc_vmlinuz_load_addr.c +4 -3
@@ -13,6 +13,7 @@#include <stdint.h> #include <stdio.h> #include <stdlib.h> +#include "../../../../include/linux/sizes.h" int main (int argc,char *argv[]) {
@@ -45,11 +46,11 @@ int main(int argc, char *argv[]) vmlinuz_load_addr = vmlinux_load_addr + vmlinux_size;/* -* Align with 16 bytes: "greater than that used for any standard data -* types by a MIPS compiler." -- See MIPS Run Linux (Second Edition). +* Align with 64KB: KEXEC needs load sections to be aligned to PAGE_SIZE, +* which may be as large as 64KB depending on the kernel configuration. */ - vmlinuz_load_addr += (16 - vmlinux_size %16 ); + vmlinuz_load_addr += (SZ_64K - vmlinux_size %SZ_64K );printf ("0x%llx\n" , vmlinuz_load_addr);
arch/mips/cavium-octeon/executive/cvmx-helper.c +2 -1
@@ -286,7 +286,8 @@ static cvmx_helper_interface_mode_t __cvmx_get_mode_cn7xxx(int interface)case 3 :return CVMX_HELPER_INTERFACE_MODE_LOOP ;case 4 : -return CVMX_HELPER_INTERFACE_MODE_RGMII ; +/* TODO: Implement support for AGL (RGMII). */ +return CVMX_HELPER_INTERFACE_MODE_DISABLED ;default :return CVMX_HELPER_INTERFACE_MODE_DISABLED ; }
arch/mips/include/asm/atomic.h +1 -1
@@ -306,7 +306,7 @@ static __inline__ long atomic64_fetch_##op##_relaxed(long i, atomic64_t * v) \ { \long result; \ \ -if (kernel_uses_llsc &&R10000_LLSC_WAR ) { \ +if (kernel_uses_llsc) { \long temp; \ \ __asm__ __volatile__( \
arch/mips/include/asm/cpu-info.h +1 -1
@@ -50,7 +50,7 @@ struct guest_info {#define MIPS_CACHE_PINDEX 0x00000020/* Physically indexed cache */ struct cpuinfo_mips { -unsigned long asid_cache; +u64 asid_cache;#ifdef CONFIG_MIPS_ASID_BITS_VARIABLE unsigned long asid_mask;#endif
arch/mips/include/asm/mach-loongson64/mmzone.h +1 -0
@@ -21,6 +21,7 @@#define NODE3_ADDRSPACE_OFFSET 0x300000000000UL#define pa_to_nid (addr) (((addr) & 0xf00000000000) >> NODE_ADDRSPACE_SHIFT) +#define nid_to_addrbase (nid) ((nid) << NODE_ADDRSPACE_SHIFT)#define LEVELS_PER_SLICE 128
arch/mips/include/asm/mmu.h +1 -1
@@ -7,7 +7,7 @@#include <linux/wait.h> typedef struct { - unsigned long asid[NR_CPUS]; + u64 asid[NR_CPUS]; void *vdso; atomic_t fp_mode_switching;
arch/mips/include/asm/mmu_context.h +4 -6
@@ -76,14 +76,14 @@ extern unsigned long pgd_current[];* All unused by hardware upper bits will be considered * as a software asid extension. */ -static unsigned long asid_version_mask (unsigned int cpu) +static inline u64 asid_version_mask (unsigned int cpu) {unsigned long asid_mask =cpu_asid_mask (&cpu_data[cpu]); -return ~(asid_mask | (asid_mask -1 )); +return ~(u64)(asid_mask | (asid_mask -1 )); } -static unsigned long asid_first_version (unsigned int cpu) +static inline u64 asid_first_version (unsigned int cpu) {return ~asid_version_mask (cpu) +1 ; }
@@ -102,14 +102,12 @@ static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk)static inline void get_new_mmu_context (struct mm_struct *mm,unsigned long cpu) { -unsigned long asid =asid_cache (cpu); +u64 asid =asid_cache (cpu);if (!((asid +=cpu_asid_inc ()) &cpu_asid_mask (&cpu_data[cpu]))) {if (cpu_has_vtag_icache)flush_icache_all ();local_flush_tlb_all ();/* start new asid cycle */ -if (!asid)/* fix version if needed */ - asid =asid_first_version (cpu); }cpu_context (cpu, mm) =asid_cache (cpu) = asid;
arch/mips/include/asm/mmzone.h +12 -1
@@ -7,7 +7,18 @@#define _ASM_MMZONE_H_#include <asm/page.h> -#include <mmzone.h> + +#ifdef CONFIG_NEED_MULTIPLE_NODES +# include <mmzone.h> +#endif + +#ifndef pa_to_nid +#define pa_to_nid (addr) 0 +#endif + +#ifndef nid_to_addrbase +#define nid_to_addrbase (nid) 0 +#endif #ifdef CONFIG_DISCONTIGMEM
arch/mips/include/asm/pgtable-64.h +5 -0
@@ -265,6 +265,11 @@ static inline int pmd_bad(pmd_t pmd)static inline int pmd_present (pmd_t pmd) { +#ifdef CONFIG_MIPS_HUGE_TLB_SUPPORT +if (unlikely (pmd_val (pmd) & _PAGE_HUGE)) +return pmd_val (pmd) & _PAGE_PRESENT; +#endif +return pmd_val (pmd) != (unsigned long ) invalid_pte_table; }
arch/mips/include/asm/r4kcache.h +22 -0
@@ -20,6 +20,7 @@#include <asm/cpu-features.h> #include <asm/cpu-type.h> #include <asm/mipsmtregs.h> +#include <asm/mmzone.h> #include <linux/uaccess.h> /* for uaccess_kernel() */ extern void (*r4k_blast_dcache)(void );
@@ -674,4 +675,25 @@ __BUILD_BLAST_CACHE_RANGE(s, scache, Hit_Writeback_Inv_SD, , ) __BUILD_BLAST_CACHE_RANGE(inv_d, dcache, Hit_Invalidate_D, , ) __BUILD_BLAST_CACHE_RANGE(inv_s, scache, Hit_Invalidate_SD, , ) +/* Currently, this is very specific to Loongson-3 */ +#define __BUILD_BLAST_CACHE_NODE(pfx, desc, indexop, hitop, lsize) \ +static inline void blast_##pfx##cache##lsize##_node(long node) \ +{ \ + unsigned long start = CAC_BASE | nid_to_addrbase(node); \ + unsigned long end = start + current_cpu_data.desc.waysize; \ + unsigned long ws_inc = 1UL << current_cpu_data.desc.waybit; \ + unsigned long ws_end = current_cpu_data.desc.ways << \ + current_cpu_data.desc.waybit; \ + unsigned long ws, addr; \ + \ + for (ws = 0; ws < ws_end; ws += ws_inc) \ + for (addr = start; addr < end; addr += lsize * 32) \ + cache##lsize##_unroll32(addr|ws, indexop); \ +} + +__BUILD_BLAST_CACHE_NODE(s, scache, Index_Writeback_Inv_SD, Hit_Writeback_Inv_SD, 16) +__BUILD_BLAST_CACHE_NODE(s, scache, Index_Writeback_Inv_SD, Hit_Writeback_Inv_SD, 32) +__BUILD_BLAST_CACHE_NODE(s, scache, Index_Writeback_Inv_SD, Hit_Writeback_Inv_SD, 64) +__BUILD_BLAST_CACHE_NODE(s, scache, Index_Writeback_Inv_SD, Hit_Writeback_Inv_SD, 128) +#endif /* _ASM_R4KCACHE_H */
arch/mips/kernel/vdso.c +2 -2
@@ -126,8 +126,8 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp)/* Map delay slot emulation page */ base =mmap_region (NULL ,STACK_TOP ,PAGE_SIZE , -VM_READ |VM_WRITE |VM_EXEC | -VM_MAYREAD |VM_MAYWRITE |VM_MAYEXEC , +VM_READ |VM_EXEC | +VM_MAYREAD |VM_MAYWRITE |VM_MAYEXEC ,0 ,NULL );if (IS_ERR_VALUE (base)) { ret = base;
arch/mips/math-emu/dsemul.c +20 -18
@@ -214,8 +214,9 @@ int mips_dsemul(struct pt_regs *regs, mips_instruction ir, {int isa16 =get_isa16_mode (regs->cp0_epc);mips_instruction break_math; -struct emuframe __user *fr; -int err, fr_idx; +unsigned long fr_uaddr; +struct emuframe fr; +int fr_idx, ret;/* NOP is easy */ if (ir ==0 )
@@ -250,27 +251,31 @@ int mips_dsemul(struct pt_regs *regs, mips_instruction ir, fr_idx =alloc_emuframe ();if (fr_idx ==BD_EMUFRAME_NONE )return SIGBUS ; - fr = &dsemul_page ()[fr_idx];/* Retrieve the appropriately encoded break instruction */ break_math =BREAK_MATH (isa16);/* Write the instructions to the frame */ if (isa16) { - err =__put_user (ir >>16 , - (u16 __user *)(&fr->emul)); - err |=__put_user (ir &0xffff , - (u16 __user *)((long )(&fr->emul) +2 )); - err |=__put_user (break_math >>16 , - (u16 __user *)(&fr->badinst)); - err |=__put_user (break_math &0xffff , - (u16 __user *)((long )(&fr->badinst) +2 )); +union mips_instruction _emul = { + .halfword = { ir >>16 , ir } + }; +union mips_instruction _badinst = { + .halfword = { break_math >>16 , break_math } + }; + + fr.emul = _emul.word; + fr.badinst = _badinst.word; }else { - err =__put_user (ir, &fr->emul); - err |=__put_user (break_math, &fr->badinst); + fr.emul = ir; + fr.badinst = break_math; } -if (unlikely (err)) { +/* Write the frame to user memory */ + fr_uaddr = (unsigned long )&dsemul_page ()[fr_idx]; + ret =access_process_vm (current, fr_uaddr, &fr,sizeof (fr), +FOLL_FORCE |FOLL_WRITE ); +if (unlikely (ret !=sizeof (fr))) {MIPS_FPU_EMU_INC_STATS (errors);free_emuframe (fr_idx, current->mm);return SIGBUS ;
@@ -282,10 +287,7 @@ int mips_dsemul(struct pt_regs *regs, mips_instruction ir,atomic_set (¤t->thread.bd_emu_frame, fr_idx);/* Change user register context to execute the frame */ - regs->cp0_epc = (unsigned long )&fr->emul | isa16; - -/* Ensure the icache observes our newly written frame */ -flush_cache_sigtramp ((unsigned long )&fr->emul); + regs->cp0_epc = fr_uaddr | isa16;return 0 ; }
arch/mips/mm/c-r3k.c +1 -1
@@ -245,7 +245,7 @@ static void r3k_flush_cache_page(struct vm_area_struct *vma,pmd_t *pmdp;pte_t *ptep; -pr_debug ("cpage[%08lx,%08lx]\n" , +pr_debug ("cpage[%08llx,%08lx]\n" ,cpu_context (smp_processor_id (), mm), addr);/* No ASID => no such page in the cache. */
arch/mips/mm/c-r4k.c +37 -7
79 lines not on this page · raw message
arch/parisc/mm/init.c +2 -2
@@ -512,8 +512,8 @@ static void __init map_pages(unsigned long start_vaddr,void __init set_kernel_text_rw (int enable_read_write) { -unsigned long start = (unsigned long )__init_begin; -unsigned long end = (unsigned long )_etext; +unsigned long start = (unsigned long ) _text; +unsigned long end = (unsigned long ) &data_start;map_pages (start,__pa (start), end-start,PAGE_KERNEL_RWX , enable_read_write ?1 :0 );
arch/powerpc/kernel/security.c +1 -1
@@ -22,7 +22,7 @@ enum count_cache_flush_type {COUNT_CACHE_FLUSH_SW =0x2 , COUNT_CACHE_FLUSH_HW = 0x4, }; -static enum count_cache_flush_type count_cache_flush_type; +static enum count_cache_flush_type count_cache_flush_type =COUNT_CACHE_FLUSH_NONE ;bool barrier_nospec_enabled;static bool no_nospec;
arch/powerpc/kernel/signal_32.c +13 -5
@@ -1140,11 +1140,11 @@ SYSCALL_DEFINE0(rt_sigreturn) {struct rt_sigframe __user *rt_sf;struct pt_regs *regs =current_pt_regs (); +int tm_restore =0 ;#ifdef CONFIG_PPC_TRANSACTIONAL_MEM struct ucontext __user *uc_transact;unsigned long msr_hi;unsigned long tmp; -int tm_restore =0 ;#endif /* Always make any pending restarted system calls return -EINTR */ current->restart_block.fn = do_no_restart_syscall;
@@ -1192,11 +1192,19 @@ SYSCALL_DEFINE0(rt_sigreturn) goto bad; } } -if (!tm_restore) -/* Fall through, for non-TM restore */ +if (!tm_restore) { +/* +* Unset regs->msr because ucontext MSR TS is not +* set, and recheckpoint was not called. This avoid +* hitting a TM Bad thing at RFID +*/ + regs->msr &= ~MSR_TS_MASK ; + } +/* Fall through, for non-TM restore */ #endif -if (do_setcontext (&rt_sf->uc, regs,1 )) - goto bad; +if (!tm_restore) +if (do_setcontext (&rt_sf->uc, regs,1 )) + goto bad;/* * It's not clear whether or why it is desirable to save the
arch/powerpc/kernel/signal_64.c +16 -4
@@ -740,11 +740,23 @@ SYSCALL_DEFINE0(rt_sigreturn) &uc_transact->uc_mcontext)) goto badframe; } - else -/* Fall through, for non-TM restore */ #endif -if (restore_sigcontext (current,NULL ,1 , &uc->uc_mcontext)) - goto badframe; +/* Fall through, for non-TM restore */ +if (!MSR_TM_ACTIVE (msr)) { +/* +* Unset MSR[TS] on the thread regs since MSR from user +* context does not have MSR active, and recheckpoint was +* not called since restore_tm_sigcontexts() was not called +* also. +* +* If not unsetting it, the code can RFID to userspace with +* MSR[TS] set, but without CPU in the proper state, +* causing a TM bad thing. +*/ + current->thread.regs->msr &= ~MSR_TS_MASK ; +if (restore_sigcontext (current,NULL ,1 , &uc->uc_mcontext)) + goto badframe; + }if (restore_altstack (&uc->uc_stack)) goto badframe;
arch/powerpc/kvm/book3s_64_mmu_hv.c +3 -0
@@ -743,12 +743,15 @@ void kvmppc_rmap_reset(struct kvm *kvm) srcu_idx =srcu_read_lock (&kvm->srcu); slots =kvm_memslots (kvm);kvm_for_each_memslot (memslot, slots) { +/* Mutual exclusion with kvm_unmap_hva_range etc. */ +spin_lock (&kvm->mmu_lock);/* * This assumes it is acceptable to lose reference and * change bits across a reset. */ memset (memslot->arch.rmap,0 , memslot->npages *sizeof (*memslot->arch.rmap)); +spin_unlock (&kvm->mmu_lock); }srcu_read_unlock (&kvm->srcu, srcu_idx); }
arch/powerpc/kvm/book3s_hv.c +11 -6
@@ -4532,12 +4532,15 @@ int kvmppc_switch_mmu_to_hpt(struct kvm *kvm) {if (nesting_enabled (kvm))kvmhv_release_all_nested (kvm); +kvmppc_rmap_reset (kvm); + kvm->arch.process_table =0 ; +/* Mutual exclusion with kvm_unmap_hva_range etc. */ +spin_lock (&kvm->mmu_lock); + kvm->arch.radix =0 ; +spin_unlock (&kvm->mmu_lock);kvmppc_free_radix (kvm);kvmppc_update_lpcr (kvm,LPCR_VPM1 ,LPCR_VPM1 |LPCR_UPRT |LPCR_GTSE |LPCR_HR ); -kvmppc_rmap_reset (kvm); - kvm->arch.radix =0 ; - kvm->arch.process_table =0 ;return 0 ; }
@@ -4549,12 +4552,14 @@ int kvmppc_switch_mmu_to_radix(struct kvm *kvm) err =kvmppc_init_vm_radix (kvm);if (err)return err; - +kvmppc_rmap_reset (kvm); +/* Mutual exclusion with kvm_unmap_hva_range etc. */ +spin_lock (&kvm->mmu_lock); + kvm->arch.radix =1 ; +spin_unlock (&kvm->mmu_lock);kvmppc_free_hpt (&kvm->arch.hpt);kvmppc_update_lpcr (kvm,LPCR_UPRT |LPCR_GTSE |LPCR_HR ,LPCR_VPM1 |LPCR_UPRT |LPCR_GTSE |LPCR_HR ); -kvmppc_rmap_reset (kvm); - kvm->arch.radix =1 ;return 0 ; }
arch/s390/pci/pci_clp.c +1 -1
@@ -436,7 +436,7 @@ int clp_get_state(u32 fid, enum zpci_state *state)struct clp_state_data sd = {fid,ZPCI_FN_STATE_RESERVED };int rc; - rrb =clp_alloc_block (GFP_KERNEL ); + rrb =clp_alloc_block (GFP_ATOMIC );if (!rrb)return -ENOMEM ;
arch/x86/include/asm/kvm_host.h +1 -1
@@ -1492,7 +1492,7 @@ asmlinkage void kvm_spurious_fault(void);"cmpb $0, kvm_rebooting \n\t" \"jne 668b \n\t" \ __ASM_SIZE(push) " $666b \n\t" \ -"call kvm_spurious_fault \n\t" \ +"jmp kvm_spurious_fault \n\t" \".popsection \n\t" \ _ASM_EXTABLE(666b ,667b )
arch/x86/kernel/cpu/bugs.c +2 -1
@@ -1002,7 +1002,8 @@ static void __init l1tf_select_mitigation(void)#endif half_pa = (u64 )l1tf_pfn_limit () <<PAGE_SHIFT ; -if (e820__mapped_any (half_pa,ULLONG_MAX - half_pa,E820_TYPE_RAM )) { +if (l1tf_mitigation !=L1TF_MITIGATION_OFF && +e820__mapped_any (half_pa,ULLONG_MAX - half_pa,E820_TYPE_RAM )) {pr_warn ("System has more than MAX_PA/2 memory. L1TF mitigation not effective.\n" );pr_info ("You may make it effective by booting the kernel with mem=%llu parameter.\n" , half_pa);
arch/x86/kvm/vmx.c +5 -2
@@ -8031,13 +8031,16 @@ static __init int hardware_setup(void) kvm_mce_cap_supported |=MCG_LMCE_P ; -return alloc_kvm_area (); + r =alloc_kvm_area (); +if (r) + goto out; +return 0 ; out:for (i =0 ; i <VMX_BITMAP_NR ; i++)free_page ((unsigned long )vmx_bitmap[i]); -return r; +return r; } static __exit void hardware_unsetup(void)
arch/x86/mm/init.c +1 -1
@@ -931,7 +931,7 @@ unsigned long max_swapfile_size(void) pages =generic_max_swapfile_size (); -if (boot_cpu_has_bug (X86_BUG_L1TF )) { +if (boot_cpu_has_bug (X86_BUG_L1TF ) && l1tf_mitigation !=L1TF_MITIGATION_OFF ) {/* Limit the swap file size to MAX_PA/2 for L1TF workaround */ unsigned long long l1tf_limit =l1tf_pfn_limit ();/*
arch/x86/mm/init_64.c +0 -6
@@ -584,7 +584,6 @@ phys_pud_init(pud_t *pud_page, unsigned long paddr, unsigned long paddr_end, paddr_end, page_size_mask, prot); -__flush_tlb_all ();continue ; }/*
@@ -627,7 +626,6 @@ phys_pud_init(pud_t *pud_page, unsigned long paddr, unsigned long paddr_end,pud_populate (&init_mm, pud, pmd);spin_unlock (&init_mm.page_table_lock); } -__flush_tlb_all ();update_page_count (PG_LEVEL_1G , pages);
@@ -668,7 +666,6 @@ phys_p4d_init(p4d_t *p4d_page, unsigned long paddr, unsigned long paddr_end, paddr_last =phys_pud_init (pud, paddr, paddr_end, page_size_mask); -__flush_tlb_all ();continue ; }
@@ -680,7 +677,6 @@ phys_p4d_init(p4d_t *p4d_page, unsigned long paddr, unsigned long paddr_end,p4d_populate (&init_mm, p4d, pud);spin_unlock (&init_mm.page_table_lock); } -__flush_tlb_all ();return paddr_last; }
@@ -733,8 +729,6 @@ kernel_physical_mapping_init(unsigned long paddr_start,if (pgd_changed)sync_global_pgds (vaddr_start, vaddr_end -1 ); -__flush_tlb_all (); -return paddr_last; }
crypto/cfb.c +1 -1
@@ -144,7 +144,7 @@ static int crypto_cfb_decrypt_segment(struct skcipher_walk *walk, do { crypto_cfb_encrypt_one(tfm, iv, dst); - crypto_xor(dst, iv, bsize); + crypto_xor(dst, src, bsize); iv = src; src += bsize;
crypto/tcrypt.c +5 -0
@@ -1736,6 +1736,7 @@ static int do_test(const char *alg, u32 type, u32 mask, int m, u32 num_mb) ret +=tcrypt_test ("ctr(aes)" ); ret +=tcrypt_test ("rfc3686(ctr(aes))" ); ret +=tcrypt_test ("ofb(aes)" ); + ret +=tcrypt_test ("cfb(aes)" );break ;case 11 :
@@ -2060,6 +2061,10 @@ static int do_test(const char *alg, u32 type, u32 mask, int m, u32 num_mb) speed_template_16_24_32);test_cipher_speed ("ctr(aes)" ,DECRYPT , sec,NULL ,0 , speed_template_16_24_32); +test_cipher_speed ("cfb(aes)" ,ENCRYPT , sec,NULL ,0 , + speed_template_16_24_32); +test_cipher_speed ("cfb(aes)" ,DECRYPT , sec,NULL ,0 , + speed_template_16_24_32);break ;case 201 :
crypto/testmgr.c +7 -0
@@ -2690,6 +2690,13 @@ static const struct alg_test_desc alg_test_descs[] = { .dec = __VECS(aes_ccm_dec_tv_template) } } + }, { + .alg = "cfb(aes)", + .test = alg_test_skcipher, + .fips_allowed = 1, + .suite = { + .cipher =__VECS (aes_cfb_tv_template) + }, }, { .alg = "chacha20", .test = alg_test_skcipher,
crypto/testmgr.h +76 -0
82 lines not on this page · raw message
drivers/android/binder.c +61 -2
87 lines not on this page · raw message
drivers/base/platform-msi.c +4 -2
@@ -368,14 +368,16 @@ void platform_msi_domain_free(struct irq_domain *domain, unsigned int virq, unsigned int nvec) {struct platform_msi_priv_data *data = domain->host_data; -struct msi_desc *desc; -for_each_msi_entry (desc, data->dev) { +struct msi_desc *desc, *tmp; +for_each_msi_entry_safe (desc, tmp, data->dev) {if (WARN_ON (!desc->irq || desc->nvec_used !=1 ))return ;if (!(desc->irq >= virq && desc->irq < (virq + nvec)))continue ;irq_domain_free_irqs_common (domain, desc->irq,1 ); +list_del (&desc->list); +free_msi_entry (desc); } }
drivers/char/tpm/tpm-interface.c +8 -7
@@ -477,13 +477,15 @@ static ssize_t tpm_try_transmit(struct tpm_chip *chip,if (need_locality) { rc =tpm_request_locality (chip, flags); -if (rc <0 ) - goto out_no_locality; +if (rc <0 ) { + need_locality = false; + goto out_locality; + } } rc =tpm_cmd_ready (chip, flags);if (rc) - goto out; + goto out_locality; rc =tpm2_prepare_space (chip, space, ordinal, buf);if (rc)
@@ -547,14 +549,13 @@ static ssize_t tpm_try_transmit(struct tpm_chip *chip,dev_err (&chip->dev,"tpm2_commit_space: error %d\n" , rc); out: - rc =tpm_go_idle (chip, flags); -if (rc) - goto out; +/* may fail but do not override previous error value in rc */ +tpm_go_idle (chip, flags); +out_locality:if (need_locality)tpm_relinquish_locality (chip, flags); -out_no_locality:if (chip->ops->clk_enable !=NULL ) chip->ops->clk_enable (chip, false);
drivers/char/tpm/tpm_i2c_nuvoton.c +7 -4
@@ -369,6 +369,7 @@ static int i2c_nuvoton_send(struct tpm_chip *chip, u8 *buf, size_t len)struct device *dev = chip->dev.parent;struct i2c_client *client =to_i2c_client (dev);u32 ordinal; +unsigned long duration;size_t count =0 ;int burst_count, bytes2write, retries, rc = -EIO ;
@@ -455,10 +456,12 @@ static int i2c_nuvoton_send(struct tpm_chip *chip, u8 *buf, size_t len)return rc; } ordinal =be32_to_cpu (*((__be32 *) (buf +6 ))); - rc =i2c_nuvoton_wait_for_data_avail (chip, -tpm_calc_ordinal_duration (chip, - ordinal), - &priv->read_queue); +if (chip->flags &TPM_CHIP_FLAG_TPM2 ) + duration =tpm2_calc_ordinal_duration (chip, ordinal); +else + duration =tpm_calc_ordinal_duration (chip, ordinal); + + rc =i2c_nuvoton_wait_for_data_avail (chip, duration, &priv->read_queue);if (rc) {dev_err (dev,"%s() timeout command duration\n" , __func__);i2c_nuvoton_ready (chip);
drivers/clk/rockchip/clk-rk3188.c +1 -1
@@ -382,7 +382,7 @@ static struct rockchip_clk_branch common_clk_branches[] __initdata = {COMPOSITE_NOMUX (0 ,"spdif_pre" ,"i2s_src" ,0 ,RK2928_CLKSEL_CON (5 ),0 ,7 ,DFLAGS ,RK2928_CLKGATE_CON (0 ),13 ,GFLAGS ), -COMPOSITE_FRACMUX (0 ,"spdif_frac" ,"spdif_pll" ,CLK_SET_RATE_PARENT , +COMPOSITE_FRACMUX (0 ,"spdif_frac" ,"spdif_pre" ,CLK_SET_RATE_PARENT ,RK2928_CLKSEL_CON (9 ),0 ,RK2928_CLKGATE_CON (0 ),14 ,GFLAGS , &common_spdif_fracmux),
drivers/clk/sunxi-ng/ccu_nm.c +15 -3
@@ -19,6 +19,17 @@ struct _ccu_nm {unsigned long m, min_m, max_m; }; +static unsigned long ccu_nm_calc_rate (unsigned long parent, +unsigned long n,unsigned long m) +{ +u64 rate = parent; + + rate *= n; +do_div (rate, m); + +return rate; +} +static void ccu_nm_find_best (unsigned long parent,unsigned long rate,struct _ccu_nm *nm) {
@@ -28,7 +39,8 @@ static void ccu_nm_find_best(unsigned long parent, unsigned long rate,for (_n = nm->min_n; _n <= nm->max_n; _n++) {for (_m = nm->min_m; _m <= nm->max_m; _m++) { -unsigned long tmp_rate = parent * _n / _m; +unsigned long tmp_rate =ccu_nm_calc_rate (parent, + _n, _m);if (tmp_rate > rate)continue ;
@@ -100,7 +112,7 @@ static unsigned long ccu_nm_recalc_rate(struct clk_hw *hw,if (ccu_sdm_helper_is_enabled (&nm->common, &nm->sdm)) rate =ccu_sdm_helper_read_rate (&nm->common, &nm->sdm, m, n);else - rate = parent_rate * n / m; + rate =ccu_nm_calc_rate (parent_rate, n, m);if (nm->common.features &CCU_FEATURE_FIXED_POSTDIV ) rate /= nm->fixed_post_div;
@@ -149,7 +161,7 @@ static long ccu_nm_round_rate(struct clk_hw *hw, unsigned long rate, _nm.max_m = nm->m.max ?:1 << nm->m.width;ccu_nm_find_best (*parent_rate, rate, &_nm); - rate = *parent_rate * _nm.n / _nm.m; + rate =ccu_nm_calc_rate (*parent_rate, _nm.n, _nm.m);if (nm->common.features &CCU_FEATURE_FIXED_POSTDIV ) rate /= nm->fixed_post_div;
drivers/clocksource/Kconfig +1 -0
@@ -290,6 +290,7 @@ config CLKSRC_MPS2 config ARC_TIMERS bool "Support for 32-bit TIMERn counters in ARC Cores" if COMPILE_TEST + depends on GENERIC_SCHED_CLOCK select TIMER_OF help These are legacy 32-bit TIMER0 and TIMER1 counters found on all ARC cores
drivers/clocksource/arc_timer.c +22 -0
@@ -23,6 +23,7 @@#include <linux/cpu.h> #include <linux/of.h> #include <linux/of_irq.h> +#include <linux/sched_clock.h> #include <soc/arc/timers.h> #include <soc/arc/mcip.h>
@@ -88,6 +89,11 @@ static u64 arc_read_gfrc(struct clocksource *cs)return (((u64 )h) <<32 ) | l; } +static notrace u64 arc_gfrc_clock_read(void) +{ +return arc_read_gfrc (NULL ); +} +static struct clocksource arc_counter_gfrc = { .name ="ARConnect GFRC" , .rating =400 ,
@@ -111,6 +117,8 @@ static int __init arc_cs_setup_gfrc(struct device_node *node)if (ret)return ret; +sched_clock_register (arc_gfrc_clock_read,64 , arc_timer_freq); +return clocksource_register_hz (&arc_counter_gfrc, arc_timer_freq); }TIMER_OF_DECLARE (arc_gfrc,"snps,archs-timer-gfrc" , arc_cs_setup_gfrc);
@@ -139,6 +147,11 @@ static u64 arc_read_rtc(struct clocksource *cs)return (((u64 )h) <<32 ) | l; } +static notrace u64 arc_rtc_clock_read(void) +{ +return arc_read_rtc (NULL ); +} +static struct clocksource arc_counter_rtc = { .name ="ARCv2 RTC" , .rating =350 ,
@@ -170,6 +183,8 @@ static int __init arc_cs_setup_rtc(struct device_node *node)write_aux_reg (AUX_RTC_CTRL ,1 ); +sched_clock_register (arc_rtc_clock_read,64 , arc_timer_freq); +return clocksource_register_hz (&arc_counter_rtc, arc_timer_freq); }TIMER_OF_DECLARE (arc_rtc,"snps,archs-timer-rtc" , arc_cs_setup_rtc);
@@ -185,6 +200,11 @@ static u64 arc_read_timer1(struct clocksource *cs)return (u64 )read_aux_reg (ARC_REG_TIMER1_CNT ); } +static notrace u64 arc_timer1_clock_read(void) +{ +return arc_read_timer1 (NULL ); +} +static struct clocksource arc_counter_timer1 = { .name ="ARC Timer1" , .rating =300 ,
@@ -209,6 +229,8 @@ static int __init arc_cs_setup_timer1(struct device_node *node)write_aux_reg (ARC_REG_TIMER1_CNT ,0 );write_aux_reg (ARC_REG_TIMER1_CTRL ,TIMER_CTRL_NH ); +sched_clock_register (arc_timer1_clock_read,32 , arc_timer_freq); +return clocksource_register_hz (&arc_counter_timer1, arc_timer_freq); }
drivers/crypto/cavium/nitrox/nitrox_algs.c +7 -5
@@ -73,7 +73,7 @@ static int flexi_aes_keylen(int keylen)static int nitrox_skcipher_init (struct crypto_skcipher *tfm) {struct nitrox_crypto_ctx *nctx =crypto_skcipher_ctx (tfm); -void *fctx; +struct crypto_ctx_hdr *chdr;/* get the first device */ nctx->ndev =nitrox_get_first_device ();
@@ -81,12 +81,14 @@ static int nitrox_skcipher_init(struct crypto_skcipher *tfm)return -ENODEV ;/* allocate nitrox crypto context */ - fctx =crypto_alloc_context (nctx->ndev); -if (!fctx) { + chdr =crypto_alloc_context (nctx->ndev); +if (!chdr) {nitrox_put_device (nctx->ndev);return -ENOMEM ; } - nctx->u.ctx_handle = (uintptr_t )fctx; + nctx->chdr = chdr; + nctx->u.ctx_handle = (uintptr_t )((u8 *)chdr->vaddr + +sizeof (struct ctx_hdr ));crypto_skcipher_set_reqsize (tfm,crypto_skcipher_reqsize (tfm) +sizeof (struct nitrox_kcrypt_request ));return 0 ;
@@ -102,7 +104,7 @@ static void nitrox_skcipher_exit(struct crypto_skcipher *tfm)memset (&fctx->crypto,0 ,sizeof (struct crypto_keys ));memset (&fctx->auth,0 ,sizeof (struct auth_keys )); -crypto_free_context ((void *)fctx); +crypto_free_context ((void *)nctx->chdr); }nitrox_put_device (nctx->ndev);
drivers/crypto/cavium/nitrox/nitrox_lib.c +17 -5
@@ -158,12 +158,19 @@ static void destroy_crypto_dma_pool(struct nitrox_device *ndev)void *crypto_alloc_context (struct nitrox_device *ndev) {struct ctx_hdr *ctx; +struct crypto_ctx_hdr *chdr;void *vaddr;dma_addr_t dma; + chdr =kmalloc (sizeof (*chdr),GFP_KERNEL ); +if (!chdr) +return NULL ; + vaddr =dma_pool_zalloc (ndev->ctx_pool,GFP_KERNEL , &dma); -if (!vaddr) +if (!vaddr) { +kfree (chdr);return NULL ; + }/* fill meta data */ ctx = vaddr;
@@ -171,7 +178,11 @@ void *crypto_alloc_context(struct nitrox_device *ndev) ctx->dma = dma; ctx->ctx_dma = dma +sizeof (struct ctx_hdr ); -return ((u8 *)vaddr +sizeof (struct ctx_hdr )); + chdr->pool = ndev->ctx_pool; + chdr->dma = dma; + chdr->vaddr = vaddr; + +return chdr; }/**
@@ -180,13 +191,14 @@ void *crypto_alloc_context(struct nitrox_device *ndev)*/ void crypto_free_context (void *ctx) { -struct ctx_hdr *ctxp; +struct crypto_ctx_hdr *ctxp;if (!ctx)return ; - ctxp = (struct ctx_hdr *)((u8 *)ctx -sizeof (struct ctx_hdr )); -dma_pool_free (ctxp->pool, ctxp, ctxp->dma); + ctxp = ctx; +dma_pool_free (ctxp->pool, ctxp->vaddr, ctxp->dma); +kfree (ctxp); }/**
drivers/crypto/cavium/nitrox/nitrox_req.h +7 -0
@@ -181,12 +181,19 @@ struct flexi_crypto_context {struct auth_keys auth; }; +struct crypto_ctx_hdr { +struct dma_pool *pool; +dma_addr_t dma; +void *vaddr; +}; +struct nitrox_crypto_ctx {struct nitrox_device *ndev;union {u64 ctx_handle;struct flexi_crypto_context *fctx; } u; +struct crypto_ctx_hdr *chdr; };struct nitrox_kcrypt_request {
drivers/crypto/chelsio/chcr_ipsec.c +4 -1
@@ -303,7 +303,10 @@ static bool chcr_ipsec_offload_ok(struct sk_buff *skb, struct xfrm_state *x)static inline int is_eth_imm (const struct sk_buff *skb,unsigned int kctx_len) { -int hdrlen =sizeof (struct chcr_ipsec_req ) + kctx_len; +int hdrlen; + + hdrlen =sizeof (struct fw_ulptx_wr ) + +sizeof (struct chcr_ipsec_req ) + kctx_len; hdrlen +=sizeof (struct cpl_tx_pkt );if (skb->len <=MAX_IMM_TX_PKT_LEN - hdrlen)
drivers/gpu/drm/i915/i915_gem_execbuffer.c +1 -0
@@ -1605,6 +1605,7 @@ static int eb_copy_relocations(const struct i915_execbuffer *eb) (char __user *)urelocs + copied, len)) { end_user: +user_access_end ();kvfree (relocs); err = -EFAULT ; goto err;
drivers/gpu/drm/udl/udl_main.c +1 -6
@@ -350,15 +350,10 @@ int udl_driver_load(struct drm_device *dev, unsigned long flags)if (ret) goto err; - ret =drm_vblank_init (dev,1 ); -if (ret) - goto err_fb; -drm_kms_helper_poll_init (dev);return 0 ; -err_fb: -udl_fbdev_cleanup (dev); + err:if (udl->urbs.count)udl_free_urb_list (dev);
drivers/gpu/drm/v3d/v3d_debugfs.c +7 -4
@@ -71,10 +71,13 @@ static int v3d_v3d_debugfs_regs(struct seq_file *m, void *unused) V3D_READ(v3d_hub_reg_defs[i].reg)); } -for (i =0 ; i <ARRAY_SIZE (v3d_gca_reg_defs); i++) { -seq_printf (m,"%s (0x%04x): 0x%08x\n" , - v3d_gca_reg_defs[i].name, v3d_gca_reg_defs[i].reg, -V3D_GCA_READ (v3d_gca_reg_defs[i].reg)); +if (v3d->ver <41 ) { +for (i =0 ; i <ARRAY_SIZE (v3d_gca_reg_defs); i++) { +seq_printf (m,"%s (0x%04x): 0x%08x\n" , + v3d_gca_reg_defs[i].name, + v3d_gca_reg_defs[i].reg, +V3D_GCA_READ (v3d_gca_reg_defs[i].reg)); + } }for (core =0 ; core < v3d->cores; core++) {
drivers/infiniband/hw/hfi1/verbs.c +2 -0
@@ -919,6 +919,8 @@ int hfi1_verbs_send_pio(struct rvt_qp *qp, struct hfi1_pkt_state *ps,if (slen > len) slen = len; +if (slen > ss->sge.sge_length) + slen = ss->sge.sge_length;rvt_update_sge (ss, slen, false);seg_pio_copy_mid (pbuf, addr, slen); len -= slen;
drivers/input/mouse/elan_i2c_core.c +1 -0
@@ -1336,6 +1336,7 @@ MODULE_DEVICE_TABLE(i2c, elan_id);static const struct acpi_device_id elan_acpi_id[] = { {"ELAN0000" ,0 }, {"ELAN0100" ,0 }, + {"ELAN0501" ,0 }, {"ELAN0600" ,0 }, {"ELAN0602" ,0 }, {"ELAN0605" ,0 },
drivers/input/touchscreen/atmel_mxt_ts.c +2 -2
@@ -1585,10 +1585,10 @@ static int mxt_update_cfg(struct mxt_data *data, const struct firmware *fw)/* T7 config may have changed */ mxt_init_t7_power_cfg (data); -release_raw: -kfree (cfg.raw); release_mem:kfree (cfg.mem); +release_raw: +kfree (cfg.raw);return ret; }
drivers/iommu/arm-smmu-v3.c +7 -1
@@ -828,7 +828,13 @@ static int arm_smmu_cmdq_build_cmd(u64 *cmd, struct arm_smmu_cmdq_ent *ent) cmd[0 ] |=FIELD_PREP (CMDQ_SYNC_0_CS ,CMDQ_SYNC_0_CS_SEV ); cmd[0 ] |=FIELD_PREP (CMDQ_SYNC_0_MSH ,ARM_SMMU_SH_ISH ); cmd[0 ] |=FIELD_PREP (CMDQ_SYNC_0_MSIATTR ,ARM_SMMU_MEMATTR_OIWB ); - cmd[0 ] |=FIELD_PREP (CMDQ_SYNC_0_MSIDATA , ent->sync.msidata); +/* +* Commands are written little-endian, but we want the SMMU to +* receive MSIData, and thus write it back to memory, in CPU +* byte order, so big-endian needs an extra byteswap here. +*/ + cmd[0 ] |=FIELD_PREP (CMDQ_SYNC_0_MSIDATA , +cpu_to_le32 (ent->sync.msidata)); cmd[1 ] |= ent->sync.msiaddr &CMDQ_SYNC_1_MSIADDR_MASK ;break ;default :
drivers/isdn/capi/kcapi.c +2 -2
@@ -852,7 +852,7 @@ u16 capi20_get_manufacturer(u32 contr, u8 *buf)u16 ret;if (contr ==0 ) { -strlcpy (buf, capi_manufakturer,CAPI_MANUFACTURER_LEN ); +strncpy (buf, capi_manufakturer,CAPI_MANUFACTURER_LEN );return CAPI_NOERROR ; }
@@ -860,7 +860,7 @@ u16 capi20_get_manufacturer(u32 contr, u8 *buf) ctr =get_capi_ctr_by_nr (contr);if (ctr && ctr->state ==CAPI_CTR_RUNNING ) { -strlcpy (buf, ctr->manu,CAPI_MANUFACTURER_LEN ); +strncpy (buf, ctr->manu,CAPI_MANUFACTURER_LEN ); ret =CAPI_NOERROR ; }else ret =CAPI_REGNOTINSTALLED ;
drivers/media/cec/cec-adap.c +18 -9
@@ -455,7 +455,7 @@ int cec_thread_func(void *_adap) (adap->needs_hpd && (!adap->is_configured && !adap->is_configuring)) ||kthread_should_stop () || - (!adap->transmitting && + (!adap->transmit_in_progress && !list_empty (&adap->transmit_queue)), msecs_to_jiffies(CEC_XFER_TIMEOUT_MS)); timeout = err ==0 ;
@@ -463,7 +463,7 @@ int cec_thread_func(void *_adap)/* Otherwise we just wait for something to happen. */ wait_event_interruptible (adap->kthread_waitq,kthread_should_stop () || - (!adap->transmitting && + (!adap->transmit_in_progress && !list_empty (&adap->transmit_queue))); }
@@ -488,6 +488,7 @@ int cec_thread_func(void *_adap)pr_warn ("cec-%s: message %*ph timed out\n" , adap->name, adap->transmitting->msg.len, adap->transmitting->msg.msg); + adap->transmit_in_progress = false; adap->tx_timeouts++;/* Just give up on this. */ cec_data_cancel(adap->transmitting,
@@ -499,7 +500,7 @@ int cec_thread_func(void *_adap)* If we are still transmitting, or there is nothing new to * transmit, then just continue waiting. */ -if (adap->transmitting ||list_empty (&adap->transmit_queue)) +if (adap->transmit_in_progress ||list_empty (&adap->transmit_queue)) goto unlock;/* Get a new message to transmit */
@@ -545,6 +546,8 @@ int cec_thread_func(void *_adap)if (adap->ops->adap_transmit (adap, data->attempts, signal_free_time, &data->msg))cec_data_cancel (data,CEC_TX_STATUS_ABORTED ); +else + adap->transmit_in_progress = true; unlock:mutex_unlock (&adap->lock);
@@ -575,14 +578,17 @@ void cec_transmit_done_ts(struct cec_adapter *adap, u8 status, data = adap->transmitting;if (!data) {/* -* This can happen if a transmit was issued and the cable is +* This might happen if a transmit was issued and the cable is * unplugged while the transmit is ongoing. Ignore this * transmit in that case. */ -dprintk (1 ,"%s was called without an ongoing transmit!\n" , - __func__); - goto unlock; +if (!adap->transmit_in_progress) +dprintk (1 ,"%s was called without an ongoing transmit!\n" , + __func__); + adap->transmit_in_progress = false; + goto wake_thread; } + adap->transmit_in_progress = false; msg = &data->msg;
@@ -648,7 +654,6 @@ void cec_transmit_done_ts(struct cec_adapter *adap, u8 status,* for transmitting or to retry the current message. */ wake_up_interruptible (&adap->kthread_waitq); -unlock:mutex_unlock (&adap->lock); }EXPORT_SYMBOL_GPL (cec_transmit_done_ts);
@@ -1496,8 +1501,11 @@ void __cec_s_phys_addr(struct cec_adapter *adap, u16 phys_addr, bool block)if (adap->monitor_all_cnt)WARN_ON (call_op (adap, adap_monitor_all_enable, false));mutex_lock (&adap->devnode.lock); -if (adap->needs_hpd ||list_empty (&adap->devnode.fhs)) +if (adap->needs_hpd ||list_empty (&adap->devnode.fhs)) {WARN_ON (adap->ops->adap_enable (adap, false)); + adap->transmit_in_progress = false; +wake_up_interruptible (&adap->kthread_waitq); + }mutex_unlock (&adap->devnode.lock);if (phys_addr ==CEC_PHYS_ADDR_INVALID )return ;
@@ -1505,6 +1513,7 @@ void __cec_s_phys_addr(struct cec_adapter *adap, u16 phys_addr, bool block)mutex_lock (&adap->devnode.lock); adap->last_initiator =0xff ; + adap->transmit_in_progress = false;if ((adap->needs_hpd ||list_empty (&adap->devnode.fhs)) && adap->ops->adap_enable (adap, true)) {
drivers/media/cec/cec-pin.c +3 -2
@@ -601,8 +601,9 @@ static void cec_pin_tx_states(struct cec_pin *pin, ktime_t ts)break ;/* Was the message ACKed? */ ack =cec_msg_is_broadcast (&pin->tx_msg) ? v : !v; -if (!ack && !pin->tx_ignore_nack_until_eom && - pin->tx_bit /10 < pin->tx_msg.len && !pin->tx_post_eom) { +if (!ack && (!pin->tx_ignore_nack_until_eom || + pin->tx_bit /10 == pin->tx_msg.len -1 ) && + !pin->tx_post_eom) {/* * Note: the CEC spec is ambiguous regarding * what action to take when a NACK appears
drivers/media/common/v4l2-tpg/v4l2-tpg-core.c +1 -1
@@ -1769,7 +1769,7 @@ typedef struct { u16 __; u8 _; } __packed x24;unsigned s; \ \for (s =0 ; s < len; s++) { \ -u8 chr = font8x16[text[s] *16 + line]; \ +u8 chr = font8x16[(u8 )text[s] *16 + line]; \ \if (hdiv ==2 && tpg->hflip) { \ pos[3 ] = (chr & (0x01 <<6 ) ? fg : bg); \
drivers/media/common/videobuf2/videobuf2-core.c +3 -0
@@ -812,6 +812,9 @@ int vb2_core_create_bufs(struct vb2_queue *q, enum vb2_memory memory,memset (q->alloc_devs,0 ,sizeof (q->alloc_devs)); q->memory = memory; q->waiting_for_buffers = !q->is_output; + }else if (q->memory != memory) { +dprintk (1 ,"memory model mismatch\n" ); +return -EINVAL ; } num_buffers =min (*count,VB2_MAX_FRAME - q->num_buffers);
drivers/media/i2c/imx274.c +5 -2
@@ -619,16 +619,19 @@ static int imx274_write_table(struct stimx274 *priv, const struct reg_8 table[])static inline int imx274_read_reg (struct stimx274 *priv,u16 addr,u8 *val) { +unsigned int uint_val;int err; - err =regmap_read (priv->regmap, addr, (unsigned int *)val); + err =regmap_read (priv->regmap, addr, &uint_val);if (err)dev_err (&priv->client->dev,"%s : i2c read failed, addr = %x\n" , __func__, addr);else dev_dbg (&priv->client->dev,"%s : addr 0x%x, val=0x%x\n" , __func__, - addr, *val); + addr, uint_val); + + *val = uint_val;return err; }
drivers/media/i2c/ov5640.c +8 -9
@@ -2020,6 +2020,7 @@ static int ov5640_set_fmt(struct v4l2_subdev *sd,struct ov5640_dev *sensor =to_ov5640_dev (sd);const struct ov5640_mode_info *new_mode;struct v4l2_mbus_framefmt *mbus_fmt = &format->format; +struct v4l2_mbus_framefmt *fmt;int ret;if (format->pad !=0 )
@@ -2037,22 +2038,20 @@ static int ov5640_set_fmt(struct v4l2_subdev *sd,if (ret) goto out; -if (format->which ==V4L2_SUBDEV_FORMAT_TRY ) { -struct v4l2_mbus_framefmt *fmt = -v4l2_subdev_get_try_format (sd, cfg,0 ); +if (format->which ==V4L2_SUBDEV_FORMAT_TRY ) + fmt =v4l2_subdev_get_try_format (sd, cfg,0 ); +else + fmt = &sensor->fmt; - *fmt = *mbus_fmt; - goto out; - } + *fmt = *mbus_fmt;if (new_mode != sensor->current_mode) { sensor->current_mode = new_mode; sensor->pending_mode_change = true; } -if (mbus_fmt->code != sensor->fmt.code) { - sensor->fmt = *mbus_fmt; +if (mbus_fmt->code != sensor->fmt.code) sensor->pending_fmt_change = true; - } + out:mutex_unlock (&sensor->lock);return ret;
drivers/media/platform/vim2m.c +2 -1
@@ -805,10 +805,11 @@ static int vim2m_start_streaming(struct vb2_queue *q, unsigned count)static void vim2m_stop_streaming (struct vb2_queue *q) {struct vim2m_ctx *ctx =vb2_get_drv_priv (q); +struct vim2m_dev *dev = ctx->dev;struct vb2_v4l2_buffer *vbuf;unsigned long flags; -flush_scheduled_work (); +cancel_delayed_work_sync (&dev->work_run);for (;;) {if (V4L2_TYPE_IS_OUTPUT (q->type)) vbuf =v4l2_m2m_src_buf_remove (ctx->fh.m2m_ctx);
drivers/media/platform/vivid/vivid-vid-cap.c +2 -0
@@ -449,6 +449,8 @@ void vivid_update_format_cap(struct vivid_dev *dev, bool keep_controls)tpg_s_rgb_range (&dev->tpg,v4l2_ctrl_g_ctrl (dev->rgb_range_cap));break ; } +vfree (dev->bitmap_cap); + dev->bitmap_cap =NULL ;vivid_update_quality (dev);tpg_reset_source (&dev->tpg, dev->src_rect.width, dev->src_rect.height, dev->field_cap); dev->crop_cap = dev->src_rect;
drivers/media/rc/rc-main.c +4 -2
@@ -695,7 +695,8 @@ void rc_repeat(struct rc_dev *dev) (dev->last_toggle ? LIRC_SCANCODE_FLAG_TOGGLE : 0) }; -ir_lirc_scancode_event (dev, &sc); +if (dev->allowed_protocols !=RC_PROTO_BIT_CEC ) +ir_lirc_scancode_event (dev, &sc);spin_lock_irqsave (&dev->keylock, flags);
@@ -735,7 +736,8 @@ static void ir_do_keydown(struct rc_dev *dev, enum rc_proto protocol, .keycode = keycode }; -ir_lirc_scancode_event (dev, &sc); +if (dev->allowed_protocols !=RC_PROTO_BIT_CEC ) +ir_lirc_scancode_event (dev, &sc);if (new_event && dev->keypressed)ir_do_keyup (dev, false);
drivers/media/usb/dvb-usb-v2/usb_urb.c +2 -3
@@ -155,7 +155,6 @@ static int usb_urb_alloc_bulk_urbs(struct usb_data_stream *stream) stream->props.u.bulk.buffersize, usb_urb_complete, stream); - stream->urb_list[i]->transfer_flags =URB_FREE_BUFFER ; stream->urbs_initialized++; }return 0 ;
@@ -186,7 +185,7 @@ static int usb_urb_alloc_isoc_urbs(struct usb_data_stream *stream) urb->complete = usb_urb_complete; urb->pipe =usb_rcvisocpipe (stream->udev, stream->props.endpoint); - urb->transfer_flags =URB_ISO_ASAP |URB_FREE_BUFFER ; + urb->transfer_flags =URB_ISO_ASAP ; urb->interval = stream->props.u.isoc.interval; urb->number_of_packets = stream->props.u.isoc.framesperurb; urb->transfer_buffer_length = stream->props.u.isoc.framesize *
@@ -210,7 +209,7 @@ static int usb_free_stream_buffers(struct usb_data_stream *stream)if (stream->state &USB_STATE_URB_BUF ) {while (stream->buf_num) { stream->buf_num--; - stream->buf_list[stream->buf_num] =NULL ; +kfree (stream->buf_list[stream->buf_num]); } }
drivers/media/v4l2-core/v4l2-fwnode.c +2 -2
@@ -310,8 +310,8 @@ v4l2_fwnode_endpoint_parse_parallel_bus(struct fwnode_handle *fwnode, }if (!fwnode_property_read_u32 (fwnode,"data-active" , &v)) { - flags &= ~(V4L2_MBUS_PCLK_SAMPLE_RISING | -V4L2_MBUS_PCLK_SAMPLE_FALLING ); + flags &= ~(V4L2_MBUS_DATA_ACTIVE_HIGH | +V4L2_MBUS_DATA_ACTIVE_LOW ); flags |= v ?V4L2_MBUS_DATA_ACTIVE_HIGH :V4L2_MBUS_DATA_ACTIVE_LOW ;pr_debug ("data-active %s\n" , v ?"high" :"low" );
drivers/misc/ocxl/config.c +1 -1
@@ -318,7 +318,7 @@ static int read_afu_name(struct pci_dev *dev, struct ocxl_fn_config *fn,if (rc)return rc; ptr = (u32 *) &afu->name[i]; - *ptr = val; + *ptr =le32_to_cpu ((__force __le32 ) val); } afu->name[OCXL_AFU_NAME_SZ -1 ] ='\0' ;/* play safe */ return 0 ;
drivers/misc/ocxl/link.c +1 -1
@@ -566,7 +566,7 @@ int ocxl_link_update_pe(void *link_handle, int pasid, __u16 tid)mutex_lock (&spa->spa_lock); - pe->tid = tid; + pe->tid =cpu_to_be32 (tid);/* * The barrier makes sure the PE is updated
drivers/mtd/nand/raw/marvell_nand.c +14 -3
@@ -514,9 +514,14 @@ static void marvell_nfc_enable_int(struct marvell_nfc *nfc, u32 int_mask)writel_relaxed (reg & ~int_mask, nfc->regs +NDCR ); } -static void marvell_nfc_clear_int (struct marvell_nfc *nfc,u32 int_mask) +static u32 marvell_nfc_clear_int (struct marvell_nfc *nfc,u32 int_mask) { +u32 reg; + + reg =readl_relaxed (nfc->regs +NDSR );writel_relaxed (int_mask, nfc->regs +NDSR ); + +return reg & int_mask; } static void marvell_nfc_force_byte_access(struct nand_chip *chip,
@@ -683,6 +688,7 @@ static int marvell_nfc_wait_cmdd(struct nand_chip *chip)static int marvell_nfc_wait_op (struct nand_chip *chip,unsigned int timeout_ms) {struct marvell_nfc *nfc =to_marvell_nfc (chip->controller); +u32 pending;int ret;/* Timeout is expressed in ms */
@@ -695,8 +701,13 @@ static int marvell_nfc_wait_op(struct nand_chip *chip, unsigned int timeout_ms) ret =wait_for_completion_timeout (&nfc->complete,msecs_to_jiffies (timeout_ms));marvell_nfc_disable_int (nfc,NDCR_RDYM ); -marvell_nfc_clear_int (nfc,NDSR_RDY (0 ) |NDSR_RDY (1 )); -if (!ret) { + pending =marvell_nfc_clear_int (nfc,NDSR_RDY (0 ) |NDSR_RDY (1 )); + +/* +* In case the interrupt was not served in the required time frame, +* check if the ISR was not served or if something went actually wrong. +*/ +if (ret && !pending) {dev_err (nfc->dev,"Timeout waiting for RB signal\n" );return -ETIMEDOUT ; }
drivers/mtd/nand/raw/nand_jedec.c +2 -0
@@ -107,6 +107,8 @@ int nand_jedec_detect(struct nand_chip *chip)pr_warn ("Invalid codeword size\n" ); } + ret =1 ; + free_jedec_param_page:kfree (p);return ret;
drivers/mtd/nand/raw/omap2.c +1 -1
@@ -1944,7 +1944,7 @@ static int omap_nand_attach_chip(struct nand_chip *chip)case NAND_OMAP_PREFETCH_DMA :dma_cap_zero (mask);dma_cap_set (DMA_SLAVE , mask); - info->dma =dma_request_chan (dev,"rxtx" ); + info->dma =dma_request_chan (dev->parent,"rxtx" );if (IS_ERR (info->dma)) {dev_err (dev,"DMA engine request failed\n" );
drivers/mtd/spi-nor/Kconfig +1 -1
@@ -41,7 +41,7 @@ config SPI_ASPEED_SMC config SPI_ATMEL_QUADSPI tristate "Atmel Quad SPI Controller" - depends on ARCH_AT91 || (ARM && COMPILE_TEST) + depends on ARCH_AT91 || (ARM && COMPILE_TEST && !ARCH_EBSA110) depends on OF && HAS_IOMEM help This enables support for the Quad SPI controller in master mode.
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c +10 -4
@@ -9360,10 +9360,16 @@ void bnx2x_chip_cleanup(struct bnx2x *bp, int unload_mode, bool keep_link)BNX2X_ERR ("Failed to schedule DEL commands for UC MACs list: %d\n" , rc); -/* Remove all currently configured VLANs */ - rc =bnx2x_del_all_vlans (bp); -if (rc <0 ) -BNX2X_ERR ("Failed to delete all VLANs\n" ); +/* The whole *vlan_obj structure may be not initialized if VLAN +* filtering offload is not supported by hardware. Currently this is +* true for all hardware covered by CHIP_IS_E1x(). +*/ +if (!CHIP_IS_E1x (bp)) { +/* Remove all currently configured VLANs */ + rc =bnx2x_del_all_vlans (bp); +if (rc <0 ) +BNX2X_ERR ("Failed to delete all VLANs\n" ); + }/* Disable LLH */ if (!CHIP_IS_E1 (bp))
drivers/net/ethernet/ibm/ibmveth.c +5 -1
@@ -1171,11 +1171,15 @@ static netdev_tx_t ibmveth_start_xmit(struct sk_buff *skb, map_failed_frags: last = i+1 ; -for (i =0 ; i < last; i++) +for (i =1 ; i < last; i++)dma_unmap_page (&adapter->vdev->dev, descs[i].fields.address, descs[i].fields.flags_len &IBMVETH_BUF_LEN_MASK ,DMA_TO_DEVICE ); +dma_unmap_single (&adapter->vdev->dev, + descs[0 ].fields.address, + descs[0 ].fields.flags_len &IBMVETH_BUF_LEN_MASK , +DMA_TO_DEVICE ); map_failed:if (!firmware_has_feature (FW_FEATURE_CMO ))netdev_err (netdev,"tx: unable to map xmit buffer\n" );
drivers/net/hamradio/6pack.c +4 -12
@@ -523,10 +523,7 @@ static void resync_tnc(struct timer_list *t)/* Start resync timer again -- the TNC might be still absent */ - -del_timer (&sp->resync_t); - sp->resync_t.expires = jiffies +SIXP_RESYNC_TIMEOUT ; -add_timer (&sp->resync_t); +mod_timer (&sp->resync_t, jiffies +SIXP_RESYNC_TIMEOUT ); }static inline int tnc_init (struct sixpack *sp)
@@ -537,9 +534,7 @@ static inline int tnc_init(struct sixpack *sp) sp->tty->ops->write (sp->tty, &inbyte,1 ); -del_timer (&sp->resync_t); - sp->resync_t.expires = jiffies +SIXP_RESYNC_TIMEOUT ; -add_timer (&sp->resync_t); +mod_timer (&sp->resync_t, jiffies +SIXP_RESYNC_TIMEOUT );return 0 ; }
@@ -897,11 +892,8 @@ static void decode_prio_command(struct sixpack *sp, unsigned char cmd)/* if the state byte has been received, the TNC is present, so the resync timer can be reset. */ -if (sp->tnc_state ==TNC_IN_SYNC ) { -del_timer (&sp->resync_t); - sp->resync_t.expires = jiffies +SIXP_INIT_RESYNC_TIMEOUT ; -add_timer (&sp->resync_t); - } +if (sp->tnc_state ==TNC_IN_SYNC ) +mod_timer (&sp->resync_t, jiffies +SIXP_INIT_RESYNC_TIMEOUT ); sp->status1 = cmd &SIXP_PRIO_DATA_MASK ; }
drivers/net/tap.c +1 -2
@@ -1177,8 +1177,6 @@ static int tap_get_user_xdp(struct tap_queue *q, struct xdp_buff *xdp) goto err_kfree; } -skb_probe_transport_header (skb,ETH_HLEN ); -/* Move network header to the right position for VLAN tagged packets */ if ((skb->protocol == htons(ETH_P_8021Q) || skb->protocol == htons(ETH_P_8021AD)) &&
@@ -1189,6 +1187,7 @@ static int tap_get_user_xdp(struct tap_queue *q, struct xdp_buff *xdp) tap =rcu_dereference (q->tap);if (tap) { skb->dev = tap->dev; +skb_probe_transport_header (skb,ETH_HLEN );dev_queue_xmit (skb); }else {kfree_skb (skb);
drivers/net/wan/x25_asy.c +2 -0
@@ -485,8 +485,10 @@ static int x25_asy_open(struct net_device *dev)/* Cleanup */ kfree (sl->xbuff); + sl->xbuff =NULL ; noxbuff:kfree (sl->rbuff); + sl->rbuff =NULL ; norbuff:return -ENOMEM ; }
drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +9 -2
@@ -5196,10 +5196,17 @@ static struct cfg80211_ops brcmf_cfg80211_ops = { .del_pmk = brcmf_cfg80211_del_pmk, }; -struct cfg80211_ops *brcmf_cfg80211_get_ops (void ) +struct cfg80211_ops *brcmf_cfg80211_get_ops (struct brcmf_mp_device *settings) { -return kmemdup (&brcmf_cfg80211_ops,sizeof (brcmf_cfg80211_ops), +struct cfg80211_ops *ops; + + ops =kmemdup (&brcmf_cfg80211_ops,sizeof (brcmf_cfg80211_ops),GFP_KERNEL ); + +if (ops && settings->roamoff) + ops->update_connect_params =NULL ; + +return ops; } struct brcmf_cfg80211_vif *brcmf_alloc_vif(struct brcmf_cfg80211_info *cfg,
drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.h +1 -1
@@ -404,7 +404,7 @@ struct brcmf_cfg80211_info *brcmf_cfg80211_attach(struct brcmf_pub *drvr,void brcmf_cfg80211_detach (struct brcmf_cfg80211_info *cfg);s32 brcmf_cfg80211_up (struct net_device *ndev);s32 brcmf_cfg80211_down (struct net_device *ndev); -struct cfg80211_ops *brcmf_cfg80211_get_ops (void ); +struct cfg80211_ops *brcmf_cfg80211_get_ops (struct brcmf_mp_device *settings);enum nl80211_iftype brcmf_cfg80211_get_iftype (struct brcmf_if *ifp); struct brcmf_cfg80211_vif *brcmf_alloc_vif(struct brcmf_cfg80211_info *cfg,
drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c +1 -1
@@ -1130,7 +1130,7 @@ int brcmf_attach(struct device *dev, struct brcmf_mp_device *settings)brcmf_dbg (TRACE ,"Enter\n" ); - ops =brcmf_cfg80211_get_ops (); + ops =brcmf_cfg80211_get_ops (settings);if (!ops)return -ENOMEM ;
drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c +6 -2
@@ -641,8 +641,9 @@ brcmf_fw_alloc_request(u32 chip, u32 chiprev,struct brcmf_fw_request *fwreq;char chipname[12 ];const char *mp_path; +size_t mp_path_len;u32 i, j; -char end; +char end ='\0' ;size_t reqsz;for (i =0 ; i < table_size; i++) {
@@ -667,7 +668,10 @@ brcmf_fw_alloc_request(u32 chip, u32 chiprev, mapping_table[i].fw_base, chipname); mp_path = brcmf_mp_global.firmware_path; - end = mp_path[strlen (mp_path) -1 ]; + mp_path_len =strnlen (mp_path,BRCMF_FW_ALTPATH_LEN ); +if (mp_path_len) + end = mp_path[mp_path_len -1 ]; + fwreq->n_items = n_fwnames;for (j =0 ; j < n_fwnames; j++) {
drivers/net/wireless/intel/iwlwifi/pcie/drv.c +50 -0
56 lines not on this page · raw message
drivers/rtc/rtc-m41t80.c +1 -1
@@ -393,7 +393,7 @@ static int m41t80_read_alarm(struct device *dev, struct rtc_wkalrm *alrm) alrm->time.tm_min =bcd2bin (alarmvals[3 ] &0x7f ); alrm->time.tm_hour =bcd2bin (alarmvals[2 ] &0x3f ); alrm->time.tm_mday =bcd2bin (alarmvals[1 ] &0x3f ); - alrm->time.tm_mon =bcd2bin (alarmvals[0 ] &0x3f ); + alrm->time.tm_mon =bcd2bin (alarmvals[0 ] &0x3f ) -1 ; alrm->enabled = !!(alarmvals[0 ] &M41T80_ALMON_AFE ); alrm->pending = (flags &M41T80_FLAGS_AF ) && alrm->enabled;
drivers/spi/spi-bcm2835.c +7 -9
@@ -88,7 +88,7 @@ struct bcm2835_spi {u8 *rx_buf;int tx_len;int rx_len; -bool dma_pending; +unsigned int dma_pending; };static inline u32 bcm2835_rd (struct bcm2835_spi *bs,unsigned reg)
@@ -155,8 +155,7 @@ static irqreturn_t bcm2835_spi_interrupt(int irq, void *dev_id)/* Write as many bytes as possible to FIFO */ bcm2835_wr_fifo (bs); -/* based on flags decide if we can finish the transfer */ -if (bcm2835_rd (bs,BCM2835_SPI_CS ) &BCM2835_SPI_CS_DONE ) { +if (!bs->rx_len) {/* Transfer complete - reset SPI HW */ bcm2835_spi_reset_hw (master);/* wake up the framework */
@@ -233,10 +232,9 @@ static void bcm2835_spi_dma_done(void *data)* is called the tx-dma must have finished - can't get to this * situation otherwise... */ -dmaengine_terminate_all (master->dma_tx); - -/* mark as no longer pending */ - bs->dma_pending =0 ; +if (cmpxchg (&bs->dma_pending, true, false)) { +dmaengine_terminate_all (master->dma_tx); + }/* and mark as completed */ ;complete (&master->xfer_completion);
@@ -342,6 +340,7 @@ static int bcm2835_spi_transfer_one_dma(struct spi_master *master,if (ret) {/* need to reset on errors */ dmaengine_terminate_all (master->dma_tx); + bs->dma_pending = false;bcm2835_spi_reset_hw (master);return ret; }
@@ -617,10 +616,9 @@ static void bcm2835_spi_handle_err(struct spi_master *master,struct bcm2835_spi *bs =spi_master_get_devdata (master);/* if an error occurred and we have an active dma, then terminate */ -if (bs->dma_pending) { +if (cmpxchg (&bs->dma_pending, true, false)) {dmaengine_terminate_all (master->dma_tx);dmaengine_terminate_all (master->dma_rx); - bs->dma_pending =0 ; }/* and reset */ bcm2835_spi_reset_hw (master);
drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c +0 -1
@@ -143,7 +143,6 @@ vc_vchi_audio_init(VCHI_INSTANCE_T vchi_instance,dev_err (instance->dev,"failed to open VCHI service connection (status=%d)\n" , status); -kfree (instance);return -EPERM ; }
drivers/staging/wilc1000/wilc_sdio.c +1 -0
@@ -841,6 +841,7 @@ static int sdio_read_int(struct wilc *wilc, u32 *int_status)if (!sdio_priv->irq_gpio) {int i; + cmd.read_write =0 ; cmd.function =1 ; cmd.address =0x04 ; cmd.data =0 ;
drivers/tty/serial/xilinx_uartps.c +2 -2
@@ -123,7 +123,7 @@ MODULE_PARM_DESC(rx_timeout, "Rx timeout, 1-255");#define CDNS_UART_IXR_RXTRIG 0x00000001/* RX FIFO trigger interrupt */ #define CDNS_UART_IXR_RXFULL 0x00000004/* RX FIFO full interrupt. */ #define CDNS_UART_IXR_RXEMPTY 0x00000002/* RX FIFO empty interrupt. */ -#define CDNS_UART_IXR_MASK 0x00001FFF/* Valid bit mask */ +#define CDNS_UART_IXR_RXMASK 0x000021e7/* Valid RX bit mask */ /* * Do not enable parity error interrupt for the following
@@ -364,7 +364,7 @@ static irqreturn_t cdns_uart_isr(int irq, void *dev_id)cdns_uart_handle_tx (dev_id); isrstatus &= ~CDNS_UART_IXR_TXEMPTY ; } -if (isrstatus &CDNS_UART_IXR_MASK ) +if (isrstatus &CDNS_UART_IXR_RXMASK )cdns_uart_handle_rx (dev_id, isrstatus);spin_unlock (&port->lock);
drivers/usb/Kconfig +0 -4
@@ -205,8 +205,4 @@ config USB_ULPI_BUS To compile this driver as a module, choose M here: the module will be called ulpi. -config USB_ROLE_SWITCH - tristate - select USB_COMMON - endif # USB_SUPPORT
drivers/usb/class/cdc-acm.c +10 -0
@@ -581,6 +581,13 @@ static int acm_tty_install(struct tty_driver *driver, struct tty_struct *tty)if (retval) goto error_init_termios; +/* +* Suppress initial echoing for some devices which might send data +* immediately after acm driver has been installed. +*/ +if (acm->quirks &DISABLE_ECHO ) + tty->termios.c_lflag &= ~ECHO ; + tty->driver_data = acm;return 0 ;
@@ -1657,6 +1664,9 @@ static const struct usb_device_id acm_ids[] = { { USB_DEVICE(0x0e8d, 0x0003), /* FIREFLY, MediaTek Inc; [email protected] */ .driver_info =NO_UNION_NORMAL ,/* has no union descriptor */ }, + { USB_DEVICE(0x0e8d, 0x2000), /* MediaTek Inc Preloader */ + .driver_info = DISABLE_ECHO, /* DISABLE ECHO in termios flag */ + }, { USB_DEVICE(0x0e8d, 0x3329), /* MediaTek Inc GPS */ .driver_info = NO_UNION_NORMAL, /* has no union descriptor */ },
drivers/usb/class/cdc-acm.h +1 -0
@@ -140,3 +140,4 @@ struct acm {#define QUIRK_CONTROL_LINE_STATE BIT(6)#define CLEAR_HALT_CONDITIONS BIT(7)#define SEND_ZERO_PACKET BIT(8) +#define DISABLE_ECHO BIT(9)
drivers/usb/common/Makefile +0 -1
@@ -9,4 +9,3 @@ usb-common-$(CONFIG_USB_LED_TRIG) += led.o obj-$(CONFIG_USB_OTG_FSM) += usb-otg-fsm.o obj-$(CONFIG_USB_ULPI_BUS) += ulpi.o -obj-$(CONFIG_USB_ROLE_SWITCH) += roles.o
drivers/usb/common/roles.c deleted +0 -314
314 lines not on this page · raw message
drivers/usb/dwc2/hcd.h +1 -1
@@ -366,7 +366,7 @@ struct dwc2_qh {u32 desc_list_sz;u32 *n_bytes;struct timer_list unreserve_timer; -struct timer_list wait_timer; +struct hrtimer wait_timer;struct dwc2_tt *dwc_tt;int ttport; unsigned tt_buffer_dirty:1;
drivers/usb/dwc2/hcd_queue.c +12 -7
@@ -59,7 +59,7 @@#define DWC2_UNRESERVE_DELAY (msecs_to_jiffies(5))/* If we get a NAK, wait this long before retrying */ -#define DWC2_RETRY_WAIT_DELAY (msecs_to_jiffies(1)) +#define DWC2_RETRY_WAIT_DELAY 1*1E6L/** * dwc2_periodic_channel_available() - Checks that a channel is available for a
@@ -1464,10 +1464,12 @@ static void dwc2_deschedule_periodic(struct dwc2_hsotg *hsotg,* qh back to the "inactive" list, then queues transactions. * * @t: Pointer to wait_timer in a qh. +* +* Return: HRTIMER_NORESTART to not automatically restart this timer. */ -static void dwc2_wait_timer_fn (struct timer_list *t) +static enum hrtimer_restart dwc2_wait_timer_fn (struct hrtimer *t) { -struct dwc2_qh *qh =from_timer (qh, t, wait_timer); + struct dwc2_qh *qh = container_of(t, struct dwc2_qh, wait_timer);struct dwc2_hsotg *hsotg = qh->hsotg;unsigned long flags;
@@ -1491,6 +1493,7 @@ static void dwc2_wait_timer_fn(struct timer_list *t) }spin_unlock_irqrestore (&hsotg->lock, flags); +return HRTIMER_NORESTART ; }/**
@@ -1521,7 +1524,8 @@ static void dwc2_qh_init(struct dwc2_hsotg *hsotg, struct dwc2_qh *qh,/* Initialize QH */ qh->hsotg = hsotg;timer_setup (&qh->unreserve_timer, dwc2_unreserve_timer_fn,0 ); -timer_setup (&qh->wait_timer, dwc2_wait_timer_fn,0 ); +hrtimer_init (&qh->wait_timer,CLOCK_MONOTONIC ,HRTIMER_MODE_REL ); + qh->wait_timer.function = &dwc2_wait_timer_fn; qh->ep_type = ep_type; qh->ep_is_in = ep_is_in;
@@ -1690,7 +1694,7 @@ void dwc2_hcd_qh_free(struct dwc2_hsotg *hsotg, struct dwc2_qh *qh)* won't do anything anyway, but we want it to finish before we free * memory. */ -del_timer_sync (&qh->wait_timer); +hrtimer_cancel (&qh->wait_timer);dwc2_host_put_tt_info (hsotg, qh->dwc_tt);
@@ -1716,6 +1720,7 @@ int dwc2_hcd_qh_add(struct dwc2_hsotg *hsotg, struct dwc2_qh *qh) {int status;u32 intr_mask; +ktime_t delay;if (dbg_qh (qh))dev_vdbg (hsotg->dev,"%s()\n" , __func__);
@@ -1734,8 +1739,8 @@ int dwc2_hcd_qh_add(struct dwc2_hsotg *hsotg, struct dwc2_qh *qh)list_add_tail (&qh->qh_list_entry, &hsotg->non_periodic_sched_waiting); qh->wait_timer_cancel = false; -mod_timer (&qh->wait_timer, - jiffies +DWC2_RETRY_WAIT_DELAY +1 ); + delay =ktime_set (0 ,DWC2_RETRY_WAIT_DELAY ); +hrtimer_start (&qh->wait_timer, delay,HRTIMER_MODE_REL ); }else {list_add_tail (&qh->qh_list_entry, &hsotg->non_periodic_sched_inactive);
drivers/usb/dwc2/params.c +1 -0
@@ -111,6 +111,7 @@ static void dwc2_set_amlogic_params(struct dwc2_hsotg *hsotg) p->phy_type =DWC2_PHY_TYPE_PARAM_UTMI ; p->ahbcfg =GAHBCFG_HBSTLEN_INCR8 <<GAHBCFG_HBSTLEN_SHIFT ; + p->power_down =DWC2_POWER_DOWN_PARAM_NONE ; }static void dwc2_set_amcc_params (struct dwc2_hsotg *hsotg)
drivers/usb/dwc3/dwc3-pci.c +4 -4
@@ -170,20 +170,20 @@ static int dwc3_pci_quirks(struct dwc3_pci *dwc)* put the gpio descriptors again here because the phy driver * might want to grab them, too. */ - gpio =devm_gpiod_get_optional (&pdev->dev,"cs" , -GPIOD_OUT_LOW ); + gpio =gpiod_get_optional (&pdev->dev,"cs" ,GPIOD_OUT_LOW );if (IS_ERR (gpio))return PTR_ERR (gpio);gpiod_set_value_cansleep (gpio,1 ); +gpiod_put (gpio); - gpio =devm_gpiod_get_optional (&pdev->dev,"reset" , -GPIOD_OUT_LOW ); + gpio =gpiod_get_optional (&pdev->dev,"reset" ,GPIOD_OUT_LOW );if (IS_ERR (gpio))return PTR_ERR (gpio);if (gpio) {gpiod_set_value_cansleep (gpio,1 ); +gpiod_put (gpio);usleep_range (10000 ,11000 ); } }
drivers/usb/host/r8a66597-hcd.c +4 -1
@@ -1979,6 +1979,8 @@ static int r8a66597_urb_dequeue(struct usb_hcd *hcd, struct urb *urb,static void r8a66597_endpoint_disable (struct usb_hcd *hcd,struct usb_host_endpoint *hep) +__acquires(r8a66597->lock) +__releases(r8a66597->lock) {struct r8a66597 *r8a66597 =hcd_to_r8a66597 (hcd);struct r8a66597_pipe *pipe = (struct r8a66597_pipe *)hep->hcpriv;
@@ -1991,13 +1993,14 @@ static void r8a66597_endpoint_disable(struct usb_hcd *hcd,return ; pipenum = pipe->info.pipenum; +spin_lock_irqsave (&r8a66597->lock, flags);if (pipenum ==0 ) {kfree (hep->hcpriv); hep->hcpriv =NULL ; +spin_unlock_irqrestore (&r8a66597->lock, flags);return ; } -spin_lock_irqsave (&r8a66597->lock, flags);pipe_stop (r8a66597, pipe);pipe_irq_disable (r8a66597, pipenum);disable_irq_empty (r8a66597, pipenum);
drivers/usb/roles/Kconfig +13 -0
@@ -1,3 +1,16 @@ +config USB_ROLE_SWITCH + tristate "USB Role Switch Support" + help + USB Role Switch is a device that can select the USB role - host or + device - for a USB port (connector). In most cases dual-role capable + USB controller will also represent the switch, but on some platforms + multiplexer/demultiplexer switch is used to route the data lines on + the USB connector between separate USB host and device controllers. + + Say Y here if your USB connectors support both device and host roles. + To compile the driver as module, choose M here: the module will be + called roles.ko. + if USB_ROLE_SWITCH config USB_ROLES_INTEL_XHCI
drivers/usb/roles/Makefile +3 -1
@@ -1 +1,3 @@ -obj-$(CONFIG_USB_ROLES_INTEL_XHCI) += intel-xhci-usb-role-switch.o +obj-$(CONFIG_USB_ROLE_SWITCH) += roles.o +roles-y := class.o +obj-$(CONFIG_USB_ROLES_INTEL_XHCI) += intel-xhci-usb-role-switch.o
drivers/usb/roles/class.c new file +314 -0
314 lines not on this page · raw message
drivers/usb/serial/option.c +4 -0
@@ -1955,6 +1955,10 @@ static const struct usb_device_id option_ids[] = { { USB_DEVICE_AND_INTERFACE_INFO(0x03f0, 0xa31d, 0xff, 0x06, 0x1b) }, { USB_DEVICE(0x1508, 0x1001), /* Fibocom NL668 */ .driver_info = RSVD(4) | RSVD(5) | RSVD(6) }, + { USB_DEVICE(0x2cb7, 0x0104), /* Fibocom NL678 series */ + .driver_info = RSVD(4) | RSVD(5) }, + { USB_DEVICE_INTERFACE_CLASS(0x2cb7, 0x0105, 0xff), /* Fibocom NL678 series */ + .driver_info = RSVD(6) }, { } /* Terminating entry */ };MODULE_DEVICE_TABLE (usb, option_ids);
drivers/usb/serial/pl2303.c +5 -0
@@ -91,9 +91,14 @@ static const struct usb_device_id id_table[] = { { USB_DEVICE(YCCABLE_VENDOR_ID, YCCABLE_PRODUCT_ID) }, { USB_DEVICE(SUPERIAL_VENDOR_ID, SUPERIAL_PRODUCT_ID) }, { USB_DEVICE(HP_VENDOR_ID, HP_LD220_PRODUCT_ID) }, + { USB_DEVICE(HP_VENDOR_ID, HP_LD220TA_PRODUCT_ID) }, { USB_DEVICE(HP_VENDOR_ID, HP_LD960_PRODUCT_ID) }, + { USB_DEVICE(HP_VENDOR_ID, HP_LD960TA_PRODUCT_ID) }, { USB_DEVICE(HP_VENDOR_ID, HP_LCM220_PRODUCT_ID) }, { USB_DEVICE(HP_VENDOR_ID, HP_LCM960_PRODUCT_ID) }, + { USB_DEVICE(HP_VENDOR_ID, HP_LM920_PRODUCT_ID) }, + { USB_DEVICE(HP_VENDOR_ID, HP_LM940_PRODUCT_ID) }, + { USB_DEVICE(HP_VENDOR_ID, HP_TD620_PRODUCT_ID) }, { USB_DEVICE(CRESSI_VENDOR_ID, CRESSI_EDY_PRODUCT_ID) }, { USB_DEVICE(ZEAGLE_VENDOR_ID, ZEAGLE_N2ITION3_PRODUCT_ID) }, { USB_DEVICE(SONY_VENDOR_ID, SONY_QN3USB_PRODUCT_ID) },
drivers/usb/serial/pl2303.h +5 -0
@@ -119,10 +119,15 @@/* Hewlett-Packard POS Pole Displays */ #define HP_VENDOR_ID 0x03f0 +#define HP_LM920_PRODUCT_ID 0x026b +#define HP_TD620_PRODUCT_ID 0x0956#define HP_LD960_PRODUCT_ID 0x0b39#define HP_LCM220_PRODUCT_ID 0x3139#define HP_LCM960_PRODUCT_ID 0x3239#define HP_LD220_PRODUCT_ID 0x3524 +#define HP_LD220TA_PRODUCT_ID 0x4349 +#define HP_LD960TA_PRODUCT_ID 0x4439 +#define HP_LM940_PRODUCT_ID 0x5039/* Cressi Edy (diving computer) PC interface */ #define CRESSI_VENDOR_ID 0x04b8
fs/btrfs/btrfs_inode.h +6 -0
@@ -146,6 +146,12 @@ struct btrfs_inode {*/ u64 last_unlink_trans; +/* +* Track the transaction id of the last transaction used to create a +* hard link for the inode. This is used by the log tree (fsync). +*/ +u64 last_link_trans; +/* * Number of bytes outstanding that are going to need csums. This is * used in ENOSPC accounting.
fs/btrfs/ctree.c +23 -6
@@ -2584,14 +2584,27 @@ static struct extent_buffer *btrfs_search_slot_get_root(struct btrfs_root *root, root_lock =BTRFS_READ_LOCK ;if (p->search_commit_root) { -/* The commit roots are read only so we always do read locks */ -if (p->need_commit_sem) +/* +* The commit roots are read only so we always do read locks, +* and we always must hold the commit_root_sem when doing +* searches on them, the only exception is send where we don't +* want to block transaction commits for a long time, so +* we need to clone the commit root in order to avoid races +* with transaction commits that create a snapshot of one of +* the roots used by a send operation. +*/ +if (p->need_commit_sem) {down_read (&fs_info->commit_root_sem); - b = root->commit_root; -extent_buffer_get (b); - level =btrfs_header_level (b); -if (p->need_commit_sem) + b =btrfs_clone_extent_buffer (root->commit_root);up_read (&fs_info->commit_root_sem); +if (!b) +return ERR_PTR (-ENOMEM ); + + }else { + b = root->commit_root; +extent_buffer_get (b); + } + level =btrfs_header_level (b);/* * Ensure that all callers have set skip_locking when * p->search_commit_root = 1.
@@ -2717,6 +2730,10 @@ int btrfs_search_slot(struct btrfs_trans_handle *trans, struct btrfs_root *root, again: prev_cmp =-1 ; b =btrfs_search_slot_get_root (root, p, write_lock_level); +if (IS_ERR (b)) { + ret =PTR_ERR (b); + goto done; + }while (b) { level =btrfs_header_level (b);
fs/btrfs/dev-replace.c +6 -0
@@ -884,6 +884,8 @@ int btrfs_resume_dev_replace_async(struct btrfs_fs_info *fs_info) "cannot continue dev_replace, tgtdev is missing");btrfs_info (fs_info,"you may cancel the operation after 'mount -o degraded'" ); + dev_replace->replace_state = +BTRFS_IOCTL_DEV_REPLACE_STATE_SUSPENDED ;btrfs_dev_replace_write_unlock (dev_replace);return 0 ; }
@@ -895,6 +897,10 @@ int btrfs_resume_dev_replace_async(struct btrfs_fs_info *fs_info)* dev-replace to start anyway. */ if (test_and_set_bit (BTRFS_FS_EXCL_OP , &fs_info->flags)) { +btrfs_dev_replace_write_lock (dev_replace); + dev_replace->replace_state = +BTRFS_IOCTL_DEV_REPLACE_STATE_SUSPENDED ; +btrfs_dev_replace_write_unlock (dev_replace);btrfs_info (fs_info,"cannot resume dev-replace, other exclusive operation running" );return 0 ;
fs/btrfs/extent-tree.c +4 -0
@@ -8944,6 +8944,10 @@ int btrfs_drop_snapshot(struct btrfs_root *root, goto out_free; } + err =btrfs_run_delayed_items (trans); +if (err) + goto out_end_trans; +if (block_rsv) trans->block_rsv = block_rsv;
fs/btrfs/inode.c +19 -1
@@ -1372,7 +1372,8 @@ static noinline int run_delalloc_nocow(struct inode *inode,* Do the same check as in btrfs_cross_ref_exist but * without the unnecessary search. */ -if (btrfs_file_extent_generation (leaf, fi) <= +if (!nolock && +btrfs_file_extent_generation (leaf, fi) <=btrfs_root_last_snapshot (&root->root_item)) goto out_check;if (extent_type ==BTRFS_FILE_EXTENT_REG && !force)
@@ -3686,6 +3687,21 @@ static int btrfs_read_locked_inode(struct inode *inode,* inode is not a directory, logging its parent unnecessarily. */ BTRFS_I (inode)->last_unlink_trans =BTRFS_I (inode)->last_trans;
Lines of this file are not shown. View the raw message.
fs/ext4/inode.c +44 -19
63 lines not on this page · raw message
fs/ext4/resize.c +40 -39
79 lines not on this page · raw message
fs/ext4/super.c +40 -15
55 lines not on this page · raw message
fs/ext4/xattr.c +40 -43
83 lines not on this page · raw message
sound/firewire/fireface/ff-protocol-ff400.c +1 -1
Lines of this file are not shown. View the raw message.
sound/soc/intel/boards/cht_bsw_max98090_ti.c +14 -0
Lines of this file are not shown. View the raw message.
tools/perf/util/scripting-engines/trace-event-python.c +8 -8
Lines of this file are not shown. View the raw message.
virt/kvm/arm/vgic/vgic-mmio.c +20 -24
44 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.