Linux 6.0.18
Greg Kroah-Hartman
maintainerI'm announcing the release of the 6.0.18 kernel.
All users of the 6.0 kernel series must upgrade.
The updated 6.0.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-6.0.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/kernel-parameters.txt | 27 - Documentation/filesystems/mount_api.rst | 1 Makefile | 2 arch/arm/nwfpe/Makefile | 6 arch/arm64/boot/dts/mediatek/mt8195-demo.dts | 4 arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 10 arch/arm64/boot/dts/qcom/sdm845-db845c.dts | 5 arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts | 6 arch/arm64/boot/dts/qcom/sdm850-samsung-w737.dts | 6 arch/arm64/kernel/stacktrace.c | 10 arch/parisc/include/asm/pgtable.h | 4 arch/parisc/kernel/firmware.c | 24 - arch/parisc/kernel/vdso32/Makefile | 4 arch/parisc/kernel/vdso64/Makefile | 4 arch/powerpc/include/asm/ftrace.h | 12 arch/riscv/Kconfig | 2 arch/riscv/include/asm/kexec.h | 5 arch/riscv/include/asm/mmu.h | 2 arch/riscv/include/asm/pgtable.h | 2 arch/riscv/include/asm/tlbflush.h | 18 arch/riscv/kernel/elf_kexec.c | 14 arch/riscv/kernel/stacktrace.c | 2 arch/riscv/mm/context.c | 10 arch/riscv/mm/tlbflush.c | 28 - arch/x86/events/intel/uncore.h | 1 arch/x86/events/intel/uncore_snbep.c | 22 arch/x86/kernel/cpu/mce/amd.c | 33 - arch/x86/kernel/cpu/microcode/intel.c | 8 arch/x86/kernel/fpu/xstate.c | 12 arch/x86/kernel/ftrace.c | 2 arch/x86/kernel/kprobes/core.c | 10 arch/x86/kernel/kprobes/opt.c | 28 - arch/x86/kvm/lapic.c | 5 arch/x86/kvm/vmx/nested.c | 47 +- arch/x86/kvm/vmx/sgx.c | 4 arch/xtensa/kernel/xtensa_ksyms.c | 2 arch/xtensa/lib/Makefile | 2 arch/xtensa/lib/umulsidi3.S | 230 ++++++++++ block/mq-deadline.c | 83 +++ drivers/base/dd.c | 6 drivers/bus/mhi/host/pm.c | 3 drivers/char/ipmi/ipmi_msghandler.c | 4 drivers/char/ipmi/ipmi_si_intf.c | 27 - drivers/cpufreq/cpufreq.c | 2 drivers/crypto/Kconfig | 4 drivers/crypto/ccp/sp-pci.c | 11 drivers/crypto/hisilicon/Kconfig | 2 drivers/crypto/n2_core.c | 6 drivers/cxl/core/region.c | 5 drivers/devfreq/devfreq.c | 6 drivers/devfreq/governor_userspace.c | 12 drivers/edac/edac_mc_sysfs.c | 24 + drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 5 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 13 drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 3 drivers/gpu/drm/amd/amdgpu/mmhub_v2_0.c | 2 drivers/gpu/drm/amd/amdgpu/mmhub_v2_3.c | 2 drivers/gpu/drm/amd/amdgpu/mmhub_v3_0.c | 2 drivers/gpu/drm/amd/amdgpu/mmhub_v3_0_1.c | 2 drivers/gpu/drm/amd/amdgpu/mmhub_v3_0_2.c | 2 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 1 drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu13_driver_if_v13_0_0.h | 2 drivers/gpu/drm/amd/pm/swsmu/inc/smu_v13_0.h | 1 drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c | 2 drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c | 111 ++++ drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c | 19 drivers/gpu/drm/drm_connector.c | 3 drivers/gpu/drm/etnaviv/etnaviv_gem.c | 7 drivers/gpu/drm/etnaviv/etnaviv_mmu.c | 23 - drivers/gpu/drm/etnaviv/etnaviv_mmu.h | 1 drivers/gpu/drm/i915/display/intel_dsi_vbt.c | 4 drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c | 59 ++ drivers/gpu/drm/i915/gem/i915_gem_mman.c | 2 drivers/gpu/drm/i915/gem/i915_gem_object.c | 3 drivers/gpu/drm/i915/gem/i915_gem_object_types.h | 10 drivers/gpu/drm/i915/gem/i915_gem_ttm_pm.c | 18 drivers/gpu/drm/i915/gt/intel_migrate.c | 16 drivers/gpu/drm/i915/i915_gem_evict.c | 37 + drivers/gpu/drm/i915/i915_gem_evict.h | 4 drivers/gpu/drm/i915/i915_vma.c | 2 drivers/gpu/drm/i915/selftests/i915_gem_evict.c | 4 drivers/gpu/drm/ingenic/ingenic-drm-drv.c | 6 drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 3 drivers/iommu/amd/init.c | 86 ++- drivers/md/dm-cache-metadata.c | 54 ++ drivers/md/dm-cache-target.c | 11 drivers/md/dm-clone-target.c | 1 drivers/md/dm-integrity.c | 2 drivers/md/dm-thin-metadata.c | 60 ++ drivers/md/dm-thin.c | 18 drivers/md/md-bitmap.c | 20 drivers/media/dvb-core/dmxdev.c | 8 drivers/media/dvb-core/dvbdev.c | 1 drivers/media/dvb-frontends/stv0288.c | 5 drivers/media/platform/samsung/s5p-mfc/s5p_mfc_ctrl.c | 4 drivers/media/platform/samsung/s5p-mfc/s5p_mfc_enc.c | 12 drivers/media/platform/samsung/s5p-mfc/s5p_mfc_opr_v6.c | 14 drivers/mmc/host/sdhci-sprd.c | 16 drivers/mtd/spi-nor/core.c | 2 drivers/mtd/spi-nor/gigadevice.c | 24 - drivers/net/ethernet/renesas/ravb_main.c | 2 drivers/net/wireless/microchip/wilc1000/sdio.c | 1 drivers/of/kexec.c | 10 drivers/parisc/led.c | 3 drivers/pci/doe.c | 20 drivers/pci/pci-sysfs.c | 13 drivers/pci/pci.c | 2 drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 8 drivers/remoteproc/imx_dsp_rproc.c | 12 drivers/remoteproc/imx_rproc.c | 4 drivers/remoteproc/remoteproc_core.c | 9 drivers/rtc/rtc-ds1347.c | 2 drivers/soc/qcom/Kconfig | 2 drivers/soc/ux500/ux500-soc-id.c | 10 drivers/staging/media/ipu3/ipu3-v4l2.c | 57 +- drivers/staging/media/tegra-video/csi.c | 4 drivers/staging/media/tegra-video/csi.h | 2 fs/btrfs/backref.c | 4 fs/btrfs/volumes.c | 3 fs/cifs/cifsfs.c | 8 fs/cifs/connect.c | 16 fs/cifs/smb2pdu.c | 4 fs/dlm/lowcomms.c | 9 fs/ext2/dir.c | 2 fs/ext4/ext4.h | 9 fs/ext4/extents.c | 8 fs/ext4/extents_status.c | 3 fs/ext4/fast_commit.c | 171 ++++--- fs/ext4/fast_commit.h | 3 fs/ext4/indirect.c | 9 fs/ext4/inode.c | 48 +- fs/ext4/ioctl.c | 24 - fs/ext4/namei.c | 47 +- fs/ext4/orphan.c | 2 fs/ext4/resize.c | 32 - fs/ext4/super.c | 33 + fs/ext4/verity.c | 2 fs/ext4/xattr.c | 19 fs/fs_parser.c | 3 fs/mbcache.c | 14 fs/quota/dquot.c | 2 include/linux/bpf_verifier.h | 2 include/linux/devfreq.h | 7 include/linux/fs_parser.h | 1 include/linux/mbcache.h | 9 include/net/mptcp.h | 12 include/trace/events/ext4.h | 7 include/trace/events/jbd2.h | 44 - kernel/bpf/core.c | 5 kernel/events/core.c | 6 kernel/trace/Kconfig | 2 kernel/trace/trace.c | 38 + kernel/trace/trace.h | 27 - kernel/trace/trace_eprobe.c | 3 kernel/trace/trace_events_hist.c | 11 kernel/trace/trace_events_synth.c | 2 kernel/trace/trace_probe.c | 2 lib/Kconfig.debug | 1 net/ipv4/syncookies.c | 7 net/mptcp/pm_userspace.c | 4 net/mptcp/subflow.c | 61 ++ security/device_cgroup.c | 33 + security/integrity/ima/Kconfig | 2 security/integrity/ima/ima_main.c | 7 security/integrity/ima/ima_template.c | 5 security/integrity/platform_certs/load_uefi.c | 1 sound/pci/hda/patch_realtek.c | 50 ++ sound/soc/jz4740/jz4740-i2s.c | 39 + tools/testing/ktest/ktest.pl | 23 - tools/testing/selftests/lib.mk | 5 170 files changed, 1920 insertions(+), 648 deletions(-)
Aditya Garg (1):
efi: Add iMac Pro 2017 to uefi skip cert quirk
Aidan MacDonald (1):
ASoC: jz4740-i2s: Handle independent FIFO flush bits
Al Viro (1):
ext2: unbugger ext2_empty_dir()
Alex Deucher (3):
drm/amdgpu: skip MES for S0ix as well since it's part of GFX drm/amdgpu: handle polaris10/11 overlap asics (v2) drm/amdgpu: make display pinning more flexible (v2)
Alexander Antonov (2):
perf/x86/intel/uncore: Disable I/O stacks to PMU mapping on ICX-D perf/x86/intel/uncore: Clear attr_update properly
Alexander Aring (2):
fs: dlm: fix sock release if listen fails
fs: dlm: retry accept() until -EAGAIN or error returns
Alexander Potapenko (1):
fs: ext4: initialize fsdata in pagecache_write()
Alexander Sverdlin (1):
mtd: spi-nor: Check for zero erase size in spi_nor_find_best_erase_type()
Andrew Cooper (1):
x86/fpu/xstate: Fix XSTATE_WARN_ON() to emit relevant diagnostics
Ashok Raj (1):
x86/microcode/intel: Do not retry microcode reloading on the APs
Baokun Li (9):
ext4: add inode table check in __ext4_get_inode_loc to aovid possible infinite loop
ext4: fix use-after-free in ext4_orphan_cleanup
ext4: add EXT4_IGET_BAD flag to prevent unexpected bad inode
ext4: add helper to check quota inums
ext4: fix bug_on in __es_tree_search caused by bad quota inode
ext4: fix bug_on in __es_tree_search caused by bad boot loader inode
ext4: fix corruption when online resizing a 1K bigalloc fs
ext4: fix bad checksum after online resize
ext4: fix corrupt backup group descriptors after online resize
Biju Das (1):
ravb: Fix "failed to switch device to config mode" message during unbind
Bixuan Cui (1):
jbd2: use the correct print format
Boris Burkov (1):
btrfs: fix resolving backrefs for inline extent followed by prealloc
Chris Chiu (1):
ALSA: hda/realtek: Apply dual codec fixup for Dell Latitude laptops
Chris Wilson (1):
drm/i915/migrate: Account for the reserved_space
Corentin Labbe (1):
crypto: n2 - add missing hash statesize
Damien Le Moal (2):
block: mq-deadline: Fix dd_finish_request() for zoned devices
block: mq-deadline: Do not break sequential write streams to zoned HDDs
Dan Carpenter (1):
ipmi: fix use after free in _ipmi_destroy_user()
Dan Williams (1):
cxl/region: Fix missing probe failure
Darrick J. Wong (2):
ext4: don't fail GETFSUUID when the caller provides a long buffer
ext4: dont return EINVAL from GETFSUUID when reporting UUID length
Eric Biggers (7):
ext4: don't allow journal inode to have encrypt flag
ext4: disable fast-commit of encrypted dir operations
ext4: fix leaking uninitialized memory in fast-commit journal
ext4: don't set up encryption key during jbd2 transaction
ext4: add missing validation of fast-commit record lengths
ext4: fix unaligned memory access in ext4_fc_reserve_space()
ext4: fix off-by-one errors in fast-commit block filling
Eric Whitney (1):
ext4: fix delayed allocation bug in ext4_clu_mapped for bigalloc + inline
Evan Quan (6):
drm/amd/pm: update SMU13.0.0 reported maximum shader clock drm/amd/pm: correct SMU13.0.0 pstate profiling clock settings drm/amd/pm: add missing SMU13.0.0 mm_dpm feature mapping drm/amd/pm: add missing SMU13.0.7 mm_dpm feature mapping drm/amd/pm: bump SMU13.0.0 driver_if header to version 0x34 drm/amd/pm: correct the fan speed retrieving in PWM for some SMU13 asics
Fan Ni (1):
cxl/region: Fix memdev reuse check
Florian-Ewald Mueller (1):
md/bitmap: Fix bitmap chunk size overflow issues
Gaosheng Cui (1):
ext4: fix undefined behavior in bit shift for ext4_check_flag_values
Greg Kroah-Hartman (1):
Linux 6.0.18
Guo Ren (2):
riscv: Fixup compile error with !MMU
riscv: stacktrace: Fixup ftrace_graph_ret_addr retp argument
Helge Deller (3):
parisc: Fix locking in pdc_iodc_print() firmware call
parisc: Add missing FORCE prerequisites in Makefile
parisc: Drop PMD_SHIFT from calculation in pgtable.h
Huaxin Lu (1):
ima: Fix a potential NULL pointer access in ima_restore_measurement_list
Ian Abbott (1):
rtc: ds1347: fix value written to century register
Isaac J. Manjarres (1):
driver core: Fix bus_type.match() error handling in __driver_attach()
Jan Kara (4):
ext4: avoid BUG_ON when creating xattrs
ext4: fix deadlock due to mbcache entry corruption
ext4: initialize quota before expanding inode in setproject ioctl
ext4: avoid unaccounted block allocation when expanding inode
Jason A. Donenfeld (2):
media: stv0288: use explicitly signed char
ARM: ux500: do not directly dereference __iomem
Johan Hovold (4):
arm64: dts: qcom: sc8280xp: fix UFS DMA coherency
arm64: dts: qcom: sc8280xp: fix UFS reference clocks
phy: qcom-qmp-combo: fix out-of-bounds clock access
phy: qcom-qmp-combo: fix sc8180x resetKant Fan (1):
PM/devfreq: governor: Add a private governor_data for governor
Keita Suzuki (1):
media: dvb-core: Fix double free in dvb_register_device()
Kim Phillips (2):
iommu/amd: Fix ivrs_acpihid cmdline parsing code
iommu/amd: Fix ill-formed ivrs_ioapic, ivrs_hpet and ivrs_acpihid options
Krzysztof Kozlowski (3):
arm64: dts: qcom: sdm845-db845c: correct SPI2 pins drive strength
arm64: dts: qcom: sdm850-samsung-w737: correct I2C12 pins drive strength
arm64: dts: qcom: sdm850-lenovo-yoga-c630: correct I2C12 pins drive strength
Li Hua (1):
test_kprobes: Fix implicit declaration error of test_kprobes
Li Huafei (2):
RISC-V: kexec: Fix memory leak of fdt buffer
RISC-V: kexec: Fix memory leak of elf header buffer
Li Ming (1):
PCI/DOE: Fix maximum data object length miscalculation
Luca Ceresoli (2):
staging: media: tegra-video: fix chan->mipi value on error
staging: media: tegra-video: fix device_node use after free
Lucas Stach (2):
drm/etnaviv: move idle mapping reaping into separate function drm/etnaviv: reap idle mapping if it doesn't match the softpin address
Lukas Czerner (1):
ext4: journal_path mount options should follow links
Luo Meng (5):
dm thin: resume even if in FAIL mode
dm thin: Fix UAF in run_timer_softirq()
dm integrity: Fix UAF in dm_integrity_dtr()
dm clone: Fix UAF in clone_dtr()
dm cache: Fix UAF in destroy()
Luís Henriques (2):
ext4: remove trailing newline from ext4_msg() message
ext4: fix error code return to user-space in ext4_get_branch()
Macpaul Lin (1):
arm64: dts: mediatek: mt8195-demo: fix the memory size of node secmon
Manivannan Sadhasivam (2):
soc: qcom: Select REMAP_MMIO for LLCC driver
soc: qcom: Select REMAP_MMIO for ICC_BWMON driver
Maria Yu (1):
remoteproc: core: Do pm_relax when in RPROC_OFFLINE state
Mario Limonciello (1):
crypto: ccp - Add support for TEE for PCI ID 0x14CA
Masami Hiramatsu (Google) (4):
arm64: Prohibit instrumentation on arch_stack_walk() x86/kprobes: Fix kprobes instruction boudary check with CONFIG_RETHUNK x86/kprobes: Fix optprobe optimization check with CONFIG_RETHUNK
tracing: Fix complicated dependency of CONFIG_TRACER_MAX_TRACE
Matthew Auld (2):
drm/i915/ttm: consider CCS for backup objects drm/i915: improve the catch-all evict to handle lock contention
Matthieu Baerts (3):
mptcp: remove MPTCP 'ifdef' in TCP SYN cookies
mptcp: dedicated request sock for subflow in v6
mptcp: use proper req destructor for IPv6
Max Filippov (1):
xtensa: add __umulsidi3 helper
Maximilian Luz (1):
ipu3-imgu: Fix NULL pointer dereference in imgu_subdev_set_selection()
Michael Jeanson (1):
powerpc/ftrace: fix syscall tracing on PPC64_ELF_ABI_V1
Michael S. Tsirkin (1):
PCI: Fix pci_device_is_present() for VFs by checking PF
Michael Walle (1):
wifi: wilc1000: sdio: fix module autoloading
Mickaël Salaün (1):
selftests: Use optional USERCFLAGS and USERLDFLAGS
Mike Snitzer (2):
dm cache: Fix ABBA deadlock between shrink_slab and dm_cache_metadata_abort dm cache: set needs_check flag after aborting metadata
Mikko Kovanen (1):
drm/i915/dsi: fix VBT send packet port selection for dual link DSI
Namhyung Kim (1):
perf/core: Call LSM hook after copying perf_event_attr
Nick Desaulniers (1):
ARM: 9256/1: NWFPE: avoid compiler-generated __aeabi_uldivmod
Paulo Alcantara (5):
cifs: fix confusing debug message
cifs: set correct tcon status after initial tree connect
cifs: set correct ipc status after initial tree connect
cifs: set correct status of tcon ipc when reconnecting
cifs: prevent copying past input buffer boundaries
Peng Fan (1):
remoteproc: imx_rproc: Correct i.MX93 DRAM mapping
Philipp Jungkamp (1):
ALSA: patch_realtek: Fix Dell Inspiron Plus 16
Qiang Yu (1):
bus: mhi: host: Fix race between channel preparation and M0 event
Rob Herring (1):
of/kexec: Fix reading 32-bit "linux,initrd-{start,end}" values
Roberto Sassu (1):
ima: Fix memory leak in __ima_inode_hash()
Sascha Hauer (1):
PCI/sysfs: Fix double free in error path
Sean Christopherson (3):
KVM: VMX: Resume guest immediately when injecting #GP on ECREATE
KVM: nVMX: Inject #GP, not #UD, if "generic" VMXON CR0/CR4 check fails
KVM: nVMX: Properly expose ENABLE_USR_WAIT_PAUSE control to L1
Sergey Matyukevich (1):
riscv: mm: notify remote harts about mmu cache updates
Shang XiaoJing (1):
parisc: led: Fix potential null-ptr-deref in start_task()
Shengjiu Wang (1):
remoteproc: imx_dsp_rproc: Add mutex protection for workqueue
Simon Ser (1):
drm/connector: send hotplug uevent on connector cleanup
Smitha T Murthy (3):
media: s5p-mfc: Fix to handle reference queue during finishing
media: s5p-mfc: Clear workbit to handle error condition
media: s5p-mfc: Fix in register read and write for H264
Steve French (1):
cifs: fix missing display of three mount options
Steven Rostedt (2):
kest.pl: Fix grub2 menu handling for rebooting ktest.pl minconfig: Unset configs instead of just removing them
Steven Rostedt (Google) (3):
ftrace/x86: Add back ftrace_expected for ftrace bug reports
tracing: Fix race where eprobes can be called before the event tracing/probes: Handle system names with hyphens
Takashi Iwai (1):
media: dvb-core: Fix UAF due to refcount races at releasing
Tianjia Zhang (2):
ima: Fix hash dependency to correct algorithm
crypto: ccree,hisilicon - Fix dependencies to correct algorithm
Toke Høiland-Jørgensen (1):
bpf: Resolve fext program type when checking map compatibility
Wang Weiyang (1):
device_cgroup: Roll back to original exceptions after copy failure
Wei Yongjun (1):
mptcp: netlink: fix some error return code
Wenchao Chen (1):
mmc: sdhci-sprd: Disable CLK_AUTO when the clock is less than 400K
Yaliang Wang (1):
mtd: spi-nor: gigadevice: gd25q256: replace gd25q256_default_init with gd25q256_post_bfpt
Yang Jihong (1):
tracing: Fix infinite loop in tracing_read_pipe on overflowed print_trace_line
Yang Wang (1):
drm/amdgpu: fix mmhub register base coding error
Yazen Ghannam (2):
EDAC/mc_sysfs: Increase legacy channel support to 12 x86/MCE/AMD: Clear DFR errors found in THR handler
Ye Bin (6):
ext4: fix reserved cluster accounting in __es_remove_extent()
ext4: fix uninititialized value in 'ext4_evict_inode'
ext4: init quota for 'old.inode' in 'ext4_rename'
ext4: fix kernel BUG in 'ext4_write_inline_data_end()'
ext4: fix inode leak in ext4_xattr_inode_create() on an error path
ext4: allocate extended attribute value in vmalloc area
Yifan Zhang (1):
drm/amd/display: Add DCN314 display SG Support
Yongqiang Liu (1):
cpufreq: Init completion before kobject_init_and_add()
Yuan Can (1):
drm/ingenic: Fix missing platform_driver_unregister() call in ingenic_drm_init()
Yuan ZhaoXiong (1):
KVM: x86: fix APICv/x2AVIC disabled when vm reboot by itself
Zack Rusin (1):
drm/vmwgfx: Validate the box size for the snooped cursor
Zhang Yi (2):
ext4: silence the warning when evicting inode with dioread_nolock
ext4: check and assert if marking an no_delete evicting inode dirty
Zhang Yuchen (1):
ipmi: fix long wait in unload when IPMI disconnect
Zheng Yejian (3):
tracing/hist: Fix out-of-bound write on 'action_data.var_ref_idx' tracing/hist: Fix wrong return value in parse_action_params()
tracing: Fix issue of missing one synthetic field
Zhihao Cheng (2):
dm thin: Fix ABBA deadlock between shrink_slab and dm_pool_abort_metadata dm thin: Use last transaction's pmd->root when commit failed
void0red (1):
btrfs: fix extent map use-after-free when handling missing device in read_one_chunk
Greg Kroah-Hartman
maintainerDocumentation/admin-guide/kernel-parameters.txt +22 -5
@@ -2294,7 +2294,13 @@ Provide an override to the IOAPIC-ID<->DEVICE-ID mapping provided in the IVRS ACPI table. By default, PCI segment is 0, and can be omitted. - For example: + + For example, to map IOAPIC-ID decimal 10 to + PCI segment 0x1 and PCI device 00:14.0, + write the parameter as: + ivrs_ioapic=10@0001:00:14.0 + + Deprecated formats: * To map IOAPIC-ID decimal 10 to PCI device 00:14.0 write the parameter as: ivrs_ioapic[10]=00:14.0
@@ -2306,7 +2312,13 @@ Provide an override to the HPET-ID<->DEVICE-ID mapping provided in the IVRS ACPI table. By default, PCI segment is 0, and can be omitted. - For example: + + For example, to map HPET-ID decimal 10 to + PCI segment 0x1 and PCI device 00:14.0, + write the parameter as: + ivrs_hpet=10@0001:00:14.0 + + Deprecated formats: * To map HPET-ID decimal 0 to PCI device 00:14.0 write the parameter as: ivrs_hpet[0]=00:14.0
@@ -2317,15 +2329,20 @@ ivrs_acpihid [HW,X86-64] Provide an override to the ACPI-HID:UID<->DEVICE-ID mapping provided in the IVRS ACPI table. + By default, PCI segment is 0, and can be omitted. For example, to map UART-HID:UID AMD0020:0 to PCI segment 0x1 and PCI device ID 00:14.5, write the parameter as: - ivrs_acpihid[0001:00:14.5]=AMD0020:0 + ivrs_acpihid=AMD0020:0@0001:00:14.5 - By default, PCI segment is 0, and can be omitted. - For example, PCI device 00:14.5 write the parameter as: + Deprecated formats: + * To map UART-HID:UID AMD0020:0 to PCI segment is 0, + PCI device ID 00:14.5, write the parameter as: ivrs_acpihid[00:14.5]=AMD0020:0 + * To map UART-HID:UID AMD0020:0 to PCI segment 0x1 and + PCI device ID 00:14.5, write the parameter as: + ivrs_acpihid[0001:00:14.5]=AMD0020:0 js= [HW,JOY] Analog joystick See Documentation/input/joydev/joystick.rst.
Documentation/filesystems/mount_api.rst +1 -0
@@ -814,6 +814,7 @@ process the parameters it is given. int fs_lookup_param(struct fs_context *fc, struct fs_parameter *value, bool want_bdev, + unsigned int flags, struct path *_path); This takes a parameter that carries a string or filename type and attempts
Makefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 6 PATCHLEVEL = 0 -SUBLEVEL = 17 +SUBLEVEL = 18 EXTRAVERSION = NAME = Hurr durr I'ma ninja sloth
arch/arm/nwfpe/Makefile +6 -0
@@ -11,3 +11,9 @@ nwfpe-y += fpa11.o fpa11_cpdo.o fpa11_cpdt.o \ entry.o nwfpe-$(CONFIG_FPE_NWFPE_XP) += extended_cpdo.o + +# Try really hard to avoid generating calls to __aeabi_uldivmod() from +# float64_rem() due to loop elision. +ifdef CONFIG_CC_IS_CLANG +CFLAGS_softfloat.o += -mllvm -replexitval=never +endif
arch/arm64/boot/dts/mediatek/mt8195-demo.dts +2 -2
@@ -56,10 +56,10 @@ reserved-memory { #size-cells = <2>; ranges; - /* 192 KiB reserved for ARM Trusted Firmware (BL31) */ + /* 2 MiB reserved for ARM Trusted Firmware (BL31) */ bl31_secmon_reserved: secmon@54600000 { no-map; - reg = <0 0x54600000 0x0 0x30000>; + reg = <0 0x54600000 0x0 0x200000>; }; /* 12 MiB reserved for OP-TEE (BL32)
arch/arm64/boot/dts/qcom/sc8280xp.dtsi +6 -4
@@ -855,12 +855,13 @@ ufs_mem_hc: ufs@1d84000 { required-opps = <&rpmhpd_opp_nom>; iommus = <&apps_smmu 0xe0 0x0>; + dma-coherent; clocks = <&gcc GCC_UFS_PHY_AXI_CLK>, <&gcc GCC_AGGRE_UFS_PHY_AXI_CLK>, <&gcc GCC_UFS_PHY_AHB_CLK>, <&gcc GCC_UFS_PHY_UNIPRO_CORE_CLK>, - <&rpmhcc RPMH_CXO_CLK>, + <&gcc GCC_UFS_REF_CLKREF_CLK>, <&gcc GCC_UFS_PHY_TX_SYMBOL_0_CLK>, <&gcc GCC_UFS_PHY_RX_SYMBOL_0_CLK>, <&gcc GCC_UFS_PHY_RX_SYMBOL_1_CLK>;
@@ -891,7 +892,7 @@ ufs_mem_phy: phy@1d87000 { ranges; clock-names = "ref", "ref_aux"; - clocks = <&gcc GCC_UFS_REF_CLKREF_CLK>, + clocks = <&gcc GCC_UFS_CARD_CLKREF_CLK>, <&gcc GCC_UFS_PHY_PHY_AUX_CLK>; resets = <&ufs_mem_hc 0>;
@@ -923,12 +924,13 @@ ufs_card_hc: ufs@1da4000 { power-domains = <&gcc UFS_CARD_GDSC>; iommus = <&apps_smmu 0x4a0 0x0>; + dma-coherent; clocks = <&gcc GCC_UFS_CARD_AXI_CLK>, <&gcc GCC_AGGRE_UFS_CARD_AXI_CLK>, <&gcc GCC_UFS_CARD_AHB_CLK>, <&gcc GCC_UFS_CARD_UNIPRO_CORE_CLK>, - <&rpmhcc RPMH_CXO_CLK>, + <&gcc GCC_UFS_REF_CLKREF_CLK>, <&gcc GCC_UFS_CARD_TX_SYMBOL_0_CLK>, <&gcc GCC_UFS_CARD_RX_SYMBOL_0_CLK>, <&gcc GCC_UFS_CARD_RX_SYMBOL_1_CLK>;
@@ -959,7 +961,7 @@ ufs_card_phy: phy@1da7000 { ranges; clock-names = "ref", "ref_aux"; - clocks = <&gcc GCC_UFS_REF_CLKREF_CLK>, + clocks = <&gcc GCC_UFS_1_CARD_CLKREF_CLK>, <&gcc GCC_UFS_CARD_PHY_AUX_CLK>; resets = <&ufs_card_hc 0>;
arch/arm64/boot/dts/qcom/sdm845-db845c.dts +4 -1
@@ -1123,7 +1123,10 @@ &wifi { /* PINCTRL - additions to nodes defined in sdm845.dtsi */ &qup_spi2_default { - drive-strength = <16>; + pinconf { + pins = "gpio27", "gpio28", "gpio29", "gpio30"; + drive-strength = <16>; + }; }; &qup_uart3_default{
arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts +4 -2
@@ -487,8 +487,10 @@ pinconf { }; &qup_i2c12_default { - drive-strength = <2>; - bias-disable; + pinmux { + drive-strength = <2>; + bias-disable; + }; }; &qup_uart6_default {
arch/arm64/boot/dts/qcom/sdm850-samsung-w737.dts +4 -2
@@ -415,8 +415,10 @@ pinconf { }; &qup_i2c12_default { - drive-strength = <2>; - bias-disable; + pinmux { + drive-strength = <2>; + bias-disable; + }; }; &qup_uart6_default {
arch/arm64/kernel/stacktrace.c +5 -5
@@ -23,8 +23,8 @@* * The regs must be on a stack currently owned by the calling task. */ -static inline void unwind_init_from_regs (struct unwind_state *state, -struct pt_regs *regs) +static __always_inline void unwind_init_from_regs(struct unwind_state *state, +struct pt_regs *regs) {unwind_init_common (state, current);
@@ -58,8 +58,8 @@ static __always_inline void unwind_init_from_caller(struct unwind_state *state)* duration of the unwind, or the unwind will be bogus. It is never valid to * call this for the current task. */ -static inline void unwind_init_from_task (struct unwind_state *state, -struct task_struct *task) +static __always_inline void unwind_init_from_task(struct unwind_state *state, +struct task_struct *task) {unwind_init_common (state, task);
@@ -190,7 +190,7 @@ void show_stack(struct task_struct *tsk, unsigned long *sp, const char *loglvl)barrier (); } -noinline notrace void arch_stack_walk(stack_trace_consume_fn consume_entry, +noinline noinstr void arch_stack_walk(stack_trace_consume_fn consume_entry,void *cookie,struct task_struct *task,struct pt_regs *regs) {
arch/parisc/include/asm/pgtable.h +2 -2
@@ -166,8 +166,8 @@ extern void __update_cache(pte_t pte);/* This calculates the number of initial pages we need for the initial * page tables */ -#if (KERNEL_INITIAL_ORDER ) >= (PMD_SHIFT ) -# define PT_INITIAL (1 << (KERNEL_INITIAL_ORDER - PMD_SHIFT)) +#if (KERNEL_INITIAL_ORDER ) >= (PLD_SHIFT +BITS_PER_PTE ) +# define PT_INITIAL (1 << (KERNEL_INITIAL_ORDER - PLD_SHIFT - BITS_PER_PTE))#else # define PT_INITIAL (1)/* all initial PTEs fit into one page */ #endif
arch/parisc/kernel/firmware.c +13 -11
@@ -1288,9 +1288,8 @@ void pdc_io_reset_devices(void)#endif /* defined(BOOTLOADER) */ -/* locked by pdc_console_lock */ -static int __attribute__((aligned (8 ))) iodc_retbuf[32 ]; -static char __attribute__((aligned (64 ))) iodc_dbuf[4096 ]; +/* locked by pdc_lock */ +static char iodc_dbuf[4096] __page_aligned_bss;/** * pdc_iodc_print - Console print using IODC.
@@ -1307,6 +1306,9 @@ int pdc_iodc_print(const unsigned char *str, unsigned count)unsigned int i;unsigned long flags; + count = min_t(unsigned int, count, sizeof(iodc_dbuf)); + +spin_lock_irqsave (&pdc_lock, flags);for (i =0 ; i < count;) {switch (str[i]) {case '\n' :
@@ -1322,12 +1324,11 @@ int pdc_iodc_print(const unsigned char *str, unsigned count) } print: -spin_lock_irqsave (&pdc_lock, flags); -real32_call (PAGE0 ->mem_cons.iodc_io, - (unsigned long )PAGE0 ->mem_cons.hpa,ENTRY_IO_COUT , -PAGE0 ->mem_cons.spa,__pa (PAGE0 ->mem_cons.dp.layers), -__pa (iodc_retbuf),0 ,__pa (iodc_dbuf), i,0 ); -spin_unlock_irqrestore (&pdc_lock, flags); +real32_call (PAGE0 ->mem_cons.iodc_io, + (unsigned long )PAGE0 ->mem_cons.hpa,ENTRY_IO_COUT , +PAGE0 ->mem_cons.spa,__pa (PAGE0 ->mem_cons.dp.layers), +__pa (pdc_result),0 ,__pa (iodc_dbuf), i,0 ); +spin_unlock_irqrestore (&pdc_lock, flags);return i; }
@@ -1354,10 +1355,11 @@ int pdc_iodc_getc(void)real32_call (PAGE0 ->mem_kbd.iodc_io, (unsigned long )PAGE0 ->mem_kbd.hpa,ENTRY_IO_CIN ,PAGE0 ->mem_kbd.spa,__pa (PAGE0 ->mem_kbd.dp.layers), -__pa (iodc_retbuf),0 ,__pa (iodc_dbuf),1 ,0 ); +__pa (pdc_result),0 ,__pa (iodc_dbuf),1 ,0 ); ch = *iodc_dbuf; - status = *iodc_retbuf; +/* like convert_to_wide() but for first return value only: */ + status = *(int *)&pdc_result;spin_unlock_irqrestore (&pdc_lock, flags);if (status ==0 )
arch/parisc/kernel/vdso32/Makefile +2 -2
@@ -26,7 +26,7 @@ $(obj)/vdso32_wrapper.o : $(obj)/vdso32.so FORCE # Force dependency (incbin is bad) # link rule for the .so file, .lds has to be first -$(obj)/vdso32.so: $(src)/vdso32.lds $(obj-vdso32) $(obj-cvdso32) $(VDSO_LIBGCC) +$(obj)/vdso32.so: $(src)/vdso32.lds $(obj-vdso32) $(obj-cvdso32) $(VDSO_LIBGCC) FORCE $(call if_changed,vdso32ld) # assembly rules for the .S files
@@ -38,7 +38,7 @@ $(obj-cvdso32): %.o: %.c FORCE # actual build commands quiet_cmd_vdso32ld = VDSO32L $@ - cmd_vdso32ld = $(CROSS32CC) $(c_flags) -Wl,-T $^ -o $@ + cmd_vdso32ld = $(CROSS32CC) $(c_flags) -Wl,-T $(filter-out FORCE, $^) -o $@ quiet_cmd_vdso32as = VDSO32A $@ cmd_vdso32as = $(CROSS32CC) $(a_flags) -c -o $@ $< quiet_cmd_vdso32cc = VDSO32C $@
arch/parisc/kernel/vdso64/Makefile +2 -2
@@ -26,7 +26,7 @@ $(obj)/vdso64_wrapper.o : $(obj)/vdso64.so FORCE # Force dependency (incbin is bad) # link rule for the .so file, .lds has to be first -$(obj)/vdso64.so: $(src)/vdso64.lds $(obj-vdso64) $(VDSO_LIBGCC) +$(obj)/vdso64.so: $(src)/vdso64.lds $(obj-vdso64) $(VDSO_LIBGCC) FORCE $(call if_changed,vdso64ld) # assembly rules for the .S files
@@ -35,7 +35,7 @@ $(obj-vdso64): %.o: %.S FORCE # actual build commands quiet_cmd_vdso64ld = VDSO64L $@ - cmd_vdso64ld = $(CC) $(c_flags) -Wl,-T $^ -o $@ + cmd_vdso64ld = $(CC) $(c_flags) -Wl,-T $(filter-out FORCE, $^) -o $@ quiet_cmd_vdso64as = VDSO64A $@ cmd_vdso64as = $(CC) $(a_flags) -c -o $@ $<
arch/powerpc/include/asm/ftrace.h +0 -12
@@ -64,17 +64,6 @@ void ftrace_graph_func(unsigned long ip, unsigned long parent_ip,* those. */ #define ARCH_HAS_SYSCALL_MATCH_SYM_NAME -#ifdef CONFIG_PPC64_ELF_ABI_V1 -static inline bool arch_syscall_match_sym_name (const char *sym,const char *name) -{ -/* We need to skip past the initial dot, and the __se_sys alias */ -return !strcmp (sym +1 , name) || - (!strncmp (sym,".__se_sys" ,9 ) && !strcmp (sym +6 , name)) || - (!strncmp (sym,".ppc_" ,5 ) && !strcmp (sym +5 , name +4 )) || - (!strncmp (sym,".ppc32_" ,7 ) && !strcmp (sym +7 , name +4 )) || - (!strncmp (sym,".ppc64_" ,7 ) && !strcmp (sym +7 , name +4 )); -} -#else static inline bool arch_syscall_match_sym_name (const char *sym,const char *name) { return !strcmp(sym, name) ||
@@ -83,7 +72,6 @@ static inline bool arch_syscall_match_sym_name(const char *sym, const char *name (!strncmp (sym,"ppc32_" ,6 ) && !strcmp (sym +6 , name +4 )) || (!strncmp(sym, "ppc64_", 6) && !strcmp(sym + 6, name + 4)); } -#endif /* CONFIG_PPC64_ELF_ABI_V1 */ #endif /* CONFIG_FTRACE_SYSCALLS */ #if defined(CONFIG_PPC64 ) && defined(CONFIG_FUNCTION_TRACER )
arch/riscv/Kconfig +1 -1
@@ -493,7 +493,7 @@ config KEXEC_FILE select KEXEC_CORE select KEXEC_ELF select HAVE_IMA_KEXEC if IMA - depends on 64BIT + depends on 64BIT && MMU help This is new version of kexec system call. This system call is file based and takes file descriptors as system call argument
arch/riscv/include/asm/kexec.h +5 -0
@@ -39,6 +39,7 @@ crash_setup_regs(struct pt_regs *newregs,#define ARCH_HAS_KIMAGE_ARCH struct kimage_arch { +void *fdt;/* For CONFIG_KEXEC_FILE */ unsigned long fdt_addr; };
@@ -62,6 +63,10 @@ int arch_kexec_apply_relocations_add(struct purgatory_info *pi,const Elf_Shdr *relsec, const Elf_Shdr *symtab);#define arch_kexec_apply_relocations_add arch_kexec_apply_relocations_add + +struct kimage ; +int arch_kimage_file_post_load_cleanup (struct kimage *image); +#define arch_kimage_file_post_load_cleanup arch_kimage_file_post_load_cleanup#endif #endif
arch/riscv/include/asm/mmu.h +2 -0
@@ -19,6 +19,8 @@ typedef struct {#ifdef CONFIG_SMP /* A local icache flush is needed before user execution can resume. */ cpumask_t icache_stale_mask; +/* A local tlb flush is needed before user execution can resume. */ +cpumask_t tlb_stale_mask;#endif } mm_context_t;
arch/riscv/include/asm/pgtable.h +1 -1
@@ -415,7 +415,7 @@ static inline void update_mmu_cache(struct vm_area_struct *vma,* Relying on flush_tlb_fix_spurious_fault would suffice, but * the extra traps reduce performance. So, eagerly SFENCE.VMA. */ -local_flush_tlb_page (address); +flush_tlb_page (vma, address); } static inline void update_mmu_cache_pmd(struct vm_area_struct *vma,
arch/riscv/include/asm/tlbflush.h +18 -0
@@ -22,6 +22,24 @@ static inline void local_flush_tlb_page(unsigned long addr) {ALT_FLUSH_TLB_PAGE (__asm__ __volatile__ ("sfence.vma %0" : :"r" (addr) :"memory" )); } + +static inline void local_flush_tlb_all_asid (unsigned long asid) +{ + __asm__ __volatile__ ("sfence.vma x0, %0" + : + :"r" (asid) + :"memory" ); +} + +static inline void local_flush_tlb_page_asid (unsigned long addr, +unsigned long asid) +{ + __asm__ __volatile__ ("sfence.vma %0, %1" + : + :"r" (addr),"r" (asid) + :"memory" ); +} +#else /* CONFIG_MMU */ #define local_flush_tlb_all () do { } while (0)#define local_flush_tlb_page (addr) do { } while (0)
arch/riscv/kernel/elf_kexec.c +14 -0
@@ -21,6 +21,18 @@#include <linux/memblock.h> #include <asm/setup.h> +int arch_kimage_file_post_load_cleanup (struct kimage *image) +{ +kvfree (image->arch.fdt); + image->arch.fdt =NULL ; + +vfree (image->elf_headers); + image->elf_headers =NULL ; + image->elf_headers_sz =0 ; + +return kexec_image_post_load_cleanup_default (image); +} +static int riscv_kexec_elf_load (struct kimage *image,struct elfhdr *ehdr,struct kexec_elf_info *elf_info,unsigned long old_pbase,unsigned long new_pbase)
@@ -298,6 +310,8 @@ static void *elf_kexec_load(struct kimage *image, char *kernel_buf,pr_err ("Error add DTB kbuf ret=%d\n" , ret); goto out_free_fdt; } +/* Cache the fdt buffer address for memory cleanup */ + image->arch.fdt = fdt;pr_notice ("Loaded device tree at 0x%lx\n" , kbuf.mem); goto out;
arch/riscv/kernel/stacktrace.c +1 -1
@@ -58,7 +58,7 @@ void notrace walk_stackframe(struct task_struct *task, struct pt_regs *regs, }else { fp = frame->fp; pc =ftrace_graph_ret_addr (current,NULL , frame->ra, - (unsigned long *)(fp -8 )); + &frame->ra); } }
arch/riscv/mm/context.c +10 -0
@@ -196,6 +196,16 @@ static void set_mm_asid(struct mm_struct *mm, unsigned int cpu)if (need_flush_tlb)local_flush_tlb_all (); +#ifdef CONFIG_SMP + else { +cpumask_t *mask = &mm->context.tlb_stale_mask; + +if (cpumask_test_cpu (cpu, mask)) { +cpumask_clear_cpu (cpu, mask); +local_flush_tlb_all_asid (cntx & asid_mask); + } + } +#endif }static void set_mm_noasid (struct mm_struct *mm)
arch/riscv/mm/tlbflush.c +11 -17
@@ -5,23 +5,7 @@#include <linux/sched.h> #include <asm/sbi.h> #include <asm/mmu_context.h> - -static inline void local_flush_tlb_all_asid (unsigned long asid) -{ - __asm__ __volatile__ ("sfence.vma x0, %0" - : - :"r" (asid) - :"memory" ); -} - -static inline void local_flush_tlb_page_asid (unsigned long addr, -unsigned long asid) -{ - __asm__ __volatile__ ("sfence.vma %0, %1" - : - :"r" (addr),"r" (asid) - :"memory" ); -} +#include <asm/tlbflush.h> void flush_tlb_all (void ) {
@@ -31,6 +15,7 @@ void flush_tlb_all(void)static void __sbi_tlb_flush_range (struct mm_struct *mm,unsigned long start,unsigned long size,unsigned long stride) { +struct cpumask *pmask = &mm->context.tlb_stale_mask;struct cpumask *cmask =mm_cpumask (mm);unsigned int cpuid;bool broadcast;
@@ -44,6 +29,15 @@ static void __sbi_tlb_flush_range(struct mm_struct *mm, unsigned long start,if (static_branch_unlikely (&use_asid_allocator)) {unsigned long asid =atomic_long_read (&mm->context.id); +/* +* TLB will be immediately flushed on harts concurrently +* executing this MM context. TLB flush on other harts +* is deferred until this MM context migrates there. +*/ +cpumask_setall (pmask); +cpumask_clear_cpu (cpuid, pmask); +cpumask_andnot (pmask, pmask, cmask); +if (broadcast) {sbi_remote_sfence_vma_asid (cmask, start, size, asid); }else if (size <= stride) {
arch/x86/events/intel/uncore.h +1 -0
@@ -2,6 +2,7 @@#include <linux/slab.h> #include <linux/pci.h> #include <asm/apicdef.h> +#include <asm/intel-family.h> #include <linux/io-64-nonatomic-lo-hi.h> #include <linux/perf_event.h>
arch/x86/events/intel/uncore_snbep.c +21 -1
@@ -3804,6 +3804,21 @@ static const struct attribute_group *skx_iio_attr_update[] = { NULL, }; +static void pmu_clear_mapping_attr (const struct attribute_group **groups, +struct attribute_group *ag) +{ +int i; + +for (i =0 ; groups[i]; i++) { +if (groups[i] == ag) { +for (i++; groups[i]; i++) + groups[i -1 ] = groups[i]; + groups[i -1 ] =NULL ; +break ; + } + } +} +static int pmu_iio_set_mapping (struct intel_uncore_type *type,struct attribute_group *ag) {
@@ -3852,7 +3867,7 @@ pmu_iio_set_mapping(struct intel_uncore_type *type, struct attribute_group *ag) clear_topology:kfree (type->topology); clear_attr_update: - type->attr_update =NULL ; +pmu_clear_mapping_attr (type->attr_update, ag);return ret; }
@@ -5144,6 +5159,11 @@ static int icx_iio_get_topology(struct intel_uncore_type *type)static int icx_iio_set_mapping (struct intel_uncore_type *type) { +/* Detect ICX-D system. This case is not supported */ +if (boot_cpu_data.x86_model ==INTEL_FAM6_ICELAKE_D ) { +pmu_clear_mapping_attr (type->attr_update, &icx_iio_mapping_group); +return -EPERM ; + }return pmu_iio_set_mapping (type, &icx_iio_mapping_group); }
arch/x86/kernel/cpu/mce/amd.c +20 -13
@@ -788,6 +788,24 @@ _log_error_bank(unsigned int bank, u32 msr_stat, u32 msr_addr, u64 misc)return status &MCI_STATUS_DEFERRED ; } +static bool _log_error_deferred (unsigned int bank,u32 misc) +{ +if (!_log_error_bank (bank,mca_msr_reg (bank,MCA_STATUS ), +mca_msr_reg (bank,MCA_ADDR ), misc)) +return false; + +/* +* Non-SMCA systems don't have MCA_DESTAT/MCA_DEADDR registers. +* Return true here to avoid accessing these registers. +*/ +if (!mce_flags.smca) +return true; + +/* Clear MCA_DESTAT if the deferred error was logged from MCA_STATUS. */ +wrmsrl (MSR_AMD64_SMCA_MCx_DESTAT (bank),0 ); +return true; +} +/* * We have three scenarios for checking for Deferred errors: *
@@ -799,19 +817,8 @@ _log_error_bank(unsigned int bank, u32 msr_stat, u32 msr_addr, u64 misc)*/ static void log_error_deferred (unsigned int bank) { -bool defrd; - - defrd =_log_error_bank (bank,mca_msr_reg (bank,MCA_STATUS ), -mca_msr_reg (bank,MCA_ADDR ),0 ); - -if (!mce_flags.smca) -return ; - -/* Clear MCA_DESTAT if we logged the deferred error from MCA_STATUS. */ -if (defrd) { -wrmsrl (MSR_AMD64_SMCA_MCx_DESTAT (bank),0 ); +if (_log_error_deferred (bank,0 ))return ; - }/* * Only deferred errors are logged in MCA_DE{STAT,ADDR} so just check
@@ -832,7 +839,7 @@ static void amd_deferred_error_interrupt(void)static void log_error_thresholding (unsigned int bank,u64 misc) { -_log_error_bank (bank,mca_msr_reg (bank,MCA_STATUS ),mca_msr_reg (bank,MCA_ADDR ), misc); +_log_error_deferred (bank, misc); }static void log_and_reset_block (struct threshold_block *block)
arch/x86/kernel/cpu/microcode/intel.c +1 -7
@@ -621,7 +621,6 @@ void load_ucode_intel_ap(void)else iup = &intel_ucode_patch; -reget:if (!*iup) { patch =__load_ucode_intel (&uci);if (!patch)
@@ -632,12 +631,7 @@ void load_ucode_intel_ap(void) uci.mc = *iup; -if (apply_microcode_early (&uci, true)) { -/* Mixed-silicon system? Try to refetch the proper patch: */ - *iup =NULL ; - - goto reget; - } +apply_microcode_early (&uci, true); }static struct microcode_intel *find_patch (struct ucode_cpu_info *uci)
arch/x86/kernel/fpu/xstate.c +6 -6
@@ -440,8 +440,8 @@ static void __init __xstate_dump_leaves(void) } } -#define XSTATE_WARN_ON (x) do { \ - if (WARN_ONCE(x, "XSAVE consistency problem, dumping leaves")) { \ +#define XSTATE_WARN_ON (x, fmt, ...) do { \ + if (WARN_ONCE(x, "XSAVE consistency problem: " fmt, ##__VA_ARGS__)) { \ __xstate_dump_leaves(); \ } \ } while (0)
@@ -554,8 +554,7 @@ static bool __init check_xstate_against_struct(int nr) (nr >= XFEATURE_MAX) || (nr == XFEATURE_PT_UNIMPLEMENTED_SO_FAR) || ((nr >= XFEATURE_RSRVD_COMP_11) && (nr <= XFEATURE_RSRVD_COMP_16))) { -WARN_ONCE (1 ,"no structure for xstate: %d\n" , nr); -XSTATE_WARN_ON (1 ); +XSTATE_WARN_ON (1 ,"No structure for xstate: %d\n" , nr);return false; }return true;
@@ -598,12 +597,13 @@ static bool __init paranoid_xstate_size_valid(unsigned int kernel_size)* XSAVES. */ if (!xsaves &&xfeature_is_supervisor (i)) { -XSTATE_WARN_ON (1 ); +XSTATE_WARN_ON (1 ,"Got supervisor feature %d, but XSAVES not advertised\n" , i);return false; } } size =xstate_calculate_size (fpu_kernel_cfg.max_features, compacted); -XSTATE_WARN_ON (size != kernel_size); +XSTATE_WARN_ON (size != kernel_size, +"size %u != kernel_size %u\n" , size, kernel_size);return size == kernel_size; }
arch/x86/kernel/ftrace.c +2 -0
@@ -217,7 +217,9 @@ void ftrace_replace_code(int enable) ret =ftrace_verify_code (rec->ip, old);if (ret) { + ftrace_expected = old;ftrace_bug (ret, rec); + ftrace_expected =NULL ;return ; } }
arch/x86/kernel/kprobes/core.c +7 -3
@@ -37,6 +37,7 @@#include <linux/extable.h> #include <linux/kdebug.h> #include <linux/kallsyms.h> +#include <linux/kgdb.h> #include <linux/ftrace.h> #include <linux/kasan.h> #include <linux/moduleloader.h>
@@ -283,12 +284,15 @@ static int can_probe(unsigned long paddr)if (ret <0 )return 0 ; +#ifdef CONFIG_KGDB /* -* Another debugging subsystem might insert this breakpoint. -* In that case, we can't recover it. +* If there is a dynamically installed kgdb sw breakpoint, +* this function should not be probed. */ -if (insn.opcode.bytes[0 ] ==INT3_INSN_OPCODE ) +if (insn.opcode.bytes[0 ] ==INT3_INSN_OPCODE && +kgdb_has_hit_break (addr))return 0 ; +#endif addr += insn.length; }
arch/x86/kernel/kprobes/opt.c +8 -20
@@ -15,6 +15,7 @@#include <linux/extable.h> #include <linux/kdebug.h> #include <linux/kallsyms.h> +#include <linux/kgdb.h> #include <linux/ftrace.h> #include <linux/objtool.h> #include <linux/pgtable.h>
@@ -279,19 +280,6 @@ static int insn_is_indirect_jump(struct insn *insn)return ret; } -static bool is_padding_int3 (unsigned long addr,unsigned long eaddr) -{ -unsigned char ops; - -for (; addr < eaddr; addr++) { -if (get_kernel_nofault (ops, (void *)addr) <0 || - ops !=INT3_INSN_OPCODE ) -return false; - } - -return true; -} -/* Decode whole function to ensure any instructions don't jump into target */ static int can_optimize (unsigned long paddr) {
@@ -334,15 +322,15 @@ static int can_optimize(unsigned long paddr) ret =insn_decode_kernel (&insn, (void *)recovered_insn);if (ret <0 )return 0 ; - +#ifdef CONFIG_KGDB /* -* In the case of detecting unknown breakpoint, this could be -* a padding INT3 between functions. Let's check that all the -* rest of the bytes are also INT3. +* If there is a dynamically installed kgdb sw breakpoint, +* this function should not be probed. */ -if (insn.opcode.bytes[0 ] ==INT3_INSN_OPCODE ) -return is_padding_int3 (addr, paddr - offset + size) ?1 :0 ; - +if (insn.opcode.bytes[0 ] ==INT3_INSN_OPCODE && +kgdb_has_hit_break (addr)) +return 0 ; +#endif /* Recover address */ insn.kaddr = (void *)addr; insn.next_byte = (void *)(addr + insn.length);
arch/x86/kvm/lapic.c +3 -2
@@ -2722,8 +2722,6 @@ static int kvm_apic_state_fixup(struct kvm_vcpu *vcpu, icr =__kvm_lapic_get_reg64 (s->regs,APIC_ICR );__kvm_lapic_set_reg (s->regs,APIC_ICR2 , icr >>32 ); } - }else { -kvm_lapic_xapic_id_updated (vcpu->arch.apic); }return 0 ;
@@ -2759,6 +2757,9 @@ int kvm_apic_set_state(struct kvm_vcpu *vcpu, struct kvm_lapic_state *s) }memcpy (vcpu->arch.apic->regs, s->regs,sizeof (*s)); +if (!apic_x2apic_mode (apic)) +kvm_lapic_xapic_id_updated (apic); +atomic_set_release (&apic->vcpu->kvm->arch.apic_map_dirty,DIRTY );kvm_recalculate_apic_map (vcpu->kvm);kvm_apic_set_version (vcpu);
arch/x86/kvm/vmx/nested.c +35 -12
72 lines not on this page · raw message
arch/x86/kvm/vmx/sgx.c +3 -1
@@ -182,8 +182,10 @@ static int __handle_encls_ecreate(struct kvm_vcpu *vcpu,/* Enforce CPUID restriction on max enclave size. */ max_size_log2 = (attributes &SGX_ATTR_MODE64BIT ) ? sgx_12_0->edx >>8 : sgx_12_0->edx; -if (size >=BIT_ULL (max_size_log2)) +if (size >=BIT_ULL (max_size_log2)) {kvm_inject_gp (vcpu,0 ); +return 1 ; + }/* * sgx_virt_ecreate() returns:
arch/xtensa/kernel/xtensa_ksyms.c +2 -0
@@ -62,6 +62,7 @@ extern int __modsi3(int, int);extern int __mulsi3 (int ,int );extern unsigned int __udivsi3 (unsigned int ,unsigned int );extern unsigned int __umodsi3 (unsigned int ,unsigned int ); +extern unsigned long long __umulsidi3 (unsigned int ,unsigned int );EXPORT_SYMBOL (__ashldi3);EXPORT_SYMBOL (__ashrdi3);
@@ -71,6 +72,7 @@ EXPORT_SYMBOL(__modsi3);EXPORT_SYMBOL (__mulsi3);EXPORT_SYMBOL (__udivsi3);EXPORT_SYMBOL (__umodsi3); +EXPORT_SYMBOL (__umulsidi3);unsigned int __sync_fetch_and_and_4 (volatile void *p,unsigned int v) {
arch/xtensa/lib/Makefile +1 -1
@@ -5,7 +5,7 @@ lib-y += memcopy.o memset.o checksum.o \ ashldi3.o ashrdi3.o lshrdi3.o \ - divsi3.o udivsi3.o modsi3.o umodsi3.o mulsi3.o \ + divsi3.o udivsi3.o modsi3.o umodsi3.o mulsi3.o umulsidi3.o \ usercopy.o strncpy_user.o strnlen_user.o lib-$(CONFIG_PCI) += pci-auto.o lib-$(CONFIG_KCSAN) += kcsan-stubs.o
arch/xtensa/lib/umulsidi3.S new file +230 -0
230 lines not on this page · raw message
block/mq-deadline.c +77 -6
128 lines not on this page · raw message
drivers/base/dd.c +5 -1
@@ -1162,7 +1162,11 @@ static int __driver_attach(struct device *dev, void *data)return 0 ; }else if (ret <0 ) {dev_dbg (dev,"Bus failed to match device: %d\n" , ret); -return ret; +/* +* Driver could not match with device, but may match with +* another device on the bus. +*/ +return 0 ; }/* ret > 0 means positive match */ if (driver_allows_async_probing (drv)) {
drivers/bus/mhi/host/pm.c +2 -1
@@ -301,7 +301,8 @@ int mhi_pm_m0_transition(struct mhi_controller *mhi_cntrl)read_lock_irq (&mhi_chan->lock);/* Only ring DB if ring is not empty */ -if (tre_ring->base && tre_ring->wp != tre_ring->rp) +if (tre_ring->base && tre_ring->wp != tre_ring->rp && + mhi_chan->ch_state ==MHI_CH_STATE_ENABLED )mhi_ring_chan_db (mhi_cntrl, mhi_chan);read_unlock_irq (&mhi_chan->lock); }
drivers/char/ipmi/ipmi_msghandler.c +3 -1
@@ -1336,6 +1336,7 @@ static void _ipmi_destroy_user(struct ipmi_user *user)unsigned long flags;struct cmd_rcvr *rcvr;struct cmd_rcvr *rcvrs =NULL ; +struct module *owner;if (!acquire_ipmi_user (user, &i)) {/*
@@ -1398,8 +1399,9 @@ static void _ipmi_destroy_user(struct ipmi_user *user)kfree (rcvr); } + owner = intf->owner;kref_put (&intf->refcount, intf_free); -module_put (intf->owner); +module_put (owner); }int ipmi_destroy_user (struct ipmi_user *user)
drivers/char/ipmi/ipmi_si_intf.c +19 -8
@@ -2153,6 +2153,20 @@ static int __init init_ipmi_si(void) }module_init (init_ipmi_si); +static void wait_msg_processed (struct smi_info *smi_info) +{ +unsigned long jiffies_now; +long time_diff; + +while (smi_info->curr_msg || (smi_info->si_state !=SI_NORMAL )) { + jiffies_now = jiffies; + time_diff = (((long )jiffies_now - (long )smi_info->last_timeout_jiffies) + *SI_USEC_PER_JIFFY ); +smi_event_handler (smi_info, time_diff); +schedule_timeout_uninterruptible (1 ); + } +} +static void shutdown_smi (void *send_info) {struct smi_info *smi_info = send_info;
@@ -2187,16 +2201,13 @@ static void shutdown_smi(void *send_info)* in the BMC. Note that timers and CPU interrupts are off, * so no need for locks. */ -while (smi_info->curr_msg || (smi_info->si_state !=SI_NORMAL )) { -poll (smi_info); -schedule_timeout_uninterruptible (1 ); - } +wait_msg_processed (smi_info); +if (smi_info->handlers)disable_si_irq (smi_info); -while (smi_info->curr_msg || (smi_info->si_state !=SI_NORMAL )) { -poll (smi_info); -schedule_timeout_uninterruptible (1 ); - } + +wait_msg_processed (smi_info); +if (smi_info->handlers) smi_info->handlers->cleanup (smi_info->si_sm);
drivers/cpufreq/cpufreq.c +1 -1
@@ -1207,6 +1207,7 @@ static struct cpufreq_policy *cpufreq_policy_alloc(unsigned int cpu)if (!zalloc_cpumask_var (&policy->real_cpus,GFP_KERNEL )) goto err_free_rcpumask; +init_completion (&policy->kobj_unregister); ret =kobject_init_and_add (&policy->kobj, &ktype_cpufreq, cpufreq_global_kobject,"policy%u" , cpu);if (ret) {
@@ -1245,7 +1246,6 @@ static struct cpufreq_policy *cpufreq_policy_alloc(unsigned int cpu)init_rwsem (&policy->rwsem);spin_lock_init (&policy->transition_lock);init_waitqueue_head (&policy->transition_wait); -init_completion (&policy->kobj_unregister);INIT_WORK (&policy->update, handle_update); policy->cpu = cpu;
drivers/crypto/Kconfig +2 -2
@@ -790,8 +790,8 @@ config CRYPTO_DEV_CCREE select CRYPTO_ECB select CRYPTO_CTR select CRYPTO_XTS - select CRYPTO_SM4 - select CRYPTO_SM3 + select CRYPTO_SM4_GENERIC + select CRYPTO_SM3_GENERIC help Say 'Y' to enable a driver for the REE interface of the Arm TrustZone CryptoCell family of processors. Currently the
drivers/crypto/ccp/sp-pci.c +10 -1
@@ -381,6 +381,15 @@ static const struct psp_vdata pspv3 = { .inten_reg = 0x10690, .intsts_reg = 0x10694, }; + +static const struct psp_vdata pspv4 = { + .sev = &sevv2, + .tee = &teev1, + .feature_reg =0x109fc , + .inten_reg =0x10690 , + .intsts_reg =0x10694 , +}; +#endif static const struct sp_dev_vdata dev_vdata[] = {
@@ -426,7 +435,7 @@ static const struct sp_dev_vdata dev_vdata[] = { {/* 5 */ .bar = 2, #ifdef CONFIG_CRYPTO_DEV_SP_PSP - .psp_vdata = &pspv2, + .psp_vdata = &pspv4,#endif }, {/* 6 */
drivers/crypto/hisilicon/Kconfig +1 -1
@@ -26,7 +26,7 @@ config CRYPTO_DEV_HISI_SEC2 select CRYPTO_SHA1 select CRYPTO_SHA256 select CRYPTO_SHA512 - select CRYPTO_SM4 + select CRYPTO_SM4_GENERIC depends on PCI && PCI_MSI depends on UACCE || UACCE=n depends on ARM64 || (COMPILE_TEST && 64BIT)
drivers/crypto/n2_core.c +6 -0
@@ -1229,6 +1229,7 @@ struct n2_hash_tmpl {const u8 *hash_init;u8 hw_op_hashsz;u8 digest_size; +u8 statesize;u8 block_size;u8 auth_type;u8 hmac_type;
@@ -1260,6 +1261,7 @@ static const struct n2_hash_tmpl hash_tmpls[] = { .hmac_type = AUTH_TYPE_HMAC_MD5, .hw_op_hashsz = MD5_DIGEST_SIZE, .digest_size = MD5_DIGEST_SIZE, + .statesize = sizeof(struct md5_state), .block_size = MD5_HMAC_BLOCK_SIZE }, { .name = "sha1", .hash_zero = sha1_zero_message_hash,
@@ -1268,6 +1270,7 @@ static const struct n2_hash_tmpl hash_tmpls[] = { .hmac_type = AUTH_TYPE_HMAC_SHA1, .hw_op_hashsz = SHA1_DIGEST_SIZE, .digest_size = SHA1_DIGEST_SIZE, + .statesize = sizeof(struct sha1_state), .block_size = SHA1_BLOCK_SIZE }, { .name = "sha256", .hash_zero = sha256_zero_message_hash,
@@ -1276,6 +1279,7 @@ static const struct n2_hash_tmpl hash_tmpls[] = { .hmac_type = AUTH_TYPE_HMAC_SHA256, .hw_op_hashsz = SHA256_DIGEST_SIZE, .digest_size = SHA256_DIGEST_SIZE, + .statesize = sizeof(struct sha256_state), .block_size = SHA256_BLOCK_SIZE }, { .name = "sha224", .hash_zero = sha224_zero_message_hash,
@@ -1284,6 +1288,7 @@ static const struct n2_hash_tmpl hash_tmpls[] = { .hmac_type = AUTH_TYPE_RESERVED, .hw_op_hashsz = SHA256_DIGEST_SIZE, .digest_size = SHA224_DIGEST_SIZE, + .statesize = sizeof(struct sha256_state), .block_size = SHA224_BLOCK_SIZE }, };#define NUM_HASH_TMPLS ARRAY_SIZE(hash_tmpls)
@@ -1424,6 +1429,7 @@ static int __n2_register_one_ahash(const struct n2_hash_tmpl *tmpl) halg = &ahash->halg; halg->digestsize = tmpl->digest_size; + halg->statesize = tmpl->statesize; base = &halg->base;snprintf (base->cra_name,CRYPTO_MAX_ALG_NAME ,"%s" , tmpl->name);
drivers/cxl/core/region.c +4 -1
@@ -1225,7 +1225,7 @@ static int cxl_region_attach(struct cxl_region *cxlr,struct cxl_endpoint_decoder *cxled_target;struct cxl_memdev *cxlmd_target; - cxled_target = p->targets[pos]; + cxled_target = p->targets[i];if (!cxled_target)continue ;
@@ -1922,6 +1922,9 @@ static int cxl_region_probe(struct device *dev)*/ up_read (&cxl_region_rwsem); +if (rc) +return rc; +switch (cxlr->mode) {case CXL_DECODER_PMEM :return devm_cxl_add_pmem_region (cxlr);
drivers/devfreq/devfreq.c +2 -4
@@ -776,8 +776,7 @@ static void remove_sysfs_files(struct devfreq *devfreq,* @dev: the device to add devfreq feature. * @profile: device-specific profile to run devfreq. * @governor_name: name of the policy to choose frequency. -* @data: private data for the governor. The devfreq framework does not -* touch this value. +* @data: devfreq driver pass to governors, governor should not change it. */ struct devfreq *devfreq_add_device(struct device *dev, struct devfreq_dev_profile *profile,
@@ -1011,8 +1010,7 @@ static void devm_devfreq_dev_release(struct device *dev, void *res)* @dev: the device to add devfreq feature. * @profile: device-specific profile to run devfreq. * @governor_name: name of the policy to choose frequency. -* @data: private data for the governor. The devfreq framework does not -* touch this value. +* @data: devfreq driver pass to governors, governor should not change it. * * This function manages automatically the memory of devfreq device using device * resource management and simplify the free operation for memory of devfreq
drivers/devfreq/governor_userspace.c +6 -6
@@ -21,7 +21,7 @@ struct userspace_data {static int devfreq_userspace_func (struct devfreq *df,unsigned long *freq) { -struct userspace_data *data = df->data; +struct userspace_data *data = df->governor_data;if (data->valid) *freq = data->user_frequency;
@@ -40,7 +40,7 @@ static ssize_t set_freq_store(struct device *dev, struct device_attribute *attr,int err =0 ;mutex_lock (&devfreq->lock); - data = devfreq->data; + data = devfreq->governor_data;sscanf (buf,"%lu" , &wanted); data->user_frequency = wanted;
@@ -60,7 +60,7 @@ static ssize_t set_freq_show(struct device *dev,int err =0 ;mutex_lock (&devfreq->lock); - data = devfreq->data; + data = devfreq->governor_data;if (data->valid) err =sprintf (buf,"%lu\n" , data->user_frequency);
@@ -91,7 +91,7 @@ static int userspace_init(struct devfreq *devfreq) goto out; } data->valid = false; - devfreq->data = data; + devfreq->governor_data = data; err =sysfs_create_group (&devfreq->dev.kobj, &dev_attr_group); out:
@@ -107,8 +107,8 @@ static void userspace_exit(struct devfreq *devfreq)if (devfreq->dev.kobj.sd)sysfs_remove_group (&devfreq->dev.kobj, &dev_attr_group); -kfree (devfreq->data); - devfreq->data =NULL ; +kfree (devfreq->governor_data); + devfreq->governor_data =NULL ; } static int devfreq_userspace_handler(struct devfreq *devfreq,
drivers/edac/edac_mc_sysfs.c +24 -0
@@ -298,6 +298,14 @@ DEVICE_CHANNEL(ch6_dimm_label, S_IRUGO | S_IWUSR, channel_dimm_label_show, channel_dimm_label_store, 6);DEVICE_CHANNEL (ch7_dimm_label,S_IRUGO |S_IWUSR , channel_dimm_label_show, channel_dimm_label_store,7 ); +DEVICE_CHANNEL (ch8_dimm_label,S_IRUGO |S_IWUSR , + channel_dimm_label_show, channel_dimm_label_store,8 ); +DEVICE_CHANNEL (ch9_dimm_label,S_IRUGO |S_IWUSR , + channel_dimm_label_show, channel_dimm_label_store,9 ); +DEVICE_CHANNEL (ch10_dimm_label,S_IRUGO |S_IWUSR , + channel_dimm_label_show, channel_dimm_label_store,10 ); +DEVICE_CHANNEL (ch11_dimm_label,S_IRUGO |S_IWUSR , + channel_dimm_label_show, channel_dimm_label_store,11 );/* Total possible dynamic DIMM Label attribute file table */ static struct attribute *dynamic_csrow_dimm_attr[] = {
@@ -309,6 +317,10 @@ static struct attribute *dynamic_csrow_dimm_attr[] = { &dev_attr_legacy_ch5_dimm_label.attr.attr, &dev_attr_legacy_ch6_dimm_label.attr.attr, &dev_attr_legacy_ch7_dimm_label.attr.attr, + &dev_attr_legacy_ch8_dimm_label.attr.attr, + &dev_attr_legacy_ch9_dimm_label.attr.attr, + &dev_attr_legacy_ch10_dimm_label.attr.attr, + &dev_attr_legacy_ch11_dimm_label.attr.attr, NULL };
@@ -329,6 +341,14 @@ DEVICE_CHANNEL(ch6_ce_count, S_IRUGO, channel_ce_count_show, NULL, 6);DEVICE_CHANNEL (ch7_ce_count,S_IRUGO , channel_ce_count_show,NULL ,7 ); +DEVICE_CHANNEL (ch8_ce_count,S_IRUGO , + channel_ce_count_show,NULL ,8 ); +DEVICE_CHANNEL (ch9_ce_count,S_IRUGO , + channel_ce_count_show,NULL ,9 ); +DEVICE_CHANNEL (ch10_ce_count,S_IRUGO , + channel_ce_count_show,NULL ,10 ); +DEVICE_CHANNEL (ch11_ce_count,S_IRUGO , + channel_ce_count_show,NULL ,11 );/* Total possible dynamic ce_count attribute file table */ static struct attribute *dynamic_csrow_ce_count_attr[] = {
@@ -340,6 +360,10 @@ static struct attribute *dynamic_csrow_ce_count_attr[] = { &dev_attr_legacy_ch5_ce_count.attr.attr, &dev_attr_legacy_ch6_ce_count.attr.attr, &dev_attr_legacy_ch7_ce_count.attr.attr, + &dev_attr_legacy_ch8_ce_count.attr.attr, + &dev_attr_legacy_ch9_ce_count.attr.attr, + &dev_attr_legacy_ch10_ce_count.attr.attr, + &dev_attr_legacy_ch11_ce_count.attr.attr, NULL };
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +3 -2
@@ -2998,14 +2998,15 @@ static int amdgpu_device_ip_suspend_phase2(struct amdgpu_device *adev)continue ; } -/* skip suspend of gfx and psp for S0ix +/* skip suspend of gfx/mes and psp for S0ix * gfx is in gfxoff state, so on resume it will exit gfxoff just * like at runtime. PSP is also part of the always on hardware * so no need to suspend it. */ if (adev->in_s0ix && (adev->ip_blocks[i].version->type ==AMD_IP_BLOCK_TYPE_PSP || - adev->ip_blocks[i].version->type ==AMD_IP_BLOCK_TYPE_GFX )) + adev->ip_blocks[i].version->type ==AMD_IP_BLOCK_TYPE_GFX || + adev->ip_blocks[i].version->type ==AMD_IP_BLOCK_TYPE_MES ))continue ;/* XXX handle errors */
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +11 -2
@@ -2025,6 +2025,15 @@ static int amdgpu_pci_probe(struct pci_dev *pdev, "See modparam exp_hw_support\n");return -ENODEV ; } +/* differentiate between P10 and P11 asics with the same DID */ +if (pdev->device ==0x67FF && + (pdev->revision ==0xE3 || + pdev->revision ==0xE7 || + pdev->revision ==0xF3 || + pdev->revision ==0xF7 )) { + flags &= ~AMD_ASIC_MASK ; + flags |=CHIP_POLARIS10 ; + }/* Due to hardware bugs, S/G Display on raven requires a 1:1 IOMMU mapping, * however, SME requires an indirect IOMMU mapping because the encryption
@@ -2094,12 +2103,12 @@ static int amdgpu_pci_probe(struct pci_dev *pdev,pci_set_drvdata (pdev, ddev); - ret =amdgpu_driver_load_kms (adev, ent->driver_data); + ret =amdgpu_driver_load_kms (adev, flags);if (ret) goto err_pci; retry_init: - ret =drm_dev_register (ddev, ent->driver_data); + ret =drm_dev_register (ddev, flags);if (ret == -EAGAIN && ++retry <=3 ) {DRM_INFO ("retry init %d\n" , retry);/* Don't request EX mode too frequently which is attacking */
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +2 -1
@@ -1506,7 +1506,8 @@ u64 amdgpu_bo_gpu_offset_no_check(struct amdgpu_bo *bo)uint32_t amdgpu_bo_get_preferred_domain (struct amdgpu_device *adev,uint32_t domain) { -if (domain == (AMDGPU_GEM_DOMAIN_VRAM |AMDGPU_GEM_DOMAIN_GTT )) { +if ((domain == (AMDGPU_GEM_DOMAIN_VRAM |AMDGPU_GEM_DOMAIN_GTT )) && + ((adev->asic_type ==CHIP_CARRIZO ) || (adev->asic_type ==CHIP_STONEY ))) { domain =AMDGPU_GEM_DOMAIN_VRAM ;if (adev->gmc.real_vram_size <=AMDGPU_SG_THRESHOLD ) domain =AMDGPU_GEM_DOMAIN_GTT ;
drivers/gpu/drm/amd/amdgpu/mmhub_v2_0.c +1 -1
@@ -319,7 +319,7 @@ static void mmhub_v2_0_init_cache_regs(struct amdgpu_device *adev) tmp = mmMMVM_L2_CNTL5_DEFAULT; tmp =REG_SET_FIELD (tmp,MMVM_L2_CNTL5 ,L2_CACHE_SMALLK_FRAGMENT_SIZE ,0 ); -WREG32_SOC15 (GC ,0 , mmMMVM_L2_CNTL5, tmp); +WREG32_SOC15 (MMHUB ,0 , mmMMVM_L2_CNTL5, tmp); }static void mmhub_v2_0_enable_system_domain (struct amdgpu_device *adev)
drivers/gpu/drm/amd/amdgpu/mmhub_v2_3.c +1 -1
@@ -243,7 +243,7 @@ static void mmhub_v2_3_init_cache_regs(struct amdgpu_device *adev) tmp = mmMMVM_L2_CNTL5_DEFAULT; tmp =REG_SET_FIELD (tmp,MMVM_L2_CNTL5 ,L2_CACHE_SMALLK_FRAGMENT_SIZE ,0 ); -WREG32_SOC15 (GC ,0 , mmMMVM_L2_CNTL5, tmp); +WREG32_SOC15 (MMHUB ,0 , mmMMVM_L2_CNTL5, tmp); }static void mmhub_v2_3_enable_system_domain (struct amdgpu_device *adev)
drivers/gpu/drm/amd/amdgpu/mmhub_v3_0.c +1 -1
@@ -275,7 +275,7 @@ static void mmhub_v3_0_init_cache_regs(struct amdgpu_device *adev) tmp = regMMVM_L2_CNTL5_DEFAULT; tmp =REG_SET_FIELD (tmp,MMVM_L2_CNTL5 ,L2_CACHE_SMALLK_FRAGMENT_SIZE ,0 ); -WREG32_SOC15 (GC ,0 , regMMVM_L2_CNTL5, tmp); +WREG32_SOC15 (MMHUB ,0 , regMMVM_L2_CNTL5, tmp); }static void mmhub_v3_0_enable_system_domain (struct amdgpu_device *adev)
drivers/gpu/drm/amd/amdgpu/mmhub_v3_0_1.c +1 -1
@@ -269,7 +269,7 @@ static void mmhub_v3_0_1_init_cache_regs(struct amdgpu_device *adev) tmp = regMMVM_L2_CNTL5_DEFAULT; tmp =REG_SET_FIELD (tmp,MMVM_L2_CNTL5 ,L2_CACHE_SMALLK_FRAGMENT_SIZE ,0 ); -WREG32_SOC15 (GC ,0 , regMMVM_L2_CNTL5, tmp); +WREG32_SOC15 (MMHUB ,0 , regMMVM_L2_CNTL5, tmp); }static void mmhub_v3_0_1_enable_system_domain (struct amdgpu_device *adev)
drivers/gpu/drm/amd/amdgpu/mmhub_v3_0_2.c +1 -1
@@ -268,7 +268,7 @@ static void mmhub_v3_0_2_init_cache_regs(struct amdgpu_device *adev) tmp = regMMVM_L2_CNTL5_DEFAULT; tmp =REG_SET_FIELD (tmp,MMVM_L2_CNTL5 ,L2_CACHE_SMALLK_FRAGMENT_SIZE ,0 ); -WREG32_SOC15 (GC ,0 , regMMVM_L2_CNTL5, tmp); +WREG32_SOC15 (MMHUB ,0 , regMMVM_L2_CNTL5, tmp); }static void mmhub_v3_0_2_enable_system_domain (struct amdgpu_device *adev)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +1 -0
@@ -1511,6 +1511,7 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)case IP_VERSION (3 ,0 ,1 ):case IP_VERSION (3 ,1 ,2 ):case IP_VERSION (3 ,1 ,3 ): +case IP_VERSION (3 ,1 ,4 ):case IP_VERSION (3 ,1 ,5 ):case IP_VERSION (3 ,1 ,6 ): init_data.flags.gpu_vm_support = true;
drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu13_driver_if_v13_0_0.h +1 -1
@@ -522,9 +522,9 @@ typedef enum {TEMP_HOTSPOT_M ,TEMP_MEM ,TEMP_VR_GFX , +TEMP_VR_SOC ,TEMP_VR_MEM0 ,TEMP_VR_MEM1 , -TEMP_VR_SOC ,TEMP_VR_U ,TEMP_LIQUID0 , TEMP_LIQUID1,
drivers/gpu/drm/amd/pm/swsmu/inc/smu_v13_0.h +1 -0
@@ -28,6 +28,7 @@#define SMU13_DRIVER_IF_VERSION_INV 0xFFFFFFFF#define SMU13_DRIVER_IF_VERSION_YELLOW_CARP 0x04#define SMU13_DRIVER_IF_VERSION_ALDE 0x08 +#define SMU13_DRIVER_IF_VERSION_SMU_V13_0_0_0 0x34#define SMU13_DRIVER_IF_VERSION_SMU_V13_0_4 0x07#define SMU13_DRIVER_IF_VERSION_SMU_V13_0_5 0x04#define SMU13_DRIVER_IF_VERSION_SMU_V13_0_0_10 0x32
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c +2 -0
@@ -288,6 +288,8 @@ int smu_v13_0_check_fw_version(struct smu_context *smu) smu->smc_driver_if_version =SMU13_DRIVER_IF_VERSION_ALDE ;break ;case IP_VERSION (13 ,0 ,0 ): + smu->smc_driver_if_version =SMU13_DRIVER_IF_VERSION_SMU_V13_0_0_0 ; +break ;case IP_VERSION (13 ,0 ,10 ): smu->smc_driver_if_version =SMU13_DRIVER_IF_VERSION_SMU_V13_0_0_10 ;break ;
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c +100 -11
158 lines not on this page · raw message
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c +16 -3
@@ -189,6 +189,8 @@ static struct cmn2asic_mapping smu_v13_0_7_feature_mask_map[SMU_FEATURE_COUNT] =FEA_MAP (MEM_TEMP_READ ),FEA_MAP (ATHUB_MMHUB_PG ), FEA_MAP(SOC_PCC), + [SMU_FEATURE_DPM_VCLK_BIT] = {1, FEATURE_MM_DPM_BIT}, + [SMU_FEATURE_DPM_DCLK_BIT] = {1, FEATURE_MM_DPM_BIT}, };static struct cmn2asic_mapping smu_v13_0_7_table_map[SMU_TABLE_COUNT ] = {
@@ -1359,12 +1361,23 @@ static int smu_v13_0_7_populate_umd_state_clk(struct smu_context *smu)static int smu_v13_0_7_get_fan_speed_pwm (struct smu_context *smu,uint32_t *speed) { +int ret; +if (!speed)return -EINVAL ; -return smu_v13_0_7_get_smu_metrics_data (smu, -METRICS_CURR_FANPWM , - speed); + ret =smu_v13_0_7_get_smu_metrics_data (smu, +METRICS_CURR_FANPWM , + speed); +if (ret) { +dev_err (smu->adev->dev,"Failed to get fan speed(PWM)!" ); +return ret; + } + +/* Convert the PMFW output which is in percent to pwm(255) based */ + *speed =MIN (*speed *255 /100 ,255 ); + +return 0 ; } static int smu_v13_0_7_get_fan_speed_rpm(struct smu_context *smu,
drivers/gpu/drm/drm_connector.c +3 -0
@@ -505,6 +505,9 @@ void drm_connector_cleanup(struct drm_connector *connector)mutex_destroy (&connector->mutex);memset (connector,0 ,sizeof (*connector)); + +if (dev->registered) +drm_sysfs_hotplug_event (dev); }EXPORT_SYMBOL (drm_connector_cleanup);
drivers/gpu/drm/etnaviv/etnaviv_gem.c +6 -1
@@ -258,7 +258,12 @@ struct etnaviv_vram_mapping *etnaviv_gem_mapping_get(if (mapping->use ==0 ) {mutex_lock (&mmu_context->lock);if (mapping->context == mmu_context) - mapping->use +=1 ; +if (va && mapping->iova != va) { +etnaviv_iommu_reap_mapping (mapping); + mapping =NULL ; + }else { + mapping->use +=1 ; + }else mapping =NULL ;mutex_unlock (&mmu_context->lock);
drivers/gpu/drm/etnaviv/etnaviv_mmu.c +15 -8
@@ -135,6 +135,19 @@ static void etnaviv_iommu_remove_mapping(struct etnaviv_iommu_context *context,drm_mm_remove_node (&mapping->vram_node); } +void etnaviv_iommu_reap_mapping (struct etnaviv_vram_mapping *mapping) +{ +struct etnaviv_iommu_context *context = mapping->context; + +lockdep_assert_held (&context->lock); +WARN_ON (mapping->use); + +etnaviv_iommu_remove_mapping (context, mapping); +etnaviv_iommu_context_put (mapping->context); + mapping->context =NULL ; +list_del_init (&mapping->mmu_node); +} +static int etnaviv_iommu_find_iova (struct etnaviv_iommu_context *context,struct drm_mm_node *node,size_t size) {
@@ -202,10 +215,7 @@ static int etnaviv_iommu_find_iova(struct etnaviv_iommu_context *context,* this mapping. */ list_for_each_entry_safe (m, n, &list, scan_node) { -etnaviv_iommu_remove_mapping (context, m); -etnaviv_iommu_context_put (m->context); - m->context =NULL ; -list_del_init (&m->mmu_node); +etnaviv_iommu_reap_mapping (m);list_del_init (&m->scan_node); }
@@ -257,10 +267,7 @@ static int etnaviv_iommu_insert_exact(struct etnaviv_iommu_context *context, }list_for_each_entry_safe (m, n, &scan_list, scan_node) { -etnaviv_iommu_remove_mapping (context, m); -etnaviv_iommu_context_put (m->context); - m->context =NULL ; -list_del_init (&m->mmu_node); +etnaviv_iommu_reap_mapping (m);list_del_init (&m->scan_node); }
drivers/gpu/drm/etnaviv/etnaviv_mmu.h +1 -0
@@ -91,6 +91,7 @@ int etnaviv_iommu_map_gem(struct etnaviv_iommu_context *context, struct etnaviv_vram_mapping *mapping, u64 va);void etnaviv_iommu_unmap_gem (struct etnaviv_iommu_context *context,struct etnaviv_vram_mapping *mapping); +void etnaviv_iommu_reap_mapping (struct etnaviv_vram_mapping *mapping); int etnaviv_iommu_get_suballoc_va(struct etnaviv_iommu_context *ctx, struct etnaviv_vram_mapping *mapping,
drivers/gpu/drm/i915/display/intel_dsi_vbt.c +2 -2
@@ -137,9 +137,9 @@ static enum port intel_dsi_seq_port_to_port(struct intel_dsi *intel_dsi,return ffs (intel_dsi->ports) -1 ;if (seq_port) { -if (intel_dsi->ports &PORT_B ) +if (intel_dsi->ports &BIT (PORT_B ))return PORT_B ; -else if (intel_dsi->ports &PORT_C ) +else if (intel_dsi->ports &BIT (PORT_C ))return PORT_C ; }
drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c +48 -11
80 lines not on this page · raw message
drivers/gpu/drm/i915/gem/i915_gem_mman.c +1 -1
@@ -369,7 +369,7 @@ static vm_fault_t vm_fault_gtt(struct vm_fault *vmf)if (vma ==ERR_PTR (-ENOSPC )) { ret =mutex_lock_interruptible (&ggtt->vm.mutex);if (!ret) { - ret =i915_gem_evict_vm (&ggtt->vm, &ww); + ret =i915_gem_evict_vm (&ggtt->vm, &ww,NULL );mutex_unlock (&ggtt->vm.mutex); }if (ret)
drivers/gpu/drm/i915/gem/i915_gem_object.c +3 -0
@@ -726,6 +726,9 @@ bool i915_gem_object_needs_ccs_pages(struct drm_i915_gem_object *obj)if (!HAS_FLAT_CCS (to_i915 (obj->base.dev)))return false; +if (obj->flags &I915_BO_ALLOC_CCS_AUX ) +return true; +for (i =0 ; i < obj->mm.n_placements; i++) {/* Compression is not allowed for the objects with smem placement */ if (obj->mm.placements[i]->type ==INTEL_MEMORY_SYSTEM )
drivers/gpu/drm/i915/gem/i915_gem_object_types.h +6 -4
@@ -325,16 +325,18 @@ struct drm_i915_gem_object {* dealing with userspace objects the CPU fault handler is free to ignore this. */ #define I915_BO_ALLOC_GPU_ONLY BIT(6) +#define I915_BO_ALLOC_CCS_AUX BIT(7)#define I915_BO_ALLOC_FLAGS (I915_BO_ALLOC_CONTIGUOUS | \ I915_BO_ALLOC_VOLATILE | \ I915_BO_ALLOC_CPU_CLEAR | \ I915_BO_ALLOC_USER | \ I915_BO_ALLOC_PM_VOLATILE | \ I915_BO_ALLOC_PM_EARLY | \ - I915_BO_ALLOC_GPU_ONLY) -#define I915_BO_READONLY BIT(7) -#define I915_TILING_QUIRK_BIT 8/* unknown swizzling; do not release! */ -#define I915_BO_PROTECTED BIT(9) + I915_BO_ALLOC_GPU_ONLY | \ + I915_BO_ALLOC_CCS_AUX) +#define I915_BO_READONLY BIT(8) +#define I915_TILING_QUIRK_BIT 9/* unknown swizzling; do not release! */ +#define I915_BO_PROTECTED BIT(10)/** * @mem_flags - Mutable placement-related flags *
drivers/gpu/drm/i915/gem/i915_gem_ttm_pm.c +17 -1
@@ -50,6 +50,7 @@ static int i915_ttm_backup(struct i915_gem_apply_to_region *apply,container_of (bo->bdev,typeof (*i915), bdev);struct drm_i915_gem_object *backup;struct ttm_operation_ctx ctx = {}; +unsigned int flags;int err =0 ;if (bo->resource->mem_type ==I915_PL_SYSTEM || obj->ttm.backup)
@@ -65,7 +66,22 @@ static int i915_ttm_backup(struct i915_gem_apply_to_region *apply,if (obj->flags &I915_BO_ALLOC_PM_VOLATILE )return 0 ; - backup =i915_gem_object_create_shmem (i915, obj->base.size); +/* +* It seems that we might have some framebuffers still pinned at this +* stage, but for such objects we might also need to deal with the CCS +* aux state. Make sure we force the save/restore of the CCS state, +* otherwise we might observe display corruption, when returning from +* suspend. +*/ + flags =0 ; +if (i915_gem_object_needs_ccs_pages (obj)) { +WARN_ON_ONCE (!i915_gem_object_is_framebuffer (obj)); +WARN_ON_ONCE (!pm_apply->allow_gpu); + + flags =I915_BO_ALLOC_CCS_AUX ; + } + backup =i915_gem_object_create_region (i915->mm.regions[INTEL_REGION_SMEM ], + obj->base.size,0 , flags);if (IS_ERR (backup))return PTR_ERR (backup);
drivers/gpu/drm/i915/gt/intel_migrate.c +12 -4
@@ -341,6 +341,16 @@ static int emit_no_arbitration(struct i915_request *rq)return 0 ; } +static int max_pte_pkt_size (struct i915_request *rq,int pkt) +{ +struct intel_ring *ring = rq->ring; + + pkt =min_t (int, pkt, (ring->space - rq->reserved_space) /sizeof (u32) +5 ); + pkt =min_t (int, pkt, (ring->size - ring->emit) /sizeof (u32) +5 ); + +return pkt; +} + static int emit_pte(struct i915_request *rq, struct sgt_dma *it, enum i915_cache_level cache_level,
@@ -387,8 +397,7 @@ static int emit_pte(struct i915_request *rq,return PTR_ERR (cs);/* Pack as many PTE updates as possible into a single MI command */ - pkt =min_t (int, dword_length, ring->space /sizeof (u32) +5 ); - pkt =min_t (int, pkt, (ring->size - ring->emit) /sizeof (u32) +5 ); + pkt =max_pte_pkt_size (rq, dword_length); hdr = cs; *cs++ =MI_STORE_DATA_IMM |REG_BIT (21 );/* as qword elements */
@@ -421,8 +430,7 @@ static int emit_pte(struct i915_request *rq, } } - pkt =min_t (int, dword_rem, ring->space /sizeof (u32) +5 ); - pkt =min_t (int, pkt, (ring->size - ring->emit) /sizeof (u32) +5 ); + pkt =max_pte_pkt_size (rq, dword_rem); hdr = cs; *cs++ =MI_STORE_DATA_IMM |REG_BIT (21 );
drivers/gpu/drm/i915/i915_gem_evict.c +27 -10
@@ -416,6 +416,11 @@ int i915_gem_evict_for_node(struct i915_address_space *vm,* @vm: Address space to cleanse * @ww: An optional struct i915_gem_ww_ctx. If not NULL, i915_gem_evict_vm * will be able to evict vma's locked by the ww as well. +* @busy_bo: Optional pointer to struct drm_i915_gem_object. If not NULL, then +* in the event i915_gem_evict_vm() is unable to trylock an object for eviction, +* then @busy_bo will point to it. -EBUSY is also returned. The caller must drop +* the vm->mutex, before trying again to acquire the contended lock. The caller +* also owns a reference to the object. * * This function evicts all vmas from a vm. *
@@ -425,7 +430,8 @@ int i915_gem_evict_for_node(struct i915_address_space *vm,* To clarify: This is for freeing up virtual address space, not for freeing * memory in e.g. the shrinker. */ -int i915_gem_evict_vm (struct i915_address_space *vm,struct i915_gem_ww_ctx *ww) +int i915_gem_evict_vm (struct i915_address_space *vm,struct i915_gem_ww_ctx *ww, +struct drm_i915_gem_object **busy_bo) {int ret =0 ;
@@ -457,15 +463,22 @@ int i915_gem_evict_vm(struct i915_address_space *vm, struct i915_gem_ww_ctx *ww)* the resv is shared among multiple objects, we still * need the object ref. */ -if (dying_vma (vma) || +if (!i915_gem_object_get_rcu (vma->obj) || (ww && (dma_resv_locking_ctx (vma->obj->base.resv) == &ww->ctx))) {__i915_vma_pin (vma);list_add (&vma->evict_link, &locked_eviction_list);continue ; } -if (!i915_gem_object_trylock (vma->obj, ww)) +if (!i915_gem_object_trylock (vma->obj, ww)) { +if (busy_bo) { + *busy_bo = vma->obj;/* holds ref */ + ret = -EBUSY ; +break ; + } +i915_gem_object_put (vma->obj);continue ; + }__i915_vma_pin (vma);list_add (&vma->evict_link, &eviction_list);
@@ -473,25 +486,29 @@ int i915_gem_evict_vm(struct i915_address_space *vm, struct i915_gem_ww_ctx *ww)if (list_empty (&eviction_list) &&list_empty (&locked_eviction_list))break ; - ret =0 ;/* Unbind locked objects first, before unlocking the eviction_list */ list_for_each_entry_safe (vma, vn, &locked_eviction_list, evict_link) {__i915_vma_unpin (vma); -if (ret ==0 ) +if (ret ==0 ) { ret =__i915_vma_unbind (vma); -if (ret != -EINTR )/* "Get me out of here!" */ - ret =0 ; +if (ret != -EINTR )/* "Get me out of here!" */ + ret =0 ; + } +if (!dying_vma (vma)) +i915_gem_object_put (vma->obj); }list_for_each_entry_safe (vma, vn, &eviction_list, evict_link) {__i915_vma_unpin (vma); -if (ret ==0 ) +if (ret ==0 ) { ret =__i915_vma_unbind (vma); -if (ret != -EINTR )/* "Get me out of here!" */ - ret =0 ; +if (ret != -EINTR )/* "Get me out of here!" */ + ret =0 ; + }i915_gem_object_unlock (vma->obj); +i915_gem_object_put (vma->obj); } }while (ret ==0 );
drivers/gpu/drm/i915/i915_gem_evict.h +3 -1
@@ -11,6 +11,7 @@struct drm_mm_node ;struct i915_address_space ;struct i915_gem_ww_ctx ; +struct drm_i915_gem_object ; int __must_check i915_gem_evict_something(struct i915_address_space *vm, struct i915_gem_ww_ctx *ww,
@@ -23,6 +24,7 @@ int __must_check i915_gem_evict_for_node(struct i915_address_space *vm,struct drm_mm_node *node, unsigned int flags);int i915_gem_evict_vm (struct i915_address_space *vm, -struct i915_gem_ww_ctx *ww); +struct i915_gem_ww_ctx *ww, +struct drm_i915_gem_object **busy_bo);#endif /* __I915_GEM_EVICT_H__ */
drivers/gpu/drm/i915/i915_vma.c +1 -1
@@ -1569,7 +1569,7 @@ static int __i915_ggtt_pin(struct i915_vma *vma, struct i915_gem_ww_ctx *ww,* locked objects when called from execbuf when pinning * is removed. This would probably regress badly. */ -i915_gem_evict_vm (vm,NULL ); +i915_gem_evict_vm (vm,NULL ,NULL );mutex_unlock (&vm->mutex); } }while (1 );
drivers/gpu/drm/i915/selftests/i915_gem_evict.c +2 -2
@@ -344,7 +344,7 @@ static int igt_evict_vm(void *arg)/* Everything is pinned, nothing should happen */ mutex_lock (&ggtt->vm.mutex); - err =i915_gem_evict_vm (&ggtt->vm,NULL ); + err =i915_gem_evict_vm (&ggtt->vm,NULL ,NULL );mutex_unlock (&ggtt->vm.mutex);if (err) { pr_err("i915_gem_evict_vm on a full GGTT returned err=%d]\n",
@@ -356,7 +356,7 @@ static int igt_evict_vm(void *arg) for_i915_gem_ww(&ww, err, false) {mutex_lock (&ggtt->vm.mutex); - err =i915_gem_evict_vm (&ggtt->vm, &ww); + err =i915_gem_evict_vm (&ggtt->vm, &ww,NULL );mutex_unlock (&ggtt->vm.mutex); }
drivers/gpu/drm/ingenic/ingenic-drm-drv.c +5 -1
@@ -1601,7 +1601,11 @@ static int ingenic_drm_init(void)return err; } -return platform_driver_register (&ingenic_drm_driver); + err =platform_driver_register (&ingenic_drm_driver); +if (IS_ENABLED (CONFIG_DRM_INGENIC_IPU ) && err) +platform_driver_unregister (ingenic_ipu_driver_ptr); + +return err; }module_init (ingenic_drm_init);
drivers/gpu/drm/vmwgfx/vmwgfx_kms.c +2 -1
@@ -309,7 +309,8 @@ void vmw_kms_cursor_snoop(struct vmw_surface *srf,if (cmd->dma.guest.ptr.offset %PAGE_SIZE || box->x !=0 || box->y !=0 || box->z !=0 || box->srcx !=0 || box->srcy !=0 || box->srcz !=0 || - box->d !=1 || box_count !=1 ) { + box->d !=1 || box_count !=1 || + box->w >64 || box->h >64 ) {/* TODO handle none page aligned offsets */ /* TODO handle more dst & src != 0 */ /* TODO handle more then one copy */
drivers/iommu/amd/init.c +61 -25
122 lines not on this page · raw message
drivers/md/dm-cache-metadata.c +47 -7
86 lines not on this page · raw message
drivers/md/dm-cache-target.c +6 -5
@@ -907,16 +907,16 @@ static void abort_transaction(struct cache *cache)if (get_cache_mode (cache) >=CM_READ_ONLY )return ; -if (dm_cache_metadata_set_needs_check (cache->cmd)) { -DMERR ("%s: failed to set 'needs_check' flag in metadata" , dev_name); -set_cache_mode (cache,CM_FAIL ); - } -DMERR_LIMIT ("%s: aborting current metadata transaction" , dev_name);if (dm_cache_metadata_abort (cache->cmd)) {DMERR ("%s: failed to abort metadata transaction" , dev_name);set_cache_mode (cache,CM_FAIL ); } + +if (dm_cache_metadata_set_needs_check (cache->cmd)) { +DMERR ("%s: failed to set 'needs_check' flag in metadata" , dev_name); +set_cache_mode (cache,CM_FAIL ); + } }static void metadata_operation_failed (struct cache *cache,const char *op,int r)
@@ -1887,6 +1887,7 @@ static void destroy(struct cache *cache)if (cache->prison)dm_bio_prison_destroy_v2 (cache->prison); +cancel_delayed_work_sync (&cache->waker);if (cache->wq)destroy_workqueue (cache->wq);
drivers/md/dm-clone-target.c +1 -0
@@ -1958,6 +1958,7 @@ static void clone_dtr(struct dm_target *ti)mempool_exit (&clone->hydration_pool);dm_kcopyd_client_destroy (clone->kcopyd_client); +cancel_delayed_work_sync (&clone->waker);destroy_workqueue (clone->wq);hash_table_exit (clone);dm_clone_metadata_close (clone->cmd);
drivers/md/dm-integrity.c +2 -0
@@ -4558,6 +4558,8 @@ static void dm_integrity_dtr(struct dm_target *ti)BUG_ON (!RB_EMPTY_ROOT (&ic->in_progress));BUG_ON (!list_empty (&ic->wait_list)); +if (ic->mode =='B' ) +cancel_delayed_work_sync (&ic->bitmap_flush_work);if (ic->metadata_wq)destroy_workqueue (ic->metadata_wq);if (ic->wait_wq)
drivers/md/dm-thin-metadata.c +52 -8
97 lines not on this page · raw message
drivers/md/dm-thin.c +14 -4
@@ -2889,6 +2889,8 @@ static void __pool_destroy(struct pool *pool)dm_bio_prison_destroy (pool->prison);dm_kcopyd_client_destroy (pool->copier); +cancel_delayed_work_sync (&pool->waker); +cancel_delayed_work_sync (&pool->no_space_timeout);if (pool->wq)destroy_workqueue (pool->wq);
@@ -3540,20 +3542,28 @@ static int pool_preresume(struct dm_target *ti)*/ r =bind_control_target (pool, ti);if (r) -return r; + goto out; r =maybe_resize_data_dev (ti, &need_commit1);if (r) -return r; + goto out; r =maybe_resize_metadata_dev (ti, &need_commit2);if (r) -return r; + goto out;if (need_commit1 || need_commit2) (void )commit (pool); +out: +/* +* When a thin-pool is PM_FAIL, it cannot be rebuilt if +* bio is in deferred list. Therefore need to return 0 +* to allow pool_resume() to flush IO. +*/ +if (r &&get_pool_mode (pool) ==PM_FAIL ) + r =0 ; -return 0 ; +return r; }static void pool_suspend_active_thins (struct pool *pool)
drivers/md/md-bitmap.c +12 -8
@@ -486,7 +486,7 @@ void md_bitmap_print_sb(struct bitmap *bitmap) sb =kmap_atomic (bitmap->storage.sb_page);pr_debug ("%s: bitmap file superblock:\n" ,bmname (bitmap));pr_debug (" magic: %08x\n" ,le32_to_cpu (sb->magic)); -pr_debug (" version: %d\n" ,le32_to_cpu (sb->version)); +pr_debug (" version: %u\n" ,le32_to_cpu (sb->version)); pr_debug(" uuid: %08x.%08x.%08x.%08x\n", le32_to_cpu(*(__le32 *)(sb->uuid+0)), le32_to_cpu(*(__le32 *)(sb->uuid+4)),
@@ -497,11 +497,11 @@ void md_bitmap_print_sb(struct bitmap *bitmap)pr_debug ("events cleared: %llu\n" , (unsigned long long )le64_to_cpu (sb->events_cleared));pr_debug (" state: %08x\n" ,le32_to_cpu (sb->state)); -pr_debug (" chunksize: %d B\n" ,le32_to_cpu (sb->chunksize)); -pr_debug (" daemon sleep: %ds\n" ,le32_to_cpu (sb->daemon_sleep)); +pr_debug (" chunksize: %u B\n" ,le32_to_cpu (sb->chunksize)); +pr_debug (" daemon sleep: %us\n" ,le32_to_cpu (sb->daemon_sleep));pr_debug (" sync size: %llu KB\n" , (unsigned long long )le64_to_cpu (sb->sync_size)/2 ); -pr_debug ("max write behind: %d\n" ,le32_to_cpu (sb->write_behind)); +pr_debug ("max write behind: %u\n" ,le32_to_cpu (sb->write_behind));kunmap_atomic (sb); }
@@ -2105,7 +2105,8 @@ int md_bitmap_resize(struct bitmap *bitmap, sector_t blocks, bytes =DIV_ROUND_UP (chunks,8 );if (!bitmap->mddev->bitmap_info.external) bytes +=sizeof (bitmap_super_t); - }while (bytes > (space <<9 )); + }while (bytes > (space <<9 ) && (chunkshift +BITMAP_BLOCK_SHIFT ) < + (BITS_PER_BYTE *sizeof (((bitmap_super_t *)0 )->chunksize) -1 )); }else chunkshift =ffz (~chunksize) -BITMAP_BLOCK_SHIFT ;
@@ -2150,7 +2151,7 @@ int md_bitmap_resize(struct bitmap *bitmap, sector_t blocks, bitmap->counts.missing_pages = pages; bitmap->counts.chunkshift = chunkshift; bitmap->counts.chunks = chunks; - bitmap->mddev->bitmap_info.chunksize =1 << (chunkshift + + bitmap->mddev->bitmap_info.chunksize =1UL << (chunkshift +BITMAP_BLOCK_SHIFT ); blocks = min(old_counts.chunks << old_counts.chunkshift,
@@ -2176,8 +2177,8 @@ int md_bitmap_resize(struct bitmap *bitmap, sector_t blocks, bitmap->counts.missing_pages = old_counts.pages; bitmap->counts.chunkshift = old_counts.chunkshift; bitmap->counts.chunks = old_counts.chunks; - bitmap->mddev->bitmap_info.chunksize =1 << (old_counts.chunkshift + -BITMAP_BLOCK_SHIFT ); + bitmap->mddev->bitmap_info.chunksize = +1UL << (old_counts.chunkshift +BITMAP_BLOCK_SHIFT ); blocks = old_counts.chunks << old_counts.chunkshift;pr_warn ("Could not pre-allocate in-memory bitmap for cluster raid\n" );break ;
@@ -2537,6 +2538,9 @@ chunksize_store(struct mddev *mddev, const char *buf, size_t len)if (csize <512 || !is_power_of_2 (csize))return -EINVAL ; +if (BITS_PER_LONG >32 && csize >= (1ULL << (BITS_PER_BYTE * +sizeof (((bitmap_super_t *)0 )->chunksize)))) +return -EOVERFLOW ; mddev->bitmap_info.chunksize = csize;return len; }
drivers/media/dvb-core/dmxdev.c +8 -0
@@ -790,6 +790,11 @@ static int dvb_demux_open(struct inode *inode, struct file *file)if (mutex_lock_interruptible (&dmxdev->mutex))return -ERESTARTSYS ; +if (dmxdev->exit) { +mutex_unlock (&dmxdev->mutex); +return -ENODEV ; + } +for (i =0 ; i < dmxdev->filternum; i++)if (dmxdev->filter[i].state ==DMXDEV_STATE_FREE )break ;
@@ -1448,7 +1453,10 @@ EXPORT_SYMBOL(dvb_dmxdev_init);void dvb_dmxdev_release (struct dmxdev *dmxdev) { +mutex_lock (&dmxdev->mutex); dmxdev->exit =1 ; +mutex_unlock (&dmxdev->mutex); +if (dmxdev->dvbdev->users >1 ) {wait_event (dmxdev->dvbdev->wait_queue, dmxdev->dvbdev->users ==1 );
drivers/media/dvb-core/dvbdev.c +1 -0
@@ -335,6 +335,7 @@ static int dvb_create_media_entity(struct dvb_device *dvbdev, GFP_KERNEL);if (!dvbdev->pads) {kfree (dvbdev->entity); + dvbdev->entity =NULL ;return -ENOMEM ; } }
drivers/media/dvb-frontends/stv0288.c +2 -3
@@ -440,9 +440,8 @@ static int stv0288_set_frontend(struct dvb_frontend *fe)struct stv0288_state *state = fe->demodulator_priv;struct dtv_frontend_properties *c = &fe->dtv_property_cache; -char tm; -unsigned char tda[3 ]; -u8 reg, time_out =0 ; +u8 tda[3 ], reg, time_out =0 ; +s8 tm;dprintk ("%s : FE_SET_FRONTEND\n" , __func__);
drivers/media/platform/samsung/s5p-mfc/s5p_mfc_ctrl.c +3 -1
@@ -468,8 +468,10 @@ void s5p_mfc_close_mfc_inst(struct s5p_mfc_dev *dev, struct s5p_mfc_ctx *ctx)s5p_mfc_hw_call (dev->mfc_ops, try_run, dev);/* Wait until instance is returned or timeout occurred */ if (s5p_mfc_wait_for_done_ctx (ctx, -S5P_MFC_R2H_CMD_CLOSE_INSTANCE_RET ,0 )) +S5P_MFC_R2H_CMD_CLOSE_INSTANCE_RET ,0 )){ +clear_work_bit_irqsave (ctx);mfc_err ("Err returning instance\n" ); + }/* Free resources */ s5p_mfc_hw_call (dev->mfc_ops, release_codec_buffers, ctx);
drivers/media/platform/samsung/s5p-mfc/s5p_mfc_enc.c +10 -2
@@ -1218,6 +1218,7 @@ static int enc_post_frame_start(struct s5p_mfc_ctx *ctx)unsigned long mb_y_addr, mb_c_addr;int slice_type;unsigned int strm_size; +bool src_ready; slice_type =s5p_mfc_hw_call (dev->mfc_ops, get_enc_slice_type, dev); strm_size =s5p_mfc_hw_call (dev->mfc_ops, get_enc_strm_size, dev);
@@ -1257,7 +1258,8 @@ static int enc_post_frame_start(struct s5p_mfc_ctx *ctx) } } } -if ((ctx->src_queue_cnt >0 ) && (ctx->state ==MFCINST_RUNNING )) { +if (ctx->src_queue_cnt >0 && (ctx->state ==MFCINST_RUNNING || + ctx->state ==MFCINST_FINISHING )) { mb_entry = list_entry(ctx->src_queue.next, struct s5p_mfc_buf, list);if (mb_entry->flags &MFC_BUF_FLAG_USED ) {
@@ -1288,7 +1290,13 @@ static int enc_post_frame_start(struct s5p_mfc_ctx *ctx)vb2_set_plane_payload (&mb_entry->b->vb2_buf,0 , strm_size);vb2_buffer_done (&mb_entry->b->vb2_buf,VB2_BUF_STATE_DONE ); } -if ((ctx->src_queue_cnt ==0 ) || (ctx->dst_queue_cnt ==0 )) + + src_ready = true; +if (ctx->state ==MFCINST_RUNNING && ctx->src_queue_cnt ==0 ) + src_ready = false; +if (ctx->state ==MFCINST_FINISHING && ctx->ref_queue_cnt ==0 ) + src_ready = false; +if (!src_ready || ctx->dst_queue_cnt ==0 )clear_work_bit (ctx);return 0 ;
drivers/media/platform/samsung/s5p-mfc/s5p_mfc_opr_v6.c +7 -7
@@ -1060,7 +1060,7 @@ static int s5p_mfc_set_enc_params_h264(struct s5p_mfc_ctx *ctx) }/* aspect ratio VUI */ -readl (mfc_regs->e_h264_options); + reg =readl (mfc_regs->e_h264_options); reg &= ~(0x1 <<5 ); reg |= ((p_h264->vui_sar &0x1 ) <<5 );writel (reg, mfc_regs->e_h264_options);
@@ -1083,7 +1083,7 @@ static int s5p_mfc_set_enc_params_h264(struct s5p_mfc_ctx *ctx)/* intra picture period for H.264 open GOP */ /* control */ -readl (mfc_regs->e_h264_options); + reg =readl (mfc_regs->e_h264_options); reg &= ~(0x1 <<4 ); reg |= ((p_h264->open_gop &0x1 ) <<4 );writel (reg, mfc_regs->e_h264_options);
@@ -1097,23 +1097,23 @@ static int s5p_mfc_set_enc_params_h264(struct s5p_mfc_ctx *ctx) }/* 'WEIGHTED_BI_PREDICTION' for B is disable */ -readl (mfc_regs->e_h264_options); + reg =readl (mfc_regs->e_h264_options); reg &= ~(0x3 <<9 );writel (reg, mfc_regs->e_h264_options);/* 'CONSTRAINED_INTRA_PRED_ENABLE' is disable */ -readl (mfc_regs->e_h264_options); + reg =readl (mfc_regs->e_h264_options); reg &= ~(0x1 <<14 );writel (reg, mfc_regs->e_h264_options);/* ASO */ -readl (mfc_regs->e_h264_options); + reg =readl (mfc_regs->e_h264_options); reg &= ~(0x1 <<6 ); reg |= ((p_h264->aso &0x1 ) <<6 );writel (reg, mfc_regs->e_h264_options);/* hier qp enable */ -readl (mfc_regs->e_h264_options); + reg =readl (mfc_regs->e_h264_options); reg &= ~(0x1 <<8 ); reg |= ((p_h264->open_gop &0x1 ) <<8 );writel (reg, mfc_regs->e_h264_options);
@@ -1134,7 +1134,7 @@ static int s5p_mfc_set_enc_params_h264(struct s5p_mfc_ctx *ctx)writel (reg, mfc_regs->e_h264_num_t_layer);/* frame packing SEI generation */ -readl (mfc_regs->e_h264_options); + reg =readl (mfc_regs->e_h264_options); reg &= ~(0x1 <<25 ); reg |= ((p_h264->sei_frame_packing &0x1 ) <<25 );writel (reg, mfc_regs->e_h264_options);
drivers/mmc/host/sdhci-sprd.c +9 -7
@@ -228,13 +228,15 @@ static inline void _sdhci_sprd_set_clock(struct sdhci_host *host, div = ((div &0x300 ) >>2 ) | ((div &0xFF ) <<8 );sdhci_enable_clk (host, div); -/* enable auto gate sdhc_enable_auto_gate */ - val =sdhci_readl (host,SDHCI_SPRD_REG_32_BUSY_POSI ); - mask =SDHCI_SPRD_BIT_OUTR_CLK_AUTO_EN | -SDHCI_SPRD_BIT_INNR_CLK_AUTO_EN ; -if (mask != (val & mask)) { - val |= mask; -sdhci_writel (host, val,SDHCI_SPRD_REG_32_BUSY_POSI ); +/* Enable CLK_AUTO when the clock is greater than 400K. */ +if (clk >400000 ) { + val =sdhci_readl (host,SDHCI_SPRD_REG_32_BUSY_POSI ); + mask =SDHCI_SPRD_BIT_OUTR_CLK_AUTO_EN | +SDHCI_SPRD_BIT_INNR_CLK_AUTO_EN ; +if (mask != (val & mask)) { + val |= mask; +sdhci_writel (host, val,SDHCI_SPRD_REG_32_BUSY_POSI ); + } } }
drivers/mtd/spi-nor/core.c +2 -0
@@ -1184,6 +1184,8 @@ spi_nor_find_best_erase_type(const struct spi_nor_erase_map *map,continue ; erase = &map->erase_type[i]; +if (!erase->size) +continue ;/* Alignment is not mandatory for overlaid regions */ if (region->offset & SNOR_OVERLAID_REGION &&
drivers/mtd/spi-nor/gigadevice.c +17 -7
@@ -8,19 +8,29 @@#include "core.h" -static void gd25q256_default_init (struct spi_nor *nor) +static int +gd25q256_post_bfpt (struct spi_nor *nor, +const struct sfdp_parameter_header *bfpt_header, +const struct sfdp_bfpt *bfpt) {/* -* Some manufacturer like GigaDevice may use different -* bit to set QE on different memories, so the MFR can't -* indicate the quad_enable method for this case, we need -* to set it in the default_init fixup hook. +* GD25Q256C supports the first version of JESD216 which does not define +* the Quad Enable methods. Overwrite the default Quad Enable method. +* +* GD25Q256 GENERATION | SFDP MAJOR VERSION | SFDP MINOR VERSION +* GD25Q256C | SFDP_JESD216_MAJOR | SFDP_JESD216_MINOR +* GD25Q256D | SFDP_JESD216_MAJOR | SFDP_JESD216B_MINOR +* GD25Q256E | SFDP_JESD216_MAJOR | SFDP_JESD216B_MINOR */ - nor->params->quad_enable = spi_nor_sr1_bit6_quad_enable; +if (bfpt_header->major ==SFDP_JESD216_MAJOR && + bfpt_header->minor ==SFDP_JESD216_MINOR ) + nor->params->quad_enable = spi_nor_sr1_bit6_quad_enable; + +return 0 ; }static const struct spi_nor_fixups gd25q256_fixups = { - .default_init = gd25q256_default_init, + .post_bfpt = gd25q256_post_bfpt, };static const struct flash_info gigadevice_nor_parts[] = {
drivers/net/ethernet/renesas/ravb_main.c +1 -1
@@ -2896,12 +2896,12 @@ static int ravb_remove(struct platform_device *pdev) priv->desc_bat_dma);/* Set reset mode */ ravb_write (ndev,CCC_OPC_RESET ,CCC ); -pm_runtime_put_sync (&pdev->dev);unregister_netdev (ndev);if (info->nc_queues)netif_napi_del (&priv->napi[RAVB_NC ]);netif_napi_del (&priv->napi[RAVB_BE ]);ravb_mdio_release (priv); +pm_runtime_put_sync (&pdev->dev);pm_runtime_disable (&pdev->dev);reset_control_assert (priv->rstc);free_netdev (ndev);
drivers/net/wireless/microchip/wilc1000/sdio.c +1 -0
@@ -20,6 +20,7 @@ static const struct sdio_device_id wilc_sdio_ids[] = { { SDIO_DEVICE(SDIO_VENDOR_ID_MICROCHIP_WILC, SDIO_DEVICE_ID_MICROCHIP_WILC1000) }, { }, }; +MODULE_DEVICE_TABLE (sdio, wilc_sdio_ids);#define WILC_SDIO_BLOCK_SIZE 512
drivers/of/kexec.c +5 -5
@@ -281,7 +281,7 @@ void *of_kexec_alloc_and_setup_fdt(const struct kimage *image, const char *cmdline, size_t extra_fdt_size) { void *fdt; -int ret, chosen_node; +int ret, chosen_node, len;const void *prop;size_t fdt_size;
@@ -324,19 +324,19 @@ void *of_kexec_alloc_and_setup_fdt(const struct kimage *image, goto out;/* Did we boot using an initrd? */ - prop =fdt_getprop (fdt, chosen_node,"linux,initrd-start" ,NULL ); + prop =fdt_getprop (fdt, chosen_node,"linux,initrd-start" , &len);if (prop) {u64 tmp_start, tmp_end, tmp_size; - tmp_start =fdt64_to_cpu (*((const fdt64_t *) prop)); + tmp_start =of_read_number (prop, len /4 ); - prop =fdt_getprop (fdt, chosen_node,"linux,initrd-end" ,NULL ); + prop =fdt_getprop (fdt, chosen_node,"linux,initrd-end" , &len);if (!prop) { ret = -EINVAL ; goto out; } - tmp_end =fdt64_to_cpu (*((const fdt64_t *) prop)); + tmp_end =of_read_number (prop, len /4 );/* * kexec reserves exact initrd size, while firmware may
drivers/parisc/led.c +3 -0
@@ -137,6 +137,9 @@ static int start_task(void)/* Create the work queue and queue the LED task */ led_wq =create_singlethread_workqueue ("led_wq" ); +if (!led_wq) +return -ENOMEM ; +queue_delayed_work (led_wq, &led_task,0 );return 0 ;
drivers/pci/doe.c +16 -4
@@ -29,6 +29,9 @@#define PCI_DOE_FLAG_CANCEL 0#define PCI_DOE_FLAG_DEAD 1 +/* Max data object length is 2^18 dwords */ +#define PCI_DOE_MAX_LENGTH (1 << 18) +/** * struct pci_doe_mb - State for a single DOE mailbox *
@@ -107,6 +110,7 @@ static int pci_doe_send_req(struct pci_doe_mb *doe_mb, {struct pci_dev *pdev = doe_mb->pdev;int offset = doe_mb->cap_offset; +size_t length;u32 val;int i;
@@ -123,15 +127,20 @@ static int pci_doe_send_req(struct pci_doe_mb *doe_mb,if (FIELD_GET (PCI_DOE_STATUS_ERROR , val))return -EIO ; +/* Length is 2 DW of header + length of payload in DW */ + length =2 + task->request_pl_sz /sizeof (u32); +if (length >PCI_DOE_MAX_LENGTH ) +return -EIO ; +if (length ==PCI_DOE_MAX_LENGTH ) + length =0 ; +/* Write DOE Header */ val =FIELD_PREP (PCI_DOE_DATA_OBJECT_HEADER_1_VID , task->prot.vid) |FIELD_PREP (PCI_DOE_DATA_OBJECT_HEADER_1_TYPE , task->prot.type);pci_write_config_dword (pdev, offset +PCI_DOE_WRITE , val); -/* Length is 2 DW of header + length of payload in DW */ pci_write_config_dword (pdev, offset +PCI_DOE_WRITE ,FIELD_PREP (PCI_DOE_DATA_OBJECT_HEADER_2_LENGTH , -2 + task->request_pl_sz / -sizeof (u32))); + length));for (i =0 ; i < task->request_pl_sz /sizeof (u32); i++)pci_write_config_dword (pdev, offset +PCI_DOE_WRITE , task->request_pl[i]);
@@ -178,7 +187,10 @@ static int pci_doe_recv_resp(struct pci_doe_mb *doe_mb, struct pci_doe_task *taspci_write_config_dword (pdev, offset +PCI_DOE_READ ,0 ); length =FIELD_GET (PCI_DOE_DATA_OBJECT_HEADER_2_LENGTH , val); -if (length >SZ_1M || length <2 ) +/* A value of 0x0 indicates max data object length */ +if (!length) + length =PCI_DOE_MAX_LENGTH ; +if (length <2 )return -EIO ;/* First 2 dwords have already been read */
drivers/pci/pci-sysfs.c +9 -4
@@ -1174,11 +1174,9 @@ static int pci_create_attr(struct pci_dev *pdev, int num, int write_combine)sysfs_bin_attr_init (res_attr);if (write_combine) { - pdev->res_attr_wc[num] = res_attr;sprintf (res_attr_name,"resource%d_wc" , num); res_attr->mmap = pci_mmap_resource_wc; }else { - pdev->res_attr[num] = res_attr;sprintf (res_attr_name,"resource%d" , num);if (pci_resource_flags (pdev, num) &IORESOURCE_IO ) { res_attr->read = pci_read_resource_io;
@@ -1196,10 +1194,17 @@ static int pci_create_attr(struct pci_dev *pdev, int num, int write_combine) res_attr->size =pci_resource_len (pdev, num); res_attr->private = (void *)(unsigned long )num; retval =sysfs_create_bin_file (&pdev->dev.kobj, res_attr); -if (retval) +if (retval) {kfree (res_attr); +return retval; + } + +if (write_combine) + pdev->res_attr_wc[num] = res_attr; +else + pdev->res_attr[num] = res_attr; -return retval; +return 0 ; }/**
drivers/pci/pci.c +2 -0
@@ -6462,6 +6462,8 @@ bool pci_device_is_present(struct pci_dev *pdev) {u32 v; +/* Check PF if pdev is a VF, since VF Vendor/Device IDs are 0xffff */ + pdev =pci_physfn (pdev);if (pci_dev_is_disconnected (pdev))return false;
Lines of this file are not shown. View the raw message.
drivers/phy/qualcomm/phy-qcom-qmp-combo.c +4 -4
Lines of this file are not shown. View the raw message.
drivers/staging/media/ipu3/ipu3-v4l2.c +34 -23
57 lines not on this page · raw message
drivers/staging/media/tegra-video/csi.c +3 -1
Lines of this file are not shown. View the raw message.
drivers/staging/media/tegra-video/csi.h +1 -1
Lines of this file are not shown. View the raw message.
fs/ext4/fast_commit.c +94 -77
171 lines not on this page · raw message
fs/ext4/inode.c +39 -9
48 lines not on this page · raw message
fs/ext4/namei.c +27 -20
47 lines not on this page · raw message
include/trace/events/jbd2.h +22 -22
44 lines not on this page · raw message
net/mptcp/subflow.c +51 -10
61 lines not on this page · raw message
security/integrity/platform_certs/load_uefi.c +1 -0
Lines of this file are not shown. View the raw message.
sound/pci/hda/patch_realtek.c +50 -0
50 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.