Linux 5.7.17
Greg Kroah-Hartman
maintainerI'm announcing the release of the 5.7.17 kernel.
All users of the 5.7 kernel series must upgrade.
The updated 5.7.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-5.7.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Documentation/admin-guide/hw-vuln/multihit.rst | 4 Documentation/devicetree/bindings/iio/multiplexer/io-channel-mux.txt | 2 Makefile | 2 arch/arm64/kernel/perf_event.c | 13 arch/mips/Kconfig | 1 arch/mips/boot/dts/ingenic/qi_lb60.dts | 2 arch/mips/kernel/topology.c | 2 arch/openrisc/kernel/stacktrace.c | 18 + arch/powerpc/include/asm/percpu.h | 4 arch/powerpc/mm/fault.c | 7 arch/powerpc/mm/ptdump/hashpagetable.c | 2 arch/powerpc/platforms/pseries/hotplug-memory.c | 2 arch/s390/Kconfig | 1 arch/s390/lib/test_unwind.c | 1 arch/sh/boards/mach-landisk/setup.c | 3 arch/x86/events/rapl.c | 2 arch/x86/kernel/apic/vector.c | 4 arch/x86/kernel/cpu/bugs.c | 8 arch/x86/kernel/tsc_msr.c | 9 arch/xtensa/include/asm/thread_info.h | 4 arch/xtensa/kernel/asm-offsets.c | 3 arch/xtensa/kernel/entry.S | 11 arch/xtensa/kernel/perf_event.c | 2 crypto/af_alg.c | 11 crypto/algif_aead.c | 10 crypto/algif_skcipher.c | 11 drivers/base/dd.c | 4 drivers/clk/actions/owl-s500.c | 2 drivers/clk/bcm/clk-bcm2835.c | 25 + drivers/clk/qcom/clk-alpha-pll.c | 2 drivers/clk/qcom/gcc-sdm660.c | 3 drivers/clk/qcom/gcc-sm8150.c | 8 drivers/clk/sirf/clk-atlas6.c | 2 drivers/crypto/caam/caamalg.c | 29 -- drivers/crypto/caam/compat.h | 1 drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 8 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 23 + drivers/gpu/drm/amd/display/dc/clk_mgr/dcn10/rv1_clk_mgr.c | 69 ++++ drivers/gpu/drm/amd/powerplay/smumgr/ci_smumgr.c | 5 drivers/gpu/drm/drm_dp_mst_topology.c | 35 +- drivers/gpu/drm/drm_panel_orientation_quirks.c | 6 drivers/gpu/drm/i915/gt/intel_gt.c | 5 drivers/gpu/drm/imx/imx-ldb.c | 7 drivers/gpu/drm/ingenic/ingenic-drm.c | 2 drivers/gpu/drm/omapdrm/dss/dispc.c | 1 drivers/gpu/drm/omapdrm/dss/dsi.c | 1 drivers/gpu/drm/omapdrm/dss/dss.c | 1 drivers/gpu/drm/omapdrm/dss/venc.c | 1 drivers/gpu/drm/panfrost/panfrost_gem.c | 2 drivers/gpu/drm/panfrost/panfrost_mmu.c | 2 drivers/gpu/drm/tidss/tidss_kms.c | 2 drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 8 drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c | 5 drivers/gpu/ipu-v3/ipu-image-convert.c | 145 ++++++---- drivers/i2c/busses/i2c-bcm-iproc.c | 13 drivers/i2c/busses/i2c-rcar.c | 15 - drivers/iio/dac/ad5592r-base.c | 4 drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h | 3 drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c | 23 + drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c | 2 drivers/infiniband/core/counters.c | 4 drivers/infiniband/core/uverbs_cmd.c | 4 drivers/infiniband/hw/cxgb4/mem.c | 1 drivers/infiniband/hw/mlx4/mr.c | 1 drivers/infiniband/ulp/ipoib/ipoib.h | 2 drivers/infiniband/ulp/ipoib/ipoib_ib.c | 67 ++-- drivers/infiniband/ulp/ipoib/ipoib_main.c | 2 drivers/input/mouse/sentelic.c | 2 drivers/iommu/intel-iommu.c | 2 drivers/iommu/omap-iommu-debug.c | 3 drivers/irqchip/irq-gic-v3-its.c | 15 - drivers/irqchip/irq-loongson-liointc.c | 10 drivers/md/bcache/bcache.h | 2 drivers/md/bcache/bset.c | 2 drivers/md/bcache/btree.c | 2 drivers/md/bcache/journal.c | 4 drivers/md/bcache/super.c | 2 drivers/md/bcache/writeback.c | 14 drivers/md/bcache/writeback.h | 19 + drivers/md/dm-rq.c | 3 drivers/md/dm.c | 3 drivers/md/md-cluster.c | 1 drivers/md/raid5.c | 3 drivers/media/platform/qcom/venus/pm_helpers.c | 4 drivers/media/platform/rockchip/rga/rga-hw.c | 29 +- drivers/media/platform/rockchip/rga/rga-hw.h | 5 drivers/media/platform/vsp1/vsp1_dl.c | 2 drivers/mfd/arizona-core.c | 18 + drivers/mfd/dln2.c | 4 drivers/mmc/host/renesas_sdhi_internal_dmac.c | 18 - drivers/mtd/nand/raw/brcmnand/brcmnand.c | 26 + drivers/mtd/nand/raw/fsl_upm.c | 1 drivers/net/ethernet/marvell/octeontx2/af/common.h | 2 drivers/net/ethernet/qualcomm/emac/emac.c | 17 - drivers/net/ethernet/stmicro/stmmac/dwmac-ipq806x.c | 1 drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c | 3 drivers/net/wireless/realtek/rtw88/pci.c | 9 drivers/nvdimm/security.c | 13 drivers/nvme/host/core.c | 15 + drivers/nvme/host/fabrics.c | 2 drivers/nvme/host/fabrics.h | 3 drivers/nvme/host/fc.c | 1 drivers/nvme/host/multipath.c | 18 + drivers/nvme/host/nvme.h | 1 drivers/nvme/host/rdma.c | 10 drivers/nvme/host/tcp.c | 15 - drivers/pci/ats.c | 15 + drivers/pci/bus.c | 6 drivers/pci/controller/dwc/pcie-qcom.c | 41 ++ drivers/pci/hotplug/acpiphp_glue.c | 14 drivers/pci/quirks.c | 5 drivers/pinctrl/pinctrl-ingenic.c | 9 drivers/platform/chrome/cros_ec_ishtp.c | 4 drivers/pwm/pwm-bcm-iproc.c | 9 drivers/remoteproc/qcom_q6v5.c | 2 drivers/remoteproc/qcom_q6v5_mss.c | 11 drivers/rtc/rtc-cpcap.c | 2 drivers/rtc/rtc-pl031.c | 1 drivers/scsi/lpfc/lpfc_nvmet.c | 2 drivers/staging/media/rkisp1/rkisp1-isp.c | 25 - drivers/usb/serial/ftdi_sio.c | 37 +- drivers/vdpa/vdpa_sim/vdpa_sim.c | 3 drivers/watchdog/f71808e_wdt.c | 13 drivers/watchdog/rti_wdt.c | 2 drivers/watchdog/watchdog_dev.c | 18 - fs/btrfs/ctree.h | 4 fs/btrfs/disk-io.c | 13 fs/btrfs/extent-io-tree.h | 2 fs/btrfs/extent-tree.c | 23 + fs/btrfs/extent_io.c | 18 - fs/btrfs/free-space-cache.c | 4 fs/btrfs/inode.c | 20 - fs/btrfs/ioctl.c | 46 ++- fs/btrfs/ref-verify.c | 2 fs/btrfs/relocation.c | 12 fs/btrfs/scrub.c | 2 fs/btrfs/super.c | 51 ++- fs/btrfs/sysfs.c | 3 fs/btrfs/transaction.c | 5 fs/btrfs/tree-log.c | 43 -- fs/btrfs/volumes.c | 48 ++- fs/ceph/dir.c | 4 fs/ceph/mds_client.c | 6 fs/cifs/smb2misc.c | 73 +++-- fs/cifs/smb2pdu.c | 2 fs/ext2/ialloc.c | 3 fs/f2fs/compress.c | 2 fs/f2fs/data.c | 4 fs/gfs2/bmap.c | 69 ++-- fs/minix/inode.c | 12 fs/minix/itree_v1.c | 12 fs/minix/itree_v2.c | 13 fs/minix/minix.h | 1 fs/nfs/file.c | 17 - fs/nfs/flexfilelayout/flexfilelayout.c | 50 ++- fs/nfs/nfs4file.c | 5 fs/nfs/nfs4proc.c | 2 fs/nfs/nfs4xdr.c | 6 fs/nfs/pnfs.c | 4 fs/nfs/pnfs.h | 2 fs/ocfs2/ocfs2.h | 4 fs/ocfs2/suballoc.c | 4 fs/ocfs2/super.c | 4 fs/ubifs/journal.c | 10 fs/ufs/super.c | 2 include/crypto/if_alg.h | 4 include/linux/fs.h | 10 include/linux/hugetlb.h | 8 include/linux/intel-iommu.h | 4 include/linux/irq.h | 13 include/linux/pci-ats.h | 4 include/net/sock.h | 4 include/uapi/linux/btrfs.h | 14 init/main.c | 14 kernel/irq/manage.c | 6 kernel/irq/pm.c | 8 kernel/kprobes.c | 7 kernel/module.c | 22 + kernel/pid.c | 7 kernel/sched/core.c | 81 +++++ kernel/sched/cpufreq_schedutil.c | 2 kernel/sched/sched.h | 47 +++ kernel/trace/ftrace.c | 15 - kernel/trace/trace_events.c | 4 kernel/trace/trace_hwlat.c | 5 lib/devres.c | 11 lib/test_kmod.c | 2 lib/test_lockup.c | 4 mm/cma.c | 23 - mm/hugetlb.c | 39 +- mm/khugepaged.c | 70 ++-- mm/memory_hotplug.c | 5 mm/page_counter.c | 6 mm/rmap.c | 2 mm/shuffle.c | 18 - net/compat.c | 1 net/core/sock.c | 21 + net/mac80211/sta_info.c | 2 scripts/recordmcount.c | 2 security/integrity/ima/ima_policy.c | 15 - sound/pci/echoaudio/echoaudio.c | 2 sound/soc/tegra/tegra_alc5632.c | 7 sound/soc/tegra/tegra_asoc_utils.c | 113 +++---- sound/soc/tegra/tegra_asoc_utils.h | 1 sound/soc/tegra/tegra_max98090.c | 22 - sound/soc/tegra/tegra_rt5640.c | 22 - sound/soc/tegra/tegra_rt5677.c | 7 sound/soc/tegra/tegra_sgtl5000.c | 7 sound/soc/tegra/tegra_wm8753.c | 22 - sound/soc/tegra/tegra_wm8903.c | 22 - sound/soc/tegra/tegra_wm9712.c | 8 sound/soc/tegra/trimslice.c | 18 - tools/build/Makefile.feature | 2 tools/build/feature/Makefile | 2 tools/perf/bench/mem-functions.c | 21 - tools/perf/util/intel-pt-decoder/intel-pt-decoder.c | 29 -- tools/perf/util/probe-finder.c | 5 tools/testing/selftests/bpf/Makefile | 5 tools/testing/selftests/bpf/test_progs.c | 33 ++ tools/testing/selftests/bpf/test_progs.h | 2 tools/testing/selftests/powerpc/ptrace/ptrace-pkey.c | 55 +-- tools/testing/selftests/seccomp/seccomp_bpf.c | 5 222 files changed, 1798 insertions(+), 926 deletions(-)
Adrian Hunter (2):
perf intel-pt: Fix FUP packet state perf intel-pt: Fix duplicate branch after CBR
Ahmad Fatoum (3):
watchdog: f71808e_wdt: indicate WDIOF_CARDRESET support in watchdog_info.options
watchdog: f71808e_wdt: remove use of wrong watchdog_info option
watchdog: f71808e_wdt: clear watchdog timeout occurred flag
Alex Deucher (1):
drm/amdgpu: fix ordering of psp suspend
Alexandru Ardelean (1):
iio: dac: ad5592r: fix unbalanced mutex unlocks in ad5592r_read_raw()
Anand Jain (1):
btrfs: don't traverse into the seed devices in show_devname
Andrii Nakryiko (1):
selftests/bpf: Prevent runqslower from racing on building bpftool
Andy Shevchenko (1):
mfd: dln2: Run event handler loop under spinlock
Aneesh Kumar K.V (3):
selftests/powerpc: ptrace-pkey: Rename variables to make it easier to follow code selftests/powerpc: ptrace-pkey: Update the test to mark an invalid pkey correctly selftests/powerpc: ptrace-pkey: Don't update expected UAMOR value
Ansuel Smith (2):
PCI: qcom: Define some PARF params needed for ipq8064 SoC
PCI: qcom: Add support for tx term offset for rev 2.1.0
Anton Blanchard (1):
pseries: Fix 64 bit logical memory block panic
Ashok Raj (1):
PCI/ATS: Add pci_pri_supported() to check device or associated PF
Bob Peterson (1):
gfs2: Never call gfs2_block_zero_range with an open transaction
Boris Brezillon (1):
mtd: rawnand: fsl_upm: Remove unused mtd var
ChangSyun Peng (1):
md/raid5: Fix Force reconstruct-write io stuck in degraded raid5
Chao Yu (2):
f2fs: compress: fix to avoid memory leak on cc->cpages
f2fs: compress: fix to update isize when overwriting compressed file
Charles Keepax (1):
mfd: arizona: Ensure 32k clock is put on driver unbind and error
Chengming Zhou (1):
ftrace: Setup correct FTRACE_FL_REGS flags for module
Chris Wilson (1):
drm/i915/gt: Force the GT reset on shutdown
Christian Eggers (1):
dt-bindings: iio: io-channel-mux: Fix compatible string in example code
Christophe Leroy (2):
powerpc/ptdump: Fix build failure in hashpagetable.c
recordmcount: Fix build failure on non arm64
Colin Ian King (3):
iommu/omap: Check for failure of a call to omap_iommu_dump_ctx
Input: sentelic - fix error return when fsp_reg_write fails fs/ufs: avoid potential u32 multiplication overflow
Coly Li (2):
bcache: allocate meta data pages as compound pages
bcache: fix overflow in offset_to_stripe()
Cristian Ciocaltea (1):
clk: actions: Fix h_clk for Actions S500 SoC
Dafna Hirschfeld (1):
media: staging: rkisp1: remove macro RKISP1_DIR_SINK_SRC
Dan Carpenter (4):
md-cluster: Fix potential error pointer dereference in resize_bitmaps()
vdpa: Fix pointer math bug in vdpasim_get_config() drm/vmwgfx: Use correct vmw_legacy_display_unit pointer drm/vmwgfx: Fix two list_for_each loop exit tests
Daniel Díaz (1):
tools build feature: Quote CC and CXX for their arguments
David Hildenbrand (1):
mm/shuffle: don't move pages between zones and don't read garbage memmaps
David Sterba (3):
btrfs: allow use of global block reserve for balance item deletion
btrfs: add missing check for nocow and compression inode flags
btrfs: fix messages after changing compression level by remount
Denis Efremov (1):
drm/panfrost: Use kvfree() to free bo->sgts
Dhananjay Phadke (1):
i2c: iproc: fix race between client unreg and isr
Dilip Kota (1):
x86/tsr: Fix tsc frequency enumeration bug on Lightning Mountain SoC
Dinghao Liu (1):
ALSA: echoaudio: Fix potential Oops in snd_echo_resume()
Eric Biggers (3):
fs/minix: set s_maxbytes correctly
fs/minix: fix block limit check for V1 filesystems fs/minix: remove expected error message in block_to_path()
Eric Dumazet (1):
octeontx2-af: change (struct qmem)->entry_sz from u8 to u16
Eugeniu Rosca (1):
media: vsp1: dl: Fix NULL pointer dereference on unbind
Ewan D. Milne (1):
scsi: lpfc: nvmet: Avoid hang / use-after-free again when destroying targetport
Filipe Manana (6):
btrfs: only commit the delayed inode when doing a full fsync
btrfs: stop incremening log_batch for the log root tree when syncing log
btrfs: only commit delayed items at fsync if we are logging a directory
btrfs: remove no longer needed use of log_writers for the log root tree
btrfs: fix race between page release and a fast fsync
btrfs: fix memory leaks after failure to lookup checksums during inode logging
Geert Uytterhoeven (1):
sh: landisk: Add missing initialization of sh_io_port_base
Greg Kroah-Hartman (1):
Linux 5.7.17
Guenter Roeck (1):
genirq/PM: Always unlock IRQ descriptor in rearm_wake_irq()
Herbert Xu (3):
crypto: algif_aead - Only wake up when ctx->more is zero
crypto: af_alg - Fix regression on empty requests
crypto: caam - Remove broken arc4 support
Huacai Chen (2):
irqchip/loongson-liointc: Fix misuse of gc->mask_cache
MIPS: CPU#0 is not hotpluggable
Hugh Dickins (3):
khugepaged: collapse_pte_mapped_thp() flush the right range
khugepaged: collapse_pte_mapped_thp() protect the pmd lock
khugepaged: retract_page_tables() remember to test exit
Imre Deak (1):
drm/dp_mst: Fix the DDC I2C device registration of an MST port
Jane Chu (2):
libnvdimm/security: fix a typo
libnvdimm/security: ensure sysfs poll thread woke up and fetch updated attr
Jason Gunthorpe (1):
RDMA/ipoib: Fix ABBA deadlock with ipoib_reap_ah()
Jeff Layton (2):
ceph: set sec_context xattr on symlink creation
ceph: handle zero-length feature mask in session messages
Jeffrey Mitchell (1):
nfs: Fix getxattr kernel panic and memory overflow
Jesper Dangaard Brouer (3):
selftests/bpf: Test_progs indicate to shell on non-actions selftests/bpf: test_progs use another shell exit on non-actions selftests/bpf: test_progs avoid minus shell exit codes
Jia He (1):
mm/memory_hotplug: fix unpaired mem_hotplug_begin/done
Johan Hovold (2):
USB: serial: ftdi_sio: make process-packet buffer unsigned
USB: serial: ftdi_sio: clean up receive processing
Johannes Berg (1):
mac80211: fix misplaced while instead of if
Johannes Thumshirn (2):
btrfs: pass checksum type via BTRFS_IOC_FS_INFO ioctl
dm: don't call report zones for more than the user requested
Jonathan Marek (2):
clk: qcom: gcc: fix sm8150 GPU and NPU clocks
clk: qcom: clk-alpha-pll: remove unused/incorrect PLL_CAL_VAL
Jonathan McDowell (2):
net: ethernet: stmmac: Disable hardware multicast filter
net: stmmac: dwmac1000: provide multicast filter fallback
Josef Bacik (8):
btrfs: open device without device_list_mutex
btrfs: move the chunk_mutex in btrfs_read_chunk_tree
btrfs: return EROFS for BTRFS_FS_STATE_ERROR cases
btrfs: sysfs: use NOFS for device creation
btrfs: don't WARN if we abort a transaction with EROFS
btrfs: don't show full path of bind mounts in subvol=
btrfs: only search for left_info if there is no right_info in try_merge_free_space
btrfs: make sure SB_I_VERSION doesn't get unset by remount
Junxiao Bi (1):
ocfs2: change slot number type s16 to u16
Kai-Heng Feng (1):
PCI: Mark AMD Navi10 GPU rev 0x00 ATS as broken
Kamal Dasu (1):
mtd: rawnand: brcmnand: ECC error handling on EDU transfers
Kamal Heib (1):
RDMA/ipoib: Return void from ipoib_ib_dev_stop()
Kees Cook (4):
pidfd: Add missing sock updates for pidfd_getfd() net/compat: Add missing sock updates for SCM_RIGHTS selftests/seccomp: Set NNP for TSYNC ESRCH flag test
module: Correctly truncate sysfs sections output
Kevin Hao (1):
tracing/hwlat: Honor the tracing_cpumask
Konrad Dybcio (1):
clk: qcom: gcc-sdm660: Fix up gcc_mss_mnoc_bimc_axi_clk
Krzysztof Kozlowski (1):
s390/Kconfig: add missing ZCRYPT dependency to VFIO_AP
Krzysztof Sobota (1):
watchdog: initialize device before misc_register
Liu Yi L (1):
iommu/vt-d: Enforce PASID devTLB field mask
Liu Ying (1):
drm/imx: imx-ldb: Disable both channels for split mode in enc->disable()
Lorenzo Bianconi (1):
iio: imu: st_lsm6dsx: reset hw ts after resume
Lukas Wunner (1):
driver core: Avoid binding drivers to dead devices
Mansur Alisha Shaik (1):
media: venus: fix multiple encoder crash
Marius Iacob (1):
drm: Added orientation quirk for ASUS tablet model T103HAF
Mark Zhang (2):
RDMA/counter: Only bind user QPs in auto mode
RDMA/counter: Allow manually bind QPs with different pids to same counter
Martin KaFai Lau (1):
bpf: selftests: Restore netns after each test
Masami Hiramatsu (3):
bootconfig: Fix to find the initargs correctly
perf probe: Fix wrong variable warning when the probe point is not found perf probe: Fix memory leakage when the probe point is not found
Max Filippov (2):
xtensa: add missing exclusive access state management
xtensa: fix xtensa_pmu_setup prototype
Michael Ellerman (2):
powerpc: Allow 4224 bytes of stack expansion for the signal frame
powerpc: Fix circular dependency between percpu.h and mmu.h
Michael S. Tsirkin (1):
vdpa_sim: init iommu lock
Michal Koutný (1):
mm/page_counter.c: fix protection usage propagation
Mike Kravetz (2):
hugetlbfs: remove call to huge_pte_alloc without i_mmap_rwsem
cma: don't quit at first error when activating reserved areas
Mike Rapoport (1):
MIPS: SGI-IP27: always enable NUMA in Kconfig
Mikulas Patocka (1):
ext2: fix missing percpu_counter_inc
Ming Lei (1):
dm rq: don't call blk_mq_queue_stopped() in dm_stop_queue()
Muchun Song (1):
kprobes: Fix NULL pointer dereference at kprobe_ftrace_handler
Nicolas Saenz Julienne (1):
clk: bcm2835: Do not use prediv with bcm2711's PLLs
Ondrej Mosnacek (1):
crypto: algif_aead - fix uninitialized ctx->init
Paul Aurich (1):
cifs: Fix leak when handling lease break for cached root fid
Paul Cercueil (4):
pinctrl: ingenic: Enhance support for IRQ_TYPE_EDGE_BOTH
pinctrl: ingenic: Properly detect GPIO direction when configured for IRQ
MIPS: qi_lb60: Fix routing to audio amplifier
drm/ingenic: Fix incorrect assumption about plane->index
Paul Kocialkowski (2):
media: rockchip: rga: Introduce color fmt macros and refactor CSC mode logic
media: rockchip: rga: Only set output CSC mode for RGB input
Pavel Machek (1):
btrfs: fix return value mixup in btrfs_get_extent
Pawan Gupta (1):
x86/bugs/multihit: Fix mitigation reporting when VMX is not in use
Peter Xu (1):
mm/hugetlb: fix calculation of adjust_range_if_pmd_sharing_possible
Qais Yousef (2):
sched/uclamp: Protect uclamp fast path code with static key sched/uclamp: Fix a deadlock when enabling uclamp static key
Qiushi Wu (1):
platform/chrome: cros_ec_ishtp: Fix a double-unlock issue
Qu Wenruo (6):
btrfs: free anon block device right after subvolume deletion
btrfs: don't allocate anonymous block device for user invisible roots
btrfs: relocation: review the call sites which can be interrupted by signal
btrfs: avoid possible signal interruption of btrfs_drop_snapshot() on relocation tree
btrfs: inode: fix NULL pointer dereference if inode doesn't need compression
btrfs: trim: fix underflow in trim length to prevent access beyond device boundary
Rafael J. Wysocki (1):
PCI: hotplug: ACPI: Fix context refcounting in acpiphp_grab_context()
Rajat Jain (1):
PCI: Add device even if driver attach failed
Rayagonda Kokatanur (1):
pwm: bcm-iproc: handle clk_get_rate() return
Sagi Grimberg (1):
nvme: fix deadlock in disconnect during scan_work and/or ana_work
Sandeep Raghuraman (1):
drm/amdgpu: Fix bug where DPM is not enabled after hibernate and resume
Scott Mayhew (2):
nfs: ensure correct writeback errors are returned on close()
nfs: nfs_file_write() should check for writeback errors
Sebastian Reichel (1):
rtc: cpcap: fix range
Shaokun Zhang (1):
arm64: perf: Correct the event index in sysfs
Sibi Sankar (3):
remoteproc: qcom: q6v5: Update running state before requesting stop
remoteproc: qcom_q6v5_mss: Validate MBA firmware size before load
remoteproc: qcom_q6v5_mss: Validate modem blob firmware size before load
Sowjanya Komatineni (3):
ASoC: tegra: Use device managed resource APIs to get the clock
ASoC: tegra: Add audio mclk parent configuration
ASoC: tegra: Enable audio mclk during tegra_asoc_utils_init()
Stafford Horne (1):
openrisc: Fix oops caused when dumping stack
Steve French (1):
smb3: warn on confusing error scenario with sec=krb5
Steve Longerbeam (2):
gpu: ipu-v3: image-convert: Combine rotate/no-rotate irq handlers
gpu: ipu-v3: image-convert: Wait for all EOFs before completing a tile
Steven Rostedt (VMware) (1):
tracing: Use trace_sched_process_free() instead of exit() for pid tracing
Stylon Wang (1):
drm/amd/display: Fix dmesg warning from setting abm level
Sudeep Holla (1):
rtc: pl031: fix set_alarm by adding back call to alarm_irq_enable
Tero Kristo (1):
watchdog: rti-wdt: balance pm runtime enable calls
Thomas Gleixner (1):
genirq/affinity: Make affinity setting if activated opt-in
Thomas Hebb (1):
tools build feature: Use CC and CXX from parent
Tiezhu Yang (2):
lib/test_lockup.c: fix return value of test_lockup_init()
test_kmod: avoid potential double free in trigger_config_run_type()
Tom Rix (1):
btrfs: ref-verify: fix memory leak in add_block_entry
Tomi Valkeinen (2):
drm/omap: force runtime PM suspend on system suspend drm/tidss: fix modeset init for DPI panels
Trond Myklebust (1):
NFS: Fix flexfiles read failover
Tyler Hicks (1):
ima: Fail rule parsing when appraise_flag=blacklist is unsupportable
Vincent Whitchurch (1):
perf bench mem: Always memset source before memcpy
Vladimir Oltean (1):
devres: keep both device name and resource name in pretty name
Wang Hai (2):
s390/test_unwind: fix possible memleak in test_unwind()
net: qcom/emac: add missed clk_disable_unprepare in error path of emac_clks_phase1_init
Wolfram Sang (2):
i2c: rcar: slave: only send STOP event when we have been addressed
i2c: rcar: avoid race when unregistering slave
Xin Xiong (1):
drm: fix drm_dp_mst_port refcount leaks in drm_dp_mst_allocate_vcpi
Xu Wang (1):
clk: clk-atlas6: fix return value check in atlas6_clk_init()
Yan-Hsuan Chuang (1):
rtw88: pci: disable aspm for platform inter-op with module parameter
Yishai Hadas (1):
IB/uverbs: Set IOVA on IB MR in uverbs layer
Yoshihiro Shimoda (1):
mmc: renesas_sdhi_internal_dmac: clean up the code for dma complete
Zenghui Yu (1):
irqchip/gic-v4.1: Ensure accessing the correct RD when writing INVALLR
Zhang Rui (1):
perf/x86/rapl: Fix missing psys sysfs attributes
Zhihao Cheng (1):
ubifs: Fix wrong orphan node deletion in ubifs_jnl_update|rename
hersen wu (1):
drm/amd/display: dchubbub p-state warning during surface planes switch
Greg Kroah-Hartman
maintainerDocumentation/admin-guide/hw-vuln/multihit.rst +4 -0
@@ -80,6 +80,10 @@ The possible values in this file are: - The processor is not vulnerable. * - KVM: Mitigation: Split huge pages - Software changes mitigate this issue. + * - KVM: Mitigation: VMX unsupported + - KVM is not vulnerable because Virtual Machine Extensions (VMX) is not supported. + * - KVM: Mitigation: VMX disabled + - KVM is not vulnerable because Virtual Machine Extensions (VMX) is disabled. * - KVM: Vulnerable - The processor is vulnerable, but no mitigation enabled
Documentation/devicetree/bindings/iio/multiplexer/io-channel-mux.txt +1 -1
@@ -21,7 +21,7 @@ controller state. The mux controller state is described in Example: mux: mux-controller { - compatible = "mux-gpio"; + compatible = "gpio-mux"; #mux-control-cells = <0>; mux-gpios = <&pioA 0 GPIO_ACTIVE_HIGH>,
Makefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 5 PATCHLEVEL = 7 -SUBLEVEL = 16 +SUBLEVEL = 17 EXTRAVERSION = NAME = Kleptomaniac Octopus
arch/arm64/kernel/perf_event.c +8 -5
@@ -155,7 +155,7 @@ armv8pmu_events_sysfs_show(struct device *dev, pmu_attr = container_of(attr, struct perf_pmu_events_attr, attr); -return sprintf (page,"event=0x%03llx\n" , pmu_attr->id); +return sprintf (page,"event=0x%04llx\n" , pmu_attr->id); }#define ARMV8_EVENT_ATTR (name, config) \
@@ -244,10 +244,13 @@ armv8pmu_event_attr_is_visible(struct kobject *kobj, test_bit(pmu_attr->id, cpu_pmu->pmceid_bitmap))return attr->mode; - pmu_attr->id -=ARMV8_PMUV3_EXT_COMMON_EVENT_BASE ; -if (pmu_attr->id <ARMV8_PMUV3_MAX_COMMON_EVENTS && -test_bit (pmu_attr->id, cpu_pmu->pmceid_ext_bitmap)) -return attr->mode; +if (pmu_attr->id >=ARMV8_PMUV3_EXT_COMMON_EVENT_BASE ) { +u64 id = pmu_attr->id -ARMV8_PMUV3_EXT_COMMON_EVENT_BASE ; + +if (id <ARMV8_PMUV3_MAX_COMMON_EVENTS && +test_bit (id, cpu_pmu->pmceid_ext_bitmap)) +return attr->mode; + }return 0 ; }
arch/mips/Kconfig +1 -0
@@ -722,6 +722,7 @@ config SGI_IP27 select SYS_SUPPORTS_NUMA select SYS_SUPPORTS_SMP select MIPS_L1_CACHE_SHIFT_7 + select NUMA help This are the SGI Origin 200, Origin 2000 and Onyx 2 Graphics workstations. To compile a Linux kernel that runs on these, say Y
arch/mips/boot/dts/ingenic/qi_lb60.dts +1 -1
@@ -69,7 +69,7 @@ sound { "Speaker", "OUTL", "Speaker", "OUTR", "INL", "LOUT", - "INL", "ROUT"; + "INR", "ROUT"; simple-audio-card,aux-devs = <&>;
arch/mips/kernel/topology.c +1 -1
@@ -20,7 +20,7 @@ static int __init topology_init(void)for_each_present_cpu (i) {struct cpu *c = &per_cpu (cpu_devices, i); - c->hotpluggable =1 ; + c->hotpluggable = !!i; ret =register_cpu (c, i);if (ret) printk(KERN_WARNING "topology_init: register_cpu %d "
arch/openrisc/kernel/stacktrace.c +16 -2
@@ -13,6 +13,7 @@#include <linux/export.h> #include <linux/sched.h> #include <linux/sched/debug.h> +#include <linux/sched/task_stack.h> #include <linux/stacktrace.h> #include <asm/processor.h>
@@ -68,12 +69,25 @@ void save_stack_trace_tsk(struct task_struct *tsk, struct stack_trace *trace) {unsigned long *sp =NULL ; +if (!try_get_task_stack (tsk)) +return ; +if (tsk == current) sp = (unsigned long *) &sp; -else - sp = (unsigned long *)KSTK_ESP (tsk); +else { +unsigned long ksp; + +/* Locate stack from kernel context */ + ksp =task_thread_info (tsk)->ksp; + ksp +=STACK_FRAME_OVERHEAD ;/* redzone */ + ksp +=sizeof (struct pt_regs ); + + sp = (unsigned long *) ksp; + }unwind_stack (trace, sp, save_stack_address_nosched); + +put_task_stack (tsk); }EXPORT_SYMBOL_GPL (save_stack_trace_tsk);
arch/powerpc/include/asm/percpu.h +2 -2
@@ -10,8 +10,6 @@#ifdef CONFIG_SMP -#include <asm/paca.h> -#define __my_cpu_offset local_paca->data_offset#endif /* CONFIG_SMP */
@@ -19,4 +17,6 @@#include <asm-generic/percpu.h> +#include <asm/paca.h> +#endif /* _ASM_POWERPC_PERCPU_H_ */
arch/powerpc/mm/fault.c +5 -2
@@ -241,6 +241,9 @@ static bool bad_kernel_fault(struct pt_regs *regs, unsigned long error_code,return false; } +// This comes from 64-bit struct rt_sigframe + __SIGNAL_FRAMESIZE +#define SIGFRAME_MAX_SIZE (4096 + 128) +static bool bad_stack_expansion (struct pt_regs *regs,unsigned long address,struct vm_area_struct *vma,unsigned int flags,bool *must_retry)
@@ -248,7 +251,7 @@ static bool bad_stack_expansion(struct pt_regs *regs, unsigned long address,/* * N.B. The POWER/Open ABI allows programs to access up to * 288 bytes below the stack pointer. -* The kernel signal delivery code writes up to about 1.5kB +* The kernel signal delivery code writes a bit over 4KB * below the stack pointer (r1) before decrementing it. * The exec code can write slightly over 640kB to the stack * before setting the user r1. Thus we allow the stack to
@@ -273,7 +276,7 @@ static bool bad_stack_expansion(struct pt_regs *regs, unsigned long address,* between the last mapped region and the stack will * expand the stack rather than segfaulting. */ -if (address +2048 >= uregs->gpr[1 ]) +if (address +SIGFRAME_MAX_SIZE >= uregs->gpr[1 ])return false; if ((flags & FAULT_FLAG_WRITE) && (flags & FAULT_FLAG_USER) &&
arch/powerpc/mm/ptdump/hashpagetable.c +1 -1
@@ -259,7 +259,7 @@ static int pseries_find(unsigned long ea, int psize, bool primary, u64 *v, u64 *for (i =0 ; i <HPTES_PER_GROUP ; i +=4 , hpte_group +=4 ) { lpar_rc =plpar_pte_read_4 (0 , hpte_group, (void *)ptes); -if (lpar_rc !=H_SUCCESS ) +if (lpar_rc)continue ;for (j =0 ; j <4 ; j++) { if (HPTE_V_COMPARE(ptes[j].v, want_v) &&
arch/powerpc/platforms/pseries/hotplug-memory.c +1 -1
@@ -27,7 +27,7 @@ static bool rtas_hp_event;unsigned long pseries_memory_block_size (void ) {struct device_node *np; -unsigned int memblock_size =MIN_MEMORY_BLOCK_SIZE ; +u64 memblock_size =MIN_MEMORY_BLOCK_SIZE ;struct resource r; np =of_find_node_by_path ("/ibm,dynamic-reconfiguration-memory" );
arch/s390/Kconfig +1 -0
@@ -769,6 +769,7 @@ config VFIO_AP def_tristate n prompt "VFIO support for AP devices" depends on S390_AP_IOMMU && VFIO_MDEV_DEVICE && KVM + depends on ZCRYPT help This driver grants access to Adjunct Processor (AP) devices via the VFIO mediated device interface.
arch/s390/lib/test_unwind.c +1 -0
@@ -63,6 +63,7 @@ static noinline int test_unwind(struct task_struct *task, struct pt_regs *regs,break ;if (state.reliable && !addr) {pr_err ("unwind state reliable but addr is 0\n" ); +kfree (bt);return -EINVAL ; }sprint_symbol (sym, addr);
arch/sh/boards/mach-landisk/setup.c +3 -0
@@ -82,6 +82,9 @@ device_initcall(landisk_devices_setup);static void __init landisk_setup (char **cmdline_p) { +/* I/O port identity mapping */ +__set_io_port_base (0 ); +/* LED ON */ __raw_writeb (__raw_readb (PA_LED ) |0x03 ,PA_LED );
arch/x86/events/rapl.c +1 -1
@@ -642,7 +642,7 @@ static const struct attribute_group *rapl_attr_update[] = { &rapl_events_pkg_group, &rapl_events_ram_group, &rapl_events_gpu_group, - &rapl_events_gpu_group, + &rapl_events_psys_group, NULL, };
arch/x86/kernel/apic/vector.c +4 -0
@@ -560,6 +560,10 @@ static int x86_vector_alloc_irqs(struct irq_domain *domain, unsigned int virq,* as that can corrupt the affinity move state. */ irqd_set_handle_enforce_irqctx (irqd); + +/* Don't invoke affinity setter on deactivated interrupts */ +irqd_set_affinity_on_activate (irqd); +/* * Legacy vectors are already assigned when the IOAPIC * takes them over. They stay on the same vector. This is
arch/x86/kernel/cpu/bugs.c +7 -1
@@ -31,6 +31,7 @@#include <asm/intel-family.h> #include <asm/e820/api.h> #include <asm/hypervisor.h> +#include <asm/tlbflush.h> #include "cpu.h"
@@ -1556,7 +1557,12 @@ static ssize_t l1tf_show_state(char *buf)static ssize_t itlb_multihit_show_state (char *buf) { -if (itlb_multihit_kvm_mitigation) +if (!boot_cpu_has (X86_FEATURE_MSR_IA32_FEAT_CTL ) || + !boot_cpu_has (X86_FEATURE_VMX )) +return sprintf (buf,"KVM: Mitigation: VMX unsupported\n" ); +else if (!(cr4_read_shadow () &X86_CR4_VMXE )) +return sprintf (buf,"KVM: Mitigation: VMX disabled\n" ); +else if (itlb_multihit_kvm_mitigation)return sprintf (buf,"KVM: Mitigation: Split huge pages\n" );else return sprintf (buf,"KVM: Vulnerable\n" );
arch/x86/kernel/tsc_msr.c +7 -2
@@ -133,10 +133,15 @@ static const struct freq_desc freq_desc_ann = { .mask = 0x0f, }; -/* 24 MHz crystal? : 24 * 13 / 4 = 78 MHz */ +/* +* 24 MHz crystal? : 24 * 13 / 4 = 78 MHz +* Frequency step for Lightning Mountain SoC is fixed to 78 MHz, +* so all the frequency entries are 78000. +*/ static const struct freq_desc freq_desc_lgm = { .use_msr_plat = true, - .freqs = {78000 ,78000 ,78000 ,78000 ,78000 ,78000 ,78000 ,78000 }, + .freqs = {78000 ,78000 ,78000 ,78000 ,78000 ,78000 ,78000 ,78000 , +78000 ,78000 ,78000 ,78000 ,78000 ,78000 ,78000 ,78000 }, .mask =0x0f , };
arch/xtensa/include/asm/thread_info.h +4 -0
@@ -55,6 +55,10 @@ struct thread_info {mm_segment_t addr_limit;/* thread address space */ unsigned long cpenable; +#if XCHAL_HAVE_EXCLUSIVE +/* result of the most recent exclusive store */ +unsigned long atomctl8; +#endif /* Allocate storage for extra user states and coprocessor states. */ #if XTENSA_HAVE_COPROCESSORS
arch/xtensa/kernel/asm-offsets.c +3 -0
@@ -93,6 +93,9 @@ int main(void) DEFINE(THREAD_RA, offsetof (struct task_struct, thread.ra)); DEFINE(THREAD_SP, offsetof (struct task_struct, thread.sp));DEFINE (THREAD_CPENABLE , offsetof (struct thread_info , cpenable)); +#if XCHAL_HAVE_EXCLUSIVE +DEFINE (THREAD_ATOMCTL8 , offsetof (struct thread_info , atomctl8)); +#endif #if XTENSA_HAVE_COPROCESSORS DEFINE(THREAD_XTREGS_CP0, offsetof(struct thread_info, xtregs_cp.cp0)); DEFINE(THREAD_XTREGS_CP1, offsetof(struct thread_info, xtregs_cp.cp1));
arch/xtensa/kernel/entry.S +11 -0
@@ -374,6 +374,11 @@ common_exception: s32i a2, a1, PT_LCOUNT #endif +#if XCHAL_HAVE_EXCLUSIVE + /* Clear exclusive access monitor set by interrupted code */ + clrex +#endif + /* It is now save to restore the EXC_TABLE_FIXUP variable. */ rsr a2, exccause
@@ -2020,6 +2025,12 @@ ENTRY(_switch_to) s32i a3, a4, THREAD_CPENABLE #endif +#if XCHAL_HAVE_EXCLUSIVE + l32i a3, a5, THREAD_ATOMCTL8 + getex a3 + s32i a3, a4, THREAD_ATOMCTL8 +#endif + /* Flush register file. */ spill_registers_kernel
arch/xtensa/kernel/perf_event.c +1 -1
@@ -401,7 +401,7 @@ static struct pmu xtensa_pmu = { .read = xtensa_pmu_read, }; -static int xtensa_pmu_setup (int cpu) +static int xtensa_pmu_setup (unsigned int cpu) {unsigned i;
crypto/af_alg.c +8 -3
@@ -635,6 +635,7 @@ void af_alg_pull_tsgl(struct sock *sk, size_t used, struct scatterlist *dst,if (!ctx->used) ctx->merge =0 ; + ctx->init = ctx->more; }EXPORT_SYMBOL_GPL (af_alg_pull_tsgl);
@@ -734,9 +735,10 @@ EXPORT_SYMBOL_GPL(af_alg_wmem_wakeup);* * @sk socket of connection to user space * @flags If MSG_DONTWAIT is set, then only report if function would sleep +* @min Set to minimum request size if partial requests are allowed. * @return 0 when writable memory is available, < 0 upon error */ -int af_alg_wait_for_data (struct sock *sk,unsigned flags) +int af_alg_wait_for_data (struct sock *sk,unsigned flags,unsigned min) {DEFINE_WAIT_FUNC (wait, woken_wake_function);struct alg_sock *ask =alg_sk (sk);
@@ -754,7 +756,9 @@ int af_alg_wait_for_data(struct sock *sk, unsigned flags)if (signal_pending (current))break ; timeout =MAX_SCHEDULE_TIMEOUT ; -if (sk_wait_event (sk, &timeout, (ctx->used || !ctx->more), +if (sk_wait_event (sk, &timeout, + ctx->init && (!ctx->more || + (min && ctx->used >= min)), &wait)) { err =0 ;break ;
@@ -843,10 +847,11 @@ int af_alg_sendmsg(struct socket *sock, struct msghdr *msg, size_t size, }lock_sock (sk); -if (!ctx->more && ctx->used) { +if (ctx->init && (init || !ctx->more)) { err = -EINVAL ; goto unlock; } + ctx->init = true;if (init) { ctx->enc = enc;
crypto/algif_aead.c +2 -8
@@ -106,8 +106,8 @@ static int _aead_recvmsg(struct socket *sock, struct msghdr *msg,size_t usedpages =0 ;/* [in] RX bufs to be used from user */ size_t processed =0 ;/* [in] TX bufs to be consumed */ -if (!ctx->used) { - err =af_alg_wait_for_data (sk, flags); +if (!ctx->init || ctx->more) { + err =af_alg_wait_for_data (sk, flags,0 );if (err)return err; }
@@ -558,12 +558,6 @@ static int aead_accept_parent_nokey(void *private, struct sock *sk)INIT_LIST_HEAD (&ctx->tsgl_list); ctx->len = len; - ctx->used =0 ; -atomic_set (&ctx->rcvused,0 ); - ctx->more =0 ; - ctx->merge =0 ; - ctx->enc =0 ; - ctx->aead_assoclen =0 ;crypto_init_wait (&ctx->wait); ask->private = ctx;
crypto/algif_skcipher.c +3 -8
@@ -61,8 +61,8 @@ static int _skcipher_recvmsg(struct socket *sock, struct msghdr *msg,int err =0 ;size_t len =0 ; -if (!ctx->used) { - err =af_alg_wait_for_data (sk, flags); +if (!ctx->init || (ctx->more && ctx->used < bs)) { + err =af_alg_wait_for_data (sk, flags, bs);if (err)return err; }
@@ -333,6 +333,7 @@ static int skcipher_accept_parent_nokey(void *private, struct sock *sk) ctx =sock_kmalloc (sk, len,GFP_KERNEL );if (!ctx)return -ENOMEM ; +memset (ctx,0 , len); ctx->iv =sock_kmalloc (sk,crypto_skcipher_ivsize (tfm),GFP_KERNEL );
@@ -340,16 +341,10 @@ static int skcipher_accept_parent_nokey(void *private, struct sock *sk)sock_kfree_s (sk, ctx, len);return -ENOMEM ; } -memset (ctx->iv,0 ,crypto_skcipher_ivsize (tfm));INIT_LIST_HEAD (&ctx->tsgl_list); ctx->len = len; - ctx->used =0 ; -atomic_set (&ctx->rcvused,0 ); - ctx->more =0 ; - ctx->merge =0 ; - ctx->enc =0 ;crypto_init_wait (&ctx->wait); ask->private = ctx;
drivers/base/dd.c +3 -1
@@ -846,7 +846,9 @@ static int __device_attach(struct device *dev, bool allow_async)int ret =0 ;device_lock (dev); -if (dev->driver) { +if (dev->p->dead) { + goto out_unlock; + }else if (dev->driver) {if (device_is_bound (dev)) { ret =1 ; goto out_unlock;
drivers/clk/actions/owl-s500.c +1 -1
@@ -183,7 +183,7 @@ static OWL_GATE(timer_clk, "timer_clk", "hosc", CMU_DEVCLKEN1, 27, 0, 0); static OWL_GATE(hdmi_clk, "hdmi_clk", "hosc", CMU_DEVCLKEN1, 3, 0, 0);/* divider clocks */ -static OWL_DIVIDER(h_clk, "h_clk", "ahbprevdiv_clk", CMU_BUSCLK1, 12, 2, NULL, 0, 0); +static OWL_DIVIDER(h_clk, "h_clk", "ahbprediv_clk", CMU_BUSCLK1, 12, 2, NULL, 0, 0); static OWL_DIVIDER(rmii_ref_clk, "rmii_ref_clk", "ethernet_pll_clk", CMU_ETHERNETPLL, 1, 1, rmii_ref_div_table, 0, 0);/* factor clocks */
drivers/clk/bcm/clk-bcm2835.c +21 -4
@@ -314,6 +314,7 @@ struct bcm2835_cprman {struct device *dev;void __iomem *regs;spinlock_t regs_lock;/* spinlock for all clocks */ +unsigned int soc;/* * Real names of cprman clock parents looked up through
@@ -525,6 +526,20 @@ static int bcm2835_pll_is_on(struct clk_hw *hw)A2W_PLL_CTRL_PRST_DISABLE ; } +static u32 bcm2835_pll_get_prediv_mask (struct bcm2835_cprman *cprman, +const struct bcm2835_pll_data *data) +{ +/* +* On BCM2711 there isn't a pre-divisor available in the PLL feedback +* loop. Bits 13:14 of ANA1 (PLLA,PLLB,PLLC,PLLD) have been re-purposed +* for to for VCO RANGE bits. +*/ +if (cprman->soc &SOC_BCM2711 ) +return 0 ; + +return data->ana->fb_prediv_mask; +} +static void bcm2835_pll_choose_ndiv_and_fdiv (unsigned long rate,unsigned long parent_rate,u32 *ndiv,u32 *fdiv)
@@ -582,7 +597,7 @@ static unsigned long bcm2835_pll_get_rate(struct clk_hw *hw, ndiv = (a2wctrl &A2W_PLL_CTRL_NDIV_MASK ) >>A2W_PLL_CTRL_NDIV_SHIFT ; pdiv = (a2wctrl &A2W_PLL_CTRL_PDIV_MASK ) >>A2W_PLL_CTRL_PDIV_SHIFT ; using_prediv =cprman_read (cprman, data->ana_reg_base +4 ) & - data->ana->fb_prediv_mask; +bcm2835_pll_get_prediv_mask (cprman, data);if (using_prediv) { ndiv *=2 ;
@@ -665,6 +680,7 @@ static int bcm2835_pll_set_rate(struct clk_hw *hw, struct bcm2835_pll *pll = container_of(hw, struct bcm2835_pll, hw);struct bcm2835_cprman *cprman = pll->cprman;const struct bcm2835_pll_data *data = pll->data; +u32 prediv_mask =bcm2835_pll_get_prediv_mask (cprman, data);bool was_using_prediv, use_fb_prediv, do_ana_setup_first;u32 ndiv, fdiv, a2w_ctl;u32 ana[4 ];
@@ -682,7 +698,7 @@ static int bcm2835_pll_set_rate(struct clk_hw *hw,for (i =3 ; i >=0 ; i--) ana[i] =cprman_read (cprman, data->ana_reg_base + i *4 ); - was_using_prediv = ana[1 ] & data->ana->fb_prediv_mask; + was_using_prediv = ana[1 ] & prediv_mask; ana[0 ] &= ~data->ana->mask0; ana[0 ] |= data->ana->set0;
@@ -692,10 +708,10 @@ static int bcm2835_pll_set_rate(struct clk_hw *hw, ana[3 ] |= data->ana->set3;if (was_using_prediv && !use_fb_prediv) { - ana[1 ] &= ~data->ana->fb_prediv_mask; + ana[1 ] &= ~prediv_mask; do_ana_setup_first = true; }else if (!was_using_prediv && use_fb_prediv) { - ana[1 ] |= data->ana->fb_prediv_mask; + ana[1 ] |= prediv_mask; do_ana_setup_first = false; }else { do_ana_setup_first = true;
@@ -2232,6 +2248,7 @@ static int bcm2835_clk_probe(struct platform_device *pdev)platform_set_drvdata (pdev, cprman); cprman->onecell.num = asize; + cprman->soc = pdata->soc; hws = cprman->onecell.hws;for (i =0 ; i < asize; i++) {
drivers/clk/qcom/clk-alpha-pll.c +0 -2
@@ -56,7 +56,6 @@#define PLL_STATUS (p) ((p)->offset + (p)->regs[PLL_OFF_STATUS])#define PLL_OPMODE (p) ((p)->offset + (p)->regs[PLL_OFF_OPMODE])#define PLL_FRAC (p) ((p)->offset + (p)->regs[PLL_OFF_FRAC]) -#define PLL_CAL_VAL (p) ((p)->offset + (p)->regs[PLL_OFF_CAL_VAL])const u8 clk_alpha_pll_regs[][PLL_OFF_MAX_REGS ] = { [CLK_ALPHA_PLL_TYPE_DEFAULT ] = {
@@ -115,7 +114,6 @@ const u8 clk_alpha_pll_regs[][PLL_OFF_MAX_REGS] = { [PLL_OFF_STATUS] = 0x30, [PLL_OFF_OPMODE] = 0x38, [PLL_OFF_ALPHA_VAL ] =0x40 , - [PLL_OFF_CAL_VAL ] =0x44 , }, [CLK_ALPHA_PLL_TYPE_LUCID] = { [PLL_OFF_L_VAL ] =0x04 ,
drivers/clk/qcom/gcc-sdm660.c +3 -0
@@ -1715,6 +1715,9 @@ static struct clk_branch gcc_mss_cfg_ahb_clk = {static struct clk_branch gcc_mss_mnoc_bimc_axi_clk = { .halt_reg =0x8a004 , + .halt_check =BRANCH_HALT , + .hwcg_reg =0x8a004 , + .hwcg_bit =1 , .clkr = { .enable_reg =0x8a004 , .enable_mask =BIT (0 ),
drivers/clk/qcom/gcc-sm8150.c +6 -2
@@ -1617,6 +1617,7 @@ static struct clk_branch gcc_gpu_cfg_ahb_clk = { };static struct clk_branch gcc_gpu_gpll0_clk_src = { + .halt_check =BRANCH_HALT_SKIP , .clkr = { .enable_reg =0x52004 , .enable_mask =BIT (15 ),
@@ -1632,13 +1633,14 @@ static struct clk_branch gcc_gpu_gpll0_clk_src = { };static struct clk_branch gcc_gpu_gpll0_div_clk_src = { + .halt_check =BRANCH_HALT_SKIP , .clkr = { .enable_reg =0x52004 , .enable_mask =BIT (16 ), .hw.init = &(struct clk_init_data ){ .name ="gcc_gpu_gpll0_div_clk_src" , .parent_hws = (const struct clk_hw *[]){ - &gcc_gpu_gpll0_clk_src.clkr.hw }, + &gpll0_out_even.clkr.hw }, .num_parents =1 , .flags =CLK_SET_RATE_PARENT , .ops = &clk_branch2_ops,
@@ -1729,6 +1731,7 @@ static struct clk_branch gcc_npu_cfg_ahb_clk = { };static struct clk_branch gcc_npu_gpll0_clk_src = { + .halt_check =BRANCH_HALT_SKIP , .clkr = { .enable_reg =0x52004 , .enable_mask =BIT (18 ),
@@ -1744,13 +1747,14 @@ static struct clk_branch gcc_npu_gpll0_clk_src = { };static struct clk_branch gcc_npu_gpll0_div_clk_src = { + .halt_check =BRANCH_HALT_SKIP , .clkr = { .enable_reg =0x52004 , .enable_mask =BIT (19 ), .hw.init = &(struct clk_init_data ){ .name ="gcc_npu_gpll0_div_clk_src" , .parent_hws = (const struct clk_hw *[]){ - &gcc_npu_gpll0_clk_src.clkr.hw }, + &gpll0_out_even.clkr.hw }, .num_parents =1 , .flags =CLK_SET_RATE_PARENT , .ops = &clk_branch2_ops,
drivers/clk/sirf/clk-atlas6.c +1 -1
@@ -135,7 +135,7 @@ static void __init atlas6_clk_init(struct device_node *np)for (i = pll1; i < maxclk; i++) { atlas6_clks[i] =clk_register (NULL , atlas6_clk_hw_array[i]); -BUG_ON (!atlas6_clks[i]); +BUG_ON (IS_ERR (atlas6_clks[i])); }clk_register_clkdev (atlas6_clks[cpu],NULL ,"cpu" );clk_register_clkdev (atlas6_clks[io],NULL ,"io" );
drivers/crypto/caam/caamalg.c +0 -29
@@ -810,12 +810,6 @@ static int ctr_skcipher_setkey(struct crypto_skcipher *skcipher,return skcipher_setkey (skcipher, key, keylen, ctx1_iv_off); } -static int arc4_skcipher_setkey (struct crypto_skcipher *skcipher, -const u8 *key,unsigned int keylen) -{ -return skcipher_setkey (skcipher, key, keylen,0 ); -} -static int des_skcipher_setkey (struct crypto_skcipher *skcipher,const u8 *key,unsigned int keylen) {
@@ -1967,21 +1961,6 @@ static struct caam_skcipher_alg driver_algs[] = { }, .caam.class1_alg_type = OP_ALG_ALGSEL_3DES | OP_ALG_AAI_ECB, }, - { - .skcipher = { - .base = { - .cra_name = "ecb(arc4)", - .cra_driver_name = "ecb-arc4-caam", - .cra_blocksize = ARC4_BLOCK_SIZE, - }, - .setkey = arc4_skcipher_setkey, - .encrypt = skcipher_encrypt, - .decrypt = skcipher_decrypt, - .min_keysize = ARC4_MIN_KEY_SIZE, - .max_keysize = ARC4_MAX_KEY_SIZE, - }, - .caam.class1_alg_type = OP_ALG_ALGSEL_ARC4 | OP_ALG_AAI_ECB, - }, }; static struct caam_aead_alg driver_aeads[] = {
@@ -3457,7 +3436,6 @@ int caam_algapi_init(struct device *ctrldev)struct caam_drv_private *priv =dev_get_drvdata (ctrldev);int i =0 , err =0 ;u32 aes_vid, aes_inst, des_inst, md_vid, md_inst, ccha_inst, ptha_inst; -u32 arc4_inst;unsigned int md_limit =SHA512_DIGEST_SIZE ;bool registered = false, gcm_support;
@@ -3477,8 +3455,6 @@ int caam_algapi_init(struct device *ctrldev)CHA_ID_LS_DES_SHIFT ; aes_inst = cha_inst &CHA_ID_LS_AES_MASK ; md_inst = (cha_inst &CHA_ID_LS_MD_MASK ) >>CHA_ID_LS_MD_SHIFT ; - arc4_inst = (cha_inst &CHA_ID_LS_ARC4_MASK ) >> -CHA_ID_LS_ARC4_SHIFT ; ccha_inst =0 ; ptha_inst =0 ;
@@ -3499,7 +3475,6 @@ int caam_algapi_init(struct device *ctrldev) md_inst = mdha &CHA_VER_NUM_MASK ; ccha_inst =rd_reg32 (&priv->ctrl->vreg.ccha) &CHA_VER_NUM_MASK ; ptha_inst =rd_reg32 (&priv->ctrl->vreg.ptha) &CHA_VER_NUM_MASK ; - arc4_inst =rd_reg32 (&priv->ctrl->vreg.afha) &CHA_VER_NUM_MASK ; gcm_support = aesa &CHA_VER_MISC_AES_GCM ; }
@@ -3522,10 +3497,6 @@ int caam_algapi_init(struct device *ctrldev)if (!aes_inst && (alg_sel ==OP_ALG_ALGSEL_AES ))continue ; -/* Skip ARC4 algorithms if not supported by device */ -if (!arc4_inst && alg_sel ==OP_ALG_ALGSEL_ARC4 ) -continue ; -/* * Check support for AES modes not available * on LP devices.
drivers/crypto/caam/compat.h +0 -1
@@ -43,7 +43,6 @@#include <crypto/akcipher.h> #include <crypto/scatterwalk.h> #include <crypto/skcipher.h> -#include <crypto/arc4.h> #include <crypto/internal/skcipher.h> #include <crypto/internal/hash.h> #include <crypto/internal/rsa.h>
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +4 -4
@@ -1679,15 +1679,15 @@ static int psp_suspend(void *handle) } } - ret =psp_tmr_terminate (psp); + ret =psp_asd_unload (psp);if (ret) { -DRM_ERROR ("Falied to terminate tmr\n" ); +DRM_ERROR ("Failed to unload asd\n" );return ret; } - ret =psp_asd_unload (psp); + ret =psp_tmr_terminate (psp);if (ret) { -DRM_ERROR ("Failed to unload asd\n" ); +DRM_ERROR ("Falied to terminate tmr\n" );return ret; }
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +23 -0
@@ -8458,6 +8458,29 @@ static int amdgpu_dm_atomic_check(struct drm_device *dev,if (ret) goto fail; +/* Check connector changes */ +for_each_oldnew_connector_in_state (state, connector, old_con_state, new_con_state, i) { +struct dm_connector_state *dm_old_con_state =to_dm_connector_state (old_con_state); +struct dm_connector_state *dm_new_con_state =to_dm_connector_state (new_con_state); + +/* Skip connectors that are disabled or part of modeset already. */ +if (!old_con_state->crtc && !new_con_state->crtc) +continue ; + +if (!new_con_state->crtc) +continue ; + + new_crtc_state =drm_atomic_get_crtc_state (state, new_con_state->crtc); +if (IS_ERR (new_crtc_state)) { + ret =PTR_ERR (new_crtc_state); + goto fail; + } + +if (dm_old_con_state->abm_level != + dm_new_con_state->abm_level) + new_crtc_state->connectors_changed = true; + } +#if defined(CONFIG_DRM_AMD_DC_DCN )if (!compute_mst_dsc_configs_for_state (state, dm_state->context)) goto fail;
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn10/rv1_clk_mgr.c +67 -2
86 lines not on this page · raw message
drivers/gpu/drm/amd/powerplay/smumgr/ci_smumgr.c +4 -1
@@ -2725,7 +2725,10 @@ static int ci_initialize_mc_reg_table(struct pp_hwmgr *hwmgr)static bool ci_is_dpm_running (struct pp_hwmgr *hwmgr) { -return ci_is_smc_ram_running (hwmgr); +return (1 ==PHM_READ_INDIRECT_FIELD (hwmgr->device, +CGS_IND_REG__SMC ,FEATURE_STATUS , +VOLTAGE_CONTROLLER_ON )) + ? true : false; }static int ci_smu_init (struct pp_hwmgr *hwmgr)
drivers/gpu/drm/drm_dp_mst_topology.c +20 -15
@@ -88,8 +88,8 @@ static int drm_dp_send_enum_path_resources(struct drm_dp_mst_topology_mgr *mgr,static bool drm_dp_validate_guid (struct drm_dp_mst_topology_mgr *mgr,u8 *guid); -static int drm_dp_mst_register_i2c_bus (struct drm_dp_aux *aux); -static void drm_dp_mst_unregister_i2c_bus (struct drm_dp_aux *aux); +static int drm_dp_mst_register_i2c_bus (struct drm_dp_mst_port *port); +static void drm_dp_mst_unregister_i2c_bus (struct drm_dp_mst_port *port);static void drm_dp_mst_kick_tx (struct drm_dp_mst_topology_mgr *mgr);#define DBG_PREFIX "[dp_mst]"
@@ -1981,7 +1981,7 @@ drm_dp_port_set_pdt(struct drm_dp_mst_port *port, u8 new_pdt, }/* remove i2c over sideband */ -drm_dp_mst_unregister_i2c_bus (&port->aux); +drm_dp_mst_unregister_i2c_bus (port); }else {mutex_lock (&mgr->lock);drm_dp_mst_topology_put_mstb (port->mstb);
@@ -1996,7 +1996,7 @@ drm_dp_port_set_pdt(struct drm_dp_mst_port *port, u8 new_pdt,if (port->pdt !=DP_PEER_DEVICE_NONE ) {if (drm_dp_mst_is_end_device (port->pdt, port->mcs)) {/* add i2c over sideband */ - ret =drm_dp_mst_register_i2c_bus (&port->aux); + ret =drm_dp_mst_register_i2c_bus (port); }else { lct =drm_dp_calculate_rad (port, rad); mstb =drm_dp_add_mst_branch_device (lct, rad);
@@ -4319,11 +4319,11 @@ bool drm_dp_mst_allocate_vcpi(struct drm_dp_mst_topology_mgr *mgr, {int ret; - port =drm_dp_mst_topology_get_port_validated (mgr, port); -if (!port) +if (slots <0 )return false; -if (slots <0 ) + port =drm_dp_mst_topology_get_port_validated (mgr, port); +if (!port)return false;if (port->vcpi.vcpi >0 ) {
@@ -4339,6 +4339,7 @@ bool drm_dp_mst_allocate_vcpi(struct drm_dp_mst_topology_mgr *mgr,if (ret) {DRM_DEBUG_KMS ("failed to init vcpi slots=%d max=63 ret=%d\n" ,DIV_ROUND_UP (pbn, mgr->pbn_div), ret); +drm_dp_mst_topology_put_port (port); goto out; } DRM_DEBUG_KMS("initing vcpi for pbn=%d slots=%d\n",
@@ -5406,22 +5407,26 @@ static const struct i2c_algorithm drm_dp_mst_i2c_algo = {/** * drm_dp_mst_register_i2c_bus() - register an I2C adapter for I2C-over-AUX -* @aux: DisplayPort AUX channel +* @port: The port to add the I2C bus on * * Returns 0 on success or a negative error code on failure. */ -static int drm_dp_mst_register_i2c_bus (struct drm_dp_aux *aux) +static int drm_dp_mst_register_i2c_bus (struct drm_dp_mst_port *port) { +struct drm_dp_aux *aux = &port->aux; +struct device *parent_dev = port->mgr->dev->dev; + aux->ddc.algo = &drm_dp_mst_i2c_algo; aux->ddc.algo_data = aux; aux->ddc.retries =3 ; aux->ddc.class =I2C_CLASS_DDC ; aux->ddc.owner =THIS_MODULE ; - aux->ddc.dev.parent = aux->dev; - aux->ddc.dev.of_node = aux->dev->of_node; +/* FIXME: set the kdev of the port's connector as parent */ + aux->ddc.dev.parent = parent_dev; + aux->ddc.dev.of_node = parent_dev->of_node; -strlcpy (aux->ddc.name, aux->name ? aux->name :dev_name (aux->dev), +strlcpy (aux->ddc.name, aux->name ? aux->name :dev_name (parent_dev),sizeof (aux->ddc.name));return i2c_add_adapter (&aux->ddc);
@@ -5429,11 +5434,11 @@ static int drm_dp_mst_register_i2c_bus(struct drm_dp_aux *aux)/** * drm_dp_mst_unregister_i2c_bus() - unregister an I2C-over-AUX adapter -* @aux: DisplayPort AUX channel +* @port: The port to remove the I2C bus from */ -static void drm_dp_mst_unregister_i2c_bus (struct drm_dp_aux *aux) +static void drm_dp_mst_unregister_i2c_bus (struct drm_dp_mst_port *port) { -i2c_del_adapter (&aux->ddc); +i2c_del_adapter (&port->aux.ddc); }/**
drivers/gpu/drm/drm_panel_orientation_quirks.c +6 -0
@@ -121,6 +121,12 @@ static const struct dmi_system_id orientation_data[] = { DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "T101HA"), }, .driver_data = (void *)&lcd800x1280_rightside_up, + }, { /* Asus T103HAF */ + .matches = { +DMI_EXACT_MATCH (DMI_SYS_VENDOR ,"ASUSTeK COMPUTER INC." ), + DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "T103HAF"), + }, + .driver_data = (void *)&lcd800x1280_rightside_up, }, { /* GPD MicroPC (generic strings, also match on bios date) */ .matches = { DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Default string"),
drivers/gpu/drm/i915/gt/intel_gt.c +5 -0
@@ -656,6 +656,11 @@ void intel_gt_driver_unregister(struct intel_gt *gt)void intel_gt_driver_release (struct intel_gt *gt) {struct i915_address_space *vm; +intel_wakeref_t wakeref; + +/* Scrub all HW state upon release */ + with_intel_runtime_pm(gt->uncore->rpm, wakeref) +__intel_gt_reset (gt,ALL_ENGINES ); vm =fetch_and_zero (>->vm);if (vm)/* FIXME being called twice on error paths :( */
drivers/gpu/drm/imx/imx-ldb.c +4 -3
@@ -303,18 +303,19 @@ static void imx_ldb_encoder_disable(struct drm_encoder *encoder) {struct imx_ldb_channel *imx_ldb_ch =enc_to_imx_ldb_ch (encoder);struct imx_ldb *ldb = imx_ldb_ch->ldb; +int dual = ldb->ldb_ctrl &LDB_SPLIT_MODE_EN ;int mux, ret;drm_panel_disable (imx_ldb_ch->panel); -if (imx_ldb_ch == &ldb->channel[0 ]) +if (imx_ldb_ch == &ldb->channel[0 ] || dual) ldb->ldb_ctrl &= ~LDB_CH0_MODE_EN_MASK ; -else if (imx_ldb_ch == &ldb->channel[1 ]) +if (imx_ldb_ch == &ldb->channel[1 ] || dual) ldb->ldb_ctrl &= ~LDB_CH1_MODE_EN_MASK ;regmap_write (ldb->regmap,IOMUXC_GPR2 , ldb->ldb_ctrl); -if (ldb->ldb_ctrl &LDB_SPLIT_MODE_EN ) { +if (dual) {clk_disable_unprepare (ldb->clk[0 ]);clk_disable_unprepare (ldb->clk[1 ]); }
drivers/gpu/drm/ingenic/ingenic-drm.c +1 -1
@@ -384,7 +384,7 @@ static void ingenic_drm_plane_atomic_update(struct drm_plane *plane, addr =drm_fb_cma_get_gem_addr (state->fb, state,0 ); width = state->src_w >>16 ; height = state->src_h >>16 ; - cpp = state->fb->format->cpp[plane->index]; + cpp = state->fb->format->cpp[0 ]; priv->dma_hwdesc->addr = addr; priv->dma_hwdesc->cmd = width * height * cpp /4 ;
drivers/gpu/drm/omapdrm/dss/dispc.c +1 -0
@@ -4936,6 +4936,7 @@ static int dispc_runtime_resume(struct device *dev)static const struct dev_pm_ops dispc_pm_ops = { .runtime_suspend = dispc_runtime_suspend, .runtime_resume = dispc_runtime_resume, +SET_LATE_SYSTEM_SLEEP_PM_OPS (pm_runtime_force_suspend, pm_runtime_force_resume) };struct platform_driver omap_dispchw_driver = {
drivers/gpu/drm/omapdrm/dss/dsi.c +1 -0
@@ -5467,6 +5467,7 @@ static int dsi_runtime_resume(struct device *dev)static const struct dev_pm_ops dsi_pm_ops = { .runtime_suspend = dsi_runtime_suspend, .runtime_resume = dsi_runtime_resume, +SET_LATE_SYSTEM_SLEEP_PM_OPS (pm_runtime_force_suspend, pm_runtime_force_resume) };struct platform_driver omap_dsihw_driver = {
drivers/gpu/drm/omapdrm/dss/dss.c +1 -0
@@ -1614,6 +1614,7 @@ static int dss_runtime_resume(struct device *dev)static const struct dev_pm_ops dss_pm_ops = { .runtime_suspend = dss_runtime_suspend, .runtime_resume = dss_runtime_resume, +SET_LATE_SYSTEM_SLEEP_PM_OPS (pm_runtime_force_suspend, pm_runtime_force_resume) };struct platform_driver omap_dsshw_driver = {
drivers/gpu/drm/omapdrm/dss/venc.c +1 -0
@@ -945,6 +945,7 @@ static int venc_runtime_resume(struct device *dev)static const struct dev_pm_ops venc_pm_ops = { .runtime_suspend = venc_runtime_suspend, .runtime_resume = venc_runtime_resume, +SET_LATE_SYSTEM_SLEEP_PM_OPS (pm_runtime_force_suspend, pm_runtime_force_resume) };static const struct of_device_id venc_of_match[] = {
drivers/gpu/drm/panfrost/panfrost_gem.c +1 -1
@@ -46,7 +46,7 @@ static void panfrost_gem_free_object(struct drm_gem_object *obj)sg_free_table (&bo->sgts[i]); } } -kfree (bo->sgts); +kvfree (bo->sgts); }drm_gem_shmem_free_object (obj);
drivers/gpu/drm/panfrost/panfrost_mmu.c +1 -1
@@ -486,7 +486,7 @@ static int panfrost_mmu_map_fault_addr(struct panfrost_device *pfdev, int as, pages =kvmalloc_array (bo->base.base.size >>PAGE_SHIFT ,sizeof (struct page *),GFP_KERNEL | __GFP_ZERO);if (!pages) { -kfree (bo->sgts); +kvfree (bo->sgts); bo->sgts =NULL ;mutex_unlock (&bo->base.pages_lock); ret = -ENOMEM ;
drivers/gpu/drm/tidss/tidss_kms.c +1 -1
@@ -154,7 +154,7 @@ static int tidss_dispc_modeset_init(struct tidss_device *tidss)break ;case DISPC_VP_DPI : enc_type =DRM_MODE_ENCODER_DPI ; - conn_type =DRM_MODE_CONNECTOR_LVDS ; + conn_type =DRM_MODE_CONNECTOR_DPI ;break ;default :WARN_ON (1 );
drivers/gpu/drm/vmwgfx/vmwgfx_kms.c +4 -4
@@ -2578,7 +2578,7 @@ int vmw_kms_fbdev_init_data(struct vmw_private *dev_priv, ++i; } -if (i != unit) { +if (&con->head == &dev_priv->dev->mode_config.connector_list) {DRM_ERROR ("Could not find initial display unit.\n" ); ret = -EINVAL ; goto out_unlock;
@@ -2602,13 +2602,13 @@ int vmw_kms_fbdev_init_data(struct vmw_private *dev_priv,break ; } -if (mode->type &DRM_MODE_TYPE_PREFERRED ) - *p_mode = mode; -else { +if (&mode->head == &con->modes) {WARN_ONCE (true,"Could not find initial preferred mode.\n" ); *p_mode =list_first_entry (&con->modes, struct drm_display_mode, head); + }else { + *p_mode = mode; } out_unlock:
drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c +2 -3
@@ -81,7 +81,7 @@ static int vmw_ldu_commit_list(struct vmw_private *dev_priv)struct vmw_legacy_display_unit *entry;struct drm_framebuffer *fb =NULL ;struct drm_crtc *crtc =NULL ; -int i =0 ; +int i;/* If there is no display topology the host just assumes * that the guest will set the same layout as the host.
@@ -92,12 +92,11 @@ static int vmw_ldu_commit_list(struct vmw_private *dev_priv) crtc = &entry->base.crtc; w =max (w, crtc->x + crtc->mode.hdisplay); h =max (h, crtc->y + crtc->mode.vdisplay); - i++; }if (crtc ==NULL )return 0 ; - fb = entry->base.crtc.primary->state->fb; + fb = crtc->primary->state->fb; return vmw_kms_write_svga(dev_priv, w, h, fb->pitches[0], fb->format->cpp[0] * 8,
drivers/gpu/ipu-v3/ipu-image-convert.c +91 -54
237 lines not on this page · raw message
drivers/i2c/busses/i2c-bcm-iproc.c +12 -1
@@ -1074,7 +1074,7 @@ static int bcm_iproc_i2c_unreg_slave(struct i2c_client *slave)if (!iproc_i2c->slave)return -EINVAL ; - iproc_i2c->slave =NULL ; +disable_irq (iproc_i2c->irq);/* disable all slave interrupts */ tmp =iproc_i2c_rd_reg (iproc_i2c,IE_OFFSET );
@@ -1087,6 +1087,17 @@ static int bcm_iproc_i2c_unreg_slave(struct i2c_client *slave) tmp &= ~BIT (S_CFG_EN_NIC_SMB_ADDR3_SHIFT );iproc_i2c_wr_reg (iproc_i2c,S_CFG_SMBUS_ADDR_OFFSET , tmp); +/* flush TX/RX FIFOs */ + tmp = (BIT (S_FIFO_RX_FLUSH_SHIFT ) |BIT (S_FIFO_TX_FLUSH_SHIFT )); +iproc_i2c_wr_reg (iproc_i2c,S_FIFO_CTRL_OFFSET , tmp); + +/* clear all pending slave interrupts */ +iproc_i2c_wr_reg (iproc_i2c,IS_OFFSET ,ISR_MASK_SLAVE ); + + iproc_i2c->slave =NULL ; + +enable_irq (iproc_i2c->irq); +return 0 ; }
drivers/i2c/busses/i2c-rcar.c +9 -6
@@ -583,13 +583,14 @@ static bool rcar_i2c_slave_irq(struct rcar_i2c_priv *priv)rcar_i2c_write (priv,ICSIER ,SDR |SSR |SAR ); } -rcar_i2c_write (priv,ICSSR , ~SAR &0xff ); +/* Clear SSR, too, because of old STOPs to other clients than us */ +rcar_i2c_write (priv,ICSSR , ~(SAR |SSR ) &0xff ); }/* master sent stop */ if (ssr_filtered &SSR ) {i2c_slave_event (priv->slave,I2C_SLAVE_STOP , &value); -rcar_i2c_write (priv,ICSIER ,SAR |SSR ); +rcar_i2c_write (priv,ICSIER ,SAR );rcar_i2c_write (priv,ICSSR , ~SSR &0xff ); }
@@ -853,7 +854,7 @@ static int rcar_reg_slave(struct i2c_client *slave) priv->slave = slave;rcar_i2c_write (priv,ICSAR , slave->addr);rcar_i2c_write (priv,ICSSR ,0 ); -rcar_i2c_write (priv,ICSIER ,SAR |SSR ); +rcar_i2c_write (priv,ICSIER ,SAR );rcar_i2c_write (priv,ICSCR ,SIE |SDBS );return 0 ;
@@ -865,12 +866,14 @@ static int rcar_unreg_slave(struct i2c_client *slave)WARN_ON (!priv->slave); -/* disable irqs and ensure none is running before clearing ptr */ +/* ensure no irq is running before clearing ptr */ +disable_irq (priv->irq);rcar_i2c_write (priv,ICSIER ,0 ); -rcar_i2c_write (priv,ICSCR ,0 ); +rcar_i2c_write (priv,ICSSR ,0 ); +enable_irq (priv->irq); +rcar_i2c_write (priv,ICSCR ,SDBS );rcar_i2c_write (priv,ICSAR ,0 );/* Gen2: must be 0 if not using slave */ -synchronize_irq (priv->irq); priv->slave =NULL ;pm_runtime_put (rcar_i2c_priv_to_dev (priv));
drivers/iio/dac/ad5592r-base.c +2 -2
@@ -415,7 +415,7 @@ static int ad5592r_read_raw(struct iio_dev *iio_dev,s64 tmp = *val * (3767897513LL /25LL ); *val =div_s64_rem (tmp,1000000000LL , val2); - ret =IIO_VAL_INT_PLUS_MICRO ; +return IIO_VAL_INT_PLUS_MICRO ; }else {int mult;
@@ -446,7 +446,7 @@ static int ad5592r_read_raw(struct iio_dev *iio_dev, ret =IIO_VAL_INT ;break ;default : - ret = -EINVAL ; +return -EINVAL ; } unlock:
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h +1 -2
@@ -436,8 +436,7 @@ int st_lsm6dsx_update_watermark(struct st_lsm6dsx_sensor *sensor, u16 watermark);int st_lsm6dsx_update_fifo (struct st_lsm6dsx_sensor *sensor,bool enable);int st_lsm6dsx_flush_fifo (struct st_lsm6dsx_hw *hw); -int st_lsm6dsx_set_fifo_mode (struct st_lsm6dsx_hw *hw, -enum st_lsm6dsx_fifo_mode fifo_mode); +int st_lsm6dsx_resume_fifo (struct st_lsm6dsx_hw *hw);int st_lsm6dsx_read_fifo (struct st_lsm6dsx_hw *hw);int st_lsm6dsx_read_tagged_fifo (struct st_lsm6dsx_hw *hw);int st_lsm6dsx_check_odr (struct st_lsm6dsx_sensor *sensor,u32 odr,u8 *val);
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c +15 -8
@@ -184,8 +184,8 @@ static int st_lsm6dsx_update_decimators(struct st_lsm6dsx_hw *hw)return err; } -int st_lsm6dsx_set_fifo_mode (struct st_lsm6dsx_hw *hw, -enum st_lsm6dsx_fifo_mode fifo_mode) +static int st_lsm6dsx_set_fifo_mode (struct st_lsm6dsx_hw *hw, +enum st_lsm6dsx_fifo_mode fifo_mode) {unsigned int data;
@@ -302,6 +302,18 @@ static int st_lsm6dsx_reset_hw_ts(struct st_lsm6dsx_hw *hw)return 0 ; } +int st_lsm6dsx_resume_fifo (struct st_lsm6dsx_hw *hw) +{ +int err; + +/* reset hw ts counter */ + err =st_lsm6dsx_reset_hw_ts (hw); +if (err <0 ) +return err; + +return st_lsm6dsx_set_fifo_mode (hw,ST_LSM6DSX_FIFO_CONT ); +} +/* * Set max bulk read to ST_LSM6DSX_MAX_WORD_LEN/ST_LSM6DSX_MAX_TAGGED_WORD_LEN * in order to avoid a kmalloc for each bus access
@@ -675,12 +687,7 @@ int st_lsm6dsx_update_fifo(struct st_lsm6dsx_sensor *sensor, bool enable) goto out;if (fifo_mask) { -/* reset hw ts counter */ - err =st_lsm6dsx_reset_hw_ts (hw); -if (err <0 ) - goto out; - - err =st_lsm6dsx_set_fifo_mode (hw,ST_LSM6DSX_FIFO_CONT ); + err =st_lsm6dsx_resume_fifo (hw);if (err <0 ) goto out; }
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c +1 -1
@@ -2451,7 +2451,7 @@ static int __maybe_unused st_lsm6dsx_resume(struct device *dev) }if (hw->fifo_mask) - err =st_lsm6dsx_set_fifo_mode (hw,ST_LSM6DSX_FIFO_CONT ); + err =st_lsm6dsx_resume_fifo (hw);return err; }
drivers/infiniband/core/counters.c +2 -2
@@ -288,7 +288,7 @@ int rdma_counter_bind_qp_auto(struct ib_qp *qp, u8 port)struct rdma_counter *counter;int ret; -if (!qp->res.valid) +if (!qp->res.valid ||rdma_is_kernel_res (&qp->res))return 0 ;if (!rdma_is_port_valid (dev, port))
@@ -483,7 +483,7 @@ int rdma_counter_bind_qpn(struct ib_device *dev, u8 port, goto err; } -if (counter->res.task != qp->res.task) { +if (rdma_is_kernel_res (&counter->res) !=rdma_is_kernel_res (&qp->res)) { ret = -EINVAL ; goto err_task; }
drivers/infiniband/core/uverbs_cmd.c +4 -0
@@ -772,6 +772,7 @@ static int ib_uverbs_reg_mr(struct uverbs_attr_bundle *attrs) mr->uobject = uobj;atomic_inc (&pd->usecnt); mr->res.type =RDMA_RESTRACK_MR ; + mr->iova = cmd.hca_va;rdma_restrack_uadd (&mr->res); uobj->object = mr;
@@ -863,6 +864,9 @@ static int ib_uverbs_rereg_mr(struct uverbs_attr_bundle *attrs)atomic_dec (&old_pd->usecnt); } +if (cmd.flags &IB_MR_REREG_TRANS ) + mr->iova = cmd.hca_va; +memset (&resp,0 ,sizeof (resp)); resp.lkey = mr->lkey; resp.rkey = mr->rkey;
drivers/infiniband/hw/cxgb4/mem.c +0 -1
@@ -399,7 +399,6 @@ static int finish_mem_reg(struct c4iw_mr *mhp, u32 stag) mmid = stag >>8 ; mhp->ibmr.rkey = mhp->ibmr.lkey = stag; mhp->ibmr.length = mhp->attr.len; - mhp->ibmr.iova = mhp->attr.va_fbo; mhp->ibmr.page_size =1U << (mhp->attr.page_size +12 );pr_debug ("mmid 0x%x mhp %p\n" , mmid, mhp);return xa_insert_irq (&mhp->rhp->mrs, mmid, mhp,GFP_KERNEL );
drivers/infiniband/hw/mlx4/mr.c +0 -1
@@ -439,7 +439,6 @@ struct ib_mr *mlx4_ib_reg_user_mr(struct ib_pd *pd, u64 start, u64 length, mr->ibmr.rkey = mr->ibmr.lkey = mr->mmr.key; mr->ibmr.length = length; - mr->ibmr.iova = virt_addr; mr->ibmr.page_size =1U << shift;return &mr->ibmr;
drivers/infiniband/ulp/ipoib/ipoib.h +1 -1
@@ -515,7 +515,7 @@ void ipoib_ib_dev_cleanup(struct net_device *dev);int ipoib_ib_dev_open_default (struct net_device *dev);int ipoib_ib_dev_open (struct net_device *dev); -int ipoib_ib_dev_stop (struct net_device *dev); +void ipoib_ib_dev_stop (struct net_device *dev);void ipoib_ib_dev_up (struct net_device *dev);void ipoib_ib_dev_down (struct net_device *dev);int ipoib_ib_dev_stop_default (struct net_device *dev);
drivers/infiniband/ulp/ipoib/ipoib_ib.c +29 -38
134 lines not on this page · raw message
drivers/infiniband/ulp/ipoib/ipoib_main.c +2 -0
@@ -1975,6 +1975,8 @@ static void ipoib_ndo_uninit(struct net_device *dev)/* no more works over the priv->wq */ if (priv->wq) { +/* See ipoib_mcast_carrier_on_task() */ +WARN_ON (test_bit (IPOIB_FLAG_OPER_UP , &priv->flags));flush_workqueue (priv->wq);destroy_workqueue (priv->wq); priv->wq =NULL ;
drivers/input/mouse/sentelic.c +1 -1
@@ -441,7 +441,7 @@ static ssize_t fsp_attr_set_setreg(struct psmouse *psmouse, void *data,fsp_reg_write_enable (psmouse, false); -return count; +return retval; }PSMOUSE_DEFINE_WO_ATTR (setreg,S_IWUSR ,NULL , fsp_attr_set_setreg);
drivers/iommu/intel-iommu.c +1 -1
@@ -2645,7 +2645,7 @@ static struct dmar_domain *dmar_insert_one_dev_info(struct intel_iommu *iommu, }if (info->ats_supported &&ecap_prs (iommu->ecap) && -pci_find_ext_capability (pdev,PCI_EXT_CAP_ID_PRI )) +pci_pri_supported (pdev)) info->pri_supported =1 ; } }
drivers/iommu/omap-iommu-debug.c +3 -0
@@ -98,8 +98,11 @@ static ssize_t debug_read_regs(struct file *file, char __user *userbuf,mutex_lock (&iommu_debug_lock); bytes =omap_iommu_dump_ctx (obj, p, count); +if (bytes <0 ) + goto err; bytes =simple_read_from_buffer (userbuf, count, ppos, buf, bytes); +err:mutex_unlock (&iommu_debug_lock);kfree (buf);
drivers/irqchip/irq-gic-v3-its.c +11 -4
@@ -3399,6 +3399,7 @@ static int its_irq_domain_alloc(struct irq_domain *domain, unsigned int virq,msi_alloc_info_t *info = args;struct its_device *its_dev = info->scratchpad[0 ].ptr;struct its_node *its = its_dev->its; +struct irq_data *irqd;irq_hw_number_t hwirq;int err;int i;
@@ -3418,7 +3419,9 @@ static int its_irq_domain_alloc(struct irq_domain *domain, unsigned int virq,irq_domain_set_hwirq_and_chip (domain, virq + i, hwirq + i, &its_irq_chip, its_dev); -irqd_set_single_target (irq_desc_get_irq_data (irq_to_desc (virq + i))); + irqd =irq_get_irq_data (virq + i); +irqd_set_single_target (irqd); +irqd_set_affinity_on_activate (irqd);pr_debug ("ID:%d pID:%d vID:%d\n" , (int )(hwirq + i - its_dev->event_map.lpi_base), (int )(hwirq + i), virq + i);
@@ -3971,18 +3974,22 @@ static void its_vpe_4_1_deschedule(struct its_vpe *vpe,static void its_vpe_4_1_invall (struct its_vpe *vpe) {void __iomem *rdbase; +unsigned long flags;u64 val; +int cpu; val =GICR_INVALLR_V ; val |=FIELD_PREP (GICR_INVALLR_VPEID , vpe->vpe_id);/* Target the redistributor this vPE is currently known on */ -raw_spin_lock (&gic_data_rdist_cpu (vpe->col_idx)->rd_lock); - rdbase =per_cpu_ptr (gic_rdists->rdist, vpe->col_idx)->rd_base; + cpu =vpe_to_cpuid_lock (vpe, &flags); +raw_spin_lock (&gic_data_rdist_cpu (cpu)->rd_lock); + rdbase =per_cpu_ptr (gic_rdists->rdist, cpu)->rd_base;gic_write_lpir (val, rdbase +GICR_INVALLR );wait_for_syncr (rdbase); -raw_spin_unlock (&gic_data_rdist_cpu (vpe->col_idx)->rd_lock); +raw_spin_unlock (&gic_data_rdist_cpu (cpu)->rd_lock); +vpe_to_cpuid_unlock (vpe, flags); }static int its_vpe_4_1_set_vcpu_affinity (struct irq_data *d,void *vcpu_info)
drivers/irqchip/irq-loongson-liointc.c +5 -5
@@ -60,7 +60,7 @@ static void liointc_chained_handle_irq(struct irq_desc *desc)if (!pending) {/* Always blame LPC IRQ if we have that bug */ if (handler->priv->has_lpc_irq_errata && - (handler->parent_int_map & ~gc->mask_cache & + (handler->parent_int_map & gc->mask_cache &BIT (LIOINTC_ERRATA_IRQ ))) pending =BIT (LIOINTC_ERRATA_IRQ );else
@@ -132,11 +132,11 @@ static void liointc_resume(struct irq_chip_generic *gc)irq_gc_lock_irqsave (gc, flags);/* Disable all at first */ writel (0xffffffff , gc->reg_base +LIOINTC_REG_INTC_DISABLE ); -/* Revert map cache */ +/* Restore map cache */ for (i =0 ; i <LIOINTC_CHIP_IRQ ; i++)writeb (priv->map_cache[i], gc->reg_base + i); -/* Revert mask cache */ -writel (~gc->mask_cache, gc->reg_base +LIOINTC_REG_INTC_ENABLE ); +/* Restore mask cache */ +writel (gc->mask_cache, gc->reg_base +LIOINTC_REG_INTC_ENABLE );irq_gc_unlock_irqrestore (gc, flags); }
@@ -244,7 +244,7 @@ int __init liointc_of_init(struct device_node *node, ct->chip.irq_mask_ack = irq_gc_mask_disable_reg; ct->chip.irq_set_type = liointc_set_type; - gc->mask_cache =0xffffffff ; + gc->mask_cache =0 ; priv->gc = gc;for (i =0 ; i <LIOINTC_NUM_PARENT ; i++) {
drivers/md/bcache/bcache.h +1 -1
@@ -264,7 +264,7 @@ struct bcache_device {#define BCACHE_DEV_UNLINK_DONE 2#define BCACHE_DEV_WB_RUNNING 3#define BCACHE_DEV_RATE_DW_RUNNING 4 -unsigned int nr_stripes; +int nr_stripes;unsigned int stripe_size;atomic_t *stripe_sectors_dirty;unsigned long *full_dirty_stripes;
drivers/md/bcache/bset.c +1 -1
@@ -322,7 +322,7 @@ int bch_btree_keys_alloc(struct btree_keys *b, b->page_order = page_order; - t->data = (void *)__get_free_pages (gfp, b->page_order); + t->data = (void *)__get_free_pages (__GFP_COMP|gfp, b->page_order);if (!t->data) goto err;
drivers/md/bcache/btree.c +1 -1
@@ -785,7 +785,7 @@ int bch_btree_cache_alloc(struct cache_set *c)mutex_init (&c->verify_lock); c->verify_ondisk = (void *) -__get_free_pages (GFP_KERNEL ,ilog2 (bucket_pages (c))); +__get_free_pages (GFP_KERNEL |__GFP_COMP,ilog2 (bucket_pages (c))); c->verify_data =mca_bucket_alloc (c, &ZERO_KEY ,GFP_KERNEL );
drivers/md/bcache/journal.c +2 -2
@@ -999,8 +999,8 @@ int bch_journal_alloc(struct cache_set *c) j->w[1 ].c = c;if (!(init_fifo (&j->pin,JOURNAL_PIN ,GFP_KERNEL )) || - !(j->w[0 ].data = (void *)__get_free_pages (GFP_KERNEL ,JSET_BITS )) || - !(j->w[1 ].data = (void *)__get_free_pages (GFP_KERNEL ,JSET_BITS ))) + !(j->w[0 ].data = (void *)__get_free_pages (GFP_KERNEL |__GFP_COMP,JSET_BITS )) || + !(j->w[1 ].data = (void *)__get_free_pages (GFP_KERNEL |__GFP_COMP,JSET_BITS )))return -ENOMEM ;return 0 ;
drivers/md/bcache/super.c +1 -1
@@ -1775,7 +1775,7 @@ void bch_cache_set_unregister(struct cache_set *c) }#define alloc_bucket_pages (gfp, c) \ - ((void *) __get_free_pages(__GFP_ZERO|gfp, ilog2(bucket_pages(c)))) + ((void *) __get_free_pages(__GFP_ZERO|__GFP_COMP|gfp, ilog2(bucket_pages(c))))struct cache_set *bch_cache_set_alloc (struct cache_sb *sb) {
drivers/md/bcache/writeback.c +9 -5
@@ -523,15 +523,19 @@ void bcache_dev_sectors_dirty_add(struct cache_set *c, unsigned int inode, uint64_t offset, int nr_sectors) {struct bcache_device *d = c->devices[inode]; -unsigned int stripe_offset, stripe, sectors_dirty; +unsigned int stripe_offset, sectors_dirty; +int stripe;if (!d)return ; + stripe =offset_to_stripe (d, offset); +if (stripe <0 ) +return ; +if (UUID_FLASH_ONLY (&c->uuids[inode]))atomic_long_add (nr_sectors, &c->flash_dev_dirty_sectors); - stripe =offset_to_stripe (d, offset); stripe_offset = offset & (d->stripe_size -1 );while (nr_sectors) {
@@ -571,12 +575,12 @@ static bool dirty_pred(struct keybuf *buf, struct bkey *k)static void refill_full_stripes (struct cached_dev *dc) {struct keybuf *buf = &dc->writeback_keys; -unsigned int start_stripe, stripe, next_stripe; +unsigned int start_stripe, next_stripe; +int stripe;bool wrapped = false; stripe =offset_to_stripe (&dc->disk,KEY_OFFSET (&buf->last_scanned)); - -if (stripe >= dc->disk.nr_stripes) +if (stripe <0 ) stripe =0 ; start_stripe = stripe;
drivers/md/bcache/writeback.h +17 -2
@@ -52,10 +52,22 @@ static inline uint64_t bcache_dev_sectors_dirty(struct bcache_device *d)return ret; } -static inline unsigned int offset_to_stripe (struct bcache_device *d, +static inline int offset_to_stripe (struct bcache_device *d,uint64_t offset) {do_div (offset, d->stripe_size); + +/* d->nr_stripes is in range [1, INT_MAX] */ +if (unlikely (offset >= d->nr_stripes)) { +pr_err ("Invalid stripe %llu (>= nr_stripes %d).\n" , + offset, d->nr_stripes); +return -EINVAL ; + } + +/* +* Here offset is definitly smaller than INT_MAX, +* return it as int will never overflow. +*/ return offset; }
@@ -63,7 +75,10 @@ static inline bool bcache_dev_stripe_dirty(struct cached_dev *dc,uint64_t offset, unsigned int nr_sectors) { - unsigned int stripe = offset_to_stripe(&dc->disk, offset); + int stripe = offset_to_stripe(&dc->disk, offset); + +if (stripe <0 ) +return false;while (1 ) {if (atomic_read (dc->disk.stripe_sectors_dirty + stripe))
drivers/md/dm-rq.c +0 -3
@@ -70,9 +70,6 @@ void dm_start_queue(struct request_queue *q)void dm_stop_queue (struct request_queue *q) { -if (blk_mq_queue_stopped (q)) -return ; -blk_mq_quiesce_queue (q); }
drivers/md/dm.c +2 -1
@@ -503,7 +503,8 @@ static int dm_blk_report_zones(struct gendisk *disk, sector_t sector, } args.tgt = tgt; - ret = tgt->type->report_zones (tgt, &args, nr_zones); + ret = tgt->type->report_zones (tgt, &args, + nr_zones - args.zone_idx);if (ret <0 ) goto out; } while (args.zone_idx < nr_zones &&
drivers/md/md-cluster.c +1 -0
@@ -1139,6 +1139,7 @@ static int resize_bitmaps(struct mddev *mddev, sector_t newsize, sector_t oldsiz bitmap =get_bitmap_from_slot (mddev, i);if (IS_ERR (bitmap)) {pr_err ("can't get bitmap from slot %d\n" , i); + bitmap =NULL ; goto out; } counts = &bitmap->counts;
drivers/md/raid5.c +2 -1
@@ -3604,6 +3604,7 @@ static int need_this_block(struct stripe_head *sh, struct stripe_head_state *s,* is missing/faulty, then we need to read everything we can. */ if (sh->raid_conf->level !=6 && + sh->raid_conf->rmw_level !=PARITY_DISABLE_RMW && sh->sector < sh->raid_conf->mddev->recovery_cp)/* reconstruct-write isn't being forced */ return 0 ;
@@ -4839,7 +4840,7 @@ static void handle_stripe(struct stripe_head *sh)* or to load a block that is being partially written. */ if (s.to_read || s.non_overwrite - || (conf->level ==6 && s.to_write && s.failed) + || (s.to_write && s.failed) || (s.syncing && (s.uptodate + s.compute < disks)) || s.replacing || s.expanding)
drivers/media/platform/qcom/venus/pm_helpers.c +4 -0
@@ -496,6 +496,10 @@ min_loaded_core(struct venus_inst *inst, u32 *min_coreid, u32 *min_load)list_for_each_entry (inst_pos, &core->instances, list) {if (inst_pos == inst)continue ; + +if (inst_pos->state !=INST_START ) +continue ; + vpp_freq = inst_pos->clk_data.codec_freq_data->vpp_freq; coreid = inst_pos->clk_data.core_id;
drivers/media/platform/rockchip/rga/rga-hw.c +16 -13
@@ -200,22 +200,25 @@ static void rga_cmd_set_trans_info(struct rga_ctx *ctx) dst_info.data.format = ctx->out.fmt->hw_format; dst_info.data.swap = ctx->out.fmt->color_swap; -if (ctx->in.fmt->hw_format >=RGA_COLOR_FMT_YUV422SP ) { -if (ctx->out.fmt->hw_format <RGA_COLOR_FMT_YUV422SP ) { -switch (ctx->in.colorspace) { -case V4L2_COLORSPACE_REC709 : - src_info.data.csc_mode = -RGA_SRC_CSC_MODE_BT709_R0 ; -break ; -default : - src_info.data.csc_mode = -RGA_SRC_CSC_MODE_BT601_R0 ; -break ; - } +/* +* CSC mode must only be set when the colorspace families differ between +* input and output. It must remain unset (zeroed) if both are the same. +*/ + +if (RGA_COLOR_FMT_IS_YUV (ctx->in.fmt->hw_format) && +RGA_COLOR_FMT_IS_RGB (ctx->out.fmt->hw_format)) { +switch (ctx->in.colorspace) { +case V4L2_COLORSPACE_REC709 : + src_info.data.csc_mode =RGA_SRC_CSC_MODE_BT709_R0 ; +break ; +default : + src_info.data.csc_mode =RGA_SRC_CSC_MODE_BT601_R0 ; +break ; } } -if (ctx->out.fmt->hw_format >=RGA_COLOR_FMT_YUV422SP ) { +if (RGA_COLOR_FMT_IS_RGB (ctx->in.fmt->hw_format) && +RGA_COLOR_FMT_IS_YUV (ctx->out.fmt->hw_format)) {switch (ctx->out.colorspace) {case V4L2_COLORSPACE_REC709 : dst_info.data.csc_mode =RGA_SRC_CSC_MODE_BT709_R0 ;
drivers/media/platform/rockchip/rga/rga-hw.h +5 -0
@@ -95,6 +95,11 @@#define RGA_COLOR_FMT_CP_8BPP 15#define RGA_COLOR_FMT_MASK 15 +#define RGA_COLOR_FMT_IS_YUV (fmt) \ + (((fmt) >= RGA_COLOR_FMT_YUV422SP) && ((fmt) < RGA_COLOR_FMT_CP_1BPP)) +#define RGA_COLOR_FMT_IS_RGB (fmt) \ + ((fmt) < RGA_COLOR_FMT_YUV422SP) +#define RGA_COLOR_NONE_SWAP 0#define RGA_COLOR_RB_SWAP 1#define RGA_COLOR_ALPHA_SWAP 2
drivers/media/platform/vsp1/vsp1_dl.c +2 -0
@@ -431,6 +431,8 @@ vsp1_dl_cmd_pool_create(struct vsp1_device *vsp1, enum vsp1_extcmd_type type,if (!pool)return NULL ; + pool->vsp1 = vsp1; +spin_lock_init (&pool->lock);INIT_LIST_HEAD (&pool->free);
drivers/mfd/arizona-core.c +18 -0
@@ -1426,6 +1426,15 @@ int arizona_dev_init(struct arizona *arizona)arizona_irq_exit (arizona); err_pm:pm_runtime_disable (arizona->dev); + +switch (arizona->pdata.clk32k_src) { +case ARIZONA_32KZ_MCLK1 : +case ARIZONA_32KZ_MCLK2 : +arizona_clk32k_disable (arizona); +break ; +default : +break ; + } err_reset:arizona_enable_reset (arizona);regulator_disable (arizona->dcvdd);
@@ -1448,6 +1457,15 @@ int arizona_dev_exit(struct arizona *arizona)regulator_disable (arizona->dcvdd);regulator_put (arizona->dcvdd); +switch (arizona->pdata.clk32k_src) { +case ARIZONA_32KZ_MCLK1 : +case ARIZONA_32KZ_MCLK2 : +arizona_clk32k_disable (arizona); +break ; +default : +break ; + } +mfd_remove_devices (arizona->dev);arizona_free_irq (arizona,ARIZONA_IRQ_UNDERCLOCKED , arizona);arizona_free_irq (arizona,ARIZONA_IRQ_OVERCLOCKED , arizona);
drivers/mfd/dln2.c +4 -0
@@ -287,7 +287,11 @@ static void dln2_rx(struct urb *urb) len = urb->actual_length -sizeof (struct dln2_header );if (handle ==DLN2_HANDLE_EVENT ) { +unsigned long flags; + +spin_lock_irqsave (&dln2->event_cb_lock, flags);dln2_run_event_callbacks (dln2, id, echo, data, len); +spin_unlock_irqrestore (&dln2->event_cb_lock, flags); }else {/* URB will be re-submitted in _dln2_transfer (free_rx_slot) */ if (dln2_transfer_complete (dln2, urb, handle, echo))
drivers/mmc/host/renesas_sdhi_internal_dmac.c +13 -5
@@ -229,15 +229,12 @@ static void renesas_sdhi_internal_dmac_issue_tasklet_fn(unsigned long arg) DTRAN_CTRL_DM_START); } -static void renesas_sdhi_internal_dmac_complete_tasklet_fn (unsigned long arg) +static bool renesas_sdhi_internal_dmac_complete (struct tmio_mmc_host *host) { -struct tmio_mmc_host *host = (struct tmio_mmc_host *)arg;enum dma_data_direction dir; -spin_lock_irq (&host->lock); -if (!host->data) - goto out; +return false;if (host->data->flags &MMC_DATA_READ ) dir =DMA_FROM_DEVICE ;
@@ -250,6 +247,17 @@ static void renesas_sdhi_internal_dmac_complete_tasklet_fn(unsigned long arg)if (dir ==DMA_FROM_DEVICE )clear_bit (SDHI_INTERNAL_DMAC_RX_IN_USE , &global_flags); +return true; +} + +static void renesas_sdhi_internal_dmac_complete_tasklet_fn (unsigned long arg) +{ +struct tmio_mmc_host *host = (struct tmio_mmc_host *)arg; + +spin_lock_irq (&host->lock); +if (!renesas_sdhi_internal_dmac_complete (host)) + goto out; +tmio_mmc_do_data_irq (host); out:spin_unlock_irq (&host->lock);
drivers/mtd/nand/raw/brcmnand/brcmnand.c +26 -0
@@ -1859,6 +1859,22 @@ static int brcmnand_edu_trans(struct brcmnand_host *host, u64 addr, u32 *buf,edu_writel (ctrl,EDU_STOP ,0 );/* force stop */ edu_readl (ctrl,EDU_STOP ); +if (!ret && edu_cmd ==EDU_CMD_READ ) { +u64 err_addr =0 ; + +/* +* check for ECC errors here, subpage ECC errors are +* retained in ECC error address register +*/ + err_addr =brcmnand_get_uncorrecc_addr (ctrl); +if (!err_addr) { + err_addr =brcmnand_get_correcc_addr (ctrl); +if (err_addr) + ret = -EUCLEAN ; + }else + ret = -EBADMSG ; + } +return ret; }
@@ -2065,6 +2081,7 @@ static int brcmnand_read(struct mtd_info *mtd, struct nand_chip *chip,u64 err_addr =0 ;int err;bool retry = true; +bool edu_err = false;dev_dbg (ctrl->dev,"read %llx -> %p\n" , (unsigned long long )addr, buf);
@@ -2082,6 +2099,10 @@ static int brcmnand_read(struct mtd_info *mtd, struct nand_chip *chip,else return -EIO ; } + +if (has_edu (ctrl) && err_addr) + edu_err = true; + }else {if (oob)memset (oob,0x99 , mtd->oobsize);
@@ -2129,6 +2150,11 @@ static int brcmnand_read(struct mtd_info *mtd, struct nand_chip *chip,if (mtd_is_bitflip (err)) {unsigned int corrected =brcmnand_count_corrected (ctrl); +/* in case of EDU correctable error we read again using PIO */ +if (edu_err) + err =brcmnand_read_by_pio (mtd, chip, addr, trans, buf, + oob, &err_addr); +dev_dbg (ctrl->dev,"corrected error at 0x%llx\n" , (unsigned long long )err_addr); mtd->ecc_stats.corrected += corrected;
drivers/mtd/nand/raw/fsl_upm.c +0 -1
@@ -62,7 +62,6 @@ static int fun_chip_ready(struct nand_chip *chip)static void fun_wait_rnb (struct fsl_upm_nand *fun) {if (fun->rnb_gpio[fun->mchip_number] >=0 ) { -struct mtd_info *mtd =nand_to_mtd (&fun->chip);int cnt =1000000 ;while (--cnt && !fun_chip_ready (&fun->chip))
drivers/net/ethernet/marvell/octeontx2/af/common.h +1 -1
@@ -43,7 +43,7 @@ struct qmem {void *base;dma_addr_t iova;int alloc_sz; -u8 entry_sz; +u16 entry_sz;u8 align;u32 qsize; };
drivers/net/ethernet/qualcomm/emac/emac.c +14 -3
@@ -473,13 +473,24 @@ static int emac_clks_phase1_init(struct platform_device *pdev, ret =clk_prepare_enable (adpt->clk[EMAC_CLK_CFG_AHB ]);if (ret) -return ret; + goto disable_clk_axi; ret =clk_set_rate (adpt->clk[EMAC_CLK_HIGH_SPEED ],19200000 );if (ret) -return ret; + goto disable_clk_cfg_ahb; + + ret =clk_prepare_enable (adpt->clk[EMAC_CLK_HIGH_SPEED ]); +if (ret) + goto disable_clk_cfg_ahb; -return clk_prepare_enable (adpt->clk[EMAC_CLK_HIGH_SPEED ]); +return 0 ; + +disable_clk_cfg_ahb: +clk_disable_unprepare (adpt->clk[EMAC_CLK_CFG_AHB ]); +disable_clk_axi: +clk_disable_unprepare (adpt->clk[EMAC_CLK_AXI ]); + +return ret; }/* Enable clocks; needs emac_clks_phase1_init to be called before */
drivers/net/ethernet/stmicro/stmmac/dwmac-ipq806x.c +1 -0
@@ -351,6 +351,7 @@ static int ipq806x_gmac_probe(struct platform_device *pdev) plat_dat->has_gmac = true; plat_dat->bsp_priv = gmac; plat_dat->fix_mac_speed = ipq806x_gmac_fix_mac_speed; + plat_dat->multicast_filter_bins =0 ; err =stmmac_dvr_probe (&pdev->dev, plat_dat, &stmmac_res);if (err)
drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c +3 -0
@@ -164,6 +164,9 @@ static void dwmac1000_set_filter(struct mac_device_info *hw, value =GMAC_FRAME_FILTER_PR |GMAC_FRAME_FILTER_PCF ; }else if (dev->flags &IFF_ALLMULTI ) { value =GMAC_FRAME_FILTER_PM ;/* pass all multi */ + }else if (!netdev_mc_empty (dev) && (mcbitslog2 ==0 )) { +/* Fall back to all multicast if we've no filter */ + value =GMAC_FRAME_FILTER_PM ; }else if (!netdev_mc_empty (dev)) {struct netdev_hw_addr *ha;
drivers/net/wireless/realtek/rtw88/pci.c +9 -0
@@ -14,8 +14,11 @@#include "debug.h" static bool rtw_disable_msi; +static bool rtw_pci_disable_aspm;module_param_named (disable_msi, rtw_disable_msi, bool,0644 ); +module_param_named (disable_aspm, rtw_pci_disable_aspm, bool,0644 );MODULE_PARM_DESC (disable_msi,"Set Y to disable MSI interrupt support" ); +MODULE_PARM_DESC (disable_aspm,"Set Y to disable PCI ASPM support" );static u32 rtw_pci_tx_queue_idx_addr[] = { [RTW_TX_QUEUE_BK ] =RTK_PCI_TXBD_IDX_BKQ ,
@@ -1189,6 +1192,9 @@ static void rtw_pci_clkreq_set(struct rtw_dev *rtwdev, bool enable)u8 value;int ret; +if (rtw_pci_disable_aspm) +return ; + ret =rtw_dbi_read8 (rtwdev,RTK_PCIE_LINK_CFG , &value);if (ret) {rtw_err (rtwdev,"failed to read CLKREQ_L1, ret=%d" , ret);
@@ -1208,6 +1214,9 @@ static void rtw_pci_aspm_set(struct rtw_dev *rtwdev, bool enable)u8 value;int ret; +if (rtw_pci_disable_aspm) +return ; + ret =rtw_dbi_read8 (rtwdev,RTK_PCIE_LINK_CFG , &value);if (ret) {rtw_err (rtwdev,"failed to read ASPM, ret=%d" , ret);
drivers/nvdimm/security.c +9 -4
@@ -450,14 +450,19 @@ void __nvdimm_security_overwrite_query(struct nvdimm *nvdimm)else dev_dbg (&nvdimm->dev,"overwrite completed\n" ); -if (nvdimm->sec.overwrite_state) -sysfs_notify_dirent (nvdimm->sec.overwrite_state); +/* +* Mark the overwrite work done and update dimm security flags, +* then send a sysfs event notification to wake up userspace +* poll threads to picked up the changed state. +*/ nvdimm->sec.overwrite_tmo =0 ;clear_bit (NDD_SECURITY_OVERWRITE , &nvdimm->flags);clear_bit (NDD_WORK_PENDING , &nvdimm->flags); -put_device (&nvdimm->dev); nvdimm->sec.flags =nvdimm_security_flags (nvdimm,NVDIMM_USER ); - nvdimm->sec.flags =nvdimm_security_flags (nvdimm,NVDIMM_MASTER ); + nvdimm->sec.ext_flags =nvdimm_security_flags (nvdimm,NVDIMM_MASTER ); +if (nvdimm->sec.overwrite_state) +sysfs_notify_dirent (nvdimm->sec.overwrite_state); +put_device (&nvdimm->dev); }void nvdimm_security_overwrite_query (struct work_struct *work)
drivers/nvme/host/core.c +15 -0
@@ -368,6 +368,16 @@ bool nvme_change_ctrl_state(struct nvme_ctrl *ctrl,break ; }break ; +case NVME_CTRL_DELETING_NOIO : +switch (old_state) { +case NVME_CTRL_DELETING : +case NVME_CTRL_DEAD : + changed = true; +/* FALLTHRU */ +default : +break ; + } +break ;case NVME_CTRL_DEAD :switch (old_state) {case NVME_CTRL_DELETING :
@@ -405,6 +415,7 @@ static bool nvme_state_terminal(struct nvme_ctrl *ctrl)case NVME_CTRL_CONNECTING :return false;case NVME_CTRL_DELETING : +case NVME_CTRL_DELETING_NOIO :case NVME_CTRL_DEAD :return true;default :
@@ -3280,6 +3291,7 @@ static ssize_t nvme_sysfs_show_state(struct device *dev, [NVME_CTRL_RESETTING] = "resetting", [NVME_CTRL_CONNECTING] = "connecting", [NVME_CTRL_DELETING] = "deleting", + [NVME_CTRL_DELETING_NOIO]= "deleting (no IO)", [NVME_CTRL_DEAD] = "dead", };
@@ -3860,6 +3872,9 @@ void nvme_remove_namespaces(struct nvme_ctrl *ctrl)if (ctrl->state ==NVME_CTRL_DEAD )nvme_kill_queues (ctrl); +/* this is a no-op when called from the controller reset handler */ +nvme_change_ctrl_state (ctrl,NVME_CTRL_DELETING_NOIO ); +down_write (&ctrl->namespaces_rwsem);list_splice_init (&ctrl->namespaces, &ns_list);up_write (&ctrl->namespaces_rwsem);
drivers/nvme/host/fabrics.c +1 -1
@@ -547,7 +547,7 @@ static struct nvmf_transport_ops *nvmf_lookup_transport(blk_status_t nvmf_fail_nonready_command (struct nvme_ctrl *ctrl,struct request *rq) { -if (ctrl->state !=NVME_CTRL_DELETING && +if (ctrl->state !=NVME_CTRL_DELETING_NOIO && ctrl->state !=NVME_CTRL_DEAD && !blk_noretry_request (rq) && !(rq->cmd_flags &REQ_NVME_MPATH ))return BLK_STS_RESOURCE ;
drivers/nvme/host/fabrics.h +2 -1
@@ -182,7 +182,8 @@ bool nvmf_ip_options_match(struct nvme_ctrl *ctrl,static inline bool nvmf_check_ready (struct nvme_ctrl *ctrl,struct request *rq,bool queue_live) { -if (likely (ctrl->state ==NVME_CTRL_LIVE )) +if (likely (ctrl->state ==NVME_CTRL_LIVE || + ctrl->state ==NVME_CTRL_DELETING ))return true;return __nvmf_check_ready (ctrl, rq, queue_live); }
drivers/nvme/host/fc.c +1 -0
@@ -800,6 +800,7 @@ nvme_fc_ctrl_connectivity_loss(struct nvme_fc_ctrl *ctrl)break ;case NVME_CTRL_DELETING : +case NVME_CTRL_DELETING_NOIO :default :/* no action to take - let it delete */ break ;
drivers/nvme/host/multipath.c +15 -3
@@ -167,9 +167,18 @@ void nvme_mpath_clear_ctrl_paths(struct nvme_ctrl *ctrl)static bool nvme_path_is_disabled (struct nvme_ns *ns) { -return ns->ctrl->state !=NVME_CTRL_LIVE || -test_bit (NVME_NS_ANA_PENDING , &ns->flags) || -test_bit (NVME_NS_REMOVING , &ns->flags); +/* +* We don't treat NVME_CTRL_DELETING as a disabled path as I/O should +* still be able to complete assuming that the controller is connected. +* Otherwise it will fail immediately and return to the requeue list. +*/ +if (ns->ctrl->state !=NVME_CTRL_LIVE && + ns->ctrl->state !=NVME_CTRL_DELETING ) +return true; +if (test_bit (NVME_NS_ANA_PENDING , &ns->flags) || +test_bit (NVME_NS_REMOVING , &ns->flags)) +return true; +return false; }static struct nvme_ns *__nvme_find_path (struct nvme_ns_head *head,int node)
@@ -575,6 +584,9 @@ static void nvme_ana_work(struct work_struct *work) { struct nvme_ctrl *ctrl = container_of(work, struct nvme_ctrl, ana_work); +if (ctrl->state !=NVME_CTRL_LIVE ) +return ; +nvme_read_ana_log (ctrl); }
drivers/nvme/host/nvme.h +1 -0
@@ -183,6 +183,7 @@ enum nvme_ctrl_state {NVME_CTRL_RESETTING ,NVME_CTRL_CONNECTING ,NVME_CTRL_DELETING , +NVME_CTRL_DELETING_NOIO , NVME_CTRL_DEAD, };
drivers/nvme/host/rdma.c +6 -4
@@ -1023,11 +1023,12 @@ static int nvme_rdma_setup_ctrl(struct nvme_rdma_ctrl *ctrl, bool new) changed =nvme_change_ctrl_state (&ctrl->ctrl,NVME_CTRL_LIVE );if (!changed) {/* -* state change failure is ok if we're in DELETING state, +* state change failure is ok if we started ctrl delete, * unless we're during creation of a new controller to * avoid races with teardown flow. */ -WARN_ON_ONCE (ctrl->ctrl.state !=NVME_CTRL_DELETING ); +WARN_ON_ONCE (ctrl->ctrl.state !=NVME_CTRL_DELETING && + ctrl->ctrl.state !=NVME_CTRL_DELETING_NOIO );WARN_ON_ONCE (new); ret = -EINVAL ; goto destroy_io;
@@ -1080,8 +1081,9 @@ static void nvme_rdma_error_recovery_work(struct work_struct *work)blk_mq_unquiesce_queue (ctrl->ctrl.admin_q);if (!nvme_change_ctrl_state (&ctrl->ctrl,NVME_CTRL_CONNECTING )) { -/* state change failure is ok if we're in DELETING state */ -WARN_ON_ONCE (ctrl->ctrl.state !=NVME_CTRL_DELETING ); +/* state change failure is ok if we started ctrl delete */ +WARN_ON_ONCE (ctrl->ctrl.state !=NVME_CTRL_DELETING && + ctrl->ctrl.state !=NVME_CTRL_DELETING_NOIO );return ; }
drivers/nvme/host/tcp.c +9 -6
@@ -1938,11 +1938,12 @@ static int nvme_tcp_setup_ctrl(struct nvme_ctrl *ctrl, bool new)if (!nvme_change_ctrl_state (ctrl,NVME_CTRL_LIVE )) {/* -* state change failure is ok if we're in DELETING state, +* state change failure is ok if we started ctrl delete, * unless we're during creation of a new controller to * avoid races with teardown flow. */ -WARN_ON_ONCE (ctrl->state !=NVME_CTRL_DELETING ); +WARN_ON_ONCE (ctrl->state !=NVME_CTRL_DELETING && + ctrl->state !=NVME_CTRL_DELETING_NOIO );WARN_ON_ONCE (new); ret = -EINVAL ; goto destroy_io;
@@ -1998,8 +1999,9 @@ static void nvme_tcp_error_recovery_work(struct work_struct *work)blk_mq_unquiesce_queue (ctrl->admin_q);if (!nvme_change_ctrl_state (ctrl,NVME_CTRL_CONNECTING )) { -/* state change failure is ok if we're in DELETING state */ -WARN_ON_ONCE (ctrl->state !=NVME_CTRL_DELETING ); +/* state change failure is ok if we started ctrl delete */ +WARN_ON_ONCE (ctrl->state !=NVME_CTRL_DELETING && + ctrl->state !=NVME_CTRL_DELETING_NOIO );return ; }
@@ -2034,8 +2036,9 @@ static void nvme_reset_ctrl_work(struct work_struct *work)nvme_tcp_teardown_ctrl (ctrl, false);if (!nvme_change_ctrl_state (ctrl,NVME_CTRL_CONNECTING )) { -/* state change failure is ok if we're in DELETING state */ -WARN_ON_ONCE (ctrl->state !=NVME_CTRL_DELETING ); +/* state change failure is ok if we started ctrl delete */ +WARN_ON_ONCE (ctrl->state !=NVME_CTRL_DELETING && + ctrl->state !=NVME_CTRL_DELETING_NOIO );return ; }
drivers/pci/ats.c +15 -0
@@ -309,6 +309,21 @@ int pci_prg_resp_pasid_required(struct pci_dev *pdev) return pdev->pasid_required; } + +/** +* pci_pri_supported - Check if PRI is supported. +* @pdev: PCI device structure +* +* Returns true if PRI capability is present, false otherwise. +*/ +bool pci_pri_supported (struct pci_dev *pdev) +{ +/* VFs share the PF PRI */ +if (pci_physfn (pdev)->pri_cap) +return true; +return false; +} +EXPORT_SYMBOL_GPL (pci_pri_supported);#endif /* CONFIG_PCI_PRI */ #ifdef CONFIG_PCI_PASID
drivers/pci/bus.c +1 -5
@@ -322,12 +322,8 @@ void pci_bus_add_device(struct pci_dev *dev) dev->match_driver = true; retval =device_attach (&dev->dev); -if (retval <0 && retval != -EPROBE_DEFER ) { +if (retval <0 && retval != -EPROBE_DEFER )pci_warn (dev,"device attach failed (%d)\n" , retval); -pci_proc_detach_device (dev); -pci_remove_sysfs_dev_files (dev); -return ; - }pci_dev_assign_added (dev, true); }
drivers/pci/controller/dwc/pcie-qcom.c +40 -1
68 lines not on this page · raw message
drivers/pci/hotplug/acpiphp_glue.c +11 -3
@@ -122,13 +122,21 @@ static struct acpiphp_context *acpiphp_grab_context(struct acpi_device *adev)struct acpiphp_context *context;acpi_lock_hp_context (); + context =acpiphp_get_context (adev); -if (!context || context->func.parent->is_going_away) { -acpi_unlock_hp_context (); -return NULL ; +if (!context) + goto unlock; + +if (context->func.parent->is_going_away) { +acpiphp_put_context (context); + context =NULL ; + goto unlock; } +get_bridge (context->func.parent);acpiphp_put_context (context); + +unlock:acpi_unlock_hp_context ();return context; }
drivers/pci/quirks.c +4 -1
@@ -5207,7 +5207,8 @@ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_SERVERWORKS, 0x0422, quirk_no_ext_tags);*/ static void quirk_amd_harvest_no_ats (struct pci_dev *pdev) { -if (pdev->device ==0x7340 && pdev->revision !=0xc5 ) +if ((pdev->device ==0x7312 && pdev->revision !=0x00 ) || + (pdev->device ==0x7340 && pdev->revision !=0xc5 ))return ;pci_info (pdev,"disabling ATS\n" );
@@ -5218,6 +5219,8 @@ static void quirk_amd_harvest_no_ats(struct pci_dev *pdev)DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_ATI ,0x98e4 , quirk_amd_harvest_no_ats);/* AMD Iceland dGPU */ DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_ATI ,0x6900 , quirk_amd_harvest_no_ats); +/* AMD Navi10 dGPU */ +DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_ATI ,0x7312 , quirk_amd_harvest_no_ats);/* AMD Navi14 dGPU */ DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_ATI ,0x7340 , quirk_amd_harvest_no_ats);#endif /* CONFIG_PCI_ATS */
drivers/pinctrl/pinctrl-ingenic.c +5 -4
@@ -1810,9 +1810,9 @@ static void ingenic_gpio_irq_ack(struct irq_data *irqd)*/ high =ingenic_gpio_get_value (jzgc, irq);if (high) -irq_set_type (jzgc, irq,IRQ_TYPE_EDGE_FALLING ); +irq_set_type (jzgc, irq,IRQ_TYPE_LEVEL_LOW );else -irq_set_type (jzgc, irq,IRQ_TYPE_EDGE_RISING ); +irq_set_type (jzgc, irq,IRQ_TYPE_LEVEL_HIGH ); }if (jzgc->jzpc->info->version >=ID_JZ4760 )
@@ -1848,7 +1848,7 @@ static int ingenic_gpio_irq_set_type(struct irq_data *irqd, unsigned int type)*/ bool high =ingenic_gpio_get_value (jzgc, irqd->hwirq); - type = high ?IRQ_TYPE_EDGE_FALLING :IRQ_TYPE_EDGE_RISING ; + type = high ?IRQ_TYPE_LEVEL_LOW :IRQ_TYPE_LEVEL_HIGH ; }irq_set_type (jzgc, irqd->hwirq, type);
@@ -1955,7 +1955,8 @@ static int ingenic_gpio_get_direction(struct gpio_chip *gc, unsigned int offset)unsigned int pin = gc->base + offset;if (jzpc->info->version >=ID_JZ4760 ) { -if (ingenic_get_pin_config (jzpc, pin,JZ4760_GPIO_PAT1 )) +if (ingenic_get_pin_config (jzpc, pin,JZ4760_GPIO_INT ) || +ingenic_get_pin_config (jzpc, pin,JZ4760_GPIO_PAT1 ))return GPIO_LINE_DIRECTION_IN ;return GPIO_LINE_DIRECTION_OUT ; }
drivers/platform/chrome/cros_ec_ishtp.c +3 -1
@@ -660,8 +660,10 @@ static int cros_ec_ishtp_probe(struct ishtp_cl_device *cl_device)/* Register croc_ec_dev mfd */ rv =cros_ec_dev_init (client_data); -if (rv) +if (rv) { +down_write (&init_lock); goto end_cros_ec_dev_init_error; + }return 0 ;
drivers/pwm/pwm-bcm-iproc.c +7 -2
@@ -85,8 +85,6 @@ static void iproc_pwmc_get_state(struct pwm_chip *chip, struct pwm_device *pwm,u64 tmp, multi, rate;u32 value, prescale; - rate =clk_get_rate (ip->clk); - value =readl (ip->base +IPROC_PWM_CTRL_OFFSET );if (value &BIT (IPROC_PWM_CTRL_EN_SHIFT (pwm->hwpwm)))
@@ -99,6 +97,13 @@ static void iproc_pwmc_get_state(struct pwm_chip *chip, struct pwm_device *pwm,else state->polarity =PWM_POLARITY_INVERSED ; + rate =clk_get_rate (ip->clk); +if (rate ==0 ) { + state->period =0 ; + state->duty_cycle =0 ; +return ; + } + value =readl (ip->base +IPROC_PWM_PRESCALE_OFFSET ); prescale = value >>IPROC_PWM_PRESCALE_SHIFT (pwm->hwpwm); prescale &=IPROC_PWM_PRESCALE_MAX ;
drivers/remoteproc/qcom_q6v5.c +2 -0
@@ -153,6 +153,8 @@ int qcom_q6v5_request_stop(struct qcom_q6v5 *q6v5) {int ret; + q6v5->running = false; +qcom_smem_state_update_bits (q6v5->state,BIT (q6v5->stop_bit),BIT (q6v5->stop_bit));
drivers/remoteproc/qcom_q6v5_mss.c +8 -3
@@ -408,6 +408,12 @@ static int q6v5_load(struct rproc *rproc, const struct firmware *fw) {struct q6v5 *qproc = rproc->priv; +/* MBA is restricted to a maximum size of 1M */ +if (fw->size > qproc->mba_size || fw->size >SZ_1M ) { +dev_err (qproc->dev,"MBA firmware load failed\n" ); +return -EINVAL ; + } +memcpy (qproc->mba_region, fw->data, fw->size);return 0 ;
@@ -1139,15 +1145,14 @@ static int q6v5_mpss_load(struct q6v5 *qproc) }else if (phdr->p_filesz) {/* Replace "xxx.xxx" with "xxx.bxx" */ sprintf (fw_name + fw_name_len -3 ,"b%02d" , i); - ret =request_firmware (&seg_fw, fw_name, qproc->dev); + ret =request_firmware_into_buf (&seg_fw, fw_name, qproc->dev, + ptr, phdr->p_filesz);if (ret) {dev_err (qproc->dev,"failed to load %s\n" , fw_name);iounmap (ptr); goto release_firmware; } -memcpy (ptr, seg_fw->data, seg_fw->size); -release_firmware (seg_fw); }
drivers/rtc/rtc-cpcap.c +1 -1
@@ -261,7 +261,7 @@ static int cpcap_rtc_probe(struct platform_device *pdev)return PTR_ERR (rtc->rtc_dev); rtc->rtc_dev->ops = &cpcap_rtc_ops; - rtc->rtc_dev->range_max = (1 <<14 ) *SECS_PER_DAY -1 ; + rtc->rtc_dev->range_max = (timeu64_t) (DAY_MASK +1 ) *SECS_PER_DAY -1 ; err =cpcap_get_vendor (dev, rtc->regmap, &rtc->vendor);if (err)
drivers/rtc/rtc-pl031.c +1 -0
@@ -275,6 +275,7 @@ static int pl031_set_alarm(struct device *dev, struct rtc_wkalrm *alarm)struct pl031_local *ldata =dev_get_drvdata (dev);writel (rtc_tm_to_time64 (&alarm->time), ldata->base +RTC_MR ); +pl031_alarm_irq_enable (dev, alarm->enabled);return 0 ; }
drivers/scsi/lpfc/lpfc_nvmet.c +1 -1
@@ -1914,7 +1914,7 @@ lpfc_nvmet_destroy_targetport(struct lpfc_hba *phba) } tgtp->tport_unreg_cmp = &tport_unreg_cmp;nvmet_fc_unregister_targetport (phba->targetport); -if (!wait_for_completion_timeout (tgtp->tport_unreg_cmp, +if (!wait_for_completion_timeout (&tport_unreg_cmp,msecs_to_jiffies (LPFC_NVMET_WAIT_TMO )))lpfc_printf_log (phba,KERN_ERR ,LOG_NVME , "6179 Unreg targetport x%px timeout "
drivers/staging/media/rkisp1/rkisp1-isp.c +12 -13
@@ -25,7 +25,6 @@#define RKISP1_DIR_SRC BIT(0)#define RKISP1_DIR_SINK BIT(1) -#define RKISP1_DIR_SINK_SRC (RKISP1_DIR_SINK | RKISP1_DIR_SRC)/* * NOTE: MIPI controller and input MUX are also configured in this file.
@@ -69,84 +68,84 @@ static const struct rkisp1_isp_mbus_info rkisp1_isp_formats[] = { .mipi_dt = RKISP1_CIF_CSI2_DT_RAW10, .bayer_pat = RKISP1_RAW_RGGB, .bus_width = 10, - .direction = RKISP1_DIR_SINK_SRC, + .direction = RKISP1_DIR_SINK | RKISP1_DIR_SRC, }, { .mbus_code = MEDIA_BUS_FMT_SBGGR10_1X10, .fmt_type = RKISP1_FMT_BAYER, .mipi_dt = RKISP1_CIF_CSI2_DT_RAW10, .bayer_pat = RKISP1_RAW_BGGR, .bus_width = 10, - .direction = RKISP1_DIR_SINK_SRC, + .direction = RKISP1_DIR_SINK | RKISP1_DIR_SRC, }, { .mbus_code = MEDIA_BUS_FMT_SGBRG10_1X10, .fmt_type = RKISP1_FMT_BAYER, .mipi_dt = RKISP1_CIF_CSI2_DT_RAW10, .bayer_pat = RKISP1_RAW_GBRG, .bus_width = 10, - .direction = RKISP1_DIR_SINK_SRC, + .direction = RKISP1_DIR_SINK | RKISP1_DIR_SRC, }, { .mbus_code = MEDIA_BUS_FMT_SGRBG10_1X10, .fmt_type = RKISP1_FMT_BAYER, .mipi_dt = RKISP1_CIF_CSI2_DT_RAW10, .bayer_pat = RKISP1_RAW_GRBG, .bus_width = 10, - .direction = RKISP1_DIR_SINK_SRC, + .direction = RKISP1_DIR_SINK | RKISP1_DIR_SRC, }, { .mbus_code = MEDIA_BUS_FMT_SRGGB12_1X12, .fmt_type = RKISP1_FMT_BAYER, .mipi_dt = RKISP1_CIF_CSI2_DT_RAW12, .bayer_pat = RKISP1_RAW_RGGB, .bus_width = 12, - .direction = RKISP1_DIR_SINK_SRC, + .direction = RKISP1_DIR_SINK | RKISP1_DIR_SRC, }, { .mbus_code = MEDIA_BUS_FMT_SBGGR12_1X12, .fmt_type = RKISP1_FMT_BAYER, .mipi_dt = RKISP1_CIF_CSI2_DT_RAW12, .bayer_pat = RKISP1_RAW_BGGR, .bus_width = 12, - .direction = RKISP1_DIR_SINK_SRC, + .direction = RKISP1_DIR_SINK | RKISP1_DIR_SRC, }, { .mbus_code = MEDIA_BUS_FMT_SGBRG12_1X12, .fmt_type = RKISP1_FMT_BAYER, .mipi_dt = RKISP1_CIF_CSI2_DT_RAW12, .bayer_pat = RKISP1_RAW_GBRG, .bus_width = 12, - .direction = RKISP1_DIR_SINK_SRC, + .direction = RKISP1_DIR_SINK | RKISP1_DIR_SRC, }, { .mbus_code = MEDIA_BUS_FMT_SGRBG12_1X12, .fmt_type = RKISP1_FMT_BAYER, .mipi_dt = RKISP1_CIF_CSI2_DT_RAW12, .bayer_pat = RKISP1_RAW_GRBG, .bus_width = 12, - .direction = RKISP1_DIR_SINK_SRC, + .direction = RKISP1_DIR_SINK | RKISP1_DIR_SRC, }, { .mbus_code = MEDIA_BUS_FMT_SRGGB8_1X8, .fmt_type = RKISP1_FMT_BAYER, .mipi_dt = RKISP1_CIF_CSI2_DT_RAW8, .bayer_pat = RKISP1_RAW_RGGB, .bus_width = 8, - .direction = RKISP1_DIR_SINK_SRC, + .direction = RKISP1_DIR_SINK | RKISP1_DIR_SRC, }, { .mbus_code = MEDIA_BUS_FMT_SBGGR8_1X8, .fmt_type = RKISP1_FMT_BAYER, .mipi_dt = RKISP1_CIF_CSI2_DT_RAW8, .bayer_pat = RKISP1_RAW_BGGR, .bus_width = 8, - .direction = RKISP1_DIR_SINK_SRC, + .direction = RKISP1_DIR_SINK | RKISP1_DIR_SRC, }, { .mbus_code = MEDIA_BUS_FMT_SGBRG8_1X8, .fmt_type = RKISP1_FMT_BAYER, .mipi_dt = RKISP1_CIF_CSI2_DT_RAW8, .bayer_pat = RKISP1_RAW_GBRG, .bus_width = 8, - .direction = RKISP1_DIR_SINK_SRC, + .direction = RKISP1_DIR_SINK | RKISP1_DIR_SRC, }, { .mbus_code = MEDIA_BUS_FMT_SGRBG8_1X8, .fmt_type = RKISP1_FMT_BAYER, .mipi_dt = RKISP1_CIF_CSI2_DT_RAW8, .bayer_pat = RKISP1_RAW_GRBG, .bus_width = 8, - .direction = RKISP1_DIR_SINK_SRC, + .direction = RKISP1_DIR_SINK | RKISP1_DIR_SRC, }, { .mbus_code = MEDIA_BUS_FMT_YUYV8_1X16, .fmt_type = RKISP1_FMT_YUV,
drivers/usb/serial/ftdi_sio.c +18 -19
@@ -2480,12 +2480,11 @@ static int ftdi_prepare_write_buffer(struct usb_serial_port *port,#define FTDI_RS_ERR_MASK (FTDI_RS_BI | FTDI_RS_PE | FTDI_RS_FE | FTDI_RS_OE)static int ftdi_process_packet (struct usb_serial_port *port, -struct ftdi_private *priv,char *packet,int len) +struct ftdi_private *priv,unsigned char *buf,int len) { +unsigned char status;int i; -char status;char flag; -char *ch;if (len <2 ) {dev_dbg (&port->dev,"malformed packet\n" );
@@ -2495,7 +2494,7 @@ static int ftdi_process_packet(struct usb_serial_port *port,/* Compare new line status to the old one, signal if different/ N.B. packet may be processed more than once, but differences are only processed once. */ - status = packet[0 ] &FTDI_STATUS_B0_MASK ; + status = buf[0 ] &FTDI_STATUS_B0_MASK ;if (status != priv->prev_status) {char diff_status = status ^ priv->prev_status;
@@ -2521,13 +2520,12 @@ static int ftdi_process_packet(struct usb_serial_port *port, }/* save if the transmitter is empty or not */ -if (packet[1 ] &FTDI_RS_TEMT ) +if (buf[1 ] &FTDI_RS_TEMT ) priv->transmit_empty =1 ;else priv->transmit_empty =0 ; - len -=2 ; -if (!len) +if (len ==2 )return 0 ;/* status only */ /*
@@ -2535,40 +2533,41 @@ static int ftdi_process_packet(struct usb_serial_port *port,* data payload to avoid over-reporting. */ flag =TTY_NORMAL ; -if (packet[1 ] &FTDI_RS_ERR_MASK ) { +if (buf[1 ] &FTDI_RS_ERR_MASK ) {/* Break takes precedence over parity, which takes precedence * over framing errors */ -if (packet[1 ] &FTDI_RS_BI ) { +if (buf[1 ] &FTDI_RS_BI ) { flag =TTY_BREAK ; port->icount.brk++;usb_serial_handle_break (port); - }else if (packet[1 ] &FTDI_RS_PE ) { + }else if (buf[1 ] &FTDI_RS_PE ) { flag =TTY_PARITY ; port->icount.parity++; - }else if (packet[1 ] &FTDI_RS_FE ) { + }else if (buf[1 ] &FTDI_RS_FE ) { flag =TTY_FRAME ; port->icount.frame++; }/* Overrun is special, not associated with a char */ -if (packet[1 ] &FTDI_RS_OE ) { +if (buf[1 ] &FTDI_RS_OE ) { port->icount.overrun++;tty_insert_flip_char (&port->port,0 ,TTY_OVERRUN ); } } - port->icount.rx += len; - ch = packet +2 ; + port->icount.rx += len -2 ;if (port->port.console && port->sysrq) { -for (i =0 ; i < len; i++, ch++) { -if (!usb_serial_handle_sysrq_char (port, *ch)) -tty_insert_flip_char (&port->port, *ch, flag); +for (i =2 ; i < len; i++) { +if (usb_serial_handle_sysrq_char (port, buf[i])) +continue ; +tty_insert_flip_char (&port->port, buf[i], flag); } }else { -tty_insert_flip_string_fixed_flag (&port->port, ch, flag, len); +tty_insert_flip_string_fixed_flag (&port->port, buf +2 , flag, + len -2 ); } -return len; +return len -2 ; }static void ftdi_process_read_urb (struct urb *urb)
drivers/vdpa/vdpa_sim/vdpa_sim.c +2 -1
@@ -330,6 +330,7 @@ static struct vdpasim *vdpasim_create(void)INIT_WORK (&vdpasim->work, vdpasim_work);spin_lock_init (&vdpasim->lock); +spin_lock_init (&vdpasim->iommu_lock); dev = &vdpasim->vdpa.dev; dev->coherent_dma_mask =DMA_BIT_MASK (64 );
@@ -520,7 +521,7 @@ static void vdpasim_get_config(struct vdpa_device *vdpa, unsigned int offset,struct vdpasim *vdpasim =vdpa_to_sim (vdpa);if (offset + len <sizeof (struct virtio_net_config )) -memcpy (buf, &vdpasim->config + offset, len); +memcpy (buf, (u8 *)&vdpasim->config + offset, len); } static void vdpasim_set_config(struct vdpa_device *vdpa, unsigned int offset,
drivers/watchdog/f71808e_wdt.c +10 -3
@@ -690,9 +690,9 @@ static int __init watchdog_init(int sioaddr)* into the module have been registered yet. */ watchdog.sioaddr = sioaddr; - watchdog.ident.options =WDIOC_SETTIMEOUT - |WDIOF_MAGICCLOSE - |WDIOF_KEEPALIVEPING ; + watchdog.ident.options =WDIOF_MAGICCLOSE + |WDIOF_KEEPALIVEPING + |WDIOF_CARDRESET ; snprintf(watchdog.ident.identity, sizeof(watchdog.ident.identity), "%s watchdog",
@@ -706,6 +706,13 @@ static int __init watchdog_init(int sioaddr) wdt_conf =superio_inb (sioaddr,F71808FG_REG_WDT_CONF ); watchdog.caused_reboot = wdt_conf &BIT (F71808FG_FLAG_WDTMOUT_STS ); +/* +* We don't want WDTMOUT_STS to stick around till regular reboot. +* Write 1 to the bit to clear it to zero. +*/ +superio_outb (sioaddr,F71808FG_REG_WDT_CONF , + wdt_conf |BIT (F71808FG_FLAG_WDTMOUT_STS )); +superio_exit (sioaddr); err =watchdog_set_timeout (timeout);
drivers/watchdog/rti_wdt.c +2 -0
@@ -211,6 +211,7 @@ static int rti_wdt_probe(struct platform_device *pdev) err_iomap:pm_runtime_put_sync (&pdev->dev); +pm_runtime_disable (&pdev->dev);return ret; }
@@ -221,6 +222,7 @@ static int rti_wdt_remove(struct platform_device *pdev)watchdog_unregister_device (&wdt->wdd);pm_runtime_put (&pdev->dev); +pm_runtime_disable (&pdev->dev);return 0 ; }
drivers/watchdog/watchdog_dev.c +9 -9
@@ -994,6 +994,15 @@ static int watchdog_cdev_register(struct watchdog_device *wdd)if (IS_ERR_OR_NULL (watchdog_kworker))return -ENODEV ; +device_initialize (&wd_data->dev); + wd_data->dev.devt =MKDEV (MAJOR (watchdog_devt), wdd->id); + wd_data->dev.class = &watchdog_class; + wd_data->dev.parent = wdd->parent; + wd_data->dev.groups = wdd->groups; + wd_data->dev.release = watchdog_core_data_release; +dev_set_drvdata (&wd_data->dev, wdd); +dev_set_name (&wd_data->dev,"watchdog%d" , wdd->id); +kthread_init_work (&wd_data->work, watchdog_ping_work);hrtimer_init (&wd_data->timer,CLOCK_MONOTONIC ,HRTIMER_MODE_REL_HARD ); wd_data->timer.function = watchdog_timer_expired;
@@ -1014,15 +1023,6 @@ static int watchdog_cdev_register(struct watchdog_device *wdd) } } -device_initialize (&wd_data->dev); - wd_data->dev.devt =MKDEV (MAJOR (watchdog_devt), wdd->id); - wd_data->dev.class = &watchdog_class; - wd_data->dev.parent = wdd->parent; - wd_data->dev.groups = wdd->groups; - wd_data->dev.release = watchdog_core_data_release; -dev_set_drvdata (&wd_data->dev, wdd); -dev_set_name (&wd_data->dev,"watchdog%d" , wdd->id); -/* Fill in the data structures */ cdev_init (&wd_data->cdev, &watchdog_fops);
fs/btrfs/ctree.h +3 -1
@@ -1038,8 +1038,10 @@ struct btrfs_root {wait_queue_head_t log_writer_wait;wait_queue_head_t log_commit_wait[2 ];struct list_head log_ctxs[2 ]; +/* Used only for log trees of subvolumes, not for the log root tree */ atomic_t log_writers;atomic_t log_commit[2 ]; +/* Used only for log trees of subvolumes, not for the log root tree */ atomic_t log_batch;int log_transid;/* No matter the commit succeeds or not*/
@@ -3196,7 +3198,7 @@ do { \/* Report first abort since mount */ \if (!test_and_set_bit (BTRFS_FS_STATE_TRANS_ABORTED , \ &((trans)->fs_info->fs_state))) { \ -if ((errno) != -EIO ) { \ +if ((errno) != -EIO && (errno) != -EROFS ) { \WARN (1 ,KERN_DEBUG \"BTRFS: Transaction aborted (error %d)\n" , \ (errno)); \
fs/btrfs/disk-io.c +10 -3
@@ -1432,9 +1432,16 @@ static int btrfs_init_fs_root(struct btrfs_root *root)spin_lock_init (&root->ino_cache_lock);init_waitqueue_head (&root->ino_cache_wait); - ret =get_anon_bdev (&root->anon_dev); -if (ret) - goto fail; +/* +* Don't assign anonymous block device to roots that are not exposed to +* userspace, the id pool is limited to 1M +*/ +if (is_fstree (root->root_key.objectid) && +btrfs_root_refs (&root->root_item) >0 ) { + ret =get_anon_bdev (&root->anon_dev); +if (ret) + goto fail; + }mutex_lock (&root->objectid_mutex); ret = btrfs_find_highest_objectid(root,
fs/btrfs/extent-io-tree.h +2 -0
@@ -34,6 +34,8 @@ struct io_failure_record;*/ #define CHUNK_ALLOCATED EXTENT_DIRTY#define CHUNK_TRIMMED EXTENT_DEFRAG +#define CHUNK_STATE_MASK (CHUNK_ALLOCATED | \ + CHUNK_TRIMMED)enum {IO_TREE_FS_PINNED_EXTENTS ,
fs/btrfs/extent-tree.c +22 -1
@@ -33,6 +33,7 @@#include "delalloc-space.h" #include "block-group.h" #include "discard.h" +#include "rcu-string.h" #undef SCRAMBLE_DELAYED_REFS
@@ -5313,7 +5314,14 @@ int btrfs_drop_snapshot(struct btrfs_root *root, int update_ref, int for_reloc) goto out; } - trans =btrfs_start_transaction (tree_root,0 ); +/* +* Use join to avoid potential EINTR from transaction start. See +* wait_reserve_ticket and the whole reservation callchain. +*/ +if (for_reloc) + trans =btrfs_join_transaction (tree_root); +else + trans =btrfs_start_transaction (tree_root,0 );if (IS_ERR (trans)) { err =PTR_ERR (trans); goto out_free;
@@ -5678,6 +5686,19 @@ static int btrfs_trim_free_extents(struct btrfs_device *device, u64 *trimmed) &start, &end, CHUNK_TRIMMED | CHUNK_ALLOCATED); +/* Check if there are any CHUNK_* bits left */ +if (start > device->total_bytes) { +WARN_ON (IS_ENABLED (CONFIG_BTRFS_DEBUG )); +btrfs_warn_in_rcu (fs_info, +"ignoring attempt to trim beyond device size: offset %llu length %llu device %s device size %llu" , + start, end - start +1 , +rcu_str_deref (device->name), + device->total_bytes); +mutex_unlock (&fs_info->chunk_mutex); + ret =0 ; +break ; + } +/* Ensure we skip the reserved area in the first 1M */ start =max_t (u64, start,SZ_1M );
fs/btrfs/extent_io.c +14 -4
@@ -4110,7 +4110,7 @@ int btree_write_cache_pages(struct address_space *mapping,if (!test_bit (BTRFS_FS_STATE_ERROR , &fs_info->fs_state)) { ret =flush_write_bio (&epd); }else { - ret = -EUCLEAN ; + ret = -EROFS ;end_write_bio (&epd, ret); }return ret;
@@ -4504,15 +4504,25 @@ int try_release_extent_mapping(struct page *page, gfp_t mask)free_extent_map (em);break ; } -if (!test_range_bit (tree, em->start, -extent_map_end (em) -1 , -EXTENT_LOCKED ,0 ,NULL )) { +if (test_range_bit (tree, em->start, +extent_map_end (em) -1 , +EXTENT_LOCKED ,0 ,NULL )) + goto next; +/* +* If it's not in the list of modified extents, used +* by a fast fsync, we can remove it. If it's being +* logged we can safely remove it since fsync took an +* extra reference on the em. +*/ +if (list_empty (&em->list) || +test_bit (EXTENT_FLAG_LOGGING , &em->flags)) {set_bit (BTRFS_INODE_NEEDS_FULL_SYNC , &btrfs_inode->runtime_flags);remove_extent_mapping (map, em);/* once for the rb tree */ free_extent_map (em); } +next: start =extent_map_end (em);write_unlock (&map->lock);
fs/btrfs/free-space-cache.c +2 -2
@@ -2286,7 +2286,7 @@ static int insert_into_bitmap(struct btrfs_free_space_ctl *ctl,static bool try_merge_free_space (struct btrfs_free_space_ctl *ctl,struct btrfs_free_space *info,bool update_stat) { -struct btrfs_free_space *left_info; +struct btrfs_free_space *left_info =NULL ;struct btrfs_free_space *right_info;bool merged = false;u64 offset = info->offset;
@@ -2302,7 +2302,7 @@ static bool try_merge_free_space(struct btrfs_free_space_ctl *ctl,if (right_info &&rb_prev (&right_info->offset_index)) left_info =rb_entry (rb_prev (&right_info->offset_index), struct btrfs_free_space, offset_index); -else +else if (!right_info) left_info =tree_search_offset (ctl, offset -1 ,0 ,0 );/* See try_merge_free_space() comment. */
fs/btrfs/inode.c +14 -6
@@ -650,12 +650,18 @@ static noinline int compress_file_range(struct async_chunk *async_chunk) page_error_op | PAGE_END_WRITEBACK); -for (i =0 ; i < nr_pages; i++) { -WARN_ON (pages[i]->mapping); -put_page (pages[i]); +/* +* Ensure we only free the compressed pages if we have +* them allocated, as we can still reach here with +* inode_need_compress() == false. +*/ +if (pages) { +for (i =0 ; i < nr_pages; i++) { +WARN_ON (pages[i]->mapping); +put_page (pages[i]); + } +kfree (pages); } -kfree (pages); -return 0 ; } }
@@ -4049,6 +4055,8 @@ int btrfs_delete_subvolume(struct inode *dir, struct dentry *dentry) } } +free_anon_bdev (dest->anon_dev); + dest->anon_dev =0 ;
Lines of this file are not shown. View the raw message.
fs/btrfs/ioctl.c +35 -11
46 lines not on this page · raw message
fs/btrfs/super.c +30 -21
51 lines not on this page · raw message
fs/btrfs/tree-log.c +14 -29
43 lines not on this page · raw message
fs/btrfs/volumes.c +41 -7
48 lines not on this page · raw message
fs/cifs/smb2misc.c +52 -21
73 lines not on this page · raw message
fs/gfs2/bmap.c +39 -30
69 lines not on this page · raw message
fs/nfs/flexfilelayout/flexfilelayout.c +36 -14
50 lines not on this page · raw message
kernel/sched/core.c +80 -1
81 lines not on this page · raw message
kernel/sched/sched.h +45 -2
47 lines not on this page · raw message
mm/khugepaged.c +34 -36
70 lines not on this page · raw message
sound/soc/tegra/tegra_asoc_utils.c +56 -57
113 lines not on this page · raw message
tools/perf/util/intel-pt-decoder/intel-pt-decoder.c +13 -16
Lines of this file are not shown. View the raw message.
tools/testing/selftests/bpf/test_progs.c +29 -4
Lines of this file are not shown. View the raw message.
tools/testing/selftests/bpf/test_progs.h +2 -0
Lines of this file are not shown. View the raw message.
tools/testing/selftests/powerpc/ptrace/ptrace-pkey.c +27 -28
55 lines not on this page · raw message
tools/testing/selftests/seccomp/seccomp_bpf.c +5 -0
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.