Linux 4.17.4
Greg KH
maintainerI'm announcing the release of the 4.17.4 kernel.
All users of the 4.17 kernel series must upgrade.
The updated 4.17.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.17.y
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Documentation/ABI/testing/sysfs-class-cxl | 4 Documentation/core-api/printk-formats.rst | 3 Makefile | 2 arch/arm/boot/dts/mt7623.dtsi | 3 arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts | 1 arch/arm/boot/dts/mt7623n-rfb.dtsi | 1 arch/arm/boot/dts/socfpga.dtsi | 4 arch/arm/boot/dts/socfpga_arria10.dtsi | 5 arch/arm/boot/dts/sun8i-h3-libretech-all-h3-cc.dts | 8 arch/arm/include/asm/kgdb.h | 2 arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi | 6 arch/arm64/boot/dts/amlogic/meson-gx.dtsi | 6 arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts | 3 arch/arm64/boot/dts/amlogic/meson-gxl.dtsi | 8 arch/arm64/boot/dts/marvell/armada-cp110.dtsi | 2 arch/arm64/crypto/aes-glue.c | 2 arch/arm64/kernel/cpufeature.c | 2 arch/arm64/kernel/signal.c | 5 arch/arm64/mm/proc.S | 5 arch/m68k/mac/config.c | 2 arch/m68k/mm/kmap.c | 3 arch/mips/ath79/mach-pb44.c | 2 arch/mips/bcm47xx/setup.c | 6 arch/mips/include/asm/io.h | 2 arch/mips/include/asm/mipsregs.h | 3 arch/mips/kernel/mcount.S | 27 +- arch/powerpc/Makefile | 1 arch/powerpc/kernel/dt_cpu_ftrs.c | 3 arch/powerpc/kernel/entry_64.S | 1 arch/powerpc/kernel/fadump.c | 3 arch/powerpc/kernel/hw_breakpoint.c | 4 arch/powerpc/kernel/ptrace.c | 1 arch/powerpc/mm/pkeys.c | 4 arch/powerpc/mm/tlb-radix.c | 2 arch/powerpc/perf/imc-pmu.c | 4 arch/powerpc/platforms/powernv/copy-paste.h | 3 arch/powerpc/platforms/powernv/idle.c | 4 arch/powerpc/platforms/powernv/pci-ioda.c | 1 arch/um/drivers/vector_kern.c | 20 + arch/x86/entry/entry_64_compat.S | 16 - arch/x86/include/asm/barrier.h | 2 arch/x86/kernel/apic/x2apic_uv_x.c | 60 +++++ arch/x86/kernel/cpu/mcheck/mce-severity.c | 5 arch/x86/kernel/cpu/mcheck/mce.c | 44 ++- arch/x86/kernel/e820.c | 15 + arch/x86/kernel/quirks.c | 11 arch/x86/kernel/traps.c | 14 - arch/x86/mm/init.c | 4 arch/x86/mm/init_64.c | 20 + arch/x86/platform/efi/efi_64.c | 4 arch/x86/xen/smp_pv.c | 5 arch/xtensa/kernel/traps.c | 2 block/blk-core.c | 4 crypto/asymmetric_keys/x509_cert_parser.c | 9 drivers/acpi/acpi_lpss.c | 20 + drivers/auxdisplay/Kconfig | 10 drivers/base/core.c | 15 - drivers/base/power/domain.c | 3 drivers/block/rbd.c | 2 drivers/bluetooth/hci_qca.c | 6 drivers/char/hw_random/core.c | 11 drivers/char/ipmi/ipmi_bt_sm.c | 3 drivers/char/tpm/tpm-dev-common.c | 40 +-- drivers/char/tpm/tpm-dev.h | 2 drivers/char/tpm/tpm2-space.c | 3 drivers/clk/at91/clk-pll.c | 13 - drivers/clk/clk-aspeed.c | 4 drivers/clk/meson/meson8b.c | 7 drivers/clk/renesas/renesas-cpg-mssr.c | 9 drivers/cpufreq/intel_pstate.c | 27 +- drivers/cpuidle/cpuidle-powernv.c | 32 ++ drivers/firmware/efi/libstub/tpm.c | 2 drivers/hwmon/k10temp.c | 5 drivers/i2c/algos/i2c-algo-bit.c | 5 drivers/i2c/busses/i2c-gpio.c | 4 drivers/iio/accel/sca3000.c | 9 drivers/iio/adc/ad7791.c | 49 ---- drivers/infiniband/core/umem.c | 11 drivers/infiniband/core/uverbs_main.c | 14 - drivers/infiniband/core/verbs.c | 14 - drivers/infiniband/hw/hfi1/chip.c | 8 drivers/infiniband/hw/hfi1/debugfs.c | 8 drivers/infiniband/hw/hfi1/file_ops.c | 4 drivers/infiniband/hw/hfi1/hfi.h | 1 drivers/infiniband/hw/hfi1/init.c | 22 + drivers/infiniband/hw/hfi1/pio.c | 44 +++ drivers/infiniband/hw/mlx4/mad.c | 1 drivers/infiniband/hw/mlx4/mr.c | 50 +++- drivers/infiniband/hw/mlx5/cq.c | 15 + drivers/infiniband/hw/qib/qib.h | 4 drivers/infiniband/hw/qib/qib_file_ops.c | 10 drivers/infiniband/hw/qib/qib_init.c | 13 + drivers/infiniband/hw/qib/qib_user_pages.c | 20 + drivers/infiniband/sw/rdmavt/cq.c | 31 +- drivers/infiniband/ulp/isert/ib_isert.c | 28 +- drivers/input/joystick/xpad.c | 2 drivers/input/mouse/elan_i2c.h | 2 drivers/input/mouse/elan_i2c_core.c | 3 drivers/input/mouse/elan_i2c_smbus.c | 10 drivers/input/mouse/elantech.c | 11 drivers/input/mouse/psmouse-base.c | 12 - drivers/input/touchscreen/silead.c | 1 drivers/iommu/Kconfig | 1 drivers/iommu/amd_iommu.c | 68 ++++-- drivers/irqchip/irq-gic-v3-its.c | 9 drivers/md/dm-thin.c | 11 drivers/md/dm-zoned-target.c | 2 drivers/md/dm.c | 5 drivers/md/md.c | 4 drivers/media/dvb-core/dvb_frontend.c | 23 +- drivers/media/platform/vsp1/vsp1_video.c | 21 + drivers/media/rc/ir-mce_kbd-decoder.c | 2 drivers/media/usb/cx231xx/cx231xx-cards.c | 3 drivers/media/usb/cx231xx/cx231xx-dvb.c | 2 drivers/media/usb/uvc/uvc_video.c | 24 +- drivers/media/v4l2-core/v4l2-compat-ioctl32.c | 2 drivers/mfd/intel-lpss-pci.c | 25 +- drivers/mfd/intel-lpss.c | 4 drivers/mfd/twl-core.c | 2 drivers/misc/cxl/pci.c | 4 drivers/misc/cxl/sysfs.c | 16 + drivers/mmc/host/renesas_sdhi_core.c | 5 drivers/mmc/host/renesas_sdhi_internal_dmac.c | 1 drivers/mmc/host/renesas_sdhi_sys_dmac.c | 3 drivers/mtd/chips/cfi_cmdset_0002.c | 21 + drivers/mtd/nand/raw/denali_dt.c | 6 drivers/mtd/nand/raw/mxc_nand.c | 5 drivers/mtd/nand/raw/nand_base.c | 29 -- drivers/mtd/nand/raw/nand_macronix.c | 48 +++- drivers/mtd/nand/raw/nand_micron.c | 2 drivers/mtd/spi-nor/intel-spi.c | 76 +++++- drivers/mtd/ubi/build.c | 3 drivers/mtd/ubi/eba.c | 90 +++++++- drivers/mtd/ubi/wl.c | 4 drivers/net/ethernet/ti/davinci_emac.c | 15 + drivers/nvdimm/bus.c | 14 - drivers/nvdimm/pmem.c | 10 drivers/nvdimm/region_devs.c | 3 drivers/of/platform.c | 5 drivers/of/resolver.c | 5 drivers/of/unittest.c | 8 drivers/opp/core.c | 2 drivers/pci/host/pci-hyperv.c | 11 drivers/pci/hotplug/pciehp.h | 2 drivers/pci/hotplug/pciehp_core.c | 2 drivers/pci/hotplug/pciehp_hpc.c | 13 + drivers/pci/pci-driver.c | 5 drivers/pci/probe.c | 15 + drivers/pci/quirks.c | 20 + drivers/pinctrl/devicetree.c | 7 drivers/pinctrl/mvebu/pinctrl-armada-37xx.c | 3 drivers/pinctrl/samsung/pinctrl-exynos-arm.c | 4 drivers/platform/chrome/cros_ec_lpc.c | 13 - drivers/pwm/pwm-lpss-platform.c | 5 drivers/pwm/pwm-lpss.c | 30 ++ drivers/pwm/pwm-lpss.h | 2 drivers/remoteproc/qcom_q6v5_pil.c | 10 drivers/rpmsg/qcom_smd.c | 18 - drivers/rtc/rtc-sun6i.c | 4 drivers/s390/scsi/zfcp_dbf.c | 40 +++ drivers/s390/scsi/zfcp_erp.c | 123 ++++++++--- drivers/s390/scsi/zfcp_ext.h | 5 drivers/s390/scsi/zfcp_scsi.c | 18 + drivers/scsi/hpsa.c | 10 drivers/scsi/qla2xxx/qla_gs.c | 4 drivers/scsi/qla2xxx/qla_init.c | 3 drivers/scsi/qla2xxx/qla_isr.c | 8 drivers/scsi/qla2xxx/qla_target.c | 7 drivers/scsi/scsi_debug.c | 2 drivers/soc/rockchip/pm_domains.c | 2 drivers/thermal/broadcom/bcm2835_thermal.c | 4 drivers/tty/serial/sh-sci.c | 8 drivers/usb/core/hub.c | 4 drivers/video/backlight/as3711_bl.c | 33 ++ drivers/video/backlight/max8925_bl.c | 4 drivers/video/backlight/tps65217_bl.c | 4 drivers/video/fbdev/uvesafb.c | 3 drivers/virt/vboxguest/vboxguest_linux.c | 4 drivers/w1/w1.c | 2 drivers/xen/events/events_base.c | 2 fs/btrfs/inode.c | 4 fs/f2fs/checkpoint.c | 4 fs/f2fs/inode.c | 4 fs/f2fs/segment.c | 3 fs/f2fs/segment.h | 1 fs/fuse/control.c | 13 - fs/fuse/dev.c | 3 fs/fuse/dir.c | 13 + fs/fuse/inode.c | 1 fs/nfs/callback_proc.c | 7 fs/nfs/nfs4idmap.c | 5 fs/nfs/nfs4proc.c | 2 fs/nfsd/nfs4xdr.c | 5 fs/ubifs/journal.c | 5 fs/udf/directory.c | 3 include/dt-bindings/clock/aspeed-clock.h | 2 include/linux/blkdev.h | 4 include/linux/compiler.h | 2 include/linux/memory.h | 1 include/linux/slub_def.h | 4 include/rdma/ib_verbs.h | 27 +- include/rdma/rdma_vt.h | 2 kernel/locking/rwsem.c | 1 kernel/printk/printk_safe.c | 5 kernel/softirq.c | 6 kernel/time/time.c | 6 kernel/trace/trace_events_filter.c | 10 lib/Kconfig.kasan | 1 lib/vsprintf.c | 3 mm/gup.c | 36 ++- mm/ksm.c | 14 - mm/slab_common.c | 4 mm/slub.c | 7 net/sunrpc/xprtrdma/rpc_rdma.c | 2 security/selinux/selinuxfs.c | 78 ++---- sound/core/timer.c | 2 sound/pci/hda/hda_codec.c | 5 sound/pci/hda/hda_codec.h | 1 sound/pci/hda/patch_hdmi.c | 5 sound/pci/hda/patch_realtek.c | 20 + sound/soc/cirrus/edb93xx.c | 2 sound/soc/cirrus/ep93xx-i2s.c | 26 +- sound/soc/cirrus/snappercl15.c | 2 sound/soc/codecs/cs35l35.c | 1 sound/soc/mediatek/common/mtk-afe-platform-driver.c | 4 sound/soc/soc-dapm.c | 2 tools/perf/util/dso.c | 2 tools/perf/util/intel-pt-decoder/intel-pt-decoder.c | 23 +- tools/perf/util/intel-pt-decoder/intel-pt-decoder.h | 9 tools/perf/util/intel-pt-decoder/intel-pt-pkt-decoder.c | 2 tools/perf/util/intel-pt.c | 5 tools/testing/selftests/ftrace/test.d/functions | 21 + 232 files changed, 1705 insertions(+), 755 deletions(-)
??? (1):
Input: elantech - fix V4 report decoding for module with middle key
Aaron Ma (1):
Input: elantech - enable middle button of touchpads on ThinkPad P52
Abhishek Sahu (1):
mtd: rawnand: fix return value check for bad block status
Adrian Hunter (6):
perf tools: Fix symbol and object code resolution for vdso32 and vdsox32 perf intel-pt: Fix sync_switch INTEL_PT_SS_NOT_TRACING
perf intel-pt: Fix decoding to accept CBR between FUP and corresponding TIP perf intel-pt: Fix MTC timing after overflow
perf intel-pt: Fix "Unexpected indirect branch" error
perf intel-pt: Fix packet decoding of CYC packets
Akshay Adiga (1):
powerpc/powernv/cpuidle: Init all present cpus for deep states
Alex Estrin (2):
IB/{hfi1, qib}: Add handling of kernel restart IB/isert: Fix for lib/dma_debug check_sync warning
Alex Williamson (1):
PCI: Add ACS quirk for Intel 7th & 8th Gen mobile
Alexander Sverdlin (2):
ASoC: cirrus: i2s: Fix LRCLK configuration
ASoC: cirrus: i2s: Fix {TX|RX}LinCtrlData setup
Alexandr Savca (1):
Input: elan_i2c - add ELAN0618 (Lenovo v330 15IKB) ACPI ID
Alexandru Ardelean (1):
iio: adc: ad7791: remove sample freq sysfs attributes
Alexey Kardashevskiy (1):
powerpc/powernv/ioda2: Remove redundant free of TCE pages
Amit Pundir (1):
Bluetooth: hci_qca: Avoid missing rampatch failure with userspace fw loader
Andy Lutomirski (1):
x86/entry/64/compat: Fix "x86/entry/64/compat: Preserve r8-r11 in int $0x80"
Andy Shevchenko (1):
mfd: intel-lpss: Program REMAP register in PIO mode
Aneesh Kumar K.V (1):
powerpc/mm/hash: Add missing isync prior to kernel stack SLB switch
Anil Gurumurthy (1):
scsi: qla2xxx: Mask off Scope bits in retry delay
Anju T Sudhakar (1):
powerpc/perf: Fix memory allocation for core-imc based on num_possible_cpus()
Anton Ivanov (2):
um: Fix initialization of vector queues
um: Fix raw interface options
Bart Van Assche (2):
block: Fix cloning of requests with a special payload dm zoned: avoid triggering reclaim from inside dmz_map()
Bartosz Golaszewski (1):
net: ethernet: fix suspend/resume in davinci_emac
Ben Hutchings (1):
Input: elan_i2c_smbus - fix more potential stack buffer overflows
Bharat Potnuri (1):
RDMA/core: Save kernel caller name when creating CQ using ib_create_cq()
Boris Brezillon (1):
mtd: rawnand: Do not check FAIL bit when executing a SET_FEATURES op
Boris Ostrovsky (1):
xen: Remove unnecessary BUG_ON from __unbind_from_irq()
Borislav Petkov (1):
x86/mce: Do not overwrite MCi_STATUS in mce_no_way_out()
Brad Love (1):
media: cx231xx: Ignore an i2c mux adapter
Chao Yu (1):
f2fs: don't use GFP_ZERO for page caches
Chen-Yu Tsai (1):
ARM: dts: sun8i: h3: fix ALL-H3-CC H3 ver VCC-1V2 regulator voltage
Chris Packham (1):
mtd: rawnand: micron: add ONFI_FEATURE_ON_DIE_ECC to supported features
Christophe JAILLET (1):
iio: sca3000: Fix an error handling path in 'sca3000_probe()'
Chuck Lever (1):
xprtrdma: Return -ENOBUFS when no pages are available
Corey Minyard (1):
ipmi:bt: Set the timeout before doing a capabilities check
Dan Williams (3):
x86/spectre_v1: Disable compiler optimizations over array_index_mask_nospec()
mm: fix __gup_device_huge vs unmap
mm: fix devmem_is_allowed() for sub-page System RAM intersections
Daniel Wagner (1):
serial: sh-sci: Use spin_{try}lock_irqsave instead of open coding version
Dave Martin (1):
arm64: Fix syscall restarting around signal suppressed by tracer
Dave Wysochanski (1):
NFSv4: Fix possible 1-byte stack overflow in nfs_idmap_read_and_verify_message
David Rivshin (1):
ARM: 8764/1: kgdb: fix NUMREGBYTES so that gdb_regs[] is the correct size
Dinh Nguyen (1):
ARM: dts: socfpga: Fix NAND controller node compatible for Arria10
Dmitry Torokhov (2):
platform/chrome: cros_ec_lpc: do not try DMI match when ACPI device found
Input: psmouse - fix button reporting for basic protocols
Dongsheng Yang (1):
rbd: flush rbd_dev->watch_dwork after watch is unregistered
Enno Boland (1):
Input: xpad - fix GPD Win 2 controller name
Erez Shitrit (1):
IB/mlx5: Fetch soft WQE's on fatal error state
Eric W. Biederman (1):
signal/xtensa: Consistenly use SIGBUS in do_unaligned_user
Fabio Estevam (1):
pinctrl: devicetree: Fix pctldev pointer overwrite
Filipe Manana (1):
Btrfs: fix return value on rename exchange failure
Finley Xiao (1):
soc: rockchip: power-domain: Fix wrong value when power up pd with writemask
Finn Thain (1):
m68k/mac: Fix SWIM memory resource end address
Frank Rowand (1):
of: overlay: validate offset from property fixups
Gautham R. Shenoy (1):
cpuidle: powernv: Fix promotion from snooze if next state disabled
Geert Uytterhoeven (4):
thermal: bcm2835: Stop using printk format %pCr
clk: renesas: cpg-mssr: Stop using printk format %pCr lib/vsprintf: Remove atomic-unsafe support for %pCr
time: Make sure jiffies_to_msecs() preserves non-zero time periods
Greg Kroah-Hartman (1):
Linux 4.17.4
Guenter Roeck (1):
hwmon: (k10temp) Add support for Stoney Ridge and Bristol Ridge CPUs
Hans de Goede (4):
efi/libstub/tpm: Initialize efi_physical_addr_t vars to zero for mixed mode ACPI / LPSS: Add missing prv_offset setting for byt/cht PWM devices
Input: silead - add MSSL0002 ACPI HID
pwm: lpss: platform: Save/restore the ctrl register over a suspend/resume
Haren Myneni (1):
powerpc/powernv: copy/paste - Mask SO bit in CR
Himanshu Madhani (1):
scsi: qla2xxx: Fix setting lower transfer speed if GPSC fails
Huacai Chen (1):
MIPS: io: Add barrier after register read in inX()
Hui Wang (1):
ALSA: hda/realtek - Fix the problem of two front mics on more machines
Icenowy Zheng (1):
ARM: dts: sun8i: h3: fix ALL-H3-CC H3 ver VDD-CPUX voltage
Ingo Flaschberger (1):
1wire: family module autoload fails because of upper/lower case mismatch.
Jack Morgenstein (2):
IB/mlx4: Mark user MR as writable if actual virtual memory is writable IB/core: Make testing MR flags for writability a static inline function
Jae Hyun Yoo (1):
clk:aspeed: Fix reset bits for PCI/VGA and PECI
Jan Kara (1):
udf: Detect incorrect directory size
Jann Horn (1):
selinux: move user accesses in selinuxfs out of locked regions
Jarkko Nikula (1):
mfd: intel-lpss: Fix Intel Cannon Lake LPSS I2C input clock
Jason A. Donenfeld (1):
kasan: depend on CONFIG_SLUB_DEBUG
Jason Gunthorpe (1):
IB/uverbs: Fix ordering of ucontext check in ib_uverbs_write
Jerome Brunet (1):
ARM64: dts: meson: disable sd-uhs modes on the libretech-cc
Jia He (2):
crypto: arm64/aes-blk - fix and move skcipher_walk_done out of kernel_neon_begin, _end mm/ksm.c: ignore STABLE_FLAG of rmap_item->address in rmap_walk_ksm()
Joakim Tjernlund (4):
mtd: cfi_cmdset_0002: Use right chip in do_ppb_xxlock()
mtd: cfi_cmdset_0002: fix SEGV unlocking multiple chips
mtd: cfi_cmdset_0002: Fix unlocking requests crossing a chip boudary
mtd: cfi_cmdset_0002: Avoid walking all chips when unlocking.
Joel Fernandes (Google) (1):
softirq: Reorder trace_softirqs_on to prevent lockdep splat
Johan Hovold (3):
backlight: as3711_bl: Fix Device Tree node lookup
backlight: max8925_bl: Fix Device Tree node lookup
backlight: tps65217_bl: Fix Device Tree node lookup
Juergen Gross (1):
x86/xen: Add call of speculative_store_bypass_ht_init() to PV paths
Kai Chieh Chuang (1):
ASoC: mediatek: preallocate pages use platform device
Kai-Heng Feng (1):
media: cx231xx: Add support for AverMedia DVD EZMaker 7
Kees Cook (1):
video: uvesafb: Fix integer overflow in allocation
Keith Busch (1):
block: Fix transfer when chunk sectors exceeds max
Kevin Hilman (1):
ARM64: dts: meson-gx: fix ATF reserved memory region
Kieran Bingham (1):
media: vsp1: Release buffers for each video node
Kirill A. Shutemov (1):
x86/efi: Fix efi_call_phys_epilog() with CONFIG_X86_5LEVEL=y
Leon Romanovsky (1):
RDMA/mlx4: Discard unknown SQP work requests
Linus Torvalds (1):
Revert "iommu/amd_iommu: Use CONFIG_DMA_DIRECT_OPS=y and dma_direct_{alloc,free}()"
Linus Walleij (1):
MIPS: pb44: Fix i2c-gpio GPIO descriptor table
Luis Henriques (1):
scsi: scsi_debug: Fix memory leak on module unload
Maciej S. Szmigiero (1):
X.509: unpack RSA signatureValue field from BIT STRING
Mahesh Salgaonkar (1):
powerpc/fadump: Unregister fadump on kexec down path.
Marcin Ziemianowicz (1):
clk: at91: PLL recalc_rate() now using cached MUL and DIV values
Marek Vasut (2):
ARM: dts: socfpga: Fix NAND controller node compatible
ARM: dts: socfpga: Fix NAND controller clock supply
Martin Blumenstingl (1):
clk: meson: meson8b: mark fclk_div2 gate clocks as CLK_IS_CRITICAL
Martin Kaiser (1):
mtd: rawnand: mxc: set spare area size register explicitly
Masahiro Yamada (1):
mtd: rawnand: denali_dt: set clk_x_rate to 200 MHz unconditionally
Mason Yang (1):
mtd: rawnand: All AC chips have a broken GET_FEATURES(TIMINGS).
Matthias Schiffer (1):
mips: ftrace: fix static function graph tracing
Mauro Carvalho Chehab (2):
media: v4l2-compat-ioctl32: prevent go past max size
media: dvb_frontend: fix locking issues at dvb_frontend_get_event()
Max Gurtovoy (1):
IB/isert: fix T10-pi check mask setting
Maxim Moseychuk (1):
usb: do not reset if a low-speed or full-speed device timed out
Michael Buesch (1):
hwrng: core - Always drop the RNG in hwrng_unregister()
Michael Ellerman (1):
powerpc/64s: Fix DT CPU features Power9 DD2.1 logic
Michael J. Ruhl (1):
IB/hfi1: Reorder incorrect send context disable
Michael Jeanson (1):
powerpc/e500mc: Set assembler machine type to e500mc
Michael Neuling (2):
powerpc/ptrace: Fix setting 512B aligned breakpoints with PTRACE_SET_DEBUGREG powerpc/ptrace: Fix enforcement of DAWR constraints
Michael Schmitz (1):
m68k/mm: Adjust VM area to be unmapped by gap size for __iounmap()
Michael Trimarchi (1):
rtc: sun6i: Fix bit_idx value for clk_register_gate
Mika Westerberg (4):
mtd: spi-nor: intel-spi: Fix atomic sequence handling
PCI: Add ACS quirk for Intel 300 series
PCI: pciehp: Clear Presence Detect and Data Link Layer Status Changed on resume
PCI: Account for all bridges on bus when distributing bus numbers
Mike Marciniszyn (3):
IB/qib: Fix DMA api warning with debug kernel IB/hfi1: Fix fault injection init/exit issues IB/hfi1: Fix user context tail allocation for DMA_RTAIL
Mike Snitzer (2):
dm: use bio_split() when splitting out the already processed bio dm thin: handle running out of data space vs concurrent discard
Mikhail Malygin (1):
scsi: qla2xxx: Spinlock recursion in qla_target
Miklos Szeredi (2):
fuse: atomic_o_trunc should truncate pagecache
fuse: fix control dir setup and teardown
Mikulas Patocka (2):
branch-check: fix long->int truncation when profiling branches
slub: fix failure when we delete and create a slab cache
Miquel Raynal (1):
arm64: dts: marvell: fix CP110 ICU node size
Naoya Horiguchi (1):
x86/e820: put !E820_TYPE_RAM regions into memblock.reserved
NeilBrown (1):
md: fix two problems with setting the "re-add" device state.
Nicholas Piggin (1):
powerpc/64s/radix: Fix radix_kvm_prefetch_workaround paca access of not possible CPU
Paul Handrigan (1):
ASoC: cs35l35: Add use_single_rw to regmap config
Paweł Chmiel (1):
pinctrl: samsung: Correct EINTG banks order
Peter Ujfalusi (1):
mfd: twl-core: Fix clock initialization
Quinn Tran (1):
scsi: qla2xxx: Delete session for nport id change
Rafael J. Wysocki (3):
PCI / PM: Do not clear state_saved for devices that remain suspended ACPI / LPSS: Avoid PM quirks on suspend and resume from S3 PM / core: Fix supplier device runtime PM usage counter imbalance
Ram Pai (1):
powerpc/pkeys: Detach execute_only key on !PROT_EXEC
Randy Dunlap (1):
auxdisplay: fix broken menu
Richard Weinberger (2):
ubi: fastmap: Cancel work upon detach
ubi: fastmap: Correctly handle interrupted erasures in EBA
Robert Elliott (1):
linvdimm, pmem: Preserve read-only setting for pmem devices
Ross Zwisler (3):
libnvdimm, pmem: Do not flush power-fail protected CPU caches libnvdimm, pmem: Unconditionally deep flush on *sync
pmem: only set QUEUE_FLAG_DAX for fsdax mode
Scott Mayhew (1):
nfsd: restrict rd_maxcount to svc_max_payload in nfsd_encode_readdir
Sean Wang (1):
arm: dts: mt7623: fix invalid memory node being generated
Sean Young (1):
media: rc: mce_kbd decoder: fix stuck keys
Sebastian Sanchez (1):
IB/hfi1: Optimize kthread pointer locking when queuing CQ entries
Siarhei Liakh (1):
x86: Call fixup_exception() before notify_die() in math_error()
Sibi Sankar (1):
remoteproc: Prevent incorrect rproc state on xfer mem ownership failure
Silvio Cesare (1):
UBIFS: Fix potential integer overflow in allocation
Sinan Kaya (1):
scsi: hpsa: disable device during shutdown
Sridhar Pitchai (1):
PCI: hv: Make sure the bus domain is really unique
Srinivas Kandagatla (3):
ASoC: dapm: delete dapm_kcontrol_data paths list before freeing it
of: platform: stop accessing invalid dev in of_platform_device_destroy
rpmsg: smd: do not use mananged resources for endpoints and channels
Srinivas Pandruvada (1):
cpufreq: intel_pstate: Fix scaling max/min limits with Turbo 3.0
Stefan M Schaeckeler (1):
of: unittest: for strings, account for trailing \0 in property length field
Steffen Maier (7):
scsi: zfcp: fix missing SCSI trace for result of eh_host_reset_handler
scsi: zfcp: fix missing SCSI trace for retry of abort / scsi_eh TMF
scsi: zfcp: fix misleading REC trigger trace where erp_action setup failed
scsi: zfcp: fix missing REC trigger trace on terminate_rport_io early return
scsi: zfcp: fix missing REC trigger trace on terminate_rport_io for ERP_FAILED
scsi: zfcp: fix missing REC trigger trace for all objects in ERP_FAILED
scsi: zfcp: fix missing REC trigger trace on enqueue without ERP thread
Steven Rostedt (VMware) (2):
ftrace/selftest: Have the reset_trigger code be a bit more careful
tracing: Check for no filter when processing event filters
Tadeusz Struk (2):
tpm: fix use after free in tpm2_load_context()
tpm: fix race condition in tpm_common_write()
Takashi Iwai (4):
ALSA: timer: Fix UBSAN warning at SNDRV_TIMER_IOCTL_NEXT_DEVICE ioctl
ALSA: hda - Force to link down at runtime suspend on ATI/AMD HDMI
ALSA: hda/realtek - Fix pop noise on Lenovo P50 & co
ALSA: hda/realtek - Add a quirk for FSC ESPRIMO U9210
Tejun Heo (1):
fuse: fix congested state leak on aborted connections
Terry Zhou (1):
pinctrl: armada-37xx: Fix spurious irq management
Tetsuo Handa (2):
printk: fix possible reuse of va_list variable
fuse: don't keep dead fuse_conn at fuse_fill_super().
Thor Thayer (2):
ARM: dts: Fix SPI node for Arria10
arm64: dts: stratix10: Fix SPI nodes for Stratix10
Tokunori Ikegami (2):
mtd: cfi_cmdset_0002: Change write buffer to check correct value
MIPS: BCM47XX: Enable 74K Core ExternalSync for PCIe erratum
Tony Luck (3):
x86/mce: Improve error message when kernel cannot recover x86/mce: Check for alternate indication of machine check recovery on Skylake x86/mce: Fix incorrect "Machine check from unknown source" message
Trond Myklebust (2):
NFSv4: Revert commit 5f83d86cf531d ("NFSv4.x: Fix wraparound issues..")
NFSv4: Fix a typo in nfs41_sequence_process
Ulf Hansson (1):
PM / Domains: Fix error path during attach in genpd
Vaibhav Jain (2):
cxl: Configure PSL to not use APC virtual machines
cxl: Disable prefault_mode in Radix mode
Waiman Long (1):
locking/rwsem: Fix up_read_non_owner() warning with DEBUG_RWSEMS
Waldemar Rymarkiewicz (1):
PM / OPP: Update voltage in case freq == old_freq
Wenwen Wang (1):
virt: vbox: Only copy_from_user the request-header once
Will Deacon (2):
arm64: kpti: Use early_param for kpti= command-line option
arm64: mm: Ensure writes to swapper are ordered wrt subsequent cache maintenance
Wolfram Sang (3):
mmc: renesas_sdhi: really fix WP logic regressions Revert "i2c: algo-bit: init the bus to a known state"
i2c: gpio: initialize SCL to HIGH again
Yang Yingliang (1):
irqchip/gic-v3-its: Don't bind LPI to unavailable NUMA node
[email protected] (3):
x86/platform/UV: Add adjustable set memory block size function x86/platform/UV: Use new set memory block size function x86/platform/UV: Add kernel parameter to set memory block size
ming_qian (1):
media: uvcvideo: Support realtek's UVC 1.5 device
Greg KH
maintainerDocumentation/ABI/testing/sysfs-class-cxl +3 -1
@@ -69,7 +69,9 @@ Date: September 2014 Contact: [email protected] Description: read/write Set the mode for prefaulting in segments into the segment table - when performing the START_WORK ioctl. Possible values: + when performing the START_WORK ioctl. Only applicable when + running under hashed page table mmu. + Possible values: none: No prefaulting (default) work_element_descriptor: Treat the work element descriptor as an effective address and
Documentation/core-api/printk-formats.rst +1 -2
@@ -419,11 +419,10 @@ struct clk %pC pll1 %pCn pll1 - %pCr 1560000000 For printing struct clk structures. %pC and %pCn print the name (Common Clock Framework) or address (legacy clock framework) of the -structure; %pCr prints the current clock rate. +structure. Passed by reference.
Makefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 4 PATCHLEVEL = 17 -SUBLEVEL = 3 +SUBLEVEL = 4 EXTRAVERSION = NAME = Merciless Moray
arch/arm/boot/dts/mt7623.dtsi +2 -1
@@ -22,11 +22,12 @@ #include <dt-bindings/phy/phy.h> #include <dt-bindings/reset/mt2701-resets.h> #include <dt-bindings/thermal/thermal.h> -#include "skeleton64.dtsi" / { compatible = "mediatek,mt7623"; interrupt-parent = <&sysirq>; + #address-cells = <2>; + #size-cells = <2>; cpu_opp_table: opp-table { compatible = "operating-points-v2";
arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts +1 -0
@@ -109,6 +109,7 @@ }; memory@80000000 { + device_type = "memory"; reg = <0 0x80000000 0 0x40000000>; }; };
arch/arm/boot/dts/mt7623n-rfb.dtsi +1 -0
@@ -47,6 +47,7 @@ }; memory@80000000 { + device_type = "memory"; reg = <0 0x80000000 0 0x40000000>; };
arch/arm/boot/dts/socfpga.dtsi +2 -2
@@ -748,13 +748,13 @@ nand0: nand@ff900000 { #address-cells = <0x1>; #size-cells = <0x1>; - compatible = "denali,denali-nand-dt"; + compatible = "altr,socfpga-denali-nand"; reg = <0xff900000 0x100000>, <0xffb80000 0x10000>; reg-names = "nand_data", "denali_reg"; interrupts = <0x0 0x90 0x4>; dma-mask = <0xffffffff>; - clocks = <&nand_clk>; + clocks = <&nand_x_clk>; status = "disabled"; };
arch/arm/boot/dts/socfpga_arria10.dtsi +2 -3
@@ -593,8 +593,7 @@ #size-cells = <0>; reg = <0xffda5000 0x100>; interrupts = <0 102 4>; - num-chipselect = <4>; - bus-num = <0>; + num-cs = <4>; /*32bit_access;*/ tx-dma-channel = <&pdma 16>; rx-dma-channel = <&pdma 17>;
@@ -633,7 +632,7 @@ nand: nand@ffb90000 { #address-cells = <1>; #size-cells = <1>; - compatible = "denali,denali-nand-dt", "altr,socfpga-denali-nand"; + compatible = "altr,socfpga-denali-nand"; reg = <0xffb90000 0x72000>, <0xffb80000 0x10000>; reg-names = "nand_data", "denali_reg";
arch/arm/boot/dts/sun8i-h3-libretech-all-h3-cc.dts +4 -4
@@ -62,8 +62,8 @@ reg_vcc1v2: vcc1v2 { compatible = "regulator-fixed"; regulator-name = "vcc1v2"; - regulator-min-microvolt = <3300000>; - regulator-max-microvolt = <3300000>; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; regulator-always-on; regulator-boot-on; vin-supply = <®_vcc5v0>;
@@ -113,8 +113,8 @@ reg_vdd_cpux: vdd-cpux { compatible = "regulator-fixed"; regulator-name = "vdd-cpux"; - regulator-min-microvolt = <3300000>; - regulator-max-microvolt = <3300000>; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; regulator-always-on; regulator-boot-on; vin-supply = <®_vcc5v0>;
arch/arm/include/asm/kgdb.h +1 -1
@@ -77,7 +77,7 @@ extern int kgdb_fault_expected;#define KGDB_MAX_NO_CPUS 1#define BUFMAX 400 -#define NUMREGBYTES (DBG_MAX_REG_NUM << 2) +#define NUMREGBYTES (GDB_MAX_REGS << 2)#define NUMCRITREGBYTES (32 << 2)#define _R0 0
arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi +2 -4
@@ -252,8 +252,7 @@ interrupts = <0 99 4>; resets = <&rst SPIM0_RESET>; reg-io-width = <4>; - num-chipselect = <4>; - bus-num = <0>; + num-cs = <4>; status = "disabled"; };
@@ -265,8 +264,7 @@ interrupts = <0 100 4>; resets = <&rst SPIM1_RESET>; reg-io-width = <4>; - num-chipselect = <4>; - bus-num = <0>; + num-cs = <4>; status = "disabled"; };
arch/arm64/boot/dts/amlogic/meson-gx.dtsi +6 -0
@@ -35,6 +35,12 @@ no-map; }; + /* Alternate 3 MiB reserved for ARM Trusted Firmware (BL31) */ + secmon_reserved_alt: secmon@5000000 { + reg = <0x0 0x05000000 0x0 0x300000>; + no-map; + }; + linux,cma { compatible = "shared-dma-pool"; reusable;
arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts +0 -3
@@ -234,9 +234,6 @@ bus-width = <4>; cap-sd-highspeed; - sd-uhs-sdr12; - sd-uhs-sdr25; - sd-uhs-sdr50; max-frequency = <100000000>; disable-wp;
arch/arm64/boot/dts/amlogic/meson-gxl.dtsi +0 -8
@@ -13,14 +13,6 @@ / { compatible = "amlogic,meson-gxl"; - reserved-memory { - /* Alternate 3 MiB reserved for ARM Trusted Firmware (BL31) */ - secmon_reserved_alt: secmon@5000000 { - reg = <0x0 0x05000000 0x0 0x300000>; - no-map; - }; - }; - soc { usb0: usb@c9000000 { status = "disabled";
arch/arm64/boot/dts/marvell/armada-cp110.dtsi +1 -1
@@ -149,7 +149,7 @@ CP110_LABEL(icu): interrupt-controller@1e0000 { compatible = "marvell,cp110-icu"; - reg = <0x1e0000 0x10>; + reg = <0x1e0000 0x440>; #interrupt-cells = <3>; interrupt-controller; msi-parent = <&gicp>;
arch/arm64/crypto/aes-glue.c +1 -1
@@ -223,8 +223,8 @@ static int ctr_encrypt(struct skcipher_request *req)kernel_neon_begin ();aes_ctr_encrypt (walk.dst.virt.addr, walk.src.virt.addr, (u8 *)ctx->key_enc, rounds, blocks, walk.iv); - err =skcipher_walk_done (&walk, walk.nbytes %AES_BLOCK_SIZE );kernel_neon_end (); + err =skcipher_walk_done (&walk, walk.nbytes %AES_BLOCK_SIZE ); }if (walk.nbytes) {u8 __aligned(8) tail[AES_BLOCK_SIZE ];
arch/arm64/kernel/cpufeature.c +1 -1
@@ -937,7 +937,7 @@ static int __init parse_kpti(char *str) __kpti_forced = enabled ?1 :-1 ; return 0; } -__setup ("kpti=" , parse_kpti); +early_param ("kpti" , parse_kpti);#endif /* CONFIG_UNMAP_KERNEL_AT_EL0 */ #ifdef CONFIG_ARM64_HW_AFDBM
arch/arm64/kernel/signal.c +3 -2
@@ -830,11 +830,12 @@ static void do_signal(struct pt_regs *regs)unsigned long continue_addr =0 , restart_addr =0 ;int retval =0 ;struct ksignal ksig; +bool syscall =in_syscall (regs);/* * If we were from a system call, check for system call restarting... */ -if (in_syscall (regs)) { +if (syscall) { continue_addr = regs->pc; restart_addr = continue_addr - (compat_thumb_mode (regs) ?2 :4 ); retval = regs->regs[0 ];
@@ -886,7 +887,7 @@ static void do_signal(struct pt_regs *regs)* Handle restarting a different system call. As above, if a debugger * has chosen to restart at a different PC, ignore the restart. */ -if (in_syscall (regs) && regs->pc == restart_addr) { +if (syscall && regs->pc == restart_addr) {if (retval == -ERESTART_RESTARTBLOCK )setup_restart_syscall (regs);user_rewind_single_step (current);
arch/arm64/mm/proc.S +3 -2
@@ -217,8 +217,9 @@ ENDPROC(idmap_cpu_replace_ttbr1) .macro __idmap_kpti_put_pgtable_ent_ng, type orr \type, \type, #PTE_NG // Same bit for blocks and pages - str \type, [cur_\()\type\()p] // Update the entry and ensure it - dc civac, cur_\()\type\()p // is visible to all CPUs. + str \type, [cur_\()\type\()p] // Update the entry and ensure + dmb sy // that it is visible to all + dc civac, cur_\()\type\()p // CPUs. .endm /*
arch/m68k/mac/config.c +1 -1
@@ -1005,7 +1005,7 @@ int __init mac_platform_init(void)struct resource swim_rsrc = { .flags =IORESOURCE_MEM , .start = (resource_size_t )swim_base, - .end = (resource_size_t )swim_base +0x2000 , + .end = (resource_size_t )swim_base +0x1FFF , };platform_device_register_simple ("swim" ,-1 , &swim_rsrc,1 );
arch/m68k/mm/kmap.c +2 -1
@@ -89,7 +89,8 @@ static inline void free_io_area(void *addr)for (p = &iolist ; (tmp = *p) ; p = &tmp->next) {if (tmp->addr == addr) { *p = tmp->next; -__iounmap (tmp->addr, tmp->size); +/* remove gap added in get_io_area() */ +__iounmap (tmp->addr, tmp->size -IO_SIZE );kfree (tmp);return ; }
arch/mips/ath79/mach-pb44.c +1 -1
@@ -34,7 +34,7 @@#define PB44_KEYS_DEBOUNCE_INTERVAL (3 * PB44_KEYS_POLL_INTERVAL)static struct gpiod_lookup_table pb44_i2c_gpiod_table = { - .dev_id ="i2c-gpio" , + .dev_id ="i2c-gpio.0" , .table = {GPIO_LOOKUP_IDX ("ath79-gpio" ,PB44_GPIO_I2C_SDA ,NULL ,0 ,GPIO_ACTIVE_HIGH |GPIO_OPEN_DRAIN ),
arch/mips/bcm47xx/setup.c +6 -0
@@ -212,6 +212,12 @@ static int __init bcm47xx_cpu_fixes(void)*/ if (bcm47xx_bus.bcma.bus.chipinfo.id ==BCMA_CHIP_ID_BCM4706 ) cpu_wait =NULL ; + +/* +* BCM47XX Erratum "R10: PCIe Transactions Periodically Fail" +* Enable ExternalSync for sync instruction to take effect +*/ +set_c0_config7 (MIPS_CONF7_ES );break ;#endif }
arch/mips/include/asm/io.h +2 -0
@@ -414,6 +414,8 @@ static inline type pfx##in##bwlq##p(unsigned long port) \ __val = *__addr; \ slow; \ \ +/* prevent prefetching of coherent DMA data prematurely */ \ +rmb (); \ return pfx##ioswab##bwlq(__addr, __val); \ }
arch/mips/include/asm/mipsregs.h +3 -0
@@ -681,6 +681,8 @@#define MIPS_CONF7_WII (_ULCAST_(1) << 31)#define MIPS_CONF7_RPS (_ULCAST_(1) << 2) +/* ExternalSync */ +#define MIPS_CONF7_ES (_ULCAST_(1) << 8)#define MIPS_CONF7_IAR (_ULCAST_(1) << 10)#define MIPS_CONF7_AR (_ULCAST_(1) << 16)
@@ -2760,6 +2762,7 @@ __BUILD_SET_C0(status) __BUILD_SET_C0(cause) __BUILD_SET_C0(config) __BUILD_SET_C0(config5) +__BUILD_SET_C0(config7) __BUILD_SET_C0(intcontrol) __BUILD_SET_C0(intctl) __BUILD_SET_C0(srsmap)
arch/mips/kernel/mcount.S +12 -15
@@ -119,10 +119,20 @@ NESTED(_mcount, PT_SIZE, ra) EXPORT_SYMBOL(_mcount) PTR_LA t1, ftrace_stub PTR_L t2, ftrace_trace_function /* Prepare t2 for (1) */ - bne t1, t2, static_trace + beq t1, t2, fgraph_trace nop + MCOUNT_SAVE_REGS + + move a0, ra /* arg1: self return address */ + jalr t2 /* (1) call *ftrace_trace_function */ + move a1, AT /* arg2: parent's return address */ + + MCOUNT_RESTORE_REGS + +fgraph_trace: #ifdef CONFIG_FUNCTION_GRAPH_TRACER + PTR_LA t1, ftrace_stub PTR_L t3, ftrace_graph_return bne t1, t3, ftrace_graph_caller nop
@@ -131,24 +141,11 @@ EXPORT_SYMBOL(_mcount) bne t1, t3, ftrace_graph_caller nop #endif - b ftrace_stub -#ifdef CONFIG_32BIT - addiu sp, sp, 8 -#else - nop -#endif -static_trace: - MCOUNT_SAVE_REGS - - move a0, ra /* arg1: self return address */ - jalr t2 /* (1) call *ftrace_trace_function */ - move a1, AT /* arg2: parent's return address */ - - MCOUNT_RESTORE_REGS #ifdef CONFIG_32BIT addiu sp, sp, 8 #endif + .globl ftrace_stub ftrace_stub: RETURN_BACK
arch/powerpc/Makefile +1 -0
@@ -251,6 +251,7 @@ cpu-as-$(CONFIG_4xx) += -Wa,-m405 cpu-as-$(CONFIG_ALTIVEC) += $(call as-option,-Wa$(comma)-maltivec) cpu-as-$(CONFIG_E200) += -Wa,-me200 cpu-as-$(CONFIG_PPC_BOOK3S_64) += -Wa,-mpower4 +cpu-as-$(CONFIG_PPC_E500MC) += $(call as-option,-Wa$(comma)-me500mc) KBUILD_AFLAGS += $(cpu-as-y) KBUILD_CFLAGS += $(cpu-as-y)
arch/powerpc/kernel/dt_cpu_ftrs.c +2 -1
@@ -711,7 +711,8 @@ static __init void cpufeatures_cpu_quirks(void) cur_cpu_spec->cpu_features |=CPU_FTR_P9_TM_HV_ASSIST ; cur_cpu_spec->cpu_features |=CPU_FTR_P9_TM_XER_SO_BUG ; cur_cpu_spec->cpu_features |=CPU_FTR_POWER9_DD2_1 ; - }else /* DD2.1 and up have DD2_1 */ + }else if ((version &0xffff0000 ) ==0x004e0000 ) +/* DD2.1 and up have DD2_1 */ cur_cpu_spec->cpu_features |=CPU_FTR_POWER9_DD2_1 ;if ((version &0xffff0000 ) ==0x004e0000 ) {
arch/powerpc/kernel/entry_64.S +1 -0
@@ -596,6 +596,7 @@ END_MMU_FTR_SECTION_IFSET(MMU_FTR_1T_SEGMENT) * actually hit this code path. */ + isync slbie r6 slbie r6 /* Workaround POWER5 < DD2.1 issue */ slbmte r7,r0
arch/powerpc/kernel/fadump.c +3 -0
@@ -1155,6 +1155,9 @@ void fadump_cleanup(void)init_fadump_mem_struct (&fdm,be64_to_cpu (fdm_active->cpu_state_data.destination_address));fadump_invalidate_dump (&fdm); + }else if (fw_dump.dump_registered) { +/* Un-register Firmware-assisted dump if it was registered. */ +fadump_unregister_dump (&fdm); } }
arch/powerpc/kernel/hw_breakpoint.c +2 -2
@@ -178,8 +178,8 @@ int arch_validate_hwbkpt_settings(struct perf_event *bp)if (cpu_has_feature (CPU_FTR_DAWR )) { length_max =512 ;/* 64 doublewords */ /* DAWR region can't cross 512 boundary */ -if ((bp->attr.bp_addr >>10 ) != - ((bp->attr.bp_addr + bp->attr.bp_len -1 ) >>10 )) +if ((bp->attr.bp_addr >>9 ) != + ((bp->attr.bp_addr + bp->attr.bp_len -1 ) >>9 ))return -EINVAL ; } if (info->len >
arch/powerpc/kernel/ptrace.c +1 -0
@@ -2443,6 +2443,7 @@ static int ptrace_set_debugreg(struct task_struct *task, unsigned long addr,/* Create a new breakpoint request if one doesn't exist already */ hw_breakpoint_init (&attr); attr.bp_addr = hw_brk.address; + attr.bp_len =8 ;arch_bp_generic_fields (hw_brk.type, &attr.bp_type);
arch/powerpc/mm/pkeys.c +2 -2
@@ -383,9 +383,9 @@ int __arch_override_mprotect_pkey(struct vm_area_struct *vma, int prot, {/* * If the currently associated pkey is execute-only, but the requested -* protection requires read or write, move it back to the default pkey. +* protection is not execute-only, move it back to the default pkey. */ -if (vma_is_pkey_exec_only (vma) && (prot & (PROT_READ |PROT_WRITE ))) +if (vma_is_pkey_exec_only (vma) && (prot !=PROT_EXEC ))return 0 ;/*
arch/powerpc/mm/tlb-radix.c +2 -0
@@ -733,6 +733,8 @@ extern void radix_kvm_prefetch_workaround(struct mm_struct *mm)for (; sib <=cpu_last_thread_sibling (cpu) && !flush; sib++) {if (sib == cpu)continue ; +if (!cpu_possible (sib)) +continue ;if (paca_ptrs[sib]->kvm_hstate.kvm_vcpu) flush = true; }
arch/powerpc/perf/imc-pmu.c +2 -2
@@ -1146,7 +1146,7 @@ static int init_nest_pmu_ref(void)static void cleanup_all_core_imc_memory (void ) { -int i, nr_cores =DIV_ROUND_UP (num_present_cpus (), threads_per_core); +int i, nr_cores =DIV_ROUND_UP (num_possible_cpus (), threads_per_core);struct imc_mem_info *ptr = core_imc_pmu->mem_info;int size = core_imc_pmu->counter_mem_size;
@@ -1264,7 +1264,7 @@ static int imc_mem_init(struct imc_pmu *pmu_ptr, struct device_node *parent,if (!pmu_ptr->pmu.name)return -ENOMEM ; - nr_cores =DIV_ROUND_UP (num_present_cpus (), threads_per_core); + nr_cores =DIV_ROUND_UP (num_possible_cpus (), threads_per_core); pmu_ptr->mem_info =kcalloc (nr_cores,sizeof (struct imc_mem_info ),GFP_KERNEL );
arch/powerpc/platforms/powernv/copy-paste.h +2 -1
@@ -42,5 +42,6 @@ static inline int vas_paste(void *paste_address, int offset) : "b" (offset), "b" (paste_address) : "memory", "cr0"); -return (cr >>CR0_SHIFT ) &CR0_MASK ; +/* We mask with 0xE to ignore SO */ +return (cr >>CR0_SHIFT ) &0xE ; }
arch/powerpc/platforms/powernv/idle.c +2 -2
@@ -79,7 +79,7 @@ static int pnv_save_sprs_for_deep_states(void)uint64_t msr_val =MSR_IDLE ;uint64_t psscr_val = pnv_deepest_stop_psscr_val; -for_each_possible_cpu (cpu) { +for_each_present_cpu (cpu) {uint64_t pir =get_hard_smp_processor_id (cpu);uint64_t hsprg0_val = (uint64_t )paca_ptrs[cpu];
@@ -814,7 +814,7 @@ static int __init pnv_init_idle_states(void)int cpu;pr_info ("powernv: idle: Saving PACA pointers of all CPUs in their thread sibling PACA\n" ); -for_each_possible_cpu (cpu) { +for_each_present_cpu (cpu) {int base_cpu =cpu_first_thread_sibling (cpu);int idx =cpu_thread_in_core (cpu);int i;
arch/powerpc/platforms/powernv/pci-ioda.c +0 -1
@@ -3642,7 +3642,6 @@ static void pnv_pci_ioda2_release_pe_dma(struct pnv_ioda_pe *pe)WARN_ON (pe->table_group.group); } -pnv_pci_ioda2_table_free_pages (tbl);iommu_tce_table_put (tbl); }
arch/um/drivers/vector_kern.c +14 -6
@@ -188,7 +188,7 @@ static int get_transport_options(struct arglist *def)if (strncmp (transport,TRANS_TAP ,TRANS_TAP_LEN ) ==0 )return (vec_rx |VECTOR_BPF );if (strncmp (transport,TRANS_RAW ,TRANS_RAW_LEN ) ==0 ) -return (vec_rx | vec_tx); +return (vec_rx | vec_tx |VECTOR_QDISC_BYPASS );return (vec_rx | vec_tx); }
@@ -504,15 +504,19 @@ static struct vector_queue *create_queue( result =kmalloc (sizeof (struct vector_queue ),GFP_KERNEL );if (result ==NULL ) - goto out_fail; +return NULL ; result->max_depth = max_size; result->dev = vp->dev; result->mmsg_vector =kmalloc ( (sizeof (struct mmsghdr ) * max_size),GFP_KERNEL ); +if (result->mmsg_vector ==NULL ) + goto out_mmsg_fail; result->skbuff_vector =kmalloc ( (sizeof (void *) * max_size),GFP_KERNEL ); -if (result->mmsg_vector ==NULL || result->skbuff_vector ==NULL ) - goto out_fail; +if (result->skbuff_vector ==NULL ) + goto out_skb_fail; + +/* further failures can be handled safely by destroy_queue*/ mmsg_vector = result->mmsg_vector;for (i =0 ; i < max_size; i++) {
@@ -563,6 +567,11 @@ static struct vector_queue *create_queue( result->head =0 ; result->tail =0 ;return result; +out_skb_fail: +kfree (result->mmsg_vector); +out_mmsg_fail: +kfree (result); +return NULL ; out_fail:destroy_queue (result);return NULL ;
@@ -1232,9 +1241,8 @@ static int vector_net_open(struct net_device *dev)if ((vp->options &VECTOR_QDISC_BYPASS ) !=0 ) {if (!uml_raw_enable_qdisc_bypass (vp->fds->rx_fd)) - vp->options = vp->options |VECTOR_BPF ; + vp->options |=VECTOR_BPF ; } -if ((vp->options &VECTOR_BPF ) !=0 ) vp->bpf =uml_vector_default_bpf (vp->fds->rx_fd, dev->dev_addr);
arch/x86/entry/entry_64_compat.S +8 -8
@@ -84,13 +84,13 @@ ENTRY(entry_SYSENTER_compat) pushq %rdx /* pt_regs->dx */ pushq %rcx /* pt_regs->cx */ pushq $-ENOSYS /* pt_regs->ax */ - pushq %r8 /* pt_regs->r8 */ + pushq $0 /* pt_regs->r8 = 0 */ xorl %r8d, %r8d /* nospec r8 */ - pushq %r9 /* pt_regs->r9 */ + pushq $0 /* pt_regs->r9 = 0 */ xorl %r9d, %r9d /* nospec r9 */ - pushq %r10 /* pt_regs->r10 */ + pushq $0 /* pt_regs->r10 = 0 */ xorl %r10d, %r10d /* nospec r10 */ - pushq %r11 /* pt_regs->r11 */ + pushq $0 /* pt_regs->r11 = 0 */ xorl %r11d, %r11d /* nospec r11 */ pushq %rbx /* pt_regs->rbx */ xorl %ebx, %ebx /* nospec rbx */
@@ -374,13 +374,13 @@ ENTRY(entry_INT80_compat) pushq %rcx /* pt_regs->cx */ xorl %ecx, %ecx /* nospec cx */ pushq $-ENOSYS /* pt_regs->ax */ - pushq $0 /* pt_regs->r8 = 0 */ + pushq %r8 /* pt_regs->r8 */ xorl %r8d, %r8d /* nospec r8 */ - pushq $0 /* pt_regs->r9 = 0 */ + pushq %r9 /* pt_regs->r9 */ xorl %r9d, %r9d /* nospec r9 */ - pushq $0 /* pt_regs->r10 = 0 */ + pushq %r10 /* pt_regs->r10*/ xorl %r10d, %r10d /* nospec r10 */ - pushq $0 /* pt_regs->r11 = 0 */ + pushq %r11 /* pt_regs->r11 */ xorl %r11d, %r11d /* nospec r11 */ pushq %rbx /* pt_regs->rbx */ xorl %ebx, %ebx /* nospec rbx */
arch/x86/include/asm/barrier.h +1 -1
@@ -38,7 +38,7 @@ static inline unsigned long array_index_mask_nospec(unsigned long index, {unsigned long mask; - asm ("cmp %1,%2; sbb %0,%0;" + asmvolatile ("cmp %1,%2; sbb %0,%0;" :"=r" (mask) :"g" (size),"r" (index) :"cc" );
arch/x86/kernel/apic/x2apic_uv_x.c +57 -3
98 lines not on this page · raw message
arch/x86/kernel/cpu/mcheck/mce-severity.c +5 -0
@@ -160,6 +160,11 @@ static struct severity { SER, MASK(MCI_STATUS_OVER|MCI_UC_SAR|MCI_ADDR|MCACOD, MCI_UC_SAR|MCI_ADDR|MCACOD_INSTR), USER ), + MCESEV( + PANIC, "Data load in unrecoverable area of kernel", + SER, MASK(MCI_STATUS_OVER|MCI_UC_SAR|MCI_ADDR|MCACOD, MCI_UC_SAR|MCI_ADDR|MCACOD_DATA), + KERNEL + ),#endif MCESEV( PANIC, "Action required: unknown MCACOD",
arch/x86/kernel/cpu/mcheck/mce.c +28 -16
76 lines not on this page · raw message
arch/x86/kernel/e820.c +12 -3
@@ -1246,6 +1246,7 @@ void __init e820__memblock_setup(void) {int i;u64 end; +u64 addr =0 ;/* * The bootstrap memblock region count maximum is 128 entries
@@ -1262,13 +1263,21 @@ void __init e820__memblock_setup(void)struct e820_entry *entry = &e820_table->entries[i]; end = entry->addr + entry->size; +if (addr < entry->addr) +memblock_reserve (addr, entry->addr - addr); + addr = end;if (end != (resource_size_t )end)continue ; +/* +* all !E820_TYPE_RAM ranges (including gap ranges) are put +* into memblock.reserved to make sure that struct pages in +* such regions are not left uninitialized after bootup. +*/ if (entry->type !=E820_TYPE_RAM && entry->type !=E820_TYPE_RESERVED_KERN ) -continue ; - -memblock_add (entry->addr, entry->size); +memblock_reserve (entry->addr, entry->size); +else +memblock_add (entry->addr, entry->size); }/* Throw away partial pages: */
arch/x86/kernel/quirks.c +9 -2
@@ -645,12 +645,19 @@ static void quirk_intel_brickland_xeon_ras_cap(struct pci_dev *pdev)/* Skylake */ static void quirk_intel_purley_xeon_ras_cap (struct pci_dev *pdev) { -u32 capid0; +u32 capid0, capid5;pci_read_config_dword (pdev,0x84 , &capid0); +pci_read_config_dword (pdev,0x98 , &capid5); -if ((capid0 &0xc0 ) ==0xc0 ) +/* +* CAPID0{7:6} indicate whether this is an advanced RAS SKU +* CAPID5{8:5} indicate that various NVDIMM usage modes are +* enabled, so memory machine check recovery is also enabled. +*/ +if ((capid0 &0xc0 ) ==0xc0 || (capid5 &0x1e0 ))static_branch_inc (&mcsafe_key); + }DECLARE_PCI_FIXUP_EARLY (PCI_VENDOR_ID_INTEL ,0x0ec3 , quirk_intel_brickland_xeon_ras_cap);DECLARE_PCI_FIXUP_EARLY (PCI_VENDOR_ID_INTEL ,0x2fc0 , quirk_intel_brickland_xeon_ras_cap);
arch/x86/kernel/traps.c +8 -6
@@ -834,16 +834,18 @@ static void math_error(struct pt_regs *regs, int error_code, int trapnr)char *str = (trapnr ==X86_TRAP_MF ) ?"fpu exception" :"simd exception" ; -if (notify_die (DIE_TRAP , str, regs, error_code, trapnr,SIGFPE ) ==NOTIFY_STOP ) -return ;cond_local_irq_enable (regs);if (!user_mode (regs)) { -if (!fixup_exception (regs, trapnr)) { - task->thread.error_code = error_code; - task->thread.trap_nr = trapnr; +if (fixup_exception (regs, trapnr)) +return ; + + task->thread.error_code = error_code; + task->thread.trap_nr = trapnr; + +if (notify_die (DIE_TRAP , str, regs, error_code, + trapnr,SIGFPE ) !=NOTIFY_STOP )die (str, regs, error_code); - }return ; }
arch/x86/mm/init.c +3 -1
@@ -706,7 +706,9 @@ void __init init_mem_mapping(void)*/ int devmem_is_allowed (unsigned long pagenr) { -if (page_is_ram (pagenr)) { +if (region_intersects (PFN_PHYS (pagenr),PAGE_SIZE , +IORESOURCE_SYSTEM_RAM ,IORES_DESC_NONE ) + !=REGION_DISJOINT ) {/* * For disallowed memory regions in the low 1MB range, * request that the page be shown as all zeros.
arch/x86/mm/init_64.c +16 -4
@@ -1350,16 +1350,28 @@ int kern_addr_valid(unsigned long addr)/* Amount of ram needed to start using large blocks */ #define MEM_SIZE_FOR_LARGE_BLOCK (64UL << 30) +/* Adjustable memory block size */ +static unsigned long set_memory_block_size; +int __init set_memory_block_size_order (unsigned int order) +{ +unsigned long size =1UL << order; + +if (size >MEM_SIZE_FOR_LARGE_BLOCK || size <MIN_MEMORY_BLOCK_SIZE ) +return -EINVAL ; + + set_memory_block_size = size; +return 0 ; +} +static unsigned long probe_memory_block_size (void ) {unsigned long boot_mem_end = max_pfn <<PAGE_SHIFT ;unsigned long bz; -/* If this is UV system, always set 2G block size */ -if (is_uv_system ()) { - bz =MAX_BLOCK_SIZE ; +/* If memory block size has been set, then use it */ + bz = set_memory_block_size; +if (bz) goto done; - }/* Use regular block if RAM is smaller than MEM_SIZE_FOR_LARGE_BLOCK */ if (boot_mem_end <MEM_SIZE_FOR_LARGE_BLOCK ) {
arch/x86/platform/efi/efi_64.c +2 -2
@@ -166,14 +166,14 @@ void __init efi_call_phys_epilog(pgd_t *save_pgd) pgd =pgd_offset_k (pgd_idx *PGDIR_SIZE );set_pgd (pgd_offset_k (pgd_idx *PGDIR_SIZE ), save_pgd[pgd_idx]); -if (!(pgd_val (*pgd) & _PAGE_PRESENT)) +if (!pgd_present (*pgd))continue ;for (i =0 ; i <PTRS_PER_P4D ; i++) { p4d =p4d_offset (pgd, pgd_idx *PGDIR_SIZE + i *P4D_SIZE ); -if (!(p4d_val (*p4d) & _PAGE_PRESENT)) +if (!p4d_present (*p4d))continue ; pud = (pud_t *)p4d_page_vaddr (*p4d);
arch/x86/xen/smp_pv.c +5 -0
@@ -32,6 +32,7 @@#include <xen/interface/vcpu.h> #include <xen/interface/xenpmu.h> +#include <asm/spec-ctrl.h> #include <asm/xen/interface.h> #include <asm/xen/hypercall.h>
@@ -70,6 +71,8 @@ static void cpu_bringup(void)cpu_data (cpu).x86_max_cores =1 ;set_cpu_sibling_map (cpu); +speculative_store_bypass_ht_init (); +xen_setup_cpu_clockevents ();notify_cpu_starting (cpu);
@@ -250,6 +253,8 @@ static void __init xen_pv_smp_prepare_cpus(unsigned int max_cpus) }set_cpu_sibling_map (0 ); +speculative_store_bypass_ht_init (); +xen_pmu_init (0 );if (xen_smp_intr_init (0 ) ||xen_smp_intr_init_pv (0 ))
arch/xtensa/kernel/traps.c +1 -1
@@ -338,7 +338,7 @@ do_unaligned_user (struct pt_regs *regs) info.si_errno =0 ; info.si_code =BUS_ADRALN ; info.si_addr = (void *) regs->excvaddr; - force_sig_info(SIGSEGV, &info, current); + force_sig_info(SIGBUS, &info, current); }#endif
block/blk-core.c +4 -0
@@ -3487,6 +3487,10 @@ static void __blk_rq_prep_clone(struct request *dst, struct request *src) dst->cpu = src->cpu; dst->__sector =blk_rq_pos (src); dst->__data_len =blk_rq_bytes (src); +if (src->rq_flags &RQF_SPECIAL_PAYLOAD ) { + dst->rq_flags |=RQF_SPECIAL_PAYLOAD ; + dst->special_vec = src->special_vec; + } dst->nr_phys_segments = src->nr_phys_segments; dst->ioprio = src->ioprio; dst->extra_len = src->extra_len;
crypto/asymmetric_keys/x509_cert_parser.c +9 -0
@@ -249,6 +249,15 @@ int x509_note_signature(void *context, size_t hdrlen,return -EINVAL ; } +if (strcmp (ctx->cert->sig->pkey_algo,"rsa" ) ==0 ) { +/* Discard the BIT STRING metadata */ +if (vlen <1 || *(const u8 *)value !=0 ) +return -EBADMSG ; + + value++; + vlen--; + } + ctx->cert->raw_sig = value; ctx->cert->raw_sig_size = vlen;return 0 ;
drivers/acpi/acpi_lpss.c +13 -7
@@ -22,6 +22,7 @@#include <linux/pm_domain.h> #include <linux/pm_runtime.h> #include <linux/pwm.h> +#include <linux/suspend.h> #include <linux/delay.h> #include "internal.h"
@@ -229,11 +230,13 @@ static const struct lpss_device_desc lpt_sdio_dev_desc = {static const struct lpss_device_desc byt_pwm_dev_desc = { .flags =LPSS_SAVE_CTX , + .prv_offset =0x800 , .setup = byt_pwm_setup, };static const struct lpss_device_desc bsw_pwm_dev_desc = { .flags =LPSS_SAVE_CTX |LPSS_NO_D3_DELAY , + .prv_offset =0x800 , .setup = bsw_pwm_setup, };
@@ -940,9 +943,10 @@ static void lpss_iosf_exit_d3_state(void)mutex_unlock (&lpss_iosf_mutex); } -static int acpi_lpss_suspend (struct device *dev,bool wakeup) +static int acpi_lpss_suspend (struct device *dev,bool runtime) {struct lpss_private_data *pdata =acpi_driver_data (ACPI_COMPANION (dev)); +bool wakeup = runtime ||device_may_wakeup (dev);int ret;if (pdata->dev_desc->flags &LPSS_SAVE_CTX )
@@ -955,13 +959,14 @@ static int acpi_lpss_suspend(struct device *dev, bool wakeup)* wrong status for devices being about to be powered off. See * lpss_iosf_enter_d3_state() for further information. */ -if (lpss_quirks &LPSS_QUIRK_ALWAYS_POWER_ON &&iosf_mbi_available ()) +if ((runtime || !pm_suspend_via_firmware ()) && + lpss_quirks &LPSS_QUIRK_ALWAYS_POWER_ON &&iosf_mbi_available ())lpss_iosf_enter_d3_state ();return ret; } -static int acpi_lpss_resume (struct device *dev) +static int acpi_lpss_resume (struct device *dev,bool runtime) {struct lpss_private_data *pdata =acpi_driver_data (ACPI_COMPANION (dev));int ret;
@@ -970,7 +975,8 @@ static int acpi_lpss_resume(struct device *dev)* This call is kept first to be in symmetry with * acpi_lpss_runtime_suspend() one. */ -if (lpss_quirks &LPSS_QUIRK_ALWAYS_POWER_ON &&iosf_mbi_available ()) +if ((runtime || !pm_resume_via_firmware ()) && + lpss_quirks &LPSS_QUIRK_ALWAYS_POWER_ON &&iosf_mbi_available ())lpss_iosf_exit_d3_state (); ret =acpi_dev_resume (dev);
@@ -994,12 +1000,12 @@ static int acpi_lpss_suspend_late(struct device *dev)return 0 ; ret =pm_generic_suspend_late (dev); -return ret ? ret :acpi_lpss_suspend (dev,device_may_wakeup (dev)); +return ret ? ret :acpi_lpss_suspend (dev, false); }static int acpi_lpss_resume_early (struct device *dev) { -int ret =acpi_lpss_resume (dev); +int ret =acpi_lpss_resume (dev, false);return ret ? ret :pm_generic_resume_early (dev); }
@@ -1014,7 +1020,7 @@ static int acpi_lpss_runtime_suspend(struct device *dev)static int acpi_lpss_runtime_resume (struct device *dev) { -int ret =acpi_lpss_resume (dev); +int ret =acpi_lpss_resume (dev, true);return ret ? ret :pm_generic_runtime_resume (dev); }
drivers/auxdisplay/Kconfig +5 -5
@@ -14,9 +14,6 @@ menuconfig AUXDISPLAY If you say N, all options in this submenu will be skipped and disabled. -config CHARLCD - tristate "Character LCD core support" if COMPILE_TEST - if AUXDISPLAY config HD44780
@@ -157,8 +154,6 @@ config HT16K33 Say yes here to add support for Holtek HT16K33, RAM mapping 16*8 LED controller driver with keyscan. -endif # AUXDISPLAY - config ARM_CHARLCD bool "ARM Ltd. Character LCD Driver" depends on PLAT_VERSATILE
@@ -169,6 +164,8 @@ config ARM_CHARLCD line and the Linux version on the second line, but that's still useful. +endif # AUXDISPLAY + config PANEL tristate "Parallel port LCD/Keypad Panel support" depends on PARPORT
@@ -448,3 +445,6 @@ config PANEL_BOOT_MESSAGE printf()-formatted message is valid with newline and escape codes. endif # PANEL + +config CHARLCD + tristate "Character LCD core support" if COMPILE_TEST
drivers/base/core.c +11 -4
@@ -216,6 +216,13 @@ struct device_link *device_link_add(struct device *consumer, link->rpm_active = true; }pm_runtime_new_link (consumer); +/* +* If the link is being added by the consumer driver at probe +* time, balance the decrementation of the supplier's runtime PM +* usage counter after consumer probe in driver_probe_device(). +*/ +if (consumer->links.status ==DL_DEV_PROBING ) +pm_runtime_get_noresume (supplier); }get_device (supplier); link->supplier = supplier;
@@ -235,12 +242,12 @@ struct device_link *device_link_add(struct device *consumer,switch (consumer->links.status) {case DL_DEV_PROBING :/* -* Balance the decrementation of the supplier's -* runtime PM usage counter after consumer probe -* in driver_probe_device(). +* Some callers expect the link creation during +* consumer driver probe to resume the supplier +* even without DL_FLAG_RPM_ACTIVE. */ if (flags &DL_FLAG_PM_RUNTIME ) -pm_runtime_get_sync (supplier); +pm_runtime_resume (supplier); link->status =DL_STATE_CONSUMER_PROBE ;break ;
drivers/base/power/domain.c +3 -0
@@ -2246,6 +2246,9 @@ int genpd_dev_pm_attach(struct device *dev)genpd_lock (pd); ret =genpd_power_on (pd,0 );genpd_unlock (pd); + +if (ret) +genpd_remove_device (pd, dev); out:return ret ? -EPROBE_DEFER :0 ; }
drivers/block/rbd.c +1 -1
@@ -3397,7 +3397,6 @@ static void cancel_tasks_sync(struct rbd_device *rbd_dev) {dout ("%s rbd_dev %p\n" , __func__, rbd_dev); -cancel_delayed_work_sync (&rbd_dev->watch_dwork);cancel_work_sync (&rbd_dev->acquired_lock_work);cancel_work_sync (&rbd_dev->released_lock_work);cancel_delayed_work_sync (&rbd_dev->lock_dwork);
@@ -3415,6 +3414,7 @@ static void rbd_unregister_watch(struct rbd_device *rbd_dev) rbd_dev->watch_state =RBD_WATCH_STATE_UNREGISTERED ;mutex_unlock (&rbd_dev->watch_mutex); +cancel_delayed_work_sync (&rbd_dev->watch_dwork);ceph_osdc_flush_notifies (&rbd_dev->rbd_client->client->osdc); }
drivers/bluetooth/hci_qca.c +6 -0
@@ -935,6 +935,12 @@ static int qca_setup(struct hci_uart *hu) }else if (ret == -ENOENT ) {/* No patch/nvm-config found, run with original fw/config */ ret =0 ; + }else if (ret == -EAGAIN ) { +/* +* Userspace firmware loader will return -EAGAIN in case no +* patch/nvm-config is found, so run with original fw/config. +*/ + ret =0 ; }/* Setup bdaddr */
drivers/char/hw_random/core.c +9 -2
@@ -516,11 +516,18 @@ EXPORT_SYMBOL_GPL(hwrng_register);void hwrng_unregister (struct hwrng *rng) { +int err; +mutex_lock (&rng_mutex);list_del (&rng->list); -if (current_rng == rng) -enable_best_rng (); +if (current_rng == rng) { + err =enable_best_rng (); +if (err) { +drop_current_rng (); + cur_rng_set_by_user =0 ; + } + }if (list_empty (&rng_list)) {mutex_unlock (&rng_mutex);
drivers/char/ipmi/ipmi_bt_sm.c +2 -1
@@ -504,11 +504,12 @@ static enum si_sm_result bt_event(struct si_sm_data *bt, long time)if (status &BT_H_BUSY )/* clear a leftover H_BUSY */ BT_CONTROL (BT_H_BUSY ); + bt->timeout = bt->BT_CAP_req2rsp; +/* Read BT capabilities if it hasn't been done yet */ if (!bt->BT_CAP_outreqs)BT_STATE_CHANGE (BT_STATE_CAPABILITIES_BEGIN ,SI_SM_CALL_WITHOUT_DELAY ); - bt->timeout = bt->BT_CAP_req2rsp;BT_SI_SM_RETURN (SI_SM_IDLE );case BT_STATE_XACTION_START :
drivers/char/tpm/tpm-dev-common.c +18 -22
@@ -37,7 +37,7 @@ static void timeout_work(struct work_struct *work) struct file_priv *priv = container_of(work, struct file_priv, work);mutex_lock (&priv->buffer_mutex); -atomic_set (&priv->data_pending,0 ); + priv->data_pending =0 ;memset (priv->data_buffer,0 ,sizeof (priv->data_buffer));mutex_unlock (&priv->buffer_mutex); }
@@ -46,7 +46,6 @@ void tpm_common_open(struct file *file, struct tpm_chip *chip, struct file_priv *priv) { priv->chip = chip; -atomic_set (&priv->data_pending,0 );mutex_init (&priv->buffer_mutex);timer_setup (&priv->user_read_timer, user_reader_timeout,0 );INIT_WORK (&priv->work, timeout_work);
@@ -58,29 +57,24 @@ ssize_t tpm_common_read(struct file *file, char __user *buf, size_t size, loff_t *off) { struct file_priv *priv = file->private_data; -ssize_t ret_size; -ssize_t orig_ret_size; +ssize_t ret_size =0 ;int rc;del_singleshot_timer_sync (&priv->user_read_timer);flush_work (&priv->work); - ret_size =atomic_read (&priv->data_pending); -if (ret_size >0 ) {/* relay data */ - orig_ret_size = ret_size; -if (size < ret_size) - ret_size = size; +mutex_lock (&priv->buffer_mutex); -mutex_lock (&priv->buffer_mutex); +if (priv->data_pending) { + ret_size =min_t (ssize_t, size, priv->data_pending); rc =copy_to_user (buf, priv->data_buffer, ret_size); -memset (priv->data_buffer,0 , orig_ret_size); +memset (priv->data_buffer,0 , priv->data_pending);if (rc) ret_size = -EFAULT ; -mutex_unlock (&priv->buffer_mutex); + priv->data_pending =0 ; } -atomic_set (&priv->data_pending,0 ); - +mutex_unlock (&priv->buffer_mutex);return ret_size; }
@@ -91,17 +85,19 @@ ssize_t tpm_common_write(struct file *file, const char __user *buf,size_t in_size = size;ssize_t out_size; +if (in_size >TPM_BUFSIZE ) +return -E2BIG ; + +mutex_lock (&priv->buffer_mutex); +/* Cannot perform a write until the read has cleared either via * tpm_read or a user_read_timer timeout. This also prevents split * buffered writes from blocking here. */ -if (atomic_read (&priv->data_pending) !=0 ) +if (priv->data_pending !=0 ) { +mutex_unlock (&priv->buffer_mutex);return -EBUSY ; - -if (in_size >TPM_BUFSIZE ) -return -E2BIG ; - -mutex_lock (&priv->buffer_mutex); + }if (copy_from_user (priv->data_buffer, (void __user *) buf, in_size)) {
@@ -132,7 +128,7 @@ ssize_t tpm_common_write(struct file *file, const char __user *buf,return out_size; } -atomic_set (&priv->data_pending, out_size); + priv->data_pending = out_size;mutex_unlock (&priv->buffer_mutex);/* Set a timeout by which the reader must come claim the result */
@@ -149,5 +145,5 @@ void tpm_common_release(struct file *file, struct file_priv *priv)del_singleshot_timer_sync (&priv->user_read_timer);flush_work (&priv->work); file->private_data =NULL ; -atomic_set (&priv->data_pending,0 ); + priv->data_pending =0 ; }
drivers/char/tpm/tpm-dev.h +1 -1
@@ -8,7 +8,7 @@ struct file_priv {struct tpm_chip *chip;/* Data passed to and from the tpm via the read/write calls */ -atomic_t data_pending; +size_t data_pending;struct mutex buffer_mutex;struct timer_list user_read_timer;/* user needs to claim result */
drivers/char/tpm/tpm2-space.c +2 -1
@@ -102,8 +102,9 @@ static int tpm2_load_context(struct tpm_chip *chip, u8 *buf,* TPM_RC_REFERENCE_H0 means the session has been * flushed outside the space */ - rc = -ENOENT ; + *handle =0 ;tpm_buf_destroy (&tbuf); +return -ENOENT ; }else if (rc >0 ) {dev_warn (&chip->dev,"%s: failed with a TPM error 0x%04X\n" , __func__, rc);
drivers/clk/at91/clk-pll.c +1 -12
@@ -132,19 +132,8 @@ static unsigned long clk_pll_recalc_rate(struct clk_hw *hw, unsigned long parent_rate) {struct clk_pll *pll =to_clk_pll (hw); -unsigned int pllr; -u16 mul; -u8 div; - -regmap_read (pll->regmap,PLL_REG (pll->id), &pllr); - - div =PLL_DIV (pllr); - mul =PLL_MUL (pllr, pll->layout); - -if (!div || !mul) -return 0 ; -return (parent_rate / div) * (mul +1 ); +return (parent_rate / pll->div) * (pll->mul +1 ); } static long clk_pll_get_best_div_mul(struct clk_pll *pll, unsigned long rate,
drivers/clk/clk-aspeed.c +2 -2
@@ -88,7 +88,7 @@ static const struct aspeed_gate_data aspeed_gates[] = { [ASPEED_CLK_GATE_GCLK] = { 1, 7, "gclk-gate", NULL, 0 }, /* 2D engine */ [ASPEED_CLK_GATE_MCLK] = { 2, -1, "mclk-gate", "mpll", CLK_IS_CRITICAL }, /* SDRAM */ [ASPEED_CLK_GATE_VCLK] = { 3, 6, "vclk-gate", NULL, 0 }, /* Video Capture */ - [ASPEED_CLK_GATE_BCLK] = { 4, 10, "bclk-gate", "bclk", 0 }, /* PCIe/PCI */ + [ASPEED_CLK_GATE_BCLK] = { 4, 8, "bclk-gate", "bclk", 0 }, /* PCIe/PCI */ [ASPEED_CLK_GATE_DCLK] = { 5, -1, "dclk-gate", NULL, 0 }, /* DAC */ [ASPEED_CLK_GATE_REFCLK] = { 6, -1, "refclk-gate", "clkin", CLK_IS_CRITICAL }, [ASPEED_CLK_GATE_USBPORT2CLK] = { 7, 3, "usb-port2-gate", NULL, 0 }, /* USB2.0 Host port 2 */
@@ -297,7 +297,7 @@ static const u8 aspeed_resets[] = { [ASPEED_RESET_JTAG_MASTER] = 22, [ASPEED_RESET_MIC] = 18, [ASPEED_RESET_PWM] = 9, - [ASPEED_RESET_PCIVGA] = 8, + [ASPEED_RESET_PECI] = 10, [ASPEED_RESET_I2C] = 2, [ASPEED_RESET_AHB] = 1, };
drivers/clk/meson/meson8b.c +7 -0
@@ -246,6 +246,13 @@ static struct clk_regmap meson8b_fclk_div2 = { .ops = &clk_regmap_gate_ops, .parent_names = (const char *[]){ "fclk_div2_div" }, .num_parents = 1, +/* +* FIXME: Ethernet with a RGMII PHYs is not working if +* fclk_div2 is disabled. it is currently unclear why this +* is. keep it enabled until the Ethernet driver knows how +* to manage this clock. +*/ + .flags = CLK_IS_CRITICAL, }, };
drivers/clk/renesas/renesas-cpg-mssr.c +5 -4
@@ -258,8 +258,9 @@ struct clk *cpg_mssr_clk_src_twocell_get(struct of_phandle_args *clkspec,dev_err (dev,"Cannot get %s clock %u: %ld" , type, clkidx,PTR_ERR (clk)); else - dev_dbg(dev, "clock (%u, %u) is %pC at %pCr Hz\n", - clkspec->args[0], clkspec->args[1], clk, clk); + dev_dbg(dev, "clock (%u, %u) is %pC at %lu Hz\n", + clkspec->args[0 ], clkspec->args[1 ], clk, + clk_get_rate(clk));return clk; }
@@ -326,7 +327,7 @@ static void __init cpg_mssr_register_core_clk(const struct cpg_core_clk *core,if (IS_ERR_OR_NULL (clk)) goto fail; -dev_dbg (dev,"Core clock %pC at %pCr Hz\n" , clk, clk); +dev_dbg (dev,"Core clock %pC at %lu Hz\n" , clk,clk_get_rate (clk)); priv->clks[id] = clk;return ;
@@ -392,7 +393,7 @@ static void __init cpg_mssr_register_mod_clk(const struct mssr_mod_clk *mod,if (IS_ERR (clk)) goto fail; -dev_dbg (dev,"Module clock %pC at %pCr Hz\n" , clk, clk); +dev_dbg (dev,"Module clock %pC at %lu Hz\n" , clk,clk_get_rate (clk)); priv->clks[id] = clk; priv->smstpcr_saved[clock->index /32 ].mask |=BIT (clock->index %32 );return ;
drivers/cpufreq/intel_pstate.c +22 -5
@@ -284,6 +284,7 @@ struct pstate_funcs {static struct pstate_funcs pstate_funcs__read_mostly ;static int hwp_active__read_mostly ; +static int hwp_mode_bdw__read_mostly ;static bool per_cpu_limits__read_mostly ;static struct cpufreq_driver *intel_pstate_driver__read_mostly ;
@@ -1370,7 +1371,15 @@ static void intel_pstate_get_cpu_pstates(struct cpudata *cpu) cpu->pstate.turbo_pstate = pstate_funcs.get_turbo (); cpu->pstate.scaling = pstate_funcs.get_scaling (); cpu->pstate.max_freq = cpu->pstate.max_pstate * cpu->pstate.scaling; - cpu->pstate.turbo_freq = cpu->pstate.turbo_pstate * cpu->pstate.scaling; + +if (hwp_active && !hwp_mode_bdw) { +unsigned int phy_max, current_max; + +intel_pstate_get_hwp_max (cpu->cpu, &phy_max, ¤t_max); + cpu->pstate.turbo_freq = phy_max * cpu->pstate.scaling; + }else { + cpu->pstate.turbo_freq = cpu->pstate.turbo_pstate * cpu->pstate.scaling; + }if (pstate_funcs.get_aperf_mperf_shift) cpu->aperf_mperf_shift = pstate_funcs.get_aperf_mperf_shift ();
@@ -2252,28 +2261,36 @@ static inline bool intel_pstate_has_acpi_ppc(void) { return false; }static inline void intel_pstate_request_control_from_smm (void ) {}#endif /* CONFIG_ACPI */ +#define INTEL_PSTATE_HWP_BROADWELL 0x01 + +#define ICPU_HWP (model, hwp_mode) \ + { X86_VENDOR_INTEL, 6, model, X86_FEATURE_HWP, hwp_mode } +static const struct x86_cpu_id hwp_support_ids[]__initconst = { - {X86_VENDOR_INTEL ,6 ,X86_MODEL_ANY ,X86_FEATURE_HWP }, +ICPU_HWP (INTEL_FAM6_BROADWELL_X ,INTEL_PSTATE_HWP_BROADWELL ), +ICPU_HWP (INTEL_FAM6_BROADWELL_XEON_D ,INTEL_PSTATE_HWP_BROADWELL ), +ICPU_HWP (X86_MODEL_ANY ,0 ), {} };static int __init intel_pstate_init (void ) { +const struct x86_cpu_id *id;int rc;if (no_load)return -ENODEV ; -if (x86_match_cpu (hwp_support_ids)) { + id =x86_match_cpu (hwp_support_ids); +if (id) {copy_cpu_funcs (&core_funcs);if (!no_hwp) { hwp_active++; + hwp_mode_bdw = id->driver_data; intel_pstate.attr = hwp_cpufreq_attrs; goto hwp_cpu_matched; } }else { -const struct x86_cpu_id *id; - id =x86_match_cpu (intel_pstate_cpu_ids);if (!id)return -ENODEV ;
drivers/cpuidle/cpuidle-powernv.c +26 -6
@@ -43,9 +43,31 @@ struct stop_psscr_table {static struct stop_psscr_table stop_psscr_table[CPUIDLE_STATE_MAX ]__read_mostly ; -static u64 snooze_timeout__read_mostly ; +static u64 default_snooze_timeout__read_mostly ;static bool snooze_timeout_en__read_mostly ; +static u64 get_snooze_timeout (struct cpuidle_device *dev, +struct cpuidle_driver *drv, +int index) +{ +int i; + +if (unlikely (!snooze_timeout_en)) +return default_snooze_timeout; + +for (i = index +1 ; i < drv->state_count; i++) { +struct cpuidle_state *s = &drv->states[i]; +struct cpuidle_state_usage *su = &dev->states_usage[i]; + +if (s->disabled || su->disable) +continue ; + +return s->target_residency * tb_ticks_per_usec; + } + +return default_snooze_timeout; +} +static int snooze_loop (struct cpuidle_device *dev,struct cpuidle_driver *drv,int index)
@@ -56,7 +78,7 @@ static int snooze_loop(struct cpuidle_device *dev,local_irq_enable (); - snooze_exit_time =get_tb () + snooze_timeout; + snooze_exit_time =get_tb () +get_snooze_timeout (dev, drv, index);ppc64_runlatch_off ();HMT_very_low ();while (!need_resched ()) {
@@ -465,11 +487,9 @@ static int powernv_idle_probe(void) cpuidle_state_table = powernv_states;/* Device tree can indicate more idle states */ max_idle_state =powernv_add_idle_states (); -if (max_idle_state >1 ) { + default_snooze_timeout =TICK_USEC * tb_ticks_per_usec; +if (max_idle_state >1 ) snooze_timeout_en = true; - snooze_timeout = powernv_states[1 ].target_residency * - tb_ticks_per_usec; - } }else return -ENODEV ;
drivers/firmware/efi/libstub/tpm.c +1 -1
@@ -64,7 +64,7 @@ void efi_retrieve_tpm2_eventlog_1_2(efi_system_table_t *sys_table_arg)efi_guid_t tcg2_guid =EFI_TCG2_PROTOCOL_GUID ;efi_guid_t linux_eventlog_guid =LINUX_EFI_TPM_EVENT_LOG_GUID ;efi_status_t status; -efi_physical_addr_t log_location, log_last_entry; +efi_physical_addr_t log_location =0 , log_last_entry =0 ;struct linux_efi_tpm_eventlog *log_tbl =NULL ;unsigned long first_entry_addr, last_entry_addr;size_t log_size, last_entry_size;
drivers/hwmon/k10temp.c +5 -0
@@ -37,6 +37,10 @@ MODULE_PARM_DESC(force, "force loading on processors with erratum 319");/* Provide lock for writing to NB_SMU_IND_ADDR */ static DEFINE_MUTEX (nb_smu_ind_mutex); +#ifndef PCI_DEVICE_ID_AMD_15H_M70H_NB_F3 +#define PCI_DEVICE_ID_AMD_15H_M70H_NB_F3 0x15b3 +#endif +#ifndef PCI_DEVICE_ID_AMD_17H_DF_F3 #define PCI_DEVICE_ID_AMD_17H_DF_F3 0x1463#endif
@@ -320,6 +324,7 @@ static const struct pci_device_id k10temp_id_table[] = { { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_15H_M10H_F3) }, { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_15H_M30H_NB_F3) }, { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_15H_M60H_NB_F3) }, + { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_15H_M70H_NB_F3) }, { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_16H_NB_F3) }, { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_16H_M30H_NB_F3) }, { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_17H_DF_F3) },
drivers/i2c/algos/i2c-algo-bit.c +0 -5
@@ -649,11 +649,6 @@ static int __i2c_bit_add_bus(struct i2c_adapter *adap,if (bit_adap->getscl ==NULL ) adap->quirks = &i2c_bit_quirk_no_clk_stretch; -/* Bring bus to a known state. Looks like STOP if bus is not free yet */ -setscl (bit_adap,1 ); -udelay (bit_adap->udelay); -setsda (bit_adap,1 ); - ret =add_adapter (adap);if (ret <0 )return ret;
drivers/i2c/busses/i2c-gpio.c +2 -2
@@ -279,9 +279,9 @@ static int i2c_gpio_probe(struct platform_device *pdev)* required for an I2C bus. */ if (pdata->scl_is_open_drain) - gflags =GPIOD_OUT_LOW ; + gflags =GPIOD_OUT_HIGH ;else - gflags =GPIOD_OUT_LOW_OPEN_DRAIN ; + gflags =GPIOD_OUT_HIGH_OPEN_DRAIN ; priv->scl =i2c_gpio_get_desc (dev,"scl" ,1 , gflags);if (IS_ERR (priv->scl))return PTR_ERR (priv->scl);
drivers/iio/accel/sca3000.c +1 -8
@@ -1277,7 +1277,7 @@ static int sca3000_configure_ring(struct iio_dev *indio_dev) {struct iio_buffer *buffer; - buffer =iio_kfifo_allocate (); + buffer =devm_iio_kfifo_allocate (&indio_dev->dev);if (!buffer)return -ENOMEM ;
@@ -1287,11 +1287,6 @@ static int sca3000_configure_ring(struct iio_dev *indio_dev)return 0 ; } -static void sca3000_unconfigure_ring (struct iio_dev *indio_dev) -{ -iio_kfifo_free (indio_dev->buffer); -} -static inline int __sca3000_hw_ring_state_set (struct iio_dev *indio_dev,bool state) {
@@ -1546,8 +1541,6 @@ static int sca3000_remove(struct spi_device *spi)if (spi->irq)free_irq (spi->irq, indio_dev); -sca3000_unconfigure_ring (indio_dev); -return 0 ; }
drivers/iio/adc/ad7791.c +0 -49
58 lines not on this page · raw message
drivers/infiniband/core/umem.c +1 -10
@@ -119,16 +119,7 @@ struct ib_umem *ib_umem_get(struct ib_ucontext *context, unsigned long addr, umem->length = size; umem->address = addr; umem->page_shift =PAGE_SHIFT ; -/* -* We ask for writable memory if any of the following -* access flags are set. "Local write" and "remote write" -* obviously require write access. "Remote atomic" can do -* things like fetch and add, which will modify memory, and -* "MW bind" can change permissions by binding a window. -*/ - umem->writable = !!(access & - (IB_ACCESS_LOCAL_WRITE |IB_ACCESS_REMOTE_WRITE | -IB_ACCESS_REMOTE_ATOMIC |IB_ACCESS_MW_BIND )); + umem->writable =ib_access_writable (access);if (access &IB_ACCESS_ON_DEMAND ) { ret =ib_umem_odp_get (context, umem, access);
drivers/infiniband/core/uverbs_main.c +10 -4
@@ -734,10 +734,6 @@ static ssize_t ib_uverbs_write(struct file *filp, const char __user *buf,if (ret)return ret; -if (!file->ucontext && - (command !=IB_USER_VERBS_CMD_GET_CONTEXT || extended)) -return -EINVAL ; -if (extended) {if (count < (sizeof (hdr) +sizeof (ex_hdr)))return -EINVAL ;
@@ -757,6 +753,16 @@ static ssize_t ib_uverbs_write(struct file *filp, const char __user *buf, goto out; } +/* +* Must be after the ib_dev check, as once the RCU clears ib_dev == +* NULL means ucontext == NULL +*/ +if (!file->ucontext && + (command !=IB_USER_VERBS_CMD_GET_CONTEXT || extended)) { + ret = -EINVAL ; + goto out; + } +if (!verify_command_mask (ib_dev, command, extended)) { ret = -EOPNOTSUPP ; goto out;
drivers/infiniband/core/verbs.c +8 -6
@@ -1562,11 +1562,12 @@ EXPORT_SYMBOL(ib_destroy_qp);/* Completion queues */ -struct ib_cq *ib_create_cq (struct ib_device *device, -ib_comp_handler comp_handler, -void (*event_handler)(struct ib_event *,void *), -void *cq_context, -const struct ib_cq_init_attr *cq_attr) +struct ib_cq *__ib_create_cq (struct ib_device *device, +ib_comp_handler comp_handler, +void (*event_handler)(struct ib_event *,void *), +void *cq_context, +const struct ib_cq_init_attr *cq_attr, +const char *caller) {struct ib_cq *cq;
@@ -1580,12 +1581,13 @@ struct ib_cq *ib_create_cq(struct ib_device *device, cq->cq_context = cq_context;atomic_set (&cq->usecnt,0 ); cq->res.type =RDMA_RESTRACK_CQ ; + cq->res.kern_name = caller;rdma_restrack_add (&cq->res); }return cq; } -EXPORT_SYMBOL (ib_create_cq); +EXPORT_SYMBOL (__ib_create_cq);int rdma_set_cq_moderation (struct ib_cq *cq,u16 cq_count,u16 cq_period) {
drivers/infiniband/hw/hfi1/chip.c +4 -4
@@ -6829,7 +6829,7 @@ static void rxe_kernel_unfreeze(struct hfi1_devdata *dd) } rcvmask =HFI1_RCVCTRL_CTXT_ENB ;/* HFI1_RCVCTRL_TAILUPD_[ENB|DIS] needs to be set explicitly */ - rcvmask |=HFI1_CAP_KGET_MASK (rcd->flags,DMA_RTAIL ) ? + rcvmask |= rcd->rcvhdrtail_kvaddr ?HFI1_RCVCTRL_TAILUPD_ENB :HFI1_RCVCTRL_TAILUPD_DIS ;hfi1_rcvctrl (dd, rcvmask, rcd);hfi1_rcd_put (rcd);
@@ -8355,7 +8355,7 @@ static inline int check_packet_present(struct hfi1_ctxtdata *rcd)u32 tail;int present; -if (!HFI1_CAP_IS_KSET (DMA_RTAIL )) +if (!rcd->rcvhdrtail_kvaddr) present = (rcd->seq_cnt ==rhf_rcv_seq (rhf_to_cpu (get_rhf_addr (rcd))));else /* is RDMA rtail */
@@ -11823,7 +11823,7 @@ void hfi1_rcvctrl(struct hfi1_devdata *dd, unsigned int op,/* reset the tail and hdr addresses, and sequence count */ write_kctxt_csr (dd, ctxt,RCV_HDR_ADDR , rcd->rcvhdrq_dma); -if (HFI1_CAP_KGET_MASK (rcd->flags,DMA_RTAIL )) +if (rcd->rcvhdrtail_kvaddr)write_kctxt_csr (dd, ctxt,RCV_HDR_TAIL_ADDR , rcd->rcvhdrqtailaddr_dma); rcd->seq_cnt =1 ;
@@ -11903,7 +11903,7 @@ void hfi1_rcvctrl(struct hfi1_devdata *dd, unsigned int op, rcvctrl |=RCV_CTXT_CTRL_INTR_AVAIL_SMASK ;if (op &HFI1_RCVCTRL_INTRAVAIL_DIS ) rcvctrl &= ~RCV_CTXT_CTRL_INTR_AVAIL_SMASK ; -if (op &HFI1_RCVCTRL_TAILUPD_ENB && rcd->rcvhdrqtailaddr_dma) +if ((op &HFI1_RCVCTRL_TAILUPD_ENB ) && rcd->rcvhdrtail_kvaddr) rcvctrl |=RCV_CTXT_CTRL_TAIL_UPD_SMASK ;if (op &HFI1_RCVCTRL_TAILUPD_DIS ) {/* See comment on RcvCtxtCtrl.TailUpd above */
drivers/infiniband/hw/hfi1/debugfs.c +6 -2
@@ -1227,7 +1227,8 @@ DEBUGFS_FILE_OPS(fault_stats);static void fault_exit_opcode_debugfs (struct hfi1_ibdev *ibd) { -debugfs_remove_recursive (ibd->fault_opcode->dir); +if (ibd->fault_opcode) +debugfs_remove_recursive (ibd->fault_opcode->dir);kfree (ibd->fault_opcode); ibd->fault_opcode =NULL ; }
@@ -1255,6 +1256,7 @@ static int fault_init_opcode_debugfs(struct hfi1_ibdev *ibd) &ibd->fault_opcode->attr);if (IS_ERR (ibd->fault_opcode->dir)) {kfree (ibd->fault_opcode); + ibd->fault_opcode =NULL ;return -ENOENT ; }
@@ -1278,7 +1280,8 @@ static int fault_init_opcode_debugfs(struct hfi1_ibdev *ibd)static void fault_exit_packet_debugfs (struct hfi1_ibdev *ibd) { -debugfs_remove_recursive (ibd->fault_packet->dir); +if (ibd->fault_packet) +debugfs_remove_recursive (ibd->fault_packet->dir);kfree (ibd->fault_packet); ibd->fault_packet =NULL ; }
@@ -1304,6 +1307,7 @@ static int fault_init_packet_debugfs(struct hfi1_ibdev *ibd) &ibd->fault_opcode->attr);if (IS_ERR (ibd->fault_packet->dir)) {kfree (ibd->fault_packet); + ibd->fault_packet =NULL ;return -ENOENT ; }
drivers/infiniband/hw/hfi1/file_ops.c +2 -2
@@ -505,7 +505,7 @@ static int hfi1_file_mmap(struct file *fp, struct vm_area_struct *vma) ret = -EINVAL ; goto done; } -if (flags &VM_WRITE ) { +if ((flags &VM_WRITE ) || !uctxt->rcvhdrtail_kvaddr) { ret = -EPERM ; goto done; }
@@ -689,8 +689,8 @@ static int hfi1_file_close(struct inode *inode, struct file *fp)* checks to default and disable the send context. */ if (uctxt->sc) { -set_pio_integrity (uctxt->sc);sc_disable (uctxt->sc); +set_pio_integrity (uctxt->sc); }hfi1_free_ctxt_rcv_groups (uctxt);
drivers/infiniband/hw/hfi1/hfi.h +1 -0
@@ -1856,6 +1856,7 @@ struct cc_state *get_cc_state_protected(struct hfi1_pportdata *ppd)#define HFI1_HAS_SDMA_TIMEOUT 0x8#define HFI1_HAS_SEND_DMA 0x10/* Supports Send DMA */ #define HFI1_FORCED_FREEZE 0x80/* driver forced freeze mode */ +#define HFI1_SHUTDOWN 0x100/* device is shutting down */ /* IB dword length mask in PBC (lower 11 bits); same for all chips */ #define HFI1_PBC_LENGTH_MASK ((1 << 11) - 1)
drivers/infiniband/hw/hfi1/init.c +17 -5
@@ -1058,6 +1058,10 @@ static void shutdown_device(struct hfi1_devdata *dd)unsigned pidx;int i; +if (dd->flags &HFI1_SHUTDOWN ) +return ; + dd->flags |=HFI1_SHUTDOWN ; +for (pidx =0 ; pidx < dd->num_pports; ++pidx) { ppd = dd->pport + pidx;
@@ -1391,6 +1395,7 @@ void hfi1_disable_after_error(struct hfi1_devdata *dd)static void remove_one (struct pci_dev *);static int init_one (struct pci_dev *,const struct pci_device_id *); +static void shutdown_one (struct pci_dev *);#define DRIVER_LOAD_MSG "Intel " DRIVER_NAME " loaded: "#define PFX DRIVER_NAME ": "
@@ -1407,6 +1412,7 @@ static struct pci_driver hfi1_pci_driver = { .name = DRIVER_NAME, .probe = init_one, .remove = remove_one, + .shutdown = shutdown_one, .id_table = hfi1_pci_tbl, .err_handler = &hfi1_pci_err_handler, };
@@ -1816,6 +1822,13 @@ static void remove_one(struct pci_dev *pdev)postinit_cleanup (dd); } +static void shutdown_one (struct pci_dev *pdev) +{ +struct hfi1_devdata *dd =pci_get_drvdata (pdev); + +shutdown_device (dd); +} +/** * hfi1_create_rcvhdrq - create a receive header queue * @dd: the hfi1_ib device
@@ -1831,7 +1844,6 @@ int hfi1_create_rcvhdrq(struct hfi1_devdata *dd, struct hfi1_ctxtdata *rcd)u64 reg;if (!rcd->rcvhdrq) { -dma_addr_t dma_hdrqtail;gfp_t gfp_flags;/*
@@ -1856,13 +1868,13 @@ int hfi1_create_rcvhdrq(struct hfi1_devdata *dd, struct hfi1_ctxtdata *rcd) goto bail; } -if (HFI1_CAP_KGET_MASK (rcd->flags,DMA_RTAIL )) { +if (HFI1_CAP_KGET_MASK (rcd->flags,DMA_RTAIL ) || +HFI1_CAP_UGET_MASK (rcd->flags,DMA_RTAIL )) { rcd->rcvhdrtail_kvaddr =dma_zalloc_coherent ( - &dd->pcidev->dev,PAGE_SIZE , &dma_hdrqtail, - gfp_flags); + &dd->pcidev->dev,PAGE_SIZE , + &rcd->rcvhdrqtailaddr_dma, gfp_flags);if (!rcd->rcvhdrtail_kvaddr) goto bail_free; - rcd->rcvhdrqtailaddr_dma = dma_hdrqtail; } rcd->rcvhdrq_size = amt;
drivers/infiniband/hw/hfi1/pio.c +34 -10
65 lines not on this page · raw message
drivers/infiniband/hw/mlx4/mad.c +0 -1
@@ -1934,7 +1934,6 @@ static void mlx4_ib_sqp_comp_worker(struct work_struct *work) "buf:%lld\n", wc.wr_id);break ;default : -BUG_ON (1 );break ; } }else {
drivers/infiniband/hw/mlx4/mr.c +42 -8
74 lines not on this page · raw message
drivers/infiniband/hw/mlx5/cq.c +12 -3
@@ -637,7 +637,7 @@ static int mlx5_poll_one(struct mlx5_ib_cq *cq, }static int poll_soft_wc (struct mlx5_ib_cq *cq,int num_entries, -struct ib_wc *wc) +struct ib_wc *wc,bool is_fatal_err) {struct mlx5_ib_dev *dev =to_mdev (cq->ibcq.device);struct mlx5_ib_wc *soft_wc, *next;
@@ -650,6 +650,10 @@ static int poll_soft_wc(struct mlx5_ib_cq *cq, int num_entries,mlx5_ib_dbg (dev,"polled software generated completion on CQ 0x%x\n" , cq->mcq.cqn); +if (unlikely (is_fatal_err)) { + soft_wc->wc.status =IB_WC_WR_FLUSH_ERR ; + soft_wc->wc.vendor_err =MLX5_CQE_SYNDROME_WR_FLUSH_ERR ; + } wc[npolled++] = soft_wc->wc;list_del (&soft_wc->list);kfree (soft_wc);
@@ -670,12 +674,17 @@ int mlx5_ib_poll_cq(struct ib_cq *ibcq, int num_entries, struct ib_wc *wc)spin_lock_irqsave (&cq->lock, flags);if (mdev->state ==MLX5_DEVICE_STATE_INTERNAL_ERROR ) { -mlx5_ib_poll_sw_comp (cq, num_entries, wc, &npolled); +/* make sure no soft wqe's are waiting */ +if (unlikely (!list_empty (&cq->wc_list))) + soft_polled =poll_soft_wc (cq, num_entries, wc, true); + +mlx5_ib_poll_sw_comp (cq, num_entries - soft_polled, + wc + soft_polled, &npolled); goto out; }if (unlikely (!list_empty (&cq->wc_list))) - soft_polled =poll_soft_wc (cq, num_entries, wc); + soft_polled =poll_soft_wc (cq, num_entries, wc, false);for (npolled =0 ; npolled < num_entries - soft_polled; npolled++) {if (mlx5_poll_one (cq, &cur_qp, wc + soft_polled + npolled))
drivers/infiniband/hw/qib/qib.h +2 -2
@@ -1228,6 +1228,7 @@ static inline struct qib_ibport *to_iport(struct ib_device *ibdev, u8 port)#define QIB_BADINTR 0x8000/* severe interrupt problems */ #define QIB_DCA_ENABLED 0x10000/* Direct Cache Access enabled */ #define QIB_HAS_QSFP 0x20000/* device (card instance) has QSFP */ +#define QIB_SHUTDOWN 0x40000/* device is shutting down */ /* * values for ppd->lflags (_ib_port_ related flags)
@@ -1423,8 +1424,7 @@ u64 qib_sps_ints(void);/* * dma_addr wrappers - all 0's invalid for hw */ -dma_addr_t qib_map_page (struct pci_dev *,struct page *,unsigned long , -size_t ,int ); +int qib_map_page (struct pci_dev *d,struct page *p,dma_addr_t *daddr);struct pci_dev *qib_get_pci_dev (struct rvt_dev_info *rdi);/*
drivers/infiniband/hw/qib/qib_file_ops.c +7 -3
@@ -364,6 +364,8 @@ static int qib_tid_update(struct qib_ctxtdata *rcd, struct file *fp, goto done; }for (i =0 ; i < cnt; i++, vaddr +=PAGE_SIZE ) { +dma_addr_t daddr; +for (; ntids--; tid++) {if (tid == tidcnt) tid =0 ;
@@ -380,12 +382,14 @@ static int qib_tid_update(struct qib_ctxtdata *rcd, struct file *fp, ret = -ENOMEM ;break ; } + ret =qib_map_page (dd->pcidev, pagep[i], &daddr); +if (ret) +break ; + tidlist[i] = tid + tidoff;/* we "know" system pages and TID pages are same size */ dd->pageshadow[ctxttid + tid] = pagep[i]; - dd->physshadow[ctxttid + tid] = -qib_map_page (dd->pcidev, pagep[i],0 ,PAGE_SIZE , -PCI_DMA_FROMDEVICE ); + dd->physshadow[ctxttid + tid] = daddr;/* * don't need atomic or it's overhead */
drivers/infiniband/hw/qib/qib_init.c +13 -0
@@ -841,6 +841,10 @@ static void qib_shutdown_device(struct qib_devdata *dd)struct qib_pportdata *ppd;unsigned pidx; +if (dd->flags &QIB_SHUTDOWN ) +return ; + dd->flags |=QIB_SHUTDOWN ; +for (pidx =0 ; pidx < dd->num_pports; ++pidx) { ppd = dd->pport + pidx;
@@ -1182,6 +1186,7 @@ void qib_disable_after_error(struct qib_devdata *dd)static void qib_remove_one (struct pci_dev *);static int qib_init_one (struct pci_dev *,const struct pci_device_id *); +static void qib_shutdown_one (struct pci_dev *);#define DRIVER_LOAD_MSG "Intel " QIB_DRV_NAME " loaded: "#define PFX QIB_DRV_NAME ": "
@@ -1199,6 +1204,7 @@ static struct pci_driver qib_driver = { .name = QIB_DRV_NAME, .probe = qib_init_one, .remove = qib_remove_one, + .shutdown = qib_shutdown_one, .id_table = qib_pci_tbl, .err_handler = &qib_pci_err_handler, };
@@ -1549,6 +1555,13 @@ static void qib_remove_one(struct pci_dev *pdev)qib_postinit_cleanup (dd); } +static void qib_shutdown_one (struct pci_dev *pdev) +{ +struct qib_devdata *dd =pci_get_drvdata (pdev); + +qib_shutdown_device (dd); +} +/** * qib_create_rcvhdrq - create a receive header queue * @dd: the qlogic_ib device
drivers/infiniband/hw/qib/qib_user_pages.c +12 -8
@@ -99,23 +99,27 @@ static int __qib_get_user_pages(unsigned long start_page, size_t num_pages,* * I'm sure we won't be so lucky with other iommu's, so FIXME. */ -dma_addr_t qib_map_page (struct pci_dev *hwdev,struct page *page, -unsigned long offset,size_t size,int direction) +int qib_map_page (struct pci_dev *hwdev,struct page *page,dma_addr_t *daddr) {dma_addr_t phys; - phys =pci_map_page (hwdev, page, offset, size, direction); + phys =pci_map_page (hwdev, page,0 ,PAGE_SIZE ,PCI_DMA_FROMDEVICE ); +if (pci_dma_mapping_error (hwdev, phys)) +return -ENOMEM ; -if (phys ==0 ) { -pci_unmap_page (hwdev, phys, size, direction); - phys =pci_map_page (hwdev, page, offset, size, direction); +if (!phys) { +pci_unmap_page (hwdev, phys,PAGE_SIZE ,PCI_DMA_FROMDEVICE ); + phys =pci_map_page (hwdev, page,0 ,PAGE_SIZE , +PCI_DMA_FROMDEVICE ); +if (pci_dma_mapping_error (hwdev, phys)) +return -ENOMEM ;/* * FIXME: If we get 0 again, we should keep this page, * map another, then free the 0 page. */ } - -return phys; + *daddr = phys; +return 0 ; }/**
drivers/infiniband/sw/rdmavt/cq.c +19 -12
@@ -120,17 +120,20 @@ void rvt_cq_enter(struct rvt_cq *cq, struct ib_wc *entry, bool solicited)if (cq->notify ==IB_CQ_NEXT_COMP || (cq->notify ==IB_CQ_SOLICITED && (solicited || entry->status !=IB_WC_SUCCESS ))) { +struct kthread_worker *worker; +/* * This will cause send_complete() to be called in * another thread. */ -spin_lock (&cq->rdi->n_cqs_lock); -if (likely (cq->rdi->worker)) { +rcu_read_lock (); + worker =rcu_dereference (cq->rdi->worker); +if (likely (worker)) { cq->notify =RVT_CQ_NONE ; cq->triggered++; -kthread_queue_work (cq->rdi->worker, &cq->comptask); +kthread_queue_work (worker, &cq->comptask); } -spin_unlock (&cq->rdi->n_cqs_lock); +rcu_read_unlock (); }spin_unlock_irqrestore (&cq->lock, flags);
@@ -512,7 +515,7 @@ int rvt_driver_cq_init(struct rvt_dev_info *rdi)int cpu;struct kthread_worker *worker; -if (rdi->worker) +if (rcu_access_pointer (rdi->worker))return 0 ;spin_lock_init (&rdi->n_cqs_lock);
@@ -524,7 +527,7 @@ int rvt_driver_cq_init(struct rvt_dev_info *rdi)return PTR_ERR (worker);set_user_nice (worker->task,MIN_NICE ); - rdi->worker = worker; +RCU_INIT_POINTER (rdi->worker, worker);return 0 ; }
@@ -536,15 +539,19 @@ void rvt_cq_exit(struct rvt_dev_info *rdi) {struct kthread_worker *worker; -/* block future queuing from send_complete() */ -spin_lock_irq (&rdi->n_cqs_lock); - worker = rdi->worker; +if (!rcu_access_pointer (rdi->worker)) +return ; + +spin_lock (&rdi->n_cqs_lock); + worker =rcu_dereference_protected (rdi->worker, +lockdep_is_held (&rdi->n_cqs_lock));if (!worker) { -spin_unlock_irq (&rdi->n_cqs_lock); +spin_unlock (&rdi->n_cqs_lock);return ; } - rdi->worker =NULL ; -spin_unlock_irq (&rdi->n_cqs_lock); +RCU_INIT_POINTER (rdi->worker,NULL ); +spin_unlock (&rdi->n_cqs_lock); +synchronize_rcu ();kthread_destroy_worker (worker); }
drivers/infiniband/ulp/isert/ib_isert.c +18 -10
@@ -886,15 +886,9 @@ isert_login_post_send(struct isert_conn *isert_conn, struct iser_tx_desc *tx_des }static void -isert_create_send_desc (struct isert_conn *isert_conn, -struct isert_cmd *isert_cmd, -struct iser_tx_desc *tx_desc) +__isert_create_send_desc (struct isert_device *device, +struct iser_tx_desc *tx_desc) { -struct isert_device *device = isert_conn->device; -struct ib_device *ib_dev = device->ib_device; - -ib_dma_sync_single_for_cpu (ib_dev, tx_desc->dma_addr, -ISER_HEADERS_LEN ,DMA_TO_DEVICE );memset (&tx_desc->iser_header,0 ,sizeof (struct iser_ctrl )); tx_desc->iser_header.flags =ISCSI_CTRL ;
@@ -907,6 +901,20 @@ isert_create_send_desc(struct isert_conn *isert_conn, } } +static void +isert_create_send_desc (struct isert_conn *isert_conn, +struct isert_cmd *isert_cmd, +struct iser_tx_desc *tx_desc) +{ +struct isert_device *device = isert_conn->device; +struct ib_device *ib_dev = device->ib_device; + +ib_dma_sync_single_for_cpu (ib_dev, tx_desc->dma_addr, +ISER_HEADERS_LEN ,DMA_TO_DEVICE ); + +__isert_create_send_desc (device, tx_desc); +} +static int isert_init_tx_hdrs (struct isert_conn *isert_conn,struct iser_tx_desc *tx_desc)
@@ -994,7 +1002,7 @@ isert_put_login_tx(struct iscsi_conn *conn, struct iscsi_login *login,struct iser_tx_desc *tx_desc = &isert_conn->login_tx_desc;int ret; -isert_create_send_desc (isert_conn,NULL , tx_desc); +__isert_create_send_desc (device, tx_desc);memcpy (&tx_desc->iscsi_header, &login->rsp[0 ],sizeof (struct iscsi_hdr ));
@@ -2108,7 +2116,7 @@ isert_set_sig_attrs(struct se_cmd *se_cmd, struct ib_sig_attrs *sig_attrs) sig_attrs->check_mask = (se_cmd->prot_checks &TARGET_DIF_CHECK_GUARD ?0xc0 :0 ) | - (se_cmd->prot_checks &TARGET_DIF_CHECK_REFTAG ?0x30 :0 ) | + (se_cmd->prot_checks &TARGET_DIF_CHECK_APPTAG ?0x30 :0 ) | (se_cmd->prot_checks &TARGET_DIF_CHECK_REFTAG ?0x0f :0 );return 0 ; }
drivers/input/joystick/xpad.c +1 -1
@@ -123,7 +123,7 @@ static const struct xpad_device {u8 mapping;u8 xtype; } xpad_device[] = { - { 0x0079, 0x18d4, "GPD Win 2 Controller", 0, XTYPE_XBOX360 }, + { 0x0079, 0x18d4, "GPD Win 2 X-Box Controller", 0, XTYPE_XBOX360 }, { 0x044f, 0x0f00, "Thrustmaster Wheel", 0, XTYPE_XBOX }, { 0x044f, 0x0f03, "Thrustmaster Wheel", 0, XTYPE_XBOX }, { 0x044f, 0x0f07, "Thrustmaster, Inc. Controller", 0, XTYPE_XBOX },
drivers/input/mouse/elan_i2c.h +2 -0
@@ -27,6 +27,8 @@#define ETP_DISABLE_POWER 0x0001#define ETP_PRESSURE_OFFSET 25 +#define ETP_CALIBRATE_MAX_LEN 3 +/* IAP Firmware handling */ #define ETP_PRODUCT_ID_FORMAT_STRING "%d.0"#define ETP_FW_NAME "elan_i2c_" ETP_PRODUCT_ID_FORMAT_STRING ".bin"
drivers/input/mouse/elan_i2c_core.c +2 -1
@@ -610,7 +610,7 @@ static ssize_t calibrate_store(struct device *dev,int tries =20 ;int retval;int error; -u8 val[3 ]; +u8 val[ETP_CALIBRATE_MAX_LEN ]; retval =mutex_lock_interruptible (&data->sysfs_mutex);if (retval)
@@ -1263,6 +1263,7 @@ static const struct acpi_device_id elan_acpi_id[] = { { "ELAN060C", 0 }, { "ELAN0611", 0 }, { "ELAN0612", 0 }, + { "ELAN0618", 0 }, { "ELAN1000", 0 }, { } };
drivers/input/mouse/elan_i2c_smbus.c +8 -2
@@ -56,7 +56,7 @@static int elan_smbus_initialize (struct i2c_client *client) {u8 check[ETP_SMBUS_HELLOPACKET_LEN ] = {0x55 ,0x55 ,0x55 ,0x55 ,0x55 }; -u8 values[ETP_SMBUS_HELLOPACKET_LEN ] = {0 ,0 ,0 ,0 ,0 }; +u8 values[I2C_SMBUS_BLOCK_MAX ] = {0 };int len, error;/* Get hello packet */
@@ -117,12 +117,16 @@ static int elan_smbus_calibrate(struct i2c_client *client)static int elan_smbus_calibrate_result (struct i2c_client *client,u8 *val) {int error; +u8 buf[I2C_SMBUS_BLOCK_MAX ] = {0 }; + +BUILD_BUG_ON (ETP_CALIBRATE_MAX_LEN >sizeof (buf)); error =i2c_smbus_read_block_data (client, -ETP_SMBUS_CALIBRATE_QUERY , val); +ETP_SMBUS_CALIBRATE_QUERY , buf);if (error <0 )return error; +memcpy (val, buf,ETP_CALIBRATE_MAX_LEN );return 0 ; }
@@ -472,6 +476,8 @@ static int elan_smbus_get_report(struct i2c_client *client, u8 *report) {int len; +BUILD_BUG_ON (I2C_SMBUS_BLOCK_MAX >ETP_SMBUS_REPORT_LEN ); + len =i2c_smbus_read_block_data (client,ETP_SMBUS_PACKET_QUERY , &report[ETP_SMBUS_REPORT_OFFSET ]);
drivers/input/mouse/elantech.c +9 -2
@@ -796,7 +796,7 @@ static int elantech_packet_check_v4(struct psmouse *psmouse)else if (ic_version ==7 && etd->samples[1 ] ==0x2A ) sanity_check = ((packet[3 ] &0x1c ) ==0x10 );else - sanity_check = ((packet[0 ] &0x0c ) ==0x04 && + sanity_check = ((packet[0 ] &0x08 ) ==0x00 && (packet[3 ] &0x1c ) ==0x10 );if (!sanity_check)
@@ -1169,6 +1169,12 @@ static const struct dmi_system_id elantech_dmi_has_middle_button[] = { { } }; +static const char *const middle_button_pnp_ids[] = { +"LEN2131" ,/* ThinkPad P52 w/ NFC */ +"LEN2132" ,/* ThinkPad P52 */ +NULL +}; +/* * Set the appropriate event bits for the input subsystem */
@@ -1188,7 +1194,8 @@ static int elantech_set_input_params(struct psmouse *psmouse)__clear_bit (EV_REL , dev->evbit);__set_bit (BTN_LEFT , dev->keybit); -if (dmi_check_system (elantech_dmi_has_middle_button)) +if (dmi_check_system (elantech_dmi_has_middle_button) || +psmouse_matches_pnp_id (psmouse, middle_button_pnp_ids))__set_bit (BTN_MIDDLE , dev->keybit);__set_bit (BTN_RIGHT , dev->keybit);
drivers/input/mouse/psmouse-base.c +6 -6
@@ -192,8 +192,8 @@ psmouse_ret_t psmouse_process_byte(struct psmouse *psmouse)else input_report_rel (dev,REL_WHEEL , -wheel); -input_report_key (dev,BTN_SIDE ,BIT (4 )); -input_report_key (dev,BTN_EXTRA ,BIT (5 )); +input_report_key (dev,BTN_SIDE , packet[3 ] &BIT (4 )); +input_report_key (dev,BTN_EXTRA , packet[3 ] &BIT (5 ));break ; }break ;
@@ -203,13 +203,13 @@ psmouse_ret_t psmouse_process_byte(struct psmouse *psmouse)input_report_rel (dev,REL_WHEEL , -(s8 ) packet[3 ]);/* Extra buttons on Genius NewNet 3D */ -input_report_key (dev,BTN_SIDE ,BIT (6 )); -input_report_key (dev,BTN_EXTRA ,BIT (7 )); +input_report_key (dev,BTN_SIDE , packet[0 ] &BIT (6 )); +input_report_key (dev,BTN_EXTRA , packet[0 ] &BIT (7 ));break ;case PSMOUSE_THINKPS :/* Extra button on ThinkingMouse */ -input_report_key (dev,BTN_EXTRA ,BIT (3 )); +input_report_key (dev,BTN_EXTRA , packet[0 ] &BIT (3 ));/* * Without this bit of weirdness moving up gives wildly
@@ -223,7 +223,7 @@ psmouse_ret_t psmouse_process_byte(struct psmouse *psmouse)* Cortron PS2 Trackball reports SIDE button in the * 4th bit of the first byte. */ -input_report_key (dev,BTN_SIDE ,BIT (3 )); +input_report_key (dev,BTN_SIDE , packet[0 ] &BIT (3 )); packet[0 ] |=BIT (3 );break ;
drivers/input/touchscreen/silead.c +1 -0
@@ -603,6 +603,7 @@ static const struct acpi_device_id silead_ts_acpi_match[] = { { "GSL3692", 0 }, { "MSSL1680", 0 }, { "MSSL0001", 0 }, + { "MSSL0002", 0 }, { } };MODULE_DEVICE_TABLE (acpi, silead_ts_acpi_match);
drivers/iommu/Kconfig +0 -1
@@ -107,7 +107,6 @@ config IOMMU_PGTABLES_L2 # AMD IOMMU support config AMD_IOMMU bool "AMD IOMMU support" - select DMA_DIRECT_OPS select SWIOTLB select PCI_MSI select PCI_ATS
drivers/iommu/amd_iommu.c +47 -21
96 lines not on this page · raw message
drivers/irqchip/irq-gic-v3-its.c +8 -1
@@ -2309,7 +2309,14 @@ static int its_irq_domain_activate(struct irq_domain *domain, cpu_mask =cpumask_of_node (its_dev->its->numa_node);/* Bind the LPI to the first possible CPU */ - cpu =cpumask_first (cpu_mask); + cpu =cpumask_first_and (cpu_mask, cpu_online_mask); +if (cpu >= nr_cpu_ids) { +if (its_dev->its->flags &ITS_FLAGS_WORKAROUND_CAVIUM_23144 ) +return -EINVAL ; + + cpu =cpumask_first (cpu_online_mask); + } + its_dev->event_map.col_map[event] = cpu;irq_data_update_effective_affinity (d,cpumask_of (cpu));
drivers/md/dm-thin.c +9 -2
@@ -1385,6 +1385,8 @@ static void schedule_external_copy(struct thin_c *tc, dm_block_t virt_block,static void set_pool_mode (struct pool *pool,enum pool_mode new_mode); +static void requeue_bios (struct pool *pool); +static void check_for_space (struct pool *pool) {int r;
@@ -1397,8 +1399,10 @@ static void check_for_space(struct pool *pool)if (r)return ; -if (nr_free) +if (nr_free) {set_pool_mode (pool,PM_WRITE ); +requeue_bios (pool); + } }/*
@@ -1475,7 +1479,10 @@ static int alloc_data_block(struct thin_c *tc, dm_block_t *result) r =dm_pool_alloc_data_block (pool->pmd, result);if (r) { -metadata_operation_failed (pool,"dm_pool_alloc_data_block" , r); +if (r == -ENOSPC ) +set_pool_mode (pool,PM_OUT_OF_DATA_SPACE ); +else +metadata_operation_failed (pool,"dm_pool_alloc_data_block" , r);return r; }
drivers/md/dm-zoned-target.c +1 -1
@@ -788,7 +788,7 @@ static int dmz_ctr(struct dm_target *ti, unsigned int argc, char **argv)/* Chunk BIO work */ mutex_init (&dmz->chunk_lock); -INIT_RADIX_TREE (&dmz->chunk_rxtree,GFP_KERNEL ); +INIT_RADIX_TREE (&dmz->chunk_rxtree,GFP_NOIO ); dmz->chunk_wq =alloc_workqueue ("dmz_cwq_%s" ,WQ_MEM_RECLAIM |WQ_UNBOUND ,0 , dev->name);if (!dmz->chunk_wq) {
drivers/md/dm.c +2 -3
@@ -1582,10 +1582,9 @@ static blk_qc_t __split_and_process_bio(struct mapped_device *md,* the usage of io->orig_bio in dm_remap_zone_report() * won't be affected by this reassignment. */ -struct bio *b =bio_clone_bioset (bio,GFP_NOIO , - md->queue->bio_split); +struct bio *b =bio_split (bio,bio_sectors (bio) - ci.sector_count, +GFP_NOIO , md->queue->bio_split); ci.io->orig_bio = b; -bio_advance (bio, (bio_sectors (bio) - ci.sector_count) <<9 );bio_chain (b, bio); ret =generic_make_request (bio);break ;
drivers/md/md.c +3 -1
@@ -2853,7 +2853,8 @@ state_store(struct md_rdev *rdev, const char *buf, size_t len) err =0 ; } }else if (cmd_match (buf,"re-add" )) { -if (test_bit (Faulty, &rdev->flags) && (rdev->raid_disk ==-1 )) { +if (test_bit (Faulty, &rdev->flags) && (rdev->raid_disk ==-1 ) && + rdev->saved_raid_disk >=0 ) {/* clear_bit is performed _after_ all the devices * have their local Faulty bit cleared. If any writes * happen in the meantime in the local node, they
@@ -8641,6 +8642,7 @@ static int remove_and_add_spares(struct mddev *mddev,if (mddev->pers->hot_remove_disk ( mddev, rdev) ==0 ) {sysfs_unlink_rdev (mddev, rdev); + rdev->saved_raid_disk = rdev->raid_disk; rdev->raid_disk =-1 ; removed++; }
drivers/media/dvb-core/dvb_frontend.c +15 -8
@@ -275,8 +275,20 @@ static void dvb_frontend_add_event(struct dvb_frontend *fe,wake_up_interruptible (&events->wait_queue); } +static int dvb_frontend_test_event (struct dvb_frontend_private *fepriv, +struct dvb_fe_events *events) +{ +int ret; + +up (&fepriv->sem); + ret = events->eventw != events->eventr; +down (&fepriv->sem); + +return ret; +} +static int dvb_frontend_get_event (struct dvb_frontend *fe, -struct dvb_frontend_event *event,int flags) +struct dvb_frontend_event *event,int flags) {struct dvb_frontend_private *fepriv = fe->frontend_priv;struct dvb_fe_events *events = &fepriv->events;
@@ -294,13 +306,8 @@ static int dvb_frontend_get_event(struct dvb_frontend *fe,if (flags &O_NONBLOCK )return -EWOULDBLOCK ; -up (&fepriv->sem); - - ret =wait_event_interruptible (events->wait_queue, - events->eventw != events->eventr); - -if (down_interruptible (&fepriv->sem)) -return -ERESTARTSYS ; + ret =wait_event_interruptible (events->wait_queue, +dvb_frontend_test_event (fepriv, events));if (ret <0 )return ret;
drivers/media/platform/vsp1/vsp1_video.c +13 -8
@@ -849,9 +849,8 @@ static int vsp1_video_setup_pipeline(struct vsp1_pipeline *pipe)return 0 ; } -static void vsp1_video_cleanup_pipeline (struct vsp1_pipeline *pipe) +static void vsp1_video_release_buffers (struct vsp1_video *video) { -struct vsp1_video *video = pipe->output->video;struct vsp1_vb2_buffer *buffer;unsigned long flags;
@@ -861,12 +860,18 @@ static void vsp1_video_cleanup_pipeline(struct vsp1_pipeline *pipe)vb2_buffer_done (&buffer->buf.vb2_buf,VB2_BUF_STATE_ERROR );INIT_LIST_HEAD (&video->irqqueue);spin_unlock_irqrestore (&video->irqlock, flags); +} + +static void vsp1_video_cleanup_pipeline (struct vsp1_pipeline *pipe) +{ +lockdep_assert_held (&pipe->lock);/* Release our partition table allocation */ -mutex_lock (&pipe->lock);kfree (pipe->part_table); pipe->part_table =NULL ; -mutex_unlock (&pipe->lock); + +vsp1_dl_list_put (pipe->dl); + pipe->dl =NULL ; }static int vsp1_video_start_streaming (struct vb2_queue *vq,unsigned int count)
@@ -881,8 +886,9 @@ static int vsp1_video_start_streaming(struct vb2_queue *vq, unsigned int count)if (pipe->stream_count == pipe->num_inputs) { ret =vsp1_video_setup_pipeline (pipe);if (ret <0 ) { -mutex_unlock (&pipe->lock); +vsp1_video_release_buffers (video);vsp1_video_cleanup_pipeline (pipe); +mutex_unlock (&pipe->lock);return ret; }
@@ -932,13 +938,12 @@ static void vsp1_video_stop_streaming(struct vb2_queue *vq)if (ret == -ETIMEDOUT )dev_err (video->vsp1->dev,"pipeline stop timeout\n" ); -vsp1_dl_list_put (pipe->dl); - pipe->dl =NULL ; +vsp1_video_cleanup_pipeline (pipe); }mutex_unlock (&pipe->lock);media_pipeline_stop (&video->video.entity); -vsp1_video_cleanup_pipeline (pipe); +vsp1_video_release_buffers (video);vsp1_video_pipeline_put (pipe); }
drivers/media/rc/ir-mce_kbd-decoder.c +2 -0
@@ -130,6 +130,8 @@ static void mce_kbd_rx_timeout(struct timer_list *t)for (i =0 ; i <MCIR2_MASK_KEYS_START ; i++)input_report_key (raw->mce_kbd.idev, kbd_keycodes[i],0 ); + +input_sync (raw->mce_kbd.idev); }static enum mce_kbd_mode mce_kbd_mode (struct mce_kbd_dec *data)
drivers/media/usb/cx231xx/cx231xx-cards.c +3 -0
@@ -1024,6 +1024,9 @@ struct usb_device_id cx231xx_id_table[] = { .driver_info = CX231XX_BOARD_CNXT_RDE_250}, {USB_DEVICE(0x0572, 0x58A0), .driver_info = CX231XX_BOARD_CNXT_RDU_250}, + /* AverMedia DVD EZMaker 7 */ + {USB_DEVICE(0x07ca, 0xc039), + .driver_info = CX231XX_BOARD_CNXT_VIDEO_GRABBER}, {USB_DEVICE(0x2040, 0xb110), .driver_info = CX231XX_BOARD_HAUPPAUGE_USB2_FM_PAL}, {USB_DEVICE(0x2040, 0xb111),
drivers/media/usb/cx231xx/cx231xx-dvb.c +1 -1
@@ -1151,7 +1151,7 @@ static int dvb_init(struct cx231xx *dev) info.platform_data = &si2157_config;request_module ("si2157" ); - client =i2c_new_device (adapter, &info); + client =i2c_new_device (tuner_i2c, &info);if (client ==NULL || client->dev.driver ==NULL ) {module_put (dvb->i2c_client_demod[0 ]->dev.driver->owner);i2c_unregister_device (dvb->i2c_client_demod[0 ]);
drivers/media/usb/uvc/uvc_video.c +18 -6
@@ -163,14 +163,27 @@ static void uvc_fixup_video_ctrl(struct uvc_streaming *stream, } } +static size_t uvc_video_ctrl_size (struct uvc_streaming *stream) +{ +/* +* Return the size of the video probe and commit controls, which depends +* on the protocol version. +*/ +if (stream->dev->uvc_version <0x0110 ) +return 26 ; +else if (stream->dev->uvc_version <0x0150 ) +return 34 ; +else +return 48 ; +} +static int uvc_get_video_ctrl (struct uvc_streaming *stream,struct uvc_streaming_control *ctrl,int probe,u8 query) { +u16 size =uvc_video_ctrl_size (stream);u8 *data; -u16 size;int ret; - size = stream->dev->uvc_version >=0x0110 ?34 :26 ;if ((stream->dev->quirks &UVC_QUIRK_PROBE_DEF ) && query ==UVC_GET_DEF )return -EIO ;
@@ -225,7 +238,7 @@ static int uvc_get_video_ctrl(struct uvc_streaming *stream, ctrl->dwMaxVideoFrameSize =get_unaligned_le32 (&data[18 ]); ctrl->dwMaxPayloadTransferSize =get_unaligned_le32 (&data[22 ]); -if (size ==34 ) { +if (size >=34 ) { ctrl->dwClockFrequency =get_unaligned_le32 (&data[26 ]); ctrl->bmFramingInfo = data[30 ]; ctrl->bPreferedVersion = data[31 ];
@@ -254,11 +267,10 @@ static int uvc_get_video_ctrl(struct uvc_streaming *stream,static int uvc_set_video_ctrl (struct uvc_streaming *stream,struct uvc_streaming_control *ctrl,int probe) { +u16 size =uvc_video_ctrl_size (stream);u8 *data; -u16 size;int ret; - size = stream->dev->uvc_version >=0x0110 ?34 :26 ; data =kzalloc (size,GFP_KERNEL );if (data ==NULL )return -ENOMEM ;
@@ -275,7 +287,7 @@ static int uvc_set_video_ctrl(struct uvc_streaming *stream,put_unaligned_le32 (ctrl->dwMaxVideoFrameSize, &data[18 ]);put_unaligned_le32 (ctrl->dwMaxPayloadTransferSize, &data[22 ]); -if (size ==34 ) { +if (size >=34 ) {put_unaligned_le32 (ctrl->dwClockFrequency, &data[26 ]); data[30 ] = ctrl->bmFramingInfo; data[31 ] = ctrl->bPreferedVersion;
drivers/media/v4l2-core/v4l2-compat-ioctl32.c +1 -1
@@ -871,7 +871,7 @@ static int put_v4l2_ext_controls32(struct file *file, get_user(kcontrols, &kp->controls))return -EFAULT ; -if (!count) +if (!count || count > (U32_MAX /sizeof (*ucontrols)))return 0 ;if (get_user (p, &up->controls))return -EFAULT ;
drivers/mfd/intel-lpss-pci.c +15 -10
@@ -124,6 +124,11 @@ static const struct intel_lpss_platform_info apl_i2c_info = { .properties = apl_i2c_properties, }; +static const struct intel_lpss_platform_info cnl_i2c_info = { + .clk_rate =216000000 , + .properties = spt_i2c_properties, +}; +static const struct pci_device_id intel_lpss_pci_ids[] = {/* BXT A-Step */ {PCI_VDEVICE (INTEL ,0x0aac ), (kernel_ulong_t)&bxt_i2c_info },
@@ -207,13 +212,13 @@ static const struct pci_device_id intel_lpss_pci_ids[] = { { PCI_VDEVICE(INTEL, 0x9daa), (kernel_ulong_t)&spt_info }, { PCI_VDEVICE(INTEL, 0x9dab), (kernel_ulong_t)&spt_info }, { PCI_VDEVICE(INTEL, 0x9dfb), (kernel_ulong_t)&spt_info }, - { PCI_VDEVICE(INTEL, 0x9dc5), (kernel_ulong_t)&spt_i2c_info }, - { PCI_VDEVICE(INTEL, 0x9dc6), (kernel_ulong_t)&spt_i2c_info }, + { PCI_VDEVICE(INTEL, 0x9dc5), (kernel_ulong_t)&cnl_i2c_info }, + { PCI_VDEVICE(INTEL, 0x9dc6), (kernel_ulong_t)&cnl_i2c_info }, { PCI_VDEVICE(INTEL, 0x9dc7), (kernel_ulong_t)&spt_uart_info }, - { PCI_VDEVICE(INTEL, 0x9de8), (kernel_ulong_t)&spt_i2c_info }, - { PCI_VDEVICE(INTEL, 0x9de9), (kernel_ulong_t)&spt_i2c_info }, - { PCI_VDEVICE(INTEL, 0x9dea), (kernel_ulong_t)&spt_i2c_info }, - { PCI_VDEVICE(INTEL, 0x9deb), (kernel_ulong_t)&spt_i2c_info }, + { PCI_VDEVICE(INTEL, 0x9de8), (kernel_ulong_t)&cnl_i2c_info }, + { PCI_VDEVICE(INTEL, 0x9de9), (kernel_ulong_t)&cnl_i2c_info }, + { PCI_VDEVICE(INTEL, 0x9dea), (kernel_ulong_t)&cnl_i2c_info }, + { PCI_VDEVICE(INTEL, 0x9deb), (kernel_ulong_t)&cnl_i2c_info },/* SPT-H */ { PCI_VDEVICE(INTEL, 0xa127), (kernel_ulong_t)&spt_uart_info }, { PCI_VDEVICE(INTEL, 0xa128), (kernel_ulong_t)&spt_uart_info },
@@ -240,10 +245,10 @@ static const struct pci_device_id intel_lpss_pci_ids[] = { { PCI_VDEVICE(INTEL, 0xa32b), (kernel_ulong_t)&spt_info }, { PCI_VDEVICE(INTEL, 0xa37b), (kernel_ulong_t)&spt_info }, { PCI_VDEVICE(INTEL, 0xa347), (kernel_ulong_t)&spt_uart_info }, - { PCI_VDEVICE(INTEL, 0xa368), (kernel_ulong_t)&spt_i2c_info }, - { PCI_VDEVICE(INTEL, 0xa369), (kernel_ulong_t)&spt_i2c_info }, - { PCI_VDEVICE(INTEL, 0xa36a), (kernel_ulong_t)&spt_i2c_info }, - { PCI_VDEVICE(INTEL, 0xa36b), (kernel_ulong_t)&spt_i2c_info }, + { PCI_VDEVICE(INTEL, 0xa368), (kernel_ulong_t)&cnl_i2c_info }, + { PCI_VDEVICE(INTEL, 0xa369), (kernel_ulong_t)&cnl_i2c_info }, + { PCI_VDEVICE(INTEL, 0xa36a), (kernel_ulong_t)&cnl_i2c_info }, + { PCI_VDEVICE(INTEL, 0xa36b), (kernel_ulong_t)&cnl_i2c_info }, { } };MODULE_DEVICE_TABLE (pci, intel_lpss_pci_ids);
drivers/mfd/intel-lpss.c +2 -2
@@ -275,11 +275,11 @@ static void intel_lpss_init_dev(const struct intel_lpss *lpss)intel_lpss_deassert_reset (lpss); +intel_lpss_set_remap_addr (lpss); +if (!intel_lpss_has_idma (lpss))return ; -intel_lpss_set_remap_addr (lpss); -/* Make sure that SPI multiblock DMA transfers are re-enabled */ if (lpss->type ==LPSS_DEV_SPI )writel (value, lpss->priv +LPSS_PRIV_SSP_REG );
drivers/mfd/twl-core.c +1 -1
@@ -1177,7 +1177,7 @@ twl_probe(struct i2c_client *client, const struct i2c_device_id *id) twl_priv->ready = true;/* setup clock framework */ -clocks_init (&pdev->dev, pdata ? pdata->clock :NULL ); +clocks_init (&client->dev, pdata ? pdata->clock :NULL );/* read TWL IDCODE Register */ if (twl_class_is_4030 ()) {
drivers/misc/cxl/pci.c +2 -2
@@ -514,9 +514,9 @@ static int init_implementation_adapter_regs_psl9(struct cxl *adapter,cxl_p1_write (adapter,CXL_PSL9_FIR_CNTL , psl_fircntl);/* Setup the PSL to transmit packets on the PCIe before the -* CAPP is enabled +* CAPP is enabled. Make sure that CAPP virtual machines are disabled */ -cxl_p1_write (adapter,CXL_PSL9_DSNDCTL ,0x0001001000002A10ULL ); +cxl_p1_write (adapter,CXL_PSL9_DSNDCTL ,0x0001001000012A10ULL );/* * A response to an ASB_Notify request is returned by the
drivers/misc/cxl/sysfs.c +12 -4
@@ -353,12 +353,20 @@ static ssize_t prefault_mode_store(struct device *device,struct cxl_afu *afu =to_cxl_afu (device);enum prefault_modes mode =-1 ; -if (!strncmp (buf,"work_element_descriptor" ,23 )) - mode =CXL_PREFAULT_WED ; -if (!strncmp (buf,"all" ,3 )) - mode =CXL_PREFAULT_ALL ;if (!strncmp (buf,"none" ,4 )) mode =CXL_PREFAULT_NONE ; +else { +if (!radix_enabled ()) { + +/* only allowed when not in radix mode */ +if (!strncmp (buf,"work_element_descriptor" ,23 )) + mode =CXL_PREFAULT_WED ; +if (!strncmp (buf,"all" ,3 )) + mode =CXL_PREFAULT_ALL ; + }else { +dev_err (device,"Cannot prefault with radix enabled\n" ); + } + }if (mode ==-1 )return -EINVAL ;
drivers/mmc/host/renesas_sdhi_core.c +5 -0
@@ -28,6 +28,7 @@#include <linux/of_device.h> #include <linux/platform_device.h> #include <linux/mmc/host.h> +#include <linux/mmc/slot-gpio.h> #include <linux/mfd/tmio.h> #include <linux/sh_dma.h> #include <linux/delay.h>
@@ -534,6 +535,10 @@ int renesas_sdhi_probe(struct platform_device *pdev, host->multi_io_quirk = renesas_sdhi_multi_io_quirk; host->dma_ops = dma_ops; +/* For some SoC, we disable internal WP. GPIO may override this */ +if (mmc_can_gpio_ro (host->mmc)) + mmc_data->capabilities2 &= ~MMC_CAP2_NO_WRITE_PROTECT ; +/* SDR speeds are only available on Gen2+ */ if (mmc_data->flags &TMIO_MMC_MIN_RCAR2 ) {/* card_busy caused issues on r8a73a4 (pre-Gen2) CD-less SDHI */
drivers/mmc/host/renesas_sdhi_internal_dmac.c +1 -0
@@ -87,6 +87,7 @@ static const struct renesas_sdhi_of_data of_rcar_gen3_compatible = { TMIO_MMC_HAVE_CBSY | TMIO_MMC_MIN_RCAR2, .capabilities =MMC_CAP_SD_HIGHSPEED |MMC_CAP_SDIO_IRQ | MMC_CAP_CMD23, + .capabilities2 = MMC_CAP2_NO_WRITE_PROTECT, .bus_shift = 2, .scc_offset = 0x1000, .taps = rcar_gen3_scc_taps,
drivers/mmc/host/renesas_sdhi_sys_dmac.c +3 -0
@@ -42,6 +42,7 @@ static const struct renesas_sdhi_of_data of_rz_compatible = {static const struct renesas_sdhi_of_data of_rcar_gen1_compatible = { .tmio_flags =TMIO_MMC_HAS_IDLE_WAIT |TMIO_MMC_CLK_ACTUAL , .capabilities =MMC_CAP_SD_HIGHSPEED |MMC_CAP_SDIO_IRQ , + .capabilities2 =MMC_CAP2_NO_WRITE_PROTECT , };/* Definitions for sampling clocks */
@@ -61,6 +62,7 @@ static const struct renesas_sdhi_of_data of_rcar_gen2_compatible = { TMIO_MMC_HAVE_CBSY | TMIO_MMC_MIN_RCAR2, .capabilities =MMC_CAP_SD_HIGHSPEED |MMC_CAP_SDIO_IRQ | MMC_CAP_CMD23, + .capabilities2 = MMC_CAP2_NO_WRITE_PROTECT, .dma_buswidth = DMA_SLAVE_BUSWIDTH_4_BYTES, .dma_rx_offset = 0x2000, .scc_offset = 0x0300,
@@ -81,6 +83,7 @@ static const struct renesas_sdhi_of_data of_rcar_gen3_compatible = { TMIO_MMC_HAVE_CBSY | TMIO_MMC_MIN_RCAR2, .capabilities =MMC_CAP_SD_HIGHSPEED |MMC_CAP_SDIO_IRQ | MMC_CAP_CMD23, + .capabilities2 = MMC_CAP2_NO_WRITE_PROTECT, .bus_shift = 2, .scc_offset = 0x1000, .taps = rcar_gen3_scc_taps,
drivers/mtd/chips/cfi_cmdset_0002.c +12 -9
@@ -1880,7 +1880,7 @@ static int __xipram do_write_buffer(struct map_info *map, struct flchip *chip,if (time_after (jiffies, timeo) && !chip_ready (map, adr))break ; -if (chip_ready (map, adr)) { +if (chip_good (map, adr, datum)) {xip_enable (map, chip, adr); goto op_done; }
@@ -2515,7 +2515,7 @@ static int cfi_atmel_unlock(struct mtd_info *mtd, loff_t ofs, uint64_t len)struct ppb_lock {struct flchip *chip; -loff_t offset; +unsigned long adr;int locked; };
@@ -2533,8 +2533,9 @@ static int __maybe_unused do_ppb_xxlock(struct map_info *map,unsigned long timeo;int ret; + adr += chip->start;mutex_lock (&chip->mutex); - ret =get_chip (map, chip, adr + chip->start,FL_LOCKING ); + ret =get_chip (map, chip, adr,FL_LOCKING );if (ret) {mutex_unlock (&chip->mutex);return ret;
@@ -2552,8 +2553,8 @@ static int __maybe_unused do_ppb_xxlock(struct map_info *map,if (thunk ==DO_XXLOCK_ONEBLOCK_LOCK ) { chip->state =FL_LOCKING ; -map_write (map,CMD (0xA0 ), chip->start + adr); -map_write (map,CMD (0x00 ), chip->start + adr); +map_write (map,CMD (0xA0 ), adr); +map_write (map,CMD (0x00 ), adr); }else if (thunk ==DO_XXLOCK_ONEBLOCK_UNLOCK ) {/* * Unlocking of one specific sector is not supported, so we
@@ -2591,7 +2592,7 @@ static int __maybe_unused do_ppb_xxlock(struct map_info *map,map_write (map,CMD (0x00 ), chip->start); chip->state =FL_READY ; -put_chip (map, chip, adr + chip->start); +put_chip (map, chip, adr);mutex_unlock (&chip->mutex);return ret;
@@ -2648,9 +2649,9 @@ static int __maybe_unused cfi_ppb_unlock(struct mtd_info *mtd, loff_t ofs,* sectors shall be unlocked, so lets keep their locking * status at "unlocked" (locked=0) for the final re-locking. */ -if ((adr < ofs) || (adr >= (ofs + len))) { +if ((offset < ofs) || (offset >= (ofs + len))) { sect[sectors].chip = &cfi->chips[chipnum]; - sect[sectors].offset = offset; + sect[sectors].adr = adr; sect[sectors].locked =do_ppb_xxlock ( map, &cfi->chips[chipnum], adr,0 ,DO_XXLOCK_ONEBLOCK_GETLOCK );
@@ -2664,6 +2665,8 @@ static int __maybe_unused cfi_ppb_unlock(struct mtd_info *mtd, loff_t ofs, i++;if (adr >> cfi->chipshift) { +if (offset >= (ofs + len)) +break ; adr =0 ; chipnum++;
@@ -2694,7 +2697,7 @@ static int __maybe_unused cfi_ppb_unlock(struct mtd_info *mtd, loff_t ofs,*/ for (i =0 ; i < sectors; i++) {if (sect[i].locked) -do_ppb_xxlock (map, sect[i].chip, sect[i].offset,0 , +do_ppb_xxlock (map, sect[i].chip, sect[i].adr,0 ,DO_XXLOCK_ONEBLOCK_LOCK ); }
drivers/mtd/nand/raw/denali_dt.c +5 -1
@@ -123,7 +123,11 @@ static int denali_dt_probe(struct platform_device *pdev)if (ret)return ret; - denali->clk_x_rate =clk_get_rate (dt->clk); +/* +* Hardcode the clock rate for the backward compatibility. +* This works for both SOCFPGA and UniPhier. +*/ + denali->clk_x_rate =200000000 ; ret =denali_init (denali);if (ret)
drivers/mtd/nand/raw/mxc_nand.c +4 -1
@@ -48,7 +48,7 @@#define NFC_V1_V2_CONFIG (host->regs + 0x0a)#define NFC_V1_V2_ECC_STATUS_RESULT (host->regs + 0x0c)#define NFC_V1_V2_RSLTMAIN_AREA (host->regs + 0x0e) -#define NFC_V1_V2_RSLTSPARE_AREA (host->regs + 0x10) +#define NFC_V21_RSLTSPARE_AREA (host->regs + 0x10)#define NFC_V1_V2_WRPROT (host->regs + 0x12)#define NFC_V1_UNLOCKSTART_BLKADDR (host->regs + 0x14)#define NFC_V1_UNLOCKEND_BLKADDR (host->regs + 0x16)
@@ -1274,6 +1274,9 @@ static void preset_v2(struct mtd_info *mtd)writew (config1,NFC_V1_V2_CONFIG1 );/* preset operation */ +/* spare area size in 16-bit half-words */ +writew (mtd->oobsize /2 ,NFC_V21_RSLTSPARE_AREA ); +/* Unlock the internal RAM Buffer */ writew (0x2 ,NFC_V1_V2_CONFIG );
drivers/mtd/nand/raw/nand_base.c +10 -19
@@ -440,7 +440,7 @@ static int nand_block_bad(struct mtd_info *mtd, loff_t ofs)for (; page < page_end; page++) { res = chip->ecc.read_oob (mtd, chip, page); -if (res) +if (res <0 )return res; bad = chip->oob_poi[chip->badblockpos];
@@ -2174,7 +2174,6 @@ static int nand_set_features_op(struct nand_chip *chip, u8 feature,struct mtd_info *mtd =nand_to_mtd (chip);const u8 *params = data;int i, ret; -u8 status;if (chip->exec_op) { const struct nand_sdr_timings *sdr =
@@ -2188,26 +2187,18 @@ static int nand_set_features_op(struct nand_chip *chip, u8 feature, };struct nand_operation op =NAND_OPERATION (instrs); - ret =nand_exec_op (chip, &op); -if (ret) -return ret; - - ret =nand_status_op (chip, &status); -if (ret) -return ret; - }else { - chip->cmdfunc (mtd,NAND_CMD_SET_FEATURES , feature,-1 ); -for (i =0 ; i <ONFI_SUBFEATURE_PARAM_LEN ; ++i) - chip->write_byte (mtd, params[i]); +return nand_exec_op (chip, &op); + } - ret = chip->waitfunc (mtd, chip); -if (ret <0 ) -return ret; + chip->cmdfunc (mtd,NAND_CMD_SET_FEATURES , feature,-1 ); +for (i =0 ; i <ONFI_SUBFEATURE_PARAM_LEN ; ++i) + chip->write_byte (mtd, params[i]); - status = ret; - } + ret = chip->waitfunc (mtd, chip); +if (ret <0 ) +return ret; -if (status &NAND_STATUS_FAIL ) +if (ret &NAND_STATUS_FAIL )return -EIO ;return 0 ;
drivers/mtd/nand/raw/nand_macronix.c +36 -12
16 lines not on this page · raw message
drivers/mtd/spi-nor/intel-spi.c +67 -9
76 lines not on this page · raw message
drivers/mtd/ubi/eba.c +89 -1
90 lines not on this page · raw message
drivers/net/ethernet/ti/davinci_emac.c +13 -2
Lines of this file are not shown. View the raw message.
drivers/pinctrl/mvebu/pinctrl-armada-37xx.c +2 -1
Lines of this file are not shown. View the raw message.
drivers/pinctrl/samsung/pinctrl-exynos-arm.c +2 -2
Lines of this file are not shown. View the raw message.
drivers/s390/scsi/zfcp_erp.c +96 -27
123 lines not on this page · raw message
drivers/thermal/broadcom/bcm2835_thermal.c +2 -2
Lines of this file are not shown. View the raw message.
drivers/virt/vboxguest/vboxguest_linux.c +3 -1
Lines of this file are not shown. View the raw message.
include/dt-bindings/clock/aspeed-clock.h +1 -1
Lines of this file are not shown. View the raw message.
security/selinux/selinuxfs.c +33 -45
78 lines not on this page · raw message
sound/soc/mediatek/common/mtk-afe-platform-driver.c +2 -2
Lines of this file are not shown. View the raw message.
tools/perf/util/intel-pt-decoder/intel-pt-decoder.c +19 -4
Lines of this file are not shown. View the raw message.
tools/perf/util/intel-pt-decoder/intel-pt-decoder.h +9 -0
Lines of this file are not shown. View the raw message.
tools/perf/util/intel-pt-decoder/intel-pt-pkt-decoder.c +1 -1
Lines of this file are not shown. View the raw message.
tools/testing/selftests/ftrace/test.d/functions +18 -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.