Linux 4.14.108
Greg KH
maintainerI'm announcing the release of the 4.14.108 kernel.
All users of the 4.14 kernel series must upgrade.
The updated 4.14.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.14.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
------------
Makefile | 2 arch/arc/Kconfig | 8 arch/arc/include/asm/entry-arcv2.h | 54 +++++ arch/arc/include/asm/uaccess.h | 8 arch/arc/kernel/entry-arcv2.S | 4 arch/arc/kernel/intc-arcv2.c | 2 arch/arc/lib/memcpy-archs.S | 14 - arch/arc/plat-hsdk/Kconfig | 1 arch/arm/Kconfig | 1 arch/arm/crypto/crct10dif-ce-core.S | 14 - arch/arm/crypto/crct10dif-ce-glue.c | 23 -- arch/arm/include/asm/irq.h | 1 arch/arm/kernel/irq.c | 62 ------ arch/arm/kernel/smp.c | 2 arch/arm/mach-omap2/cpuidle44xx.c | 16 - arch/arm/mach-omap2/display.c | 7 arch/arm/mach-s3c24xx/mach-osiris-dvs.c | 8 arch/arm64/crypto/aes-ce-ccm-core.S | 5 arch/arm64/crypto/aes-ce-ccm-glue.c | 4 arch/arm64/crypto/aes-neonbs-core.S | 5 arch/arm64/crypto/crct10dif-ce-glue.c | 25 -- arch/arm64/include/asm/hardirq.h | 31 +++ arch/arm64/kernel/head.S | 3 arch/arm64/kernel/irq.c | 3 arch/arm64/kernel/kgdb.c | 14 + arch/arm64/kernel/probes/kprobes.c | 6 arch/arm64/kvm/reset.c | 26 ++ arch/arm64/kvm/sys_regs.c | 2 arch/m68k/Makefile | 5 arch/mips/include/asm/kvm_host.h | 2 arch/powerpc/include/asm/book3s/64/hugetlb.h | 8 arch/powerpc/include/asm/kvm_host.h | 2 arch/powerpc/kernel/entry_32.S | 9 arch/powerpc/kernel/process.c | 2 arch/powerpc/kernel/ptrace.c | 10 - arch/powerpc/kernel/traps.c | 12 - arch/powerpc/platforms/83xx/suspend-asm.S | 34 ++- arch/powerpc/platforms/embedded6xx/wii.c | 4 arch/powerpc/platforms/powernv/opal-msglog.c | 2 arch/s390/include/asm/kvm_host.h | 2 arch/s390/kernel/setup.c | 31 ++- arch/x86/include/asm/kvm_host.h | 2 arch/x86/kernel/kprobes/opt.c | 5 arch/x86/kvm/mmu.c | 23 ++ arch/x86/kvm/vmx.c | 41 +++- arch/x86/kvm/x86.c | 4 arch/x86/kvm/x86.h | 7 arch/x86/xen/mmu_pv.c | 13 - crypto/ahash.c | 42 ++-- crypto/pcbc.c | 14 - crypto/shash.c | 18 + crypto/testmgr.c | 14 + drivers/acpi/device_sysfs.c | 6 drivers/acpi/nfit/core.c | 14 - drivers/auxdisplay/ht16k33.c | 2 drivers/base/power/wakeup.c | 8 drivers/block/floppy.c | 2 drivers/char/tpm/st33zp24/st33zp24.c | 2 drivers/char/tpm/tpm-interface.c | 11 + drivers/char/tpm/tpm_atmel.c | 2 drivers/char/tpm/tpm_crb.c | 22 +- drivers/char/tpm/tpm_i2c_atmel.c | 6 drivers/char/tpm/tpm_i2c_infineon.c | 2 drivers/char/tpm/tpm_i2c_nuvoton.c | 2 drivers/char/tpm/tpm_ibmvtpm.c | 8 drivers/char/tpm/tpm_infineon.c | 2 drivers/char/tpm/tpm_nsc.c | 2 drivers/char/tpm/tpm_tis_core.c | 2 drivers/char/tpm/tpm_vtpm_proxy.c | 3 drivers/char/tpm/xen-tpmfront.c | 2 drivers/clk/clk-twl6040.c | 53 +++++ drivers/clk/ingenic/cgu.c | 10 - drivers/clk/ingenic/cgu.h | 2 drivers/clk/sunxi-ng/ccu-sun6i-a31.c | 4 drivers/clk/sunxi-ng/ccu-sun8i-v3s.c | 2 drivers/clk/uniphier/clk-uniphier-cpugear.c | 2 drivers/clocksource/exynos_mct.c | 23 +- drivers/cpufreq/pxa2xx-cpufreq.c | 4 drivers/cpufreq/tegra124-cpufreq.c | 2 drivers/crypto/caam/caamalg.c | 1 drivers/crypto/rockchip/rk3288_crypto.c | 2 drivers/crypto/rockchip/rk3288_crypto.h | 4 drivers/crypto/rockchip/rk3288_crypto_ablkcipher.c | 39 +++- drivers/crypto/rockchip/rk3288_crypto_ahash.c | 2 drivers/gpu/drm/i915/i915_gem.c | 3 drivers/gpu/drm/imx/imx-ldb.c | 25 +- drivers/gpu/drm/imx/ipuv3-plane.c | 4 drivers/gpu/drm/radeon/evergreen_cs.c | 1 drivers/gpu/ipu-v3/ipu-common.c | 8 drivers/hwtracing/intel_th/gth.c | 4 drivers/hwtracing/stm/core.c | 11 - drivers/i2c/busses/i2c-bcm2835.c | 12 + drivers/i2c/busses/i2c-cadence.c | 9 drivers/i2c/busses/i2c-tegra.c | 2 drivers/iio/adc/exynos_adc.c | 2 drivers/infiniband/hw/hfi1/hfi.h | 2 drivers/infiniband/hw/hfi1/init.c | 14 - drivers/input/keyboard/cap11xx.c | 35 +-- drivers/input/keyboard/matrix_keypad.c | 2 drivers/input/keyboard/st-keyscan.c | 4 drivers/input/misc/pwm-vibra.c | 19 +- drivers/input/serio/ps2-gpio.c | 1 drivers/irqchip/irq-gic-v3-its.c | 2 drivers/mailbox/bcm-flexrm-mailbox.c | 4 drivers/md/bcache/writeback.h | 3 drivers/md/dm-integrity.c | 8 drivers/md/raid10.c | 2 drivers/md/raid5.c | 2 drivers/media/platform/vimc/Makefile | 3 drivers/media/platform/vimc/vimc-capture.c | 18 - drivers/media/platform/vimc/vimc-common.c | 35 --- drivers/media/platform/vimc/vimc-common.h | 15 - drivers/media/platform/vimc/vimc-debayer.c | 26 -- drivers/media/platform/vimc/vimc-scaler.c | 28 -- drivers/media/platform/vimc/vimc-sensor.c | 56 +---- drivers/media/platform/vimc/vimc-streamer.c | 188 ++++++++++++++++++++ drivers/media/platform/vimc/vimc-streamer.h | 38 ++++ drivers/media/usb/uvc/uvc_video.c | 8 drivers/media/v4l2-core/videobuf2-v4l2.c | 1 drivers/misc/cxl/guest.c | 2 drivers/misc/cxl/pci.c | 39 +++- drivers/mmc/host/sdhci-esdhc-imx.c | 1 drivers/net/ethernet/atheros/atlx/atl2.c | 4 drivers/net/ethernet/broadcom/bcmsysport.c | 4 drivers/net/ethernet/cavium/thunder/nic_main.c | 2 drivers/net/ethernet/cavium/thunder/nicvf_main.c | 15 + drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c | 2 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 7 drivers/net/ethernet/marvell/mv643xx_eth.c | 7 drivers/net/ethernet/marvell/mvneta.c | 2 drivers/net/ethernet/netronome/nfp/bpf/jit.c | 17 - drivers/net/ethernet/qlogic/qed/qed_iwarp.c | 9 drivers/net/usb/qmi_wwan.c | 4 drivers/net/wireless/mac80211_hwsim.c | 2 drivers/net/wireless/marvell/libertas_tf/if_usb.c | 2 drivers/nvdimm/label.c | 23 +- drivers/nvdimm/namespace_devs.c | 4 drivers/nvdimm/pfn_devs.c | 4 drivers/parport/parport_pc.c | 2 drivers/pinctrl/meson/pinctrl-meson8b.c | 2 drivers/power/supply/cpcap-charger.c | 1 drivers/regulator/max77620-regulator.c | 10 - drivers/regulator/s2mpa01.c | 10 - drivers/regulator/s2mps11.c | 6 drivers/s390/block/dasd_eckd.c | 8 drivers/s390/virtio/virtio_ccw.c | 4 drivers/scsi/aacraid/linit.c | 13 - drivers/scsi/libiscsi.c | 6 drivers/scsi/sd.c | 59 +++++- drivers/scsi/virtio_scsi.c | 2 drivers/spi/spi-pxa2xx.c | 1 drivers/spi/spi-ti-qspi.c | 6 drivers/staging/media/imx/imx-ic-prpencvf.c | 26 +- drivers/staging/media/imx/imx-media-csi.c | 42 ++-- drivers/target/iscsi/iscsi_target.c | 4 drivers/tty/serial/8250/8250_of.c | 4 drivers/tty/serial/8250/8250_pci.c | 141 +++++++++++++-- drivers/tty/serial/xilinx_uartps.c | 8 drivers/usb/chipidea/ci_hdrc_tegra.c | 1 fs/9p/v9fs_vfs.h | 23 ++ fs/9p/vfs_file.c | 6 fs/9p/vfs_inode.c | 23 +- fs/9p/vfs_inode_dotl.c | 27 +- fs/9p/vfs_super.c | 4 fs/btrfs/acl.c | 9 fs/btrfs/extent_io.c | 4 fs/btrfs/volumes.c | 4 fs/cifs/file.c | 12 - fs/cifs/smb2misc.c | 17 + fs/cifs/smb2ops.c | 15 + fs/devpts/inode.c | 1 fs/ext2/super.c | 39 ++-- fs/ext4/ext4.h | 3 fs/ext4/ioctl.c | 6 fs/ext4/resize.c | 3 fs/jbd2/transaction.c | 33 ++- fs/kernfs/mount.c | 8 fs/nfs/nfs4idmap.c | 31 +-- fs/nfs/nfs4proc.c | 12 - fs/nfs/pagelist.c | 29 ++- fs/nfs/write.c | 11 - fs/nfsd/nfs3proc.c | 16 + fs/nfsd/nfs3xdr.c | 1 fs/nfsd/nfsctl.c | 2 fs/pipe.c | 14 + fs/splice.c | 4 include/asm-generic/vmlinux.lds.h | 2 include/keys/request_key_auth-type.h | 36 +++ include/linux/device-mapper.h | 2 include/linux/hardirq.h | 7 include/linux/key-type.h | 22 -- include/linux/kvm_host.h | 2 include/linux/pipe_fs_i.h | 1 include/linux/property.h | 2 include/net/phonet/pep.h | 5 init/main.c | 3 kernel/cgroup/cgroup.c | 9 kernel/rcu/tree.c | 20 +- kernel/sysctl.c | 11 + kernel/trace/trace.c | 1 kernel/trace/trace_events_hist.c | 5 lib/assoc_array.c | 8 mm/gup.c | 3 mm/memory-failure.c | 14 - mm/page_alloc.c | 8 mm/page_ext.c | 4 mm/shmem.c | 12 - mm/vmalloc.c | 2 net/9p/client.c | 2 net/ipv4/esp4.c | 2 net/ipv6/esp6.c | 2 net/key/af_key.c | 40 +--- net/mac80211/agg-tx.c | 4 net/netfilter/ipvs/Kconfig | 1 net/netfilter/ipvs/ip_vs_core.c | 10 - net/netfilter/ipvs/ip_vs_ctl.c | 10 + net/phonet/pep.c | 32 +-- security/keys/internal.h | 13 - security/keys/keyctl.c | 1 security/keys/process_keys.c | 1 security/keys/request_key.c | 72 +++---- security/keys/request_key_auth.c | 16 - security/selinux/hooks.c | 5 sound/soc/fsl/fsl_esai.c | 7 sound/soc/sh/rcar/ssi.c | 2 sound/soc/soc-dapm.c | 24 ++ sound/soc/soc-topology.c | 8 tools/perf/util/auxtrace.c | 4 tools/perf/util/auxtrace.h | 3 tools/perf/util/intel-pt-decoder/intel-pt-decoder.c | 37 +++ tools/perf/util/intel-pt.c | 2 virt/kvm/arm/mmu.c | 2 virt/kvm/kvm_main.c | 7 233 files changed, 1913 insertions(+), 936 deletions(-)
Aditya Pakki (1):
md: Fix failed allocation of md_register_thread
Adrian Hunter (4):
perf intel-pt: Fix CYC timestamp calculation after OVF perf auxtrace: Define auxtrace record alignment perf intel-pt: Fix overlap calculation for padding perf intel-pt: Fix divide by zero when TSC is not available
Al Viro (1):
fix cgroup_do_mount() handling of failure exits
Alexander Shishkin (2):
stm class: Prevent division by zero
intel_th: Don't reference unassigned outputs
Alexander Shiyan (1):
gpu: ipu-v3: Fix i.MX51 CSI control registers offset
Alexey Khoroshilov (1):
net: mv643xx_eth: disable clk on error path in mv643xx_eth_shared_probe()
Andre Przywara (1):
clk: sunxi: A31: Fix wrong AHB gate number
Andrea Claudi (1):
ipvs: fix dependency on nf_defrag_ipv6
Andy Shevchenko (2):
ACPI / device_sysfs: Avoid OF modalias creation for removed device
spi: pxa2xx: Setup maximum supported DMA transfer length
Aneesh Kumar K.V (1):
powerpc/hugetlb: Don't do runtime allocation of 16G pages in LPAR configuration
Anoob Soman (1):
scsi: libiscsi: Fix race between iscsi_xmit_task and iscsi_complete_task
Anssi Hannula (1):
serial: uartps: Fix stuck ISR if RX disabled with non-empty FIFO
Ard Biesheuvel (4):
crypto: arm/crct10dif - revert to C code for short inputs
crypto: arm64/crct10dif - revert to C code for short inputs
crypto: arm64/aes-ccm - fix logical bug in AAD MAC handling
crypto: arm64/aes-ccm - fix bugs in non-NEON fallback routine
Arnd Bergmann (2):
phonet: fix building with clang
cpufreq: pxa2xx: remove incorrect __init annotation
BOUGH CHEN (1):
mmc: sdhci-esdhc-imx: fix HS400 timing issue
Bard liao (1):
ASoC: topology: free created components in tplg load error
Bart Van Assche (1):
scsi: target/iscsi: Avoid iscsit_release_commands_from_conn() deadlock
Beniamino Galvani (1):
qmi_wwan: apply SET_DTR quirk to Sierra WP7607
Benjamin Coddington (1):
NFS: Don't use page_file_mapping after removing the page
Christoffer Dall (1):
KVM: arm/arm64: Reset the VCPU without preemption and vcpu state loaded
Christophe Leroy (5):
powerpc/32: Clear on-stack exception marker upon exception return powerpc/wii: properly disable use of BATs when requested. powerpc/83xx: Also save/restore SPRG4-7 during suspend powerpc/traps: fix recoverability of machine check handling on book3s/32 powerpc/traps: Fix the message printed when stack overflows
Dan Williams (2):
libnvdimm/label: Clear 'updating' flag after label-set update libnvdimm/pmem: Honor force_raw for legacy pmem regions
Daniel Axtens (1):
bcache: never writeback a discard operation
Darrick J. Wong (2):
tmpfs: fix link accounting when a tmpfile is linked in
tmpfs: fix uninitialized return value in shmem_link
Dave Martin (1):
arm64: KVM: Fix architecturally invalid reset value for FPEXC32_EL2
David Howells (2):
assoc_array: Fix shortcut creation
keys: Fix dependency loop between construction record and auth key
Dexuan Cui (1):
nfit: acpi_nfit_ctl(): Check out_obj->type in the right place
Dietmar Eggemann (1):
ARM: 8824/1: fix a migrating irq bug when hotplug cpu
Dmitry Osipenko (1):
usb: chipidea: tegra: Fix missed ci_hdrc_remove_device()
Dmitry Torokhov (3):
Input: cap11xx - switch to using set_brightness_blocking()
Input: ps2-gpio - flush TX work when closing port
Input: matrix_keypad - use flush_delayed_work()
Eric Biggers (5):
crypto: ahash - fix another early termination in hash walk
crypto: hash - set CRYPTO_TFM_NEED_KEY if ->setkey() fails
crypto: testmgr - skip crc32c context test for ahash algorithms
crypto: pcbc - remove bogus memcpy()s with src == dest
crypto: arm64/aes-neonbs - fix returning final keystream block
Eugeniy Paltsev (1):
ARCv2: lib: memcpy: fix doing prefetchw outside of buffer
Felipe Franciosi (1):
scsi: virtio_scsi: don't send sc payload with tmfs
Filipe Manana (2):
Btrfs: setup a nofs context for memory allocation at __btrfs_set_acl
Btrfs: fix corruption reading shared and compressed extents after hole punching
Finn Thain (1):
m68k: Add -ffreestanding to CFLAGS
Florian Fainelli (1):
net: systemport: Fix reception of BPDUs
Gabriel Fernandez (1):
Input: st-keyscan - fix potential zalloc NULL dereference
Greg Kroah-Hartman (1):
Linux 4.14.108
Gustavo A. R. Silva (2):
ARM: s3c24xx: Fix boolean expressions in osiris_dvs_notify drm/radeon/evergreen_cs: fix missing break in switch statement
Halil Pasic (1):
s390/virtio: handle find on invalid queue gracefully
Hans Verkuil (1):
media: videobuf2-v4l2: drop WARN_ON in vb2_warn_zero_bytesused()
Heikki Krogerus (1):
device property: Fix the length used in PROPERTY_ENTRY_STRING()
Hou Tao (1):
9p: use inode->i_lock to protect i_size_write() under 32-bit
Huang Zijiang (1):
net: hns: Fix object reference leaks in hns_dsaf_roce_reset()
Ilan Peer (1):
mac80211: Fix Tx aggregation session tear down with ITXQs
J. Bruce Fields (1):
security/selinux: fix SECURITY_LSM_NATIVE_LABELS on reused superblock
Jan Kara (2):
ext4: fix crash during online resizing
ext2: Fix underflow in ext2_max_size()
Jann Horn (2):
mm: page_alloc: fix ref bias in page_frag_alloc() for 1-byte allocs
splice: don't merge into linked buffers
Jarkko Sakkinen (2):
tpm/tpm_crb: Avoid unaligned reads in crb_recv()
tpm: Unify the send callback behaviour
Jay Dolan (2):
serial: 8250_pci: Fix number of ports for ACCES serial cards
serial: 8250_pci: Have ACCES cards that use the four port Pericom PI7C9X7954 chip use the pci_pericom_setup()
Jeff Kirsher (1):
ixgbe: fix older devices that do not support IXGBE_MRQC_L3L4TXSWEN
Jiong Wang (2):
nfp: bpf: fix code-gen bug on BPF_ALU | BPF_XOR | BPF_K
nfp: bpf: fix ALU32 high bits clearance bug
Johannes Thumshirn (1):
btrfs: ensure that a DUP or RAID1 block group has exactly two stripes
Jonathan Bakker (1):
Input: pwm-vibra - prevent unbalanced regulator
Jordan Niethe (1):
powerpc/powernv: Make opal log only readable by root
Josh Poimboeuf (1):
x86/unwind/orc: Fix ORC unwind table alignment
Juergen Gross (1):
xen: fix dom0 boot on huge systems
Julia Lawall (1):
drm/imx: imx-ldb: add missing of_node_puts
Julien Thierry (1):
arm64: Fix HCR.TGE status for NMI contexts
Krzysztof Kozlowski (2):
iio: adc: exynos-adc: Fix NULL pointer exception on unbind
regulator: s2mps11: Fix steps for buck7, buck8 and LDO35
Kunihiko Hayashi (1):
clk: uniphier: Fix update register for CPU-gear
Kuninori Morimoto (1):
ASoC: rsnd: fixup rsnd_ssi_master_clk_start() user count check
Li RongQing (1):
mac80211_hwsim: propagate genlmsg_reply return code
Lubomir Rintel (2):
libertas_tf: don't set URB_ZERO_PACKET on IN USB transfer
serial: 8250_of: assume reg-shift of 2 for mrvl,mmp-uart
Lucas A. M. Magalhães (1):
media: vimc: Add vimc-streamer for stream control
Mao Wenan (1):
net: set static variable an initial value in atl2_probe()
Mark Cave-Ayland (1):
powerpc: Fix 32-bit KVM-PR lockup and host crash with MacOS guest
Mark Zhang (1):
regulator: max77620: Initialize values for DT properties
Martin Blumenstingl (1):
pinctrl: meson: meson8b: fix the sdxc_a data 1..3 pins
Martin K. Petersen (1):
scsi: sd: Optimal I/O size should be a multiple of physical block size
Martin Schwidefsky (2):
s390/setup: fix early warning messages s390/setup: fix boot crash for machine without EDAT-1
Martin Willi (1):
esp: Skip TX bytes accounting when sending from a request socket
Masami Hiramatsu (1):
x86/kprobes: Prohibit probing on optprobe template code
Michael Ellerman (1):
powerpc/ptrace: Simplify vr_get/set() to avoid GCC warning
Michael J. Ruhl (1):
IB/hfi1: Close race condition on user context disable and close
Michal Kalderon (1):
qed: Fix iWARP syn packet mac address validation.
Miguel Ojeda (1):
auxdisplay: ht16k33: fix potential user-after-free on module unload
Mikulas Patocka (1):
dm integrity: limit the rate of error messages
NeilBrown (2):
dm: fix to_sector() for 32bit
nfsd: fix memory corruption caused by readdir
Oliver O'Halloran (1):
libnvdimm: Fix altmap reservation size calculation
Pankaj Gupta (1):
crypto: caam - fixed handling of sg list
Paul Cercueil (2):
clk: ingenic: Fix round_rate misbehaving with non-integer dividers
clk: ingenic: Fix doc of ingenic_cgu_div_info
Paul Kocialkowski (2):
i2c: bcm2835: Clear current buffer pointers and counts after a transfer
clk: sunxi-ng: v3s: Fix TCON reset de-assert bit
Pavel Machek (1):
cpcap-charger: generate events for userspace
Pavel Shilovsky (2):
CIFS: Do not reset lease state to NONE on lease break
CIFS: Fix read after write for files with read caching
Paweł Chmiel (1):
Input: pwm-vibra - stop regulator after disabling pwm, not before
Philipp Zabel (1):
drm/imx: ignore plane updates on disabled crtcs
Pierre-Louis Bossart (1):
ASoC: dapm: fix out-of-bounds accesses to DAPM lookup tables
Qian Cai (1):
Revert "mm: use early_pfn_to_nid in page_ext_init"
QiaoChong (1):
parport_pc: fix find_superio io compare code, should use equal test.
Rayagonda Kokatanur (1):
mailbox: bcm-flexrm-mailbox: Fix FlexRM ring flush timeout issue
Roman Penyaev (1):
mm/vmalloc: fix size check for remap_vmalloc_range_partial()
Russell King (2):
ARM: OMAP2+: fix lack of timer interrupts on CPU1 after hotplug
net: marvell: mvneta: fix DMA debug warning
S.j. Wang (1):
ASoC: fsl_esai: fix register setting issue in RIGHT_J mode
Sagar Biradar (1):
scsi: aacraid: Fix performance issue on logical drives
Sakari Ailus (1):
media: uvcvideo: Avoid NULL pointer dereference at the end of streaming
Sean Christopherson (6):
KVM: Call kvm_arch_memslots_updated() before updating memslots
KVM: x86/mmu: Detect MMIO generation wrap in any address space
KVM: x86/mmu: Do not cache MMIO accesses while memslots are in flux
KVM: nVMX: Sign extend displacements of VMX instr's mem operands
KVM: nVMX: Apply addr size mask to effective address for VMX instructions
KVM: nVMX: Ignore limit checks on VMX instructions using flat segments
Sean Tranchetti (1):
af_key: unconditionally clone on broadcast
Shubhrajyoti Datta (1):
i2c: cadence: Fix the hold bit setting
Sowjanya Komatineni (1):
i2c: tegra: fix maximum transfer size
Stefan Haberland (1):
s390/dasd: fix using offset into zero size array error
Steve Longerbeam (4):
gpu: ipu-v3: Fix CSI offsets for imx53
media: imx: prpencvf: Stop upstream before disabling IDMA channel
media: imx: csi: Disable CSI immediately after last EOF
media: imx: csi: Stop upstream before disabling IDMA channel
Stuart Menefy (3):
regulator: s2mpa01: Fix step values for some LDOs clocksource/drivers/exynos_mct: Move one-shot check from tick clear to ISR clocksource/drivers/exynos_mct: Clear timer interrupt when shutdown
Tom Zanussi (1):
tracing: Use strncpy instead of memcpy for string keys in hist triggers
Tony Lindgren (1):
clk: clk-twl6040: Fix imprecise external abort for pdmclk
Trond Myklebust (4):
NFS: Fix I/O request leakages
NFS: Fix an I/O request leakage in nfs_do_recoalesce
NFS: Don't recoalesce on error in nfs_pageio_complete_mirror() NFSv4.1: Reinitialise sequence results before retransmitting a request
Tvrtko Ursulin (1):
drm/i915: Relax mmap VMA check
Vadim Lomovtsev (1):
net: thunderx: make CFG_DONE message to run through generic send-ack sequence
Vaibhav Jain (1):
cxl: Wrap iterations over afu slices inside 'afu_list_lock'
Varad Gautam (1):
fs/devpts: always delete dcache dentry-s in dput()
Vignesh R (1):
spi: ti-qspi: Fix mmap read when more than one CS in use
Vineet Gupta (2):
ARC: uacces: remove lp_start, lp_end from clobber list
ARCv2: support manual regfile save on interrupts
Viresh Kumar (1):
PM / wakeup: Rework wakeup source timer cancellation
Vladimir Murzin (1):
arm64: Relax GIC version check during early boot
Wei Yang (1):
libnvdimm, pfn: Fix over-trim in trim_pfn_device()
Will Deacon (1):
arm64: debug: Ensure debug handlers check triggering exception level
Yangtao Li (1):
cpufreq: tegra124: add missing of_node_put()
Yihao Wu (1):
nfsd: fix wrong check in write_v4_end_grace()
Yizhuo (1):
ARM: OMAP2+: Variable "reg" in function omap4_dsi_mux_pads() could be uninitialized
Yu Zhao (1):
mm/gup: fix gup_pmd_range() for dax
Yufen Yu (1):
floppy: check_events callback should not return a negative number
Zenghui Yu (1):
irqchip/gic-v3-its: Avoid parsing _indirect_ twice for Device table
Zev Weiss (1):
kernel/sysctl.c: add missing range check in do_proc_dointvec_minmax_conv
Zhang Zhijie (2):
crypto: rockchip - fix scatterlist nents error
crypto: rockchip - update new iv to device in multiple operations
Zhang, Jun (1):
rcu: Do RCU GP kthread self-wakeup from softirq and interrupt
Zhi Jin (1):
stm class: Fix an endless loop in channel allocation
yangerkun (1):
ext4: add mask of ext4 flags to swap
zhangyi (F) (3):
tracing: Do not free iter->trace in fail path of tracing_open_pipe()
jbd2: clear dirty flag when revoking a buffer from an older transaction
jbd2: fix compile warning when using JBUFFER_TRACE
zhengbin (1):
9p/net: fix memory leak in p9_client_create
zhongjiang (1):
mm: hwpoison: fix thp split handing in soft_offline_in_use_page()
Greg KH
maintainerMakefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 4 PATCHLEVEL = 14 -SUBLEVEL = 107 +SUBLEVEL = 108 EXTRAVERSION = NAME = Petit Gorille
arch/arc/Kconfig +8 -0
@@ -417,6 +417,14 @@ config ARC_HAS_ACCL_REGS (also referred to as r58:r59). These can also be used by gcc as GPR so kernel needs to save/restore per process +config ARC_IRQ_NO_AUTOSAVE + bool "Disable hardware autosave regfile on interrupts" + default n + help + On HS cores, taken interrupt auto saves the regfile on stack. + This is programmable and can be optionally disabled in which case + software INTERRUPT_PROLOGUE/EPILGUE do the needed work + endif # ISA_ARCV2 endmenu # "ARC CPU Configuration"
arch/arc/include/asm/entry-arcv2.h +54 -0
66 lines not on this page · raw message
arch/arc/include/asm/uaccess.h +4 -4
@@ -207,7 +207,7 @@ raw_copy_from_user(void *to, const void __user *from, unsigned long n)*/ "=&r" (tmp), "+r" (to), "+r" (from) : - : "lp_count", "lp_start", "lp_end", "memory"); + : "lp_count", "memory"); return n; }
@@ -433,7 +433,7 @@ raw_copy_to_user(void __user *to, const void *from, unsigned long n)*/ "=&r" (tmp), "+r" (to), "+r" (from) : - : "lp_count", "lp_start", "lp_end", "memory"); + : "lp_count", "memory"); return n; }
@@ -653,7 +653,7 @@ static inline unsigned long __arc_clear_user(void __user *to, unsigned long n)" .previous \n" : "+r"(d_char), "+r"(res) : "i"(0) - : "lp_count", "lp_start", "lp_end", "memory"); + : "lp_count", "memory"); return res; }
@@ -686,7 +686,7 @@ __arc_strncpy_from_user(char *dst, const char __user *src, long count) " .previous \n" : "+r"(res), "+r"(dst), "+r"(src), "=r"(val) : "g"(-EFAULT), "r"(count) - : "lp_count", "lp_start", "lp_end", "memory"); + : "lp_count", "memory");return res; }
arch/arc/kernel/entry-arcv2.S +3 -1
@@ -209,7 +209,9 @@ restore_regs: ;####### Return from Intr ####### debug_marker_l1: - bbit1.nt r0, STATUS_DE_BIT, .Lintr_ret_to_delay_slot + ; bbit1.nt r0, STATUS_DE_BIT, .Lintr_ret_to_delay_slot + btst r0, STATUS_DE_BIT ; Z flag set if bit clear + bnz .Lintr_ret_to_delay_slot ; branch if STATUS_DE_BIT set .Lisr_ret_fast_path: ; Handle special case #1: (Entry via Exception, Return via IRQ)
arch/arc/kernel/intc-arcv2.c +2 -0
@@ -49,11 +49,13 @@ void arc_init_IRQ(void) *(unsigned int *)&ictrl =0 ; +#ifndef CONFIG_ARC_IRQ_NO_AUTOSAVE ictrl.save_nr_gpr_pairs =6 ;/* r0 to r11 (r12 saved manually) */ ictrl.save_blink =1 ; ictrl.save_lp_regs =1 ;/* LP_COUNT, LP_START, LP_END */ ictrl.save_u_to_u =0 ;/* user ctxt saved on kernel stack */ ictrl.save_idx_regs =1 ;/* JLI, LDI, EI */ +#endif WRITE_AUX (AUX_IRQ_CTRL , ictrl);
arch/arc/lib/memcpy-archs.S +0 -14
@@ -25,15 +25,11 @@ #endif #ifdef CONFIG_ARC_HAS_LL64 -# define PREFETCH_READ(RX) prefetch [RX, 56] -# define PREFETCH_WRITE(RX) prefetchw [RX, 64] # define LOADX(DST,RX) ldd.ab DST, [RX, 8] # define STOREX(SRC,RX) std.ab SRC, [RX, 8] # define ZOLSHFT 5 # define ZOLAND 0x1F #else -# define PREFETCH_READ(RX) prefetch [RX, 28] -# define PREFETCH_WRITE(RX) prefetchw [RX, 32] # define LOADX(DST,RX) ld.ab DST, [RX, 4] # define STOREX(SRC,RX) st.ab SRC, [RX, 4] # define ZOLSHFT 4
@@ -41,8 +37,6 @@ #endif ENTRY_CFI(memcpy) - prefetch [r1] ; Prefetch the read location - prefetchw [r0] ; Prefetch the write location mov.f 0, r2 ;;; if size is zero jz.d [blink]
@@ -72,8 +66,6 @@ ENTRY_CFI(memcpy) lpnz @.Lcopy32_64bytes ;; LOOP START LOADX (r6, r1) - PREFETCH_READ (r1) - PREFETCH_WRITE (r3) LOADX (r8, r1) LOADX (r10, r1) LOADX (r4, r1)
@@ -117,9 +109,7 @@ ENTRY_CFI(memcpy) lpnz @.Lcopy8bytes_1 ;; LOOP START ld.ab r6, [r1, 4] - prefetch [r1, 28] ;Prefetch the next read location ld.ab r8, [r1,4] - prefetchw [r3, 32] ;Prefetch the next write location SHIFT_1 (r7, r6, 24) or r7, r7, r5
@@ -162,9 +152,7 @@ ENTRY_CFI(memcpy) lpnz @.Lcopy8bytes_2 ;; LOOP START ld.ab r6, [r1, 4] - prefetch [r1, 28] ;Prefetch the next read location ld.ab r8, [r1,4] - prefetchw [r3, 32] ;Prefetch the next write location SHIFT_1 (r7, r6, 16) or r7, r7, r5
@@ -204,9 +192,7 @@ ENTRY_CFI(memcpy) lpnz @.Lcopy8bytes_3 ;; LOOP START ld.ab r6, [r1, 4] - prefetch [r1, 28] ;Prefetch the next read location ld.ab r8, [r1,4] - prefetchw [r3, 32] ;Prefetch the next write location SHIFT_1 (r7, r6, 8) or r7, r7, r5
arch/arc/plat-hsdk/Kconfig +1 -0
@@ -9,5 +9,6 @@ menuconfig ARC_SOC_HSDK bool "ARC HS Development Kit SOC" depends on ISA_ARCV2 select ARC_HAS_ACCL_REGS + select ARC_IRQ_NO_AUTOSAVE select CLK_HSDK select RESET_HSDK
arch/arm/Kconfig +1 -0
@@ -1447,6 +1447,7 @@ config NR_CPUS config HOTPLUG_CPU bool "Support for hot-pluggable CPUs" depends on SMP + select GENERIC_IRQ_MIGRATION help Say Y here to experiment with turning CPUs off and on. CPUs can be controlled through /sys/devices/system/cpu.
arch/arm/crypto/crct10dif-ce-core.S +7 -7
@@ -124,10 +124,10 @@ ENTRY(crc_t10dif_pmull) vext.8 q10, qzr, q0, #4 // receive the initial 64B data, xor the initial crc value - vld1.64 {q0-q1}, [arg2, :128]! - vld1.64 {q2-q3}, [arg2, :128]! - vld1.64 {q4-q5}, [arg2, :128]! - vld1.64 {q6-q7}, [arg2, :128]! + vld1.64 {q0-q1}, [arg2]! + vld1.64 {q2-q3}, [arg2]! + vld1.64 {q4-q5}, [arg2]! + vld1.64 {q6-q7}, [arg2]! CPU_LE( vrev64.8 q0, q0 ) CPU_LE( vrev64.8 q1, q1 ) CPU_LE( vrev64.8 q2, q2 )
@@ -167,7 +167,7 @@ CPU_LE( vrev64.8 q7, q7 ) _fold_64_B_loop: .macro fold64, reg1, reg2 - vld1.64 {q11-q12}, [arg2, :128]! + vld1.64 {q11-q12}, [arg2]! vmull.p64 q8, \reg1\()h, d21 vmull.p64 \reg1, \reg1\()l, d20
@@ -238,7 +238,7 @@ _16B_reduction_loop: vmull.p64 q7, d15, d21 veor.8 q7, q7, q8 - vld1.64 {q0}, [arg2, :128]! + vld1.64 {q0}, [arg2]! CPU_LE( vrev64.8 q0, q0 ) vswp d0, d1 veor.8 q7, q7, q0
@@ -335,7 +335,7 @@ _less_than_128: vmov.i8 q0, #0 vmov s3, arg1_low32 // get the initial crc value - vld1.64 {q7}, [arg2, :128]! + vld1.64 {q7}, [arg2]! CPU_LE( vrev64.8 q7, q7 ) vswp d14, d15 veor.8 q7, q7, q0
arch/arm/crypto/crct10dif-ce-glue.c +6 -17
@@ -35,26 +35,15 @@ static int crct10dif_update(struct shash_desc *desc, const u8 *data, unsigned int length) {u16 *crc =shash_desc_ctx (desc); -unsigned int l; -if (!may_use_simd ()) { - *crc =crc_t10dif_generic (*crc, data, length); +if (length >=CRC_T10DIF_PMULL_CHUNK_SIZE &&may_use_simd ()) { +kernel_neon_begin (); + *crc =crc_t10dif_pmull (*crc, data, length); +kernel_neon_end (); }else { -if (unlikely ((u32 )data %CRC_T10DIF_PMULL_CHUNK_SIZE )) { - l =min_t (u32, length,CRC_T10DIF_PMULL_CHUNK_SIZE - - ((u32 )data %CRC_T10DIF_PMULL_CHUNK_SIZE )); - - *crc =crc_t10dif_generic (*crc, data, l); - - length -= l; - data += l; - } -if (length >0 ) { -kernel_neon_begin (); - *crc =crc_t10dif_pmull (*crc, data, length); -kernel_neon_end (); - } + *crc =crc_t10dif_generic (*crc, data, length); } +return 0 ; }
arch/arm/include/asm/irq.h +0 -1
@@ -25,7 +25,6 @@#ifndef __ASSEMBLY__struct irqaction ;struct pt_regs ; -extern void migrate_irqs (void );extern void asm_do_IRQ (unsigned int ,struct pt_regs *);void handle_IRQ (unsigned int ,struct pt_regs *);
arch/arm/kernel/irq.c +0 -62
71 lines not on this page · raw message
arch/arm/kernel/smp.c +1 -1
@@ -254,7 +254,7 @@ int __cpu_disable(void)/* * OK - migrate IRQs away from this CPU */ -migrate_irqs (); +irq_migrate_all_off_this_cpu ();/* * Flush user cache and TLB mappings, and then remove this CPU
arch/arm/mach-omap2/cpuidle44xx.c +4 -12
@@ -152,6 +152,10 @@ static int omap_enter_idle_coupled(struct cpuidle_device *dev, mpuss_can_lose_context = (cx->mpu_state ==PWRDM_POWER_RET ) && (cx->mpu_logic_state ==PWRDM_POWER_OFF ); +/* Enter broadcast mode for periodic timers */ +tick_broadcast_enable (); + +/* Enter broadcast mode for one-shot timers */ tick_broadcast_enter ();/*
@@ -218,15 +222,6 @@ static int omap_enter_idle_coupled(struct cpuidle_device *dev,return index; } -/* -* For each cpu, setup the broadcast timer because local timers -* stops for the states above C1. -*/ -static void omap_setup_broadcast_timer (void *arg) -{ -tick_broadcast_enable (); -} -static struct cpuidle_driver omap4_idle_driver = { .name ="omap4_idle" , .owner =THIS_MODULE ,
@@ -319,8 +314,5 @@ int __init omap4_idle_init(void)if (!cpu_clkdm[0 ] || !cpu_clkdm[1 ])return -ENODEV ; -/* Configure the broadcast timer on each cpu */ -on_each_cpu (omap_setup_broadcast_timer,NULL ,1 ); -return cpuidle_register (idle_driver, cpu_online_mask); }
arch/arm/mach-omap2/display.c +6 -1
@@ -84,6 +84,7 @@ static int omap4_dsi_mux_pads(int dsi_id, unsigned lanes)u32 enable_mask, enable_shift;u32 pipd_mask, pipd_shift;u32 reg; +int ret;if (dsi_id ==0 ) { enable_mask =OMAP4_DSI1_LANEENABLE_MASK ;
@@ -99,7 +100,11 @@ static int omap4_dsi_mux_pads(int dsi_id, unsigned lanes)return -ENODEV ; } -regmap_read (omap4_dsi_mux_syscon,OMAP4_DSIPHY_SYSCON_OFFSET , ®); + ret =regmap_read (omap4_dsi_mux_syscon, +OMAP4_DSIPHY_SYSCON_OFFSET , + ®); +if (ret) +return ret; reg &= ~enable_mask; reg &= ~pipd_mask;
arch/arm/mach-s3c24xx/mach-osiris-dvs.c +4 -4
@@ -70,16 +70,16 @@ static int osiris_dvs_notify(struct notifier_block *nb,switch (val) {case CPUFREQ_PRECHANGE : -if (old_dvs & !new_dvs || - cur_dvs & !new_dvs) { +if ((old_dvs && !new_dvs) || + (cur_dvs && !new_dvs)) {pr_debug ("%s: exiting dvs\n" , __func__); cur_dvs = false;gpio_set_value (OSIRIS_GPIO_DVS ,1 ); }break ;case CPUFREQ_POSTCHANGE : -if (!old_dvs & new_dvs || - !cur_dvs & new_dvs) { +if ((!old_dvs && new_dvs) || + (!cur_dvs && new_dvs)) {pr_debug ("entering dvs\n" ); cur_dvs = true;gpio_set_value (OSIRIS_GPIO_DVS ,0 );
arch/arm64/crypto/aes-ce-ccm-core.S +3 -2
@@ -74,12 +74,13 @@ ENTRY(ce_aes_ccm_auth_data) beq 10f ext v0.16b, v0.16b, v0.16b, #1 /* rotate out the mac bytes */ b 7b -8: mov w7, w8 +8: cbz w8, 91f + mov w7, w8 add w8, w8, #16 9: ext v1.16b, v1.16b, v1.16b, #1 adds w7, w7, #1 bne 9b - eor v0.16b, v0.16b, v1.16b +91: eor v0.16b, v0.16b, v1.16b st1 {v0.16b}, [x0] 10: str w8, [x3] ret
arch/arm64/crypto/aes-ce-ccm-glue.c +1 -3
@@ -123,7 +123,7 @@ static void ccm_update_mac(struct crypto_aes_ctx *key, u8 mac[], u8 const in[], abytes -= added; } -while (abytes >AES_BLOCK_SIZE ) { +while (abytes >=AES_BLOCK_SIZE ) {__aes_arm64_encrypt (key->key_enc, mac, mac,num_rounds (key));crypto_xor (mac, in,AES_BLOCK_SIZE );
@@ -137,8 +137,6 @@ static void ccm_update_mac(struct crypto_aes_ctx *key, u8 mac[], u8 const in[], num_rounds(key));crypto_xor (mac, in, abytes); *macp = abytes; - }else { - *macp =0 ; } } }
arch/arm64/crypto/aes-neonbs-core.S +4 -1
@@ -940,7 +940,7 @@ CPU_LE( rev x8, x8 ) 8: next_ctr v0 cbnz x4, 99b -0: st1 {v0.16b}, [x5] + st1 {v0.16b}, [x5] ldp x29, x30, [sp], #16 ret
@@ -948,6 +948,9 @@ CPU_LE( rev x8, x8 ) * If we are handling the tail of the input (x6 != NULL), return the * final keystream block back to the caller. */ +0: cbz x6, 8b + st1 {v0.16b}, [x6] + b 8b 1: cbz x6, 8b st1 {v1.16b}, [x6] b 8b
arch/arm64/crypto/crct10dif-ce-glue.c +6 -19
@@ -36,26 +36,13 @@ static int crct10dif_update(struct shash_desc *desc, const u8 *data, unsigned int length) {u16 *crc =shash_desc_ctx (desc); -unsigned int l; -if (unlikely ((u64 )data %CRC_T10DIF_PMULL_CHUNK_SIZE )) { - l =min_t (u32, length,CRC_T10DIF_PMULL_CHUNK_SIZE - - ((u64 )data %CRC_T10DIF_PMULL_CHUNK_SIZE )); - - *crc =crc_t10dif_generic (*crc, data, l); - - length -= l; - data += l; - } - -if (length >0 ) { -if (may_use_simd ()) { -kernel_neon_begin (); - *crc =crc_t10dif_pmull (*crc, data, length); -kernel_neon_end (); - }else { - *crc =crc_t10dif_generic (*crc, data, length); - } +if (length >=CRC_T10DIF_PMULL_CHUNK_SIZE &&may_use_simd ()) { +kernel_neon_begin (); + *crc =crc_t10dif_pmull (*crc, data, length); +kernel_neon_end (); + }else { + *crc =crc_t10dif_generic (*crc, data, length); }return 0 ;
arch/arm64/include/asm/hardirq.h +31 -0
@@ -17,8 +17,12 @@#define __ASM_HARDIRQ_H#include <linux/cache.h> +#include <linux/percpu.h> #include <linux/threads.h> +#include <asm/barrier.h> #include <asm/irq.h> +#include <asm/kvm_arm.h> +#include <asm/sysreg.h> #define NR_IPI 7
@@ -37,6 +41,33 @@ u64 smp_irq_stat_cpu(unsigned int cpu);#define __ARCH_IRQ_EXIT_IRQS_DISABLED 1 +struct nmi_ctx { +u64 hcr; +}; + +DECLARE_PER_CPU(struct nmi_ctx, nmi_contexts); + +#define arch_nmi_enter () \ + do { \ + if (is_kernel_in_hyp_mode()) { \ + struct nmi_ctx *nmi_ctx = this_cpu_ptr(&nmi_contexts); \ + nmi_ctx->hcr = read_sysreg(hcr_el2); \ + if (!(nmi_ctx->hcr & HCR_TGE)) { \ + write_sysreg(nmi_ctx->hcr | HCR_TGE, hcr_el2); \ + isb(); \ + } \ + } \ + } while (0) + +#define arch_nmi_exit () \ + do { \ + if (is_kernel_in_hyp_mode()) { \ + struct nmi_ctx *nmi_ctx = this_cpu_ptr(&nmi_contexts); \ + if (!(nmi_ctx->hcr & HCR_TGE)) \ + write_sysreg(nmi_ctx->hcr, hcr_el2); \ + } \ + } while (0) +static inline void ack_bad_irq (unsigned int irq) {extern unsigned long irq_err_count;
arch/arm64/kernel/head.S +1 -2
@@ -442,8 +442,7 @@ set_hcr: /* GICv3 system register access */ mrs x0, id_aa64pfr0_el1 ubfx x0, x0, #24, #4 - cmp x0, #1 - b.ne 3f + cbz x0, 3f mrs_s x0, SYS_ICC_SRE_EL2 orr x0, x0, #ICC_SRE_EL2_SRE // Set ICC_SRE_EL2.SRE==1
arch/arm64/kernel/irq.c +3 -0
@@ -32,6 +32,9 @@unsigned long irq_err_count; +/* Only access this in an NMI enter/exit */ +DEFINE_PER_CPU(struct nmi_ctx, nmi_contexts); + DEFINE_PER_CPU(unsigned long *, irq_stack_ptr);int arch_show_interrupts (struct seq_file *p,int prec)
arch/arm64/kernel/kgdb.c +10 -4
@@ -233,27 +233,33 @@ int kgdb_arch_handle_exception(int exception_vector, int signo,static int kgdb_brk_fn (struct pt_regs *regs,unsigned int esr) { +if (user_mode (regs)) +return DBG_HOOK_ERROR ; +kgdb_handle_exception (1 ,SIGTRAP ,0 , regs); -return 0 ; +return DBG_HOOK_HANDLED ; }NOKPROBE_SYMBOL (kgdb_brk_fn) static int kgdb_compiled_brk_fn(struct pt_regs *regs, unsigned int esr) { +if (user_mode (regs)) +return DBG_HOOK_ERROR ; + compiled_break =1 ;kgdb_handle_exception (1 ,SIGTRAP ,0 , regs); -return 0 ; +return DBG_HOOK_HANDLED ; }NOKPROBE_SYMBOL (kgdb_compiled_brk_fn);static int kgdb_step_brk_fn (struct pt_regs *regs,unsigned int esr) { -if (!kgdb_single_step) +if (user_mode (regs) || !kgdb_single_step)return DBG_HOOK_ERROR ;kgdb_handle_exception (1 ,SIGTRAP ,0 , regs); -return 0 ; +return DBG_HOOK_HANDLED ; }NOKPROBE_SYMBOL (kgdb_step_brk_fn);
arch/arm64/kernel/probes/kprobes.c +6 -0
@@ -458,6 +458,9 @@ kprobe_single_step_handler(struct pt_regs *regs, unsigned int esr)struct kprobe_ctlblk *kcb =get_kprobe_ctlblk ();int retval; +if (user_mode (regs)) +return DBG_HOOK_ERROR ; +/* return error if this is not our step */ retval =kprobe_ss_hit (kcb,instruction_pointer (regs));
@@ -474,6 +477,9 @@ kprobe_single_step_handler(struct pt_regs *regs, unsigned int esr)int __kprobes kprobe_breakpoint_handler (struct pt_regs *regs,unsigned int esr) { +if (user_mode (regs)) +return DBG_HOOK_ERROR ; +kprobe_handler (regs);return DBG_HOOK_HANDLED ; }
arch/arm64/kvm/reset.c +24 -2
@@ -95,16 +95,33 @@ int kvm_arch_dev_ioctl_check_extension(struct kvm *kvm, long ext)* This function finds the right table above and sets the registers on * the virtual CPU struct to their architecturally defined reset * values. +* +* Note: This function can be called from two paths: The KVM_ARM_VCPU_INIT +* ioctl or as part of handling a request issued by another VCPU in the PSCI +* handling code. In the first case, the VCPU will not be loaded, and in the +* second case the VCPU will be loaded. Because this function operates purely +* on the memory-backed valus of system registers, we want to do a full put if +* we were loaded (handling a request) and load the values back at the end of +* the function. Otherwise we leave the state alone. In both cases, we +* disable preemption around the vcpu reset as we would otherwise race with +* preempt notifiers which also call put/load. */ int kvm_reset_vcpu (struct kvm_vcpu *vcpu) {const struct kvm_regs *cpu_reset; +int ret = -EINVAL ; +bool loaded; + +preempt_disable (); + loaded = (vcpu->cpu !=-1 ); +if (loaded) +kvm_arch_vcpu_put (vcpu);switch (vcpu->arch.target) {default :if (test_bit (KVM_ARM_VCPU_EL1_32BIT , vcpu->arch.features)) {if (!cpu_has_32bit_el1 ()) -return -EINVAL ; + goto out; cpu_reset = &default_regs_reset32; }else { cpu_reset = &default_regs_reset;
@@ -127,5 +144,10 @@ int kvm_reset_vcpu(struct kvm_vcpu *vcpu) vcpu->arch.workaround_flags |=VCPU_WORKAROUND_2_FLAG ;/* Reset timer */ -return kvm_timer_vcpu_reset (vcpu); + ret =kvm_timer_vcpu_reset (vcpu); +out: +if (loaded) +kvm_arch_vcpu_load (vcpu,smp_processor_id ()); +preempt_enable (); +return ret; }
arch/arm64/kvm/sys_regs.c +1 -1
@@ -1079,7 +1079,7 @@ static const struct sys_reg_desc sys_reg_descs[] = { { SYS_DESC(SYS_DACR32_EL2), NULL, reset_unknown, DACR32_EL2 }, { SYS_DESC(SYS_IFSR32_EL2), NULL, reset_unknown, IFSR32_EL2 }, - { SYS_DESC(SYS_FPEXC32_EL2), NULL, reset_val, FPEXC32_EL2, 0x70 }, + { SYS_DESC(SYS_FPEXC32_EL2), NULL, reset_val, FPEXC32_EL2, 0x700 }, }; static bool trap_dbgidr(struct kvm_vcpu *vcpu,
arch/m68k/Makefile +4 -1
@@ -58,7 +58,10 @@ cpuflags-$(CONFIG_M5206e) := $(call cc-option,-mcpu=5206e,-m5200) cpuflags-$(CONFIG_M5206) := $(call cc-option,-mcpu=5206,-m5200) KBUILD_AFLAGS += $(cpuflags-y) -KBUILD_CFLAGS += $(cpuflags-y) -pipe +KBUILD_CFLAGS += $(cpuflags-y) + +KBUILD_CFLAGS += -pipe -ffreestanding + ifdef CONFIG_MMU # without -fno-strength-reduce the 53c7xx.c driver fails ;-( KBUILD_CFLAGS += -fno-strength-reduce -ffixed-a2
arch/mips/include/asm/kvm_host.h +1 -1
@@ -1132,7 +1132,7 @@ static inline void kvm_arch_hardware_unsetup(void) {}static inline void kvm_arch_sync_events (struct kvm *kvm) {}static inline void kvm_arch_free_memslot (struct kvm *kvm,struct kvm_memory_slot *free,struct kvm_memory_slot *dont) {} -static inline void kvm_arch_memslots_updated (struct kvm *kvm,struct kvm_memslots *slots) {} +static inline void kvm_arch_memslots_updated (struct kvm *kvm,u64 gen) {}static inline void kvm_arch_sched_in (struct kvm_vcpu *vcpu,int cpu) {}static inline void kvm_arch_vcpu_blocking (struct kvm_vcpu *vcpu) {}static inline void kvm_arch_vcpu_unblocking (struct kvm_vcpu *vcpu) {}
arch/powerpc/include/asm/book3s/64/hugetlb.h +8 -0
@@ -55,6 +55,14 @@ static inline pte_t arch_make_huge_pte(pte_t entry, struct vm_area_struct *vma,#ifdef CONFIG_ARCH_HAS_GIGANTIC_PAGE static inline bool gigantic_page_supported (void ) { +/* +* We used gigantic page reservation with hypervisor assist in some case. +* We cannot use runtime allocation of gigantic pages in those platforms +* This is hash translation mode LPARs. +*/ +if (firmware_has_feature (FW_FEATURE_LPAR ) && !radix_enabled ()) +return false; +return true; }#endif
arch/powerpc/include/asm/kvm_host.h +1 -1
@@ -809,7 +809,7 @@ struct kvm_vcpu_arch {static inline void kvm_arch_hardware_disable (void ) {}static inline void kvm_arch_hardware_unsetup (void ) {}static inline void kvm_arch_sync_events (struct kvm *kvm) {} -static inline void kvm_arch_memslots_updated (struct kvm *kvm,struct kvm_memslots *slots) {} +static inline void kvm_arch_memslots_updated (struct kvm *kvm,u64 gen) {}static inline void kvm_arch_flush_shadow_all (struct kvm *kvm) {}static inline void kvm_arch_sched_in (struct kvm_vcpu *vcpu,int cpu) {}static inline void kvm_arch_exit (void ) {}
arch/powerpc/kernel/entry_32.S +9 -0
@@ -726,6 +726,9 @@ fast_exception_return: mtcr r10 lwz r10,_LINK(r11) mtlr r10 + /* Clear the exception_marker on the stack to avoid confusing stacktrace */ + li r10, 0 + stw r10, 8(r11) REST_GPR(10, r11) #ifdef CONFIG_PPC_8xx_PERF_EVENT mtspr SPRN_NRI, r0
@@ -963,6 +966,9 @@ END_FTR_SECTION_IFSET(CPU_FTR_NEED_PAIRED_STWCX) mtcrf 0xFF,r10 mtlr r11 + /* Clear the exception_marker on the stack to avoid confusing stacktrace */ + li r10, 0 + stw r10, 8(r1) /* * Once we put values in SRR0 and SRR1, we are in a state * where exceptions are not recoverable, since taking an
@@ -1002,6 +1008,9 @@ exc_exit_restart_end: mtlr r11 lwz r10,_CCR(r1) mtcrf 0xff,r10 + /* Clear the exception_marker on the stack to avoid confusing stacktrace */ + li r10, 0 + stw r10, 8(r1) REST_2GPRS(9, r1) .globl exc_exit_restart exc_exit_restart:
arch/powerpc/kernel/process.c +1 -1
@@ -156,7 +156,7 @@ void __giveup_fpu(struct task_struct *tsk)save_fpu (tsk); msr = tsk->thread.regs->msr; - msr &= ~MSR_FP ; + msr &= ~(MSR_FP |MSR_FE0 |MSR_FE1 );#ifdef CONFIG_VSX if (cpu_has_feature (CPU_FTR_VSX )) msr &= ~MSR_VSX ;
arch/powerpc/kernel/ptrace.c +8 -2
@@ -547,6 +547,7 @@ static int vr_get(struct task_struct *target, const struct user_regset *regset,/* * Copy out only the low-order word of vrsave. */ +int start, end;union {elf_vrreg_t reg;u32 word;
@@ -555,8 +556,10 @@ static int vr_get(struct task_struct *target, const struct user_regset *regset, vrsave.word = target->thread.vrsave; + start =33 *sizeof (vector128); + end = start +sizeof (vrsave); ret =user_regset_copyout (&pos, &count, &kbuf, &ubuf, &vrsave, -33 *sizeof (vector128),-1 ); + start, end); }return ret;
@@ -594,6 +597,7 @@ static int vr_set(struct task_struct *target, const struct user_regset *regset,/* * We use only the first word of vrsave. */ +int start, end;union {elf_vrreg_t reg;u32 word;
@@ -602,8 +606,10 @@ static int vr_set(struct task_struct *target, const struct user_regset *regset, vrsave.word = target->thread.vrsave; + start =33 *sizeof (vector128); + end = start +sizeof (vrsave); ret =user_regset_copyin (&pos, &count, &kbuf, &ubuf, &vrsave, -33 *sizeof (vector128),-1 ); + start, end);if (!ret) target->thread.vrsave = vrsave.word; }
arch/powerpc/kernel/traps.c +6 -6
@@ -694,15 +694,15 @@ void machine_check_exception(struct pt_regs *regs)if (check_io_access (regs)) goto bail; -/* Must die if the interrupt is not recoverable */ -if (!(regs->msr &MSR_RI )) -nmi_panic (regs,"Unrecoverable Machine check" ); -if (!nested)nmi_exit ();die ("Machine check" , regs,SIGBUS ); +/* Must die if the interrupt is not recoverable */ +if (!(regs->msr &MSR_RI )) +nmi_panic (regs,"Unrecoverable Machine check" ); +return ; bail:
@@ -1292,8 +1292,8 @@ void slb_miss_bad_addr(struct pt_regs *regs)void StackOverflow (struct pt_regs *regs) { -printk (KERN_CRIT "Kernel stack overflow in process %p, r1=%lx\n" , - current, regs->gpr[1 ]); +pr_crit ("Kernel stack overflow in process %s[%d], r1=%lx\n" , + current->comm,task_pid_nr (current), regs->gpr[1 ]);debugger (regs);show_regs (regs);panic ("kernel stack overflow" );
arch/powerpc/platforms/83xx/suspend-asm.S +27 -7
@@ -26,13 +26,13 @@ #define SS_MSR 0x74 #define SS_SDR1 0x78 #define SS_LR 0x7c -#define SS_SPRG 0x80 /* 4 SPRGs */ -#define SS_DBAT 0x90 /* 8 DBATs */ -#define SS_IBAT 0xd0 /* 8 IBATs */ -#define SS_TB 0x110 -#define SS_CR 0x118 -#define SS_GPREG 0x11c /* r12-r31 */ -#define STATE_SAVE_SIZE 0x16c +#define SS_SPRG 0x80 /* 8 SPRGs */ +#define SS_DBAT 0xa0 /* 8 DBATs */ +#define SS_IBAT 0xe0 /* 8 IBATs */ +#define SS_TB 0x120 +#define SS_CR 0x128 +#define SS_GPREG 0x12c /* r12-r31 */ +#define STATE_SAVE_SIZE 0x17c .section .data .align 5
@@ -103,6 +103,16 @@ _GLOBAL(mpc83xx_enter_deep_sleep) stw r7, SS_SPRG+12(r3) stw r8, SS_SDR1(r3) + mfspr r4, SPRN_SPRG4 + mfspr r5, SPRN_SPRG5 + mfspr r6, SPRN_SPRG6 + mfspr r7, SPRN_SPRG7 + + stw r4, SS_SPRG+16(r3) + stw r5, SS_SPRG+20(r3) + stw r6, SS_SPRG+24(r3) + stw r7, SS_SPRG+28(r3) + mfspr r4, SPRN_DBAT0U mfspr r5, SPRN_DBAT0L mfspr r6, SPRN_DBAT1U
@@ -493,6 +503,16 @@ mpc83xx_deep_resume: mtspr SPRN_IBAT7U, r6 mtspr SPRN_IBAT7L, r7 + lwz r4, SS_SPRG+16(r3) + lwz r5, SS_SPRG+20(r3) + lwz r6, SS_SPRG+24(r3) + lwz r7, SS_SPRG+28(r3) + + mtspr SPRN_SPRG4, r4 + mtspr SPRN_SPRG5, r5 + mtspr SPRN_SPRG6, r6 + mtspr SPRN_SPRG7, r7 + lwz r4, SS_SPRG+0(r3) lwz r5, SS_SPRG+4(r3) lwz r6, SS_SPRG+8(r3)
arch/powerpc/platforms/embedded6xx/wii.c +4 -0
@@ -104,6 +104,10 @@ unsigned long __init wii_mmu_mapin_mem2(unsigned long top)/* MEM2 64MB@0x10000000 */ delta = wii_hole_start + wii_hole_size; size = top - delta; + +if (__map_without_bats) +return delta; +for (bl =128 <<10 ; bl < max_size; bl <<=1 ) {if (bl *2 > size)break ;
arch/powerpc/platforms/powernv/opal-msglog.c +1 -1
@@ -98,7 +98,7 @@ static ssize_t opal_msglog_read(struct file *file, struct kobject *kobj, }static struct bin_attribute opal_msglog_attr = { - .attr = {.name ="msglog" , .mode =0444 }, + .attr = {.name ="msglog" , .mode =0400 }, .read = opal_msglog_read };
arch/s390/include/asm/kvm_host.h +1 -1
@@ -784,7 +784,7 @@ static inline void kvm_arch_vcpu_uninit(struct kvm_vcpu *vcpu) {}static inline void kvm_arch_sched_in (struct kvm_vcpu *vcpu,int cpu) {}static inline void kvm_arch_free_memslot (struct kvm *kvm,struct kvm_memory_slot *free,struct kvm_memory_slot *dont) {} -static inline void kvm_arch_memslots_updated (struct kvm *kvm,struct kvm_memslots *slots) {} +static inline void kvm_arch_memslots_updated (struct kvm *kvm,u64 gen) {}static inline void kvm_arch_flush_shadow_all (struct kvm *kvm) {}static inline void kvm_arch_flush_shadow_memslot (struct kvm *kvm,struct kvm_memory_slot *slot) {}
arch/s390/kernel/setup.c +22 -9
@@ -300,7 +300,7 @@ early_param("vmalloc", parse_vmalloc); void *restart_stack __section(.data); -static void __init setup_lowcore (void ) +static void __init setup_lowcore_dat_off (void ) {struct lowcore *lc;
@@ -311,19 +311,16 @@ static void __init setup_lowcore(void) lc =memblock_virt_alloc_low (sizeof (*lc),sizeof (*lc)); lc->restart_psw.mask =PSW_KERNEL_BITS ; lc->restart_psw.addr = (unsigned long ) restart_int_handler; - lc->external_new_psw.mask =PSW_KERNEL_BITS | -PSW_MASK_DAT |PSW_MASK_MCHECK ; + lc->external_new_psw.mask =PSW_KERNEL_BITS |PSW_MASK_MCHECK ; lc->external_new_psw.addr = (unsigned long ) ext_int_handler; lc->svc_new_psw.mask =PSW_KERNEL_BITS | -PSW_MASK_DAT |PSW_MASK_IO |PSW_MASK_EXT |PSW_MASK_MCHECK ; +PSW_MASK_IO |PSW_MASK_EXT |PSW_MASK_MCHECK ; lc->svc_new_psw.addr = (unsigned long ) system_call; - lc->program_new_psw.mask =PSW_KERNEL_BITS | -PSW_MASK_DAT |PSW_MASK_MCHECK ; + lc->program_new_psw.mask =PSW_KERNEL_BITS |PSW_MASK_MCHECK ; lc->program_new_psw.addr = (unsigned long ) pgm_check_handler; lc->mcck_new_psw.mask =PSW_KERNEL_BITS ; lc->mcck_new_psw.addr = (unsigned long ) mcck_int_handler; - lc->io_new_psw.mask =PSW_KERNEL_BITS | -PSW_MASK_DAT |PSW_MASK_MCHECK ; + lc->io_new_psw.mask =PSW_KERNEL_BITS |PSW_MASK_MCHECK ; lc->io_new_psw.addr = (unsigned long ) io_int_handler; lc->clock_comparator = clock_comparator_max; lc->kernel_stack = ((unsigned long ) &init_thread_union)
@@ -391,6 +388,16 @@ static void __init setup_lowcore(void) lowcore_ptr[0 ] = lc; } +static void __init setup_lowcore_dat_on (void ) +{ +__ctl_clear_bit (0 ,28 ); + S390_lowcore.external_new_psw.mask |=PSW_MASK_DAT ; + S390_lowcore.svc_new_psw.mask |=PSW_MASK_DAT ; + S390_lowcore.program_new_psw.mask |=PSW_MASK_DAT ; + S390_lowcore.io_new_psw.mask |=PSW_MASK_DAT ; +__ctl_set_bit (0 ,28 ); +} +static struct resource code_resource = { .name ="Kernel code" , .flags =IORESOURCE_BUSY |IORESOURCE_SYSTEM_RAM ,
@@ -948,7 +955,7 @@ void __init setup_arch(char **cmdline_p)#endif setup_resources (); -setup_lowcore (); +setup_lowcore_dat_off ();smp_fill_possible_mask ();cpu_detect_mhz_feature ();cpu_init ();
@@ -961,6 +968,12 @@ void __init setup_arch(char **cmdline_p)*/ paging_init (); +/* +* After paging_init created the kernel page table, the new PSWs +* in lowcore can now run with DAT enabled. +*/ +setup_lowcore_dat_on (); +/* Setup default console */ conmode_default ();set_preferred_console ();
arch/x86/include/asm/kvm_host.h +1 -1
@@ -1121,7 +1121,7 @@ void kvm_mmu_clear_dirty_pt_masked(struct kvm *kvm,struct kvm_memory_slot *slot, gfn_t gfn_offset, unsigned long mask);void kvm_mmu_zap_all (struct kvm *kvm); -void kvm_mmu_invalidate_mmio_sptes (struct kvm *kvm,struct kvm_memslots *slots); +void kvm_mmu_invalidate_mmio_sptes (struct kvm *kvm,u64 gen);unsigned int kvm_mmu_calculate_mmu_pages (struct kvm *kvm);void kvm_mmu_change_mmu_pages (struct kvm *kvm,unsigned int kvm_nr_mmu_pages);
arch/x86/kernel/kprobes/opt.c +5 -0
@@ -141,6 +141,11 @@ asm (void optprobe_template_func (void );STACK_FRAME_NON_STANDARD (optprobe_template_func); +NOKPROBE_SYMBOL (optprobe_template_func); +NOKPROBE_SYMBOL (optprobe_template_entry); +NOKPROBE_SYMBOL (optprobe_template_val); +NOKPROBE_SYMBOL (optprobe_template_call); +NOKPROBE_SYMBOL (optprobe_template_end);#define TMPL_MOVE_IDX \ ((long)&optprobe_template_val - (long)&optprobe_template_entry)
arch/x86/kvm/mmu.c +20 -3
@@ -5418,13 +5418,30 @@ static bool kvm_has_zapped_obsolete_pages(struct kvm *kvm)return unlikely (!list_empty_careful (&kvm->arch.zapped_obsolete_pages)); } -void kvm_mmu_invalidate_mmio_sptes (struct kvm *kvm,struct kvm_memslots *slots) +void kvm_mmu_invalidate_mmio_sptes (struct kvm *kvm,u64 gen) { + gen &=MMIO_GEN_MASK ; + +/* +* Shift to eliminate the "update in-progress" flag, which isn't +* included in the spte's generation number. +*/ + gen >>=1 ; + +/* +* Generation numbers are incremented in multiples of the number of +* address spaces in order to provide unique generations across all +* address spaces. Strip what is effectively the address space +* modifier prior to checking for a wrap of the MMIO generation so +* that a wrap in any address space is detected. +*/ + gen &= ~((u64 )KVM_ADDRESS_SPACE_NUM -1 ); +/* -* The very rare case: if the generation-number is round, +* The very rare case: if the MMIO generation number has wrapped, * zap all shadow pages. */ -if (unlikely ((slots->generation &MMIO_GEN_MASK ) ==0 )) { +if (unlikely (gen ==0 )) {kvm_debug_ratelimited ("kvm: zapping shadow pages for mmio generation wraparound\n" );kvm_mmu_invalidate_zap_all_pages (kvm); }
arch/x86/kvm/vmx.c +36 -5
71 lines not on this page · raw message
arch/x86/kvm/x86.c +2 -2
@@ -8524,13 +8524,13 @@ int kvm_arch_create_memslot(struct kvm *kvm, struct kvm_memory_slot *slot,return -ENOMEM ; } -void kvm_arch_memslots_updated (struct kvm *kvm,struct kvm_memslots *slots) +void kvm_arch_memslots_updated (struct kvm *kvm,u64 gen) {/* * memslots->generation has been incremented. * mmio generation may have reached its maximum value. */ -kvm_mmu_invalidate_mmio_sptes (kvm, slots); +kvm_mmu_invalidate_mmio_sptes (kvm, gen); } int kvm_arch_prepare_memory_region(struct kvm *kvm,
arch/x86/kvm/x86.h +6 -1
@@ -136,6 +136,11 @@ static inline bool emul_is_noncanonical_address(u64 la,static inline void vcpu_cache_mmio_info (struct kvm_vcpu *vcpu,gva_t gva,gfn_t gfn,unsigned access) { +u64 gen =kvm_memslots (vcpu->kvm)->generation; + +if (unlikely (gen &1 )) +return ; +/* * If this is a shadow nested page table, the "GVA" is * actually a nGPA.
@@ -143,7 +148,7 @@ static inline void vcpu_cache_mmio_info(struct kvm_vcpu *vcpu, vcpu->arch.mmio_gva =mmu_is_nested (vcpu) ?0 : gva &PAGE_MASK ; vcpu->arch.access = access; vcpu->arch.mmio_gfn = gfn; - vcpu->arch.mmio_gen =kvm_memslots (vcpu->kvm)->generation; + vcpu->arch.mmio_gen = gen; }static inline bool vcpu_match_mmio_gen (struct kvm_vcpu *vcpu)
arch/x86/xen/mmu_pv.c +6 -7
@@ -2080,10 +2080,10 @@ void __init xen_relocate_p2m(void) pt =early_memremap (pt_phys,PAGE_SIZE );clear_page (pt);for (idx_pte =0 ; - idx_pte <min (n_pte,PTRS_PER_PTE ); - idx_pte++) { -set_pte (pt + idx_pte, -pfn_pte (p2m_pfn,PAGE_KERNEL )); + idx_pte <min (n_pte,PTRS_PER_PTE ); + idx_pte++) { + pt[idx_pte] =pfn_pte (p2m_pfn, +PAGE_KERNEL ); p2m_pfn++; } n_pte -=PTRS_PER_PTE ;
@@ -2091,8 +2091,7 @@ void __init xen_relocate_p2m(void)make_lowmem_page_readonly (__va (pt_phys));pin_pagetable_pfn (MMUEXT_PIN_L1_TABLE ,PFN_DOWN (pt_phys)); -set_pmd (pmd + idx_pt, -__pmd (_PAGE_TABLE | pt_phys)); + pmd[idx_pt] =__pmd (_PAGE_TABLE | pt_phys); pt_phys +=PAGE_SIZE ; } n_pt -=PTRS_PER_PMD ;
@@ -2100,7 +2099,7 @@ void __init xen_relocate_p2m(void)make_lowmem_page_readonly (__va (pmd_phys));pin_pagetable_pfn (MMUEXT_PIN_L2_TABLE ,PFN_DOWN (pmd_phys)); -set_pud (pud + idx_pmd,__pud (_PAGE_TABLE | pmd_phys)); + pud[idx_pmd] =__pud (_PAGE_TABLE | pmd_phys); pmd_phys +=PAGE_SIZE ; } n_pmd -=PTRS_PER_PUD ;
crypto/ahash.c +26 -16
84 lines not on this page · raw message
crypto/pcbc.c +4 -10
@@ -50,7 +50,7 @@ static int crypto_pcbc_encrypt_segment(struct skcipher_request *req,unsigned int nbytes = walk->nbytes;u8 *src = walk->src.virt.addr;u8 *dst = walk->dst.virt.addr; -u8 *iv = walk->iv; +u8 *const iv = walk->iv; do { crypto_xor(iv, src, bsize);
@@ -71,7 +71,7 @@ static int crypto_pcbc_encrypt_inplace(struct skcipher_request *req,int bsize =crypto_cipher_blocksize (tfm);unsigned int nbytes = walk->nbytes;u8 *src = walk->src.virt.addr; -u8 *iv = walk->iv; +u8 *const iv = walk->iv;u8 tmpbuf[bsize]; do {
@@ -83,8 +83,6 @@ static int crypto_pcbc_encrypt_inplace(struct skcipher_request *req, src += bsize; }while ((nbytes -= bsize) >= bsize); -memcpy (walk->iv, iv, bsize); -return nbytes; }
@@ -120,7 +118,7 @@ static int crypto_pcbc_decrypt_segment(struct skcipher_request *req,unsigned int nbytes = walk->nbytes;u8 *src = walk->src.virt.addr;u8 *dst = walk->dst.virt.addr; -u8 *iv = walk->iv; +u8 *const iv = walk->iv; do { crypto_cipher_decrypt_one(tfm, dst, src);
@@ -131,8 +129,6 @@ static int crypto_pcbc_decrypt_segment(struct skcipher_request *req, dst += bsize; }while ((nbytes -= bsize) >= bsize); -memcpy (walk->iv, iv, bsize); -return nbytes; }
@@ -143,7 +139,7 @@ static int crypto_pcbc_decrypt_inplace(struct skcipher_request *req,int bsize =crypto_cipher_blocksize (tfm);unsigned int nbytes = walk->nbytes;u8 *src = walk->src.virt.addr; -u8 *iv = walk->iv; +u8 *const iv = walk->iv;u8 tmpbuf[bsize]__aligned(__alignof__(u32)) ; do {
@@ -155,8 +151,6 @@ static int crypto_pcbc_decrypt_inplace(struct skcipher_request *req, src += bsize; }while ((nbytes -= bsize) >= bsize); -memcpy (walk->iv, iv, bsize); -return nbytes; }
crypto/shash.c +13 -5
@@ -53,6 +53,13 @@ static int shash_setkey_unaligned(struct crypto_shash *tfm, const u8 *key,return err; } +static void shash_set_needkey (struct crypto_shash *tfm,struct shash_alg *alg) +{ +if (crypto_shash_alg_has_setkey (alg) && + !(alg->base.cra_flags &CRYPTO_ALG_OPTIONAL_KEY )) +crypto_shash_set_flags (tfm,CRYPTO_TFM_NEED_KEY ); +} +int crypto_shash_setkey (struct crypto_shash *tfm,const u8 *key,unsigned int keylen) {
@@ -65,8 +72,10 @@ int crypto_shash_setkey(struct crypto_shash *tfm, const u8 *key,else err = shash->setkey (tfm, key, keylen); -if (err) +if (unlikely (err)) { +shash_set_needkey (tfm, shash);return err; + }crypto_shash_clear_flags (tfm,CRYPTO_TFM_NEED_KEY );return 0 ;
@@ -368,7 +377,8 @@ int crypto_init_shash_ops_async(struct crypto_tfm *tfm) crt->final = shash_async_final; crt->finup = shash_async_finup; crt->digest = shash_async_digest; - crt->setkey = shash_async_setkey; +if (crypto_shash_alg_has_setkey (alg)) + crt->setkey = shash_async_setkey;crypto_ahash_set_flags (crt,crypto_shash_get_flags (shash) &CRYPTO_TFM_NEED_KEY );
@@ -390,9 +400,7 @@ static int crypto_shash_init_tfm(struct crypto_tfm *tfm) hash->descsize = alg->descsize; -if (crypto_shash_alg_has_setkey (alg) && - !(alg->base.cra_flags &CRYPTO_ALG_OPTIONAL_KEY )) -crypto_shash_set_flags (hash,CRYPTO_TFM_NEED_KEY ); +shash_set_needkey (hash, alg);return 0 ; }
crypto/testmgr.c +10 -4
@@ -1839,14 +1839,21 @@ static int alg_test_crc32c(const struct alg_test_desc *desc, err =alg_test_hash (desc, driver, type, mask);if (err) - goto out; +return err; tfm =crypto_alloc_shash (driver, type, mask);if (IS_ERR (tfm)) { +if (PTR_ERR (tfm) == -ENOENT ) { +/* +* This crc32c implementation is only available through +* ahash API, not the shash API, so the remaining part +* of the test is not applicable to it. +*/ +return 0 ; + }printk (KERN_ERR "alg: crc32c: Failed to load transform for %s: " "%ld\n" , driver,PTR_ERR (tfm)); - err =PTR_ERR (tfm); - goto out; +return PTR_ERR (tfm); } do {
@@ -1873,7 +1880,6 @@ static int alg_test_crc32c(const struct alg_test_desc *desc,crypto_free_shash (tfm); -out:return err; }
drivers/acpi/device_sysfs.c +5 -1
@@ -202,11 +202,15 @@ static int create_of_modalias(struct acpi_device *acpi_dev, char *modalias, {struct acpi_buffer buf = {ACPI_ALLOCATE_BUFFER };const union acpi_object *of_compatible, *obj; +acpi_status status;int len, count;int i, nval;char *c; -acpi_get_name (acpi_dev->handle,ACPI_SINGLE_NAME , &buf); + status =acpi_get_name (acpi_dev->handle,ACPI_SINGLE_NAME , &buf); +if (ACPI_FAILURE (status)) +return -ENODEV ; +/* DT strings are all in lower case */ for (c = buf.pointer; *c !='\0' ; c++) *c =tolower (*c);
drivers/acpi/nfit/core.c +7 -7
@@ -329,6 +329,13 @@ int acpi_nfit_ctl(struct nvdimm_bus_descriptor *nd_desc, struct nvdimm *nvdimm,return -EINVAL ; } +if (out_obj->type !=ACPI_TYPE_BUFFER ) { +dev_dbg (dev,"%s unexpected output object type cmd: %s type: %d\n" , + dimm_name, cmd_name, out_obj->type); + rc = -EINVAL ; + goto out; + } +if (call_pkg) { call_pkg->nd_fw_size = out_obj->buffer.length; memcpy(call_pkg->nd_payload + call_pkg->nd_size_in,
@@ -347,13 +354,6 @@ int acpi_nfit_ctl(struct nvdimm_bus_descriptor *nd_desc, struct nvdimm *nvdimm,return 0 ; } -if (out_obj->package.type !=ACPI_TYPE_BUFFER ) { -dev_dbg (dev,"%s:%s unexpected output object type cmd: %s type: %d\n" , - __func__, dimm_name, cmd_name, out_obj->type); - rc = -EINVAL ; - goto out; - } -dev_dbg (dev,"%s:%s cmd: %s output length: %d\n" , __func__, dimm_name, cmd_name, out_obj->buffer.length); print_hex_dump_debug(cmd_name, DUMP_PREFIX_OFFSET, 4, 4,
drivers/auxdisplay/ht16k33.c +1 -1
@@ -517,7 +517,7 @@ static int ht16k33_remove(struct i2c_client *client)struct ht16k33_priv *priv =i2c_get_clientdata (client);struct ht16k33_fbdev *fbdev = &priv->fbdev; -cancel_delayed_work (&fbdev->work); +cancel_delayed_work_sync (&fbdev->work);unregister_framebuffer (fbdev->info);framebuffer_release (fbdev->info);free_page ((unsigned long ) fbdev->buffer);
drivers/base/power/wakeup.c +7 -1
@@ -113,7 +113,6 @@ void wakeup_source_drop(struct wakeup_source *ws)if (!ws)return ; -del_timer_sync (&ws->timer);__pm_relax (ws); }EXPORT_SYMBOL_GPL (wakeup_source_drop);
@@ -201,6 +200,13 @@ void wakeup_source_remove(struct wakeup_source *ws)list_del_rcu (&ws->entry);spin_unlock_irqrestore (&events_lock, flags);synchronize_srcu (&wakeup_srcu); + +del_timer_sync (&ws->timer); +/* +* Clear timer.function to make wakeup_source_not_registered() treat +* this wakeup source as not registered. +*/ + ws->timer.function =NULL ; }EXPORT_SYMBOL_GPL (wakeup_source_remove);
drivers/block/floppy.c +1 -1
@@ -4079,7 +4079,7 @@ static unsigned int floppy_check_events(struct gendisk *disk,if (time_after (jiffies,UDRS ->last_checked +UDP ->checkfreq)) {if (lock_fdc (drive)) -return -EINTR ; +return 0 ;poll_drive (false,0 );process_fd_request (); }
drivers/char/tpm/st33zp24/st33zp24.c +1 -1
@@ -438,7 +438,7 @@ static int st33zp24_send(struct tpm_chip *chip, unsigned char *buf, goto out_err; } -return len; +return 0 ; out_err:st33zp24_cancel (chip);release_locality (chip);
drivers/char/tpm/tpm-interface.c +10 -1
@@ -497,10 +497,19 @@ static ssize_t tpm_try_transmit(struct tpm_chip *chip,if (rc <0 ) {if (rc != -EPIPE )dev_err (&chip->dev, -"%s: tpm_send: error %d\n" , __func__, rc); +"%s: send(): error %d\n" , __func__, rc); goto out; } +/* A sanity check. send() should just return zero on success e.g. +* not the command length. +*/ +if (rc >0 ) { +dev_warn (&chip->dev, +"%s: send(): invalid value %d\n" , __func__, rc); + rc =0 ; + } +if (chip->flags &TPM_CHIP_FLAG_IRQ ) goto out_recv;
drivers/char/tpm/tpm_atmel.c +1 -1
@@ -105,7 +105,7 @@ static int tpm_atml_send(struct tpm_chip *chip, u8 *buf, size_t count)iowrite8 (buf[i], priv->iobase); } -return count; +return 0 ; }static void tpm_atml_cancel (struct tpm_chip *chip)
drivers/char/tpm/tpm_crb.c +16 -6
@@ -288,19 +288,29 @@ static int crb_recv(struct tpm_chip *chip, u8 *buf, size_t count)struct crb_priv *priv =dev_get_drvdata (&chip->dev);unsigned int expected; -/* sanity check */ -if (count <6 ) +/* A sanity check that the upper layer wants to get at least the header +* as that is the minimum size for any TPM response. +*/ +if (count <TPM_HEADER_SIZE )return -EIO ; +/* If this bit is set, according to the spec, the TPM is in +* unrecoverable condition. +*/ if (ioread32 (&priv->regs_t->ctrl_sts) &CRB_CTRL_STS_ERROR )return -EIO ; -memcpy_fromio (buf, priv->rsp,6 ); - expected =be32_to_cpup ((__be32 *) &buf[2 ]); -if (expected > count || expected <6 ) +/* Read the first 8 bytes in order to get the length of the response. +* We read exactly a quad word in order to make sure that the remaining +* reads will be aligned. +*/ +memcpy_fromio (buf, priv->rsp,8 ); + + expected =be32_to_cpup ((__be32 *)&buf[2 ]); +if (expected > count || expected <TPM_HEADER_SIZE )return -EIO ; -memcpy_fromio (&buf[6 ], &priv->rsp[6 ], expected -6 ); +memcpy_fromio (&buf[8 ], &priv->rsp[8 ], expected -8 );return expected; }
drivers/char/tpm/tpm_i2c_atmel.c +5 -1
@@ -65,7 +65,11 @@ static int i2c_atmel_send(struct tpm_chip *chip, u8 *buf, size_t len)dev_dbg (&chip->dev,"%s(buf=%*ph len=%0zx) -> sts=%d\n" , __func__, (int )min_t (size_t,64 , len), buf, len, status); -return status; + +if (status <0 ) +return status; + +return 0 ; }static int i2c_atmel_recv (struct tpm_chip *chip,u8 *buf,size_t count)
drivers/char/tpm/tpm_i2c_infineon.c +1 -1
@@ -587,7 +587,7 @@ static int tpm_tis_i2c_send(struct tpm_chip *chip, u8 *buf, size_t len)/* go and do it */ iic_tpm_write (TPM_STS (tpm_dev.locality), &sts,1 ); -return len; +return 0 ; out_err:tpm_tis_i2c_ready (chip);/* The TPM needs some time to clean up here,
drivers/char/tpm/tpm_i2c_nuvoton.c +1 -1
@@ -469,7 +469,7 @@ static int i2c_nuvoton_send(struct tpm_chip *chip, u8 *buf, size_t len) }dev_dbg (dev,"%s() -> %zd\n" , __func__, len); -return len; +return 0 ; }static bool i2c_nuvoton_req_canceled (struct tpm_chip *chip,u8 status)
drivers/char/tpm/tpm_ibmvtpm.c +4 -4
@@ -141,14 +141,14 @@ static int tpm_ibmvtpm_recv(struct tpm_chip *chip, u8 *buf, size_t count) }/** -* tpm_ibmvtpm_send - Send tpm request -* +* tpm_ibmvtpm_send() - Send a TPM command * @chip: tpm chip struct * @buf: buffer contains data to send * @count: size of buffer * * Return: -* Number of bytes sent or < 0 on error. +* 0 on success, +* -errno on error */ static int tpm_ibmvtpm_send (struct tpm_chip *chip,u8 *buf,size_t count) {
@@ -194,7 +194,7 @@ static int tpm_ibmvtpm_send(struct tpm_chip *chip, u8 *buf, size_t count) rc =0 ; ibmvtpm->tpm_processing_cmd = false; }else - rc = count; + rc =0 ;spin_unlock (&ibmvtpm->rtce_lock);return rc;
drivers/char/tpm/tpm_infineon.c +1 -1
@@ -354,7 +354,7 @@ static int tpm_inf_send(struct tpm_chip *chip, u8 * buf, size_t count)for (i =0 ; i < count; i++) {wait_and_send (chip, buf[i]); } -return count; +return 0 ; }static void tpm_inf_cancel (struct tpm_chip *chip)
drivers/char/tpm/tpm_nsc.c +1 -1
@@ -226,7 +226,7 @@ static int tpm_nsc_send(struct tpm_chip *chip, u8 * buf, size_t count) }outb (NSC_COMMAND_EOC , priv->base +NSC_COMMAND ); -return count; +return 0 ; }static void tpm_nsc_cancel (struct tpm_chip *chip)
drivers/char/tpm/tpm_tis_core.c +1 -1
@@ -379,7 +379,7 @@ static int tpm_tis_send_main(struct tpm_chip *chip, const u8 *buf, size_t len) goto out_err; } } -return len; +return 0 ; out_err:tpm_tis_ready (chip);return rc;
drivers/char/tpm/tpm_vtpm_proxy.c +1 -2
@@ -335,7 +335,6 @@ static int vtpm_proxy_is_driver_command(struct tpm_chip *chip,static int vtpm_proxy_tpm_op_send (struct tpm_chip *chip,u8 *buf,size_t count) {struct proxy_dev *proxy_dev =dev_get_drvdata (&chip->dev); -int rc =0 ;if (count >sizeof (proxy_dev->buffer)) { dev_err(&chip->dev,
@@ -366,7 +365,7 @@ static int vtpm_proxy_tpm_op_send(struct tpm_chip *chip, u8 *buf, size_t count)wake_up_interruptible (&proxy_dev->wq); -return rc; +return 0 ; }static void vtpm_proxy_tpm_op_cancel (struct tpm_chip *chip)
drivers/char/tpm/xen-tpmfront.c +1 -1
@@ -112,7 +112,7 @@ static int vtpm_send(struct tpm_chip *chip, u8 *buf, size_t count)return -ETIME ; } -return count; +return 0 ; }static int vtpm_recv (struct tpm_chip *chip,u8 *buf,size_t count)
drivers/clk/clk-twl6040.c +51 -2
65 lines not on this page · raw message
drivers/clk/ingenic/cgu.c +5 -5
@@ -364,16 +364,16 @@ ingenic_clk_round_rate(struct clk_hw *hw, unsigned long req_rate,struct ingenic_clk *ingenic_clk =to_ingenic_clk (hw);struct ingenic_cgu *cgu = ingenic_clk->cgu;const struct ingenic_cgu_clk_info *clk_info; -long rate = *parent_rate; +unsigned int div =1 ; clk_info = &cgu->clock_info[ingenic_clk->idx];if (clk_info->type &CGU_CLK_DIV ) - rate /=ingenic_clk_calc_div (clk_info, *parent_rate, req_rate); + div =ingenic_clk_calc_div (clk_info, *parent_rate, req_rate);else if (clk_info->type &CGU_CLK_FIXDIV ) - rate /= clk_info->fixdiv.div; + div = clk_info->fixdiv.div; -return rate; +return DIV_ROUND_UP (*parent_rate, div); } static int
@@ -393,7 +393,7 @@ ingenic_clk_set_rate(struct clk_hw *hw, unsigned long req_rate,if (clk_info->type &CGU_CLK_DIV ) { div =ingenic_clk_calc_div (clk_info, parent_rate, req_rate); - rate = parent_rate / div; + rate =DIV_ROUND_UP (parent_rate, div);if (rate != req_rate)return -EINVAL ;
drivers/clk/ingenic/cgu.h +1 -1
@@ -78,7 +78,7 @@ struct ingenic_cgu_mux_info {* @reg: offset of the divider control register within the CGU * @shift: number of bits to left shift the divide value by (ie. the index of * the lowest bit of the divide value within its control register) -* @div: number of bits to divide the divider value by (i.e. if the +* @div: number to divide the divider value by (i.e. if the * effective divider value is the value written to the register * multiplied by some constant) * @bits: the size of the divide value in bits
drivers/clk/sunxi-ng/ccu-sun6i-a31.c +2 -2
@@ -252,9 +252,9 @@ static SUNXI_CCU_GATE(ahb1_mmc1_clk, "ahb1-mmc1", "ahb1", static SUNXI_CCU_GATE(ahb1_mmc2_clk, "ahb1-mmc2", "ahb1", 0x060, BIT(10), 0); static SUNXI_CCU_GATE(ahb1_mmc3_clk, "ahb1-mmc3", "ahb1", - 0x060, BIT(12), 0); + 0x060, BIT(11), 0); static SUNXI_CCU_GATE(ahb1_nand1_clk, "ahb1-nand1", "ahb1", - 0x060, BIT(13), 0); + 0x060, BIT(12), 0); static SUNXI_CCU_GATE(ahb1_nand0_clk, "ahb1-nand0", "ahb1", 0x060, BIT(13), 0); static SUNXI_CCU_GATE(ahb1_sdram_clk, "ahb1-sdram", "ahb1",
drivers/clk/sunxi-ng/ccu-sun8i-v3s.c +1 -1
@@ -542,7 +542,7 @@ static struct ccu_reset_map sun8i_v3s_ccu_resets[] = { [RST_BUS_OHCI0] = { 0x2c0, BIT(29) }, [RST_BUS_VE] = { 0x2c4, BIT(0) }, - [RST_BUS_TCON0] = { 0x2c4, BIT(3) }, + [RST_BUS_TCON0] = { 0x2c4, BIT(4) }, [RST_BUS_CSI] = { 0x2c4, BIT(8) }, [RST_BUS_DE] = { 0x2c4, BIT(12) }, [RST_BUS_DBG] = { 0x2c4, BIT(31) },
drivers/clk/uniphier/clk-uniphier-cpugear.c +1 -1
@@ -47,7 +47,7 @@ static int uniphier_clk_cpugear_set_parent(struct clk_hw *hw, u8 index)return ret; ret =regmap_write_bits (gear->regmap, - gear->regbase +UNIPHIER_CLK_CPUGEAR_SET , + gear->regbase +UNIPHIER_CLK_CPUGEAR_UPD ,UNIPHIER_CLK_CPUGEAR_UPD_BIT ,UNIPHIER_CLK_CPUGEAR_UPD_BIT );if (ret)
drivers/clocksource/exynos_mct.c +12 -11
@@ -388,6 +388,13 @@ static void exynos4_mct_tick_start(unsigned long cycles,exynos4_mct_write (tmp, mevt->base +MCT_L_TCON_OFFSET ); } +static void exynos4_mct_tick_clear (struct mct_clock_event_device *mevt) +{ +/* Clear the MCT tick interrupt */ +if (readl_relaxed (reg_base + mevt->base +MCT_L_INT_CSTAT_OFFSET ) &1 ) +exynos4_mct_write (0x1 , mevt->base +MCT_L_INT_CSTAT_OFFSET ); +} +static int exynos4_tick_set_next_event (unsigned long cycles,struct clock_event_device *evt) {
@@ -404,6 +411,7 @@ static int set_state_shutdown(struct clock_event_device *evt) mevt = container_of(evt, struct mct_clock_event_device, evt);exynos4_mct_tick_stop (mevt); +exynos4_mct_tick_clear (mevt);return 0 ; }
@@ -420,8 +428,11 @@ static int set_state_periodic(struct clock_event_device *evt)return 0 ; } -static void exynos4_mct_tick_clear (struct mct_clock_event_device *mevt) +static irqreturn_t exynos4_mct_tick_isr (int irq,void *dev_id) { +struct mct_clock_event_device *mevt = dev_id; +struct clock_event_device *evt = &mevt->evt; +/* * This is for supporting oneshot mode. * Mct would generate interrupt periodically
@@ -430,16 +441,6 @@ static void exynos4_mct_tick_clear(struct mct_clock_event_device *mevt)if (!clockevent_state_periodic (&mevt->evt))exynos4_mct_tick_stop (mevt); -/* Clear the MCT tick interrupt */ -if (readl_relaxed (reg_base + mevt->base +MCT_L_INT_CSTAT_OFFSET ) &1 ) -exynos4_mct_write (0x1 , mevt->base +MCT_L_INT_CSTAT_OFFSET ); -} - -static irqreturn_t exynos4_mct_tick_isr (int irq,void *dev_id) -{ -struct mct_clock_event_device *mevt = dev_id; -struct clock_event_device *evt = &mevt->evt; -exynos4_mct_tick_clear (mevt); evt->event_handler (evt);
drivers/cpufreq/pxa2xx-cpufreq.c +2 -2
@@ -192,7 +192,7 @@ static int pxa_cpufreq_change_voltage(const struct pxa_freqs *pxa_freq)return ret; } -static void __init pxa_cpufreq_init_voltages (void ) +static void pxa_cpufreq_init_voltages (void ) { vcc_core =regulator_get (NULL ,"vcc_core" );if (IS_ERR (vcc_core)) {
@@ -208,7 +208,7 @@ static int pxa_cpufreq_change_voltage(const struct pxa_freqs *pxa_freq)return 0 ; } -static void __init pxa_cpufreq_init_voltages (void ) { } +static void pxa_cpufreq_init_voltages (void ) { }#endif static void find_freq_tables(struct cpufreq_frequency_table **freq_table,
drivers/cpufreq/tegra124-cpufreq.c +2 -0
@@ -134,6 +134,8 @@ static int tegra124_cpufreq_probe(struct platform_device *pdev)platform_set_drvdata (pdev, priv); +of_node_put (np); +return 0 ; out_switch_to_pllx:
drivers/crypto/caam/caamalg.c +1 -0
@@ -1097,6 +1097,7 @@ static void init_ablkcipher_job(u32 *sh_desc, dma_addr_t ptr, }else {if (edesc->dst_nents ==1 ) { dst_dma =sg_dma_address (req->dst); + out_options =0 ; }else { dst_dma = edesc->sec4_sg_dma + (edesc->src_nents +1 ) *sizeof (struct sec4_sg_entry );
drivers/crypto/rockchip/rk3288_crypto.c +1 -1
@@ -119,7 +119,7 @@ static int rk_load_data(struct rk_crypto_info *dev, count = (dev->left_bytes >PAGE_SIZE ) ?PAGE_SIZE : dev->left_bytes; -if (!sg_pcopy_to_buffer (dev->first, dev->nents, +if (!sg_pcopy_to_buffer (dev->first, dev->src_nents, dev->addr_vir, count, dev->total - dev->left_bytes)) { dev_err(dev->dev, "[%s:%d] pcopy err\n",
drivers/crypto/rockchip/rk3288_crypto.h +3 -1
@@ -207,7 +207,8 @@ struct rk_crypto_info {void *addr_vir;int aligned;int align_size; -size_t nents; +size_t src_nents; +size_t dst_nents;unsigned int total;unsigned int count;dma_addr_t addr_in;
@@ -244,6 +245,7 @@ struct rk_cipher_ctx {struct rk_crypto_info *dev;unsigned int keylen;u32 mode; +u8 iv[AES_BLOCK_SIZE ]; };enum alg_type {
drivers/crypto/rockchip/rk3288_crypto_ablkcipher.c +37 -2
@@ -242,6 +242,17 @@ static void crypto_dma_start(struct rk_crypto_info *dev)static int rk_set_data_start (struct rk_crypto_info *dev) {int err; +struct ablkcipher_request *req = +ablkcipher_request_cast (dev->async_req); +struct crypto_ablkcipher *tfm =crypto_ablkcipher_reqtfm (req); +struct rk_cipher_ctx *ctx =crypto_ablkcipher_ctx (tfm); +u32 ivsize =crypto_ablkcipher_ivsize (tfm); +u8 *src_last_blk =page_address (sg_page (dev->sg_src)) + + dev->sg_src->offset + dev->sg_src->length - ivsize; + +/* store the iv that need to be updated in chain mode */ +if (ctx->mode &RK_CRYPTO_DEC ) +memcpy (ctx->iv, src_last_blk, ivsize); err = dev->load_data (dev, dev->sg_src, dev->sg_dst);if (!err)
@@ -260,8 +271,9 @@ static int rk_ablk_start(struct rk_crypto_info *dev) dev->total = req->nbytes; dev->sg_src = req->src; dev->first = req->src; - dev->nents =sg_nents (req->src); + dev->src_nents =sg_nents (req->src); dev->sg_dst = req->dst; + dev->dst_nents =sg_nents (req->dst); dev->aligned =1 ;spin_lock_irqsave (&dev->lock, flags);
@@ -285,6 +297,28 @@ static void rk_iv_copyback(struct rk_crypto_info *dev)memcpy_fromio (req->info, dev->reg +RK_CRYPTO_AES_IV_0 , ivsize); } +static void rk_update_iv (struct rk_crypto_info *dev) +{ +struct ablkcipher_request *req = +ablkcipher_request_cast (dev->async_req); +struct crypto_ablkcipher *tfm =crypto_ablkcipher_reqtfm (req); +struct rk_cipher_ctx *ctx =crypto_ablkcipher_ctx (tfm); +u32 ivsize =crypto_ablkcipher_ivsize (tfm); +u8 *new_iv =NULL ; + +if (ctx->mode &RK_CRYPTO_DEC ) { + new_iv = ctx->iv; + }else { + new_iv =page_address (sg_page (dev->sg_dst)) + + dev->sg_dst->offset + dev->sg_dst->length - ivsize; + } + +if (ivsize ==DES_BLOCK_SIZE ) +memcpy_toio (dev->reg +RK_CRYPTO_TDES_IV_0 , new_iv, ivsize); +else if (ivsize ==AES_BLOCK_SIZE ) +memcpy_toio (dev->reg +RK_CRYPTO_AES_IV_0 , new_iv, ivsize); +} +/* return: * true some err was occurred * fault no err, continue
@@ -297,7 +331,7 @@ static int rk_ablk_rx(struct rk_crypto_info *dev) dev->unload_data (dev);if (!dev->aligned) { -if (!sg_pcopy_from_buffer (req->dst, dev->nents, +if (!sg_pcopy_from_buffer (req->dst, dev->dst_nents, dev->addr_vir, dev->count, dev->total - dev->left_bytes - dev->count)) {
@@ -306,6 +340,7 @@ static int rk_ablk_rx(struct rk_crypto_info *dev) } }if (dev->left_bytes) { +rk_update_iv (dev);if (dev->aligned) {if (sg_is_last (dev->sg_src)) { dev_err(dev->dev, "[%s:%d] Lack of data\n",
drivers/crypto/rockchip/rk3288_crypto_ahash.c +1 -1
@@ -206,7 +206,7 @@ static int rk_ahash_start(struct rk_crypto_info *dev) dev->sg_dst =NULL ; dev->sg_src = req->src; dev->first = req->src; - dev->nents =sg_nents (req->src); + dev->src_nents =sg_nents (req->src); rctx =ahash_request_ctx (req); rctx->mode =0 ;
drivers/gpu/drm/i915/i915_gem.c +2 -1
@@ -1640,7 +1640,8 @@ __vma_matches(struct vm_area_struct *vma, struct file *filp,if (vma->vm_file != filp)return false; -return vma->vm_start == addr && (vma->vm_end - vma->vm_start) == size; +return vma->vm_start == addr && + (vma->vm_end - vma->vm_start) ==PAGE_ALIGN (size); }/**
drivers/gpu/drm/imx/imx-ldb.c +17 -8
@@ -652,8 +652,10 @@ static int imx_ldb_bind(struct device *dev, struct device *master, void *data)int bus_format; ret =of_property_read_u32 (child,"reg" , &i); -if (ret || i <0 || i >1 ) -return -EINVAL ; +if (ret || i <0 || i >1 ) { + ret = -EINVAL ; + goto free_child; + }if (!of_device_is_available (child))continue ;
@@ -666,7 +668,6 @@ static int imx_ldb_bind(struct device *dev, struct device *master, void *data) channel = &imx_ldb->channel[i]; channel->ldb = imx_ldb; channel->chno = i; - channel->child = child;/* * The output port is port@4 with an external 4-port mux or
@@ -676,13 +677,13 @@ static int imx_ldb_bind(struct device *dev, struct device *master, void *data) imx_ldb->lvds_mux ?4 :2 ,0 , &channel->panel, &channel->bridge);if (ret && ret != -ENODEV ) -return ret; + goto free_child;/* panel ddc only if there is no bridge */ if (!channel->bridge) { ret =imx_ldb_panel_ddc (dev, channel, child);if (ret) -return ret; + goto free_child; } bus_format =of_get_bus_format (dev, child);
@@ -698,18 +699,26 @@ static int imx_ldb_bind(struct device *dev, struct device *master, void *data)if (bus_format <0 ) {dev_err (dev,"could not determine data mapping: %d\n" , bus_format); -return bus_format; + ret = bus_format; + goto free_child; } channel->bus_format = bus_format; + channel->child = child; ret =imx_ldb_register (drm, channel); -if (ret) -return ret; +if (ret) { + channel->child =NULL ; + goto free_child; + } }dev_set_drvdata (dev, imx_ldb);return 0 ; + +free_child: +of_node_put (child); +return ret; } static void imx_ldb_unbind(struct device *dev, struct device *master,
drivers/gpu/drm/imx/ipuv3-plane.c +2 -2
@@ -348,9 +348,9 @@ static int ipu_plane_atomic_check(struct drm_plane *plane,if (ret)return ret; -/* CRTC should be enabled */ +/* nothing to check when disabling or disabled */ if (!crtc_state->enable) -return -EINVAL ; +return 0 ;switch (plane->type) {case DRM_PLANE_TYPE_PRIMARY :
drivers/gpu/drm/radeon/evergreen_cs.c +1 -0
@@ -1299,6 +1299,7 @@ static int evergreen_cs_handle_reg(struct radeon_cs_parser *p, u32 reg, u32 idx)return -EINVAL ; } ib[idx] += (u32)((reloc->gpu_offset >>8 ) &0xffffffff ); +break ;case CB_TARGET_MASK : track->cb_target_mask =radeon_get_ib_value (p, idx); track->cb_dirty = true;
drivers/gpu/ipu-v3/ipu-common.c +4 -4
@@ -894,8 +894,8 @@ static struct ipu_devtype ipu_type_imx51 = { .cpmem_ofs = 0x1f000000, .srm_ofs = 0x1f040000, .tpm_ofs = 0x1f060000, - .csi0_ofs = 0x1f030000, - .csi1_ofs = 0x1f038000, + .csi0_ofs = 0x1e030000, + .csi1_ofs = 0x1e038000, .ic_ofs = 0x1e020000, .disp0_ofs = 0x1e040000, .disp1_ofs = 0x1e048000,
@@ -910,8 +910,8 @@ static struct ipu_devtype ipu_type_imx53 = { .cpmem_ofs = 0x07000000, .srm_ofs = 0x07040000, .tpm_ofs = 0x07060000, - .csi0_ofs = 0x07030000, - .csi1_ofs = 0x07038000, + .csi0_ofs = 0x06030000, + .csi1_ofs = 0x06038000, .ic_ofs = 0x06020000, .disp0_ofs = 0x06040000, .disp1_ofs = 0x06048000,
drivers/hwtracing/intel_th/gth.c +4 -0
@@ -615,6 +615,7 @@ static void intel_th_gth_unassign(struct intel_th_device *thdev, {struct gth_device *gth =dev_get_drvdata (&thdev->dev);int port = othdev->output.port; +int master;if (thdev->host_mode)return ;
@@ -623,6 +624,9 @@ static void intel_th_gth_unassign(struct intel_th_device *thdev, othdev->output.port =-1 ; othdev->output.active = false; gth->output[port].output =NULL ; +for (master =0 ; master <TH_CONFIGURABLE_MASTERS ; master++) +if (gth->master[master] == port) + gth->master[master] =-1 ;spin_unlock (>h->gth_lock); }
drivers/hwtracing/stm/core.c +8 -3
@@ -252,6 +252,9 @@ static int find_free_channels(unsigned long *bitmap, unsigned int start, ;if (i == width)return pos; + +/* step over [pos..pos+i) to continue search */ + pos += i; }return -1 ;
@@ -558,7 +561,7 @@ static int stm_char_policy_set_ioctl(struct stm_file *stmf, void __user *arg) {struct stm_device *stm = stmf->stm;struct stp_policy_id *id; -int ret = -EINVAL ; +int ret = -EINVAL , wlimit =1 ;u32 size;if (stmf->output.nr_chans)
@@ -586,8 +589,10 @@ static int stm_char_policy_set_ioctl(struct stm_file *stmf, void __user *arg)if (id->__reserved_0 || id->__reserved_1) goto err_free; -if (id->width <1 || - id->width >PAGE_SIZE / stm->data->sw_mmiosz) +if (stm->data->sw_mmiosz) + wlimit =PAGE_SIZE / stm->data->sw_mmiosz; + +if (id->width <1 || id->width > wlimit) goto err_free; ret =stm_file_assign (stmf, id->id, id->width);
drivers/i2c/busses/i2c-bcm2835.c +12 -0
@@ -191,6 +191,15 @@ static void bcm2835_i2c_start_transfer(struct bcm2835_i2c_dev *i2c_dev)bcm2835_i2c_writel (i2c_dev,BCM2835_I2C_C , c); } +static void bcm2835_i2c_finish_transfer (struct bcm2835_i2c_dev *i2c_dev) +{ + i2c_dev->curr_msg =NULL ; + i2c_dev->num_msgs =0 ; + + i2c_dev->msg_buf =NULL ; + i2c_dev->msg_buf_remaining =0 ; +} +/* * Note about I2C_C_CLEAR on error: * The I2C_C_CLEAR on errors will take some time to resolve -- if you were in
@@ -291,6 +300,9 @@ static int bcm2835_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], time_left =wait_for_completion_timeout (&i2c_dev->completion, adap->timeout); + +bcm2835_i2c_finish_transfer (i2c_dev); +if (!time_left) {bcm2835_i2c_writel (i2c_dev,BCM2835_I2C_C ,BCM2835_I2C_C_CLEAR );
drivers/i2c/busses/i2c-cadence.c +7 -2
@@ -382,8 +382,10 @@ static void cdns_i2c_mrecv(struct cdns_i2c *id)* Check for the message size against FIFO depth and set the * 'hold bus' bit if it is greater than FIFO depth. */ -if (id->recv_count >CDNS_I2C_FIFO_DEPTH ) +if ((id->recv_count >CDNS_I2C_FIFO_DEPTH ) || id->bus_hold_flag) ctrl_reg |=CDNS_I2C_CR_HOLD ; +else + ctrl_reg = ctrl_reg & ~CDNS_I2C_CR_HOLD ;cdns_i2c_writereg (ctrl_reg,CDNS_I2C_CR_OFFSET );
@@ -440,8 +442,11 @@ static void cdns_i2c_msend(struct cdns_i2c *id)* Check for the message size against FIFO depth and set the * 'hold bus' bit if it is greater than FIFO depth. */ -if (id->send_count >CDNS_I2C_FIFO_DEPTH ) +if ((id->send_count >CDNS_I2C_FIFO_DEPTH ) || id->bus_hold_flag) ctrl_reg |=CDNS_I2C_CR_HOLD ; +else + ctrl_reg = ctrl_reg & ~CDNS_I2C_CR_HOLD ; +cdns_i2c_writereg (ctrl_reg,CDNS_I2C_CR_OFFSET );/* Clear the interrupts in interrupt status register. */
drivers/i2c/busses/i2c-tegra.c +1 -1
@@ -794,7 +794,7 @@ static const struct i2c_algorithm tegra_i2c_algo = {/* payload size is only 12 bit */ static const struct i2c_adapter_quirks tegra_i2c_quirks = { .max_read_len =4096 , - .max_write_len =4096 , + .max_write_len =4096 -12 , };static const struct tegra_i2c_hw_feature tegra20_i2c_hw = {
drivers/iio/adc/exynos_adc.c +1 -1
@@ -916,7 +916,7 @@ static int exynos_adc_remove(struct platform_device *pdev)struct iio_dev *indio_dev =platform_get_drvdata (pdev);struct exynos_adc *info =iio_priv (indio_dev); -if (IS_REACHABLE (CONFIG_INPUT )) { +if (IS_REACHABLE (CONFIG_INPUT ) && info->input) {free_irq (info->tsirq, info);input_unregister_device (info->input); }
drivers/infiniband/hw/hfi1/hfi.h +1 -1
@@ -1398,7 +1398,7 @@ void hfi1_init_pportdata(struct pci_dev *pdev, struct hfi1_pportdata *ppd, struct hfi1_devdata *dd, u8 hw_pidx, u8 port);void hfi1_free_ctxtdata (struct hfi1_devdata *dd,struct hfi1_ctxtdata *rcd);int hfi1_rcd_put (struct hfi1_ctxtdata *rcd); -void hfi1_rcd_get (struct hfi1_ctxtdata *rcd); +int hfi1_rcd_get (struct hfi1_ctxtdata *rcd);struct hfi1_ctxtdata *hfi1_rcd_get_by_index (struct hfi1_devdata *dd,u16 ctxt);int handle_receive_interrupt (struct hfi1_ctxtdata *rcd,int thread);int handle_receive_interrupt_nodma_rtail (struct hfi1_ctxtdata *rcd,int thread);
drivers/infiniband/hw/hfi1/init.c +9 -5
@@ -215,12 +215,12 @@ static void hfi1_rcd_free(struct kref *kref)struct hfi1_ctxtdata *rcd = container_of(kref, struct hfi1_ctxtdata, kref); -hfi1_free_ctxtdata (rcd->dd, rcd); -spin_lock_irqsave (&rcd->dd->uctxt_lock, flags); rcd->dd->rcd[rcd->ctxt] =NULL ;spin_unlock_irqrestore (&rcd->dd->uctxt_lock, flags); +hfi1_free_ctxtdata (rcd->dd, rcd); +kfree (rcd); }
@@ -243,10 +243,13 @@ int hfi1_rcd_put(struct hfi1_ctxtdata *rcd)* @rcd: pointer to an initialized rcd data structure * * Use this to get a reference after the init. +* +* Return : reflect kref_get_unless_zero(), which returns non-zero on +* increment, otherwise 0. */ -void hfi1_rcd_get (struct hfi1_ctxtdata *rcd) +int hfi1_rcd_get (struct hfi1_ctxtdata *rcd) { -kref_get (&rcd->kref); +return kref_get_unless_zero (&rcd->kref); }/**
@@ -305,7 +308,8 @@ struct hfi1_ctxtdata *hfi1_rcd_get_by_index(struct hfi1_devdata *dd, u16 ctxt)spin_lock_irqsave (&dd->uctxt_lock, flags);if (dd->rcd[ctxt]) { rcd = dd->rcd[ctxt]; -hfi1_rcd_get (rcd); +if (!hfi1_rcd_get (rcd)) + rcd =NULL ; }spin_unlock_irqrestore (&dd->uctxt_lock, flags);
drivers/input/keyboard/cap11xx.c +11 -24
@@ -75,9 +75,7 @@struct cap11xx_led {struct cap11xx_priv *priv;struct led_classdev cdev; -struct work_struct work;u32 reg; -enum led_brightness new_brightness; };#endif
@@ -233,30 +231,21 @@ static void cap11xx_input_close(struct input_dev *idev) }#ifdef CONFIG_LEDS_CLASS -static void cap11xx_led_work (struct work_struct *work) +static int cap11xx_led_set (struct led_classdev *cdev, +enum led_brightness value) { - struct cap11xx_led *led = container_of(work, struct cap11xx_led, work); + struct cap11xx_led *led = container_of(cdev, struct cap11xx_led, cdev);struct cap11xx_priv *priv = led->priv; -int value = led->new_brightness;/* -* All LEDs share the same duty cycle as this is a HW limitation. -* Brightness levels per LED are either 0 (OFF) and 1 (ON). +* All LEDs share the same duty cycle as this is a HW +* limitation. Brightness levels per LED are either +* 0 (OFF) and 1 (ON). */ -regmap_update_bits (priv->regmap,CAP11XX_REG_LED_OUTPUT_CONTROL , -BIT (led->reg), value ?BIT (led->reg) :0 ); -} - -static void cap11xx_led_set (struct led_classdev *cdev, -enum led_brightness value) -{ - struct cap11xx_led *led = container_of(cdev, struct cap11xx_led, cdev); - -if (led->new_brightness == value) -return ; - - led->new_brightness = value; -schedule_work (&led->work); +return regmap_update_bits (priv->regmap, +CAP11XX_REG_LED_OUTPUT_CONTROL , +BIT (led->reg), + value ?BIT (led->reg) :0 ); } static int cap11xx_init_leds(struct device *dev,
@@ -299,7 +288,7 @@ static int cap11xx_init_leds(struct device *dev, led->cdev.default_trigger =of_get_property (child,"linux,default-trigger" ,NULL ); led->cdev.flags =0 ; - led->cdev.brightness_set = cap11xx_led_set; + led->cdev.brightness_set_blocking = cap11xx_led_set; led->cdev.max_brightness =1 ; led->cdev.brightness =LED_OFF ;
@@ -312,8 +301,6 @@ static int cap11xx_init_leds(struct device *dev, led->reg = reg; led->priv = priv; -INIT_WORK (&led->work, cap11xx_led_work); - error =devm_led_classdev_register (dev, &led->cdev);if (error) {of_node_put (child);
drivers/input/keyboard/matrix_keypad.c +1 -1
@@ -222,7 +222,7 @@ static void matrix_keypad_stop(struct input_dev *dev) keypad->stopped = true;spin_unlock_irq (&keypad->lock); -flush_work (&keypad->work.work); +flush_delayed_work (&keypad->work);/* * matrix_keypad_scan() will leave IRQs enabled; * we should disable them now.
drivers/input/keyboard/st-keyscan.c +2 -2
@@ -153,6 +153,8 @@ static int keyscan_probe(struct platform_device *pdev) input_dev->id.bustype =BUS_HOST ; + keypad_data->input_dev = input_dev; + error =keypad_matrix_key_parse_dt (keypad_data);if (error)return error;
@@ -168,8 +170,6 @@ static int keyscan_probe(struct platform_device *pdev)input_set_drvdata (input_dev, keypad_data); - keypad_data->input_dev = input_dev; - res =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); keypad_data->base =devm_ioremap_resource (&pdev->dev, res);if (IS_ERR (keypad_data->base))
drivers/input/misc/pwm-vibra.c +13 -6
@@ -34,6 +34,7 @@ struct pwm_vibrator {struct work_struct play_work;u16 level;u32 direction_duty_cycle; +bool vcc_on; };static int pwm_vibrator_start (struct pwm_vibrator *vibrator)
@@ -42,10 +43,13 @@ static int pwm_vibrator_start(struct pwm_vibrator *vibrator)struct pwm_state state;int err; - err =regulator_enable (vibrator->vcc); -if (err) { -dev_err (pdev,"failed to enable regulator: %d" , err); -return err; +if (!vibrator->vcc_on) { + err =regulator_enable (vibrator->vcc); +if (err) { +dev_err (pdev,"failed to enable regulator: %d" , err); +return err; + } + vibrator->vcc_on = true; }pwm_get_state (vibrator->pwm, &state);
@@ -76,11 +80,14 @@ static int pwm_vibrator_start(struct pwm_vibrator *vibrator)static void pwm_vibrator_stop (struct pwm_vibrator *vibrator) { -regulator_disable (vibrator->vcc); -if (vibrator->pwm_dir)pwm_disable (vibrator->pwm_dir);pwm_disable (vibrator->pwm); + +if (vibrator->vcc_on) { +regulator_disable (vibrator->vcc); + vibrator->vcc_on = false; + } }static void pwm_vibrator_play_work (struct work_struct *work)
drivers/input/serio/ps2-gpio.c +1 -0
@@ -76,6 +76,7 @@ static void ps2_gpio_close(struct serio *serio) {struct ps2_gpio_data *drvdata = serio->port_data; +flush_delayed_work (&drvdata->tx_work);disable_irq (drvdata->irq); }
drivers/irqchip/irq-gic-v3-its.c +2 -0
@@ -1708,6 +1708,8 @@ static int its_alloc_tables(struct its_node *its) indirect =its_parse_indirect_baser (its, baser, psz, &order, its->device_ids); +break ; +case GITS_BASER_TYPE_VCPU : indirect = its_parse_indirect_baser(its, baser, psz, &order,
drivers/mailbox/bcm-flexrm-mailbox.c +2 -2
@@ -1381,9 +1381,9 @@ static void flexrm_shutdown(struct mbox_chan *chan)/* Clear ring flush state */ timeout =1000 ;/* timeout of 1s */ -writel_relaxed (0x0 , ring +RING_CONTROL ); +writel_relaxed (0x0 , ring->regs +RING_CONTROL ); do { - if (!(readl_relaxed(ring + RING_FLUSH_DONE) & + if (!(readl_relaxed(ring->regs + RING_FLUSH_DONE) & FLUSH_DONE_MASK)) break; mdelay(1);
drivers/md/bcache/writeback.h +3 -0
@@ -69,6 +69,9 @@ static inline bool should_writeback(struct cached_dev *dc, struct bio *bio, in_use > CUTOFF_WRITEBACK_SYNC)return false; +if (bio_op (bio) ==REQ_OP_DISCARD ) +return false; +if (dc->partial_stripes_expensive &&bcache_dev_stripe_dirty (dc, bio->bi_iter.bi_sector,bio_sectors (bio)))
drivers/md/dm-integrity.c +4 -4
@@ -1276,8 +1276,8 @@ static void integrity_metadata(struct work_struct *w) checksums_ptr - checksums, !dio->write ? TAG_CMP : TAG_WRITE);if (unlikely (r)) {if (r >0 ) { -DMERR ("Checksum failed at sector 0x%llx" , - (unsigned long long )(sector - ((r + ic->tag_size -1 ) / ic->tag_size))); +DMERR_LIMIT ("Checksum failed at sector 0x%llx" , + (unsigned long long )(sector - ((r + ic->tag_size -1 ) / ic->tag_size))); r = -EILSEQ ;atomic64_inc (&ic->number_of_mismatches); }
@@ -1469,8 +1469,8 @@ static bool __journal_read_write(struct dm_integrity_io *dio, struct bio *bio,integrity_sector_checksum (ic, logical_sector, mem + bv.bv_offset, checksums_onstack);if (unlikely (memcmp (checksums_onstack,journal_entry_tag (ic, je), ic->tag_size))) { -DMERR ("Checksum failed when reading from journal, at sector 0x%llx" , - (unsigned long long )logical_sector); +DMERR_LIMIT ("Checksum failed when reading from journal, at sector 0x%llx" , + (unsigned long long )logical_sector); } }#endif
drivers/md/raid10.c +2 -0
@@ -3821,6 +3821,8 @@ static int raid10_run(struct mddev *mddev)set_bit (MD_RECOVERY_RUNNING , &mddev->recovery); mddev->sync_thread =md_register_thread (md_do_sync, mddev,"reshape" ); +if (!mddev->sync_thread) + goto out_free_conf; }return 0 ;
drivers/md/raid5.c +2 -0
@@ -7370,6 +7370,8 @@ static int raid5_run(struct mddev *mddev)set_bit (MD_RECOVERY_RUNNING , &mddev->recovery); mddev->sync_thread =md_register_thread (md_do_sync, mddev,"reshape" ); +if (!mddev->sync_thread) + goto abort; }/* Ok, everything is just fine now */
drivers/media/platform/vimc/Makefile +2 -1
@@ -5,6 +5,7 @@ vimc_common-objs := vimc-common.o vimc_debayer-objs := vimc-debayer.o vimc_scaler-objs := vimc-scaler.o vimc_sensor-objs := vimc-sensor.o +vimc_streamer-objs := vimc-streamer.o obj-$(CONFIG_VIDEO_VIMC) += vimc.o vimc_capture.o vimc_common.o vimc-debayer.o \ - vimc_scaler.o vimc_sensor.o + vimc_scaler.o vimc_sensor.o vimc_streamer.o
drivers/media/platform/vimc/vimc-capture.c +9 -9
@@ -23,6 +23,7 @@#include <media/videobuf2-vmalloc.h> #include "vimc-common.h" +#include "vimc-streamer.h" #define VIMC_CAP_DRV_NAME "vimc-capture"
@@ -43,7 +44,7 @@ struct vimc_cap_device {spinlock_t qlock;struct mutex lock;u32 sequence; -struct media_pipeline pipe; +struct vimc_stream stream; };static const struct v4l2_pix_format fmt_default = {
@@ -247,14 +248,13 @@ static int vimc_cap_start_streaming(struct vb2_queue *vq, unsigned int count) vcap->sequence =0 ;/* Start the media pipeline */ - ret =media_pipeline_start (entity, &vcap->pipe); + ret =media_pipeline_start (entity, &vcap->stream.pipe);if (ret) {vimc_cap_return_all_buffers (vcap,VB2_BUF_STATE_QUEUED );return ret; } -/* Enable streaming from the pipe */ - ret =vimc_pipeline_s_stream (&vcap->vdev.entity,1 ); + ret =vimc_streamer_s_stream (&vcap->stream, &vcap->ved,1 );if (ret) {media_pipeline_stop (entity);vimc_cap_return_all_buffers (vcap,VB2_BUF_STATE_QUEUED );
@@ -272,8 +272,7 @@ static void vimc_cap_stop_streaming(struct vb2_queue *vq) {struct vimc_cap_device *vcap =vb2_get_drv_priv (vq); -/* Disable streaming from the pipe */ -vimc_pipeline_s_stream (&vcap->vdev.entity,0 ); +vimc_streamer_s_stream (&vcap->stream, &vcap->ved,0 );/* Stop the media pipeline */ media_pipeline_stop (&vcap->vdev.entity);
@@ -354,8 +353,8 @@ static void vimc_cap_comp_unbind(struct device *comp, struct device *master,kfree (vcap); } -static void vimc_cap_process_frame (struct vimc_ent_device *ved, -struct media_pad *sink,const void *frame) +static void *vimc_cap_process_frame (struct vimc_ent_device *ved, +const void *frame) { struct vimc_cap_device *vcap = container_of(ved, struct vimc_cap_device, ved);
@@ -369,7 +368,7 @@ static void vimc_cap_process_frame(struct vimc_ent_device *ved, typeof(*vimc_buf), list);if (!vimc_buf) {spin_unlock (&vcap->qlock); -return ; +return ERR_PTR (-EAGAIN ); }/* Remove this entry from the list */
@@ -390,6 +389,7 @@ static void vimc_cap_process_frame(struct vimc_ent_device *ved,vb2_set_plane_payload (&vimc_buf->vb2.vb2_buf,0 , vcap->format.sizeimage);vb2_buffer_done (&vimc_buf->vb2.vb2_buf,VB2_BUF_STATE_DONE ); +return NULL ; } static int vimc_cap_comp_bind(struct device *comp, struct device *master,
drivers/media/platform/vimc/vimc-common.c +0 -35
@@ -207,41 +207,6 @@ const struct vimc_pix_map *vimc_pix_map_by_pixelformat(u32 pixelformat) }EXPORT_SYMBOL_GPL (vimc_pix_map_by_pixelformat); -int vimc_propagate_frame (struct media_pad *src,const void *frame) -{ -struct media_link *link; - -if (!(src->flags &MEDIA_PAD_FL_SOURCE )) -return -EINVAL ; - -/* Send this frame to all sink pads that are direct linked */ -list_for_each_entry (link, &src->entity->links, list) { -if (link->source == src && - (link->flags &MEDIA_LNK_FL_ENABLED )) { -struct vimc_ent_device *ved =NULL ; -struct media_entity *entity = link->sink->entity; - -if (is_media_entity_v4l2_subdev (entity)) { -struct v4l2_subdev *sd = - container_of(entity, struct v4l2_subdev, - entity); - ved =v4l2_get_subdevdata (sd); - }else if (is_media_entity_v4l2_video_device (entity)) { -struct video_device *vdev = -container_of (entity, - struct video_device, - entity); - ved =video_get_drvdata (vdev); - } -if (ved && ved->process_frame) - ved->process_frame (ved, link->sink, frame); - } - } - -return 0 ; -} -EXPORT_SYMBOL_GPL (vimc_propagate_frame); -/* Helper function to allocate and initialize pads */ struct media_pad *vimc_pads_init (u16 num_pads,const unsigned long *pads_flag) {
drivers/media/platform/vimc/vimc-common.h +2 -13
@@ -108,23 +108,12 @@ struct vimc_pix_map {struct vimc_ent_device {struct media_entity *ent;struct media_pad *pads; -void (*process_frame)(struct vimc_ent_device *ved, -struct media_pad *sink,const void *frame); +void * (*process_frame)(struct vimc_ent_device *ved, +const void *frame);void (*vdev_get_format)(struct vimc_ent_device *ved,struct v4l2_pix_format *fmt); }; -/** -* vimc_propagate_frame - propagate a frame through the topology -* -* @src: the source pad where the frame is being originated -* @frame: the frame to be propagated -* -* This function will call the process_frame callback from the vimc_ent_device -* struct of the nodes directly connected to the @src pad -*/ -int vimc_propagate_frame (struct media_pad *src,const void *frame); -/** * vimc_pads_init - initialize pads *
drivers/media/platform/vimc/vimc-debayer.c +4 -22
@@ -320,7 +320,6 @@ static void vimc_deb_set_rgb_mbus_fmt_rgb888_1x24(struct vimc_deb_device *vdeb,static int vimc_deb_s_stream (struct v4l2_subdev *sd,int enable) {struct vimc_deb_device *vdeb =v4l2_get_subdevdata (sd); -int ret;if (enable) {const struct vimc_pix_map *vpix;
@@ -350,22 +349,10 @@ static int vimc_deb_s_stream(struct v4l2_subdev *sd, int enable)if (!vdeb->src_frame)return -ENOMEM ; -/* Turn the stream on in the subdevices directly connected */ - ret =vimc_pipeline_s_stream (&vdeb->sd.entity,1 ); -if (ret) { -vfree (vdeb->src_frame); - vdeb->src_frame =NULL ; -return ret; - } }else {if (!vdeb->src_frame)return 0 ; -/* Disable streaming from the pipe */ - ret =vimc_pipeline_s_stream (&vdeb->sd.entity,0 ); -if (ret) -return ret; -vfree (vdeb->src_frame); vdeb->src_frame =NULL ; }
@@ -479,9 +466,8 @@ static void vimc_deb_calc_rgb_sink(struct vimc_deb_device *vdeb, } } -static void vimc_deb_process_frame (struct vimc_ent_device *ved, -struct media_pad *sink, -const void *sink_frame) +static void *vimc_deb_process_frame (struct vimc_ent_device *ved, +const void *sink_frame) { struct vimc_deb_device *vdeb = container_of(ved, struct vimc_deb_device, ved);
@@ -490,7 +476,7 @@ static void vimc_deb_process_frame(struct vimc_ent_device *ved,/* If the stream in this node is not active, just return */ if (!vdeb->src_frame) -return ; +return ERR_PTR (-EINVAL );for (i =0 ; i < vdeb->sink_fmt.height; i++)for (j =0 ; j < vdeb->sink_fmt.width; j++) {
@@ -498,12 +484,8 @@ static void vimc_deb_process_frame(struct vimc_ent_device *ved, vdeb->set_rgb_src (vdeb, i, j, rgb); } -/* Propagate the frame through all source pads */ -for (i =1 ; i < vdeb->sd.entity.num_pads; i++) { -struct media_pad *pad = &vdeb->sd.entity.pads[i]; +return vdeb->src_frame; -vimc_propagate_frame (pad, vdeb->src_frame); - } } static void vimc_deb_comp_unbind(struct device *comp, struct device *master,
drivers/media/platform/vimc/vimc-scaler.c +4 -24
@@ -216,7 +216,6 @@ static const struct v4l2_subdev_pad_ops vimc_sca_pad_ops = {static int vimc_sca_s_stream (struct v4l2_subdev *sd,int enable) {struct vimc_sca_device *vsca =v4l2_get_subdevdata (sd); -int ret;if (enable) {const struct vimc_pix_map *vpix;
@@ -244,22 +243,10 @@ static int vimc_sca_s_stream(struct v4l2_subdev *sd, int enable)if (!vsca->src_frame)return -ENOMEM ; -/* Turn the stream on in the subdevices directly connected */ - ret =vimc_pipeline_s_stream (&vsca->sd.entity,1 ); -if (ret) { -vfree (vsca->src_frame); - vsca->src_frame =NULL ; -return ret; - } }else {if (!vsca->src_frame)return 0 ; -/* Disable streaming from the pipe */ - ret =vimc_pipeline_s_stream (&vsca->sd.entity,0 ); -if (ret) -return ret; -vfree (vsca->src_frame); vsca->src_frame =NULL ; }
@@ -345,26 +332,19 @@ static void vimc_sca_fill_src_frame(const struct vimc_sca_device *const vsca,vimc_sca_scale_pix (vsca, i, j, sink_frame); } -static void vimc_sca_process_frame (struct vimc_ent_device *ved, -struct media_pad *sink, -const void *sink_frame) +static void *vimc_sca_process_frame (struct vimc_ent_device *ved, +const void *sink_frame) { struct vimc_sca_device *vsca = container_of(ved, struct vimc_sca_device, ved); -unsigned int i;/* If the stream in this node is not active, just return */ if (!vsca->src_frame) -return ; +return ERR_PTR (-EINVAL );vimc_sca_fill_src_frame (vsca, sink_frame); -/* Propagate the frame through all source pads */ -for (i =1 ; i < vsca->sd.entity.num_pads; i++) { -struct media_pad *pad = &vsca->sd.entity.pads[i]; - -vimc_propagate_frame (pad, vsca->src_frame); - } +return vsca->src_frame; }; static void vimc_sca_comp_unbind(struct device *comp, struct device *master,
drivers/media/platform/vimc/vimc-sensor.c +13 -43
91 lines not on this page · raw message
drivers/media/platform/vimc/vimc-streamer.c new file +188 -0
188 lines not on this page · raw message
drivers/media/platform/vimc/vimc-streamer.h new file +38 -0
@@ -0,0 +1,38 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* +* vimc-streamer.h Virtual Media Controller Driver +* +* Copyright (C) 2018 Lucas A. M. Magalhães <[email protected]> +* +*/ + +#ifndef _VIMC_STREAMER_H_ +#define _VIMC_STREAMER_H_ + +#include <media/media-device.h> + +#include "vimc-common.h" + +#define VIMC_STREAMER_PIPELINE_MAX_SIZE 16 + +struct vimc_stream { +struct media_pipeline pipe; +struct vimc_ent_device *ved_pipeline[VIMC_STREAMER_PIPELINE_MAX_SIZE ]; +unsigned int pipe_size; +u8 *frame; +struct task_struct *kthread; +}; + +/** +* vimc_streamer_s_streamer - start/stop the stream +* +* @stream: the pointer to the stream to start or stop +* @ved: The last entity of the streamer pipeline +* @enable: any non-zero number start the stream, zero stop +* +*/ +int vimc_streamer_s_stream (struct vimc_stream *stream, +struct vimc_ent_device *ved, +int enable); + +#endif //_VIMC_STREAMER_H_
drivers/media/usb/uvc/uvc_video.c +8 -0
@@ -638,6 +638,14 @@ void uvc_video_clock_update(struct uvc_streaming *stream,if (!uvc_hw_timestamps_param)return ; +/* +* We will get called from __vb2_queue_cancel() if there are buffers +* done but not dequeued by the user, but the sample array has already +* been released at that time. Just bail out in that case. +*/ +if (!clock->samples) +return ; +spin_lock_irqsave (&clock->lock, flags);if (clock->count < clock->size)
drivers/media/v4l2-core/videobuf2-v4l2.c +0 -1
@@ -145,7 +145,6 @@ static void vb2_warn_zero_bytesused(struct vb2_buffer *vb)return ; check_once = true; -WARN_ON (1 );pr_warn ("use of bytesused == 0 is deprecated and will be removed in the future,\n" );if (vb->vb2_queue->allow_zero_bytesused)
drivers/net/ethernet/atheros/atlx/atl2.c +1 -3
Lines of this file are not shown. View the raw message.
drivers/net/ethernet/broadcom/bcmsysport.c +4 -0
Lines of this file are not shown. View the raw message.
drivers/net/ethernet/cavium/thunder/nic_main.c +1 -1
Lines of this file are not shown. View the raw message.
drivers/net/ethernet/cavium/thunder/nicvf_main.c +12 -3
Lines of this file are not shown. View the raw message.
drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c +2 -0
Lines of this file are not shown. View the raw message.
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +5 -2
Lines of this file are not shown. View the raw message.
drivers/net/ethernet/marvell/mv643xx_eth.c +6 -1
Lines of this file are not shown. View the raw message.
drivers/net/ethernet/netronome/nfp/bpf/jit.c +6 -11
Lines of this file are not shown. View the raw message.
drivers/net/ethernet/qlogic/qed/qed_iwarp.c +9 -0
Lines of this file are not shown. View the raw message.
drivers/net/wireless/marvell/libertas_tf/if_usb.c +0 -2
Lines of this file are not shown. View the raw message.
drivers/pinctrl/meson/pinctrl-meson8b.c +1 -1
Lines of this file are not shown. View the raw message.
drivers/scsi/sd.c +50 -9
59 lines not on this page · raw message
drivers/staging/media/imx/imx-ic-prpencvf.c +17 -9
Lines of this file are not shown. View the raw message.
drivers/staging/media/imx/imx-media-csi.c +27 -15
42 lines not on this page · raw message
drivers/tty/serial/8250/8250_pci.c +123 -18
141 lines not on this page · raw message
include/keys/request_key_auth-type.h new file +36 -0
Lines of this file are not shown. View the raw message.
security/keys/request_key.c +29 -43
72 lines not on this page · raw message
tools/perf/util/intel-pt-decoder/intel-pt-decoder.c +34 -3
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.