5.15.86-rc1 review
Subsystems (11)
Greg Kroah-Hartman
maintainercover 5.15.86-rc1 review
This is the start of the stable review cycle for the 5.15.86 release. There are 731 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Fri, 30 Dec 2022 14:41:39 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.15.86-rc1.gz
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.15.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <[email protected]>
Linux 5.15.86-rc1
Yassine Oudjana <[email protected]>
extcon: usbc-tusb320: Call the Type-C IRQ handler only if a port is registered
Lin Ma <[email protected]>
media: dvbdev: fix refcnt bug
Lin Ma <[email protected]>
media: dvbdev: fix build warning due to comments
Gaosheng Cui <[email protected]>
net: stmmac: fix errno when create_singlethread_workqueue() fails
Arun Easi <[email protected]>
scsi: qla2xxx: Fix crash when I/O abort times out
Filipe Manana <[email protected]>
btrfs: do not BUG_ON() on ENOMEM when dropping extent items for a range
Chen Zhongjin <[email protected]>
ovl: fix use inode directly in rcu-walk mode
Tetsuo Handa <[email protected]>
fbdev: fbcon: release buffer when fbcon_do_set_font() failed
Rickard x Andersson <[email protected]>
gcov: add support for checksum field
Yuan Can <[email protected]>
floppy: Fix memory leak in do_floppy_init()
Johan Hovold <[email protected]>
regulator: core: fix deadlock on regulator enable
Rasmus Villemoes <[email protected]>
iio: adc128s052: add proper .data members in adc128_of_match table
Nuno Sá <[email protected]>
iio: adc: ad_sigma_delta: do not use internal iio_dev lock
Zeng Heng <[email protected]>
iio: fix memory leak in iio_device_register_eventset()
Roberto Sassu <[email protected]>
reiserfs: Add missing calls to reiserfs_security_free()
Nathan Chancellor <[email protected]>
security: Restrict CONFIG_ZERO_CALL_USED_REGS to gcc or clang > 15.0.6
Schspa Shi <[email protected]>
9p: set req refcount to zero to avoid uninitialized usage
Isaac J. Manjarres <[email protected]>
loop: Fix the max_loop commandline argument treatment when it is set to 0
Enrik Berkhan <[email protected]>
HID: mcp2221: don't connect hidraw
Jason Gerecke <[email protected]>
HID: wacom: Ensure bootloader PID is usable in hidraw mode
Mathias Nyman <[email protected]>
xhci: Prevent infinite loop in transaction errors recovery for streams
Ferry Toth <[email protected]>
usb: dwc3: core: defer probe on ulpi_read_id timeout
Sven Peter <[email protected]>
usb: dwc3: Fix race between dwc3_set_mode and __dwc3_set_mode
Johan Hovold <[email protected]>
arm64: dts: qcom: sm8250: fix USB-DP PHY registers
Chunfeng Yun <[email protected]>
usb: xhci-mtk: fix leakage of shared hcd when fail to set wakeup irq
Pawel Laszczak <[email protected]>
usb: cdnsp: fix lack of ZLP for ep0
Jiao Zhou <[email protected]>
ALSA: hda/hdmi: Add HP Device 0x8711 to force connect list
Edward Pacman <[email protected]>
ALSA: hda/realtek: Add quirk for Lenovo TianYi510Pro-14IOB
wangdicheng <[email protected]>
ALSA: usb-audio: add the quirk for KT0206 device
GUO Zihua <[email protected]>
ima: Simplify ima_lsm_copy_rule
John Stultz <[email protected]>
pstore: Make sure CONFIG_PSTORE_PMSG selects CONFIG_RT_MUTEXES
David Howells <[email protected]>
afs: Fix lost servers_outstanding count
Yang Jihong <[email protected]>
perf debug: Set debug_peo_args and redirect_to_stderr variable to correct values in perf_quiet_option()
John Stultz <[email protected]>
pstore: Switch pmsg_lock to an rt_mutex to avoid priority inversion
Kees Cook <[email protected]>
LoadPin: Ignore the "contents" argument of the LSM hooks
Khaled Almahallawy <[email protected]>
drm/i915/display: Don't disable DDI/Transcoder when setting phy test pattern
Hans de Goede <[email protected]>
ASoC: rt5670: Remove unbalanced pm_runtime_put()
Wang Jingjin <[email protected]>
ASoC: rockchip: spdif: Add missing clk_disable_unprepare() in rk_spdif_runtime_resume()
Marek Szyprowski <[email protected]>
ASoC: wm8994: Fix potential deadlock
Wang Yufen <[email protected]>
ASoC: mediatek: mt8183: fix refcount leak in mt8183_mt6358_ts3a227_max98357_dev_probe()
Wang Jingjin <[email protected]>
ASoC: rockchip: pdm: Add missing clk_disable_unprepare() in rockchip_pdm_runtime_resume()
Wang Yufen <[email protected]>
ASoC: audio-graph-card: fix refcount leak of cpu_ep in __graph_for_each_link()
Wang Yufen <[email protected]>
ASoC: mediatek: mt8173-rt5650-rt5514: fix refcount leak in mt8173_rt5650_rt5514_dev_probe()
Cezary Rojewski <[email protected]>
ASoC: Intel: Skylake: Fix driver hang during shutdown
Pierre-Louis Bossart <[email protected]>
ALSA: hda: add snd_hdac_stop_streams() helper
Pierre-Louis Bossart <[email protected]>
ALSA/ASoC: hda: move/rename snd_hdac_ext_stop_streams to hdac_stream.c
Yang Yingliang <[email protected]>
hwmon: (jc42) Fix missing unlock on error in jc42_write()
Tyler Hicks <[email protected]>
KVM: selftests: Fix build regression by using accessor function
Karolina Drobnik <[email protected]>
tools/include: Add _RET_IP_ and math definitions to kernel.h
Zhang Xiaoxu <[email protected]>
orangefs: Fix kmemleak in orangefs_{kernel,client}_debug_init()
Zhang Xiaoxu <[email protected]>
orangefs: Fix kmemleak in orangefs_prepare_debugfs_help_string()
Nathan Chancellor <[email protected]>
drm/sti: Fix return type of sti_{dvo,hda,hdmi}_connector_mode_valid()
Nathan Chancellor <[email protected]>
drm/fsl-dcu: Fix return type of fsl_dcu_drm_connector_mode_valid()
Hawkins Jiawei <[email protected]>
hugetlbfs: fix null-ptr-deref in hugetlbfs_parse_param()
Nathan Chancellor <[email protected]>
scsi: elx: libefc: Fix second parameter type in state callbacks
Bart Van Assche <[email protected]>
scsi: ufs: Reduce the START STOP UNIT timeout
Justin Tee <[email protected]>
scsi: lpfc: Fix hard lockup when reading the rx_monitor from debugfs
Zhiqi Song <[email protected]>
crypto: hisilicon/hpre - fix resource leak in remove process
Xiu Jianfeng <[email protected]>
clk: st: Fix memory leak in st_of_quadfs_setup()
Shigeru Yoshida <[email protected]>
media: si470x: Fix use-after-free in si470x_int_in_callback()
Wolfram Sang <[email protected]>
mmc: renesas_sdhi: better reset from HS400 mode
Kunihiko Hayashi <[email protected]>
mmc: f-sdh30: Add quirks for broken timeout clock capability
Lorenzo Bianconi <[email protected]>
wifi: mt76: do not run mt76u_status_worker if the device is not running
Rui Zhang <[email protected]>
regulator: core: fix use_count leakage when handling boot-on
Andrii Nakryiko <[email protected]>
libbpf: Avoid enum forward-declarations in public API in C++ mode
Wesley Chalmers <[email protected]>
drm/amd/display: Use the largest vready_offset in pipe group
Ye Bin <[email protected]>
blk-mq: fix possible memleak when register 'hctx' failed
Mazin Al Haddad <[email protected]>
media: dvb-usb: fix memory leak in dvb_usb_adapter_init()
Lin Ma <[email protected]>
media: dvbdev: adopts refcnt to avoid UAF
Yan Lei <[email protected]>
media: dvb-frontends: fix leak of memory fw
Maxim Korotkov <[email protected]>
ethtool: avoiding integer overflow in ethtool_phys_id()
Stanislav Fomichev <[email protected]>
bpf: Prevent decl_tag from being referenced in func_proto arg
Stanislav Fomichev <[email protected]>
ppp: associate skb with a device at tx
Schspa Shi <[email protected]>
mrp: introduce active flags to prevent UAF when applicant uninit
Eric Dumazet <[email protected]>
ipv6/sit: use DEV_STATS_INC() to avoid data-races
Eric Dumazet <[email protected]>
net: add atomic_long_t to net_device_stats fields
Aurabindo Pillai <[email protected]>
drm/amd/display: fix array index out of bound error in bios parser
Jiang Li <[email protected]>
md/raid1: stop mdx_raid1 thread when raid1 array run failed
Li Zhong <[email protected]>
drivers/md/md-bitmap: check the return value of md_bitmap_get_counter()
Nathan Chancellor <[email protected]>
drm/mediatek: Fix return type of mtk_hdmi_bridge_mode_valid()
Ville Syrjälä <[email protected]>
drm/sti: Use drm_mode_copy()
Ville Syrjälä <[email protected]>
drm/rockchip: Use drm_mode_copy()
Ville Syrjälä <[email protected]>
drm/msm: Use drm_mode_copy()
Nathan Chancellor <[email protected]>
s390/lcs: Fix return type of lcs_start_xmit()
Nathan Chancellor <[email protected]>
s390/netiucv: Fix return type of netiucv_tx()
Nathan Chancellor <[email protected]>
s390/ctcm: Fix return type of ctc{mp,}m_tx()
Nathan Chancellor <[email protected]>
drm/amdgpu: Fix type of second parameter in odn_edit_dpm_table() callback
Nathan Chancellor <[email protected]>
drm/amdgpu: Fix type of second parameter in trans_msg() callback
Kees Cook <[email protected]>
igb: Do not free q_vector unless new one was allocated
Minsuk Kang <[email protected]>
wifi: brcmfmac: Fix potential shift-out-of-bounds in brcmf_fw_alloc_request()
Nathan Chancellor <[email protected]>
hamradio: baycom_epp: Fix return type of baycom_send_packet()
Nathan Chancellor <[email protected]>
net: ethernet: ti: Fix return type of netcp_ndo_start_xmit()
Stanislav Fomichev <[email protected]>
bpf: make sure skb->len != 0 when redirecting to a tunneling device
Jiri Slaby (SUSE) <[email protected]>
qed (gcc13): use u16 for fid to be big enough
Hamza Mahfooz <[email protected]>
Revert "drm/amd/display: Limit max DSC target bpp for specific monitors"
gehao <[email protected]>
drm/amd/display: prevent memory leak
Zhang Yuchen <[email protected]>
ipmi: fix memleak when unload ipmi driver
Amadeusz Sławiński <[email protected]>
ASoC: codecs: rt298: Add quirk for KBL-R RVP platform
Shigeru Yoshida <[email protected]>
wifi: ar5523: Fix use-after-free on ar5523_cmd() timed out
Fedor Pchelkin <[email protected]>
wifi: ath9k: verify the expected usb_endpoints are present
Wright Feng <[email protected]>
brcmfmac: return error when getting invalid max_flowrings from dongle
Ming Qian <[email protected]>
media: imx-jpeg: Disable useless interrupt to avoid kernel panic
Doug Brown <[email protected]>
drm/etnaviv: add missing quirks for GC300
ZhangPeng <[email protected]>
hfs: fix OOB Read in __hfs_brec_find
Zheng Yejian <[email protected]>
acct: fix potential integer overflow in encode_comp_t()
Ryusuke Konishi <[email protected]>
nilfs2: fix shift-out-of-bounds due to too large exponent of block size
Ryusuke Konishi <[email protected]>
nilfs2: fix shift-out-of-bounds/overflow in nilfs_sb2_bad_offset()
Rafael J. Wysocki <[email protected]>
ACPICA: Fix error code path in acpi_ds_call_control_method()
Hoi Pok Wu <[email protected]>
fs: jfs: fix shift-out-of-bounds in dbDiscardAG
Dr. David Alan Gilbert <[email protected]>
jfs: Fix fortify moan in symlink
Shigeru Yoshida <[email protected]>
udf: Avoid double brelse() in udf_rename()
Dongliang Mu <[email protected]>
fs: jfs: fix shift-out-of-bounds in dbAllocAG
Liu Shixin <[email protected]>
binfmt_misc: fix shift-out-of-bounds in check_special_flags
Gaurav Kohli <[email protected]>
x86/hyperv: Remove unregister syscore call from Hyper-V cleanup
Guilherme G. Piccoli <[email protected]>
video: hyperv_fb: Avoid taking busy spinlock on panic path
Mark Rutland <[email protected]>
arm64: make is_ttbrX_addr() noinstr-safe
Zqiang <[email protected]>
rcu: Fix __this_cpu_read() lockdep warning in rcu_force_quiescent_state()
Jiasheng Jiang <[email protected]>
HID: amd_sfh: Add missing check for dma_alloc_coherent
Eric Dumazet <[email protected]>
net: stream: purge sk_error_queue in sk_stream_kill_queues()
Christophe JAILLET <[email protected]>
myri10ge: Fix an error handling path in myri10ge_probe()
David Howells <[email protected]>
rxrpc: Fix missing unlock in rxrpc_do_sendmsg()
Cong Wang <[email protected]>
net_sched: reject TCF_EM_SIMPLE case for complex ematch module
Yang Yingliang <[email protected]>
mailbox: zynq-ipi: fix error handling while device_register() fails
Yang Yingliang <[email protected]>
mailbox: arm_mhuv2: Fix return value check in mhuv2_probe()
Conor Dooley <[email protected]>
mailbox: mpfs: read the system controller's status
Subash Abhinov Kasiviswanathan <[email protected]>
skbuff: Account for tail adjustment during pull operations
Chen-Yu Tsai <[email protected]>
arm64: dts: mt8183: Fix Mali GPU clock
Chun-Jie Chen <[email protected]>
soc: mediatek: pm-domains: Fix the power glitch issue
Eelco Chaudron <[email protected]>
openvswitch: Fix flow lookup to use unmasked key
Jakub Kicinski <[email protected]>
selftests: devlink: fix the fd redirect in dummy_reporter_test
GUO Zihua <[email protected]>
rtc: mxc_v2: Add missing clk_disable_unprepare()
Tan Tee Min <[email protected]>
igc: Set Qbv start_time and end_time to end_time if not being configured in GCL
Kurt Kanzenbach <[email protected]>
igc: Lift TAPRIO schedule restriction
Tan Tee Min <[email protected]>
igc: recalculate Qbv end_time by considering cycle time
Tan Tee Min <[email protected]>
igc: allow BaseTime 0 enrollment for Qbv
Muhammad Husaini Zulkifli <[email protected]>
igc: Add checking for basetime less than zero
Vinicius Costa Gomes <[email protected]>
igc: Use strict cycles for Qbv scheduling
Vinicius Costa Gomes <[email protected]>
igc: Enhance Qbv scheduling by using first flag bit
Christoph Hellwig <[email protected]>
blk-iocost: simplify ioc_name
Li Zetao <[email protected]>
r6040: Fix kmemleak in probe and remove
Kirill Tkhai <[email protected]>
unix: Fix race in SOCK_SEQPACKET's unix_dgram_sendmsg()
Minsuk Kang <[email protected]>
nfc: pn533: Clear nfc_target before being used
Vladimir Oltean <[email protected]>
net: enetc: avoid buffer leaks on xdp_do_redirect() failure
Kumar Kartikeya Dwivedi <[email protected]>
selftests/bpf: Add test for unstable CT lookup API
Yu Kuai <[email protected]>
block, bfq: fix possible uaf for 'bfqq->bic'
Yang Yingliang <[email protected]>
mISDN: hfcmulti: don't call dev_kfree_skb/kfree_skb() under spin_lock_irqsave()
Yang Yingliang <[email protected]>
mISDN: hfcpci: don't call dev_kfree_skb/kfree_skb() under spin_lock_irqsave()
Yang Yingliang <[email protected]>
mISDN: hfcsusb: don't call dev_kfree_skb/kfree_skb() under spin_lock_irqsave()
Emeel Hakim <[email protected]>
net: macsec: fix net device access prior to holding a lock
Dan Aloni <[email protected]>
nfsd: under NFSv4.1, fix double svc_xprt_put on rpc_create failure
Alexandre Belloni <[email protected]>
rtc: pcf85063: fix pcf85063_clkout_control
Gaosheng Cui <[email protected]>
rtc: pic32: Move devm_rtc_allocate_device earlier in pic32_rtc_probe()
Gaosheng Cui <[email protected]>
rtc: st-lpc: Add missing clk_disable_unprepare in st_rtc_probe()
Qingfang DENG <[email protected]>
netfilter: flowtable: really fix NAT IPv6 offload
Yang Yingliang <[email protected]>
mfd: pm8008: Fix return value check in pm8008_probe()
Lee Jones <[email protected]>
mfd: pm8008: Remove driver data structure pm8008_data
Christophe JAILLET <[email protected]>
mfd: qcom_rpm: Fix an error handling path in qcom_rpm_probe()
Matti Vaittinen <[email protected]>
mfd: bd957x: Fix Kconfig dependency on REGMAP_IRQ
Nathan Lynch <[email protected]>
powerpc/pseries/eeh: use correct API for error log size
Haowen Bai <[email protected]>
powerpc/eeh: Drop redundant spinlock initialization
Shang XiaoJing <[email protected]>
remoteproc: qcom: q6v5: Fix missing clk_disable_unprepare() in q6v5_wcss_qcs404_power_on()
Yuan Can <[email protected]>
remoteproc: qcom_q6v5_pas: Fix missing of_node_put() in adsp_alloc_memory_region()
Luca Weiss <[email protected]>
remoteproc: qcom_q6v5_pas: detach power domains on remove
Luca Weiss <[email protected]>
remoteproc: qcom_q6v5_pas: disable wakeup on probe fail or remove
Shang XiaoJing <[email protected]>
remoteproc: qcom: q6v5: Fix potential null-ptr-deref in q6v5_wcss_init_mmio()
Gaosheng Cui <[email protected]>
remoteproc: sysmon: fix memory leak in qcom_add_sysmon_subdev()
Daniel Golle <[email protected]>
pwm: mediatek: always use bus clock for PWM on MT7622
xinlei lee <[email protected]>
pwm: mtk-disp: Fix the parameters calculated by the enabled flag of disp_pwm
Uwe Kleine-König <[email protected]>
pwm: sifive: Call pwm_sifive_update_clock() while mutex is held
Jason Gunthorpe <[email protected]>
iommu/sun50i: Remove IOMMU_DOMAIN_IDENTITY
Miaoqian Lin <[email protected]>
selftests/powerpc: Fix resource leaks
Kajol Jain <[email protected]>
powerpc/hv-gpci: Fix hv_gpci event list
Yang Yingliang <[email protected]>
powerpc/83xx/mpc832x_rdb: call platform_device_put() in error case in of_fsl_spi_probe()
Nicholas Piggin <[email protected]>
powerpc/perf: callchain validate kernel stack pointer bounds
Dmitry Baryshkov <[email protected]>
phy: qcom-qmp: create copies of QMP PHY driver
Yang Yingliang <[email protected]>
powerpc/xive: add missing iounmap() in error path in xive_spapr_populate_irq_data()
Gustavo A. R. Silva <[email protected]>
powerpc/xmon: Fix -Wswitch-unreachable warning in bpt_cmds
Miaoqian Lin <[email protected]>
cxl: Fix refcount leak in cxl_calc_capp_routing
Christophe JAILLET <[email protected]>
powerpc/52xx: Fix a resource leak in an error handling path
Xie Shaowen <[email protected]>
macintosh/macio-adb: check the return value of ioremap()
Yang Yingliang <[email protected]>
macintosh: fix possible memory leak in macio_add_one_device()
Yuan Can <[email protected]>
iommu/fsl_pamu: Fix resource leak in fsl_pamu_probe()
Yang Yingliang <[email protected]>
iommu/amd: Fix pci device refcount leak in ppr_notifier()
Alexander Stein <[email protected]>
rtc: pcf85063: Fix reading alarm
Stefan Eichenberger <[email protected]>
rtc: snvs: Allow a time difference on clock register read
Rafael J. Wysocki <[email protected]>
rtc: cmos: Disable ACPI RTC event on removal
Rafael J. Wysocki <[email protected]>
rtc: cmos: Rename ACPI-related functions
Rafael J. Wysocki <[email protected]>
rtc: cmos: Eliminate forward declarations of some functions
Rafael J. Wysocki <[email protected]>
rtc: cmos: Call rtc_wake_setup() from cmos_do_probe()
Rafael J. Wysocki <[email protected]>
rtc: cmos: Call cmos_wake_setup() from cmos_do_probe()
Alexandre Belloni <[email protected]>
rtc: cmos: fix build on non-ACPI platforms
Rafael J. Wysocki <[email protected]>
rtc: cmos: Fix wake alarm breakage
Rafael J. Wysocki <[email protected]>
rtc: cmos: Fix event handler registration ordering issue
Rafael J. Wysocki <[email protected]>
rtc: rtc-cmos: Do not check ACPI_FADT_LOW_POWER_S0
Fenghua Yu <[email protected]>
dmaengine: idxd: Fix crc_val field for completion record
Abdun Nihaal <[email protected]>
fs/ntfs3: Fix slab-out-of-bounds read in ntfs_trim_fs
Jon Hunter <[email protected]>
pwm: tegra: Improve required rate calculation
Matt Redfearn <[email protected]>
include/uapi/linux/swab: Fix potentially missing __always_inline
Al Cooper <[email protected]>
phy: usb: s2 WoL wakeup_count not incremented for USB->Eth devices
Michael Riesch <[email protected]>
iommu/rockchip: fix permission bits in page table entries v2
Jernej Skrabec <[email protected]>
iommu/sun50i: Fix flush size
Jernej Skrabec <[email protected]>
iommu/sun50i: Fix R/W permission check
Jernej Skrabec <[email protected]>
iommu/sun50i: Consider all fault sources for reset
Jernej Skrabec <[email protected]>
iommu/sun50i: Fix reset release
Dan Carpenter <[email protected]>
fs/ntfs3: Harden against integer overflows
Kees Cook <[email protected]>
overflow: Implement size_t saturating arithmetic helpers
Shigeru Yoshida <[email protected]>
fs/ntfs3: Avoid UBSAN error on true_sectors_per_clst()
Arnd Bergmann <[email protected]>
RDMA/siw: Fix pointer cast warning
Namhyung Kim <[email protected]>
perf stat: Do not delay the workload with --delay
Adrián Herrera Arcila <[email protected]>
perf stat: Refactor __run_perf_stat() common code
ruanjinjie <[email protected]>
power: supply: fix null pointer dereferencing in power_supply_get_battery_info
Yuan Can <[email protected]>
power: supply: ab8500: Fix error handling in ab8500_charger_init()
Yuan Can <[email protected]>
HSI: omap_ssi_core: Fix error handling in ssi_init()
Zhang Qilong <[email protected]>
power: supply: z2_battery: Fix possible memleak in z2_batt_probe()
Ajay Kaher <[email protected]>
perf symbol: correction while adjusting symbol
Leo Yan <[email protected]>
perf trace: Handle failure when trace point folder is missed
Leo Yan <[email protected]>
perf trace: Use macro RAW_SYSCALL_ARGS_NUM to replace number
Leo Yan <[email protected]>
perf trace: Return error if a system call doesn't exist
Zeng Heng <[email protected]>
power: supply: fix residue sysfs file in error handle route of __power_supply_register()
Yang Yingliang <[email protected]>
HSI: omap_ssi_core: fix possible memory leak in ssi_probe()
Yang Yingliang <[email protected]>
HSI: omap_ssi_core: fix unbalanced pm_runtime_disable()
Christophe JAILLET <[email protected]>
fbdev: uvesafb: Fixes an error handling path in uvesafb_probe()
Randy Dunlap <[email protected]>
fbdev: uvesafb: don't build on UML
Randy Dunlap <[email protected]>
fbdev: geode: don't build on UML
Gaosheng Cui <[email protected]>
fbdev: ep93xx-fb: Add missing clk_disable_unprepare in ep93xxfb_probe()
Xiongfeng Wang <[email protected]>
fbdev: vermilion: decrease reference count in error path
Shang XiaoJing <[email protected]>
fbdev: via: Fix error in via_core_init()
Yang Yingliang <[email protected]>
fbdev: pm2fb: fix missing pci_disable_device()
Andy Shevchenko <[email protected]>
fbdev: ssd1307fb: Drop optional dependency
Bjorn Andersson <[email protected]>
thermal/drivers/qcom/lmh: Fix irq handler return value
Luca Weiss <[email protected]>
thermal/drivers/qcom/temp-alarm: Fix inaccurate warning for gen2
Marcus Folkesson <[email protected]>
thermal/drivers/imx8mm_thermal: Validate temperature range
Shang XiaoJing <[email protected]>
samples: vfio-mdev: Fix missing pci_disable_device() in mdpy_fb_probe()
Xiu Jianfeng <[email protected]>
ksmbd: Fix resource leak in ksmbd_session_rpc_open()
Zheng Yejian <[email protected]>
tracing/hist: Fix issue of losting command info in error_log
Jiasheng Jiang <[email protected]>
usb: storage: Add check for kcalloc
Zheyu Ma <[email protected]>
i2c: ismt: Fix an out-of-bounds bug in ismt_access()
Yang Yingliang <[email protected]>
i2c: mux: reg: check return value after calling platform_get_resource()
Bartosz Golaszewski <[email protected]>
gpiolib: protect the GPIO device against being dropped while in use by user-space
Bartosz Golaszewski <[email protected]>
gpiolib: make struct comments into real kernel docs
Bartosz Golaszewski <[email protected]>
gpiolib: cdev: fix NULL-pointer dereferences
Andy Shevchenko <[email protected]>
gpiolib: Get rid of redundant 'else'
Chen Zhongjin <[email protected]>
vme: Fix error not catched in fake_init()
YueHaibing <[email protected]>
staging: rtl8192e: Fix potential use-after-free in rtllib_rx_Monitor()
Dan Carpenter <[email protected]>
staging: rtl8192u: Fix use after free in ieee80211_rx()
Hui Tang <[email protected]>
i2c: pxa-pci: fix missing pci_disable_device() on error in ce4100_i2c_probe
Yang Yingliang <[email protected]>
chardev: fix error handling in cdev_device_add()
Yang Yingliang <[email protected]>
mcb: mcb-parse: fix error handing in chameleon_parse_gdd()
Zhengchao Shao <[email protected]>
drivers: mcb: fix resource leak in mcb_probe()
John Keeping <[email protected]>
usb: gadget: f_hid: fix refcount leak on error path
John Keeping <[email protected]>
usb: gadget: f_hid: fix f_hidg lifetime vs cdev
Yang Yingliang <[email protected]>
usb: roles: fix of node refcount leak in usb_role_switch_is_parent()
Yang Shen <[email protected]>
coresight: trbe: remove cpuhp instance node before remove cpuhp state
Fabrice Gasnier <[email protected]>
counter: stm32-lptimer-cnt: fix the check on arr and cmp registers update
Ramona Bolboaca <[email protected]>
iio: adis: add '__adis_enable_irq()' implementation
Jonathan Cameron <[email protected]>
iio:imu:adis: Move exports into IIO_ADISLIB namespace
Nuno Sá <[email protected]>
iio: adis: stylistic changes
Nuno Sá <[email protected]>
iio: adis: handle devices that cannot unmask the drdy pin
Cosmin Tanislav <[email protected]>
iio: temperature: ltc2983: make bulk write buffer DMA-safe
Yang Yingliang <[email protected]>
cxl: fix possible null-ptr-deref in cxl_pci_init_afu|adapter()
Yang Yingliang <[email protected]>
cxl: fix possible null-ptr-deref in cxl_guest_init_afu|adapter()
Yang Yingliang <[email protected]>
firmware: raspberrypi: fix possible memory leak in rpi_firmware_probe()
Zheng Wang <[email protected]>
misc: sgi-gru: fix use-after-free error in gru_set_context_option, gru_fault and gru_handle_user_call_os
ruanjinjie <[email protected]>
misc: tifm: fix possible memory leak in tifm_7xx1_switch_media()
Yang Yingliang <[email protected]>
ocxl: fix pci device refcount leak when calling get_function_0()
Yang Yingliang <[email protected]>
misc: ocxl: fix possible name leak in ocxl_file_register_afu()
Zhengchao Shao <[email protected]>
test_firmware: fix memory leak in test_firmware_init()
Yuan Can <[email protected]>
serial: sunsab: Fix error handling in sunsab_init()
Gabriel Somlo <[email protected]>
serial: altera_uart: fix locking in polling mode
Jiri Slaby <[email protected]>
tty: serial: altera_uart_{r,t}x_chars() need only uart_port
Jiri Slaby <[email protected]>
tty: serial: clean up stop-tx part in altera_uart_tx_chars()
Xiongfeng Wang <[email protected]>
serial: pch: Fix PCI device refcount leak in pch_request_dma()
Valentin Caron <[email protected]>
serial: stm32: move dma_request_chan() before clk_prepare_enable()
delisun <[email protected]>
serial: pl011: Do not clear RX FIFO & RX interrupt in unthrottle.
Jiamei Xie <[email protected]>
serial: amba-pl011: avoid SBSA UART accessing DMACR register
Marek Vasut <[email protected]>
extcon: usbc-tusb320: Update state on probe even if no IRQ pending
Marek Vasut <[email protected]>
extcon: usbc-tusb320: Add USB TYPE-C support
Marek Vasut <[email protected]>
extcon: usbc-tusb320: Factor out extcon into dedicated functions
Samuel Holland <[email protected]>
usb: typec: Factor out non-PD fwnode properties
Yassine Oudjana <[email protected]>
extcon: usbc-tusb320: Add support for TUSB320L
Yassine Oudjana <[email protected]>
extcon: usbc-tusb320: Add support for mode setting and reset
Sven Peter <[email protected]>
usb: typec: tipd: Fix spurious fwnode_handle_put in error path
Sven Peter <[email protected]>
usb: typec: tipd: Cleanup resources if devm_tps6598_psy_register fails
Yang Yingliang <[email protected]>
usb: typec: tcpci: fix of node refcount leak in tcpci_register_port()
Sven Peter <[email protected]>
usb: typec: Check for ops->exit instead of ops->enter in altmode_exit
Gaosheng Cui <[email protected]>
staging: vme_user: Fix possible UAF in tsi148_dma_list_add
Linus Walleij <[email protected]>
usb: fotg210-udc: Fix ages old endianness issues
Rafael Mendonca <[email protected]>
uio: uio_dmem_genirq: Fix deadlock between irq config and handling
Rafael Mendonca <[email protected]>
uio: uio_dmem_genirq: Fix missing unlock in irq configuration
Rafael Mendonca <[email protected]>
vfio: platform: Do not pass return buffer to ACPI _RST method
Yang Yingliang <[email protected]>
class: fix possible memory leak in __class_register()
Yuan Can <[email protected]>
serial: 8250_bcm7271: Fix error handling in brcmuart_init()
Kartik <[email protected]>
serial: tegra: Read DMA status before terminating
Yang Yingliang <[email protected]>
drivers: dio: fix possible memory leak in dio_init()
Palmer Dabbelt <[email protected]>
RISC-V: Align the shadow stack
Dragos Tatulea <[email protected]>
IB/IPoIB: Fix queue count inconsistency for PKEY child interfaces
Xiongfeng Wang <[email protected]>
hwrng: geode - Fix PCI device refcount leak
Xiongfeng Wang <[email protected]>
hwrng: amd - Fix PCI device refcount leak
Gaosheng Cui <[email protected]>
crypto: img-hash - Fix variable dereferenced before check 'hdev->req'
Chengchang Tang <[email protected]>
RDMA/hns: Fix error code of CMD
Chengchang Tang <[email protected]>
RDMA/hns: Fix page size cap from firmware
Chengchang Tang <[email protected]>
RDMA/hns: Fix PBL page MTR find
Chengchang Tang <[email protected]>
RDMA/hns: Fix AH attr queried by query_qp
Zhang Xiaoxu <[email protected]>
orangefs: Fix sysfs not cleanup when dev init failed
John Thomson <[email protected]>
PCI: mt7621: Add sentinel to quirks table
Bjorn Helgaas <[email protected]>
PCI: mt7621: Rename mt7621_pci_ to mt7621_pcie_
Wang Yufen <[email protected]>
RDMA/srp: Fix error return code in srp_parse_options()
Wang Yufen <[email protected]>
RDMA/hfi1: Fix error return code in parse_platform_config()
Tong Tiangen <[email protected]>
riscv/mm: add arch hook arch_clear_hugepage_flags
Shang XiaoJing <[email protected]>
crypto: omap-sham - Use pm_runtime_resume_and_get() in omap_sham_probe()
Christophe JAILLET <[email protected]>
crypto: amlogic - Remove kcalloc without check
Mark Zhang <[email protected]>
RDMA/nldev: Fix failure to send large messages
Yonggil Song <[email protected]>
f2fs: avoid victim selection from previous victim section
Yuan Can <[email protected]>
RDMA/nldev: Add checks for nla_nest_start() in fill_stat_counter_qps()
Gaosheng Cui <[email protected]>
scsi: snic: Fix possible UAF in snic_tgt_create()
Chen Zhongjin <[email protected]>
scsi: fcoe: Fix transport not deattached when fcoe_if_init() fails
Shang XiaoJing <[email protected]>
scsi: ipr: Fix WARNING in ipr_init()
Yang Yingliang <[email protected]>
scsi: scsi_debug: Fix possible name leak in sdebug_add_host_helper()
Yang Yingliang <[email protected]>
scsi: fcoe: Fix possible name leak when device_register() fails
Harshit Mogalapalli <[email protected]>
scsi: scsi_debug: Fix a warning in resp_report_zones()
Harshit Mogalapalli <[email protected]>
scsi: scsi_debug: Fix a warning in resp_verify()
Chen Zhongjin <[email protected]>
scsi: efct: Fix possible memleak in efct_device_init()
Yang Yingliang <[email protected]>
scsi: hpsa: Fix possible memory leak in hpsa_add_sas_device()
Yang Yingliang <[email protected]>
scsi: hpsa: Fix error handling in hpsa_add_sas_host()
Yang Yingliang <[email protected]>
scsi: mpt3sas: Fix possible resource leaks in mpt3sas_transport_port_add()
Daniel Jordan <[email protected]>
padata: Fix list iterator in padata_do_serial()
Daniel Jordan <[email protected]>
padata: Always leave BHs disabled when running ->parallel()
Zhang Yiqun <[email protected]>
crypto: tcrypt - Fix multibuffer skcipher speed test mem leak
Yuan Can <[email protected]>
scsi: hpsa: Fix possible memory leak in hpsa_init_one()
Serge Semin <[email protected]>
dt-bindings: visconti-pcie: Fix interrupts array max constraints
Serge Semin <[email protected]>
dt-bindings: imx6q-pcie: Fix clock names for imx6sx and imx8mq
Zhang Xiaoxu <[email protected]>
RDMA/rxe: Fix NULL-ptr-deref in rxe_qp_do_cleanup() when socket create failed
Zhengchao Shao <[email protected]>
RDMA/hns: fix memory leak in hns_roce_alloc_mr()
Uwe Kleine-König <[email protected]>
crypto: ccree - Make cc_debugfs_global_fini() available for module init function
Xiongfeng Wang <[email protected]>
RDMA/hfi: Decrease PCI device reference count in error path
Zeng Heng <[email protected]>
PCI: Check for alloc failure in pci_request_irq()
Luoyouming <[email protected]>
RDMA/hns: Fix ext_sge num error when post send
Luoyouming <[email protected]>
RDMA/hns: Repacing 'dseg_len' by macros in fill_ext_sge_inl_data()
Xiongfeng Wang <[email protected]>
crypto: hisilicon/qm - add missing pci_dev_put() in q_num_set()
Herbert Xu <[email protected]>
crypto: cryptd - Use request context instead of stack for sub-request
Gaosheng Cui <[email protected]>
crypto: ccree - Remove debugfs when platform_driver_register failed
Harshit Mogalapalli <[email protected]>
scsi: scsi_debug: Fix a warning in resp_write_scat()
Bernard Metzler <[email protected]>
RDMA/siw: Set defined status for work completion with undefined status
Mark Zhang <[email protected]>
RDMA/nldev: Return "-EAGAIN" if the cm_id isn't from expected port
Mark Zhang <[email protected]>
RDMA/core: Make sure "ib_port" is valid when access sysfs node
Mark Zhang <[email protected]>
RDMA/restrack: Release MR restrack when delete
Nirmal Patel <[email protected]>
PCI: vmd: Disable MSI remapping after suspend
Leonid Ravich <[email protected]>
IB/mad: Don't call to function that might sleep while in atomic context
Bernard Metzler <[email protected]>
RDMA/siw: Fix immediate work request flush to completion queue
Bart Van Assche <[email protected]>
scsi: qla2xxx: Fix set-but-not-used variable warnings
Shiraz Saleem <[email protected]>
RDMA/irdma: Report the correct link speed
Chao Yu <[email protected]>
f2fs: fix to destroy sbi->post_read_wq in error path of f2fs_fill_super()
Dongdong Zhang <[email protected]>
f2fs: fix normal discard process
Chao Yu <[email protected]>
f2fs: fix to invalidate dcc->f2fs_issue_discard in error path
Xiu Jianfeng <[email protected]>
apparmor: Fix memleak in alloc_ns()
Corentin Labbe <[email protected]>
crypto: rockchip - rework by using crypto_engine
Corentin Labbe <[email protected]>
crypto: rockchip - remove non-aligned handling
Corentin Labbe <[email protected]>
crypto: rockchip - better handle cipher key
Corentin Labbe <[email protected]>
crypto: rockchip - add fallback for ahash
Corentin Labbe <[email protected]>
crypto: rockchip - add fallback for cipher
Corentin Labbe <[email protected]>
crypto: rockchip - do not store mode globally
Corentin Labbe <[email protected]>
crypto: rockchip - do not do custom power management
Zhang Qilong <[email protected]>
f2fs: Fix the race condition of resize flag between resizefs
Kunihiko Hayashi <[email protected]>
PCI: pci-epf-test: Register notifier if only core_init_notifier is enabled
Leon Romanovsky <[email protected]>
RDMA/core: Fix order of nldev_exit call
Vidya Sagar <[email protected]>
PCI: dwc: Fix n_fts[] array overrun
Xiu Jianfeng <[email protected]>
apparmor: Use pointer to struct aa_label for lbs_cred
Bart Van Assche <[email protected]>
scsi: core: Fix a race between scsi_done() and scsi_timeout()
Natalia Petrova <[email protected]>
crypto: nitrox - avoid double free on error path in nitrox_sriov_init()
Corentin Labbe <[email protected]>
crypto: sun8i-ss - use dma_addr instead u32
Weili Qian <[email protected]>
crypto: hisilicon/qm - fix missing destroy qp_idr
John Johansen <[email protected]>
apparmor: Fix abi check to include v8 abi
John Johansen <[email protected]>
apparmor: fix lockdep warning when removing a namespace
Gaosheng Cui <[email protected]>
apparmor: fix a memleak in multi_transaction_new()
Vladimir Oltean <[email protected]>
net: dsa: tag_8021q: avoid leaking ctx on dsa_tag_8021q_register() error path
Bartosz Staszewski <[email protected]>
i40e: Fix the inability to attach XDP program on downed interface
Piergiorgio Beruto <[email protected]>
stmmac: fix potential division by 0
Yang Yingliang <[email protected]>
Bluetooth: RFCOMM: don't call kfree_skb() under spin_lock_irqsave()
Yang Yingliang <[email protected]>
Bluetooth: hci_core: don't call kfree_skb() under spin_lock_irqsave()
Yang Yingliang <[email protected]>
Bluetooth: hci_bcsp: don't call kfree_skb() under spin_lock_irqsave()
Yang Yingliang <[email protected]>
Bluetooth: hci_h5: don't call kfree_skb() under spin_lock_irqsave()
Yang Yingliang <[email protected]>
Bluetooth: hci_ll: don't call kfree_skb() under spin_lock_irqsave()
Yang Yingliang <[email protected]>
Bluetooth: hci_qca: don't call kfree_skb() under spin_lock_irqsave()
Yang Yingliang <[email protected]>
Bluetooth: btusb: don't call kfree_skb() under spin_lock_irqsave()
Wang ShaoBo <[email protected]>
Bluetooth: btintel: Fix missing free skb in btintel_setup_combined()
Inga Stotland <[email protected]>
Bluetooth: MGMT: Fix error report for ADD_EXT_ADV_PARAMS
Firo Yang <[email protected]>
sctp: sysctl: make extra pointers netns aware
Eric Pilmore <[email protected]>
ntb_netdev: Use dev_kfree_skb_any() in interrupt context
Jerry Ray <[email protected]>
net: lan9303: Fix read error execution path
Markus Schneider-Pargmann <[email protected]>
can: tcan4x5x: Fix use of register error status mask
Vivek Yadav <[email protected]>
can: m_can: Call the RAM init directly from m_can_chip_config
Markus Schneider-Pargmann <[email protected]>
can: tcan4x5x: Remove invalid write in clear_interrupts
Tom Lendacky <[email protected]>
net: amd-xgbe: Check only the minimum speed for active/passive cables
Tom Lendacky <[email protected]>
net: amd-xgbe: Fix logic around active and passive cables
Yang Yingliang <[email protected]>
af_unix: call proto_unregister() in the error path in af_unix_init()
Yang Yingliang <[email protected]>
net: amd: lance: don't call dev_kfree_skb() under spin_lock_irqsave()
Yang Yingliang <[email protected]>
hamradio: don't call dev_kfree_skb() under spin_lock_irqsave()
Yang Yingliang <[email protected]>
net: ethernet: dnet: don't call dev_kfree_skb() under spin_lock_irqsave()
Yang Yingliang <[email protected]>
net: emaclite: don't call dev_kfree_skb() under spin_lock_irqsave()
Yang Yingliang <[email protected]>
net: apple: bmac: don't call dev_kfree_skb() under spin_lock_irqsave()
Yang Yingliang <[email protected]>
net: apple: mace: don't call dev_kfree_skb() under spin_lock_irqsave()
Hangbin Liu <[email protected]>
net/tunnel: wait until all sk_user_data reader finish before releasing the sock
Li Zetao <[email protected]>
net: farsync: Fix kmemleak when rmmods farsync
Yang Yingliang <[email protected]>
ethernet: s2io: don't call dev_kfree_skb() under spin_lock_irqsave()
ruanjinjie <[email protected]>
of: overlay: fix null pointer dereferencing in find_dup_cset_node_entry() and find_dup_cset_prop()
Yuan Can <[email protected]>
drivers: net: qlcnic: Fix potential memory leak in qlcnic_sriov_init()
Gaosheng Cui <[email protected]>
net: stmmac: fix possible memory leak in stmmac_dvr_probe()
Zhang Changzhong <[email protected]>
net: stmmac: selftests: fix potential memleak in stmmac_test_arpoffload()
Yongqiang Liu <[email protected]>
net: defxx: Fix missing err handling in dfx_init()
Artem Chernyshev <[email protected]>
net: vmw_vsock: vmci: Check memcpy_from_msg()
Xiu Jianfeng <[email protected]>
clk: socfpga: Fix memory leak in socfpga_gate_init()
Björn Töpel <[email protected]>
bpf: Do not zero-extend kfunc return values
Yang Jihong <[email protected]>
blktrace: Fix output non-blktrace event when blk_classic option enabled
Wang Yufen <[email protected]>
wifi: brcmfmac: Fix error return code in brcmf_sdio_download_firmware()
Bitterblue Smith <[email protected]>
wifi: rtl8xxxu: Fix the channel width reporting
Bitterblue Smith <[email protected]>
wifi: rtl8xxxu: Add __packed to struct rtl8723bu_c2h
Kris Bahnsen <[email protected]>
spi: spi-gpio: Don't set MOSI as an input if not 3WIRE mode
Xiu Jianfeng <[email protected]>
clk: samsung: Fix memory leak in _samsung_clk_register_pll()
Jiasheng Jiang <[email protected]>
media: coda: Add check for kmalloc
Jiasheng Jiang <[email protected]>
media: coda: Add check for dcoda_iram_alloc
Liang He <[email protected]>
media: c8sectpfe: Add of_node_put() when breaking out of loop
Yuan Can <[email protected]>
regulator: qcom-labibb: Fix missing of_node_put() in qcom_labibb_regulator_probe()
Zhen Lei <[email protected]>
mmc: core: Normalize the error handling branch in sd_read_ext_regs()
Jiasheng Jiang <[email protected]>
memstick/ms_block: Add check for alloc_ordered_workqueue
Luis Chamberlain <[email protected]>
memstick: ms_block: Add error handling support for add_disk()
Wolfram Sang <[email protected]>
mmc: renesas_sdhi: alway populate SCC pointer
Yang Yingliang <[email protected]>
mmc: mmci: fix return value check of mmc_add_host()
Yang Yingliang <[email protected]>
mmc: wbsd: fix return value check of mmc_add_host()
Yang Yingliang <[email protected]>
mmc: via-sdmmc: fix return value check of mmc_add_host()
Yang Yingliang <[email protected]>
mmc: meson-gx: fix return value check of mmc_add_host()
Yang Yingliang <[email protected]>
mmc: omap_hsmmc: fix return value check of mmc_add_host()
Yang Yingliang <[email protected]>
mmc: atmel-mci: fix return value check of mmc_add_host()
Yang Yingliang <[email protected]>
mmc: wmt-sdmmc: fix return value check of mmc_add_host()
Yang Yingliang <[email protected]>
mmc: vub300: fix return value check of mmc_add_host()
Yang Yingliang <[email protected]>
mmc: toshsd: fix return value check of mmc_add_host()
Yang Yingliang <[email protected]>
mmc: rtsx_usb_sdmmc: fix return value check of mmc_add_host()
Yang Yingliang <[email protected]>
mmc: rtsx_pci: fix return value check of mmc_add_host()
Yang Yingliang <[email protected]>
mmc: pxamci: fix return value check of mmc_add_host()
Yang Yingliang <[email protected]>
mmc: mxcmmc: fix return value check of mmc_add_host()
Yang Yingliang <[email protected]>
mmc: moxart: fix return value check of mmc_add_host()
Yang Yingliang <[email protected]>
mmc: alcor: fix return value check of mmc_add_host()
Pu Lehui <[email protected]>
riscv, bpf: Emit fixed-length instructions for BPF_PSEUDO_FUNC
Trond Myklebust <[email protected]>
NFSv4.x: Fail client initialisation if state manager thread can't run
Wang ShaoBo <[email protected]>
SUNRPC: Fix missing release socket in rpc_sockname()
Zhang Xiaoxu <[email protected]>
xprtrdma: Fix regbuf data not freed in rpcrdma_req_create()
Gaosheng Cui <[email protected]>
ALSA: mts64: fix possible null-ptr-defer in snd_mts64_interrupt
Liu Shixin <[email protected]>
media: saa7164: fix missing pci_disable_device()
Takashi Iwai <[email protected]>
ALSA: pcm: Set missing stop_operating flag at undoing trigger start
Eric Dumazet <[email protected]>
bpf, sockmap: fix race in sock_map_free()
Martin Blumenstingl <[email protected]>
hwmon: (jc42) Restore the min/max/critical temperatures on resume
Martin Blumenstingl <[email protected]>
hwmon: (jc42) Convert register access and caching to regmap/regcache
Yang Yingliang <[email protected]>
regulator: core: fix resource leak in regulator_register()
Chen Zhongjin <[email protected]>
configfs: fix possible memory leak in configfs_create_dir()
Sebastian Andrzej Siewior <[email protected]>
hsr: Synchronize sequence number updates.
Sebastian Andrzej Siewior <[email protected]>
hsr: Synchronize sending frames to have always incremented outgoing seq nr.
Sebastian Andrzej Siewior <[email protected]>
hsr: Disable netpoll.
Sebastian Andrzej Siewior <[email protected]>
hsr: Avoid double remove of a node.
Sebastian Andrzej Siewior <[email protected]>
hsr: Add a rcu-read lock to hsr_forward_skb().
Christian Marangi <[email protected]>
clk: qcom: clk-krait: fix wrong div2 functions
Douglas Anderson <[email protected]>
clk: qcom: lpass-sc7180: Fix pm_runtime usage
Yang Yingliang <[email protected]>
regulator: core: fix module refcount leak in set_supply()
Deren Wu <[email protected]>
wifi: mt76: fix coverity overrun-call in mt76_get_txpower()
Lorenzo Bianconi <[email protected]>
wifi: mt76: mt7921: fix reporting of TX AGGR histogram
Xing Song <[email protected]>
mt76: stop the radar detector after leaving dfs channel
Chen Zhongjin <[email protected]>
wifi: cfg80211: Fix not unregister reg_pdev when load_builtin_regdb_keys() fails
Zhengchao Shao <[email protected]>
wifi: mac80211: fix memory leak in ieee80211_if_add()
Alexander Sverdlin <[email protected]>
spi: spidev: mask SPI_CS_HIGH in SPI_IOC_RD_MODE
Dan Carpenter <[email protected]>
bonding: uninitialized variable in bond_miimon_inspect()
Pengcheng Yang <[email protected]>
bpf, sockmap: Fix data loss caused by using apply_bytes on ingress redirect
Pengcheng Yang <[email protected]>
bpf, sockmap: Fix missing BPF_F_INGRESS flag when using apply_bytes
Pengcheng Yang <[email protected]>
bpf, sockmap: Fix repeated calls to sock_put() when msg has more_data
Randy Dunlap <[email protected]>
Input: wistron_btns - disable on UML
Florian Westphal <[email protected]>
netfilter: conntrack: set icmpv6 redirects as RELATED
Zhang Qilong <[email protected]>
ASoC: pcm512x: Fix PM disable depth imbalance in pcm512x_probe
Konstantin Meskhidze <[email protected]>
drm/amdkfd: Fix memory leakage
Xiongfeng Wang <[email protected]>
drm/amdgpu: Fix PCI device refcount leak in amdgpu_atrm_get_bios()
Xiongfeng Wang <[email protected]>
drm/radeon: Fix PCI device refcount leak in radeon_atrm_get_bios()
Guchun Chen <[email protected]>
drm/amd/pm/smu11: BACO is supported when it's in BACO state
Ricardo Ribalda <[email protected]>
ASoC: mediatek: mt8173: Enable IRQ when pdata is ready
AngeloGioacchino Del Regno <[email protected]>
ASoC: mediatek: mt8173: Fix debugfs registration for components
Ben Greear <[email protected]>
wifi: iwlwifi: mvm: fix double free on tx path.
Liu Shixin <[email protected]>
ALSA: asihpi: fix missing pci_disable_device()
Trond Myklebust <[email protected]>
NFS: Fix an Oops in nfs_d_automount()
Trond Myklebust <[email protected]>
NFSv4: Fix a deadlock between nfs4_open_recover_helper() and delegreturn
Trond Myklebust <[email protected]>
NFSv4: Fix a credential leak in _nfs4_discover_trunking()
Trond Myklebust <[email protected]>
NFSv4.2: Fix initialisation of struct nfs4_label
Trond Myklebust <[email protected]>
NFSv4.2: Fix a memory stomp in decode_attr_security_label
Trond Myklebust <[email protected]>
NFSv4.2: Clear FATTR4_WORD2_SECURITY_LABEL when done decoding
Jiasheng Jiang <[email protected]>
ASoC: mediatek: mtk-btcvsd: Add checks for write and read of mtk_btcvsd_snd
Dmitry Torokhov <[email protected]>
ASoC: dt-bindings: wcd9335: fix reset line polarity in example
Zhang Zekun <[email protected]>
drm/tegra: Add missing clk_disable_unprepare() in tegra_dc_probe()
Aakarsh Jain <[email protected]>
media: s5p-mfc: Add variant data for MFC v7 hardware for Exynos 3250 SoC
Baisong Zhong <[email protected]>
media: dvb-usb: az6027: fix null-ptr-deref in az6027_i2c_xfer()
Chen Zhongjin <[email protected]>
media: dvb-core: Fix ignored return value in dvb_register_frontend()
ZhangPeng <[email protected]>
pinctrl: pinconf-generic: add missing of_node_put()
Dario Binacchi <[email protected]>
clk: imx8mn: fix imx8mn_enet_phy_sels clocks list
Dario Binacchi <[email protected]>
clk: imx8mn: fix imx8mn_sai2_sels clocks list
Dario Binacchi <[email protected]>
clk: imx: replace osc_hdmi with dummy
Dario Binacchi <[email protected]>
clk: imx8mn: rename vpu_pll to m7_alt_pll
Gautam Menghani <[email protected]>
media: imon: fix a race condition in send_packet()
Chen Zhongjin <[email protected]>
media: vimc: Fix wrong function called when vimc_init() fails
Yuan Can <[email protected]>
ASoC: qcom: Add checks for devm_kcalloc
Wang ShaoBo <[email protected]>
drbd: destroy workqueue when drbd device was freed
Wang ShaoBo <[email protected]>
drbd: remove call to memset before free device/resource/connection
Zheng Yongjun <[email protected]>
mtd: maps: pxa2xx-flash: fix memory leak in probe
Jonathan Toppins <[email protected]>
bonding: fix link recovery in mode 2 when updelay is nonzero
Yang Yingliang <[email protected]>
drm/amdgpu: fix pci device refcount leak
Xiu Jianfeng <[email protected]>
clk: rockchip: Fix memory leak in rockchip_clk_register_pll()
Wang ShaoBo <[email protected]>
regulator: core: use kfree_const() to free space conditionally
Baisong Zhong <[email protected]>
ALSA: seq: fix undefined behavior in bit shift for SNDRV_SEQ_FILTER_USE_EVENT
Baisong Zhong <[email protected]>
ALSA: pcm: fix undefined behavior in bit shift for SNDRV_PCM_RATE_KNOT
ZhangPeng <[email protected]>
pinctrl: k210: call of_node_put()
Marcus Folkesson <[email protected]>
HID: hid-sensor-custom: set fixed size for custom attributes
Stanislav Fomichev <[email protected]>
bpf: Move skb->len == 0 checks into __bpf_redirect
Allen-KH Cheng <[email protected]>
mtd: spi-nor: Fix the number of bytes for the dummy cycles
Michael Walle <[email protected]>
mtd: spi-nor: hide jedec_id sysfs attribute if not present
Eric Dumazet <[email protected]>
inet: add READ_ONCE(sk->sk_bound_dev_if) in inet_csk_bind_conflict()
Christoph Hellwig <[email protected]>
media: videobuf-dma-contig: use dma_mmap_coherent
Yuan Can <[email protected]>
media: platform: exynos4-is: Fix error handling in fimc_md_init()
Yang Yingliang <[email protected]>
media: solo6x10: fix possible memory leak in solo_sysfs_init()
Chen Zhongjin <[email protected]>
media: vidtv: Fix use-after-free in vidtv_bridge_dvb_init()
Douglas Anderson <[email protected]>
Input: elants_i2c - properly handle the reset GPIO when power is off
Hui Tang <[email protected]>
mtd: lpddr2_nvm: Fix possible null-ptr-deref
Rob Clark <[email protected]>
drm/msm/a6xx: Fix speed-bin detection vs probe-defer
Xiu Jianfeng <[email protected]>
wifi: ath10k: Fix return value in ath10k_pci_init()
Christoph Hellwig <[email protected]>
block: clear ->slave_dir when dropping the main slave_dir reference
Xiu Jianfeng <[email protected]>
ima: Fix misuse of dereference of pointer in template_desc_init_fields()
GUO Zihua <[email protected]>
integrity: Fix memory leakage in keyring allocation error path
Brian Starkey <[email protected]>
drm/fourcc: Fix vsub/hsub for Q410 and Q401
Dave Stevenson <[email protected]>
drm/fourcc: Add packed 10bit YUV 4:2:0 format
Konrad Dybcio <[email protected]>
regulator: qcom-rpmh: Fix PMR735a S3 regulator spec
Joel Granados <[email protected]>
nvme: return err on nvme_init_non_mdts_limits fail
Dan Carpenter <[email protected]>
amdgpu/pm: prevent array underflow in vega20_odn_edit_dpm_table()
Yang Yingliang <[email protected]>
regulator: core: fix unbalanced of node refcount in regulator_dev_lookup()
Christoph Hellwig <[email protected]>
nvmet: only allocate a single slab for bvecs
David Michael <[email protected]>
libbpf: Fix uninitialized warning in btf_dump_dump_type_data
Zeng Heng <[email protected]>
ASoC: pxa: fix null-pointer dereference in filter()
Xinlei Lee <[email protected]>
drm/mediatek: Modify dpi power on/off sequence.
Hanjun Guo <[email protected]>
drm/radeon: Add the missed acpi_put_table() to fix memory leak
Khazhismel Kumykov <[email protected]>
bfq: fix waker_bfqq inconsistency crash
David Howells <[email protected]>
rxrpc: Fix ack.bufferSize to be 0 when generating an ack
David Howells <[email protected]>
net, proc: Provide PROC_FS=n fallback for proc_create_net_single_write()
Vladimir Zapolskiy <[email protected]>
media: camss: Clean up received buffers on failed start of streaming
Marek Vasut <[email protected]>
wifi: rsi: Fix handling of 802.3 EAPOL frames sent via control port
Randy Dunlap <[email protected]>
Input: joystick - fix Kconfig warning for JOYSTICK_ADC
Zhang Xiaoxu <[email protected]>
mtd: Fix device name leak when register device failed in add_mtd_device()
Manivannan Sadhasivam <[email protected]>
clk: qcom: gcc-sm8250: Use retention mode for USB GDSCs
Andrii Nakryiko <[email protected]>
bpf: propagate precision across all frames, not just the last one
Martin KaFai Lau <[email protected]>
bpf: Check the other end of slot_type for STACK_SPILL
Andrii Nakryiko <[email protected]>
bpf: propagate precision in ALU/ALU64 operations
Yang Yingliang <[email protected]>
media: platform: exynos4-is: fix return value check in fimc_md_probe()
Liu Shixin <[email protected]>
media: vivid: fix compose size exceed boundary
Kumar Kartikeya Dwivedi <[email protected]>
bpf: Fix slot type check in check_stack_write_var_off
Dmitry Baryshkov <[email protected]>
drm/msm/hdmi: use devres helper for runtime PM management
Dmitry Baryshkov <[email protected]>
drm/msm/hdmi: drop unused GPIO support
GUO Zihua <[email protected]>
ima: Handle -ESTALE returned by ima_filter_rule_match()
Marek Vasut <[email protected]>
drm/panel/panel-sitronix-st7701: Remove panel on DSI attach failure
Jonathan Neuschäfer <[email protected]>
spi: Update reference to struct spi_controller
Marek Vasut <[email protected]>
clk: renesas: r9a06g032: Repair grave increment error
Zhang Qilong <[email protected]>
drm/rockchip: lvds: fix PM usage counter unbalance in poweron
Jimmy Assarsson <[email protected]>
can: kvaser_usb: Compare requested bittiming parameters with actual parameters in do_set_{,data}_bittiming
Jimmy Assarsson <[email protected]>
can: kvaser_usb: Add struct kvaser_usb_busparams
Anssi Hannula <[email protected]>
can: kvaser_usb_leaf: Fix bogus restart events
Anssi Hannula <[email protected]>
can: kvaser_usb_leaf: Fix wrong CAN state after stopping
Anssi Hannula <[email protected]>
can: kvaser_usb_leaf: Fix improved state not being reported
Jimmy Assarsson <[email protected]>
can: kvaser_usb: make use of units.h in assignment of frequency
Anssi Hannula <[email protected]>
can: kvaser_usb_leaf: Set Warning state even without bus errors
Jimmy Assarsson <[email protected]>
can: kvaser_usb: kvaser_usb_leaf: Handle CMD_ERROR_EVENT
Jimmy Assarsson <[email protected]>
can: kvaser_usb: kvaser_usb_leaf: Rename {leaf,usbcan}_cmd_error_event to {leaf,usbcan}_cmd_can_error_event
Jimmy Assarsson <[email protected]>
can: kvaser_usb: kvaser_usb_leaf: Get capabilities from device
Vincent Mailhol <[email protected]>
can: kvaser_usb: do not increase tx statistics when sending error message frames
Alan Maguire <[email protected]>
libbpf: Btf dedup identical struct test needs check for nested structs/arrays
Marek Szyprowski <[email protected]>
media: exynos4-is: don't rely on the v4l2_async_subdev internals
Kuniyuki Iwashima <[email protected]>
soreuseport: Fix socket selection for SO_INCOMING_CPU.
Tang Bin <[email protected]>
venus: pm_helpers: Fix error check in vcodec_domains_get()
Ricardo Ribalda <[email protected]>
media: i2c: ad5820: Fix error path
Niklas Söderlund <[email protected]>
media: adv748x: afe: Select input port when initializing AFE
Jiasheng Jiang <[email protected]>
media: coda: jpeg: Add check for kmalloc
Laurent Pinchart <[email protected]>
media: v4l2-ctrls: Fix off-by-one error in integer menu control check
Sean Anderson <[email protected]>
powerpc: dts: t208x: Mark MAC1 and MAC2 as 10G
Rafael Mendonca <[email protected]>
drm/amdgpu/powerplay/psm: Fix memory leak in power state init
Andrew Jeffery <[email protected]>
ipmi: kcs: Poll OBF briefly to reduce OBE latency
Niklas Cassel <[email protected]>
ata: libata: fix NCQ autosense logic
Sergey Shtylyov <[email protected]>
ata: add/use ata_taskfile::{error|status} fields
Hannes Reinecke <[email protected]>
ata: libata: move ata_{port,link,dev}_dbg to standard pr_XXX() macros
Shung-Hsi Yu <[email protected]>
libbpf: Fix null-pointer dereference in find_prog_by_sec_insn()
Xu Kuohai <[email protected]>
libbpf: Fix use-after-free in btf_dump_name_dups
Abhinav Kumar <[email protected]>
drm/bridge: adv7533: remove dynamic lane switching from adv7533 bridge
Bitterblue Smith <[email protected]>
wifi: rtl8xxxu: Fix reading the vendor of combo chips
Fedor Pchelkin <[email protected]>
wifi: ath9k: hif_usb: Fix use-after-free in ath9k_hif_usb_reg_in_cb()
Fedor Pchelkin <[email protected]>
wifi: ath9k: hif_usb: fix memory leak of urbs in ath9k_hif_usb_dealloc_tx_urbs()
James Hurley <[email protected]>
platform/mellanox: mlxbf-pmc: Fix event typo
Cai Xinchen <[email protected]>
rapidio: devices: fix missing put_device in mport_cdev_open
ZhangPeng <[email protected]>
hfs: Fix OOB Write in hfs_asc2mac
Gavrilov Ilia <[email protected]>
relay: fix type mismatch when allocating memory in relay_create_buf()
Zhang Qilong <[email protected]>
eventfd: change int to __u64 in eventfd_signal() ifndef CONFIG_EVENTFD
Wang Weiyang <[email protected]>
rapidio: fix possible UAF when kfifo_alloc() fails
Chen Zhongjin <[email protected]>
fs: sysv: Fix sysv_nblocks() returns wrong value
Trond Myklebust <[email protected]>
lockd: set other missing fields when unlocking files
Ladislav Michl <[email protected]>
MIPS: OCTEON: warn only once if deprecated link status is being used
Anastasia Belova <[email protected]>
MIPS: BCM63xx: Add check for NULL for clk in clk_enable
Yang Yingliang <[email protected]>
platform/x86: intel_scu_ipc: fix possible name leak in __intel_scu_ipc_register()
Yu Liao <[email protected]>
platform/x86: mxm-wmi: fix memleak in mxm_wmi_call_mx[ds|mx]()
Victor Ding <[email protected]>
platform/chrome: cros_ec_typec: zero out stale pointers
Prashant Malani <[email protected]>
platform/chrome: cros_ec_typec: Cleanup switch handle return paths
Rafael J. Wysocki <[email protected]>
PM: runtime: Do not call __rpm_callback() from rpm_idle()
Harshit Mogalapalli <[email protected]>
xen/privcmd: Fix a possible warning in privcmd_ioctl_mmap_resource()
Xiu Jianfeng <[email protected]>
x86/xen: Fix memory leak in xen_init_lock_cpu()
Xiu Jianfeng <[email protected]>
x86/xen: Fix memory leak in xen_smp_intr_init{_pv}()
Oleg Nesterov <[email protected]>
uprobes/x86: Allow to probe a NOP instruction with 0x66 prefix
Li Zetao <[email protected]>
ACPICA: Fix use-after-free in acpi_ut_copy_ipackage_to_ipackage()
Yang Yingliang <[email protected]>
clocksource/drivers/timer-ti-dm: Fix missing clk_disable_unprepare in dmtimer_systimer_init_clock()
Vincent Donnefort <[email protected]>
cpu/hotplug: Do not bail-out in DYING/STARTING sections
Phil Auld <[email protected]>
cpu/hotplug: Make target_store() a nop when target == state
Alexey Izbyshev <[email protected]>
futex: Resend potentially swallowed owner death notification
Peter Zijlstra <[email protected]>
futex: Move to kernel/futex/
John Thomson <[email protected]>
mips: ralink: mt7621: do not use kzalloc too early
John Thomson <[email protected]>
mips: ralink: mt7621: soc queries and tests as functions
John Thomson <[email protected]>
mips: ralink: mt7621: define MT7621_SYSC_BASE with __iomem
Wolfram Sang <[email protected]>
clocksource/drivers/sh_cmt: Access registers according to spec
Yang Yingliang <[email protected]>
rapidio: rio: fix possible name leak in rio_register_mport()
Yang Yingliang <[email protected]>
rapidio: fix possible name leaks when rio_add_device() fails
Akinobu Mita <[email protected]>
debugfs: fix error when writing negative value to atomic_t debugfs file
Akinobu Mita <[email protected]>
lib/notifier-error-inject: fix error when writing -errno to debugfs file
Akinobu Mita <[email protected]>
libfs: add DEFINE_SIMPLE_ATTRIBUTE_SIGNED for signed value
Xiongfeng Wang <[email protected]>
cpufreq: amd_freq_sensitivity: Add missing pci_dev_put()
Yang Yingliang <[email protected]>
genirq/irqdesc: Don't try to remove non-existing sysfs files
Jeff Layton <[email protected]>
nfsd: don't call nfsd_file_put from client states seqfile display
Chuck Lever <[email protected]>
NFSD: Finish converting the NFSv2 GETACL result encoder
Haowen Bai <[email protected]>
SUNRPC: Return true/false (not 1/0) from bool functions
Yang Yingliang <[email protected]>
EDAC/i10nm: fix refcount leak in pci_get_dev_wrapper()
Wei Yongjun <[email protected]>
irqchip/wpcm450: Fix memory leak in wpcm450_aic_of_init()
Shang XiaoJing <[email protected]>
irqchip: gic-pm: Use pm_runtime_resume_and_get() in gic_probe()
Yang Yingliang <[email protected]>
thermal: core: fix some possible name leaks in error paths
Yuan Can <[email protected]>
platform/chrome: cros_usbpd_notify: Fix error handling in cros_usbpd_notify_init()
Xiongfeng Wang <[email protected]>
perf/x86/intel/uncore: Fix reference count leak in __uncore_imc_init_box()
Xiongfeng Wang <[email protected]>
perf/x86/intel/uncore: Fix reference count leak in snr_uncore_mmio_map()
Xiongfeng Wang <[email protected]>
perf/x86/intel/uncore: Fix reference count leak in hswep_has_limit_sbox()
Xiongfeng Wang <[email protected]>
perf/x86/intel/uncore: Fix reference count leak in sad_cfg_iio_topology()
Yang Yingliang <[email protected]>
PNP: fix name memory leak in pnp_alloc_dev()
Zhao Gongyi <[email protected]>
selftests/efivarfs: Add checking of the test return value
Yang Yingliang <[email protected]>
MIPS: vpe-cmp: fix possible memory leak while module exiting
Yang Yingliang <[email protected]>
MIPS: vpe-mt: fix possible memory leak while module exiting
Shang XiaoJing <[email protected]>
ocfs2: fix memory leak in ocfs2_stack_glue_init()
Gaosheng Cui <[email protected]>
lib/fonts: fix undefined behavior in bit shift for get_default_font
Alexey Dobriyan <[email protected]>
proc: fixup uptime selftest
Barnabás Pőcze <[email protected]>
timerqueue: Use rb_entry_safe() in timerqueue_getnext()
Barnabás Pőcze <[email protected]>
platform/x86: huawei-wmi: fix return value calculation
wuchi <[email protected]>
lib/debugobjects: fix stat count and optimize debug_objects_mem_init
Chen Zhongjin <[email protected]>
perf: Fix possible memleak in pmu_dev_alloc()
Yipeng Zou <[email protected]>
selftests/ftrace: event_triggers: wait longer for test_event_enable
Chen Hui <[email protected]>
cpufreq: qcom-hw: Fix memory leak in qcom_cpufreq_hw_read_lut()
Ondrej Mosnacek <[email protected]>
fs: don't audit the capability check in simple_xattr_list()
xiongxin <[email protected]>
PM: hibernate: Fix mistake in kerneldoc comment
Reinette Chatre <[email protected]>
x86/sgx: Reduce delay and interference of enclave release
Al Viro <[email protected]>
alpha: fix syscall entry in !AUDUT_SYSCALL case
Al Viro <[email protected]>
alpha: fix TIF_NOTIFY_SIGNAL handling
Ulf Hansson <[email protected]>
cpuidle: dt: Return the correct numbers of parsed idle states
Qais Yousef <[email protected]>
sched/uclamp: Make asym_fits_capacity() use util_fits_cpu()
Dietmar Eggemann <[email protected]>
sched/core: Introduce sched_asym_cpucap_active()
Vincent Guittot <[email protected]>
sched/fair: Removed useless update of p->recent_used_cpu
Qais Yousef <[email protected]>
sched/uclamp: Make select_idle_capacity() use util_fits_cpu()
Qais Yousef <[email protected]>
sched/uclamp: Make task_fits_capacity() use util_fits_cpu()
Qais Yousef <[email protected]>
sched/uclamp: Fix relationship between uclamp and migration margin
Vincent Donnefort <[email protected]>
sched/fair: Cleanup task_util and capacity type
Amir Goldstein <[email protected]>
ovl: remove privs in ovl_fallocate()
Amir Goldstein <[email protected]>
ovl: remove privs in ovl_copyfile()
Christian Brauner <[email protected]>
ovl: use ovl_copy_{real,upper}attr() wrappers
Amir Goldstein <[email protected]>
ovl: store lower path in ovl_inode
Michael Kelley <[email protected]>
tpm/tpm_crb: Fix error message in __crb_relinquish_locality()
Yuan Can <[email protected]>
tpm/tpm_ftpm_tee: Fix error handling in ftpm_mod_init()
Stephen Boyd <[email protected]>
pstore: Avoid kcore oops by vmap()ing with VM_IOREMAP
Doug Brown <[email protected]>
ARM: mmp: fix timer_read delay
Wang Yufen <[email protected]>
pstore/ram: Fix error return code in ramoops_probe()
Kuniyuki Iwashima <[email protected]>
seccomp: Move copy_seccomp() to no failure path.
Pali Rohár <[email protected]>
arm64: dts: armada-3720-turris-mox: Add missing interrupt for RTC
Pali Rohár <[email protected]>
ARM: dts: armada-39x: Fix compatible string for gpios
Pali Rohár <[email protected]>
ARM: dts: armada-38x: Fix compatible string for gpios
Pali Rohár <[email protected]>
ARM: dts: turris-omnia: Add switch port 6 node
Pali Rohár <[email protected]>
ARM: dts: turris-omnia: Add ethernet aliases
Pali Rohár <[email protected]>
ARM: dts: armada-39x: Fix assigned-addresses for every PCIe Root Port
Pali Rohár <[email protected]>
ARM: dts: armada-38x: Fix assigned-addresses for every PCIe Root Port
Pali Rohár <[email protected]>
ARM: dts: armada-375: Fix assigned-addresses for every PCIe Root Port
Pali Rohár <[email protected]>
ARM: dts: armada-xp: Fix assigned-addresses for every PCIe Root Port
Pali Rohár <[email protected]>
ARM: dts: armada-370: Fix assigned-addresses for every PCIe Root Port
Pali Rohár <[email protected]>
ARM: dts: dove: Fix assigned-addresses for every PCIe Root Port
AngeloGioacchino Del Regno <[email protected]>
arm64: dts: mediatek: mt6797: Fix 26M oscillator unit name
AngeloGioacchino Del Regno <[email protected]>
arm64: dts: mediatek: pumpkin-common: Fix devicetree warnings
AngeloGioacchino Del Regno <[email protected]>
arm64: dts: mt2712-evb: Fix usb vbus regulators unit names
AngeloGioacchino Del Regno <[email protected]>
arm64: dts: mt2712-evb: Fix vproc fixed regulators unit names
AngeloGioacchino Del Regno <[email protected]>
arm64: dts: mt2712e: Fix unit address for pinctrl node
AngeloGioacchino Del Regno <[email protected]>
arm64: dts: mt2712e: Fix unit_address_vs_reg warning for oscillators
AngeloGioacchino Del Regno <[email protected]>
arm64: dts: mt6779: Fix devicetree build warnings
Jonathan Neuschäfer <[email protected]>
ARM: dts: nuvoton: Remove bogus unit addresses from fixed-partition nodes
Jayesh Choudhary <[email protected]>
arm64: dts: ti: k3-j721e-main: Drop dma-coherent in crypto node
Jayesh Choudhary <[email protected]>
arm64: dts: ti: k3-am65-main: Drop dma-coherent in crypto node
Shang XiaoJing <[email protected]>
perf/smmuv3: Fix hotplug callback leak in arm_smmu_pmu_init()
Shang XiaoJing <[email protected]>
perf/arm_dmc620: Fix hotplug callback leak in dmc620_pmu_init()
Yuan Can <[email protected]>
perf: arm_dsu: Fix hotplug callback leak in dsu_pmu_init()
Mark Rutland <[email protected]>
arm64: mm: kfence: only handle translation faults
Alexandru Elisei <[email protected]>
arm64: Treat ESR_ELx as a 64-bit register
Zhang Qilong <[email protected]>
soc: ti: smartreflex: Fix PM disable depth imbalance in omap_sr_probe
Zhang Qilong <[email protected]>
soc: ti: knav_qmss_queue: Fix PM disable depth imbalance in knav_queue_probe
Minghao Chi <[email protected]>
soc: ti: knav_qmss_queue: Use pm_runtime_resume_and_get instead of pm_runtime_get_sync
Kory Maincent <[email protected]>
arm: dts: spear600: Fix clcd interrupt
Krzysztof Kozlowski <[email protected]>
arm64: dts: qcom: sm6125: fix SDHCI CQE reg names
Jiasheng Jiang <[email protected]>
soc: qcom: apr: Add check for idr_alloc and of_property_read_string_index
Srinivas Kandagatla <[email protected]>
soc: qcom: apr: make code more reuseable
Johan Hovold <[email protected]>
arm64: dts: qcom: sm8250: drop bogus DP PHY clock
Johan Hovold <[email protected]>
arm64: dts: qcom: sm8350: fix UFS PHY registers
Johan Hovold <[email protected]>
arm64: dts: qcom: sm8250: fix UFS PHY registers
Johan Hovold <[email protected]>
arm64: dts: qcom: sm8150: fix UFS PHY registers
Shawn Guo <[email protected]>
arm64: dts: qcom: Correct QMP PHY child node name
Luca Weiss <[email protected]>
soc: qcom: llcc: make irq truly optional
Krzysztof Kozlowski <[email protected]>
arm64: dts: qcom: sm8250: correct LPASS pin pull down
Marijn Suijten <[email protected]>
arm64: dts: qcom: pm660: Use unique ADC5_VCOIN address in node name
Chen Jiahao <[email protected]>
drivers: soc: ti: knav_qmss_queue: Mark knav_acc_firmwares as static
Marek Vasut <[email protected]>
ARM: dts: stm32: Fix AV96 WLAN regulator gpio property
Marek Vasut <[email protected]>
ARM: dts: stm32: Drop stm32mp15xc.dtsi from Avenger96
Marco Elver <[email protected]>
objtool, kcsan: Add volatile read/write instrumentation to whitelist
Stephan Gerhold <[email protected]>
arm64: dts: qcom: msm8916: Drop MSS fallback compatible
Krzysztof Kozlowski <[email protected]>
arm64: dts: qcom: sdm845-cheza: fix AP suspend pin bias
Krzysztof Kozlowski <[email protected]>
arm64: dts: qcom: sdm630: fix UART1 pin bias
Luca Weiss <[email protected]>
ARM: dts: qcom: apq8064: fix coresight compatible
Dmitry Baryshkov <[email protected]>
arm64: dts: qcom: msm8996: fix GPU OPP table
Dmitry Baryshkov <[email protected]>
arm64: dts: qcom: msm8996: fix supported-hw in cpufreq OPP tables
Yassine Oudjana <[email protected]>
arm64: dts: qcom: msm8996: Add MSM8996 Pro support
Krzysztof Kozlowski <[email protected]>
arm64: dts: qcom: sm8250-sony-xperia-edo: fix touchscreen bias-disable
Krzysztof Kozlowski <[email protected]>
arm64: dts: qcom: ipq6018-cp01-c1: use BLSPI1 pins
Ivaylo Dimitrov <[email protected]>
usb: musb: remove extra check in musb_gadget_vbus_draw
Martin Leung <[email protected]>
drm/amd/display: Manually adjust strobe for DCN303
-------------
Diffstat:
.../ABI/testing/sysfs-bus-spi-devices-spi-nor | 3 +
.../devicetree/bindings/pci/fsl,imx6q-pcie.yaml | 46 +-
.../bindings/pci/toshiba,visconti-pcie.yaml | 7 +-
.../devicetree/bindings/sound/qcom,wcd9335.txt | 2 +-
Documentation/driver-api/spi.rst | 4 +-
Documentation/fault-injection/fault-injection.rst | 10 +-
Documentation/process/deprecated.rst | 20 +-
MAINTAINERS | 2 +-
Makefile | 4 +-
arch/alpha/include/asm/thread_info.h | 2 +-
arch/alpha/kernel/entry.S | 4 +-
arch/arm/boot/dts/armada-370.dtsi | 2 +-
arch/arm/boot/dts/armada-375.dtsi | 2 +-
arch/arm/boot/dts/armada-380.dtsi | 4 +-
arch/arm/boot/dts/armada-385-turris-omnia.dts | 18 +-
arch/arm/boot/dts/armada-385.dtsi | 6 +-
arch/arm/boot/dts/armada-38x.dtsi | 4 +-
arch/arm/boot/dts/armada-39x.dtsi | 10 +-
arch/arm/boot/dts/armada-xp-mv78230.dtsi | 8 +-
arch/arm/boot/dts/armada-xp-mv78260.dtsi | 16 +-
arch/arm/boot/dts/dove.dtsi | 2 +-
arch/arm/boot/dts/nuvoton-npcm730-gbs.dts | 2 +-
arch/arm/boot/dts/nuvoton-npcm730-gsj.dts | 2 +-
arch/arm/boot/dts/nuvoton-npcm730-kudo.dts | 6 +-
arch/arm/boot/dts/nuvoton-npcm750-evb.dts | 4 +-
.../boot/dts/nuvoton-npcm750-runbmc-olympus.dts | 6 +-
arch/arm/boot/dts/qcom-apq8064.dtsi | 2 +-
arch/arm/boot/dts/spear600.dtsi | 2 +-
arch/arm/boot/dts/stm32mp157a-dhcor-avenger96.dts | 1 -
arch/arm/boot/dts/stm32mp15xx-dhcor-avenger96.dtsi | 2 +-
arch/arm/mach-mmp/time.c | 11 +-
.../boot/dts/marvell/armada-3720-turris-mox.dts | 3 +
arch/arm64/boot/dts/mediatek/mt2712-evb.dts | 12 +-
arch/arm64/boot/dts/mediatek/mt2712e.dtsi | 22 +-
arch/arm64/boot/dts/mediatek/mt6779.dtsi | 8 +-
arch/arm64/boot/dts/mediatek/mt6797.dtsi | 2 +-
arch/arm64/boot/dts/mediatek/mt8183.dtsi | 2 +-
arch/arm64/boot/dts/mediatek/pumpkin-common.dtsi | 6 +-
arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dts | 2 +
arch/arm64/boot/dts/qcom/ipq6018.dtsi | 2 +-
arch/arm64/boot/dts/qcom/ipq8074.dtsi | 4 +-
arch/arm64/boot/dts/qcom/msm8916.dtsi | 2 +-
arch/arm64/boot/dts/qcom/msm8996.dtsi | 122 +-
arch/arm64/boot/dts/qcom/msm8996pro.dtsi | 266 +
arch/arm64/boot/dts/qcom/msm8998.dtsi | 6 +-
arch/arm64/boot/dts/qcom/pm660.dtsi | 2 +-
arch/arm64/boot/dts/qcom/sdm630.dtsi | 2 +-
arch/arm64/boot/dts/qcom/sdm845-cheza.dtsi | 4 +-
arch/arm64/boot/dts/qcom/sdm845.dtsi | 10 +-
arch/arm64/boot/dts/qcom/sm6125.dtsi | 2 +-
arch/arm64/boot/dts/qcom/sm8150.dtsi | 16 +-
.../boot/dts/qcom/sm8250-sony-xperia-edo.dtsi | 2 +-
arch/arm64/boot/dts/qcom/sm8250.dtsi | 30 +-
arch/arm64/boot/dts/qcom/sm8350.dtsi | 12 +-
arch/arm64/boot/dts/ti/k3-am65-main.dtsi | 1 -
arch/arm64/boot/dts/ti/k3-j721e-main.dtsi | 1 -
arch/arm64/include/asm/debug-monitors.h | 4 +-
arch/arm64/include/asm/esr.h | 6 +-
arch/arm64/include/asm/exception.h | 28 +-
arch/arm64/include/asm/processor.h | 4 +-
arch/arm64/include/asm/system_misc.h | 4 +-
arch/arm64/include/asm/traps.h | 12 +-
arch/arm64/kernel/debug-monitors.c | 12 +-
arch/arm64/kernel/entry-common.c | 6 +-
arch/arm64/kernel/fpsimd.c | 6 +-
arch/arm64/kernel/hw_breakpoint.c | 4 +-
arch/arm64/kernel/kgdb.c | 6 +-
arch/arm64/kernel/probes/kprobes.c | 4 +-
arch/arm64/kernel/probes/uprobes.c | 4 +-
arch/arm64/kernel/traps.c | 66 +-
arch/arm64/mm/fault.c | 78 +-
arch/mips/bcm63xx/clk.c | 2 +
.../cavium-octeon/executive/cvmx-helper-board.c | 2 +-
arch/mips/cavium-octeon/executive/cvmx-helper.c | 2 +-
arch/mips/include/asm/mach-ralink/mt7621.h | 4 +-
arch/mips/kernel/vpe-cmp.c | 4 +-
arch/mips/kernel/vpe-mt.c | 4 +-
arch/mips/ralink/mt7621.c | 97 +-
arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-2.dtsi | 44 +
arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-3.dtsi | 44 +
arch/powerpc/boot/dts/fsl/t2081si-post.dtsi | 4 +-
arch/powerpc/perf/callchain.c | 1 +
arch/powerpc/perf/hv-gpci-requests.h | 4 +
arch/powerpc/perf/hv-gpci.c | 33 +-
arch/powerpc/perf/hv-gpci.h | 1 +
arch/powerpc/perf/req-gen/perf.h | 20 +
arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c | 1 +
arch/powerpc/platforms/83xx/mpc832x_rdb.c | 2 +-
arch/powerpc/platforms/pseries/eeh_pseries.c | 14 +-
arch/powerpc/sysdev/xive/spapr.c | 1 +
arch/powerpc/xmon/xmon.c | 7 +-
arch/riscv/include/asm/hugetlb.h | 6 +
arch/riscv/kernel/traps.c | 2 +-
arch/riscv/net/bpf_jit_comp64.c | 29 +-
arch/x86/events/intel/uncore_snb.c | 3 +
arch/x86/events/intel/uncore_snbep.c | 5 +
arch/x86/hyperv/hv_init.c | 2 -
arch/x86/kernel/cpu/sgx/encl.c | 23 +-
arch/x86/kernel/uprobes.c | 4 +-
arch/x86/xen/smp.c | 24 +-
arch/x86/xen/smp_pv.c | 12 +-
arch/x86/xen/spinlock.c | 6 +-
block/bfq-iosched.c | 16 +-
block/blk-iocost.c | 14 +-
block/blk-mq-sysfs.c | 11 +-
block/genhd.c | 2 +
crypto/cryptd.c | 36 +-
crypto/tcrypt.c | 9 -
drivers/acpi/acpica/dsmethod.c | 10 +-
drivers/acpi/acpica/utcopy.c | 7 -
drivers/ata/acard-ahci.c | 2 +-
drivers/ata/ahci.c | 4 +-
drivers/ata/ahci_qoriq.c | 2 +-
drivers/ata/ahci_xgene.c | 2 +-
drivers/ata/libahci.c | 4 +-
drivers/ata/libata-acpi.c | 52 +-
drivers/ata/libata-core.c | 73 +-
drivers/ata/libata-eh.c | 42 +-
drivers/ata/libata-sata.c | 19 +-
drivers/ata/libata-scsi.c | 22 +-
drivers/ata/libata-sff.c | 6 +-
drivers/ata/pata_ep93xx.c | 4 +-
drivers/ata/pata_ixp4xx_cf.c | 6 +-
drivers/ata/pata_ns87415.c | 4 +-
drivers/ata/pata_octeon_cf.c | 4 +-
drivers/ata/pata_samsung_cf.c | 2 +-
drivers/ata/sata_highbank.c | 2 +-
drivers/ata/sata_inic162x.c | 10 +-
drivers/ata/sata_rcar.c | 4 +-
drivers/ata/sata_svw.c | 10 +-
drivers/ata/sata_vsc.c | 10 +-
drivers/base/class.c | 5 +
drivers/base/power/runtime.c | 12 +-
drivers/block/drbd/drbd_main.c | 9 +-
drivers/block/floppy.c | 4 +-
drivers/block/loop.c | 28 +-
drivers/bluetooth/btintel.c | 5 +-
drivers/bluetooth/btusb.c | 6 +-
drivers/bluetooth/hci_bcsp.c | 2 +-
drivers/bluetooth/hci_h5.c | 2 +-
drivers/bluetooth/hci_ll.c | 2 +-
drivers/bluetooth/hci_qca.c | 2 +-
drivers/char/hw_random/amd-rng.c | 18 +-
drivers/char/hw_random/geode-rng.c | 36 +-
drivers/char/ipmi/ipmi_msghandler.c | 8 +-
drivers/char/ipmi/kcs_bmc_aspeed.c | 24 +-
drivers/char/tpm/tpm_crb.c | 2 +-
drivers/char/tpm/tpm_ftpm_tee.c | 8 +-
drivers/clk/imx/clk-imx8mn.c | 34 +-
drivers/clk/qcom/clk-krait.c | 2 +
drivers/clk/qcom/gcc-sm8250.c | 4 +-
drivers/clk/qcom/lpasscorecc-sc7180.c | 24 +-
drivers/clk/renesas/r9a06g032-clocks.c | 3 +-
drivers/clk/rockchip/clk-pll.c | 1 +
drivers/clk/samsung/clk-pll.c | 1 +
drivers/clk/socfpga/clk-gate.c | 5 +-
drivers/clk/st/clkgen-fsyn.c | 5 +-
drivers/clocksource/sh_cmt.c | 88 +-
drivers/clocksource/timer-ti-dm-systimer.c | 4 +-
drivers/counter/stm32-lptimer-cnt.c | 2 +-
drivers/cpufreq/amd_freq_sensitivity.c | 2 +
drivers/cpufreq/qcom-cpufreq-hw.c | 1 +
drivers/cpuidle/dt_idle_states.c | 2 +-
drivers/crypto/Kconfig | 5 +
.../crypto/allwinner/sun8i-ss/sun8i-ss-cipher.c | 2 +-
drivers/crypto/amlogic/amlogic-gxl-core.c | 1 -
drivers/crypto/amlogic/amlogic-gxl.h | 2 +-
drivers/crypto/cavium/nitrox/nitrox_mbx.c | 1 +
drivers/crypto/ccree/cc_debugfs.c | 2 +-
drivers/crypto/ccree/cc_driver.c | 10 +-
drivers/crypto/hisilicon/hpre/hpre_main.c | 10 +-
drivers/crypto/hisilicon/qm.c | 7 +-
drivers/crypto/hisilicon/qm.h | 6 +-
drivers/crypto/img-hash.c | 8 +-
drivers/crypto/omap-sham.c | 2 +-
drivers/crypto/rockchip/rk3288_crypto.c | 193 +-
drivers/crypto/rockchip/rk3288_crypto.h | 53 +-
drivers/crypto/rockchip/rk3288_crypto_ahash.c | 197 +-
drivers/crypto/rockchip/rk3288_crypto_skcipher.c | 413 +-
drivers/dio/dio.c | 8 +
drivers/edac/i10nm_base.c | 3 +-
drivers/extcon/Kconfig | 2 +-
drivers/extcon/extcon-usbc-tusb320.c | 402 +-
drivers/firmware/raspberrypi.c | 1 +
drivers/gpio/gpiolib-cdev.c | 268 +-
drivers/gpio/gpiolib.c | 16 +-
drivers/gpio/gpiolib.h | 39 +
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 2 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_bios.c | 1 +
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 +
drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h | 5 +-
.../drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 35 -
drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c | 16 +-
.../gpu/drm/amd/display/dc/dce60/dce60_resource.c | 3 +
.../gpu/drm/amd/display/dc/dce80/dce80_resource.c | 2 +
.../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 30 +-
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c | 29 +-
.../drm/amd/display/dc/dcn303/dcn303_resource.c | 14 +
drivers/gpu/drm/amd/include/kgd_pp_interface.h | 3 +-
drivers/gpu/drm/amd/pm/powerplay/amd_powerplay.c | 3 +-
drivers/gpu/drm/amd/pm/powerplay/hwmgr/pp_psm.c | 2 +
.../gpu/drm/amd/pm/powerplay/hwmgr/vega20_hwmgr.c | 3 +-
drivers/gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c | 4 +
drivers/gpu/drm/bridge/adv7511/adv7511.h | 3 +-
drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 18 +-
drivers/gpu/drm/bridge/adv7511/adv7533.c | 25 +-
drivers/gpu/drm/drm_fourcc.c | 11 +-
drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 11 +-
drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_rgb.c | 5 +-
drivers/gpu/drm/i915/display/intel_dp.c | 59 -
drivers/gpu/drm/mediatek/mtk_dpi.c | 12 +-
drivers/gpu/drm/mediatek/mtk_hdmi.c | 7 +-
drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 12 +-
drivers/gpu/drm/msm/dp/dp_display.c | 2 +-
drivers/gpu/drm/msm/hdmi/hdmi.c | 68 +-
drivers/gpu/drm/msm/hdmi/hdmi.h | 13 +-
drivers/gpu/drm/msm/hdmi/hdmi_hpd.c | 62 +-
drivers/gpu/drm/panel/panel-sitronix-st7701.c | 10 +-
drivers/gpu/drm/radeon/radeon_bios.c | 19 +-
drivers/gpu/drm/rockchip/cdn-dp-core.c | 2 +-
drivers/gpu/drm/rockchip/inno_hdmi.c | 2 +-
drivers/gpu/drm/rockchip/rk3066_hdmi.c | 2 +-
drivers/gpu/drm/rockchip/rockchip_lvds.c | 10 +-
drivers/gpu/drm/sti/sti_dvo.c | 7 +-
drivers/gpu/drm/sti/sti_hda.c | 7 +-
drivers/gpu/drm/sti/sti_hdmi.c | 7 +-
drivers/gpu/drm/tegra/dc.c | 4 +-
drivers/hid/amd-sfh-hid/amd_sfh_client.c | 4 +
drivers/hid/hid-mcp2221.c | 12 +-
drivers/hid/hid-sensor-custom.c | 2 +-
drivers/hid/wacom_sys.c | 8 +
drivers/hid/wacom_wac.c | 4 +
drivers/hid/wacom_wac.h | 1 +
drivers/hsi/controllers/omap_ssi_core.c | 14 +-
drivers/hv/ring_buffer.c | 13 +
drivers/hwmon/Kconfig | 1 +
drivers/hwmon/jc42.c | 243 +-
drivers/hwtracing/coresight/coresight-trbe.c | 1 +
drivers/i2c/busses/i2c-ismt.c | 3 +
drivers/i2c/busses/i2c-pxa-pci.c | 10 +-
drivers/i2c/muxes/i2c-mux-reg.c | 5 +-
drivers/iio/accel/adis16201.c | 1 +
drivers/iio/accel/adis16209.c | 1 +
drivers/iio/adc/ad_sigma_delta.c | 8 +-
drivers/iio/adc/ti-adc128s052.c | 14 +-
drivers/iio/gyro/adis16136.c | 1 +
drivers/iio/gyro/adis16260.c | 1 +
drivers/iio/imu/adis.c | 98 +-
drivers/iio/imu/adis16400.c | 1 +
drivers/iio/imu/adis16460.c | 1 +
drivers/iio/imu/adis16475.c | 1 +
drivers/iio/imu/adis16480.c | 1 +
drivers/iio/imu/adis_buffer.c | 10 +-
drivers/iio/imu/adis_trigger.c | 9 +-
drivers/iio/industrialio-event.c | 4 +-
drivers/iio/temperature/ltc2983.c | 10 +-
drivers/infiniband/core/device.c | 2 +-
drivers/infiniband/core/mad.c | 5 -
drivers/infiniband/core/nldev.c | 6 +-
drivers/infiniband/core/restrack.c | 2 -
drivers/infiniband/core/sysfs.c | 17 +-
drivers/infiniband/hw/hfi1/affinity.c | 2 +
drivers/infiniband/hw/hfi1/firmware.c | 6 +
drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 52 +-
drivers/infiniband/hw/hns/hns_roce_hw_v2.h | 5 +
drivers/infiniband/hw/hns/hns_roce_mr.c | 4 +-
drivers/infiniband/hw/irdma/verbs.c | 35 +-
drivers/infiniband/sw/rxe/rxe_qp.c | 6 +-
drivers/infiniband/sw/siw/siw_cq.c | 24 +-
drivers/infiniband/sw/siw/siw_qp_tx.c | 2 +-
drivers/infiniband/sw/siw/siw_verbs.c | 40 +-
drivers/infiniband/ulp/ipoib/ipoib_netlink.c | 7 +
drivers/infiniband/ulp/srp/ib_srp.c | 96 +-
drivers/input/joystick/Kconfig | 1 +
drivers/input/misc/Kconfig | 2 +-
drivers/input/touchscreen/elants_i2c.c | 9 +-
drivers/iommu/amd/iommu_v2.c | 1 +
drivers/iommu/fsl_pamu.c | 2 +-
drivers/iommu/rockchip-iommu.c | 10 +-
drivers/iommu/sun50i-iommu.c | 16 +-
drivers/irqchip/irq-gic-pm.c | 2 +-
drivers/irqchip/irq-wpcm450-aic.c | 1 +
drivers/isdn/hardware/mISDN/hfcmulti.c | 19 +-
drivers/isdn/hardware/mISDN/hfcpci.c | 13 +-
drivers/isdn/hardware/mISDN/hfcsusb.c | 12 +-
drivers/macintosh/macio-adb.c | 4 +
drivers/macintosh/macio_asic.c | 2 +-
drivers/mailbox/arm_mhuv2.c | 4 +-
drivers/mailbox/mailbox-mpfs.c | 31 +-
drivers/mailbox/zynqmp-ipi-mailbox.c | 4 +-
drivers/mcb/mcb-core.c | 4 +-
drivers/mcb/mcb-parse.c | 2 +-
drivers/md/md-bitmap.c | 27 +-
drivers/md/raid1.c | 1 +
drivers/media/dvb-core/dvb_ca_en50221.c | 2 +-
drivers/media/dvb-core/dvb_frontend.c | 10 +-
drivers/media/dvb-core/dvbdev.c | 32 +-
drivers/media/dvb-frontends/bcm3510.c | 1 +
drivers/media/i2c/ad5820.c | 10 +-
drivers/media/i2c/adv748x/adv748x-afe.c | 4 +
drivers/media/pci/saa7164/saa7164-core.c | 4 +-
drivers/media/pci/solo6x10/solo6x10-core.c | 1 +
drivers/media/platform/coda/coda-bit.c | 14 +-
drivers/media/platform/coda/coda-jpeg.c | 10 +-
drivers/media/platform/exynos4-is/fimc-core.c | 2 +-
drivers/media/platform/exynos4-is/media-dev.c | 12 +-
drivers/media/platform/imx-jpeg/mxc-jpeg-hw.c | 4 +-
drivers/media/platform/qcom/camss/camss-video.c | 3 +-
drivers/media/platform/qcom/venus/pm_helpers.c | 4 +-
drivers/media/platform/s5p-mfc/s5p_mfc.c | 17 +-
.../media/platform/sti/c8sectpfe/c8sectpfe-core.c | 1 +
drivers/media/radio/si470x/radio-si470x-usb.c | 4 +-
drivers/media/rc/imon.c | 6 +-
drivers/media/test-drivers/vidtv/vidtv_bridge.c | 22 +-
drivers/media/test-drivers/vimc/vimc-core.c | 2 +-
drivers/media/test-drivers/vivid/vivid-vid-cap.c | 1 +
drivers/media/usb/dvb-usb/az6027.c | 4 +
drivers/media/usb/dvb-usb/dvb-usb-init.c | 4 +-
drivers/media/v4l2-core/v4l2-ctrls-core.c | 2 +-
drivers/media/v4l2-core/videobuf-dma-contig.c | 22 +-
drivers/memstick/core/ms_block.c | 13 +-
drivers/mfd/Kconfig | 1 +
drivers/mfd/qcom-pm8008.c | 55 +-
drivers/mfd/qcom_rpm.c | 4 +-
drivers/misc/cxl/guest.c | 24 +-
drivers/misc/cxl/pci.c | 21 +-
drivers/misc/ocxl/config.c | 20 +-
drivers/misc/ocxl/file.c | 7 +-
drivers/misc/sgi-gru/grufault.c | 13 +-
drivers/misc/sgi-gru/grumain.c | 22 +-
drivers/misc/sgi-gru/grutables.h | 2 +-
drivers/misc/tifm_7xx1.c | 2 +-
drivers/mmc/core/sd.c | 11 +-
drivers/mmc/host/alcor.c | 5 +-
drivers/mmc/host/atmel-mci.c | 9 +-
drivers/mmc/host/meson-gx-mmc.c | 4 +-
drivers/mmc/host/mmci.c | 4 +-
drivers/mmc/host/moxart-mmc.c | 4 +-
drivers/mmc/host/mxcmmc.c | 4 +-
drivers/mmc/host/omap_hsmmc.c | 4 +-
drivers/mmc/host/pxamci.c | 7 +-
drivers/mmc/host/renesas_sdhi_core.c | 14 +-
drivers/mmc/host/rtsx_pci_sdmmc.c | 9 +-
drivers/mmc/host/rtsx_usb_sdmmc.c | 11 +-
drivers/mmc/host/sdhci_f_sdh30.c | 3 +
drivers/mmc/host/toshsd.c | 6 +-
drivers/mmc/host/via-sdmmc.c | 4 +-
drivers/mmc/host/vub300.c | 11 +-
drivers/mmc/host/wbsd.c | 12 +-
drivers/mmc/host/wmt-sdmmc.c | 6 +-
drivers/mtd/lpddr/lpddr2_nvm.c | 2 +
drivers/mtd/maps/pxa2xx-flash.c | 2 +
drivers/mtd/mtdcore.c | 4 +-
drivers/mtd/spi-nor/core.c | 3 +-
drivers/mtd/spi-nor/sysfs.c | 14 +
drivers/net/bonding/bond_main.c | 13 +-
drivers/net/can/m_can/m_can.c | 32 +-
drivers/net/can/m_can/m_can_platform.c | 4 -
drivers/net/can/m_can/tcan4x5x-core.c | 18 +-
drivers/net/can/usb/kvaser_usb/kvaser_usb.h | 30 +-
drivers/net/can/usb/kvaser_usb/kvaser_usb_core.c | 115 +-
drivers/net/can/usb/kvaser_usb/kvaser_usb_hydra.c | 174 +-
drivers/net/can/usb/kvaser_usb/kvaser_usb_leaf.c | 446 +-
drivers/net/dsa/lan9303-core.c | 4 +-
drivers/net/ethernet/amd/atarilance.c | 2 +-
drivers/net/ethernet/amd/lance.c | 2 +-
drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c | 23 +-
drivers/net/ethernet/apple/bmac.c | 2 +-
drivers/net/ethernet/apple/mace.c | 2 +-
drivers/net/ethernet/dnet.c | 4 +-
drivers/net/ethernet/freescale/enetc/enetc.c | 35 +-
drivers/net/ethernet/intel/i40e/i40e_main.c | 36 +-
drivers/net/ethernet/intel/igb/igb_main.c | 8 +-
drivers/net/ethernet/intel/igc/igc.h | 3 +
drivers/net/ethernet/intel/igc/igc_defines.h | 2 +
drivers/net/ethernet/intel/igc/igc_main.c | 233 +-
drivers/net/ethernet/intel/igc/igc_tsn.c | 13 +-
drivers/net/ethernet/myricom/myri10ge/myri10ge.c | 1 +
drivers/net/ethernet/neterion/s2io.c | 2 +-
drivers/net/ethernet/qlogic/qed/qed_debug.c | 3 +-
.../ethernet/qlogic/qlcnic/qlcnic_sriov_common.c | 2 +
drivers/net/ethernet/rdc/r6040.c | 5 +-
.../net/ethernet/stmicro/stmmac/stmmac_hwtstamp.c | 3 +-
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 4 +-
drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.h | 2 +-
.../net/ethernet/stmicro/stmmac/stmmac_selftests.c | 8 +-
drivers/net/ethernet/ti/netcp_core.c | 2 +-
drivers/net/ethernet/xilinx/xilinx_emaclite.c | 2 +-
drivers/net/fddi/defxx.c | 22 +-
drivers/net/hamradio/baycom_epp.c | 2 +-
drivers/net/hamradio/scc.c | 6 +-
drivers/net/macsec.c | 34 +-
drivers/net/ntb_netdev.c | 4 +-
drivers/net/ppp/ppp_generic.c | 2 +
drivers/net/wan/farsync.c | 2 +
drivers/net/wireless/ath/ar5523/ar5523.c | 6 +
drivers/net/wireless/ath/ath10k/pci.c | 20 +-
drivers/net/wireless/ath/ath9k/hif_usb.c | 46 +-
.../broadcom/brcm80211/brcmfmac/firmware.c | 5 +
.../wireless/broadcom/brcm80211/brcmfmac/pcie.c | 6 +-
.../wireless/broadcom/brcm80211/brcmfmac/sdio.c | 1 +
drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 12 +-
drivers/net/wireless/mediatek/mt76/mt76.h | 3 +-
drivers/net/wireless/mediatek/mt76/mt7615/main.c | 3 +-
drivers/net/wireless/mediatek/mt76/mt7915/main.c | 3 +-
drivers/net/wireless/mediatek/mt76/mt7921/mac.c | 2 +-
drivers/net/wireless/mediatek/mt76/usb.c | 11 +-
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h | 2 +-
.../net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 26 +-
drivers/net/wireless/rsi/rsi_91x_core.c | 4 +-
drivers/net/wireless/rsi/rsi_91x_hal.c | 6 +-
drivers/nfc/pn533/pn533.c | 4 +
drivers/nvme/host/core.c | 2 +-
drivers/nvme/target/core.c | 22 +-
drivers/nvme/target/io-cmd-file.c | 16 +-
drivers/nvme/target/nvmet.h | 3 +-
drivers/of/overlay.c | 4 +-
drivers/pci/controller/dwc/pcie-designware.c | 2 +-
drivers/pci/controller/vmd.c | 5 +
drivers/pci/endpoint/functions/pci-epf-test.c | 2 +-
drivers/pci/irq.c | 2 +
drivers/perf/arm_dmc620_pmu.c | 8 +-
drivers/perf/arm_dsu_pmu.c | 6 +-
drivers/perf/arm_smmuv3_pmu.c | 8 +-
drivers/phy/broadcom/phy-brcm-usb.c | 6 +-
drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 6350 ++++++++++++++++++++
drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c | 6350 ++++++++++++++++++++
drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 6350 ++++++++++++++++++++
drivers/phy/qualcomm/phy-qcom-qmp-ufs.c | 6350 ++++++++++++++++++++
drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 6350 ++++++++++++++++++++
drivers/pinctrl/pinconf-generic.c | 4 +-
drivers/pinctrl/pinctrl-k210.c | 4 +-
drivers/platform/chrome/cros_ec_typec.c | 8 +-
drivers/platform/chrome/cros_usbpd_notify.c | 6 +-
drivers/platform/mellanox/mlxbf-pmc.c | 2 +-
drivers/platform/x86/huawei-wmi.c | 20 +-
drivers/platform/x86/intel_scu_ipc.c | 2 +-
drivers/platform/x86/mxm-wmi.c | 8 +-
drivers/pnp/core.c | 4 +-
drivers/power/supply/ab8500_charger.c | 9 +-
drivers/power/supply/power_supply_core.c | 7 +-
drivers/power/supply/z2_battery.c | 6 +-
drivers/pwm/pwm-mediatek.c | 2 +-
drivers/pwm/pwm-mtk-disp.c | 5 +-
drivers/pwm/pwm-sifive.c | 5 +-
drivers/pwm/pwm-tegra.c | 4 +-
drivers/rapidio/devices/rio_mport_cdev.c | 15 +-
drivers/rapidio/rio-scan.c | 8 +-
drivers/rapidio/rio.c | 9 +-
drivers/regulator/core.c | 15 +-
drivers/regulator/qcom-labibb-regulator.c | 1 +
drivers/regulator/qcom-rpmh-regulator.c | 2 +-
drivers/remoteproc/qcom_q6v5_pas.c | 4 +
drivers/remoteproc/qcom_q6v5_wcss.c | 6 +-
drivers/remoteproc/qcom_sysmon.c | 5 +-
drivers/rtc/rtc-cmos.c | 366 +-
drivers/rtc/rtc-mxc_v2.c | 4 +-
drivers/rtc/rtc-pcf85063.c | 10 +-
drivers/rtc/rtc-pic32.c | 8 +-
drivers/rtc/rtc-snvs.c | 16 +-
drivers/rtc/rtc-st-lpc.c | 1 +
drivers/s390/net/ctcm_main.c | 11 +-
drivers/s390/net/lcs.c | 8 +-
drivers/s390/net/netiucv.c | 9 +-
drivers/scsi/elx/efct/efct_driver.c | 1 +
drivers/scsi/elx/libefc/efclib.h | 6 +-
drivers/scsi/fcoe/fcoe.c | 1 +
drivers/scsi/fcoe/fcoe_sysfs.c | 19 +-
drivers/scsi/hpsa.c | 9 +-
drivers/scsi/ipr.c | 10 +-
drivers/scsi/lpfc/lpfc_sli.c | 6 +-
drivers/scsi/mpt3sas/mpt3sas_transport.c | 2 +
drivers/scsi/qla2xxx/qla_def.h | 22 +-
drivers/scsi/qla2xxx/qla_init.c | 20 +-
drivers/scsi/qla2xxx/qla_inline.h | 4 +-
drivers/scsi/qla2xxx/qla_os.c | 4 +-
drivers/scsi/scsi_debug.c | 11 +-
drivers/scsi/scsi_error.c | 14 +-
drivers/scsi/snic/snic_disc.c | 3 +
drivers/scsi/ufs/ufshcd.c | 9 +-
drivers/soc/mediatek/mtk-pm-domains.c | 2 +-
drivers/soc/qcom/apr.c | 142 +-
drivers/soc/qcom/llcc-qcom.c | 2 +-
drivers/soc/ti/knav_qmss_queue.c | 6 +-
drivers/soc/ti/smartreflex.c | 1 +
drivers/spi/spi-gpio.c | 16 +-
drivers/spi/spidev.c | 21 +-
drivers/staging/iio/accel/adis16203.c | 1 +
drivers/staging/iio/accel/adis16240.c | 1 +
drivers/staging/mt7621-pci/pci-mt7621.c | 39 +-
drivers/staging/rtl8192e/rtllib_rx.c | 2 +-
drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c | 4 +-
drivers/thermal/imx8mm_thermal.c | 8 +-
drivers/thermal/qcom/lmh.c | 2 +-
drivers/thermal/qcom/qcom-spmi-temp-alarm.c | 3 +-
drivers/thermal/thermal_core.c | 18 +-
drivers/tty/serial/8250/8250_bcm7271.c | 10 +-
drivers/tty/serial/altera_uart.c | 21 +-
drivers/tty/serial/amba-pl011.c | 14 +-
drivers/tty/serial/pch_uart.c | 4 +
drivers/tty/serial/serial-tegra.c | 6 +-
drivers/tty/serial/stm32-usart.c | 47 +-
drivers/tty/serial/sunsab.c | 8 +-
drivers/uio/uio_dmem_genirq.c | 13 +-
drivers/usb/cdns3/cdnsp-ring.c | 42 +-
drivers/usb/dwc3/core.c | 23 +-
drivers/usb/gadget/function/f_hid.c | 53 +-
drivers/usb/gadget/udc/fotg210-udc.c | 12 +-
drivers/usb/host/xhci-mtk.c | 1 -
drivers/usb/host/xhci-ring.c | 14 +-
drivers/usb/host/xhci.h | 2 +-
drivers/usb/musb/musb_gadget.c | 2 -
drivers/usb/roles/class.c | 5 +-
drivers/usb/storage/alauda.c | 2 +
drivers/usb/typec/bus.c | 2 +-
drivers/usb/typec/class.c | 43 +
drivers/usb/typec/tcpm/tcpci.c | 5 +-
drivers/usb/typec/tcpm/tcpm.c | 24 +-
drivers/usb/typec/tipd/core.c | 4 +-
drivers/vfio/platform/vfio_platform_common.c | 3 +-
drivers/video/fbdev/Kconfig | 2 +-
drivers/video/fbdev/core/fbcon.c | 3 +-
drivers/video/fbdev/ep93xx-fb.c | 4 +-
drivers/video/fbdev/geode/Kconfig | 1 +
drivers/video/fbdev/hyperv_fb.c | 8 +-
drivers/video/fbdev/pm2fb.c | 9 +-
drivers/video/fbdev/uvesafb.c | 1 +
drivers/video/fbdev/vermilion/vermilion.c | 4 +-
drivers/video/fbdev/via/via-core.c | 9 +-
drivers/vme/bridges/vme_fake.c | 2 +
drivers/vme/bridges/vme_tsi148.c | 1 +
drivers/xen/privcmd.c | 2 +-
fs/afs/fs_probe.c | 5 +-
fs/binfmt_misc.c | 8 +-
fs/btrfs/file.c | 10 +-
fs/char_dev.c | 2 +-
fs/configfs/dir.c | 2 +
fs/debugfs/file.c | 28 +-
fs/f2fs/gc.c | 10 +-
fs/f2fs/segment.c | 6 +-
fs/f2fs/super.c | 2 +-
fs/hfs/inode.c | 2 +
fs/hfs/trans.c | 2 +-
fs/hugetlbfs/inode.c | 6 +-
fs/jfs/jfs_dmap.c | 27 +-
fs/jfs/namei.c | 2 +-
fs/ksmbd/mgmt/user_session.c | 8 +-
fs/libfs.c | 22 +-
fs/lockd/svcsubs.c | 17 +-
fs/nfs/namespace.c | 2 +-
fs/nfs/nfs4proc.c | 38 +-
fs/nfs/nfs4state.c | 2 +
fs/nfs/nfs4xdr.c | 12 +-
fs/nfsd/nfs2acl.c | 32 +-
fs/nfsd/nfs4callback.c | 4 +-
fs/nfsd/nfs4state.c | 51 +-
fs/nilfs2/the_nilfs.c | 73 +-
fs/ntfs3/bitmap.c | 2 +-
fs/ntfs3/super.c | 2 +-
fs/ntfs3/xattr.c | 2 +-
fs/ocfs2/stackglue.c | 8 +-
fs/orangefs/orangefs-debugfs.c | 29 +-
fs/orangefs/orangefs-mod.c | 8 +-
fs/overlayfs/dir.c | 10 +-
fs/overlayfs/file.c | 43 +-
fs/overlayfs/inode.c | 19 +-
fs/overlayfs/overlayfs.h | 13 +-
fs/overlayfs/ovl_entry.h | 2 +-
fs/overlayfs/super.c | 12 +-
fs/overlayfs/util.c | 47 +-
fs/pstore/Kconfig | 1 +
fs/pstore/pmsg.c | 7 +-
fs/pstore/ram.c | 2 +
fs/pstore/ram_core.c | 6 +-
fs/reiserfs/namei.c | 4 +
fs/reiserfs/xattr_security.c | 2 +-
fs/sysv/itree.c | 2 +-
fs/udf/namei.c | 8 +-
fs/xattr.c | 2 +-
include/dt-bindings/clock/imx8mn-clock.h | 12 +-
include/linux/debugfs.h | 19 +-
include/linux/eventfd.h | 2 +-
include/linux/fs.h | 12 +-
include/linux/gpio/consumer.h | 35 +-
include/linux/hyperv.h | 2 +
include/linux/iio/imu/adis.h | 63 +-
include/linux/libata.h | 79 +-
include/linux/netdevice.h | 58 +-
include/linux/overflow.h | 110 +-
include/linux/proc_fs.h | 2 +
include/linux/skmsg.h | 1 +
include/linux/soc/qcom/apr.h | 12 +-
include/linux/timerqueue.h | 2 +-
include/linux/usb/typec.h | 3 +
include/media/dvbdev.h | 32 +-
include/net/dst.h | 5 +-
include/net/mrp.h | 1 +
include/net/sock_reuseport.h | 2 +
include/net/tcp.h | 4 +-
include/sound/hdaudio.h | 2 +
include/sound/hdaudio_ext.h | 1 -
include/sound/pcm.h | 36 +-
include/trace/events/ib_mad.h | 13 +-
include/uapi/drm/drm_fourcc.h | 11 +
include/uapi/linux/idxd.h | 2 +-
include/uapi/linux/swab.h | 2 +-
include/uapi/sound/asequencer.h | 8 +-
kernel/Makefile | 2 +-
kernel/acct.c | 2 +
kernel/bpf/btf.c | 5 +
kernel/bpf/verifier.c | 127 +-
kernel/cpu.c | 60 +-
kernel/events/core.c | 8 +-
kernel/fork.c | 17 +-
kernel/futex/Makefile | 3 +
kernel/{futex.c => futex/core.c} | 28 +-
kernel/gcov/gcc_4_7.c | 5 +
kernel/irq/internals.h | 2 +
kernel/irq/irqdesc.c | 15 +-
kernel/padata.c | 15 +-
kernel/power/snapshot.c | 4 +-
kernel/rcu/tree.c | 2 +-
kernel/relay.c | 4 +-
kernel/sched/cpudeadline.c | 2 +-
kernel/sched/deadline.c | 4 +-
kernel/sched/fair.c | 190 +-
kernel/sched/rt.c | 4 +-
kernel/sched/sched.h | 14 +
kernel/trace/blktrace.c | 3 +-
kernel/trace/trace_events_hist.c | 2 +-
lib/debugobjects.c | 10 +
lib/fonts/fonts.c | 4 +-
lib/notifier-error-inject.c | 2 +-
lib/test_firmware.c | 1 +
lib/test_overflow.c | 98 +
net/802/mrp.c | 18 +-
net/9p/client.c | 5 +
net/bluetooth/hci_core.c | 2 +-
net/bluetooth/mgmt.c | 2 +-
net/bluetooth/rfcomm/core.c | 2 +-
net/bpf/test_run.c | 3 -
net/core/dev.c | 14 +-
net/core/filter.c | 11 +-
net/core/skbuff.c | 3 +
net/core/skmsg.c | 9 +-
net/core/sock.c | 2 +-
net/core/sock_map.c | 2 +
net/core/sock_reuseport.c | 94 +-
net/core/stream.c | 6 +
net/dsa/tag_8021q.c | 11 +-
net/ethtool/ioctl.c | 3 +-
net/hsr/hsr_device.c | 22 +-
net/hsr/hsr_forward.c | 7 +-
net/hsr/hsr_framereg.c | 25 +-
net/hsr/hsr_framereg.h | 3 +
net/ipv4/inet_connection_sock.c | 12 +-
net/ipv4/tcp_bpf.c | 19 +-
net/ipv4/udp_tunnel_core.c | 1 +
net/ipv6/sit.c | 22 +-
net/mac80211/iface.c | 1 +
net/netfilter/nf_conntrack_proto_icmpv6.c | 53 +
net/netfilter/nf_flow_table_offload.c | 6 +-
net/openvswitch/datapath.c | 25 +-
net/rxrpc/output.c | 2 +-
net/rxrpc/sendmsg.c | 2 +-
net/sched/ematch.c | 2 +
net/sctp/sysctl.c | 73 +-
net/sunrpc/clnt.c | 2 +-
net/sunrpc/xprtrdma/verbs.c | 2 +-
net/tls/tls_sw.c | 6 +-
net/unix/af_unix.c | 12 +-
net/vmw_vsock/vmci_transport.c | 6 +-
net/wireless/reg.c | 4 +-
samples/vfio-mdev/mdpy-fb.c | 8 +-
security/Kconfig.hardening | 3 +
security/apparmor/apparmorfs.c | 4 +-
security/apparmor/lsm.c | 4 +-
security/apparmor/policy.c | 2 +-
security/apparmor/policy_ns.c | 2 +-
security/apparmor/policy_unpack.c | 2 +-
security/integrity/digsig.c | 6 +-
security/integrity/ima/ima_policy.c | 51 +-
security/integrity/ima/ima_template.c | 4 +-
security/loadpin/loadpin.c | 30 +-
sound/core/pcm_native.c | 4 +-
sound/drivers/mts64.c | 3 +
sound/hda/ext/hdac_ext_stream.c | 17 -
sound/hda/hdac_stream.c | 27 +
sound/pci/asihpi/hpioctl.c | 2 +-
sound/pci/hda/hda_controller.c | 4 +-
sound/pci/hda/patch_hdmi.c | 1 +
sound/pci/hda/patch_realtek.c | 27 +
sound/soc/codecs/pcm512x.c | 8 +-
sound/soc/codecs/rt298.c | 7 +
sound/soc/codecs/rt5670.c | 2 -
sound/soc/codecs/wm8994.c | 5 +
sound/soc/generic/audio-graph-card.c | 4 +-
sound/soc/intel/skylake/skl.c | 7 +-
sound/soc/mediatek/common/mtk-btcvsd.c | 6 +-
sound/soc/mediatek/mt8173/mt8173-afe-pcm.c | 71 +-
sound/soc/mediatek/mt8173/mt8173-rt5650-rt5514.c | 7 +-
.../mt8183/mt8183-mt6358-ts3a227-max98357.c | 14 +-
sound/soc/pxa/mmp-pcm.c | 2 +-
sound/soc/qcom/lpass-sc7180.c | 3 +
sound/soc/rockchip/rockchip_pdm.c | 1 +
sound/soc/rockchip/rockchip_spdif.c | 1 +
sound/usb/quirks-table.h | 2 +
tools/include/linux/kernel.h | 6 +
tools/lib/bpf/bpf.h | 7 +
tools/lib/bpf/btf.c | 8 +-
tools/lib/bpf/btf_dump.c | 31 +-
tools/lib/bpf/libbpf.c | 3 +
tools/objtool/check.c | 10 +
tools/perf/builtin-stat.c | 46 +-
tools/perf/builtin-trace.c | 32 +-
tools/perf/util/debug.c | 4 +
tools/perf/util/symbol-elf.c | 2 +-
tools/testing/selftests/bpf/config | 4 +
tools/testing/selftests/bpf/prog_tests/bpf_nf.c | 48 +
tools/testing/selftests/bpf/progs/test_bpf_nf.c | 109 +
.../selftests/drivers/net/netdevsim/devlink.sh | 4 +-
tools/testing/selftests/efivarfs/efivarfs.sh | 5 +
.../ftrace/test.d/ftrace/func_event_triggers.tc | 15 +-
.../kvm/memslot_modification_stress_test.c | 2 +-
.../selftests/netfilter/conntrack_icmp_related.sh | 36 +-
.../selftests/powerpc/dscr/dscr_sysfs_test.c | 5 +-
tools/testing/selftests/proc/proc-uptime-002.c | 3 +-
727 files changed, 39668 insertions(+), 3853 deletions(-)Greg Kroah-Hartman
maintainerPATCH 1/731 drm/amd/display: Manually adjust strobe for DCN303
From: Martin Leung <[email protected]>
commit a9a1ac44074ff8cab7d519277f93341e14557f83 upstream.
why:
DCN303's 4 channel SOC BB causes problems at strobe
how:
workaround to manually adjust strobe calculation using FCLK restrict.
--- drivers/gpu/drm/amd/display/dc/dcn303/dcn303_resource.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
drivers/gpu/drm/amd/display/dc/dcn303/dcn303_resource.c +14 -0
@@ -1344,6 +1344,20 @@ void dcn303_update_bw_bounding_box(struc dcn3_03_soc.clock_limits[i].phyclk_d18_mhz = dcn3_03_soc.clock_limits[0 ].phyclk_d18_mhz; dcn3_03_soc.clock_limits[i].dscclk_mhz = dcn3_03_soc.clock_limits[0 ].dscclk_mhz; } + +// WA: patch strobe modes to compensate for DCN303 BW issue +if (dcn3_03_soc.num_chans <=4 ) { +for (i =0 ; i < dcn3_03_soc.num_states; i++) { +if (dcn3_03_soc.clock_limits[i].dram_speed_mts >1700 ) +break ; + +if (dcn3_03_soc.clock_limits[i].dram_speed_mts >=1500 ) { + dcn3_03_soc.clock_limits[i].dcfclk_mhz =100 ; + dcn3_03_soc.clock_limits[i].fabricclk_mhz =100 ; + } + } + } +/* re-init DML with updated bb */ dml_init_instance (&dc->dml, &dcn3_03_soc, &dcn3_03_ip,DML_PROJECT_DCN30 );if (dc->current_state)
Greg Kroah-Hartman
maintainerPATCH 2/731 usb: musb: remove extra check in musb_gadget_vbus_draw
In reply to Greg Kroah-HartmanFrom: Ivaylo Dimitrov <[email protected]>
[ Upstream commit ecec4b20d29c3d6922dafe7d2555254a454272d2 ]
The checks for musb->xceiv and musb->xceiv->set_power duplicate those in usb_phy_set_power(), so there is no need of them. Moreover, not calling usb_phy_set_power() results in usb_phy_set_charger_current() not being called, so current USB config max current is not propagated through USB charger framework and charger drivers may try to draw more current than allowed or possible.
Fix that by removing those extra checks and calling usb_phy_set_power() directly.
Tested on Motorola Droid4 and Nokia N900
--- drivers/usb/musb/musb_gadget.c | 2 -- 1 file changed, 2 deletions(-)
drivers/usb/musb/musb_gadget.c +0 -2
@@ -1628,8 +1628,6 @@ static int musb_gadget_vbus_draw(struct usb_gadget *gadget, unsigned mA) {struct musb *musb =gadget_to_musb (gadget); -if (!musb->xceiv->set_power) -return -EOPNOTSUPP ;return usb_phy_set_power (musb->xceiv, mA); }
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 3/731 arm64: dts: qcom: ipq6018-cp01-c1: use BLSPI1 pins
In reply to Greg Kroah-HartmanFrom: Krzysztof Kozlowski <[email protected]>
[ Upstream commit 4871d3c38893c8a585e3e96364b7fb91cda8322e ]
When BLSPI1 (originally SPI0, later renamed in commit f82c48d46852 ("arm64: dts: qcom: ipq6018: correct QUP peripheral labels")) was added, the device node lacked respective pin configuration assignment.
--- arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dts | 2 ++ 1 file changed, 2 insertions(+)
arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dts +2 -0
@@ -37,6 +37,8 @@ &i2c_1 { &spi_0 { cs-select = <0>; + pinctrl-0 = <&spi_0_pins>; + pinctrl-names = "default"; status = "okay"; m25p80@0 {
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 4/731 arm64: dts: qcom: sm8250-sony-xperia-edo: fix touchscreen bias-disable
In reply to Greg Kroah-HartmanFrom: Krzysztof Kozlowski <[email protected]>
[ Upstream commit 7ff4a646fae3697b039c6b684786a1e309e8445c ]
The property to disable bias is "bias-disable".
--- arch/arm64/boot/dts/qcom/sm8250-sony-xperia-edo.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/qcom/sm8250-sony-xperia-edo.dtsi +1 -1
@@ -591,7 +591,7 @@ ts_int_default: ts-int-default { pins = "gpio39"; function = "gpio"; drive-strength = <2>; - bias-disabled; + bias-disable; input-enable; };
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 5/731 arm64: dts: qcom: msm8996: Add MSM8996 Pro support
In reply to Greg Kroah-HartmanFrom: Yassine Oudjana <[email protected]>
[ Upstream commit 8898c9748a872866f8c2973e719b26bf7c6ab64e ]
Qualcomm MSM8996 Pro is a variant of MSM8996 with higher frequencies supported both on CPU and GPU. There are other minor hardware differencies in the CPU and GPU regulators and bus fabrics.
However this results in significant differences between 8996 and 8996 Pro CPU OPP tables. Judging from msm-3.18 there are only few common frequencies supported by both msm8996 and msm8996pro. Rather than hacking the tables for msm8996, split msm8996pro support into a separate file. Later this would allow having additional customizations for the CBF, CPR, retulators, etc.
[DB: dropped all non-CPU-OPP changes]
--- arch/arm64/boot/dts/qcom/msm8996.dtsi | 82 +++---- arch/arm64/boot/dts/qcom/msm8996pro.dtsi | 266 +++++++++++++++++++++++ 2 files changed, 307 insertions(+), 41 deletions(-) create mode 100644 arch/arm64/boot/dts/qcom/msm8996pro.dtsi
arch/arm64/boot/dts/qcom/msm8996.dtsi +41 -41
@@ -142,82 +142,82 @@ cluster0_opp: opp_table0 { /* Nominal fmax for now */ opp-307200000 { opp-hz = /bits/ 64 <307200000>; - opp-supported-hw = <0x77>; + opp-supported-hw = <0x7>; clock-latency-ns = <200000>; }; opp-422400000 { opp-hz = /bits/ 64 <422400000>; - opp-supported-hw = <0x77>; + opp-supported-hw = <0x7>; clock-latency-ns = <200000>; }; opp-480000000 { opp-hz = /bits/ 64 <480000000>; - opp-supported-hw = <0x77>; + opp-supported-hw = <0x7>; clock-latency-ns = <200000>; }; opp-556800000 { opp-hz = /bits/ 64 <556800000>; - opp-supported-hw = <0x77>; + opp-supported-hw = <0x7>; clock-latency-ns = <200000>; }; opp-652800000 { opp-hz = /bits/ 64 <652800000>; - opp-supported-hw = <0x77>; + opp-supported-hw = <0x7>; clock-latency-ns = <200000>; }; opp-729600000 { opp-hz = /bits/ 64 <729600000>; - opp-supported-hw = <0x77>; + opp-supported-hw = <0x7>; clock-latency-ns = <200000>; }; opp-844800000 { opp-hz = /bits/ 64 <844800000>; - opp-supported-hw = <0x77>; + opp-supported-hw = <0x7>; clock-latency-ns = <200000>; }; opp-960000000 { opp-hz = /bits/ 64 <960000000>; - opp-supported-hw = <0x77>; + opp-supported-hw = <0x7>; clock-latency-ns = <200000>; }; opp-1036800000 { opp-hz = /bits/ 64 <1036800000>; - opp-supported-hw = <0x77>; + opp-supported-hw = <0x7>; clock-latency-ns = <200000>; }; opp-1113600000 { opp-hz = /bits/ 64 <1113600000>; - opp-supported-hw = <0x77>; + opp-supported-hw = <0x7>; clock-latency-ns = <200000>; }; opp-1190400000 { opp-hz = /bits/ 64 <1190400000>; - opp-supported-hw = <0x77>; + opp-supported-hw = <0x7>; clock-latency-ns = <200000>; }; opp-1228800000 { opp-hz = /bits/ 64 <1228800000>; - opp-supported-hw = <0x77>; + opp-supported-hw = <0x7>; clock-latency-ns = <200000>; }; opp-1324800000 { opp-hz = /bits/ 64 <1324800000>; - opp-supported-hw = <0x77>; + opp-supported-hw = <0x7>; clock-latency-ns = <200000>; }; opp-1401600000 { opp-hz = /bits/ 64 <1401600000>; - opp-supported-hw = <0x77>; + opp-supported-hw = <0x7>; clock-latency-ns = <200000>; }; opp-1478400000 { opp-hz = /bits/ 64 <1478400000>; - opp-supported-hw = <0x77>; + opp-supported-hw = <0x7>; clock-latency-ns = <200000>; }; opp-1593600000 { opp-hz = /bits/ 64 <1593600000>; - opp-supported-hw = <0x77>; + opp-supported-hw = <0x7>; clock-latency-ns = <200000>; }; };
@@ -230,127 +230,127 @@ cluster1_opp: opp_table1 { /* Nominal fmax for now */ opp-307200000 { opp-hz = /bits/ 64 <307200000>; - opp-supported-hw = <0x77>; + opp-supported-hw = <0x7>; clock-latency-ns = <200000>; }; opp-403200000 { opp-hz = /bits/ 64 <403200000>; - opp-supported-hw = <0x77>; + opp-supported-hw = <0x7>; clock-latency-ns = <200000>; }; opp-480000000 { opp-hz = /bits/ 64 <480000000>; - opp-supported-hw = <0x77>; + opp-supported-hw = <0x7>; clock-latency-ns = <200000>; }; opp-556800000 { opp-hz = /bits/ 64 <556800000>; - opp-supported-hw = <0x77>; + opp-supported-hw = <0x7>; clock-latency-ns = <200000>; }; opp-652800000 { opp-hz = /bits/ 64 <652800000>; - opp-supported-hw = <0x77>; + opp-supported-hw = <0x7>; clock-latency-ns = <200000>; }; opp-729600000 { opp-hz = /bits/ 64 <729600000>; - opp-supported-hw = <0x77>; + opp-supported-hw = <0x7>; clock-latency-ns = <200000>; }; opp-806400000 { opp-hz = /bits/ 64 <806400000>; - opp-supported-hw = <0x77>; + opp-supported-hw = <0x7>; clock-latency-ns = <200000>; }; opp-883200000 { opp-hz = /bits/ 64 <883200000>; - opp-supported-hw = <0x77>; + opp-supported-hw = <0x7>; clock-latency-ns = <200000>; }; opp-940800000 { opp-hz = /bits/ 64 <940800000>; - opp-supported-hw = <0x77>; + opp-supported-hw = <0x7>; clock-latency-ns = <200000>; }; opp-1036800000 { opp-hz = /bits/ 64 <1036800000>; - opp-supported-hw = <0x77>; + opp-supported-hw = <0x7>; clock-latency-ns = <200000>; }; opp-1113600000 { opp-hz = /bits/ 64 <1113600000>; - opp-supported-hw = <0x77>; + opp-supported-hw = <0x7>; clock-latency-ns = <200000>; }; opp-1190400000 { opp-hz = /bits/ 64 <1190400000>; - opp-supported-hw = <0x77>; + opp-supported-hw = <0x7>; clock-latency-ns = <200000>; }; opp-1248000000 { opp-hz = /bits/ 64 <1248000000>; - opp-supported-hw = <0x77>; + opp-supported-hw = <0x7>; clock-latency-ns = <200000>; }; opp-1324800000 { opp-hz = /bits/ 64 <1324800000>; - opp-supported-hw = <0x77>; + opp-supported-hw = <0x7>; clock-latency-ns = <200000>; }; opp-1401600000 { opp-hz = /bits/ 64 <1401600000>; - opp-supported-hw = <0x77>; + opp-supported-hw = <0x7>; clock-latency-ns = <200000>; }; opp-1478400000 { opp-hz = /bits/ 64 <1478400000>; - opp-supported-hw = <0x77>; + opp-supported-hw = <0x7>; clock-latency-ns = <200000>; }; opp-1555200000 { opp-hz = /bits/ 64 <1555200000>; - opp-supported-hw = <0x77>; + opp-supported-hw = <0x7>; clock-latency-ns = <200000>; }; opp-1632000000 { opp-hz = /bits/ 64 <1632000000>; - opp-supported-hw = <0x77>; + opp-supported-hw = <0x7>; clock-latency-ns = <200000>; }; opp-1708800000 { opp-hz = /bits/ 64 <1708800000>; - opp-supported-hw = <0x77>; + opp-supported-hw = <0x7>; clock-latency-ns = <200000>; }; opp-1785600000 { opp-hz = /bits/ 64 <1785600000>; - opp-supported-hw = <0x77>; + opp-supported-hw = <0x7>; clock-latency-ns = <200000>; }; opp-1824000000 { opp-hz = /bits/ 64 <1824000000>; - opp-supported-hw = <0x77>; + opp-supported-hw = <0x7>; clock-latency-ns = <200000>; }; opp-1920000000 { opp-hz = /bits/ 64 <1920000000>; - opp-supported-hw = <0x77>; + opp-supported-hw = <0x7>; clock-latency-ns = <200000>; }; opp-1996800000 { opp-hz = /bits/ 64 <1996800000>; - opp-supported-hw = <0x77>; + opp-supported-hw = <0x7>; clock-latency-ns = <200000>; }; opp-2073600000 { opp-hz = /bits/ 64 <2073600000>; - opp-supported-hw = <0x77>; + opp-supported-hw = <0x7>; clock-latency-ns = <200000>; }; opp-2150400000 { opp-hz = /bits/ 64 <2150400000>; - opp-supported-hw = <0x77>; + opp-supported-hw = <0x7>; clock-latency-ns = <200000>; }; };
arch/arm64/boot/dts/qcom/msm8996pro.dtsi new file +266 -0
266 lines not on this page · raw message
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 6/731 arm64: dts: qcom: msm8996: fix supported-hw in cpufreq OPP tables
In reply to Greg Kroah-HartmanFrom: Dmitry Baryshkov <[email protected]>
[ Upstream commit 0154caaa2b748e7414a4ec3c6ee60e8f483b2d4f ]
Adjust MSM8996 cpufreq tables according to tables in msm-3.18. Some of the frequencies are not supported on speed bins other than 0. Also other speed bins support intermediate topmost frequencies, not supported on speed bin 0. Implement all these differencies.
--- arch/arm64/boot/dts/qcom/msm8996.dtsi | 38 ++++++++++++++++++++------- 1 file changed, 29 insertions(+), 9 deletions(-)
arch/arm64/boot/dts/qcom/msm8996.dtsi +29 -9
@@ -202,22 +202,32 @@ opp-1228800000 { }; opp-1324800000 { opp-hz = /bits/ 64 <1324800000>; - opp-supported-hw = <0x7>; + opp-supported-hw = <0x5>; + clock-latency-ns = <200000>; + }; + opp-1363200000 { + opp-hz = /bits/ 64 <1363200000>; + opp-supported-hw = <0x2>; clock-latency-ns = <200000>; }; opp-1401600000 { opp-hz = /bits/ 64 <1401600000>; - opp-supported-hw = <0x7>; + opp-supported-hw = <0x5>; clock-latency-ns = <200000>; }; opp-1478400000 { opp-hz = /bits/ 64 <1478400000>; - opp-supported-hw = <0x7>; + opp-supported-hw = <0x1>; + clock-latency-ns = <200000>; + }; + opp-1497600000 { + opp-hz = /bits/ 64 <1497600000>; + opp-supported-hw = <0x04>; clock-latency-ns = <200000>; }; opp-1593600000 { opp-hz = /bits/ 64 <1593600000>; - opp-supported-hw = <0x7>; + opp-supported-hw = <0x1>; clock-latency-ns = <200000>; }; };
@@ -328,29 +338,39 @@ opp-1785600000 { opp-supported-hw = <0x7>; clock-latency-ns = <200000>; }; + opp-1804800000 { + opp-hz = /bits/ 64 <1804800000>; + opp-supported-hw = <0x6>; + clock-latency-ns = <200000>; + }; opp-1824000000 { opp-hz = /bits/ 64 <1824000000>; - opp-supported-hw = <0x7>; + opp-supported-hw = <0x1>; + clock-latency-ns = <200000>; + }; + opp-1900800000 { + opp-hz = /bits/ 64 <1900800000>; + opp-supported-hw = <0x4>; clock-latency-ns = <200000>; }; opp-1920000000 { opp-hz = /bits/ 64 <1920000000>; - opp-supported-hw = <0x7>; + opp-supported-hw = <0x1>; clock-latency-ns = <200000>; }; opp-1996800000 { opp-hz = /bits/ 64 <1996800000>; - opp-supported-hw = <0x7>; + opp-supported-hw = <0x1>; clock-latency-ns = <200000>; }; opp-2073600000 { opp-hz = /bits/ 64 <2073600000>; - opp-supported-hw = <0x7>; + opp-supported-hw = <0x1>; clock-latency-ns = <200000>; }; opp-2150400000 { opp-hz = /bits/ 64 <2150400000>; - opp-supported-hw = <0x7>; + opp-supported-hw = <0x1>; clock-latency-ns = <200000>; }; };
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 7/731 arm64: dts: qcom: msm8996: fix GPU OPP table
In reply to Greg Kroah-HartmanFrom: Dmitry Baryshkov <[email protected]>
[ Upstream commit 0d440d811e6e2f37093e54db55bc27fe66678170 ]
Fix Adreno OPP table according to the msm-3.18. Enable 624 MHz for the speed bin 3 and 560 MHz for bins 2 and 3.
--- arch/arm64/boot/dts/qcom/msm8996.dtsi | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
arch/arm64/boot/dts/qcom/msm8996.dtsi +5 -5
@@ -995,17 +995,17 @@ gpu_opp_table: opp-table { compatible ="operating-points-v2"; /* - * 624Mhz and 560Mhz are only available on speed - * bin (1 << 0). All the rest are available on - * all bins of the hardware + * 624Mhz is only available on speed bins 0 and 3. + * 560Mhz is only available on speed bins 0, 2 and 3. + * All the rest are available on all bins of the hardware. */ opp-624000000 { opp-hz = /bits/ 64 <624000000>; - opp-supported-hw = <0x01>; + opp-supported-hw = <0x09>; }; opp-560000000 { opp-hz = /bits/ 64 <560000000>; - opp-supported-hw = <0x01>; + opp-supported-hw = <0x0d>; }; opp-510000000 { opp-hz = /bits/ 64 <510000000>;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 8/731 ARM: dts: qcom: apq8064: fix coresight compatible
In reply to Greg Kroah-HartmanFrom: Luca Weiss <[email protected]>
[ Upstream commit a42b1ee868361f1cb0492f1bdaefb43e0751e468 ]
There's a typo missing the arm, prefix of arm,coresight-etb10. Fix it to make devicetree validation happier.
--- arch/arm/boot/dts/qcom-apq8064.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/qcom-apq8064.dtsi +1 -1
@@ -1571,7 +1571,7 @@ wifi { }; etb@1a01000 { - compatible = "coresight-etb10", "arm,primecell"; + compatible = "arm,coresight-etb10", "arm,primecell"; reg = <0x1a01000 0x1000>; clocks = <&rpmcc RPM_QDSS_CLK>;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 9/731 arm64: dts: qcom: sdm630: fix UART1 pin bias
In reply to Greg Kroah-HartmanFrom: Krzysztof Kozlowski <[email protected]>
[ Upstream commit 780f836fe071a9e8703fe6a05ae00129acf83391 ]
There is no "bias-no-pull" property. Assume intentions were disabling bias.
--- arch/arm64/boot/dts/qcom/sdm630.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/qcom/sdm630.dtsi +1 -1
@@ -768,7 +768,7 @@ rx-cts-rts { pins = "gpio17", "gpio18", "gpio19"; function = "gpio"; drive-strength = <2>; - bias-no-pull; + bias-disable; }; };
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 10/731 arm64: dts: qcom: sdm845-cheza: fix AP suspend pin bias
In reply to Greg Kroah-HartmanFrom: Krzysztof Kozlowski <[email protected]>
[ Upstream commit 9bce41fab14da8f21027dc9847535ef5e22cbe8b ]
There is no "bias-no-pull" property. Assume intentions were disabling bias.
--- arch/arm64/boot/dts/qcom/sdm845-cheza.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/qcom/sdm845-cheza.dtsi +2 -2
@@ -1299,7 +1299,7 @@ ap_suspend_l_assert: ap_suspend_l_assert { config { pins = "gpio126"; function = "gpio"; - bias-no-pull; + bias-disable; drive-strength = <2>; output-low; };
@@ -1309,7 +1309,7 @@ ap_suspend_l_deassert: ap_suspend_l_deassert { config { pins = "gpio126"; function = "gpio"; - bias-no-pull; + bias-disable; drive-strength = <2>; output-high; };
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 11/731 arm64: dts: qcom: msm8916: Drop MSS fallback compatible
In reply to Greg Kroah-HartmanFrom: Stephan Gerhold <[email protected]>
[ Upstream commit ff02ac621634e82c0c34d02a79d402ae700cdfd0 ]
MSM8916 was originally using the "qcom,q6v5-pil" compatible for the MSS remoteproc. Later it was decided to use SoC-specific compatibles instead, so "qcom,msm8916-mss-pil" is now the preferred compatible.
Commit 60a05ed059a0 ("arm64: dts: qcom: msm8916: Add MSM8916-specific compatibles to SCM/MSS") updated the MSM8916 device tree to make use of the new compatible but still kept the old "qcom,q6v5-pil" as fallback.
This is inconsistent with other SoCs and conflicts with the description in the binding documentation (which says that only one compatible should be present). Also, it has no functional advantage since older kernels could not handle this DT anyway (e.g. "power-domains" in the MSS node is only supported by kernels that also support "qcom,msm8916-mss-pil").
Make this consistent with other SoCs by using only the "qcom,msm8916-mss-pil" compatible.
--- arch/arm64/boot/dts/qcom/msm8916.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/qcom/msm8916.dtsi +1 -1
@@ -1307,7 +1307,7 @@ spmi_bus: spmi@200f000 { }; mpss: remoteproc@4080000 { - compatible = "qcom,msm8916-mss-pil", "qcom,q6v5-pil"; + compatible = "qcom,msm8916-mss-pil"; reg = <0x04080000 0x100>, <0x04020000 0x040>;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 12/731 objtool, kcsan: Add volatile read/write instrumentation to whitelist
In reply to Greg Kroah-HartmanFrom: Marco Elver <[email protected]>
[ Upstream commit 63646fcba5bb4b59a19031c21913f94e46a3d0d4 ]
Adds KCSAN's volatile instrumentation to objtool's uaccess whitelist.
Recent kernel change have shown that this was missing from the uaccess whitelist (since the first upstreamed version of KCSAN):
mm/gup.o: warning: objtool: fault_in_readable+0x101: call to __tsan_volatile_write1() with UACCESS enabled
--- tools/objtool/check.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
tools/objtool/check.c +10 -0
@@ -846,6 +846,16 @@ static const char *uaccess_safe_builtin[] = {"__tsan_read_write4" ,"__tsan_read_write8" ,"__tsan_read_write16" , +"__tsan_volatile_read1" , +"__tsan_volatile_read2" , +"__tsan_volatile_read4" , +"__tsan_volatile_read8" , +"__tsan_volatile_read16" , +"__tsan_volatile_write1" , +"__tsan_volatile_write2" , +"__tsan_volatile_write4" , +"__tsan_volatile_write8" , +"__tsan_volatile_write16" ,"__tsan_atomic8_load" ,"__tsan_atomic16_load" , "__tsan_atomic32_load",
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 13/731 ARM: dts: stm32: Drop stm32mp15xc.dtsi from Avenger96
In reply to Greg Kroah-HartmanFrom: Marek Vasut <[email protected]>
[ Upstream commit 3b835f1b8acef53c8882b25f40f48d7f5982c938 ]
The Avenger96 is populated with STM32MP157A DHCOR SoM, drop the stm32mp15xc.dtsi which should only be included in DTs of devices which are populated with STM32MP15xC/F SoC as the stm32mp15xc.dtsi enables CRYP block not present in the STM32MP15xA/D SoC .
--- arch/arm/boot/dts/stm32mp157a-dhcor-avenger96.dts | 1 - 1 file changed, 1 deletion(-)
arch/arm/boot/dts/stm32mp157a-dhcor-avenger96.dts +0 -1
@@ -13,7 +13,6 @@ /dts-v1/; #include "stm32mp157.dtsi" -#include "stm32mp15xc.dtsi" #include "stm32mp15xx-dhcor-som.dtsi" #include "stm32mp15xx-dhcor-avenger96.dtsi"
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 14/731 ARM: dts: stm32: Fix AV96 WLAN regulator gpio property
In reply to Greg Kroah-HartmanFrom: Marek Vasut <[email protected]>
[ Upstream commit d5d577e3d50713ad11d98dbdaa48bb494346c26d ]
The WLAN regulator uses 'gpios' property instead of 'gpio' to specify regulator enable GPIO. While the former is also currently handled by the Linux kernel regulator-fixed driver, the later is the correct one per DT bindings. Update the DT to use the later.
--- arch/arm/boot/dts/stm32mp15xx-dhcor-avenger96.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/stm32mp15xx-dhcor-avenger96.dtsi +1 -1
@@ -100,7 +100,7 @@ wlan_pwr: regulator-wlan { regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; - gpios = <&gpioz 3 GPIO_ACTIVE_HIGH>; + gpio = <&gpioz 3 GPIO_ACTIVE_HIGH>; enable-active-high; }; };
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 15/731 drivers: soc: ti: knav_qmss_queue: Mark knav_acc_firmwares as static
In reply to Greg Kroah-HartmanFrom: Chen Jiahao <[email protected]>
[ Upstream commit adf85adc2a7199b41e7a4da083bd17274a3d6969 ]
There is a sparse warning shown below:
drivers/soc/ti/knav_qmss_queue.c:70:12: warning: symbol 'knav_acc_firmwares' was not declared. Should it be static?
Since 'knav_acc_firmwares' is only called within knav_qmss_queue.c, mark it as static to fix the warning.
--- drivers/soc/ti/knav_qmss_queue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/soc/ti/knav_qmss_queue.c +1 -1
@@ -67,7 +67,7 @@ static DEFINE_MUTEX(knav_dev_lock);* Newest followed by older ones. Search is done from start of the array * until a firmware file is found. */ -const char *knav_acc_firmwares[] = {"ks2_qmss_pdsp_acc48.bin" }; +static const char *const knav_acc_firmwares[] = {"ks2_qmss_pdsp_acc48.bin" };static bool device_ready;bool knav_qmss_device_ready (void )
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 16/731 arm64: dts: qcom: pm660: Use unique ADC5_VCOIN address in node name
In reply to Greg Kroah-HartmanFrom: Marijn Suijten <[email protected]>
[ Upstream commit 02549ba5de0a09a27616496c3512db5af4ad7862 ]
The register address in the node name is shadowing vph_pwr@83, whereas the ADC5_VCOIN register resolves to 0x85. Fix this copy-paste discrepancy.
--- arch/arm64/boot/dts/qcom/pm660.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/qcom/pm660.dtsi +1 -1
@@ -152,7 +152,7 @@ vadc_vph_pwr: vph_pwr@83 { qcom,pre-scaling = <1 3>; }; - vcoin: vcoin@83 { + vcoin: vcoin@85 { reg = <ADC5_VCOIN>; qcom,decimation = <1024>; qcom,pre-scaling = <1 3>;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 17/731 arm64: dts: qcom: sm8250: correct LPASS pin pull down
In reply to Greg Kroah-HartmanFrom: Krzysztof Kozlowski <[email protected]>
[ Upstream commit 195a0a11d66d6c696cbcf398d6bc3f3a3a462f7c ]
The pull-down property is actually bias-pull-down.
--- arch/arm64/boot/dts/qcom/sm8250.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/qcom/sm8250.dtsi +1 -1
@@ -1933,7 +1933,7 @@ data { pins = "gpio7"; function = "dmic1_data"; drive-strength = <2>; - pull-down; + bias-pull-down; input-enable; }; };
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 18/731 soc: qcom: llcc: make irq truly optional
In reply to Greg Kroah-HartmanFrom: Luca Weiss <[email protected]>
[ Upstream commit c882c899ead3545102a4d71b5fbe73b9e4bc2657 ]
The function platform_get_irq prints an error message into the kernel log when the irq isn't found.
Since the interrupt is actually optional and not provided by some SoCs, use platform_get_irq_optional which does not print an error message.
--- drivers/soc/qcom/llcc-qcom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/soc/qcom/llcc-qcom.c +1 -1
@@ -607,7 +607,7 @@ static int qcom_llcc_probe(struct platform_device *pdev)if (ret) goto err; - drv_data->ecc_irq =platform_get_irq (pdev,0 ); + drv_data->ecc_irq =platform_get_irq_optional (pdev,0 );if (drv_data->ecc_irq >=0 ) { llcc_edac = platform_device_register_data(&pdev->dev, "qcom_llcc_edac", -1, drv_data,
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 19/731 arm64: dts: qcom: Correct QMP PHY child node name
In reply to Greg Kroah-HartmanFrom: Shawn Guo <[email protected]>
[ Upstream commit 1351512f29b4348e6b497f6343896c1033d409b4 ]
Many child nodes of QMP PHY are named without following bindings schema and causing dtbs_check warnings like below.
phy@1c06000: 'lane@1c06800' does not match any of the regexes: '^phy@[0-9a-f]+$'
arch/arm64/boot/dts/qcom/msm8998-asus-novago-tp370ql.dt.yaml
arch/arm64/boot/dts/qcom/msm8998-hp-envy-x2.dt.yaml
arch/arm64/boot/dts/qcom/msm8998-lenovo-miix-630.dt.yaml
arch/arm64/boot/dts/qcom/msm8998-mtp.dt.yaml
arch/arm64/boot/dts/qcom/msm8998-oneplus-cheeseburger.dt.yaml
arch/arm64/boot/dts/qcom/msm8998-oneplus-dumpling.dt.yamlCorrect them to fix the warnings.
Stable-dep-of: 36a31b3a8d9b ("arm64: dts: qcom: sm8150: fix UFS PHY registers")
--- arch/arm64/boot/dts/qcom/ipq6018.dtsi | 2 +- arch/arm64/boot/dts/qcom/ipq8074.dtsi | 4 ++-- arch/arm64/boot/dts/qcom/msm8996.dtsi | 10 +++++----- arch/arm64/boot/dts/qcom/msm8998.dtsi | 6 +++--- arch/arm64/boot/dts/qcom/sdm845.dtsi | 10 +++++----- arch/arm64/boot/dts/qcom/sm8150.dtsi | 6 +++--- arch/arm64/boot/dts/qcom/sm8250.dtsi | 10 +++++----- arch/arm64/boot/dts/qcom/sm8350.dtsi | 2 +- 8 files changed, 25 insertions(+), 25 deletions(-)
arch/arm64/boot/dts/qcom/ipq6018.dtsi +1 -1
@@ -401,7 +401,7 @@ pcie_phy: phy@84000 { reset-names = "phy", "common"; - pcie_phy0: lane@84200 { + pcie_phy0: phy@84200 { reg = <0x0 0x84200 0x0 0x16c>, /* Serdes Tx */ <0x0 0x84400 0x0 0x200>, /* Serdes Rx */ <0x0 0x84800 0x0 0x4f4>; /* PCS: Lane0, COM, PCIE */
arch/arm64/boot/dts/qcom/ipq8074.dtsi +2 -2
@@ -106,7 +106,7 @@ ssphy_1: phy@58000 { reset-names = "phy","common"; status = "disabled"; - usb1_ssphy: lane@58200 { + usb1_ssphy: phy@58200 { reg = <0x00058200 0x130>, /* Tx */ <0x00058400 0x200>, /* Rx */ <0x00058800 0x1f8>, /* PCS */
@@ -149,7 +149,7 @@ ssphy_0: phy@78000 { reset-names = "phy","common"; status = "disabled"; - usb0_ssphy: lane@78200 { + usb0_ssphy: phy@78200 { reg = <0x00078200 0x130>, /* Tx */ <0x00078400 0x200>, /* Rx */ <0x00078800 0x1f8>, /* PCS */
arch/arm64/boot/dts/qcom/msm8996.dtsi +5 -5
@@ -618,7 +618,7 @@ pcie_phy: phy@34000 { reset-names = "phy", "common", "cfg"; status = "disabled"; - pciephy_0: lane@35000 { + pciephy_0: phy@35000 { reg = <0x00035000 0x130>, <0x00035200 0x200>, <0x00035400 0x1dc>;
@@ -631,7 +631,7 @@ pciephy_0: lane@35000 { reset-names = "lane0"; }; - pciephy_1: lane@36000 { + pciephy_1: phy@36000 { reg = <0x00036000 0x130>, <0x00036200 0x200>, <0x00036400 0x1dc>;
@@ -644,7 +644,7 @@ pciephy_1: lane@36000 { reset-names = "lane1"; }; - pciephy_2: lane@37000 { + pciephy_2: phy@37000 { reg = <0x00037000 0x130>, <0x00037200 0x200>, <0x00037400 0x1dc>;
@@ -1763,7 +1763,7 @@ ufsphy: phy@627000 { reset-names = "ufsphy"; status = "disabled"; - ufsphy_lane: lanes@627400 { + ufsphy_lane: phy@627400 { reg = <0x627400 0x12c>, <0x627600 0x200>, <0x627c00 0x1b4>;
@@ -2618,7 +2618,7 @@ usb3phy: phy@7410000 { reset-names = "phy", "common"; status = "disabled"; - ssusb_phy_0: lane@7410200 { + ssusb_phy_0: phy@7410200 { reg = <0x07410200 0x200>, <0x07410400 0x130>, <0x07410600 0x1a8>;
arch/arm64/boot/dts/qcom/msm8998.dtsi +3 -3
@@ -994,7 +994,7 @@ pcie_phy: phy@1c06000 { vdda-phy-supply = <&vreg_l1a_0p875>; vdda-pll-supply = <&vreg_l2a_1p2>; - pciephy: lane@1c06800 { + pciephy: phy@1c06800 { reg = <0x01c06200 0x128>, <0x01c06400 0x1fc>, <0x01c06800 0x20c>; #phy-cells = <0>;
@@ -1066,7 +1066,7 @@ ufsphy: phy@1da7000 { reset-names = "ufsphy"; resets = <&ufshc 0>; - ufsphy_lanes: lanes@1da7400 { + ufsphy_lanes: phy@1da7400 { reg = <0x01da7400 0x128>, <0x01da7600 0x1fc>, <0x01da7c00 0x1dc>,
@@ -1999,7 +1999,7 @@ usb3phy: phy@c010000 { <&gcc GCC_USB3PHY_PHY_BCR>; reset-names = "phy", "common"; - usb1_ssphy: lane@c010200 { + usb1_ssphy: phy@c010200 { reg = <0xc010200 0x128>, <0xc010400 0x200>, <0xc010c00 0x20c>,
arch/arm64/boot/dts/qcom/sdm845.dtsi +5 -5
@@ -2064,7 +2064,7 @@ pcie0_phy: phy@1c06000 { status = "disabled"; - pcie0_lane: lanes@1c06200 { + pcie0_lane: phy@1c06200 { reg = <0 0x01c06200 0 0x128>, <0 0x01c06400 0 0x1fc>, <0 0x01c06800 0 0x218>,
@@ -2174,7 +2174,7 @@ pcie1_phy: phy@1c0a000 { status = "disabled"; - pcie1_lane: lanes@1c06200 { + pcie1_lane: phy@1c06200 { reg = <0 0x01c0a800 0 0x800>, <0 0x01c0a800 0 0x800>, <0 0x01c0b800 0 0x400>;
@@ -2302,7 +2302,7 @@ ufs_mem_phy: phy@1d87000 { reset-names = "ufsphy"; status = "disabled"; - ufs_mem_phy_lanes: lanes@1d87400 { + ufs_mem_phy_lanes: phy@1d87400 { reg = <0 0x01d87400 0 0x108>, <0 0x01d87600 0 0x1e0>, <0 0x01d87c00 0 0x1dc>,
@@ -3699,7 +3699,7 @@ usb_1_qmpphy: phy@88e9000 { <&gcc GCC_USB3_PHY_PRIM_BCR>; reset-names = "phy", "common"; - usb_1_ssphy: lanes@88e9200 { + usb_1_ssphy: phy@88e9200 { reg = <0 0x088e9200 0 0x128>, <0 0x088e9400 0 0x200>, <0 0x088e9c00 0 0x218>,
@@ -3732,7 +3732,7 @@ usb_2_qmpphy: phy@88eb000 { <&gcc GCC_USB3_PHY_SEC_BCR>; reset-names = "phy", "common"; - usb_2_ssphy: lane@88eb200 { + usb_2_ssphy: phy@88eb200 { reg = <0 0x088eb200 0 0x128>, <0 0x088eb400 0 0x1fc>, <0 0x088eb800 0 0x218>,
arch/arm64/boot/dts/qcom/sm8150.dtsi +3 -3
@@ -1692,7 +1692,7 @@ ufs_mem_phy: phy@1d87000 { reset-names = "ufsphy"; status = "disabled"; - ufs_mem_phy_lanes: lanes@1d87400 { + ufs_mem_phy_lanes: phy@1d87400 { reg = <0 0x01d87400 0 0x108>, <0 0x01d87600 0 0x1e0>, <0 0x01d87c00 0 0x1dc>,
@@ -3010,7 +3010,7 @@ usb_1_qmpphy: phy@88e9000 { <&gcc GCC_USB3_PHY_PRIM_BCR>; reset-names = "phy", "common"; - usb_1_ssphy: lanes@88e9200 { + usb_1_ssphy: phy@88e9200 { reg = <0 0x088e9200 0 0x200>, <0 0x088e9400 0 0x200>, <0 0x088e9c00 0 0x218>,
@@ -3043,7 +3043,7 @@ usb_2_qmpphy: phy@88eb000 { <&gcc GCC_USB3_PHY_SEC_BCR>; reset-names = "phy", "common"; - usb_2_ssphy: lane@88eb200 { + usb_2_ssphy: phy@88eb200 { reg = <0 0x088eb200 0 0x200>, <0 0x088eb400 0 0x200>, <0 0x088eb800 0 0x800>,
arch/arm64/boot/dts/qcom/sm8250.dtsi +5 -5
@@ -1463,7 +1463,7 @@ pcie0_phy: phy@1c06000 { status = "disabled"; - pcie0_lane: lanes@1c06200 { + pcie0_lane: phy@1c06200 { reg = <0 0x1c06200 0 0x170>, /* tx */ <0 0x1c06400 0 0x200>, /* rx */ <0 0x1c06800 0 0x1f0>, /* pcs */
@@ -1569,7 +1569,7 @@ pcie1_phy: phy@1c0e000 { status = "disabled"; - pcie1_lane: lanes@1c0e200 { + pcie1_lane: phy@1c0e200 { reg = <0 0x1c0e200 0 0x170>, /* tx0 */ <0 0x1c0e400 0 0x200>, /* rx0 */ <0 0x1c0ea00 0 0x1f0>, /* pcs */
@@ -1677,7 +1677,7 @@ pcie2_phy: phy@1c16000 { status = "disabled"; - pcie2_lane: lanes@1c16200 { + pcie2_lane: phy@1c16200 { reg = <0 0x1c16200 0 0x170>, /* tx0 */ <0 0x1c16400 0 0x200>, /* rx0 */ <0 0x1c16a00 0 0x1f0>, /* pcs */
@@ -1756,7 +1756,7 @@ ufs_mem_phy: phy@1d87000 { reset-names = "ufsphy"; status = "disabled"; - ufs_mem_phy_lanes: lanes@1d87400 { + ufs_mem_phy_lanes: phy@1d87400 { reg = <0 0x01d87400 0 0x108>, <0 0x01d87600 0 0x1e0>, <0 0x01d87c00 0 0x1dc>,
@@ -2336,7 +2336,7 @@ usb_2_qmpphy: phy@88eb000 { <&gcc GCC_USB3_PHY_SEC_BCR>; reset-names = "phy", "common"; - usb_2_ssphy: lanes@88eb200 { + usb_2_ssphy: phy@88eb200 { reg = <0 0x088eb200 0 0x200>, <0 0x088eb400 0 0x200>, <0 0x088eb800 0 0x800>;
arch/arm64/boot/dts/qcom/sm8350.dtsi +1 -1
@@ -1123,7 +1123,7 @@ ufs_mem_phy: phy@1d87000 { reset-names = "ufsphy"; status = "disabled"; - ufs_mem_phy_lanes: lanes@1d87400 { + ufs_mem_phy_lanes: phy@1d87400 { reg = <0 0x01d87400 0 0x108>, <0 0x01d87600 0 0x1e0>, <0 0x01d87c00 0 0x1dc>,
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 20/731 arm64: dts: qcom: sm8150: fix UFS PHY registers
In reply to Greg Kroah-HartmanFrom: Johan Hovold <[email protected]>
[ Upstream commit 36a31b3a8d9ba1707a23de8d8dc1ceaef4eda695 ]
The sizes of the UFS PHY register regions are too small and does specifically not cover all registers used by the Linux driver.
As Linux maps these regions as full pages this is currently not an issue on Linux, but let's update the sizes to match the vendor driver.
--- arch/arm64/boot/dts/qcom/sm8150.dtsi | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
arch/arm64/boot/dts/qcom/sm8150.dtsi +5 -5
@@ -1693,11 +1693,11 @@ ufs_mem_phy: phy@1d87000 { status = "disabled"; ufs_mem_phy_lanes: phy@1d87400 { - reg = <0 0x01d87400 0 0x108>, - <0 0x01d87600 0 0x1e0>, - <0 0x01d87c00 0 0x1dc>, - <0 0x01d87800 0 0x108>, - <0 0x01d87a00 0 0x1e0>; + reg = <0 0x01d87400 0 0x16c>, + <0 0x01d87600 0 0x200>, + <0 0x01d87c00 0 0x200>, + <0 0x01d87800 0 0x16c>, + <0 0x01d87a00 0 0x200>; #phy-cells = <0>; }; };
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 21/731 arm64: dts: qcom: sm8250: fix UFS PHY registers
In reply to Greg Kroah-HartmanFrom: Johan Hovold <[email protected]>
[ Upstream commit 7f8b37dd4e7bf50160529530d9789b846153df71 ]
The sizes of the UFS PHY register regions are too small and does specifically not cover all registers used by the Linux driver.
As Linux maps these regions as full pages this is currently not an issue on Linux, but let's update the sizes to match the vendor driver.
--- arch/arm64/boot/dts/qcom/sm8250.dtsi | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
arch/arm64/boot/dts/qcom/sm8250.dtsi +5 -5
@@ -1757,11 +1757,11 @@ ufs_mem_phy: phy@1d87000 { status = "disabled"; ufs_mem_phy_lanes: phy@1d87400 { - reg = <0 0x01d87400 0 0x108>, - <0 0x01d87600 0 0x1e0>, - <0 0x01d87c00 0 0x1dc>, - <0 0x01d87800 0 0x108>, - <0 0x01d87a00 0 0x1e0>; + reg = <0 0x01d87400 0 0x16c>, + <0 0x01d87600 0 0x200>, + <0 0x01d87c00 0 0x200>, + <0 0x01d87800 0 0x16c>, + <0 0x01d87a00 0 0x200>; #phy-cells = <0>; }; };
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 22/731 arm64: dts: qcom: sm8350: fix UFS PHY registers
In reply to Greg Kroah-HartmanFrom: Johan Hovold <[email protected]>
[ Upstream commit b3c7839b698cc617e97dd2e4f1eeb4adc280fe58 ]
The sizes of the UFS PHY register regions are too small and does specifically not cover all registers used by the Linux driver.
As Linux maps these regions as full pages this is currently not an issue on Linux, but let's update the sizes to match the vendor driver.
--- arch/arm64/boot/dts/qcom/sm8350.dtsi | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
arch/arm64/boot/dts/qcom/sm8350.dtsi +5 -5
@@ -1124,11 +1124,11 @@ ufs_mem_phy: phy@1d87000 { status = "disabled"; ufs_mem_phy_lanes: phy@1d87400 { - reg = <0 0x01d87400 0 0x108>, - <0 0x01d87600 0 0x1e0>, - <0 0x01d87c00 0 0x1dc>, - <0 0x01d87800 0 0x108>, - <0 0x01d87a00 0 0x1e0>; + reg = <0 0x01d87400 0 0x188>, + <0 0x01d87600 0 0x200>, + <0 0x01d87c00 0 0x200>, + <0 0x01d87800 0 0x188>, + <0 0x01d87a00 0 0x200>; #phy-cells = <0>; #clock-cells = <0>; };
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 23/731 arm64: dts: qcom: sm8250: drop bogus DP PHY clock
In reply to Greg Kroah-HartmanFrom: Johan Hovold <[email protected]>
[ Upstream commit bb9f23e46ddcebe1bc68a43a0f7acfc1865a6472 ]
The QMP pipe clock is used by the USB part of the PHY so drop the corresponding properties from the DP child node.
--- arch/arm64/boot/dts/qcom/sm8250.dtsi | 3 --- 1 file changed, 3 deletions(-)
arch/arm64/boot/dts/qcom/sm8250.dtsi +0 -3
@@ -2312,9 +2312,6 @@ dp_phy: dp-phy@88ea200 { <0 0x088eaa00 0 0x100>; #phy-cells = <0>; #clock-cells = <1>; - clocks = <&gcc GCC_USB3_PRIM_PHY_PIPE_CLK>; - clock-names = "pipe0"; - clock-output-names = "usb3_phy_pipe_clk_src"; }; };
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 24/731 soc: qcom: apr: make code more reuseable
In reply to Greg Kroah-HartmanFrom: Srinivas Kandagatla <[email protected]>
[ Upstream commit 99139b80c1b3d73026ed8be2de42c52e2976ab64 ]
APR and other packet routers like GPR are pretty much same and interact with other drivers in similar way.
Ex: GPR ports can be considered as APR services, only difference is they are allocated dynamically.
Other difference is packet layout, which should not matter with the apis abstracted. Apart from this the rest of the functionality is pretty much identical across APR and GPR.
Make the apr code more reusable by abstracting it service level, rather than device level so that we do not need to write new drivers for other new packet routers like GPR.
This patch is in preparation to add GPR support to this driver.
Stable-dep-of: 6d7860f5750d ("soc: qcom: apr: Add check for idr_alloc and of_property_read_string_index")
--- drivers/soc/qcom/apr.c | 129 +++++++++++++++++++++-------------- include/linux/soc/qcom/apr.h | 12 +++- 2 files changed, 90 insertions(+), 51 deletions(-)
drivers/soc/qcom/apr.c +79 -50
@@ -15,13 +15,18 @@#include <linux/rpmsg.h> #include <linux/of.h> -struct apr { +enum { +PR_TYPE_APR =0 , +}; + +struct packet_router {struct rpmsg_endpoint *ch;struct device *dev;spinlock_t svcs_lock;spinlock_t rx_lock;struct idr svcs_idr;int dest_domain_id; +int type;struct pdr_handle *pdr;struct workqueue_struct *rxwq;struct work_struct rx_work;
@@ -44,21 +49,21 @@ struct apr_rx_buf {*/ int apr_send_pkt (struct apr_device *adev,struct apr_pkt *pkt) { -struct apr *apr =dev_get_drvdata (adev->dev.parent); +struct packet_router *apr =dev_get_drvdata (adev->dev.parent);struct apr_hdr *hdr;unsigned long flags;int ret; -spin_lock_irqsave (&adev->lock, flags); +spin_lock_irqsave (&adev->svc.lock, flags); hdr = &pkt->hdr; hdr->src_domain =APR_DOMAIN_APPS ; - hdr->src_svc = adev->svc_id; + hdr->src_svc = adev->svc.id; hdr->dest_domain = adev->domain_id; - hdr->dest_svc = adev->svc_id; + hdr->dest_svc = adev->svc.id; ret =rpmsg_trysend (apr->ch, pkt, hdr->pkt_size); -spin_unlock_irqrestore (&adev->lock, flags); +spin_unlock_irqrestore (&adev->svc.lock, flags);return ret ? ret : hdr->pkt_size; }
@@ -74,7 +79,7 @@ static void apr_dev_release(struct device *dev)static int apr_callback (struct rpmsg_device *rpdev,void *buf,int len,void *priv,u32 addr) { -struct apr *apr =dev_get_drvdata (&rpdev->dev); +struct packet_router *apr =dev_get_drvdata (&rpdev->dev);struct apr_rx_buf *abuf;unsigned long flags;
@@ -100,11 +105,11 @@ static int apr_callback(struct rpmsg_device *rpdev, void *buf,return 0 ; } - -static int apr_do_rx_callback (struct apr *apr,struct apr_rx_buf *abuf) +static int apr_do_rx_callback (struct packet_router *apr,struct apr_rx_buf *abuf) {uint16_t hdr_size, msg_type, ver, svc_id; -struct apr_device *svc =NULL ; +struct pkt_router_svc *svc; +struct apr_device *adev;struct apr_driver *adrv =NULL ;struct apr_resp_pkt resp;struct apr_hdr *hdr;
@@ -145,12 +150,15 @@ static int apr_do_rx_callback(struct apr *apr, struct apr_rx_buf *abuf) svc_id = hdr->dest_svc;spin_lock_irqsave (&apr->svcs_lock, flags); svc =idr_find (&apr->svcs_idr, svc_id); -if (svc && svc->dev.driver) - adrv =to_apr_driver (svc->dev.driver); +if (svc && svc->dev->driver) { + adev =svc_to_apr_device (svc); + adrv =to_apr_driver (adev->dev.driver); + }spin_unlock_irqrestore (&apr->svcs_lock, flags); -if (!adrv) { -dev_err (apr->dev,"APR: service is not registered\n" ); +if (!adrv || !adev) { +dev_err (apr->dev,"APR: service is not registered (%d)\n" , + svc_id);return -EINVAL ; }
@@ -164,20 +172,26 @@ static int apr_do_rx_callback(struct apr *apr, struct apr_rx_buf *abuf)if (resp.payload_size >0 ) resp.payload = buf + hdr_size; - adrv->callback (svc, &resp); + adrv->callback (adev, &resp);return 0 ; }static void apr_rxwq (struct work_struct *work) { - struct apr *apr = container_of(work, struct apr, rx_work); + struct packet_router *apr = container_of(work, struct packet_router, rx_work);struct apr_rx_buf *abuf, *b;unsigned long flags;if (!list_empty (&apr->rx_list)) {list_for_each_entry_safe (abuf, b, &apr->rx_list, node) { -apr_do_rx_callback (apr, abuf); +switch (apr->type) { +case PR_TYPE_APR : +apr_do_rx_callback (apr, abuf); +break ; +default : +break ; + }spin_lock_irqsave (&apr->rx_lock, flags);list_del (&abuf->node);spin_unlock_irqrestore (&apr->rx_lock, flags);
@@ -201,7 +215,7 @@ static int apr_device_match(struct device *dev, struct device_driver *drv)while (id->domain_id !=0 || id->svc_id !=0 ) {if (id->domain_id == adev->domain_id && - id->svc_id == adev->svc_id) + id->svc_id == adev->svc.id)return 1 ; id++; }
@@ -221,14 +235,14 @@ static void apr_device_remove(struct device *dev) {struct apr_device *adev =to_apr_device (dev);struct apr_driver *adrv; -struct apr *apr =dev_get_drvdata (adev->dev.parent); +struct packet_router *apr =dev_get_drvdata (adev->dev.parent);if (dev->driver) { adrv =to_apr_driver (dev->driver);if (adrv->remove) adrv->remove (adev);spin_lock (&apr->svcs_lock); -idr_remove (&apr->svcs_idr, adev->svc_id); +idr_remove (&apr->svcs_idr, adev->svc.id);spin_unlock (&apr->svcs_lock); } }
@@ -255,28 +269,39 @@ struct bus_type aprbus = {EXPORT_SYMBOL_GPL (aprbus);static int apr_add_device (struct device *dev,struct device_node *np, -const struct apr_device_id *id) +u32 svc_id,u32 domain_id) { -struct apr *apr =dev_get_drvdata (dev); +struct packet_router *apr =dev_get_drvdata (dev);struct apr_device *adev =NULL ; +struct pkt_router_svc *svc;int ret; adev =kzalloc (sizeof (*adev),GFP_KERNEL );if (!adev)return -ENOMEM ; -spin_lock_init (&adev->lock); + adev->svc_id = svc_id; + svc = &adev->svc; + + svc->id = svc_id; + svc->pr = apr; + svc->priv = adev; + svc->dev = dev; +spin_lock_init (&svc->lock); + + adev->domain_id = domain_id; - adev->svc_id = id->svc_id; - adev->domain_id = id->domain_id; - adev->version = id->svc_version;if (np)snprintf (adev->name,APR_NAME_SIZE ,"%pOFn" , np); -else -strscpy (adev->name, id->name,APR_NAME_SIZE ); -dev_set_name (&adev->dev,"aprsvc:%s:%x:%x" , adev->name, - id->domain_id, id->svc_id); +switch (apr->type) { +case PR_TYPE_APR : +dev_set_name (&adev->dev,"aprsvc:%s:%x:%x" , adev->name, + domain_id, svc_id); +break ; +default : +break ; + } adev->dev.bus = &aprbus; adev->dev.parent = dev;
@@ -285,8 +310,7 @@ static int apr_add_device(struct device *dev, struct device_node *np, adev->dev.driver =NULL ;spin_lock (&apr->svcs_lock); -idr_alloc (&apr->svcs_idr, adev, id->svc_id, - id->svc_id +1 ,GFP_ATOMIC ); +idr_alloc (&apr->svcs_idr, svc, svc_id, svc_id +1 ,GFP_ATOMIC );spin_unlock (&apr->svcs_lock); of_property_read_string_index(np, "qcom,protection-domain",
@@ -306,7 +330,7 @@ static int apr_add_device(struct device *dev, struct device_node *np,static int of_apr_add_pd_lookups (struct device *dev) {const char *service_name, *service_path; -struct apr *apr =dev_get_drvdata (dev); +struct packet_router *apr =dev_get_drvdata (dev);struct device_node *node;struct pdr_service *pds;int ret;
@@ -338,13 +362,14 @@ static int of_apr_add_pd_lookups(struct device *dev)static void of_register_apr_devices (struct device *dev,const char *svc_path) { -struct apr *apr =dev_get_drvdata (dev); +struct packet_router *apr =dev_get_drvdata (dev);struct device_node *node;const char *service_path;int ret;for_each_child_of_node (dev->of_node, node) { -struct apr_device_id id = { {0 } }; +u32 svc_id; +u32 domain_id;/* * This function is called with svc_path NULL during
@@ -374,13 +399,13 @@ static void of_register_apr_devices(struct device *dev, const char *svc_path)continue ; } -if (of_property_read_u32 (node,"reg" , &id.svc_id)) +if (of_property_read_u32 (node,"reg" , &svc_id))continue ; - id.domain_id = apr->dest_domain_id; + domain_id = apr->dest_domain_id; -if (apr_add_device (dev, node, &id)) -dev_err (dev,"Failed to add apr %d svc\n" , id.svc_id); +if (apr_add_device (dev, node, svc_id, domain_id)) +dev_err (dev,"Failed to add apr %d svc\n" , svc_id); } }
@@ -400,7 +425,7 @@ static int apr_remove_device(struct device *dev, void *svc_path)static void apr_pd_status (int state,char *svc_path,void *priv) { -struct apr *apr = (struct apr *)priv; +struct packet_router *apr = (struct packet_router *)priv;switch (state) {case SERVREG_SERVICE_STATE_UP :
@@ -415,16 +440,20 @@ static void apr_pd_status(int state, char *svc_path, void *priv)static int apr_probe (struct rpmsg_device *rpdev) {struct device *dev = &rpdev->dev; -struct apr *apr; +struct packet_router *apr;int ret; apr =devm_kzalloc (dev,sizeof (*apr),GFP_KERNEL );if (!apr)return -ENOMEM ; - ret =of_property_read_u32 (dev->of_node,"qcom,apr-domain" , &apr->dest_domain_id); + ret =of_property_read_u32 (dev->of_node,"qcom,domain" , &apr->dest_domain_id); +if (ret)/* try deprecated apr-domain property */ + ret =of_property_read_u32 (dev->of_node,"qcom,apr-domain" , + &apr->dest_domain_id); + apr->type =PR_TYPE_APR ;if (ret) { -dev_err (dev,"APR Domain ID not specified in DT\n" ); +dev_err (dev,"Domain ID not specified in DT\n" );return ret; }
@@ -467,7 +496,7 @@ static int apr_probe(struct rpmsg_device *rpdev)static void apr_remove (struct rpmsg_device *rpdev) { -struct apr *apr =dev_get_drvdata (&rpdev->dev); +struct packet_router *apr =dev_get_drvdata (&rpdev->dev);pdr_handle_release (apr->pdr);device_for_each_child (&rpdev->dev,NULL , apr_remove_device);
@@ -504,20 +533,20 @@ void apr_driver_unregister(struct apr_driver *drv) }EXPORT_SYMBOL_GPL (apr_driver_unregister); -static const struct of_device_id apr_of_match[] = { +static const struct of_device_id pkt_router_of_match[] = { { .compatible ="qcom,apr" }, { .compatible ="qcom,apr-v2" }, {} }; -MODULE_DEVICE_TABLE (of, apr_of_match); +MODULE_DEVICE_TABLE (of, pkt_router_of_match); -static struct rpmsg_driver apr_driver = { +static struct rpmsg_driver packet_router_driver = { .probe = apr_probe, .remove = apr_remove, .callback = apr_callback, .drv = { .name ="qcom,apr" , - .of_match_table = apr_of_match, + .of_match_table = pkt_router_of_match, }, };
@@ -527,7 +556,7 @@ static int __init apr_init(void) ret =bus_register (&aprbus);if (!ret) - ret =register_rpmsg_driver (&apr_driver); + ret =register_rpmsg_driver (&packet_router_driver);else bus_unregister (&aprbus);
@@ -537,7 +566,7 @@ static int __init apr_init(void) static void __exit apr_exit(void) {bus_unregister (&aprbus); -unregister_rpmsg_driver (&apr_driver); +unregister_rpmsg_driver (&packet_router_driver); }subsys_initcall (apr_init);
include/linux/soc/qcom/apr.h +11 -1
@@ -79,6 +79,15 @@ struct apr_resp_pkt {#define APR_SVC_MAJOR_VERSION (v) ((v >> 16) & 0xFF)#define APR_SVC_MINOR_VERSION (v) (v & 0xFF) +struct packet_router ; +struct pkt_router_svc { +struct device *dev; +struct packet_router *pr; +spinlock_t lock; +int id; +void *priv; +}; +struct apr_device {struct device dev;uint16_t svc_id;
@@ -86,11 +95,12 @@ struct apr_device {uint32_t version;char name[APR_NAME_SIZE ];const char *service_path; -spinlock_t lock; +struct pkt_router_svc svc;struct list_head node; };#define to_apr_device (d) container_of(d, struct apr_device, dev) +#define svc_to_apr_device (d) container_of(d, struct apr_device, svc)struct apr_driver {int (*probe)(struct apr_device *sl);
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 25/731 soc: qcom: apr: Add check for idr_alloc and of_property_read_string_index
In reply to Greg Kroah-HartmanFrom: Jiasheng Jiang <[email protected]>
[ Upstream commit 6d7860f5750d73da2fa1a1f6c9405058a593fa32 ]
As idr_alloc() and of_property_read_string_index() can return negative numbers, it should be better to check the return value and deal with the exception.
Therefore, it should be better to use goto statement to stop and return error.
--- drivers/soc/qcom/apr.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-)
drivers/soc/qcom/apr.c +12 -3
@@ -310,11 +310,19 @@ static int apr_add_device(struct device *dev, struct device_node *np, adev->dev.driver =NULL ;spin_lock (&apr->svcs_lock); -idr_alloc (&apr->svcs_idr, svc, svc_id, svc_id +1 ,GFP_ATOMIC ); + ret =idr_alloc (&apr->svcs_idr, svc, svc_id, svc_id +1 ,GFP_ATOMIC );spin_unlock (&apr->svcs_lock); +if (ret <0 ) { +dev_err (dev,"idr_alloc failed: %d\n" , ret); + goto out; + } -of_property_read_string_index (np,"qcom,protection-domain" , -1 , &adev->service_path); + ret =of_property_read_string_index (np,"qcom,protection-domain" , +1 , &adev->service_path); +if (ret <0 ) { +dev_err (dev,"Failed to read second value of qcom,protection-domain\n" ); + goto out; + }dev_info (dev,"Adding APR dev: %s\n" ,dev_name (&adev->dev));
@@ -324,6 +332,7 @@ static int apr_add_device(struct device *dev, struct device_node *np,put_device (&adev->dev); } +out:return ret; }
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 26/731 arm64: dts: qcom: sm6125: fix SDHCI CQE reg names
In reply to Greg Kroah-HartmanFrom: Krzysztof Kozlowski <[email protected]>
[ Upstream commit 3de1172624b3c4ca65730bc34333ab493510b3e1 ]
SM6125 comes with SDCC (SDHCI controller) v5, so the second range of registers is cqhci, not core.
--- arch/arm64/boot/dts/qcom/sm6125.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/qcom/sm6125.dtsi +1 -1
@@ -408,7 +408,7 @@ rpm_msg_ram: sram@45f0000 { sdhc_1: sdhci@4744000 { compatible = "qcom,sm6125-sdhci", "qcom,sdhci-msm-v5"; reg = <0x04744000 0x1000>, <0x04745000 0x1000>; - reg-names = "hc", "core"; + reg-names = "hc", "cqhci"; interrupts = <GIC_SPI 348 IRQ_TYPE_LEVEL_HIGH>, <GIC_SPI 352 IRQ_TYPE_LEVEL_HIGH>;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 27/731 arm: dts: spear600: Fix clcd interrupt
In reply to Greg Kroah-HartmanFrom: Kory Maincent <[email protected]>
[ Upstream commit 0336e2ce34e7a89832b6c214f924eb7bc58940be ]
Interrupt 12 of the Interrupt controller belongs to the SMI controller, the right one for the display controller is the interrupt 13.
--- arch/arm/boot/dts/spear600.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/spear600.dtsi +1 -1
@@ -47,7 +47,7 @@ clcd: clcd@fc200000 { compatible = "arm,pl110", "arm,primecell"; reg = <0xfc200000 0x1000>; interrupt-parent = <&vic1>; - interrupts = <12>; + interrupts = <13>; status = "disabled"; };
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 28/731 soc: ti: knav_qmss_queue: Use pm_runtime_resume_and_get instead of pm_runtime_get_sync
In reply to Greg Kroah-HartmanFrom: Minghao Chi <[email protected]>
[ Upstream commit 12eeb74925da70eb39d90abead9de9793be3d4c8 ]
Using pm_runtime_resume_and_get is more appropriate for simplifying code.
Stable-dep-of: e961c0f19450 ("soc: ti: knav_qmss_queue: Fix PM disable depth imbalance in knav_queue_probe")
--- drivers/soc/ti/knav_qmss_queue.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/soc/ti/knav_qmss_queue.c +1 -2
@@ -1785,9 +1785,8 @@ static int knav_queue_probe(struct platform_device *pdev)INIT_LIST_HEAD (&kdev->pdsps);pm_runtime_enable (&pdev->dev); - ret =pm_runtime_get_sync (&pdev->dev); + ret =pm_runtime_resume_and_get (&pdev->dev);if (ret <0 ) { -pm_runtime_put_noidle (&pdev->dev);dev_err (dev,"Failed to enable QMSS\n" );return ret; }
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 29/731 soc: ti: knav_qmss_queue: Fix PM disable depth imbalance in knav_queue_probe
In reply to Greg Kroah-HartmanFrom: Zhang Qilong <[email protected]>
[ Upstream commit e961c0f19450fd4a26bd043dd2979990bf12caf6 ]
The pm_runtime_enable will increase power disable depth. Thus a pairing decrement is needed on the error handling path to keep it balanced according to context.
--- drivers/soc/ti/knav_qmss_queue.c | 1 + 1 file changed, 1 insertion(+)
drivers/soc/ti/knav_qmss_queue.c +1 -0
@@ -1787,6 +1787,7 @@ static int knav_queue_probe(struct platform_device *pdev)pm_runtime_enable (&pdev->dev); ret =pm_runtime_resume_and_get (&pdev->dev);if (ret <0 ) { +pm_runtime_disable (&pdev->dev);dev_err (dev,"Failed to enable QMSS\n" );return ret; }
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 30/731 soc: ti: smartreflex: Fix PM disable depth imbalance in omap_sr_probe
In reply to Greg Kroah-HartmanFrom: Zhang Qilong <[email protected]>
[ Upstream commit 69460e68eb662064ab4188d4e129ff31c1f23ed9 ]
The pm_runtime_enable will increase power disable depth. Thus a pairing decrement is needed on the error handling path to keep it balanced according to context.
--- drivers/soc/ti/smartreflex.c | 1 + 1 file changed, 1 insertion(+)
drivers/soc/ti/smartreflex.c +1 -0
@@ -931,6 +931,7 @@ static int omap_sr_probe(struct platform_device *pdev) err_debugfs:debugfs_remove_recursive (sr_info->dbg_dir); err_list_del: +pm_runtime_disable (&pdev->dev);list_del (&sr_info->node);clk_unprepare (sr_info->fck);
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 31/731 arm64: Treat ESR_ELx as a 64-bit register
In reply to Greg Kroah-HartmanFrom: Alexandru Elisei <[email protected]>
[ Upstream commit 8d56e5c5a99ce1d17d39ce5a8260e42c2a2d7682 ]
In the initial release of the ARM Architecture Reference Manual for ARMv8-A, the ESR_ELx registers were defined as 32-bit registers. This changed in 2018 with version D.a (ARM DDI 0487D.a) of the architecture, when they became 64-bit registers, with bits [63:32] defined as RES0. In version G.a, a new field was added to ESR_ELx, ISS2, which covers bits [36:32]. This field is used when the Armv8.7 extension FEAT_LS64 is implemented.
As a result of the evolution of the register width, Linux stores it as both a 64-bit value and a 32-bit value, which hasn't affected correctness so far as Linux only uses the lower 32 bits of the register.
Make the register type consistent and always treat it as 64-bit wide. The register is redefined as an "unsigned long", which is an unsigned double-word (64-bit quantity) for the LP64 machine (aapcs64 [1], Table 1, page 14). The type was chosen because "unsigned int" is the most frequent type for ESR_ELx and because FAR_ELx, which is used together with ESR_ELx in exception handling, is also declared as "unsigned long". The 64-bit type also makes adding support for architectural features that use fields above bit 31 easier in the future.
The KVM hypervisor will receive a similar update in a subsequent patch.
[1] https://github.com/ARM-software/abi-aa/releases/download/2021Q3/aapcs64.pdf
Stable-dep-of: 0bb1fbffc631 ("arm64: mm: kfence: only handle translation faults")
--- arch/arm64/include/asm/debug-monitors.h | 4 +- arch/arm64/include/asm/esr.h | 6 +-- arch/arm64/include/asm/exception.h | 28 +++++----- arch/arm64/include/asm/system_misc.h | 4 +- arch/arm64/include/asm/traps.h | 12 ++--- arch/arm64/kernel/debug-monitors.c | 12 ++--- arch/arm64/kernel/entry-common.c | 6 +-- arch/arm64/kernel/fpsimd.c | 6 +-- arch/arm64/kernel/hw_breakpoint.c | 4 +- arch/arm64/kernel/kgdb.c | 6 +-- arch/arm64/kernel/probes/kprobes.c | 4 +- arch/arm64/kernel/probes/uprobes.c | 4 +- arch/arm64/kernel/traps.c | 66 +++++++++++------------ arch/arm64/mm/fault.c | 70 ++++++++++++------------- 14 files changed, 116 insertions(+), 116 deletions(-)
arch/arm64/include/asm/debug-monitors.h +2 -2
@@ -76,7 +76,7 @@ struct task_struct;struct step_hook {struct list_head node; -int (*fn)(struct pt_regs *regs,unsigned int esr); +int (*fn)(struct pt_regs *regs,unsigned long esr); };void register_user_step_hook (struct step_hook *hook);
@@ -87,7 +87,7 @@ void unregister_kernel_step_hook(struct step_hook *hook);struct break_hook {struct list_head node; -int (*fn)(struct pt_regs *regs,unsigned int esr); +int (*fn)(struct pt_regs *regs,unsigned long esr);u16 imm;u16 mask;/* These bits are ignored when comparing with imm */ };
arch/arm64/include/asm/esr.h +3 -3
@@ -324,14 +324,14 @@#ifndef __ASSEMBLY__#include <asm/types.h> -static inline bool esr_is_data_abort (u32 esr) +static inline bool esr_is_data_abort (unsigned long esr) { -const u32 ec =ESR_ELx_EC (esr); +const unsigned long ec =ESR_ELx_EC (esr);return ec == ESR_ELx_EC_DABT_LOW || ec == ESR_ELx_EC_DABT_CUR; } -const char *esr_get_class_string (u32 esr); +const char *esr_get_class_string (unsigned long esr);#endif /* __ASSEMBLY */ #endif /* __ASM_ESR_H */
arch/arm64/include/asm/exception.h +14 -14
@@ -19,9 +19,9 @@#define __exception_irq_entry __kprobes#endif -static inline u32 disr_to_esr (u64 disr) +static inline unsigned long disr_to_esr (u64 disr) { -unsigned int esr = ESR_ELx_EC_SERROR << ESR_ELx_EC_SHIFT; +unsigned long esr = ESR_ELx_EC_SERROR << ESR_ELx_EC_SHIFT;if ((disr &DISR_EL1_IDS ) ==0 ) esr |= (disr &DISR_EL1_ESR_MASK );
@@ -57,23 +57,23 @@ asmlinkage void call_on_irq_stack(struct pt_regs *regs, void (*func)(struct pt_regs *)); asmlinkage void asm_exit_to_user_mode(struct pt_regs *regs); -void do_mem_abort (unsigned long far,unsigned int esr,struct pt_regs *regs); +void do_mem_abort (unsigned long far,unsigned long esr,struct pt_regs *regs);void do_undefinstr (struct pt_regs *regs);void do_bti (struct pt_regs *regs); -void do_debug_exception (unsigned long addr_if_watchpoint,unsigned int esr, +void do_debug_exception (unsigned long addr_if_watchpoint,unsigned long esr,struct pt_regs *regs); -void do_fpsimd_acc (unsigned int esr,struct pt_regs *regs); -void do_sve_acc (unsigned int esr,struct pt_regs *regs); -void do_fpsimd_exc (unsigned int esr,struct pt_regs *regs); -void do_sysinstr (unsigned int esr,struct pt_regs *regs); -void do_sp_pc_abort (unsigned long addr,unsigned int esr,struct pt_regs *regs); -void bad_el0_sync (struct pt_regs *regs,int reason,unsigned int esr); -void do_cp15instr (unsigned int esr,struct pt_regs *regs); +void do_fpsimd_acc (unsigned long esr,struct pt_regs *regs); +void do_sve_acc (unsigned long esr,struct pt_regs *regs); +void do_fpsimd_exc (unsigned long esr,struct pt_regs *regs); +void do_sysinstr (unsigned long esr,struct pt_regs *regs); +void do_sp_pc_abort (unsigned long addr,unsigned long esr,struct pt_regs *regs); +void bad_el0_sync (struct pt_regs *regs,int reason,unsigned long esr); +void do_cp15instr (unsigned long esr,struct pt_regs *regs);void do_el0_svc (struct pt_regs *regs);void do_el0_svc_compat (struct pt_regs *regs); -void do_ptrauth_fault (struct pt_regs *regs,unsigned int esr); -void do_serror (struct pt_regs *regs,unsigned int esr); +void do_ptrauth_fault (struct pt_regs *regs,unsigned long esr); +void do_serror (struct pt_regs *regs,unsigned long esr);void do_notify_resume (struct pt_regs *regs,unsigned long thread_flags); -void panic_bad_stack (struct pt_regs *regs,unsigned int esr,unsigned long far); +void panic_bad_stack (struct pt_regs *regs,unsigned long esr,unsigned long far);#endif /* __ASM_EXCEPTION_H */
arch/arm64/include/asm/system_misc.h +2 -2
@@ -23,9 +23,9 @@ void die(const char *msg, struct pt_regs *regs, int err);struct siginfo ;void arm64_notify_die (const char *str,struct pt_regs *regs,int signo,int sicode,unsigned long far, -int err); +unsigned long err); -void hook_debug_fault_code (int nr,int (*fn)(unsigned long ,unsigned int , +void hook_debug_fault_code (int nr,int (*fn)(unsigned long ,unsigned long ,struct pt_regs *),int sig,int code,const char *name);
arch/arm64/include/asm/traps.h +6 -6
@@ -24,7 +24,7 @@ struct undef_hook {void register_undef_hook (struct undef_hook *hook);void unregister_undef_hook (struct undef_hook *hook); -void force_signal_inject (int signal,int code,unsigned long address,unsigned int err); +void force_signal_inject (int signal,int code,unsigned long address,unsigned long err);void arm64_notify_segfault (unsigned long addr);void arm64_force_sig_fault (int signo,int code,unsigned long far,const char *str);void arm64_force_sig_mceerr (int code,unsigned long far,short lsb,const char *str);
@@ -57,7 +57,7 @@ static inline int in_entry_text(unsigned long ptr)* errors share the same encoding as an all-zeros encoding from a CPU that * doesn't support RAS. */ -static inline bool arm64_is_ras_serror (u32 esr) +static inline bool arm64_is_ras_serror (unsigned long esr) {WARN_ON (preemptible ());
@@ -77,9 +77,9 @@ static inline bool arm64_is_ras_serror(u32 esr)* We treat them as Uncontainable. * Non-RAS SError's are reported as Uncontained/Uncategorized. */ -static inline u32 arm64_ras_serror_get_severity (u32 esr) +static inline unsigned long arm64_ras_serror_get_severity (unsigned long esr) { -u32 aet = esr & ESR_ELx_AET; +unsigned long aet = esr & ESR_ELx_AET;if (!arm64_is_ras_serror (esr)) {/* Not a RAS error, we can't interpret the ESR. */
@@ -98,6 +98,6 @@ static inline u32 arm64_ras_serror_get_severity(u32 esr) return aet; } -bool arm64_is_fatal_ras_serror (struct pt_regs *regs,unsigned int esr); -void __noreturn arm64_serror_panic (struct pt_regs *regs,u32 esr); +bool arm64_is_fatal_ras_serror (struct pt_regs *regs,unsigned long esr); +void __noreturn arm64_serror_panic (struct pt_regs *regs,unsigned long esr);#endif
arch/arm64/kernel/debug-monitors.c +6 -6
@@ -202,7 +202,7 @@ void unregister_kernel_step_hook(struct step_hook *hook)* So we call all the registered handlers, until the right handler is * found which returns zero. */ -static int call_step_hook (struct pt_regs *regs,unsigned int esr) +static int call_step_hook (struct pt_regs *regs,unsigned long esr) {struct step_hook *hook;struct list_head *list;
@@ -238,7 +238,7 @@ static void send_user_sigtrap(int si_code) "User debug trap"); } -static int single_step_handler (unsigned long unused,unsigned int esr, +static int single_step_handler (unsigned long unused,unsigned long esr,struct pt_regs *regs) {bool handler_found = false;
@@ -299,11 +299,11 @@ void unregister_kernel_break_hook(struct break_hook *hook)unregister_debug_hook (&hook->node); } -static int call_break_hook (struct pt_regs *regs,unsigned int esr) +static int call_break_hook (struct pt_regs *regs,unsigned long esr) {struct break_hook *hook;struct list_head *list; -int (*fn)(struct pt_regs *regs,unsigned int esr) =NULL ; +int (*fn)(struct pt_regs *regs,unsigned long esr) =NULL ; list =user_mode (regs) ? &user_break_hook : &kernel_break_hook;
@@ -312,7 +312,7 @@ static int call_break_hook(struct pt_regs *regs, unsigned int esr)* entirely not preemptible, and we can use rcu list safely here. */ list_for_each_entry_rcu (hook, list, node) { -unsigned int comment = esr & ESR_ELx_BRK64_ISS_COMMENT_MASK; +unsigned long comment = esr & ESR_ELx_BRK64_ISS_COMMENT_MASK;if ((comment & ~hook->mask) == hook->imm) fn = hook->fn;
@@ -322,7 +322,7 @@ static int call_break_hook(struct pt_regs *regs, unsigned int esr) }NOKPROBE_SYMBOL (call_break_hook); -static int brk_handler (unsigned long unused,unsigned int esr, +static int brk_handler (unsigned long unused,unsigned long esr,struct pt_regs *regs) {if (call_break_hook (regs, esr) ==DBG_HOOK_HANDLED )
arch/arm64/kernel/entry-common.c +3 -3
@@ -273,13 +273,13 @@ extern void (*handle_arch_irq)(struct pt_regs *);extern void (*handle_arch_fiq)(struct pt_regs *); static void noinstr __panic_unhandled(struct pt_regs *regs, const char *vector, -unsigned int esr) +unsigned long esr) {arm64_enter_nmi (regs);console_verbose (); -pr_crit ("Unhandled %s exception on CPU%d, ESR 0x%08x -- %s\n" , +pr_crit ("Unhandled %s exception on CPU%d, ESR 0x%016lx -- %s\n" , vector,smp_processor_id (), esr,esr_get_class_string (esr));
@@ -796,7 +796,7 @@ UNHANDLED(el0t, 32, error)#ifdef CONFIG_VMAP_STACK asmlinkage void noinstr handle_bad_stack(struct pt_regs *regs) { -unsigned int esr =read_sysreg (esr_el1); +unsigned long esr =read_sysreg (esr_el1);unsigned long far =read_sysreg (far_el1);arm64_enter_nmi (regs);
arch/arm64/kernel/fpsimd.c +3 -3
@@ -930,7 +930,7 @@ void fpsimd_release_task(struct task_struct *dead_task)* would have disabled the SVE access trap for userspace during * ret_to_user, making an SVE access trap impossible in that case. */ -void do_sve_acc (unsigned int esr,struct pt_regs *regs) +void do_sve_acc (unsigned long esr,struct pt_regs *regs) {/* Even if we chose not to use SVE, the hardware could still trap: */ if (unlikely (!system_supports_sve ()) ||WARN_ON (is_compat_task ())) {
@@ -972,7 +972,7 @@ void do_sve_acc(unsigned int esr, struct pt_regs *regs)/* * Trapped FP/ASIMD access. */ -void do_fpsimd_acc (unsigned int esr,struct pt_regs *regs) +void do_fpsimd_acc (unsigned long esr,struct pt_regs *regs) {/* TODO: implement lazy context saving/restoring */ WARN_ON (1 );
@@ -981,7 +981,7 @@ void do_fpsimd_acc(unsigned int esr, struct pt_regs *regs)/* * Raise a SIGFPE for the current process. */ -void do_fpsimd_exc (unsigned int esr,struct pt_regs *regs) +void do_fpsimd_exc (unsigned long esr,struct pt_regs *regs) {unsigned int si_code =FPE_FLTUNK ;
arch/arm64/kernel/hw_breakpoint.c +2 -2
@@ -617,7 +617,7 @@ NOKPROBE_SYMBOL(toggle_bp_registers);/* * Debug exception handlers. */ -static int breakpoint_handler (unsigned long unused,unsigned int esr, +static int breakpoint_handler (unsigned long unused,unsigned long esr,struct pt_regs *regs) {int i, step =0 , *kernel_step;
@@ -751,7 +751,7 @@ static int watchpoint_report(struct perf_event *wp, unsigned long addr,return step; } -static int watchpoint_handler (unsigned long addr,unsigned int esr, +static int watchpoint_handler (unsigned long addr,unsigned long esr,struct pt_regs *regs) {int i, step =0 , *kernel_step, access, closest_match =0 ;
arch/arm64/kernel/kgdb.c +3 -3
@@ -232,14 +232,14 @@ int kgdb_arch_handle_exception(int exception_vector, int signo,return err; } -static int kgdb_brk_fn (struct pt_regs *regs,unsigned int esr) +static int kgdb_brk_fn (struct pt_regs *regs,unsigned long esr) {kgdb_handle_exception (1 ,SIGTRAP ,0 , regs);return DBG_HOOK_HANDLED ; }NOKPROBE_SYMBOL (kgdb_brk_fn) -static int kgdb_compiled_brk_fn(struct pt_regs *regs, unsigned int esr) +static int kgdb_compiled_brk_fn(struct pt_regs *regs, unsigned long esr) { compiled_break =1 ;kgdb_handle_exception (1 ,SIGTRAP ,0 , regs);
@@ -248,7 +248,7 @@ static int kgdb_compiled_brk_fn(struct pt_regs *regs, unsigned int esr) }NOKPROBE_SYMBOL (kgdb_compiled_brk_fn); -static int kgdb_step_brk_fn (struct pt_regs *regs,unsigned int esr) +static int kgdb_step_brk_fn (struct pt_regs *regs,unsigned long esr) {if (!kgdb_single_step)return DBG_HOOK_ERROR ;
arch/arm64/kernel/probes/kprobes.c +2 -2
@@ -332,7 +332,7 @@ static void __kprobes kprobe_handler(struct pt_regs *regs) }static int __kprobes -kprobe_breakpoint_ss_handler (struct pt_regs *regs,unsigned int esr) +kprobe_breakpoint_ss_handler (struct pt_regs *regs,unsigned long esr) {struct kprobe_ctlblk *kcb =get_kprobe_ctlblk ();unsigned long addr =instruction_pointer (regs);
@@ -356,7 +356,7 @@ static struct break_hook kprobes_break_ss_hook = { };static int __kprobes -kprobe_breakpoint_handler (struct pt_regs *regs,unsigned int esr) +kprobe_breakpoint_handler (struct pt_regs *regs,unsigned long esr) {kprobe_handler (regs);return DBG_HOOK_HANDLED ;
arch/arm64/kernel/probes/uprobes.c +2 -2
@@ -166,7 +166,7 @@ int arch_uprobe_exception_notify(struct notifier_block *self, }static int uprobe_breakpoint_handler (struct pt_regs *regs, -unsigned int esr) +unsigned long esr) {if (uprobe_pre_sstep_notifier (regs))return DBG_HOOK_HANDLED ;
@@ -175,7 +175,7 @@ static int uprobe_breakpoint_handler(struct pt_regs *regs, }static int uprobe_single_step_handler (struct pt_regs *regs, -unsigned int esr) +unsigned long esr) {struct uprobe_task *utask = current->utask;
arch/arm64/kernel/traps.c +33 -33
240 lines not on this page · raw message
arch/arm64/mm/fault.c +35 -35
253 lines not on this page · raw message
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 32/731 arm64: mm: kfence: only handle translation faults
In reply to Greg Kroah-HartmanFrom: Mark Rutland <[email protected]>
[ Upstream commit 0bb1fbffc631064db567ccaeb9ed6b6df6342b66 ]
Alexander noted that KFENCE only expects to handle faults from invalid page table entries (i.e. translation faults), but arm64's fault handling logic will call kfence_handle_page_fault() for other types of faults, including alignment faults caused by unaligned atomics. This has the unfortunate property of causing those other faults to be reported as "KFENCE: use-after-free", which is misleading and hinders debugging.
Fix this by only forwarding unhandled translation faults to the KFENCE code, similar to what x86 does already.
Alexander has verified that this passes all the tests in the KFENCE test suite and avoids bogus reports on misaligned atomics.
--- arch/arm64/mm/fault.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
arch/arm64/mm/fault.c +7 -1
@@ -350,6 +350,11 @@ static bool is_el1_mte_sync_tag_check_fault(unsigned long esr)return false; } +static bool is_translation_fault (unsigned long esr) +{ +return (esr & ESR_ELx_FSC_TYPE) == ESR_ELx_FSC_FAULT; +} +static void __do_kernel_fault (unsigned long addr,unsigned long esr,struct pt_regs *regs) {
@@ -382,7 +387,8 @@ static void __do_kernel_fault(unsigned long addr, unsigned long esr, }else if (addr <PAGE_SIZE ) { msg ="NULL pointer dereference" ; }else { -if (kfence_handle_page_fault (addr, esr & ESR_ELx_WNR, regs)) +if (is_translation_fault (esr) && +kfence_handle_page_fault (addr, esr & ESR_ELx_WNR, regs))return ; msg ="paging request" ;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 33/731 perf: arm_dsu: Fix hotplug callback leak in dsu_pmu_init()
In reply to Greg Kroah-HartmanFrom: Yuan Can <[email protected]>
[ Upstream commit facafab7611f7b872c6b9eeaff53461ef11f482e ]
dsu_pmu_init() won't remove the callback added by cpuhp_setup_state_multi() when platform_driver_register() failed. Remove the callback by cpuhp_remove_multi_state() in fail path.
Similar to the handling of arm_ccn_init() in commit 26242b330093 ("bus:
arm-ccn: Prevent hotplug callback leak")
--- drivers/perf/arm_dsu_pmu.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/perf/arm_dsu_pmu.c +5 -1
@@ -858,7 +858,11 @@ static int __init dsu_pmu_init(void)if (ret <0 )return ret; dsu_pmu_cpuhp_state = ret; -return platform_driver_register (&dsu_pmu_driver); + ret =platform_driver_register (&dsu_pmu_driver); +if (ret) +cpuhp_remove_multi_state (dsu_pmu_cpuhp_state); + +return ret; } static void __exit dsu_pmu_exit(void)
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 34/731 perf/arm_dmc620: Fix hotplug callback leak in dmc620_pmu_init()
In reply to Greg Kroah-HartmanFrom: Shang XiaoJing <[email protected]>
[ Upstream commit d9f564c966e63925aac4ba273a9319d7fb6f4b4e ]
dmc620_pmu_init() won't remove the callback added by cpuhp_setup_state_multi() when platform_driver_register() failed. Remove the callback by cpuhp_remove_multi_state() in fail path.
Similar to the handling of arm_ccn_init() in commit 26242b330093 ("bus:
arm-ccn: Prevent hotplug callback leak")
--- drivers/perf/arm_dmc620_pmu.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
drivers/perf/arm_dmc620_pmu.c +7 -1
@@ -725,6 +725,8 @@ static struct platform_driver dmc620_pmu_driver = {static int __init dmc620_pmu_init (void ) { +int ret; + cpuhp_state_num = cpuhp_setup_state_multi(CPUHP_AP_ONLINE_DYN, DMC620_DRVNAME, NULL,
@@ -732,7 +734,11 @@ static int __init dmc620_pmu_init(void)if (cpuhp_state_num <0 )return cpuhp_state_num; -return platform_driver_register (&dmc620_pmu_driver); + ret =platform_driver_register (&dmc620_pmu_driver); +if (ret) +cpuhp_remove_multi_state (cpuhp_state_num); + +return ret; } static void __exit dmc620_pmu_exit(void)
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 35/731 perf/smmuv3: Fix hotplug callback leak in arm_smmu_pmu_init()
In reply to Greg Kroah-HartmanFrom: Shang XiaoJing <[email protected]>
[ Upstream commit 6f2d566b46436a50a80d6445e82879686b89588c ]
arm_smmu_pmu_init() won't remove the callback added by cpuhp_setup_state_multi() when platform_driver_register() failed. Remove the callback by cpuhp_remove_multi_state() in fail path.
Similar to the handling of arm_ccn_init() in commit 26242b330093 ("bus:
arm-ccn: Prevent hotplug callback leak")
--- drivers/perf/arm_smmuv3_pmu.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
drivers/perf/arm_smmuv3_pmu.c +7 -1
@@ -896,6 +896,8 @@ static struct platform_driver smmu_pmu_driver = {static int __init arm_smmu_pmu_init (void ) { +int ret; + cpuhp_state_num = cpuhp_setup_state_multi(CPUHP_AP_ONLINE_DYN, "perf/arm/pmcg:online", NULL,
@@ -903,7 +905,11 @@ static int __init arm_smmu_pmu_init(void)if (cpuhp_state_num <0 )return cpuhp_state_num; -return platform_driver_register (&smmu_pmu_driver); + ret =platform_driver_register (&smmu_pmu_driver); +if (ret) +cpuhp_remove_multi_state (cpuhp_state_num); + +return ret; }module_init (arm_smmu_pmu_init);
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 36/731 arm64: dts: ti: k3-am65-main: Drop dma-coherent in crypto node
In reply to Greg Kroah-HartmanFrom: Jayesh Choudhary <[email protected]>
[ Upstream commit b86833ab3653dbb0dc453eec4eef8615e63de4e2 ]
crypto driver itself is not dma-coherent. So drop it.
--- arch/arm64/boot/dts/ti/k3-am65-main.dtsi | 1 - 1 file changed, 1 deletion(-)
arch/arm64/boot/dts/ti/k3-am65-main.dtsi +0 -1
@@ -120,7 +120,6 @@ crypto: crypto@4e00000 { dmas = <&main_udmap 0xc000>, <&main_udmap 0x4000>, <&main_udmap 0x4001>; dma-names = "tx", "rx1", "rx2"; - dma-coherent; rng: rng@4e10000 { compatible = "inside-secure,safexcel-eip76";
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 37/731 arm64: dts: ti: k3-j721e-main: Drop dma-coherent in crypto node
In reply to Greg Kroah-HartmanFrom: Jayesh Choudhary <[email protected]>
[ Upstream commit 26c5012403f3f1fd3bf8f7d3389ee539ae5cc162 ]
crypto driver itself is not dma-coherent. So drop it.
--- arch/arm64/boot/dts/ti/k3-j721e-main.dtsi | 1 - 1 file changed, 1 deletion(-)
arch/arm64/boot/dts/ti/k3-j721e-main.dtsi +0 -1
@@ -336,7 +336,6 @@ main_crypto: crypto@4e00000 { dmas = <&main_udmap 0xc000>, <&main_udmap 0x4000>, <&main_udmap 0x4001>; dma-names = "tx", "rx1", "rx2"; - dma-coherent; rng: rng@4e10000 { compatible = "inside-secure,safexcel-eip76";
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 38/731 ARM: dts: nuvoton: Remove bogus unit addresses from fixed-partition nodes
In reply to Greg Kroah-HartmanFrom: Jonathan Neuschäfer <[email protected]>
[ Upstream commit ea3ce4cf076ba11bb591c8013c5315136cae52c8 ]
The unit addresses do not correspond to the nodes' reg properties, because they don't have any.
--- arch/arm/boot/dts/nuvoton-npcm730-gbs.dts | 2 +- arch/arm/boot/dts/nuvoton-npcm730-gsj.dts | 2 +- arch/arm/boot/dts/nuvoton-npcm730-kudo.dts | 6 +++--- arch/arm/boot/dts/nuvoton-npcm750-evb.dts | 4 ++-- arch/arm/boot/dts/nuvoton-npcm750-runbmc-olympus.dts | 6 +++--- 5 files changed, 10 insertions(+), 10 deletions(-)
arch/arm/boot/dts/nuvoton-npcm730-gbs.dts +1 -1
@@ -366,7 +366,7 @@ spi-nor@0 { spi-max-frequency = <20000000>; spi-rx-bus-width = <2>; label = "bmc"; - partitions@80000000 { + partitions { compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>;
arch/arm/boot/dts/nuvoton-npcm730-gsj.dts +1 -1
@@ -142,7 +142,7 @@ spi-nor@0 { reg = <0>; spi-rx-bus-width = <2>; - partitions@80000000 { + partitions { compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>;
arch/arm/boot/dts/nuvoton-npcm730-kudo.dts +3 -3
@@ -388,7 +388,7 @@ spi-nor@0 { spi-max-frequency = <5000000>; spi-rx-bus-width = <2>; label = "bmc"; - partitions@80000000 { + partitions { compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>;
@@ -422,7 +422,7 @@ spi-nor@1 { reg = <1>; spi-max-frequency = <5000000>; spi-rx-bus-width = <2>; - partitions@88000000 { + partitions { compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>;
@@ -447,7 +447,7 @@ spi-nor@0 { reg = <0>; spi-max-frequency = <5000000>; spi-rx-bus-width = <2>; - partitions@A0000000 { + partitions { compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>;
arch/arm/boot/dts/nuvoton-npcm750-evb.dts +2 -2
@@ -74,7 +74,7 @@ spi-nor@0 { spi-rx-bus-width = <2>; reg = <0>; spi-max-frequency = <5000000>; - partitions@80000000 { + partitions { compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>;
@@ -135,7 +135,7 @@ spi-nor@0 { spi-rx-bus-width = <2>; reg = <0>; spi-max-frequency = <5000000>; - partitions@A0000000 { + partitions { compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>;
arch/arm/boot/dts/nuvoton-npcm750-runbmc-olympus.dts +3 -3
@@ -107,7 +107,7 @@ spi-nor@0 { reg = <0>; spi-rx-bus-width = <2>; - partitions@80000000 { + partitions { compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>;
@@ -146,7 +146,7 @@ spi-nor@1 { reg = <1>; npcm,fiu-rx-bus-width = <2>; - partitions@88000000 { + partitions { compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>;
@@ -173,7 +173,7 @@ spi-nor@0 { reg = <0>; spi-rx-bus-width = <2>; - partitions@A0000000 { + partitions { compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 39/731 arm64: dts: mt6779: Fix devicetree build warnings
In reply to Greg Kroah-HartmanFrom: AngeloGioacchino Del Regno <[email protected]>
[ Upstream commit 4d759c524c15dc4151e40b9e3f368147fda7b789 ]
Rename fixed-clock oscillators to oscillator-26m and oscillator-32k and remove the unit address to fix the unit_address_vs_reg warning; fix the unit address for interrupt and intpol controllers by removing a leading zero in their unit address.
This commit fixes the following warnings:
(unit_address_vs_reg): /oscillator@0: node has a unit name, but no reg or ranges property
(unit_address_vs_reg): /oscillator@1: node has a unit name, but no reg or ranges property
(simple_bus_reg): /soc/interrupt-controller@0c000000: simple-bus unit address format error, expected "c000000" (simple_bus_reg): /soc/intpol-controller@0c53a650: simple-bus unit address format error, expected "c53a650"
--- arch/arm64/boot/dts/mediatek/mt6779.dtsi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
arch/arm64/boot/dts/mediatek/mt6779.dtsi +4 -4
@@ -88,14 +88,14 @@ pmu { interrupts = <GIC_PPI 7 IRQ_TYPE_LEVEL_LOW 0>; }; - clk26m: oscillator@0 { + clk26m: oscillator-26m { compatible = "fixed-clock"; #clock-cells = <0>; clock-frequency = <26000000>; clock-output-names = "clk26m"; }; - clk32k: oscillator@1 { + clk32k: oscillator-32k { compatible = "fixed-clock"; #clock-cells = <0>; clock-frequency = <32768>;
@@ -117,7 +117,7 @@ soc { compatible = "simple-bus"; ranges; - gic: interrupt-controller@0c000000 { + gic: interrupt-controller@c000000 { compatible = "arm,gic-v3"; #interrupt-cells = <4>; interrupt-parent = <&gic>;
@@ -138,7 +138,7 @@ ppi_cluster1: interrupt-partition-1 { }; - sysirq: intpol-controller@0c53a650 { + sysirq: intpol-controller@c53a650 { compatible = "mediatek,mt6779-sysirq", "mediatek,mt6577-sysirq"; interrupt-controller;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 40/731 arm64: dts: mt2712e: Fix unit_address_vs_reg warning for oscillators
In reply to Greg Kroah-HartmanFrom: AngeloGioacchino Del Regno <[email protected]>
[ Upstream commit e4495a0a8b3d84816c9a46edf3ce060bbf267475 ]
Rename the fixed-clock oscillators to remove the unit address.
This solves unit_address_vs_reg warnings.
--- arch/arm64/boot/dts/mediatek/mt2712e.dtsi | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-)
arch/arm64/boot/dts/mediatek/mt2712e.dtsi +10 -10
@@ -160,70 +160,70 @@ sys_clk: dummyclk { #clock-cells = <0>; }; - clk26m: oscillator@0 { + clk26m: oscillator-26m { compatible = "fixed-clock"; #clock-cells = <0>; clock-frequency = <26000000>; clock-output-names = "clk26m"; }; - clk32k: oscillator@1 { + clk32k: oscillator-32k { compatible = "fixed-clock"; #clock-cells = <0>; clock-frequency = <32768>; clock-output-names = "clk32k"; }; - clkfpc: oscillator@2 { + clkfpc: oscillator-50m { compatible = "fixed-clock"; #clock-cells = <0>; clock-frequency = <50000000>; clock-output-names = "clkfpc"; }; - clkaud_ext_i_0: oscillator@3 { + clkaud_ext_i_0: oscillator-aud0 { compatible = "fixed-clock"; #clock-cells = <0>; clock-frequency = <6500000>; clock-output-names = "clkaud_ext_i_0"; }; - clkaud_ext_i_1: oscillator@4 { + clkaud_ext_i_1: oscillator-aud1 { compatible = "fixed-clock"; #clock-cells = <0>; clock-frequency = <196608000>; clock-output-names = "clkaud_ext_i_1"; }; - clkaud_ext_i_2: oscillator@5 { + clkaud_ext_i_2: oscillator-aud2 { compatible = "fixed-clock"; #clock-cells = <0>; clock-frequency = <180633600>; clock-output-names = "clkaud_ext_i_2"; }; - clki2si0_mck_i: oscillator@6 { + clki2si0_mck_i: oscillator-i2s0 { compatible = "fixed-clock"; #clock-cells = <0>; clock-frequency = <30000000>; clock-output-names = "clki2si0_mck_i"; }; - clki2si1_mck_i: oscillator@7 { + clki2si1_mck_i: oscillator-i2s1 { compatible = "fixed-clock"; #clock-cells = <0>; clock-frequency = <30000000>; clock-output-names = "clki2si1_mck_i"; }; - clki2si2_mck_i: oscillator@8 { + clki2si2_mck_i: oscillator-i2s2 { compatible = "fixed-clock"; #clock-cells = <0>; clock-frequency = <30000000>; clock-output-names = "clki2si2_mck_i"; }; - clktdmin_mclk_i: oscillator@9 { + clktdmin_mclk_i: oscillator-mclk { compatible = "fixed-clock"; #clock-cells = <0>; clock-frequency = <30000000>;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 41/731 arm64: dts: mt2712e: Fix unit address for pinctrl node
In reply to Greg Kroah-HartmanFrom: AngeloGioacchino Del Regno <[email protected]>
[ Upstream commit 1d4516f53a611b362db7ba7a8889923d469f57e1 ]
The unit address for the pinctrl node is (0x)1000b000 and not (0x)10005000, which is the syscfg_pctl_a address instead.
This fixes the following warning:
arch/arm64/boot/dts/mediatek/mt2712e.dtsi:264.40-267.4: Warning (unique_unit_address): /syscfg_pctl_a@10005000: duplicate unit-address (also used in node /pinctrl@10005000)
--- arch/arm64/boot/dts/mediatek/mt2712e.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/mediatek/mt2712e.dtsi +1 -1
@@ -266,7 +266,7 @@ syscfg_pctl_a: syscfg_pctl_a@10005000 { reg = <0 0x10005000 0 0x1000>; }; - pio: pinctrl@10005000 { + pio: pinctrl@1000b000 { compatible = "mediatek,mt2712-pinctrl"; reg = <0 0x1000b000 0 0x1000>; mediatek,pctl-regmap = <&syscfg_pctl_a>;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 42/731 arm64: dts: mt2712-evb: Fix vproc fixed regulators unit names
In reply to Greg Kroah-HartmanFrom: AngeloGioacchino Del Regno <[email protected]>
[ Upstream commit 377063156893bf6c088309ac799fe5c6dce2822d ]
Update the names to regulator-vproc-buck{0,1} to fix unit_addres_vs_reg warnings for those.
--- arch/arm64/boot/dts/mediatek/mt2712-evb.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/mediatek/mt2712-evb.dts +2 -2
@@ -26,14 +26,14 @@ chosen { stdout-path = "serial0:921600n8"; }; - cpus_fixed_vproc0: fixedregulator@0 { + cpus_fixed_vproc0: regulator-vproc-buck0 { compatible = "regulator-fixed"; regulator-name = "vproc_buck0"; regulator-min-microvolt = <1000000>; regulator-max-microvolt = <1000000>; }; - cpus_fixed_vproc1: fixedregulator@1 { + cpus_fixed_vproc1: regulator-vproc-buck1 { compatible = "regulator-fixed"; regulator-name = "vproc_buck1"; regulator-min-microvolt = <1000000>;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 43/731 arm64: dts: mt2712-evb: Fix usb vbus regulators unit names
In reply to Greg Kroah-HartmanFrom: AngeloGioacchino Del Regno <[email protected]>
[ Upstream commit ec1ae39a8d25cfb067b5459fac7c5b7b9bce6f6a ]
Update the names to regulator-usb-p{0-3}-vbus to fix unit_address_vs_reg warnings for those.
--- arch/arm64/boot/dts/mediatek/mt2712-evb.dts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
arch/arm64/boot/dts/mediatek/mt2712-evb.dts +4 -4
@@ -50,7 +50,7 @@ extcon_usb1: extcon_iddig1 { id-gpio = <&pio 14 GPIO_ACTIVE_HIGH>; }; - usb_p0_vbus: regulator@2 { + usb_p0_vbus: regulator-usb-p0-vbus { compatible = "regulator-fixed"; regulator-name = "p0_vbus"; regulator-min-microvolt = <5000000>;
@@ -59,7 +59,7 @@ usb_p0_vbus: regulator@2 { enable-active-high; }; - usb_p1_vbus: regulator@3 { + usb_p1_vbus: regulator-usb-p1-vbus { compatible = "regulator-fixed"; regulator-name = "p1_vbus"; regulator-min-microvolt = <5000000>;
@@ -68,7 +68,7 @@ usb_p1_vbus: regulator@3 { enable-active-high; }; - usb_p2_vbus: regulator@4 { + usb_p2_vbus: regulator-usb-p2-vbus { compatible = "regulator-fixed"; regulator-name = "p2_vbus"; regulator-min-microvolt = <5000000>;
@@ -77,7 +77,7 @@ usb_p2_vbus: regulator@4 { enable-active-high; }; - usb_p3_vbus: regulator@5 { + usb_p3_vbus: regulator-usb-p3-vbus { compatible = "regulator-fixed"; regulator-name = "p3_vbus"; regulator-min-microvolt = <5000000>;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 44/731 arm64: dts: mediatek: pumpkin-common: Fix devicetree warnings
In reply to Greg Kroah-HartmanFrom: AngeloGioacchino Del Regno <[email protected]>
[ Upstream commit 509438336ce75c8b4e6ce8e8d507dc77d0783bdd ]
Fix the pinctrl submodes and optee node to remove unneeded unit address, fixing all unit_address_vs_reg warnings.
--- arch/arm64/boot/dts/mediatek/pumpkin-common.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
arch/arm64/boot/dts/mediatek/pumpkin-common.dtsi +3 -3
@@ -17,7 +17,7 @@ chosen { }; firmware { - optee: optee@4fd00000 { + optee: optee { compatible = "linaro,optee-tz"; method = "smc"; };
@@ -210,7 +210,7 @@ pins_cmd_dat { }; }; - i2c0_pins_a: i2c0@0 { + i2c0_pins_a: i2c0 { pins1 { pinmux = <MT8516_PIN_58_SDA0__FUNC_SDA0_0>, <MT8516_PIN_59_SCL0__FUNC_SCL0_0>;
@@ -218,7 +218,7 @@ pins1 { }; }; - i2c2_pins_a: i2c2@0 { + i2c2_pins_a: i2c2 { pins1 { pinmux = <MT8516_PIN_60_SDA2__FUNC_SDA2_0>, <MT8516_PIN_61_SCL2__FUNC_SCL2_0>;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 45/731 arm64: dts: mediatek: mt6797: Fix 26M oscillator unit name
In reply to Greg Kroah-HartmanFrom: AngeloGioacchino Del Regno <[email protected]>
[ Upstream commit 5f535cc583759c9c60d4cc9b8d221762e2d75387 ]
Update its unit name to oscillator-26m and remove the unneeded unit address to fix a unit_address_vs_reg warning.
--- arch/arm64/boot/dts/mediatek/mt6797.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/mediatek/mt6797.dtsi +1 -1
@@ -95,7 +95,7 @@ cpu9: cpu@201 { }; }; - clk26m: oscillator@0 { + clk26m: oscillator-26m { compatible = "fixed-clock"; #clock-cells = <0>; clock-frequency = <26000000>;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 46/731 ARM: dts: dove: Fix assigned-addresses for every PCIe Root Port
In reply to Greg Kroah-HartmanFrom: Pali Rohár <[email protected]>
[ Upstream commit dcc7d8c72b64a479b8017e4332d99179deb8802d ]
BDF of resource in DT assigned-addresses property of Marvell PCIe Root Port (PCI-to-PCI bridge) should match BDF in address part in that DT node name as specified resource belongs to Marvell PCIe Root Port itself.
--- arch/arm/boot/dts/dove.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/dove.dtsi +1 -1
@@ -129,7 +129,7 @@ pcie0: pcie@1 { pcie1: pcie@2 { device_type = "pci"; status = "disabled"; - assigned-addresses = <0x82002800 0 0x80000 0 0x2000>; + assigned-addresses = <0x82001000 0 0x80000 0 0x2000>; reg = <0x1000 0 0 0 0>; clocks = <&gate_clk 5>; marvell,pcie-port = <1>;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 47/731 ARM: dts: armada-370: Fix assigned-addresses for every PCIe Root Port
In reply to Greg Kroah-HartmanFrom: Pali Rohár <[email protected]>
[ Upstream commit d9208b0fa2e803d16b28d91bf1d46b7ee9ea13c6 ]
BDF of resource in DT assigned-addresses property of Marvell PCIe Root Port (PCI-to-PCI bridge) should match BDF in address part in that DT node name as specified resource belongs to Marvell PCIe Root Port itself.
--- arch/arm/boot/dts/armada-370.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/armada-370.dtsi +1 -1
@@ -74,7 +74,7 @@ pcie0: pcie@1,0 { pcie2: pcie@2,0 { device_type = "pci"; - assigned-addresses = <0x82002800 0 0x80000 0 0x2000>; + assigned-addresses = <0x82001000 0 0x80000 0 0x2000>; reg = <0x1000 0 0 0 0>; #address-cells = <3>; #size-cells = <2>;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 48/731 ARM: dts: armada-xp: Fix assigned-addresses for every PCIe Root Port
In reply to Greg Kroah-HartmanFrom: Pali Rohár <[email protected]>
[ Upstream commit eab276787f456cbea89fabea110fe0728673d308 ]
BDF of resource in DT assigned-addresses property of Marvell PCIe Root Port (PCI-to-PCI bridge) should match BDF in address part in that DT node name as specified resource belongs to Marvell PCIe Root Port itself.
--- arch/arm/boot/dts/armada-xp-mv78230.dtsi | 8 ++++---- arch/arm/boot/dts/armada-xp-mv78260.dtsi | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-)
arch/arm/boot/dts/armada-xp-mv78230.dtsi +4 -4
@@ -97,7 +97,7 @@ pcie1: pcie@1,0 { pcie2: pcie@2,0 { device_type = "pci"; - assigned-addresses = <0x82000800 0 0x44000 0 0x2000>; + assigned-addresses = <0x82001000 0 0x44000 0 0x2000>; reg = <0x1000 0 0 0 0>; #address-cells = <3>; #size-cells = <2>;
@@ -115,7 +115,7 @@ pcie2: pcie@2,0 { pcie3: pcie@3,0 { device_type = "pci"; - assigned-addresses = <0x82000800 0 0x48000 0 0x2000>; + assigned-addresses = <0x82001800 0 0x48000 0 0x2000>; reg = <0x1800 0 0 0 0>; #address-cells = <3>; #size-cells = <2>;
@@ -133,7 +133,7 @@ pcie3: pcie@3,0 { pcie4: pcie@4,0 { device_type = "pci"; - assigned-addresses = <0x82000800 0 0x4c000 0 0x2000>; + assigned-addresses = <0x82002000 0 0x4c000 0 0x2000>; reg = <0x2000 0 0 0 0>; #address-cells = <3>; #size-cells = <2>;
@@ -151,7 +151,7 @@ pcie4: pcie@4,0 { pcie5: pcie@5,0 { device_type = "pci"; - assigned-addresses = <0x82000800 0 0x80000 0 0x2000>; + assigned-addresses = <0x82002800 0 0x80000 0 0x2000>; reg = <0x2800 0 0 0 0>; #address-cells = <3>; #size-cells = <2>;
arch/arm/boot/dts/armada-xp-mv78260.dtsi +8 -8
@@ -112,7 +112,7 @@ pcie1: pcie@1,0 { pcie2: pcie@2,0 { device_type = "pci"; - assigned-addresses = <0x82000800 0 0x44000 0 0x2000>; + assigned-addresses = <0x82001000 0 0x44000 0 0x2000>; reg = <0x1000 0 0 0 0>; #address-cells = <3>; #size-cells = <2>;
@@ -130,7 +130,7 @@ pcie2: pcie@2,0 { pcie3: pcie@3,0 { device_type = "pci"; - assigned-addresses = <0x82000800 0 0x48000 0 0x2000>; + assigned-addresses = <0x82001800 0 0x48000 0 0x2000>; reg = <0x1800 0 0 0 0>; #address-cells = <3>; #size-cells = <2>;
@@ -148,7 +148,7 @@ pcie3: pcie@3,0 { pcie4: pcie@4,0 { device_type = "pci"; - assigned-addresses = <0x82000800 0 0x4c000 0 0x2000>; + assigned-addresses = <0x82002000 0 0x4c000 0 0x2000>; reg = <0x2000 0 0 0 0>; #address-cells = <3>; #size-cells = <2>;
@@ -166,7 +166,7 @@ pcie4: pcie@4,0 { pcie5: pcie@5,0 { device_type = "pci"; - assigned-addresses = <0x82000800 0 0x80000 0 0x2000>; + assigned-addresses = <0x82002800 0 0x80000 0 0x2000>; reg = <0x2800 0 0 0 0>; #address-cells = <3>; #size-cells = <2>;
@@ -184,7 +184,7 @@ pcie5: pcie@5,0 { pcie6: pcie@6,0 { device_type = "pci"; - assigned-addresses = <0x82000800 0 0x84000 0 0x2000>; + assigned-addresses = <0x82003000 0 0x84000 0 0x2000>; reg = <0x3000 0 0 0 0>; #address-cells = <3>; #size-cells = <2>;
@@ -202,7 +202,7 @@ pcie6: pcie@6,0 { pcie7: pcie@7,0 { device_type = "pci"; - assigned-addresses = <0x82000800 0 0x88000 0 0x2000>; + assigned-addresses = <0x82003800 0 0x88000 0 0x2000>; reg = <0x3800 0 0 0 0>; #address-cells = <3>; #size-cells = <2>;
@@ -220,7 +220,7 @@ pcie7: pcie@7,0 { pcie8: pcie@8,0 { device_type = "pci"; - assigned-addresses = <0x82000800 0 0x8c000 0 0x2000>; + assigned-addresses = <0x82004000 0 0x8c000 0 0x2000>; reg = <0x4000 0 0 0 0>; #address-cells = <3>; #size-cells = <2>;
@@ -238,7 +238,7 @@ pcie8: pcie@8,0 { pcie9: pcie@9,0 { device_type = "pci"; - assigned-addresses = <0x82000800 0 0x42000 0 0x2000>; + assigned-addresses = <0x82004800 0 0x42000 0 0x2000>; reg = <0x4800 0 0 0 0>; #address-cells = <3>; #size-cells = <2>;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 49/731 ARM: dts: armada-375: Fix assigned-addresses for every PCIe Root Port
In reply to Greg Kroah-HartmanFrom: Pali Rohár <[email protected]>
[ Upstream commit 823956d2436f70ced74c0fe8ab99facd8abfc060 ]
BDF of resource in DT assigned-addresses property of Marvell PCIe Root Port (PCI-to-PCI bridge) should match BDF in address part in that DT node name as specified resource belongs to Marvell PCIe Root Port itself.
--- arch/arm/boot/dts/armada-375.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/armada-375.dtsi +1 -1
@@ -582,7 +582,7 @@ pcie0: pcie@1,0 { pcie1: pcie@2,0 { device_type = "pci"; - assigned-addresses = <0x82000800 0 0x44000 0 0x2000>; + assigned-addresses = <0x82001000 0 0x44000 0 0x2000>; reg = <0x1000 0 0 0 0>; #address-cells = <3>; #size-cells = <2>;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 50/731 ARM: dts: armada-38x: Fix assigned-addresses for every PCIe Root Port
In reply to Greg Kroah-HartmanFrom: Pali Rohár <[email protected]>
[ Upstream commit 44f47b7a8fa4678ce4c38ea74837e4996b9df6d6 ]
BDF of resource in DT assigned-addresses property of Marvell PCIe Root Port (PCI-to-PCI bridge) should match BDF in address part in that DT node name as specified resource belongs to Marvell PCIe Root Port itself.
--- arch/arm/boot/dts/armada-380.dtsi | 4 ++-- arch/arm/boot/dts/armada-385.dtsi | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-)
arch/arm/boot/dts/armada-380.dtsi +2 -2
@@ -79,7 +79,7 @@ pcie@1,0 { /* x1 port */ pcie@2,0 { device_type = "pci"; - assigned-addresses = <0x82000800 0 0x40000 0 0x2000>; + assigned-addresses = <0x82001000 0 0x40000 0 0x2000>; reg = <0x1000 0 0 0 0>; #address-cells = <3>; #size-cells = <2>;
@@ -98,7 +98,7 @@ pcie@2,0 { /* x1 port */ pcie@3,0 { device_type = "pci"; - assigned-addresses = <0x82000800 0 0x44000 0 0x2000>; + assigned-addresses = <0x82001800 0 0x44000 0 0x2000>; reg = <0x1800 0 0 0 0>; #address-cells = <3>; #size-cells = <2>;
arch/arm/boot/dts/armada-385.dtsi +3 -3
@@ -84,7 +84,7 @@ pcie1: pcie@1,0 { /* x1 port */ pcie2: pcie@2,0 { device_type = "pci"; - assigned-addresses = <0x82000800 0 0x40000 0 0x2000>; + assigned-addresses = <0x82001000 0 0x40000 0 0x2000>; reg = <0x1000 0 0 0 0>; #address-cells = <3>; #size-cells = <2>;
@@ -103,7 +103,7 @@ pcie2: pcie@2,0 { /* x1 port */ pcie3: pcie@3,0 { device_type = "pci"; - assigned-addresses = <0x82000800 0 0x44000 0 0x2000>; + assigned-addresses = <0x82001800 0 0x44000 0 0x2000>; reg = <0x1800 0 0 0 0>; #address-cells = <3>; #size-cells = <2>;
@@ -125,7 +125,7 @@ pcie3: pcie@3,0 { */ pcie4: pcie@4,0 { device_type = "pci"; - assigned-addresses = <0x82000800 0 0x48000 0 0x2000>; + assigned-addresses = <0x82002000 0 0x48000 0 0x2000>; reg = <0x2000 0 0 0 0>; #address-cells = <3>; #size-cells = <2>;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 51/731 ARM: dts: armada-39x: Fix assigned-addresses for every PCIe Root Port
In reply to Greg Kroah-HartmanFrom: Pali Rohár <[email protected]>
[ Upstream commit 69236d2391b4d7324b11c3252921571577892e7b ]
BDF of resource in DT assigned-addresses property of Marvell PCIe Root Port (PCI-to-PCI bridge) should match BDF in address part in that DT node name as specified resource belongs to Marvell PCIe Root Port itself.
--- arch/arm/boot/dts/armada-39x.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
arch/arm/boot/dts/armada-39x.dtsi +3 -3
@@ -453,7 +453,7 @@ pcie@1,0 { /* x1 port */ pcie@2,0 { device_type = "pci"; - assigned-addresses = <0x82000800 0 0x40000 0 0x2000>; + assigned-addresses = <0x82001000 0 0x40000 0 0x2000>; reg = <0x1000 0 0 0 0>; #address-cells = <3>; #size-cells = <2>;
@@ -472,7 +472,7 @@ pcie@2,0 { /* x1 port */ pcie@3,0 { device_type = "pci"; - assigned-addresses = <0x82000800 0 0x44000 0 0x2000>; + assigned-addresses = <0x82001800 0 0x44000 0 0x2000>; reg = <0x1800 0 0 0 0>; #address-cells = <3>; #size-cells = <2>;
@@ -494,7 +494,7 @@ pcie@3,0 { */ pcie@4,0 { device_type = "pci"; - assigned-addresses = <0x82000800 0 0x48000 0 0x2000>; + assigned-addresses = <0x82002000 0 0x48000 0 0x2000>; reg = <0x2000 0 0 0 0>; #address-cells = <3>; #size-cells = <2>;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 52/731 ARM: dts: turris-omnia: Add ethernet aliases
In reply to Greg Kroah-HartmanFrom: Pali Rohár <[email protected]>
[ Upstream commit f1f3e530c59a7e8c5f06172f4c28b945a6b4bfb8 ]
This allows bootloader to correctly pass MAC addresses used by bootloader to individual interfaces into kernel device tree.
--- arch/arm/boot/dts/armada-385-turris-omnia.dts | 6 ++++++ 1 file changed, 6 insertions(+)
arch/arm/boot/dts/armada-385-turris-omnia.dts +6 -0
@@ -23,6 +23,12 @@ chosen { stdout-path = &uart0; }; + aliases { + ethernet0 = ð0; + ethernet1 = ð1; + ethernet2 = ð2; + }; + memory { device_type = "memory"; reg = <0x00000000 0x40000000>; /* 1024 MB */
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 53/731 ARM: dts: turris-omnia: Add switch port 6 node
In reply to Greg Kroah-HartmanFrom: Pali Rohár <[email protected]>
[ Upstream commit f87db2005f73876602211af0ee156817019b6bda ]
Switch port 6 is connected to eth0, so add appropriate device tree node for it.
--- arch/arm/boot/dts/armada-385-turris-omnia.dts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-)
arch/arm/boot/dts/armada-385-turris-omnia.dts +11 -1
@@ -456,7 +456,17 @@ fixed-link { }; }; - /* port 6 is connected to eth0 */ + ports@6 { + reg = <6>; + label = "cpu"; + ethernet = <ð0>; + phy-mode = "rgmii-id"; + + fixed-link { + speed = <1000>; + full-duplex; + }; + }; }; }; };
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 54/731 ARM: dts: armada-38x: Fix compatible string for gpios
In reply to Greg Kroah-HartmanFrom: Pali Rohár <[email protected]>
[ Upstream commit c4de4667f15d04ef5920bacf41e514ec7d1ef03d ]
Armada 38x supports per CPU interrupts for gpios, like Armada XP. Pre-XP variants like Armada 370 do not support per CPU interrupts for gpios.
So change compatible string for Armada 38x from "marvell,armada-370-gpio" which indicates pre-XP variant to "marvell,armadaxp-gpio" which indicates XP variant or new.
Driver gpio-mvebu.c which handles both pre-XP and XP variants already provides support for per CPU interrupts on XP and newer variants.
--- arch/arm/boot/dts/armada-38x.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/boot/dts/armada-38x.dtsi +2 -2
@@ -292,7 +292,7 @@ sata3_pins: sata-pins-3 { }; gpio0: gpio@18100 { - compatible = "marvell,armada-370-gpio", + compatible = "marvell,armadaxp-gpio", "marvell,orion-gpio"; reg = <0x18100 0x40>, <0x181c0 0x08>; reg-names = "gpio", "pwm";
@@ -310,7 +310,7 @@ gpio0: gpio@18100 { }; gpio1: gpio@18140 { - compatible = "marvell,armada-370-gpio", + compatible = "marvell,armadaxp-gpio", "marvell,orion-gpio"; reg = <0x18140 0x40>, <0x181c8 0x08>; reg-names = "gpio", "pwm";
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 55/731 ARM: dts: armada-39x: Fix compatible string for gpios
In reply to Greg Kroah-HartmanFrom: Pali Rohár <[email protected]>
[ Upstream commit d10886a4e6f85ee18d47a1066a52168461370ded ]
Armada 39x supports per CPU interrupts for gpios, like Armada XP.
So add compatible string "marvell,armadaxp-gpio" for Armada 39x GPIO nodes.
Driver gpio-mvebu.c which handles both pre-XP and XP variants already provides support for per CPU interrupts on XP and newer variants.
--- arch/arm/boot/dts/armada-39x.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/boot/dts/armada-39x.dtsi +2 -2
@@ -213,7 +213,7 @@ nand_pins: nand-pins { }; gpio0: gpio@18100 { - compatible = "marvell,orion-gpio"; + compatible = "marvell,armadaxp-gpio", "marvell,orion-gpio"; reg = <0x18100 0x40>; ngpios = <32>; gpio-controller;
@@ -227,7 +227,7 @@ gpio0: gpio@18100 { }; gpio1: gpio@18140 { - compatible = "marvell,orion-gpio"; + compatible = "marvell,armadaxp-gpio", "marvell,orion-gpio"; reg = <0x18140 0x40>; ngpios = <28>; gpio-controller;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 56/731 arm64: dts: armada-3720-turris-mox: Add missing interrupt for RTC
In reply to Greg Kroah-HartmanFrom: Pali Rohár <[email protected]>
[ Upstream commit 21aad8ba615e9c39cee6c5d0b76726f63791926c ]
MCP7940MT-I/MNY RTC has connected interrupt line to GPIO2_5.
--- arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts | 3 +++ 1 file changed, 3 insertions(+)
arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts +3 -0
@@ -125,9 +125,12 @@ &i2c0 { /delete-property/ mrvl,i2c-fast-mode; status = "okay"; + /* MCP7940MT-I/MNY RTC */ rtc@6f { compatible = "microchip,mcp7940x"; reg = <0x6f>; + interrupt-parent = <&gpiosb>; + interrupts = <5 0>; /* GPIO2_5 */ }; };
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 57/731 seccomp: Move copy_seccomp() to no failure path.
In reply to Greg Kroah-HartmanFrom: Kuniyuki Iwashima <[email protected]>
[ Upstream commit a1140cb215fa13dcec06d12ba0c3ee105633b7c4 ]
Our syzbot instance reported memory leaks in do_seccomp() [0], similar to the report [1]. It shows that we miss freeing struct seccomp_filter and some objects included in it.
We can reproduce the issue with the program below [2] which calls one seccomp() and two clone() syscalls.
The first clone()d child exits earlier than its parent and sends a signal to kill it during the second clone(), more precisely before the fatal_signal_pending() test in copy_process(). When the parent receives the signal, it has to destroy the embryonic process and return -EINTR to user space. In the failure path, we have to call seccomp_filter_release() to decrement the filter's refcount.
Initially, we called it in free_task() called from the failure path, but the commit 3a15fb6ed92c ("seccomp: release filter after task is fully dead") moved it to release_task() to notify user space as early as possible that the filter is no longer used.
To keep the change and current seccomp refcount semantics, let's move copy_seccomp() just after the signal check and add a WARN_ON_ONCE() in free_task() for future debugging.
[0]:
unreferenced object 0xffff8880063add00 (size 256):
comm "repro_seccomp", pid 230, jiffies 4294687090 (age 9.914s) hex dump (first 32 bytes):
01 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 ................ ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
backtrace:
do_seccomp (./include/linux/slab.h:600 ./include/linux/slab.h:733 kernel/seccomp.c:666 kernel/seccomp.c:708 kernel/seccomp.c:1871 kernel/seccomp.c:1991)
do_syscall_64 (arch/x86/entry/common.c:50 arch/x86/entry/common.c:80)
entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:120)
unreferenced object 0xffffc90000035000 (size 4096):
comm "repro_seccomp", pid 230, jiffies 4294687090 (age 9.915s)
hex dump (first 32 bytes):
01 00 00 00 00 00 00 00 00 00 00 00 05 00 00 00 ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
backtrace:
__vmalloc_node_range (mm/vmalloc.c:3226)
__vmalloc_node (mm/vmalloc.c:3261 (discriminator 4))
bpf_prog_alloc_no_stats (kernel/bpf/core.c:91)
bpf_prog_alloc (kernel/bpf/core.c:129)
bpf_prog_create_from_user (net/core/filter.c:1414)
do_seccomp (kernel/seccomp.c:671 kernel/seccomp.c:708 kernel/seccomp.c:1871 kernel/seccomp.c:1991)
do_syscall_64 (arch/x86/entry/common.c:50 arch/x86/entry/common.c:80)
entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:120)
unreferenced object 0xffff888003fa1000 (size 1024):
comm "repro_seccomp", pid 230, jiffies 4294687090 (age 9.915s)
hex dump (first 32 bytes):
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
backtrace:
bpf_prog_alloc_no_stats (./include/linux/slab.h:600 ./include/linux/slab.h:733 kernel/bpf/core.c:95)
bpf_prog_alloc (kernel/bpf/core.c:129)
bpf_prog_create_from_user (net/core/filter.c:1414)
do_seccomp (kernel/seccomp.c:671 kernel/seccomp.c:708 kernel/seccomp.c:1871 kernel/seccomp.c:1991)
do_syscall_64 (arch/x86/entry/common.c:50 arch/x86/entry/common.c:80)
entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:120)
unreferenced object 0xffff888006360240 (size 16):
comm "repro_seccomp", pid 230, jiffies 4294687090 (age 9.915s)
hex dump (first 16 bytes):
01 00 37 00 76 65 72 6c e0 83 01 06 80 88 ff ff ..7.verl........
backtrace:
bpf_prog_store_orig_filter (net/core/filter.c:1137)
bpf_prog_create_from_user (net/core/filter.c:1428)
do_seccomp (kernel/seccomp.c:671 kernel/seccomp.c:708 kernel/seccomp.c:1871 kernel/seccomp.c:1991)
do_syscall_64 (arch/x86/entry/common.c:50 arch/x86/entry/common.c:80)
entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:120)
unreferenced object 0xffff8880060183e0 (size 8):
comm "repro_seccomp", pid 230, jiffies 4294687090 (age 9.915s)
hex dump (first 8 bytes):
06 00 00 00 00 00 ff 7f ........
backtrace:
kmemdup (mm/util.c:129)
bpf_prog_store_orig_filter (net/core/filter.c:1144)
bpf_prog_create_from_user (net/core/filter.c:1428)
do_seccomp (kernel/seccomp.c:671 kernel/seccomp.c:708 kernel/seccomp.c:1871 kernel/seccomp.c:1991)
do_syscall_64 (arch/x86/entry/common.c:50 arch/x86/entry/common.c:80)
entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:120)[1]: https://syzkaller.appspot.com/bug?id=2809bb0ac77ad9aa3f4afe42d6a610aba594a987
[2]:
void main(void)
{
struct sock_filter filter[] = {
BPF_STMT(BPF_RET | BPF_K, SECCOMP_RET_ALLOW),
};
struct sock_fprog fprog = {
.len = sizeof(filter) / sizeof(filter[0]),
.filter = filter,
};
long i, pid;
syscall(__NR_seccomp, SECCOMP_SET_MODE_FILTER, 0, &fprog);
for (i = 0; i < 2; i++) {
pid = syscall(__NR_clone, CLONE_NEWNET | SIGKILL, NULL, NULL, 0);
if (pid == 0)
return;
}
}--- kernel/fork.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-)
kernel/fork.c +11 -6
@@ -446,6 +446,9 @@ void put_task_stack(struct task_struct *tsk)void free_task (struct task_struct *tsk) { +#ifdef CONFIG_SECCOMP +WARN_ON_ONCE (tsk->seccomp.filter); +#endif release_user_cpus_ptr (tsk);scs_release (tsk);
@@ -2345,12 +2348,6 @@ static __latent_entropy struct task_struct *copy_process(spin_lock (¤t->sighand->siglock); -/* -* Copy seccomp details explicitly here, in case they were changed -* before holding sighand lock. -*/ -copy_seccomp (p); -rseq_fork (p, clone_flags);/* Don't start children in a dying pid namespace */
@@ -2365,6 +2362,14 @@ static __latent_entropy struct task_struct *copy_process( goto bad_fork_cancel_cgroup; } +/* No more failure paths after this point. */ + +/* +* Copy seccomp details explicitly here, in case they were changed +* before holding sighand lock. +*/ +copy_seccomp (p); +init_task_pid_links (p);if (likely (p->pid)) {ptrace_init_task (p, (clone_flags &CLONE_PTRACE ) || trace);
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 58/731 pstore/ram: Fix error return code in ramoops_probe()
In reply to Greg Kroah-HartmanFrom: Wang Yufen <[email protected]>
[ Upstream commit e1fce564900f8734edf15b87f028c57e14f6e28d ]
In the if (dev_of_node(dev) && !pdata) path, the "err" may be assigned a value of 0, so the error return code -EINVAL may be incorrectly set to 0. To fix set valid return code before calling to goto.
--- fs/pstore/ram.c | 2 ++ 1 file changed, 2 insertions(+)
fs/pstore/ram.c +2 -0
@@ -735,6 +735,7 @@ static int ramoops_probe(struct platform_device *pdev)/* Make sure we didn't get bogus platform data pointer. */ if (!pdata) {pr_err ("NULL platform data\n" ); + err = -EINVAL ; goto fail_out; }
@@ -742,6 +743,7 @@ static int ramoops_probe(struct platform_device *pdev) !pdata->ftrace_size && !pdata->pmsg_size)) {pr_err ("The memory size and the record/console size must be " "non-zero\n" ); + err = -EINVAL ; goto fail_out; }
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 59/731 ARM: mmp: fix timer_read delay
In reply to Greg Kroah-HartmanFrom: Doug Brown <[email protected]>
[ Upstream commit e348b4014c31041e13ff370669ba3348c4d385e3 ]
timer_read() was using an empty 100-iteration loop to wait for the TMR_CVWR register to capture the latest timer counter value. The delay wasn't long enough. This resulted in CPU idle time being extremely underreported on PXA168 with CONFIG_NO_HZ_IDLE=y.
Switch to the approach used in the vendor kernel, which implements the capture delay by reading TMR_CVWR a few times instead.
--- arch/arm/mach-mmp/time.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)
arch/arm/mach-mmp/time.c +7 -4
@@ -43,18 +43,21 @@static void __iomem *mmp_timer_base =TIMERS_VIRT_BASE ;/* -* FIXME: the timer needs some delay to stablize the counter capture +* Read the timer through the CVWR register. Delay is required after requesting +* a read. The CR register cannot be directly read due to metastability issues +* documented in the PXA168 software manual. */ static inline uint32_t timer_read (void ) { -int delay =100 ; +uint32_t val; +int delay =3 ;__raw_writel (1 , mmp_timer_base +TMR_CVWR (1 ));while (delay--) -cpu_relax (); + val =__raw_readl (mmp_timer_base +TMR_CVWR (1 )); -return __raw_readl (mmp_timer_base +TMR_CVWR (1 )); +return val; } static u64 notrace mmp_read_sched_clock(void)
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 60/731 pstore: Avoid kcore oops by vmap()ing with VM_IOREMAP
In reply to Greg Kroah-HartmanFrom: Stephen Boyd <[email protected]>
[ Upstream commit e6b842741b4f39007215fd7e545cb55aa3d358a2 ]
An oops can be induced by running 'cat /proc/kcore > /dev/null' on devices using pstore with the ram backend because kmap_atomic() assumes lowmem pages are accessible with __va().
Unable to handle kernel paging request at virtual address ffffff807ff2b000 Mem abort info: ESR = 0x96000006 EC = 0x25: DABT (current EL), IL = 32 bits SET = 0, FnV = 0 EA = 0, S1PTW = 0 FSC = 0x06: level 2 translation fault Data abort info: ISV = 0, ISS = 0x00000006 CM = 0, WnR = 0 swapper pgtable: 4k pages, 39-bit VAs, pgdp=0000000081d87000 [ffffff807ff2b000] pgd=180000017fe18003, p4d=180000017fe18003, pud=180000017fe18003, pmd=0000000000000000 Internal error: Oops: 96000006 [#1] PREEMPT SMP Modules linked in: dm_integrity CPU: 7 PID: 21179 Comm: perf Not tainted 5.15.67-10882-ge4eb2eb988cd #1 baa443fb8e8477896a370b31a821eb2009f9bfba Hardware name: Google Lazor (rev3 - 8) (DT) pstate: a0400009 (NzCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : __memcpy+0x110/0x260 lr : vread+0x194/0x294 sp : ffffffc013ee39d0 x29: ffffffc013ee39f0 x28: 0000000000001000 x27: ffffff807ff2b000 x26: 0000000000001000 x25: ffffffc0085a2000 x24: ffffff802d4b3000 x23: ffffff80f8a60000 x22: ffffff802d4b3000 x21: ffffffc0085a2000 x20: ffffff8080b7bc68 x19: 0000000000001000 x18: 0000000000000000 x17: 0000000000000000 x16: 0000000000000000 x15: ffffffd3073f2e60 x14: ffffffffad588000 x13: 0000000000000000 x12: 0000000000000001 x11: 00000000000001a2 x10: 00680000fff2bf0b x9 : 03fffffff807ff2b x8 : 0000000000000001 x7 : 0000000000000000 x6 : 0000000000000000 x5 : ffffff802d4b4000 x4 : ffffff807ff2c000 x3 : ffffffc013ee3a78 x2 : 0000000000001000 x1 : ffffff807ff2b000 x0 : ffffff802d4b3000 Call trace: __memcpy+0x110/0x260 read_kcore+0x584/0x778 proc_reg_read+0xb4/0xe4
During early boot, memblock reserves the pages for the ramoops reserved memory node in DT that would otherwise be part of the direct lowmem mapping. Pstore's ram backend reuses those reserved pages to change the memory type (writeback or non-cached) by passing the pages to vmap() (see pfn_to_page() usage in persistent_ram_vmap() for more details) with specific flags. When read_kcore() starts iterating over the vmalloc region, it runs over the virtual address that vmap() returned for ramoops. In aligned_vread() the virtual address is passed to vmalloc_to_page() which returns the page struct for the reserved lowmem area. That lowmem page is passed to kmap_atomic(), which effectively calls page_to_virt() that assumes a lowmem page struct must be directly accessible with __va() and friends. These pages are mapped via vmap() though, and the lowmem mapping was never made, so accessing them via the lowmem virtual address oopses like above.
Let's side-step this problem by passing VM_IOREMAP to vmap(). This will tell vread() to not include the ramoops region in the kcore. Instead the area will look like a bunch of zeros. The alternative is to teach kmap() about vmalloc areas that intersect with lowmem. Presumably such a change isn't a one-liner, and there isn't much interest in inspecting the ramoops region in kcore files anyway, so the most expedient route is taken for now.
--- fs/pstore/ram_core.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
fs/pstore/ram_core.c +5 -1
@@ -439,7 +439,11 @@ static void *persistent_ram_vmap(phys_addr_t start, size_t size,phys_addr_t addr = page_start + i *PAGE_SIZE ; pages[i] =pfn_to_page (addr >>PAGE_SHIFT ); } - vaddr =vmap (pages, page_count,VM_MAP , prot); +/* +* VM_IOREMAP used here to bypass this region during vread() +* and kmap_atomic() (i.e. kcore) to avoid __va() failures. +*/ + vaddr =vmap (pages, page_count,VM_MAP |VM_IOREMAP , prot);kfree (pages);/*
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 61/731 tpm/tpm_ftpm_tee: Fix error handling in ftpm_mod_init()
In reply to Greg Kroah-HartmanFrom: Yuan Can <[email protected]>
[ Upstream commit 2b7d07f7acaac2c7750e420dcf4414588ede6d03 ]
The ftpm_mod_init() returns the driver_register() directly without checking its return value, if driver_register() failed, the ftpm_tee_plat_driver is not unregistered.
Fix by unregister ftpm_tee_plat_driver when driver_register() failed.
--- drivers/char/tpm/tpm_ftpm_tee.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
drivers/char/tpm/tpm_ftpm_tee.c +7 -1
@@ -397,7 +397,13 @@ static int __init ftpm_mod_init(void)if (rc)return rc; -return driver_register (&ftpm_tee_driver.driver); + rc =driver_register (&ftpm_tee_driver.driver); +if (rc) { +platform_driver_unregister (&ftpm_tee_plat_driver); +return rc; + } + +return 0 ; } static void __exit ftpm_mod_exit(void)
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 62/731 tpm/tpm_crb: Fix error message in __crb_relinquish_locality()
In reply to Greg Kroah-HartmanFrom: Michael Kelley <[email protected]>
[ Upstream commit f5264068071964b56dc02c9dab3d11574aaca6ff ]
The error message in __crb_relinquish_locality() mentions requestAccess instead of Relinquish. Fix it.
--- drivers/char/tpm/tpm_crb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/char/tpm/tpm_crb.c +1 -1
@@ -252,7 +252,7 @@ static int __crb_relinquish_locality(struct device *dev,iowrite32 (CRB_LOC_CTRL_RELINQUISH , &priv->regs_h->loc_ctrl);if (!crb_wait_for_reg_32 (&priv->regs_h->loc_state, mask, value,TPM2_TIMEOUT_C )) { -dev_warn (dev,"TPM_LOC_STATE_x.requestAccess timed out\n" ); +dev_warn (dev,"TPM_LOC_STATE_x.Relinquish timed out\n" );return -ETIME ; }
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 63/731 ovl: store lower path in ovl_inode
In reply to Greg Kroah-HartmanFrom: Amir Goldstein <[email protected]>
[ Upstream commit ffa5723c6d259b3191f851a50a98d0352b345b39 ]
Create some ovl_i_* helpers to get real path from ovl inode. Instead of just stashing struct inode for the lower layer we stash struct path for the lower layer. The helpers allow to retrieve a struct path for the relevant upper or lower layer. This will be used when retrieving information based on struct inode when copying up inode attributes from upper or lower inodes to ovl inodes and when checking permissions in ovl_permission() in following patches. This is needed to support idmapped base layers with overlay.
Stable-dep-of: b306e90ffabd ("ovl: remove privs in ovl_copyfile()")
--- fs/overlayfs/inode.c | 11 +++++++---- fs/overlayfs/overlayfs.h | 2 ++ fs/overlayfs/ovl_entry.h | 2 +- fs/overlayfs/super.c | 5 +++-- fs/overlayfs/util.c | 15 ++++++++++++++- 5 files changed, 27 insertions(+), 8 deletions(-)
fs/overlayfs/inode.c +7 -4
@@ -777,13 +777,16 @@ void ovl_inode_init(struct inode *inode, struct ovl_inode_params *oip, unsigned long ino, int fsid) {struct inode *realinode; +struct ovl_inode *oi =OVL_I (inode);if (oip->upperdentry) -OVL_I (inode)->__upperdentry = oip->upperdentry; -if (oip->lowerpath && oip->lowerpath->dentry) -OVL_I (inode)->lower =igrab (d_inode (oip->lowerpath->dentry)); + oi->__upperdentry = oip->upperdentry; +if (oip->lowerpath && oip->lowerpath->dentry) { + oi->lowerpath.dentry =dget (oip->lowerpath->dentry); + oi->lowerpath.layer = oip->lowerpath->layer; + }if (oip->lowerdata) -OVL_I (inode)->lowerdata =igrab (d_inode (oip->lowerdata)); + oi->lowerdata =igrab (d_inode (oip->lowerdata)); realinode =ovl_inode_real (inode);ovl_copyattr (realinode, inode);
fs/overlayfs/overlayfs.h +2 -0
@@ -293,10 +293,12 @@ enum ovl_path_type ovl_path_type(struct dentry *dentry);void ovl_path_upper (struct dentry *dentry,struct path *path);void ovl_path_lower (struct dentry *dentry,struct path *path);void ovl_path_lowerdata (struct dentry *dentry,struct path *path); +void ovl_i_path_real (struct inode *inode,struct path *path);enum ovl_path_type ovl_path_real (struct dentry *dentry,struct path *path);struct dentry *ovl_dentry_upper (struct dentry *dentry);struct dentry *ovl_dentry_lower (struct dentry *dentry);struct dentry *ovl_dentry_lowerdata (struct dentry *dentry); +const struct ovl_layer *ovl_i_layer_lower (struct inode *inode);const struct ovl_layer *ovl_layer_lower (struct dentry *dentry);struct dentry *ovl_dentry_real (struct dentry *dentry);struct dentry *ovl_i_dentry_upper (struct inode *inode);
fs/overlayfs/ovl_entry.h +1 -1
@@ -129,7 +129,7 @@ struct ovl_inode {unsigned long flags;struct inode vfs_inode;struct dentry *__upperdentry; -struct inode *lower; +struct ovl_path lowerpath;/* synchronize copy up and more */ struct mutex lock;
fs/overlayfs/super.c +3 -2
@@ -184,7 +184,8 @@ static struct inode *ovl_alloc_inode(struct super_block *sb) oi->version =0 ; oi->flags =0 ; oi->__upperdentry =NULL ; - oi->lower =NULL ; + oi->lowerpath.dentry =NULL ; + oi->lowerpath.layer =NULL ; oi->lowerdata =NULL ;mutex_init (&oi->lock);
@@ -205,7 +206,7 @@ static void ovl_destroy_inode(struct inode *inode)struct ovl_inode *oi =OVL_I (inode);dput (oi->__upperdentry); -iput (oi->lower); +dput (oi->lowerpath.dentry);if (S_ISDIR (inode->i_mode))ovl_dir_cache_free (inode);else
fs/overlayfs/util.c +14 -1
@@ -236,6 +236,17 @@ struct dentry *ovl_i_dentry_upper(struct inode *inode)return ovl_upperdentry_dereference (OVL_I (inode)); } +void ovl_i_path_real (struct inode *inode,struct path *path) +{ + path->dentry =ovl_i_dentry_upper (inode); +if (!path->dentry) { + path->dentry =OVL_I (inode)->lowerpath.dentry; + path->mnt =OVL_I (inode)->lowerpath.layer->mnt; + }else { + path->mnt =ovl_upper_mnt (OVL_FS (inode->i_sb)); + } +} +struct inode *ovl_inode_upper (struct inode *inode) {struct dentry *upperdentry =ovl_i_dentry_upper (inode);
@@ -245,7 +256,9 @@ struct inode *ovl_inode_upper(struct inode *inode)struct inode *ovl_inode_lower (struct inode *inode) { -return OVL_I (inode)->lower; +struct dentry *lowerdentry =OVL_I (inode)->lowerpath.dentry; + +return lowerdentry ?d_inode (lowerdentry) :NULL ; }struct inode *ovl_inode_real (struct inode *inode)
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 64/731 ovl: use ovl_copy_{real,upper}attr() wrappers
In reply to Greg Kroah-HartmanFrom: Christian Brauner <[email protected]>
[ Upstream commit 2878dffc7db0b5a51e308ccb6b571296b57c82e7 ]
When copying inode attributes from the upper or lower layer to ovl inodes we need to take the upper or lower layer's mount's idmapping into account. In a lot of places we call ovl_copyattr() only on upper inodes and in some we call it on either upper or lower inodes. Split this into two separate helpers.
The first one should only be called on upper
inodes and is thus called ovl_copy_upperattr(). The second one can be called on upper or lower inodes. We add ovl_copy_realattr() for this task. The new helper makes use of the previously added ovl_i_path_real() helper. This is needed to support idmapped base layers with overlay.
When overlay copies the inode information from an upper or lower layer to the relevant overlay inode it will apply the idmapping of the upper or lower layer when doing so. The ovl inode ownership will thus always correctly reflect the ownership of the idmapped upper or lower layer.
All idmapping helpers are nops when no idmapped base layers are used.
Stable-dep-of: b306e90ffabd ("ovl: remove privs in ovl_copyfile()")
--- fs/overlayfs/dir.c | 10 ++++------ fs/overlayfs/file.c | 15 +++++++-------- fs/overlayfs/inode.c | 8 ++++---- fs/overlayfs/overlayfs.h | 11 +---------- fs/overlayfs/util.c | 32 +++++++++++++++++++++++++++++++- 5 files changed, 47 insertions(+), 29 deletions(-)
fs/overlayfs/dir.c +4 -6
@@ -880,7 +880,6 @@ static int ovl_do_remove(struct dentry *dentry, bool is_dir) {int err;const struct cred *old_cred; -struct dentry *upperdentry;bool lower_positive =ovl_lower_positive (dentry);LIST_HEAD (list);
@@ -923,9 +922,8 @@ static int ovl_do_remove(struct dentry *dentry, bool is_dir)* Note: we fail to update ctime if there was no copy-up, only a * whiteout */ - upperdentry =ovl_dentry_upper (dentry); -if (upperdentry) -ovl_copyattr (d_inode (upperdentry),d_inode (dentry)); +if (ovl_dentry_upper (dentry)) +ovl_copyattr (d_inode (dentry)); out_drop_write:ovl_drop_write (dentry);
@@ -1272,9 +1270,9 @@ static int ovl_rename(struct user_namespace *mnt_userns, struct inode *olddir, (d_inode(new) && ovl_type_origin(new)));/* copy ctime: */ -ovl_copyattr (d_inode (olddentry),d_inode (old)); +ovl_copyattr (d_inode (old));if (d_inode (new) &&ovl_dentry_upper (new)) -ovl_copyattr (d_inode (newdentry),d_inode (new)); +ovl_copyattr (d_inode (new)); out_dput:dput (newdentry);
fs/overlayfs/file.c +7 -8
@@ -273,7 +273,7 @@ static void ovl_aio_cleanup_handler(struct ovl_aio_req *aio_req)__sb_writers_acquired (file_inode (iocb->ki_filp)->i_sb,SB_FREEZE_WRITE );file_end_write (iocb->ki_filp); -ovl_copyattr (ovl_inode_real (inode), inode); +ovl_copyattr (inode); } orig_iocb->ki_pos = iocb->ki_pos;
@@ -356,7 +356,7 @@ static ssize_t ovl_write_iter(struct kiocb *iocb, struct iov_iter *iter)inode_lock (inode);/* Update mode */ -ovl_copyattr (ovl_inode_real (inode), inode); +ovl_copyattr (inode); ret =file_remove_privs (file);if (ret) goto out_unlock;
@@ -381,7 +381,7 @@ static ssize_t ovl_write_iter(struct kiocb *iocb, struct iov_iter *iter) ovl_iocb_to_rwf(ifl));file_end_write (real.file);/* Update size */ -ovl_copyattr (ovl_inode_real (inode), inode); +ovl_copyattr (inode); }else {struct ovl_aio_req *aio_req;
@@ -431,12 +431,11 @@ static ssize_t ovl_splice_write(struct pipe_inode_info *pipe, struct file *out,struct fd real;const struct cred *old_cred;struct inode *inode =file_inode (out); -struct inode *realinode =ovl_inode_real (inode);ssize_t ret;inode_lock (inode);/* Update mode */ -ovl_copyattr (realinode, inode); +ovl_copyattr (inode); ret =file_remove_privs (out);if (ret) goto out_unlock;
@@ -452,7 +451,7 @@ static ssize_t ovl_splice_write(struct pipe_inode_info *pipe, struct file *out,file_end_write (real.file);/* Update size */ -ovl_copyattr (realinode, inode); +ovl_copyattr (inode);revert_creds (old_cred);fdput (real);
@@ -526,7 +525,7 @@ static long ovl_fallocate(struct file *file, int mode, loff_t offset, loff_t lenrevert_creds (old_cred);/* Update size */ -ovl_copyattr (ovl_inode_real (inode), inode); +ovl_copyattr (inode);fdput (real);
@@ -598,7 +597,7 @@ static loff_t ovl_copyfile(struct file *file_in, loff_t pos_in,revert_creds (old_cred);/* Update size */ -ovl_copyattr (ovl_inode_real (inode_out), inode_out); +ovl_copyattr (inode_out);fdput (real_in);fdput (real_out);
fs/overlayfs/inode.c +4 -4
@@ -80,7 +80,7 @@ int ovl_setattr(struct user_namespace *mnt_userns, struct dentry *dentry, err =notify_change (&init_user_ns, upperdentry, attr,NULL );revert_creds (old_cred);if (!err) -ovl_copyattr (upperdentry->d_inode, dentry->d_inode); +ovl_copyattr (dentry->d_inode);inode_unlock (upperdentry->d_inode);if (winode)
@@ -377,7 +377,7 @@ int ovl_xattr_set(struct dentry *dentry, struct inode *inode, const char *name,revert_creds (old_cred);/* copy c/mtime */ -ovl_copyattr (d_inode (realdentry), inode); +ovl_copyattr (inode); out_drop_write:ovl_drop_write (dentry);
@@ -579,7 +579,7 @@ int ovl_fileattr_set(struct user_namespace *mnt_userns,inode_set_flags (inode, flags,OVL_COPY_I_FLAGS_MASK );/* Update ctime */ -ovl_copyattr (ovl_inode_real (inode), inode); +ovl_copyattr (inode); }ovl_drop_write (dentry); out:
@@ -789,7 +789,7 @@ void ovl_inode_init(struct inode *inode, struct ovl_inode_params *oip, oi->lowerdata =igrab (d_inode (oip->lowerdata)); realinode =ovl_inode_real (inode); -ovl_copyattr (realinode, inode); +ovl_copyattr (inode);ovl_copyflags (realinode, inode);ovl_map_ino (inode, ino, fsid); }
fs/overlayfs/overlayfs.h +1 -10
@@ -522,16 +522,7 @@ bool ovl_lookup_trap_inode(struct super_block *sb, struct dentry *dir);struct inode *ovl_get_trap_inode (struct super_block *sb,struct dentry *dir);struct inode *ovl_get_inode (struct super_block *sb,struct ovl_inode_params *oip); -static inline void ovl_copyattr (struct inode *from,struct inode *to) -{ - to->i_uid = from->i_uid; - to->i_gid = from->i_gid; - to->i_mode = from->i_mode; - to->i_atime = from->i_atime; - to->i_mtime = from->i_mtime; - to->i_ctime = from->i_ctime; -i_size_write (to,i_size_read (from)); -} +void ovl_copyattr (struct inode *to);/* vfs inode flags copied from real to ovl inode */ #define OVL_COPY_I_FLAGS_MASK (S_SYNC | S_NOATIME | S_APPEND | S_IMMUTABLE)
fs/overlayfs/util.c +31 -1
@@ -456,7 +456,7 @@ static void ovl_dir_version_inc(struct dentry *dentry, bool impurity)void ovl_dir_modified (struct dentry *dentry,bool impurity) {/* Copy mtime/ctime */ -ovl_copyattr (d_inode (ovl_dentry_upper (dentry)),d_inode (dentry)); +ovl_copyattr (d_inode (dentry));ovl_dir_version_inc (dentry, impurity); }
@@ -1073,3 +1073,33 @@ int ovl_sync_status(struct ovl_fs *ofs)return errseq_check (&mnt->mnt_sb->s_wb_err, ofs->errseq); } + +/* +* ovl_copyattr() - copy inode attributes from layer to ovl inode +* +* When overlay copies inode information from an upper or lower layer to the +* relevant overlay inode it will apply the idmapping of the upper or lower +* layer when doing so ensuring that the ovl inode ownership will correctly +* reflect the ownership of the idmapped upper or lower layer. For example, an +* idmapped upper or lower layer mapping id 1001 to id 1000 will take care to +* map any lower or upper inode owned by id 1001 to id 1000. These mapping +* helpers are nops when the relevant layer isn't idmapped. +*/ +void ovl_copyattr (struct inode *inode) +{ +struct path realpath; +struct inode *realinode; +struct user_namespace *real_mnt_userns; + +ovl_i_path_real (inode, &realpath); + realinode =d_inode (realpath.dentry); + real_mnt_userns =mnt_user_ns (realpath.mnt); + + inode->i_uid =i_uid_into_mnt (real_mnt_userns, realinode); + inode->i_gid =i_gid_into_mnt (real_mnt_userns, realinode); + inode->i_mode = realinode->i_mode; + inode->i_atime = realinode->i_atime; + inode->i_mtime = realinode->i_mtime; + inode->i_ctime = realinode->i_ctime; +i_size_write (inode,i_size_read (realinode)); +}
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 65/731 ovl: remove privs in ovl_copyfile()
In reply to Greg Kroah-HartmanFrom: Amir Goldstein <[email protected]>
[ Upstream commit b306e90ffabdaa7e3b3350dbcd19b7663e71ab17 ]
Underlying fs doesn't remove privs because copy_range/remap_range are called with privileged mounter credentials.
This fixes some failures in fstest generic/673.
--- fs/overlayfs/file.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-)
fs/overlayfs/file.c +14 -2
@@ -566,14 +566,23 @@ static loff_t ovl_copyfile(struct file *file_in, loff_t pos_in,const struct cred *old_cred;loff_t ret; +inode_lock (inode_out); +if (op !=OVL_DEDUPE ) { +/* Update mode */ +ovl_copyattr (inode_out); + ret =file_remove_privs (file_out); +if (ret) + goto out_unlock; + } + ret =ovl_real_fdget (file_out, &real_out);if (ret) -return ret; + goto out_unlock; ret =ovl_real_fdget (file_in, &real_in);if (ret) {fdput (real_out); -return ret; + goto out_unlock; } old_cred =ovl_override_creds (file_inode (file_out)->i_sb);
@@ -602,6 +611,9 @@ static loff_t ovl_copyfile(struct file *file_in, loff_t pos_in,fdput (real_in);fdput (real_out); +out_unlock: +inode_unlock (inode_out); +return ret; }
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 66/731 ovl: remove privs in ovl_fallocate()
In reply to Greg Kroah-HartmanFrom: Amir Goldstein <[email protected]>
[ Upstream commit 23a8ce16419a3066829ad4a8b7032a75817af65b ]
Underlying fs doesn't remove privs because fallocate is called with privileged mounter credentials.
This fixes some failure in fstests generic/683..687.
--- fs/overlayfs/file.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-)
fs/overlayfs/file.c +11 -1
@@ -516,9 +516,16 @@ static long ovl_fallocate(struct file *file, int mode, loff_t offset, loff_t lenconst struct cred *old_cred;int ret; +inode_lock (inode); +/* Update mode */ +ovl_copyattr (inode); + ret =file_remove_privs (file); +if (ret) + goto out_unlock; + ret =ovl_real_fdget (file, &real);if (ret) -return ret; + goto out_unlock; old_cred =ovl_override_creds (file_inode (file)->i_sb); ret =vfs_fallocate (real.file, mode, offset, len);
@@ -529,6 +536,9 @@ static long ovl_fallocate(struct file *file, int mode, loff_t offset, loff_t lenfdput (real); +out_unlock: +inode_unlock (inode); +return ret; }
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 67/731 sched/fair: Cleanup task_util and capacity type
In reply to Greg Kroah-HartmanFrom: Vincent Donnefort <[email protected]>
[ Upstream commit ef8df9798d469b7c45c66664550e93469749f1e8 ]
task_util and capacity are comparable unsigned long values. There is no need for an intermidiate implicit signed cast.
Stable-dep-of: 48d5e9daa8b7 ("sched/uclamp: Fix relationship between uclamp and migration margin")
--- kernel/sched/fair.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
kernel/sched/fair.c +3 -2
@@ -4120,7 +4120,8 @@ static inline void util_est_update(struct cfs_rq *cfs_rq,trace_sched_util_est_se_tp (&p->se); } -static inline int task_fits_capacity (struct task_struct *p,long capacity) +static inline int task_fits_capacity (struct task_struct *p, +unsigned long capacity) {return fits_capacity (uclamp_task_util (p), capacity); }
@@ -6398,7 +6399,7 @@ select_idle_capacity(struct task_struct *p, struct sched_domain *sd, int target)return best_cpu; } -static inline bool asym_fits_capacity (int task_util,int cpu) +static inline bool asym_fits_capacity (unsigned long task_util,int cpu) {if (static_branch_unlikely (&sched_asym_cpucapacity))return fits_capacity (task_util,capacity_of (cpu));
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 68/731 sched/uclamp: Fix relationship between uclamp and migration margin
In reply to Greg Kroah-HartmanFrom: Qais Yousef <[email protected]>
[ Upstream commit 48d5e9daa8b767e75ed9421665b037a49ce4bc04 ]
fits_capacity() verifies that a util is within 20% margin of the capacity of a CPU, which is an attempt to speed up upmigration.
But when uclamp is used, this 20% margin is problematic because for example if a task is boosted to 1024, then it will not fit on any CPU according to fits_capacity() logic.
Or if a task is boosted to capacity_orig_of(medium_cpu). The task will end up on big instead on the desired medium CPU.
Similar corner cases exist for uclamp and usage of capacity_of(). Slightest irq pressure on biggest CPU for example will make a 1024 boosted task look like it can't fit.
What we really want is for uclamp comparisons to ignore the migration margin and capacity pressure, yet retain them for when checking the _actual_ util signal.
For example, task p:
p->util_avg = 300 p->uclamp[UCLAMP_MIN] = 1024
Will fit a big CPU. But
p->util_avg = 900 p->uclamp[UCLAMP_MIN] = 1024
will not, this should trigger overutilized state because the big CPU is now *actually* being saturated.
Similar reasoning applies to capping tasks with UCLAMP_MAX. For example:
p->util_avg = 1024 p->uclamp[UCLAMP_MAX] = capacity_orig_of(medium_cpu)
Should fit the task on medium cpus without triggering overutilized state.
Inlined comments expand more on desired behavior in more scenarios.
Introduce new util_fits_cpu() function which encapsulates the new logic. The new function is not used anywhere yet, but will be used to update various users of fits_capacity() in later patches.
--- kernel/sched/fair.c | 123 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 123 insertions(+)
kernel/sched/fair.c +123 -0
@@ -4120,6 +4120,129 @@ static inline void util_est_update(struct cfs_rq *cfs_rq,trace_sched_util_est_se_tp (&p->se); } +static inline int util_fits_cpu (unsigned long util, +unsigned long uclamp_min, +unsigned long uclamp_max, +int cpu) +{ +unsigned long capacity_orig, capacity_orig_thermal; +unsigned long capacity =capacity_of (cpu); +bool fits, uclamp_max_fits; + +/* +* Check if the real util fits without any uclamp boost/cap applied. +*/ + fits =fits_capacity (util, capacity); + +if (!uclamp_is_used ()) +return fits; + +/* +* We must use capacity_orig_of() for comparing against uclamp_min and +* uclamp_max. We only care about capacity pressure (by using +* capacity_of()) for comparing against the real util. +* +* If a task is boosted to 1024 for example, we don't want a tiny +* pressure to skew the check whether it fits a CPU or not. +* +* Similarly if a task is capped to capacity_orig_of(little_cpu), it +* should fit a little cpu even if there's some pressure. +* +* Only exception is for thermal pressure since it has a direct impact +* on available OPP of the system. +* +* We honour it for uclamp_min only as a drop in performance level +* could result in not getting the requested minimum performance level. +* +* For uclamp_max, we can tolerate a drop in performance level as the +* goal is to cap the task. So it's okay if it's getting less. +* +* In case of capacity inversion, which is not handled yet, we should +* honour the inverted capacity for both uclamp_min and uclamp_max all +* the time. +*/ + capacity_orig =capacity_orig_of (cpu); + capacity_orig_thermal = capacity_orig -arch_scale_thermal_pressure (cpu); + +/* +* We want to force a task to fit a cpu as implied by uclamp_max. +* But we do have some corner cases to cater for.. +* +* +* C=z +* | ___ +* | C=y | | +* |_ _ _ _ _ _ _ _ _ ___ _ _ _ | _ | _ _ _ _ _ uclamp_max +* | C=x | | | | +* | ___ | | | | +* | | | | | | | (util somewhere in this region) +* | | | | | | | +* | | | | | | | +* +---------------------------------------- +* cpu0 cpu1 cpu2 +* +* In the above example if a task is capped to a specific performance +* point, y, then when: +* +* * util = 80% of x then it does not fit on cpu0 and should migrate +* to cpu1 +* * util = 80% of y then it is forced to fit on cpu1 to honour +* uclamp_max request. +* +* which is what we're enforcing here. A task always fits if +* uclamp_max <= capacity_orig. But when uclamp_max > capacity_orig, +* the normal upmigration rules should withhold still. +* +* Only exception is when we are on max capacity, then we need to be +* careful not to block overutilized state. This is so because: +* +* 1. There's no concept of capping at max_capacity! We can't go +* beyond this performance level anyway. +* 2. The system is being saturated when we're operating near +* max capacity, it doesn't make sense to block overutilized. +*/ + uclamp_max_fits = (capacity_orig ==SCHED_CAPACITY_SCALE ) && (uclamp_max ==SCHED_CAPACITY_SCALE ); + uclamp_max_fits = !uclamp_max_fits && (uclamp_max <= capacity_orig); + fits = fits || uclamp_max_fits; + +/* +* +* C=z +* | ___ (region a, capped, util >= uclamp_max) +* | C=y | | +* |_ _ _ _ _ _ _ _ _ ___ _ _ _ | _ | _ _ _ _ _ uclamp_max +* | C=x | | | | +* | ___ | | | | (region b, uclamp_min <= util <= uclamp_max) +* |_ _ _|_ _|_ _ _ _| _ | _ _ _| _ | _ _ _ _ _ uclamp_min +* | | | | | | | +* | | | | | | | (region c, boosted, util < uclamp_min) +* +---------------------------------------- +* cpu0 cpu1 cpu2 +* +* a) If util > uclamp_max, then we're capped, we don't care about +* actual fitness value here. We only care if uclamp_max fits +* capacity without taking margin/pressure into account. +* See comment above. +* +* b) If uclamp_min <= util <= uclamp_max, then the normal +* fits_capacity() rules apply. Except we need to ensure that we +* enforce we remain within uclamp_max, see comment above. +* +* c) If util < uclamp_min, then we are boosted. Same as (b) but we +* need to take into account the boosted value fits the CPU without +* taking margin/pressure into account. +* +* Cases (a) and (b) are handled in the 'fits' variable already. We +* just need to consider an extra check for case (c) after ensuring we +* handle the case uclamp_min > uclamp_max. +*/ + uclamp_min =min (uclamp_min, uclamp_max); +if (util < uclamp_min && capacity_orig !=SCHED_CAPACITY_SCALE ) + fits = fits && (uclamp_min <= capacity_orig_thermal); + +return fits; +} +static inline int task_fits_capacity (struct task_struct *p,unsigned long capacity) {
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 69/731 sched/uclamp: Make task_fits_capacity() use util_fits_cpu()
In reply to Greg Kroah-HartmanFrom: Qais Yousef <[email protected]>
[ Upstream commit b48e16a69792b5dc4a09d6807369d11b2970cc36 ]
So that the new uclamp rules in regard to migration margin and capacity pressure are taken into account correctly.
--- kernel/sched/fair.c | 26 ++++++++++++++++---------- kernel/sched/sched.h | 9 +++++++++ 2 files changed, 25 insertions(+), 10 deletions(-)
kernel/sched/fair.c +16 -10
@@ -4243,10 +4243,12 @@ static inline int util_fits_cpu(unsignedreturn fits; } -static inline int task_fits_capacity (struct task_struct *p, -unsigned long capacity) +static inline int task_fits_cpu (struct task_struct *p,int cpu) { -return fits_capacity (uclamp_task_util (p), capacity); +unsigned long uclamp_min =uclamp_eff_value (p,UCLAMP_MIN ); +unsigned long uclamp_max =uclamp_eff_value (p,UCLAMP_MAX ); +unsigned long util =task_util_est (p); +return util_fits_cpu (util, uclamp_min, uclamp_max, cpu); }static inline void update_misfit_status (struct task_struct *p,struct rq *rq)
@@ -4259,7 +4261,7 @@ static inline void update_misfit_status(return ; } -if (task_fits_capacity (p,capacity_of (cpu_of (rq)))) { +if (task_fits_cpu (p,cpu_of (rq))) { rq->misfit_task_load =0 ;return ; }
@@ -8157,7 +8159,7 @@ static int detach_tasks(struct lb_env *ecase migrate_misfit:/* This is not a misfit task */ -if (task_fits_capacity (p,capacity_of (env->src_cpu))) +if (task_fits_cpu (p, env->src_cpu)) goto next; env->imbalance =0 ;
@@ -9042,6 +9044,10 @@ static inline void update_sg_wakeup_statmemset (sgs,0 ,sizeof (*sgs)); +/* Assume that task can't fit any CPU of the group */ +if (sd->flags &SD_ASYM_CPUCAPACITY ) + sgs->group_misfit_task_load =1 ; +for_each_cpu (i,sched_group_span (group)) {struct rq *rq =cpu_rq (i);unsigned int local;
@@ -9061,12 +9067,12 @@ static inline void update_sg_wakeup_statif (!nr_running &&idle_cpu_without (i, p)) sgs->idle_cpus++; - } +/* Check if task fits in the CPU */ +if (sd->flags &SD_ASYM_CPUCAPACITY && + sgs->group_misfit_task_load && +task_fits_cpu (p, i)) + sgs->group_misfit_task_load =0 ; -/* Check if task fits in the group */ -if (sd->flags &SD_ASYM_CPUCAPACITY && - !task_fits_capacity (p, group->sgc->max_capacity)) { - sgs->group_misfit_task_load =1 ; } sgs->group_capacity = group->sgc->capacity;
kernel/sched/sched.h +9 -0
@@ -2916,6 +2916,15 @@ static inline bool uclamp_is_used(void) return static_branch_likely(&sched_uclamp_used); }#else /* CONFIG_UCLAMP_TASK */ +static inline unsigned long uclamp_eff_value (struct task_struct *p, +enum uclamp_id clamp_id) +{ +if (clamp_id ==UCLAMP_MIN ) +return 0 ; + +return SCHED_CAPACITY_SCALE ; +} +static inline unsigned long uclamp_rq_util_with (struct rq *rq,unsigned long util,struct task_struct *p)
Greg Kroah-Hartman
maintainerPATCH 70/731 sched/uclamp: Make select_idle_capacity() use util_fits_cpu()
In reply to Greg Kroah-HartmanFrom: Qais Yousef <[email protected]>
[ Upstream commit b759caa1d9f667b94727b2ad12589cbc4ce13a82 ]
Use the new util_fits_cpu() to ensure migration margin and capacity pressure are taken into account correctly when uclamp is being used otherwise we will fail to consider CPUs as fitting in scenarios where they should.
--- kernel/sched/fair.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
kernel/sched/fair.c +5 -3
@@ -6498,21 +6498,23 @@ static int select_idle_cpu(struct task_struct *p, struct sched_domain *sd, boolstatic int select_idle_capacity (struct task_struct *p,struct sched_domain *sd,int target) { -unsigned long task_util, best_cap =0 ; +unsigned long task_util, util_min, util_max, best_cap =0 ;int cpu, best_cpu =-1 ;struct cpumask *cpus; cpus =this_cpu_cpumask_var_ptr (select_idle_mask);cpumask_and (cpus,sched_domain_span (sd), p->cpus_ptr); - task_util =uclamp_task_util (p); + task_util =task_util_est (p); + util_min =uclamp_eff_value (p,UCLAMP_MIN ); + util_max =uclamp_eff_value (p,UCLAMP_MAX );for_each_cpu_wrap (cpu, cpus, target) {unsigned long cpu_cap =capacity_of (cpu);if (!available_idle_cpu (cpu) && !sched_idle_cpu (cpu))continue ; -if (fits_capacity (task_util, cpu_cap)) +if (util_fits_cpu (task_util, util_min, util_max, cpu))return cpu;if (cpu_cap > best_cap) {
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 71/731 sched/fair: Removed useless update of p->recent_used_cpu
In reply to Greg Kroah-HartmanFrom: Vincent Guittot <[email protected]>
[ Upstream commit a7ba894821b6ade7bb420455f87020b2838d6180 ]
Since commit 89aafd67f28c ("sched/fair: Use prev instead of new target as recent_used_cpu"), p->recent_used_cpu is unconditionnaly set with prev.
Stable-dep-of: a2e7f03ed28f ("sched/uclamp: Make asym_fits_capacity() use util_fits_cpu()")
--- kernel/sched/fair.c | 5 ----- 1 file changed, 5 deletions(-)
kernel/sched/fair.c +0 -5
@@ -6595,11 +6595,6 @@ static int select_idle_sibling(struct task_struct *p, int prev, int target) (available_idle_cpu(recent_used_cpu) || sched_idle_cpu(recent_used_cpu)) && cpumask_test_cpu(p->recent_used_cpu, p->cpus_ptr) && asym_fits_capacity(task_util, recent_used_cpu)) { -/* -* Replace recent_used_cpu with prev as it is a potential -* candidate for the next wake: -*/ - p->recent_used_cpu = prev;return recent_used_cpu; }
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 72/731 sched/core: Introduce sched_asym_cpucap_active()
In reply to Greg Kroah-HartmanFrom: Dietmar Eggemann <[email protected]>
[ Upstream commit 740cf8a760b73e8375bfb4bedcbe9746183350f9 ]
Create an inline helper for conditional code to be only executed on asymmetric CPU capacity systems. This makes these (currently ~10 and future) conditions a lot more readable.
Stable-dep-of: a2e7f03ed28f ("sched/uclamp: Make asym_fits_capacity() use util_fits_cpu()")
--- kernel/sched/cpudeadline.c | 2 +- kernel/sched/deadline.c | 4 ++-- kernel/sched/fair.c | 8 ++++---- kernel/sched/rt.c | 4 ++-- kernel/sched/sched.h | 5 +++++ 5 files changed, 14 insertions(+), 9 deletions(-)
kernel/sched/cpudeadline.c +1 -1
@@ -124,7 +124,7 @@ int cpudl_find(struct cpudl *cp, struct task_struct *p,unsigned long cap, max_cap =0 ;int cpu, max_cpu =-1 ; -if (!static_branch_unlikely (&sched_asym_cpucapacity)) +if (!sched_asym_cpucap_active ())return 1 ;/* Ensure the capacity of the CPUs fits the task. */
kernel/sched/deadline.c +2 -2
@@ -112,7 +112,7 @@ static inline unsigned long __dl_bw_capacity(int i)*/ static inline unsigned long dl_bw_capacity (int i) { -if (!static_branch_unlikely (&sched_asym_cpucapacity) && +if (!sched_asym_cpucap_active () &&capacity_orig_of (i) ==SCHED_CAPACITY_SCALE ) {return dl_bw_cpus (i) <<SCHED_CAPACITY_SHIFT ; }else {
@@ -1703,7 +1703,7 @@ select_task_rq_dl(struct task_struct *p, int cpu, int flags)* Take the capacity of the CPU into account to * ensure it fits the requirement of the task. */ -if (static_branch_unlikely (&sched_asym_cpucapacity)) +if (sched_asym_cpucap_active ()) select_rq |= !dl_task_fits_capacity (p, cpu);if (select_rq) {
kernel/sched/fair.c +4 -4
@@ -4253,7 +4253,7 @@ static inline int task_fits_cpu(struct task_struct *p, int cpu)static inline void update_misfit_status (struct task_struct *p,struct rq *rq) { -if (!static_branch_unlikely (&sched_asym_cpucapacity)) +if (!sched_asym_cpucap_active ())return ;if (!p || p->nr_cpus_allowed ==1 ) {
@@ -6528,7 +6528,7 @@ select_idle_capacity(struct task_struct *p, struct sched_domain *sd, int target)static inline bool asym_fits_capacity (unsigned long task_util,int cpu) { -if (static_branch_unlikely (&sched_asym_cpucapacity)) +if (sched_asym_cpucap_active ())return fits_capacity (task_util,capacity_of (cpu));return true;
@@ -6548,7 +6548,7 @@ static int select_idle_sibling(struct task_struct *p, int prev, int target)* On asymmetric system, update task utilization because we will check * that the task fits with cpu's capacity. */ -if (static_branch_unlikely (&sched_asym_cpucapacity)) { +if (sched_asym_cpucap_active ()) {sync_entity_load_avg (&p->se); task_util =uclamp_task_util (p); }
@@ -6602,7 +6602,7 @@ static int select_idle_sibling(struct task_struct *p, int prev, int target)* For asymmetric CPU capacity systems, our domain of interest is * sd_asym_cpucapacity rather than sd_llc. */ -if (static_branch_unlikely (&sched_asym_cpucapacity)) { +if (sched_asym_cpucap_active ()) { sd =rcu_dereference (per_cpu (sd_asym_cpucapacity, target));/* * On an asymmetric CPU capacity system where an exclusive
kernel/sched/rt.c +2 -2
@@ -473,7 +473,7 @@ static inline bool rt_task_fits_capacity(struct task_struct *p, int cpu)unsigned int cpu_cap;/* Only heterogeneous systems can benefit from this check */ -if (!static_branch_unlikely (&sched_asym_cpucapacity)) +if (!sched_asym_cpucap_active ())return true; min_cap =uclamp_eff_value (p,UCLAMP_MIN );
@@ -1736,7 +1736,7 @@ static int find_lowest_rq(struct task_struct *task)* If we're on asym system ensure we consider the different capacities * of the CPUs when searching for the lowest_mask. */ -if (static_branch_unlikely (&sched_asym_cpucapacity)) { +if (sched_asym_cpucap_active ()) { ret = cpupri_find_fitness(&task_rq(task)->rd->cpupri, task, lowest_mask,
kernel/sched/sched.h +5 -0
@@ -1788,6 +1788,11 @@ DECLARE_PER_CPU(struct sched_domain __rcu *, sd_asym_packing); DECLARE_PER_CPU(struct sched_domain __rcu *, sd_asym_cpucapacity);extern struct static_key_false sched_asym_cpucapacity; +static __always_inline bool sched_asym_cpucap_active(void) +{ +return static_branch_unlikely (&sched_asym_cpucapacity); +} +struct sched_group_capacity {atomic_t ref;/*
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 73/731 sched/uclamp: Make asym_fits_capacity() use util_fits_cpu()
In reply to Greg Kroah-HartmanFrom: Qais Yousef <[email protected]>
[ Upstream commit a2e7f03ed28fce26c78b985f87913b6ce3accf9d ]
Use the new util_fits_cpu() to ensure migration margin and capacity pressure are taken into account correctly when uclamp is being used otherwise we will fail to consider CPUs as fitting in scenarios where they should.
s/asym_fits_capacity/asym_fits_cpu/ to better reflect what it does now.
--- kernel/sched/fair.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-)
kernel/sched/fair.c +13 -8
@@ -6526,10 +6526,13 @@ select_idle_capacity(struct task_struct *p, struct sched_domain *sd, int target)return best_cpu; } -static inline bool asym_fits_capacity (unsigned long task_util,int cpu) +static inline bool asym_fits_cpu (unsigned long util, +unsigned long util_min, +unsigned long util_max, +int cpu) {if (sched_asym_cpucap_active ()) -return fits_capacity (task_util,capacity_of (cpu)); +return util_fits_cpu (util, util_min, util_max, cpu);return true; }
@@ -6541,7 +6544,7 @@ static int select_idle_sibling(struct task_struct *p, int prev, int target) {bool has_idle_core = false;struct sched_domain *sd; -unsigned long task_util; +unsigned long task_util, util_min, util_max;int i, recent_used_cpu;/*
@@ -6550,7 +6553,9 @@ static int select_idle_sibling(struct task_struct *p, int prev, int target)*/ if (sched_asym_cpucap_active ()) {sync_entity_load_avg (&p->se); - task_util =uclamp_task_util (p); + task_util =task_util_est (p); + util_min =uclamp_eff_value (p,UCLAMP_MIN ); + util_max =uclamp_eff_value (p,UCLAMP_MAX ); }/*
@@ -6559,7 +6564,7 @@ static int select_idle_sibling(struct task_struct *p, int prev, int target)lockdep_assert_irqs_disabled ();if ((available_idle_cpu (target) ||sched_idle_cpu (target)) && -asym_fits_capacity (task_util, target)) +asym_fits_cpu (task_util, util_min, util_max, target))return target;/*
@@ -6567,7 +6572,7 @@ static int select_idle_sibling(struct task_struct *p, int prev, int target)*/ if (prev != target &&cpus_share_cache (prev, target) && (available_idle_cpu (prev) ||sched_idle_cpu (prev)) && -asym_fits_capacity (task_util, prev)) +asym_fits_cpu (task_util, util_min, util_max, prev))return prev;/*
@@ -6582,7 +6587,7 @@ static int select_idle_sibling(struct task_struct *p, int prev, int target) in_task() && prev == smp_processor_id() && this_rq()->nr_running <= 1 && - asym_fits_capacity(task_util, prev)) { + asym_fits_cpu(task_util, util_min, util_max, prev)) {return prev; }
@@ -6594,7 +6599,7 @@ static int select_idle_sibling(struct task_struct *p, int prev, int target) cpus_share_cache(recent_used_cpu, target) && (available_idle_cpu(recent_used_cpu) || sched_idle_cpu(recent_used_cpu)) && cpumask_test_cpu(p->recent_used_cpu, p->cpus_ptr) && - asym_fits_capacity(task_util, recent_used_cpu)) { + asym_fits_cpu(task_util, util_min, util_max, recent_used_cpu)) {return recent_used_cpu; }
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 74/731 cpuidle: dt: Return the correct numbers of parsed idle states
In reply to Greg Kroah-HartmanFrom: Ulf Hansson <[email protected]>
[ Upstream commit ee3c2c8ad6ba6785f14a60e4081d7c82e88162a2 ]
While we correctly skips to initialize an idle state from a disabled idle state node in DT, the returned value from dt_init_idle_driver() don't get adjusted accordingly. Instead the number of found idle state nodes are returned, while the callers are expecting the number of successfully initialized idle states from DT.
This leads to cpuidle drivers unnecessarily continues to initialize their idle state specific data. Moreover, in the case when all idle states have been disabled in DT, we would end up registering a cpuidle driver, rather than relying on the default arch specific idle call.
--- drivers/cpuidle/dt_idle_states.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/cpuidle/dt_idle_states.c +1 -1
@@ -223,6 +223,6 @@ int dt_init_idle_driver(struct cpuidle_driver *drv,* also be 0 on platforms with missing DT idle states or legacy DT * configuration predating the DT idle states bindings. */ -return i; +return state_idx - start_idx; }EXPORT_SYMBOL_GPL (dt_init_idle_driver);
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 75/731 alpha: fix TIF_NOTIFY_SIGNAL handling
In reply to Greg Kroah-HartmanFrom: Al Viro <[email protected]>
[ Upstream commit e2c7554cc6d85f95e3c6635f270ec839ab9fe05e ]
it needs to be added to _TIF_WORK_MASK, or we might not reach do_work_pending() in the first place...
--- arch/alpha/include/asm/thread_info.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/alpha/include/asm/thread_info.h +1 -1
@@ -77,7 +77,7 @@ register struct thread_info *__current_thread_info __asm__("$8");/* Work to do on interrupt/exception return. */ #define _TIF_WORK_MASK (_TIF_SIGPENDING | _TIF_NEED_RESCHED | \ - _TIF_NOTIFY_RESUME) + _TIF_NOTIFY_RESUME | _TIF_NOTIFY_SIGNAL)/* Work to do on any return to userspace. */ #define _TIF_ALLWORK_MASK (_TIF_WORK_MASK \
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 76/731 alpha: fix syscall entry in !AUDUT_SYSCALL case
In reply to Greg Kroah-HartmanFrom: Al Viro <[email protected]>
[ Upstream commit f7b2431a6d22f7a91c567708e071dfcd6d66db14 ]
We only want to take the slow path if SYSCALL_TRACE or SYSCALL_AUDIT is set; on !AUDIT_SYSCALL configs the current tree hits it whenever _any_ thread flag (including NEED_RESCHED, NOTIFY_SIGNAL, etc.) happens to be set.
--- arch/alpha/kernel/entry.S | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
arch/alpha/kernel/entry.S +3 -1
@@ -469,8 +469,10 @@ entSys: #ifdef CONFIG_AUDITSYSCALL lda $6, _TIF_SYSCALL_TRACE | _TIF_SYSCALL_AUDIT and $3, $6, $3 -#endif bne $3, strace +#else + blbs $3, strace /* check for SYSCALL_TRACE in disguise */ +#endif beq $4, 1f ldq $27, 0($5) 1: jsr $26, ($27), sys_ni_syscall
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 77/731 x86/sgx: Reduce delay and interference of enclave release
In reply to Greg Kroah-HartmanFrom: Reinette Chatre <[email protected]>
[ Upstream commit 7b72c823ddf8aaaec4e9fb28e6fbe4d511e7dad1 ]
commit 8795359e35bc ("x86/sgx: Silence softlockup detection when releasing large enclaves") introduced a cond_resched() during enclave release where the EREMOVE instruction is applied to every 4k enclave page. Giving other tasks an opportunity to run while tearing down a large enclave placates the soft lockup detector but Iqbal found that the fix causes a 25% performance degradation of a workload run using Gramine.
Gramine maintains a 1:1 mapping between processes and SGX enclaves. That means if a workload in an enclave creates a subprocess then Gramine creates a duplicate enclave for that subprocess to run in. The consequence is that the release of the enclave used to run the subprocess can impact the performance of the workload that is run in the original enclave, especially in large enclaves when SGX2 is not in use.
The workload run by Iqbal behaves as follows:
Create enclave (enclave "A")
/* Initialize workload in enclave "A" */
Create enclave (enclave "B")
/* Run subprocess in enclave "B" and send result to enclave "A" */ Release enclave (enclave "B")
/* Run workload in enclave "A" */
Release enclave (enclave "A")
The performance impact of releasing enclave "B" in the above scenario is amplified when there is a lot of SGX memory and the enclave size matches the SGX memory. When there is 128GB SGX memory and an enclave size of 128GB, from the time enclave "B" starts the 128GB SGX memory is oversubscribed with a combined demand for 256GB from the two enclaves.
Before commit 8795359e35bc ("x86/sgx: Silence softlockup detection when releasing large enclaves") enclave release was done in a tight loop without giving other tasks a chance to run. Even though the system experienced soft lockups the workload (run in enclave "A") obtained good performance numbers because when the workload started running there was no interference.
Commit 8795359e35bc ("x86/sgx: Silence softlockup detection when releasing large enclaves") gave other tasks opportunity to run while an enclave is released. The impact of this in this scenario is that while enclave "B" is released and needing to access each page that belongs to it in order to run the SGX EREMOVE instruction on it, enclave "A" is attempting to run the workload needing to access the enclave pages that belong to it. This causes a lot of swapping due to the demand for the oversubscribed SGX memory. Longer latencies are experienced by the workload in enclave "A" while enclave "B" is released.
Improve the performance of enclave release while still avoiding the soft lockup detector with two enhancements:
- Only call cond_resched() after XA_CHECK_SCHED iterations.
- Use the xarray advanced API to keep the xarray locked for XA_CHECK_SCHED iterations instead of locking and unlocking at every iteration.
This batching solution is copied from sgx_encl_may_map() that also iterates through all enclave pages using this technique.
With this enhancement the workload experiences a 5% performance degradation when compared to a kernel without commit 8795359e35bc ("x86/sgx: Silence softlockup detection when releasing large enclaves"), an improvement to the reported 25% degradation, while still placating the soft lockup detector.
Scenarios with poor performance are still possible even with these enhancements. For example, short workloads creating sub processes while running in large enclaves. Further performance improvements are pursued in user space through avoiding to create duplicate enclaves for certain sub processes, and using SGX2 that will do lazy allocation of pages as needed so enclaves created for sub processes start quickly and release quickly.
--- arch/x86/kernel/cpu/sgx/encl.c | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-)
arch/x86/kernel/cpu/sgx/encl.c +19 -4
@@ -533,11 +533,15 @@ const struct vm_operations_struct sgx_vm_ops = {void sgx_encl_release (struct kref *ref) { struct sgx_encl *encl = container_of(ref, struct sgx_encl, refcount); +unsigned long max_page_index =PFN_DOWN (encl->base + encl->size -1 );struct sgx_va_page *va_page;struct sgx_encl_page *entry; -unsigned long index; +unsigned long count =0 ; + +XA_STATE (xas, &encl->page_array,PFN_DOWN (encl->base)); -xa_for_each (&encl->page_array, index, entry) { +xas_lock (&xas); +xas_for_each (&xas, entry, max_page_index) {if (entry->epc_page) {/* * The page and its radix tree entry cannot be freed
@@ -552,9 +556,20 @@ void sgx_encl_release(struct kref *ref) }kfree (entry); -/* Invoke scheduler to prevent soft lockups. */ -cond_resched (); +/* +* Invoke scheduler on every XA_CHECK_SCHED iteration +* to prevent soft lockups. +*/ +if (!(++count %XA_CHECK_SCHED )) { +xas_pause (&xas); +xas_unlock (&xas); + +cond_resched (); + +xas_lock (&xas); + } } +xas_unlock (&xas);xa_destroy (&encl->page_array);
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 78/731 PM: hibernate: Fix mistake in kerneldoc comment
In reply to Greg Kroah-HartmanFrom: xiongxin <[email protected]>
[ Upstream commit 6e5d7300cbe7c3541bc31f16db3e9266e6027b4b ]
The actual maximum image size formula in hibernate_preallocate_memory() is as follows:
max_size = (count - (size + PAGES_FOR_IO)) / 2
- 2 * DIV_ROUND_UP(reserved_size, PAGE_SIZE);
but the one in the kerneldoc comment of the function is different and incorrect.
--- kernel/power/snapshot.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
kernel/power/snapshot.c +2 -2
@@ -1719,8 +1719,8 @@ static unsigned long minimum_image_size(unsigned long saveable)* /sys/power/reserved_size, respectively). To make this happen, we compute the * total number of available page frames and allocate at least * -* ([page frames total] + PAGES_FOR_IO + [metadata pages]) / 2 -* + 2 * DIV_ROUND_UP(reserved_size, PAGE_SIZE) +* ([page frames total] - PAGES_FOR_IO - [metadata pages]) / 2 +* - 2 * DIV_ROUND_UP(reserved_size, PAGE_SIZE) * * of them, which corresponds to the maximum size of a hibernation image. *
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 79/731 fs: dont audit the capability check in simple_xattr_list()
In reply to Greg Kroah-HartmanFrom: Ondrej Mosnacek <[email protected]>
[ Upstream commit e7eda157c4071cd1e69f4b1687b0fbe1ae5e6f46 ]
The check being unconditional may lead to unwanted denials reported by LSMs when a process has the capability granted by DAC, but denied by an LSM. In the case of SELinux such denials are a problem, since they can't be effectively filtered out via the policy and when not silenced, they produce noise that may hide a true problem or an attack.
Checking for the capability only if any trusted xattr is actually present wouldn't really address the issue, since calling listxattr(2) on such node on its own doesn't indicate an explicit attempt to see the trusted xattrs. Additionally, it could potentially leak the presence of trusted xattrs to an unprivileged user if they can check for the denials (e.g. through dmesg).
Therefore, it's best (and simplest) to keep the check unconditional and instead use ns_capable_noaudit() that will silence any associated LSM denials.
--- fs/xattr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/xattr.c +1 -1
@@ -1119,7 +1119,7 @@ static int xattr_list_one(char **buffer, ssize_t *remaining_size,ssize_t simple_xattr_list (struct inode *inode,struct simple_xattrs *xattrs,char *buffer,size_t size) { -bool trusted =capable (CAP_SYS_ADMIN ); +bool trusted =ns_capable_noaudit (&init_user_ns,CAP_SYS_ADMIN );struct simple_xattr *xattr;ssize_t remaining_size = size;int err =0 ;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 80/731 cpufreq: qcom-hw: Fix memory leak in qcom_cpufreq_hw_read_lut()
In reply to Greg Kroah-HartmanFrom: Chen Hui <[email protected]>
[ Upstream commit 9901c21bcaf2f01fe5078f750d624f4ddfa8f81b ]
If "cpu_dev" fails to get opp table in qcom_cpufreq_hw_read_lut(), the program will return, resulting in "table" resource is not released.
--- drivers/cpufreq/qcom-cpufreq-hw.c | 1 + 1 file changed, 1 insertion(+)
drivers/cpufreq/qcom-cpufreq-hw.c +1 -0
@@ -177,6 +177,7 @@ static int qcom_cpufreq_hw_read_lut(struct device *cpu_dev, } }else if (ret != -ENODEV ) {dev_err (cpu_dev,"Invalid opp table in device tree\n" ); +kfree (table);return ret; }else { policy->fast_switch_possible = true;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 81/731 selftests/ftrace: event_triggers: wait longer for test_event_enable
In reply to Greg Kroah-HartmanFrom: Yipeng Zou <[email protected]>
[ Upstream commit a1d6cd88c8973cfb08ee85722488b1d6d5d16327 ]
In some platform, the schedule event may came slowly, delay 100ms can't cover it.
I was notice that on my board which running in low cpu_freq,and this selftests allways gose fail.
So maybe we can check more times here to wait longer.
--- .../ftrace/test.d/ftrace/func_event_triggers.tc | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-)
tools/testing/selftests/ftrace/test.d/ftrace/func_event_triggers.tc +11 -4
@@ -38,11 +38,18 @@ cnt_trace() { test_event_enabled() { val=$1 + check_times=10 # wait for 10 * SLEEP_TIME at most - e=`cat $EVENT_ENABLE` - if [ "$e" != $val ]; then - fail "Expected $val but found $e" - fi + while [ $check_times -ne 0 ]; do + e=`cat $EVENT_ENABLE` + if [ "$e" == $val ]; then + return 0 + fi + sleep $SLEEP_TIME + check_times=$((check_times - 1)) + done + + fail "Expected $val but found $e" } run_enable_disable() {
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 82/731 perf: Fix possible memleak in pmu_dev_alloc()
In reply to Greg Kroah-HartmanFrom: Chen Zhongjin <[email protected]>
[ Upstream commit e8d7a90c08ce963c592fb49845f2ccc606a2ac21 ]
In pmu_dev_alloc(), when dev_set_name() failed, it will goto free_dev and call put_device(pmu->dev) to release it.
However pmu->dev->release is assigned after this, which makes warning and memleak.
Call dev_set_name() after pmu->dev->release = pmu_dev_release to fix it.
Device '(null)' does not have a release() function...
WARNING: CPU: 2 PID: 441 at drivers/base/core.c:2332 device_release+0x1b9/0x240
...
Call Trace:
<TASK>
kobject_put+0x17f/0x460
put_device+0x20/0x30
pmu_dev_alloc+0x152/0x400
perf_pmu_register+0x96b/0xee0
...
kmemleak: 1 new suspected memory leaks (see /sys/kernel/debug/kmemleak)
unreferenced object 0xffff888014759000 (size 2048):
comm "modprobe", pid 441, jiffies 4294931444 (age 38.332s)
backtrace:
[<0000000005aed3b4>] kmalloc_trace+0x27/0x110
[<000000006b38f9b8>] pmu_dev_alloc+0x50/0x400
[<00000000735f17be>] perf_pmu_register+0x96b/0xee0
[<00000000e38477f1>] 0xffffffffc0ad8603
[<000000004e162216>] do_one_initcall+0xd0/0x4e0
...--- kernel/events/core.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
kernel/events/core.c +5 -3
@@ -11175,13 +11175,15 @@ static int pmu_dev_alloc(struct pmu *pmu) pmu->dev->groups = pmu->attr_groups;device_initialize (pmu->dev); - ret =dev_set_name (pmu->dev,"%s" , pmu->name); -if (ret) - goto free_dev;dev_set_drvdata (pmu->dev, pmu); pmu->dev->bus = &pmu_bus; pmu->dev->release = pmu_dev_release; + + ret =dev_set_name (pmu->dev,"%s" , pmu->name); +if (ret) + goto free_dev; + ret =device_add (pmu->dev);if (ret) goto free_dev;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 83/731 lib/debugobjects: fix stat count and optimize debug_objects_mem_init
In reply to Greg Kroah-HartmanFrom: wuchi <[email protected]>
[ Upstream commit eabb7f1ace53e127309407b2b5e74e8199e85270 ]
1. Var debug_objects_allocated tracks valid kmem_cache_alloc calls, so track it in debug_objects_replace_static_objects. Do similar things in object_cpu_offline.
2. In debug_objects_mem_init, there is no need to call function cpuhp_setup_state_nocalls when debug_objects_enabled = 0 (out of memory).
--- lib/debugobjects.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
lib/debugobjects.c +10 -0
@@ -440,6 +440,7 @@ static int object_cpu_offline(unsigned int cpu)struct debug_percpu_free *percpu_pool;struct hlist_node *tmp;struct debug_obj *obj; +unsigned long flags;/* Remote access is safe as the CPU is dead already */ percpu_pool =per_cpu_ptr (&percpu_obj_pool, cpu);
@@ -447,6 +448,12 @@ static int object_cpu_offline(unsigned int cpu)hlist_del (&obj->node);kmem_cache_free (obj_cache, obj); } + +raw_spin_lock_irqsave (&pool_lock, flags); + obj_pool_used -= percpu_pool->obj_free; + debug_objects_freed += percpu_pool->obj_free; +raw_spin_unlock_irqrestore (&pool_lock, flags); + percpu_pool->obj_free =0 ;return 0 ;
@@ -1321,6 +1328,8 @@ static int __init debug_objects_replace_static_objects(void)hlist_add_head (&obj->node, &objects); } + debug_objects_allocated += i; +/* * debug_objects_mem_init() is now called early that only one CPU is up * and interrupts have been disabled, so it is safe to replace the
@@ -1389,6 +1398,7 @@ void __init debug_objects_mem_init(void) debug_objects_enabled =0 ;kmem_cache_destroy (obj_cache);pr_warn ("out of memory.\n" ); +return ; }else debug_objects_selftest ();
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 84/731 platform/x86: huawei-wmi: fix return value calculation
In reply to Greg Kroah-HartmanFrom: Barnabás Pőcze <[email protected]>
[ Upstream commit 0b9a1dcdb6a2c841899389bf2dd7a3e0e2aa0e99 ]
Previously, huawei_wmi_input_setup() returned the result of logical or-ing the return values of two functions that return negative errno-style error codes and one that returns acpi_status. If this returned value was non-zero, then it was propagated from the platform driver's probe function. That function should return a negative errno-style error code, so the result of the logical or that huawei_wmi_input_setup() returned was not appropriate.
Fix that by checking each function separately and returning the error code unmodified.
--- drivers/platform/x86/huawei-wmi.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-)
drivers/platform/x86/huawei-wmi.c +16 -4
@@ -760,6 +760,9 @@ static int huawei_wmi_input_setup(struct device *dev,const char *guid, struct input_dev **idev) { + acpi_status status; +int err; + *idev =devm_input_allocate_device (dev);if (!*idev)return -ENOMEM ;
@@ -769,10 +772,19 @@ static int huawei_wmi_input_setup(struct device *dev, (*idev)->id.bustype =BUS_HOST ; (*idev)->dev.parent = dev; -return sparse_keymap_setup (*idev, huawei_wmi_keymap,NULL ) || -input_register_device (*idev) || -wmi_install_notify_handler (guid, huawei_wmi_input_notify, - *idev); + err =sparse_keymap_setup (*idev, huawei_wmi_keymap,NULL ); +if (err) +return err; + + err =input_register_device (*idev); +if (err) +return err; + + status =wmi_install_notify_handler (guid, huawei_wmi_input_notify, *idev); +if (ACPI_FAILURE (status)) +return -EIO ; + +return 0 ; }static void huawei_wmi_input_exit (struct device *dev,const char *guid)
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 85/731 timerqueue: Use rb_entry_safe() in timerqueue_getnext()
In reply to Greg Kroah-HartmanFrom: Barnabás Pőcze <[email protected]>
[ Upstream commit 2f117484329b233455ee278f2d9b0a4356835060 ]
When timerqueue_getnext() is called on an empty timer queue, it will use rb_entry() on a NULL pointer, which is invalid. Fix that by using rb_entry_safe() which handles NULL pointers.
This has not caused any issues so far because the offset of the rb_node member in timerqueue_node is 0, so rb_entry() is essentially a no-op.
--- include/linux/timerqueue.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/timerqueue.h +1 -1
@@ -35,7 +35,7 @@ struct timerqueue_node *timerqueue_getnext(struct timerqueue_head *head) {struct rb_node *leftmost =rb_first_cached (&head->rb_root); - return rb_entry(leftmost, struct timerqueue_node, node); + return rb_entry_safe(leftmost, struct timerqueue_node, node); }static inline void timerqueue_init (struct timerqueue_node *node)
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 86/731 proc: fixup uptime selftest
In reply to Greg Kroah-HartmanFrom: Alexey Dobriyan <[email protected]>
[ Upstream commit 5cc81d5c81af0dee54da9a67a3ebe4be076a13db ]
syscall(3) returns -1 and sets errno on error, unlike "syscall" instruction.
Systems which have <= 32/64 CPUs are unaffected. Test won't bounce to all CPUs before completing if there are more of them.
--- tools/testing/selftests/proc/proc-uptime-002.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
tools/testing/selftests/proc/proc-uptime-002.c +2 -1
@@ -17,6 +17,7 @@// while shifting across CPUs. #undef NDEBUG#include <assert.h> +#include <errno.h> #include <unistd.h> #include <sys/syscall.h> #include <stdlib.h>
@@ -54,7 +55,7 @@ int main(void) len +=sizeof (unsigned long );free (m); m =malloc (len); - }while (sys_sched_getaffinity (0 , len, m) == -EINVAL ); + }while (sys_sched_getaffinity (0 , len, m) ==-1 && errno ==EINVAL ); fd =open ("/proc/uptime" ,O_RDONLY );assert (fd >=0 );
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 87/731 lib/fonts: fix undefined behavior in bit shift for get_default_font
In reply to Greg Kroah-HartmanFrom: Gaosheng Cui <[email protected]>
[ Upstream commit 6fe888c4d2fb174408e4540bb2d5602b9f507f90 ]
Shifting signed 32-bit value by 31 bits is undefined, so changing significant bit to unsigned. The UBSAN warning calltrace like below:
UBSAN: shift-out-of-bounds in lib/fonts/fonts.c:139:20 left shift of 1 by 31 places cannot be represented in type 'int' <TASK> dump_stack_lvl+0x7d/0xa5 dump_stack+0x15/0x1b ubsan_epilogue+0xe/0x4e __ubsan_handle_shift_out_of_bounds+0x1e7/0x20c get_default_font+0x1c7/0x1f0 fbcon_startup+0x347/0x3a0 do_take_over_console+0xce/0x270 do_fbcon_takeover+0xa1/0x170 do_fb_registered+0x2a8/0x340 fbcon_fb_registered+0x47/0xe0 register_framebuffer+0x294/0x4a0 __drm_fb_helper_initial_config_and_unlock+0x43c/0x880 [drm_kms_helper] drm_fb_helper_initial_config+0x52/0x80 [drm_kms_helper] drm_fbdev_client_hotplug+0x156/0x1b0 [drm_kms_helper] drm_fbdev_generic_setup+0xfc/0x290 [drm_kms_helper] bochs_pci_probe+0x6ca/0x772 [bochs] local_pci_probe+0x4d/0xb0 pci_device_probe+0x119/0x320 really_probe+0x181/0x550 __driver_probe_device+0xc6/0x220 driver_probe_device+0x32/0x100 __driver_attach+0x195/0x200 bus_for_each_dev+0xbb/0x120 driver_attach+0x27/0x30 bus_add_driver+0x22e/0x2f0 driver_register+0xa9/0x190 __pci_register_driver+0x90/0xa0 bochs_pci_driver_init+0x52/0x1000 [bochs] do_one_initcall+0x76/0x430 do_init_module+0x61/0x28a load_module+0x1f82/0x2e50 __do_sys_finit_module+0xf8/0x190 __x64_sys_finit_module+0x23/0x30 do_syscall_64+0x58/0x80 entry_SYSCALL_64_after_hwframe+0x63/0xcd </TASK>
--- lib/fonts/fonts.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
lib/fonts/fonts.c +2 -2
@@ -135,8 +135,8 @@ const struct font_desc *get_default_font(int xres, int yres, u32 font_w,if (res >20 ) c +=20 - res; -if ((font_w & (1 << (f->width -1 ))) && - (font_h & (1 << (f->height -1 )))) +if ((font_w & (1U << (f->width -1 ))) && + (font_h & (1U << (f->height -1 )))) c +=1000 ;if (c > cc) {
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 88/731 ocfs2: fix memory leak in ocfs2_stack_glue_init()
In reply to Greg Kroah-HartmanFrom: Shang XiaoJing <[email protected]>
[ Upstream commit 13b6269dd022aaa69ca8d1df374ab327504121cf ]
ocfs2_table_header should be free in ocfs2_stack_glue_init() if ocfs2_sysfs_init() failed, otherwise kmemleak will report memleak.
BUG: memory leak
unreferenced object 0xffff88810eeb5800 (size 128):
comm "modprobe", pid 4507, jiffies 4296182506 (age 55.888s)
hex dump (first 32 bytes):
c0 40 14 a0 ff ff ff ff 00 00 00 00 01 00 00 00 .@..............
01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
backtrace:
[<000000001e59e1cd>] __register_sysctl_table+0xca/0xef0
[<00000000c04f70f7>] 0xffffffffa0050037
[<000000001bd12912>] do_one_initcall+0xdb/0x480
[<0000000064f766c9>] do_init_module+0x1cf/0x680
[<000000002ba52db0>] load_module+0x6441/0x6f20
[<000000009772580d>] __do_sys_finit_module+0x12f/0x1c0
[<00000000380c1f22>] do_syscall_64+0x3f/0x90
[<000000004cf473bc>] entry_SYSCALL_64_after_hwframe+0x63/0xcd--- fs/ocfs2/stackglue.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
fs/ocfs2/stackglue.c +7 -1
@@ -703,6 +703,8 @@ static struct ctl_table_header *ocfs2_table_header;static int __init ocfs2_stack_glue_init (void ) { +int ret; +strcpy (cluster_stack_name,OCFS2_STACK_PLUGIN_O2CB ); ocfs2_table_header =register_sysctl_table (ocfs2_root_table);
@@ -712,7 +714,11 @@ static int __init ocfs2_stack_glue_init(void)return -ENOMEM ;/* or something. */ } -return ocfs2_sysfs_init (); + ret =ocfs2_sysfs_init (); +if (ret) +unregister_sysctl_table (ocfs2_table_header); + +return ret; } static void __exit ocfs2_stack_glue_exit(void)
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 89/731 MIPS: vpe-mt: fix possible memory leak while module exiting
In reply to Greg Kroah-HartmanFrom: Yang Yingliang <[email protected]>
[ Upstream commit 5822e8cc84ee37338ab0bdc3124f6eec04dc232d ]
Afer commit 1fa5ae857bb1 ("driver core: get rid of struct device's bus_id string array"), the name of device is allocated dynamically, it need be freed when module exiting, call put_device() to give up reference, so that it can be freed in kobject_cleanup() when the refcount hit to 0. The vpe_device is static, so remove kfree() from vpe_device_release().
--- arch/mips/kernel/vpe-mt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/mips/kernel/vpe-mt.c +2 -2
@@ -313,7 +313,6 @@ ATTRIBUTE_GROUPS(vpe);static void vpe_device_release (struct device *cd) { -kfree (cd); }static struct class vpe_class = {
@@ -497,6 +496,7 @@ int __init vpe_module_init(void)device_del (&vpe_device); out_class: +put_device (&vpe_device);class_unregister (&vpe_class); out_chrdev:
@@ -509,7 +509,7 @@ void __exit vpe_module_exit(void) {struct vpe *v, *n; -device_del (&vpe_device); +device_unregister (&vpe_device);class_unregister (&vpe_class);unregister_chrdev (major,VPE_MODULE_NAME );
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 90/731 MIPS: vpe-cmp: fix possible memory leak while module exiting
In reply to Greg Kroah-HartmanFrom: Yang Yingliang <[email protected]>
[ Upstream commit c5ed1fe0801f0c66b0fbce2785239a5664629057 ]
dev_set_name() allocates memory for name, it need be freed when module exiting, call put_device() to give up reference, so that it can be freed in kobject_cleanup() when the refcount hit to 0. The vpe_device is static, so remove kfree() from vpe_device_release().
--- arch/mips/kernel/vpe-cmp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/mips/kernel/vpe-cmp.c +2 -2
@@ -75,7 +75,6 @@ ATTRIBUTE_GROUPS(vpe);static void vpe_device_release (struct device *cd) { -kfree (cd); }static struct class vpe_class = {
@@ -157,6 +156,7 @@ int __init vpe_module_init(void)device_del (&vpe_device); out_class: +put_device (&vpe_device);class_unregister (&vpe_class); out_chrdev:
@@ -169,7 +169,7 @@ void __exit vpe_module_exit(void) {struct vpe *v, *n; -device_del (&vpe_device); +device_unregister (&vpe_device);class_unregister (&vpe_class);unregister_chrdev (major,VPE_MODULE_NAME );
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 91/731 selftests/efivarfs: Add checking of the test return value
In reply to Greg Kroah-HartmanFrom: Zhao Gongyi <[email protected]>
[ Upstream commit c93924267fe6f2b44af1849f714ae9cd8117a9cd ]
Add checking of the test return value, otherwise it will report success forever for test_create_read().
--- tools/testing/selftests/efivarfs/efivarfs.sh | 5 +++++ 1 file changed, 5 insertions(+)
tools/testing/selftests/efivarfs/efivarfs.sh +5 -0
@@ -87,6 +87,11 @@ test_create_read() { local file=$efivarfs_mount/$FUNCNAME-$test_guid ./create-read $file + if [ $? -ne 0 ]; then + echo "create and read $file failed" + file_cleanup $file + exit 1 + fi file_cleanup $file }
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 92/731 PNP: fix name memory leak in pnp_alloc_dev()
In reply to Greg Kroah-HartmanFrom: Yang Yingliang <[email protected]>
[ Upstream commit 110d7b0325c55ff3620073ba4201845f59e22ebf ]
After commit 1fa5ae857bb1 ("driver core: get rid of struct device's bus_id string array"), the name of device is allocated dynamically, move dev_set_name() after pnp_add_id() to avoid memory leak.
--- drivers/pnp/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/pnp/core.c +2 -2
@@ -148,14 +148,14 @@ struct pnp_dev *pnp_alloc_dev(struct pnp_protocol *protocol, int id, dev->dev.coherent_dma_mask = dev->dma_mask; dev->dev.release = &pnp_release_device; -dev_set_name (&dev->dev,"%02x:%02x" , dev->protocol->number, dev->number); - dev_id =pnp_add_id (dev, pnpid);if (!dev_id) {kfree (dev);return NULL ; } +dev_set_name (&dev->dev,"%02x:%02x" , dev->protocol->number, dev->number); +return dev; }
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 93/731 perf/x86/intel/uncore: Fix reference count leak in sad_cfg_iio_topology()
In reply to Greg Kroah-HartmanFrom: Xiongfeng Wang <[email protected]>
[ Upstream commit c508eb042d9739bf9473526f53303721b70e9100 ]
pci_get_device() will increase the reference count for the returned pci_dev, and also decrease the reference count for the input parameter *from* if it is not NULL.
If we break the loop in sad_cfg_iio_topology() with 'dev' not NULL. We need to call pci_dev_put() to decrease the reference count. Since pci_dev_put() can handle the NULL input parameter, we can just add one pci_dev_put() right before 'return ret'.
--- arch/x86/events/intel/uncore_snbep.c | 2 ++ 1 file changed, 2 insertions(+)
arch/x86/events/intel/uncore_snbep.c +2 -0
@@ -4492,6 +4492,8 @@ static int sad_cfg_iio_topology(struct intel_uncore_type *type, u8 *sad_pmon_map type->topology =NULL ; } +pci_dev_put (dev); +return ret; }
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 94/731 perf/x86/intel/uncore: Fix reference count leak in hswep_has_limit_sbox()
In reply to Greg Kroah-HartmanFrom: Xiongfeng Wang <[email protected]>
[ Upstream commit 1ff9dd6e7071a561f803135c1d684b13c7a7d01d ]
pci_get_device() will increase the reference count for the returned 'dev'. We need to call pci_dev_put() to decrease the reference count. Since 'dev' is only used in pci_read_config_dword(), let's add pci_dev_put() right after it.
--- arch/x86/events/intel/uncore_snbep.c | 1 + 1 file changed, 1 insertion(+)
arch/x86/events/intel/uncore_snbep.c +1 -0
@@ -2891,6 +2891,7 @@ static bool hswep_has_limit_sbox(unsigned int device)return false;pci_read_config_dword (dev,HSWEP_PCU_CAPID4_OFFET , &capid4); +pci_dev_put (dev);if (!hswep_get_chop (capid4))return true;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 95/731 perf/x86/intel/uncore: Fix reference count leak in snr_uncore_mmio_map()
In reply to Greg Kroah-HartmanFrom: Xiongfeng Wang <[email protected]>
[ Upstream commit 8ebd16c11c346751b3944d708e6c181ed4746c39 ]
pci_get_device() will increase the reference count for the returned pci_dev, so snr_uncore_get_mc_dev() will return a pci_dev with its reference count increased. We need to call pci_dev_put() to decrease the reference count. Let's add the missing pci_dev_put().
--- arch/x86/events/intel/uncore_snbep.c | 2 ++ 1 file changed, 2 insertions(+)
arch/x86/events/intel/uncore_snbep.c +2 -0
@@ -4860,6 +4860,8 @@ static int snr_uncore_mmio_map(struct intel_uncore_box *box, addr += box_ctl; +pci_dev_put (pdev); + box->io_addr =ioremap (addr, type->mmio_map_size);if (!box->io_addr) {pr_warn ("perf uncore: Failed to ioremap for %s.\n" , type->name);
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 96/731 perf/x86/intel/uncore: Fix reference count leak in __uncore_imc_init_box()
In reply to Greg Kroah-HartmanFrom: Xiongfeng Wang <[email protected]>
[ Upstream commit 17b8d847b92d815d1638f0de154654081d66b281 ]
pci_get_device() will increase the reference count for the returned pci_dev, so tgl_uncore_get_mc_dev() will return a pci_dev with its reference count increased. We need to call pci_dev_put() to decrease the reference count before exiting from __uncore_imc_init_box(). Add pci_dev_put() for both normal and error path.
--- arch/x86/events/intel/uncore_snb.c | 3 +++ 1 file changed, 3 insertions(+)
arch/x86/events/intel/uncore_snb.c +3 -0
@@ -1423,6 +1423,7 @@ static void tgl_uncore_imc_freerunning_init_box(struct intel_uncore_box *box)/* MCHBAR is disabled */ if (!(mch_bar &BIT (0 ))) {pr_warn ("perf uncore: MCHBAR is disabled. Failed to map IMC free-running counters.\n" ); +pci_dev_put (pdev);return ; } mch_bar &= ~BIT (0 );
@@ -1436,6 +1437,8 @@ static void tgl_uncore_imc_freerunning_init_box(struct intel_uncore_box *box) box->io_addr =ioremap (addr, type->mmio_map_size);if (!box->io_addr)pr_warn ("perf uncore: Failed to ioremap for %s.\n" , type->name); + +pci_dev_put (pdev); }static struct intel_uncore_ops tgl_uncore_imc_freerunning_ops = {
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 97/731 platform/chrome: cros_usbpd_notify: Fix error handling in cros_usbpd_notify_init()
In reply to Greg Kroah-HartmanFrom: Yuan Can <[email protected]>
[ Upstream commit 5a2d96623670155d94aca72c320c0ac27bdc6bd2 ]
The following WARNING message was given when rmmod cros_usbpd_notify:
Unexpected driver unregister!
WARNING: CPU: 0 PID: 253 at drivers/base/driver.c:270 driver_unregister+0x8a/0xb0 Modules linked in: cros_usbpd_notify(-) CPU: 0 PID: 253 Comm: rmmod Not tainted 6.1.0-rc3 #24 ... Call Trace: <TASK> cros_usbpd_notify_exit+0x11/0x1e [cros_usbpd_notify] __x64_sys_delete_module+0x3c7/0x570 ? __ia32_sys_delete_module+0x570/0x570 ? lock_is_held_type+0xe3/0x140 ? syscall_enter_from_user_mode+0x17/0x50 ? rcu_read_lock_sched_held+0xa0/0xd0 ? syscall_enter_from_user_mode+0x1c/0x50 do_syscall_64+0x37/0x90 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f333fe9b1b7
The reason is that the cros_usbpd_notify_init() does not check the return value of platform_driver_register(), and the cros_usbpd_notify can install successfully even if platform_driver_register() failed.
Fix by checking the return value of platform_driver_register() and unregister cros_usbpd_notify_plat_driver when it failed.
--- drivers/platform/chrome/cros_usbpd_notify.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/platform/chrome/cros_usbpd_notify.c +5 -1
@@ -285,7 +285,11 @@ static int __init cros_usbpd_notify_init(void)return ret;#ifdef CONFIG_ACPI -platform_driver_register (&cros_usbpd_notify_acpi_driver); + ret =platform_driver_register (&cros_usbpd_notify_acpi_driver); +if (ret) { +platform_driver_unregister (&cros_usbpd_notify_plat_driver); +return ret; + }#endif return 0 ; }
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 98/731 thermal: core: fix some possible name leaks in error paths
In reply to Greg Kroah-HartmanFrom: Yang Yingliang <[email protected]>
[ Upstream commit 4748f9687caaeefab8578285b97b2f30789fc4b4 ]
In some error paths before device_register(), the names allocated by dev_set_name() are not freed. Move dev_set_name() front to device_register(), so the name can be freed while calling put_device().
--- drivers/thermal/thermal_core.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-)
drivers/thermal/thermal_core.c +10 -8
@@ -905,10 +905,6 @@ __thermal_cooling_device_register(struct device_node *np, cdev->id = ret; id = ret; - ret =dev_set_name (&cdev->device,"cooling_device%d" , cdev->id); -if (ret) - goto out_ida_remove; - cdev->type =kstrdup (type ? type :"" ,GFP_KERNEL );if (!cdev->type) { ret = -ENOMEM ;
@@ -923,6 +919,11 @@ __thermal_cooling_device_register(struct device_node *np, cdev->device.class = &thermal_class; cdev->devdata = devdata;thermal_cooling_device_setup_sysfs (cdev); + ret =dev_set_name (&cdev->device,"cooling_device%d" , cdev->id); +if (ret) { +thermal_cooling_device_destroy_sysfs (cdev); + goto out_kfree_type; + } ret =device_register (&cdev->device);if (ret) goto out_kfree_type;
@@ -1235,10 +1236,6 @@ thermal_zone_device_register(const char *type, int trips, int mask, tz->id = id;strlcpy (tz->type, type,sizeof (tz->type)); - result =dev_set_name (&tz->device,"thermal_zone%d" , tz->id); -if (result) - goto remove_id; -if (!ops->critical) ops->critical = thermal_zone_device_critical;
@@ -1260,6 +1257,11 @@ thermal_zone_device_register(const char *type, int trips, int mask,/* A new thermal zone needs to be updated anyway. */ atomic_set (&tz->need_update,1 ); + result =dev_set_name (&tz->device,"thermal_zone%d" , tz->id); +if (result) { +thermal_zone_destroy_device_groups (tz); + goto remove_id; + } result =device_register (&tz->device);if (result) goto release_device;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 99/731 irqchip: gic-pm: Use pm_runtime_resume_and_get() in gic_probe()
In reply to Greg Kroah-HartmanFrom: Shang XiaoJing <[email protected]>
[ Upstream commit f9ee20c85b3a3ba0afd3672630ec4f93d339f015 ]
gic_probe() calls pm_runtime_get_sync() and added fail path as rpm_put to put usage_counter. However, pm_runtime_get_sync() will increment usage_counter even it failed. Fix it by replacing it with pm_runtime_resume_and_get() to keep usage counter balanced.
--- drivers/irqchip/irq-gic-pm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/irqchip/irq-gic-pm.c +1 -1
@@ -102,7 +102,7 @@ static int gic_probe(struct platform_device *pdev)pm_runtime_enable (dev); - ret =pm_runtime_get_sync (dev); + ret =pm_runtime_resume_and_get (dev);if (ret <0 ) goto rpm_disable;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 100/731 irqchip/wpcm450: Fix memory leak in wpcm450_aic_of_init()
In reply to Greg Kroah-HartmanFrom: Wei Yongjun <[email protected]>
[ Upstream commit 4208d4faf36573a507b5e5de17abe342e9276759 ]
If of_iomap() failed, 'aic' should be freed before return. Otherwise there is a memory leak.
--- drivers/irqchip/irq-wpcm450-aic.c | 1 + 1 file changed, 1 insertion(+)
drivers/irqchip/irq-wpcm450-aic.c +1 -0
@@ -146,6 +146,7 @@ static int __init wpcm450_aic_of_init(struct device_node *node, aic->regs =of_iomap (node,0 );if (!aic->regs) {pr_err ("Failed to map WPCM450 AIC registers\n" ); +kfree (aic);return -ENOMEM ; }
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 101/731 EDAC/i10nm: fix refcount leak in pci_get_dev_wrapper()
In reply to Greg Kroah-HartmanFrom: Yang Yingliang <[email protected]>
[ Upstream commit 9c8921555907f4d723f01ed2d859b66f2d14f08e ]
As the comment of pci_get_domain_bus_and_slot() says, it returns a PCI device with refcount incremented, so it doesn't need to call an extra pci_dev_get() in pci_get_dev_wrapper(), and the PCI device needs to be put in the error path.
--- drivers/edac/i10nm_base.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/edac/i10nm_base.c +1 -2
@@ -198,11 +198,10 @@ static struct pci_dev *pci_get_dev_wrapper(int dom, unsigned int bus,if (unlikely (pci_enable_device (pdev) <0 )) {edac_dbg (2 ,"Failed to enable device %02x:%02x.%x\n" , bus, dev, fun); +pci_dev_put (pdev);return NULL ; } -pci_dev_get (pdev); -return pdev; }
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 102/731 SUNRPC: Return true/false (not 1/0) from bool functions
In reply to Greg Kroah-HartmanFrom: Haowen Bai <[email protected]>
[ Upstream commit 5f7b839d47dbc74cf4a07beeab5191f93678673e ]
Return boolean values ("true" or "false") instead of 1 or 0 from bool functions. This fixes the following warnings from coccicheck:
./fs/nfsd/nfs2acl.c:289:9-10: WARNING: return of 0/1 in function 'nfsaclsvc_encode_accessres' with return type bool ./fs/nfsd/nfs2acl.c:252:9-10: WARNING: return of 0/1 in function 'nfsaclsvc_encode_getaclres' with return type bool
Stable-dep-of: ea5021e911d3 ("NFSD: Finish converting the NFSv2 GETACL result encoder")
--- fs/nfsd/nfs2acl.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-)
fs/nfsd/nfs2acl.c +12 -12
@@ -249,34 +249,34 @@ static int nfsaclsvc_encode_getaclres(struct svc_rqst *rqstp, __be32 *p)int w;if (!svcxdr_encode_stat (xdr, resp->status)) -return 0 ; +return false;if (dentry ==NULL ||d_really_is_negative (dentry)) -return 1 ; +return true; inode =d_inode (dentry);if (!svcxdr_encode_fattr (rqstp, xdr, &resp->fh, &resp->stat)) -return 0 ; +return false;if (xdr_stream_encode_u32 (xdr, resp->mask) <0 ) -return 0 ; +return false; rqstp->rq_res.page_len = w =nfsacl_size ( (resp->mask &NFS_ACL ) ? resp->acl_access :NULL , (resp->mask &NFS_DFACL ) ? resp->acl_default :NULL );while (w >0 ) {if (!*(rqstp->rq_next_page++)) -return 1 ; +return true; w -=PAGE_SIZE ; }if (!nfs_stream_encode_acl (xdr, inode, resp->acl_access, resp->mask &NFS_ACL ,0 )) -return 0 ; +return false;if (!nfs_stream_encode_acl (xdr, inode, resp->acl_default, resp->mask &NFS_DFACL ,NFS_ACL_DEFAULT )) -return 0 ; +return false; -return 1 ; +return true; }/* ACCESS */
@@ -286,17 +286,17 @@ static int nfsaclsvc_encode_accessres(struct svc_rqst *rqstp, __be32 *p)struct nfsd3_accessres *resp = rqstp->rq_resp;if (!svcxdr_encode_stat (xdr, resp->status)) -return 0 ; +return false;switch (resp->status) {case nfs_ok:if (!svcxdr_encode_fattr (rqstp, xdr, &resp->fh, &resp->stat)) -return 0 ; +return false;if (xdr_stream_encode_u32 (xdr, resp->access) <0 ) -return 0 ; +return false;break ; } -return 1 ; +return true; }/*
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 103/731 NFSD: Finish converting the NFSv2 GETACL result encoder
In reply to Greg Kroah-HartmanFrom: Chuck Lever <[email protected]>
[ Upstream commit ea5021e911d3479346a75ac9b7d9dcd751b0fb99 ]
The xdr_stream conversion inadvertently left some code that set the page_len of the send buffer. The XDR stream encoders should handle this automatically now.
This oversight adds garbage past the end of the Reply message. Clients typically ignore the garbage, but NFSD does not need to send it, as it leaks stale memory contents onto the wire.
--- fs/nfsd/nfs2acl.c | 10 ---------- 1 file changed, 10 deletions(-)
fs/nfsd/nfs2acl.c +0 -10
@@ -246,7 +246,6 @@ static int nfsaclsvc_encode_getaclres(struct svc_rqst *rqstp, __be32 *p)struct nfsd3_getaclres *resp = rqstp->rq_resp;struct dentry *dentry = resp->fh.fh_dentry;struct inode *inode; -int w;if (!svcxdr_encode_stat (xdr, resp->status))return false;
@@ -260,15 +259,6 @@ static int nfsaclsvc_encode_getaclres(struct svc_rqst *rqstp, __be32 *p)if (xdr_stream_encode_u32 (xdr, resp->mask) <0 )return false; - rqstp->rq_res.page_len = w =nfsacl_size ( - (resp->mask &NFS_ACL ) ? resp->acl_access :NULL , - (resp->mask &NFS_DFACL ) ? resp->acl_default :NULL ); -while (w >0 ) { -if (!*(rqstp->rq_next_page++)) -return true; - w -=PAGE_SIZE ; - } -if (!nfs_stream_encode_acl (xdr, inode, resp->acl_access, resp->mask &NFS_ACL ,0 ))return false;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 104/731 nfsd: dont call nfsd_file_put from client states seqfile display
In reply to Greg Kroah-HartmanFrom: Jeff Layton <[email protected]>
[ Upstream commit e0aa651068bfd520afcd357af8ecd2de005fc83d ]
We had a report of this:
BUG: sleeping function called from invalid context at fs/nfsd/filecache.c:440
...with a stack trace showing nfsd_file_put being called from nfs4_show_open. This code has always tried to call fput while holding a spinlock, but we recently changed this to use the filecache, and that started triggering the might_sleep() in nfsd_file_put.
states_start takes and holds the cl_lock while iterating over the client's states, and we can't sleep with that held.
Have the various nfs4_show_* functions instead hold the fi_lock instead of taking a nfsd_file reference.
--- fs/nfsd/nfs4state.c | 51 +++++++++++++++++++++++++++++---------------- 1 file changed, 33 insertions(+), 18 deletions(-)
fs/nfsd/nfs4state.c +33 -18
@@ -627,15 +627,26 @@ find_any_file(struct nfs4_file *f)return ret; } -static struct nfsd_file *find_deleg_file (struct nfs4_file *f) +static struct nfsd_file *find_any_file_locked (struct nfs4_file *f) { -struct nfsd_file *ret =NULL ; +lockdep_assert_held (&f->fi_lock); + +if (f->fi_fds[O_RDWR ]) +return f->fi_fds[O_RDWR ]; +if (f->fi_fds[O_WRONLY ]) +return f->fi_fds[O_WRONLY ]; +if (f->fi_fds[O_RDONLY ]) +return f->fi_fds[O_RDONLY ]; +return NULL ; +} + +static struct nfsd_file *find_deleg_file_locked (struct nfs4_file *f) +{ +lockdep_assert_held (&f->fi_lock); -spin_lock (&f->fi_lock);if (f->fi_deleg_file) - ret =nfsd_file_get (f->fi_deleg_file); -spin_unlock (&f->fi_lock); -return ret; +return f->fi_deleg_file; +return NULL ; }static atomic_long_t num_delegations;
@@ -2501,9 +2512,11 @@ static int nfs4_show_open(struct seq_file *s, struct nfs4_stid *st) ols =openlockstateid (st); oo = ols->st_stateowner; nf = st->sc_file; - file =find_any_file (nf); + +spin_lock (&nf->fi_lock); + file =find_any_file_locked (nf);if (!file) -return 0 ; + goto out;seq_printf (s,"- " );nfs4_show_stateid (s, &st->sc_stateid);
@@ -2525,8 +2538,8 @@ static int nfs4_show_open(struct seq_file *s, struct nfs4_stid *st)seq_printf (s,", " );nfs4_show_owner (s, oo);seq_printf (s," }\n" ); -nfsd_file_put (file); - +out: +spin_unlock (&nf->fi_lock);return 0 ; }
@@ -2540,9 +2553,10 @@ static int nfs4_show_lock(struct seq_file *s, struct nfs4_stid *st) ols =openlockstateid (st); oo = ols->st_stateowner; nf = st->sc_file; - file =find_any_file (nf); +spin_lock (&nf->fi_lock); + file =find_any_file_locked (nf);if (!file) -return 0 ; + goto out;seq_printf (s,"- " );nfs4_show_stateid (s, &st->sc_stateid);
@@ -2562,8 +2576,8 @@ static int nfs4_show_lock(struct seq_file *s, struct nfs4_stid *st)seq_printf (s,", " );nfs4_show_owner (s, oo);seq_printf (s," }\n" ); -nfsd_file_put (file); - +out: +spin_unlock (&nf->fi_lock);return 0 ; }
@@ -2575,9 +2589,10 @@ static int nfs4_show_deleg(struct seq_file *s, struct nfs4_stid *st) ds =delegstateid (st); nf = st->sc_file; - file =find_deleg_file (nf); +spin_lock (&nf->fi_lock); + file =find_deleg_file_locked (nf);if (!file) -return 0 ; + goto out;seq_printf (s,"- " );nfs4_show_stateid (s, &st->sc_stateid);
@@ -2593,8 +2608,8 @@ static int nfs4_show_deleg(struct seq_file *s, struct nfs4_stid *st)seq_printf (s,", " );nfs4_show_fname (s, file);seq_printf (s," }\n" ); -nfsd_file_put (file); - +out: +spin_unlock (&nf->fi_lock);return 0 ; }
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 105/731 genirq/irqdesc: Dont try to remove non-existing sysfs files
In reply to Greg Kroah-HartmanFrom: Yang Yingliang <[email protected]>
[ Upstream commit 9049e1ca41983ab773d7ea244bee86d7835ec9f5 ]
Fault injection tests trigger warnings like this:
kernfs: can not remove 'chip_name', no directory
WARNING: CPU: 0 PID: 253 at fs/kernfs/dir.c:1616 kernfs_remove_by_name_ns+0xce/0xe0 RIP: 0010:kernfs_remove_by_name_ns+0xce/0xe0 Call Trace: <TASK> remove_files.isra.1+0x3f/0xb0 sysfs_remove_group+0x68/0xe0 sysfs_remove_groups+0x41/0x70 __kobject_del+0x45/0xc0 kobject_del+0x29/0x40 free_desc+0x42/0x70 irq_free_descs+0x5e/0x90
The reason is that the interrupt descriptor sysfs handling does not roll back on a failing kobject_add() during allocation. If the descriptor is freed later on, kobject_del() is invoked with a not added kobject resulting in the above warnings.
A proper rollback in case of a kobject_add() failure would be the straight forward solution. But this is not possible due to the way how interrupt descriptor sysfs handling works.
Interrupt descriptors are allocated before sysfs becomes available. So the sysfs files for the early allocated descriptors are added later in the boot process. At this point there can be nothing useful done about a failing kobject_add(). For consistency the interrupt descriptor allocation always treats kobject_add() failures as non-critical and just emits a warning.
To solve this problem, keep track in the interrupt descriptor whether kobject_add() was successful or not and make the invocation of kobject_del() conditional on that.
[ tglx: Massage changelog, comments and use a state bit. ]
--- kernel/irq/internals.h | 2 ++ kernel/irq/irqdesc.c | 15 +++++++++------ 2 files changed, 11 insertions(+), 6 deletions(-)
kernel/irq/internals.h +2 -0
@@ -52,6 +52,7 @@ enum {* IRQS_PENDING - irq is pending and replayed later * IRQS_SUSPENDED - irq is suspended * IRQS_NMI - irq line is used to deliver NMIs +* IRQS_SYSFS - descriptor has been added to sysfs */ enum {IRQS_AUTODETECT =0x00000001 ,
@@ -64,6 +65,7 @@ enum {IRQS_SUSPENDED =0x00000800 ,IRQS_TIMINGS =0x00001000 ,IRQS_NMI =0x00002000 , + IRQS_SYSFS = 0x00004000, };#include "debug.h"
kernel/irq/irqdesc.c +9 -6
@@ -288,22 +288,25 @@ static void irq_sysfs_add(int irq, struct irq_desc *desc)if (irq_kobj_base) {/* * Continue even in case of failure as this is nothing -* crucial. +* crucial and failures in the late irq_sysfs_init() +* cannot be rolled back. */ if (kobject_add (&desc->kobj, irq_kobj_base,"%d" , irq))pr_warn ("Failed to add kobject for irq %d\n" , irq); +else + desc->istate |=IRQS_SYSFS ; } }static void irq_sysfs_del (struct irq_desc *desc) {/* -* If irq_sysfs_init() has not yet been invoked (early boot), then -* irq_kobj_base is NULL and the descriptor was never added. -* kobject_del() complains about a object with no parent, so make -* it conditional. +* Only invoke kobject_del() when kobject_add() was successfully +* invoked for the descriptor. This covers both early boot, where +* sysfs is not initialized yet, and the case of a failed +* kobject_add() invocation. */ -if (irq_kobj_base) +if (desc->istate &IRQS_SYSFS )kobject_del (&desc->kobj); }
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 106/731 cpufreq: amd_freq_sensitivity: Add missing pci_dev_put()
In reply to Greg Kroah-HartmanFrom: Xiongfeng Wang <[email protected]>
[ Upstream commit 91fda1f88c0968f1491ab150bb01690525af150a ]
pci_get_device() will increase the reference count for the returned pci_dev. We need to use pci_dev_put() to decrease the reference count after using pci_get_device(). Let's add it.
--- drivers/cpufreq/amd_freq_sensitivity.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/cpufreq/amd_freq_sensitivity.c +2 -0
@@ -124,6 +124,8 @@ static int __init amd_freq_sensitivity_init(void)if (!pcidev) {if (!boot_cpu_has (X86_FEATURE_PROC_FEEDBACK ))return -ENODEV ; + }else { +pci_dev_put (pcidev); }if (rdmsrl_safe (MSR_AMD64_FREQ_SENSITIVITY_ACTUAL , &val))
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 107/731 libfs: add DEFINE_SIMPLE_ATTRIBUTE_SIGNED for signed value
In reply to Greg Kroah-HartmanFrom: Akinobu Mita <[email protected]>
[ Upstream commit 2e41f274f9aa71cdcc69dc1f26a3f9304a651804 ]
Patch series "fix error when writing negative value to simple attribute files".
The simple attribute files do not accept a negative value since the commit 488dac0c9237 ("libfs: fix error cast of negative value in simple_attr_write()"), but some attribute files want to accept a negative value.
This patch (of 3):
The simple attribute files do not accept a negative value since the commit 488dac0c9237 ("libfs: fix error cast of negative value in simple_attr_write()"), so we have to use a 64-bit value to write a negative value.
This adds DEFINE_SIMPLE_ATTRIBUTE_SIGNED for a signed value.
--- fs/libfs.c | 22 +++++++++++++++++++--- include/linux/fs.h | 12 ++++++++++-- 2 files changed, 29 insertions(+), 5 deletions(-)
fs/libfs.c +19 -3
@@ -967,8 +967,8 @@ ssize_t simple_attr_read(struct file *file, char __user *buf,EXPORT_SYMBOL_GPL (simple_attr_read);/* interpret the buffer as a number to call the set function with */ -ssize_t simple_attr_write (struct file *file,const char __user *buf, -size_t len,loff_t *ppos) +static ssize_t simple_attr_write_xsigned (struct file *file,const char __user *buf, +size_t len,loff_t *ppos,bool is_signed) {struct simple_attr *attr;unsigned long long val;
@@ -989,7 +989,10 @@ ssize_t simple_attr_write(struct file *file, const char __user *buf, goto out; attr->set_buf[size] ='\0' ; - ret =kstrtoull (attr->set_buf,0 , &val); +if (is_signed) + ret =kstrtoll (attr->set_buf,0 , &val); +else + ret =kstrtoull (attr->set_buf,0 , &val);if (ret) goto out; ret = attr->set (attr->data, val);
@@ -999,8 +1002,21 @@ ssize_t simple_attr_write(struct file *file, const char __user *buf,mutex_unlock (&attr->mutex);return ret; } + +ssize_t simple_attr_write (struct file *file,const char __user *buf, +size_t len,loff_t *ppos) +{ +return simple_attr_write_xsigned (file, buf, len, ppos, false); +}EXPORT_SYMBOL_GPL (simple_attr_write); +ssize_t simple_attr_write_signed (struct file *file,const char __user *buf, +size_t len,loff_t *ppos) +{ +return simple_attr_write_xsigned (file, buf, len, ppos, true); +} +EXPORT_SYMBOL_GPL (simple_attr_write_signed); +/** * generic_fh_to_dentry - generic helper for the fh_to_dentry export operation * @sb: filesystem to do the file handle conversion on
include/linux/fs.h +10 -2
@@ -3507,7 +3507,7 @@ void simple_transaction_set(struct file *file, size_t n);* All attributes contain a text representation of a numeric value * that are accessed with the get() and set() functions. */ -#define DEFINE_SIMPLE_ATTRIBUTE (__fops, __get, __set, __fmt) \ +#define DEFINE_SIMPLE_ATTRIBUTE_XSIGNED (__fops, __get, __set, __fmt, __is_signed) \ static int __fops ## _open(struct inode *inode, struct file *file) \ { \ __simple_attr_check_format(__fmt, 0ull); \
@@ -3518,10 +3518,16 @@ static const struct file_operations __fops = { \ .open = __fops ## _open, \ .release = simple_attr_release, \ .read = simple_attr_read, \ - .write = simple_attr_write, \ + .write = (__is_signed) ? simple_attr_write_signed : simple_attr_write, \ .llseek = generic_file_llseek, \ } +#define DEFINE_SIMPLE_ATTRIBUTE (__fops, __get, __set, __fmt) \ + DEFINE_SIMPLE_ATTRIBUTE_XSIGNED(__fops, __get, __set, __fmt, false) + +#define DEFINE_SIMPLE_ATTRIBUTE_SIGNED (__fops, __get, __set, __fmt) \ + DEFINE_SIMPLE_ATTRIBUTE_XSIGNED(__fops, __get, __set, __fmt, true) + static inline __printf(1, 2) void __simple_attr_check_format(const char *fmt, ...) {
@@ -3536,6 +3542,8 @@ ssize_t simple_attr_read(struct file *file, char __user *buf, size_t len, loff_t *ppos);ssize_t simple_attr_write (struct file *file,const char __user *buf,size_t len,loff_t *ppos); +ssize_t simple_attr_write_signed (struct file *file,const char __user *buf, +size_t len,loff_t *ppos);struct ctl_table ; int proc_nr_files(struct ctl_table *table, int write,
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 108/731 lib/notifier-error-inject: fix error when writing -errno to debugfs file
In reply to Greg Kroah-HartmanFrom: Akinobu Mita <[email protected]>
[ Upstream commit f883c3edd2c432a2931ec8773c70a570115a50fe ]
The simple attribute files do not accept a negative value since the commit 488dac0c9237 ("libfs: fix error cast of negative value in simple_attr_write()").
This restores the previous behaviour by using newly introduced DEFINE_SIMPLE_ATTRIBUTE_SIGNED instead of DEFINE_SIMPLE_ATTRIBUTE.
--- lib/notifier-error-inject.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
lib/notifier-error-inject.c +1 -1
@@ -15,7 +15,7 @@ static int debugfs_errno_get(void *data, u64 *val)return 0 ; } -DEFINE_SIMPLE_ATTRIBUTE (fops_errno, debugfs_errno_get, debugfs_errno_set, +DEFINE_SIMPLE_ATTRIBUTE_SIGNED (fops_errno, debugfs_errno_get, debugfs_errno_set,"%lld\n" ); static struct dentry *debugfs_create_errno(const char *name, umode_t mode,
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 109/731 debugfs: fix error when writing negative value to atomic_t debugfs file
In reply to Greg Kroah-HartmanFrom: Akinobu Mita <[email protected]>
[ Upstream commit d472cf797c4e268613dbce5ec9b95d0bcae19ecb ]
The simple attribute files do not accept a negative value since the commit 488dac0c9237 ("libfs: fix error cast of negative value in simple_attr_write()"), so we have to use a 64-bit value to write a negative value for a debugfs file created by debugfs_create_atomic_t().
This restores the previous behaviour by introducing DEFINE_DEBUGFS_ATTRIBUTE_SIGNED for a signed value.
--- .../fault-injection/fault-injection.rst | 10 +++---- fs/debugfs/file.c | 28 +++++++++++++++---- include/linux/debugfs.h | 19 +++++++++++-- 3 files changed, 43 insertions(+), 14 deletions(-)
Documentation/fault-injection/fault-injection.rst +4 -6
@@ -83,9 +83,7 @@ configuration of fault-injection capabilities. - /sys/kernel/debug/fail*/times: specifies how many times failures may happen at most. A value of -1 - means "no limit". Note, though, that this file only accepts unsigned - values. So, if you want to specify -1, you better use 'printf' instead - of 'echo', e.g.: $ printf %#x -1 > times + means "no limit". - /sys/kernel/debug/fail*/space:
@@ -277,7 +275,7 @@ Application Examples echo Y > /sys/kernel/debug/$FAILTYPE/task-filter echo 10 > /sys/kernel/debug/$FAILTYPE/probability echo 100 > /sys/kernel/debug/$FAILTYPE/interval - printf %#x -1 > /sys/kernel/debug/$FAILTYPE/times + echo -1 > /sys/kernel/debug/$FAILTYPE/times echo 0 > /sys/kernel/debug/$FAILTYPE/space echo 2 > /sys/kernel/debug/$FAILTYPE/verbose echo 1 > /sys/kernel/debug/$FAILTYPE/ignore-gfp-wait
@@ -331,7 +329,7 @@ Application Examples echo N > /sys/kernel/debug/$FAILTYPE/task-filter echo 10 > /sys/kernel/debug/$FAILTYPE/probability echo 100 > /sys/kernel/debug/$FAILTYPE/interval - printf %#x -1 > /sys/kernel/debug/$FAILTYPE/times + echo -1 > /sys/kernel/debug/$FAILTYPE/times echo 0 > /sys/kernel/debug/$FAILTYPE/space echo 2 > /sys/kernel/debug/$FAILTYPE/verbose echo 1 > /sys/kernel/debug/$FAILTYPE/ignore-gfp-wait
@@ -362,7 +360,7 @@ Application Examples echo N > /sys/kernel/debug/$FAILTYPE/task-filter echo 100 > /sys/kernel/debug/$FAILTYPE/probability echo 0 > /sys/kernel/debug/$FAILTYPE/interval - printf %#x -1 > /sys/kernel/debug/$FAILTYPE/times + echo -1 > /sys/kernel/debug/$FAILTYPE/times echo 0 > /sys/kernel/debug/$FAILTYPE/space echo 1 > /sys/kernel/debug/$FAILTYPE/verbose
fs/debugfs/file.c +22 -6
@@ -378,8 +378,8 @@ ssize_t debugfs_attr_read(struct file *file, char __user *buf, }EXPORT_SYMBOL_GPL (debugfs_attr_read); -ssize_t debugfs_attr_write (struct file *file,const char __user *buf, -size_t len,loff_t *ppos) +static ssize_t debugfs_attr_write_xsigned (struct file *file,const char __user *buf, +size_t len,loff_t *ppos,bool is_signed) {struct dentry *dentry =F_DENTRY (file);ssize_t ret;
@@ -387,12 +387,28 @@ ssize_t debugfs_attr_write(struct file *file, const char __user *buf, ret =debugfs_file_get (dentry);if (unlikely (ret))return ret; - ret =simple_attr_write (file, buf, len, ppos); +if (is_signed) + ret =simple_attr_write_signed (file, buf, len, ppos); +else + ret =simple_attr_write (file, buf, len, ppos);debugfs_file_put (dentry);return ret; } + +ssize_t debugfs_attr_write (struct file *file,const char __user *buf, +size_t len,loff_t *ppos) +{ +return debugfs_attr_write_xsigned (file, buf, len, ppos, false); +}EXPORT_SYMBOL_GPL (debugfs_attr_write); +ssize_t debugfs_attr_write_signed (struct file *file,const char __user *buf, +size_t len,loff_t *ppos) +{ +return debugfs_attr_write_xsigned (file, buf, len, ppos, true); +} +EXPORT_SYMBOL_GPL (debugfs_attr_write_signed); + static struct dentry *debugfs_create_mode_unsafe(const char *name, umode_t mode, struct dentry *parent, void *value, const struct file_operations *fops,
@@ -738,11 +754,11 @@ static int debugfs_atomic_t_get(void *data, u64 *val) *val =atomic_read ((atomic_t *)data);return 0 ; } -DEFINE_DEBUGFS_ATTRIBUTE (fops_atomic_t, debugfs_atomic_t_get, +DEFINE_DEBUGFS_ATTRIBUTE_SIGNED (fops_atomic_t, debugfs_atomic_t_get, debugfs_atomic_t_set,"%lld\n" ); -DEFINE_DEBUGFS_ATTRIBUTE (fops_atomic_t_ro, debugfs_atomic_t_get,NULL , +DEFINE_DEBUGFS_ATTRIBUTE_SIGNED (fops_atomic_t_ro, debugfs_atomic_t_get,NULL ,"%lld\n" ); -DEFINE_DEBUGFS_ATTRIBUTE (fops_atomic_t_wo,NULL , debugfs_atomic_t_set, +DEFINE_DEBUGFS_ATTRIBUTE_SIGNED (fops_atomic_t_wo,NULL , debugfs_atomic_t_set,"%lld\n" );/**
include/linux/debugfs.h +17 -2
@@ -45,7 +45,7 @@ struct debugfs_u32_array {extern struct dentry *arch_debugfs_dir; -#define DEFINE_DEBUGFS_ATTRIBUTE (__fops, __get, __set, __fmt) \ +#define DEFINE_DEBUGFS_ATTRIBUTE_XSIGNED (__fops, __get, __set, __fmt, __is_signed) \ static int __fops ## _open(struct inode *inode, struct file *file) \ { \ __simple_attr_check_format(__fmt, 0ull); \
@@ -56,10 +56,16 @@ static const struct file_operations __fops = { \ .open = __fops ## _open, \ .release = simple_attr_release, \ .read = debugfs_attr_read, \ - .write = debugfs_attr_write, \ + .write = (__is_signed) ? debugfs_attr_write_signed : debugfs_attr_write, \ .llseek = no_llseek, \ } +#define DEFINE_DEBUGFS_ATTRIBUTE (__fops, __get, __set, __fmt) \ + DEFINE_DEBUGFS_ATTRIBUTE_XSIGNED(__fops, __get, __set, __fmt, false) + +#define DEFINE_DEBUGFS_ATTRIBUTE_SIGNED (__fops, __get, __set, __fmt) \ + DEFINE_DEBUGFS_ATTRIBUTE_XSIGNED(__fops, __get, __set, __fmt, true) +typedef struct vfsmount *(*debugfs_automount_t )(struct dentry *,void *);#if defined(CONFIG_DEBUG_FS )
@@ -102,6 +108,8 @@ ssize_t debugfs_attr_read(struct file *file, char __user *buf, size_t len, loff_t *ppos);ssize_t debugfs_attr_write (struct file *file,const char __user *buf,size_t len,loff_t *ppos); +ssize_t debugfs_attr_write_signed (struct file *file,const char __user *buf, +size_t len,loff_t *ppos);struct dentry *debugfs_rename (struct dentry *old_dir,struct dentry *old_dentry,struct dentry *new_dir,const char *new_name);
@@ -254,6 +262,13 @@ static inline ssize_t debugfs_attr_write(struct file *file,return -ENODEV ; } +static inline ssize_t debugfs_attr_write_signed (struct file *file, +const char __user *buf, +size_t len,loff_t *ppos) +{ +return -ENODEV ; +} +static inline struct dentry *debugfs_rename (struct dentry *old_dir,struct dentry *old_dentry,struct dentry *new_dir,char *new_name) {
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 110/731 rapidio: fix possible name leaks when rio_add_device() fails
In reply to Greg Kroah-HartmanFrom: Yang Yingliang <[email protected]>
[ Upstream commit f9574cd48679926e2a569e1957a5a1bcc8a719ac ]
Patch series "rapidio: fix three possible memory leaks".
This patchset fixes three name leaks in error handling.
- patch #1 fixes two name leaks while rio_add_device() fails.
- patch #2 fixes a name leak while rio_register_mport() fails.
This patch (of 2):
If rio_add_device() returns error, the name allocated by dev_set_name() need be freed. It should use put_device() to give up the reference in the error path, so that the name can be freed in kobject_cleanup(), and the 'rdev' can be freed in rio_release_dev().
--- drivers/rapidio/devices/rio_mport_cdev.c | 7 +++++-- drivers/rapidio/rio-scan.c | 8 ++++++-- 2 files changed, 11 insertions(+), 4 deletions(-)
drivers/rapidio/devices/rio_mport_cdev.c +5 -2
@@ -1803,8 +1803,11 @@ static int rio_mport_add_riodev(struct mport_cdev_priv *priv,rio_init_dbell_res (&rdev->riores[RIO_DOORBELL_RESOURCE ],0 ,0xffff ); err =rio_add_device (rdev); -if (err) - goto cleanup; +if (err) { +put_device (&rdev->dev); +return err; + } +rio_dev_get (rdev);return 0 ;
drivers/rapidio/rio-scan.c +6 -2
@@ -454,8 +454,12 @@ static struct rio_dev *rio_setup_device(struct rio_net *net, 0, 0xffff); ret =rio_add_device (rdev); -if (ret) - goto cleanup; +if (ret) { +if (rswitch) +kfree (rswitch->route_table); +put_device (&rdev->dev); +return NULL ; + }rio_dev_get (rdev);
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 111/731 rapidio: rio: fix possible name leak in rio_register_mport()
In reply to Greg Kroah-HartmanFrom: Yang Yingliang <[email protected]>
[ Upstream commit e92a216d16bde65d21a3227e0fb2aa0794576525 ]
If device_register() returns error, the name allocated by dev_set_name() need be freed. It should use put_device() to give up the reference in the error path, so that the name can be freed in kobject_cleanup(), and list_del() is called to delete the port from rio_mports.
--- drivers/rapidio/rio.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
drivers/rapidio/rio.c +7 -2
@@ -2186,11 +2186,16 @@ int rio_register_mport(struct rio_mport *port)atomic_set (&port->state,RIO_DEVICE_RUNNING ); res =device_register (&port->dev); -if (res) +if (res) {dev_err (&port->dev,"RIO: mport%d registration failed ERR=%d\n" , port->id, res); -else +mutex_lock (&rio_mport_list_lock); +list_del (&port->node); +mutex_unlock (&rio_mport_list_lock); +put_device (&port->dev); + }else {dev_dbg (&port->dev,"RIO: registered mport%d\n" , port->id); + }return res; }
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 112/731 clocksource/drivers/sh_cmt: Access registers according to spec
In reply to Greg Kroah-HartmanFrom: Wolfram Sang <[email protected]>
[ Upstream commit 3f44f7156f59cae06e9160eafb5d8b2dfd09e639 ]
Documentation for most CMTs say that it takes two input clocks before changes propagate to the timer. This is especially relevant when the timer is stopped to change further settings.
Implement the delays according to the spec. To avoid unnecessary delays in atomic mode, also check if the to-be-written value actually differs.
CMCNT is a bit special because testing showed that it requires 3 cycles to propagate, which affects all CMTs. Also, the WRFLAG needs to be checked before writing. This fixes "cannot clear CMCNT" messages which occur often on R-Car Gen4 SoCs, but only very rarely on older SoCs for some reason.
--- drivers/clocksource/sh_cmt.c | 88 ++++++++++++++++++++++-------------- 1 file changed, 55 insertions(+), 33 deletions(-)
drivers/clocksource/sh_cmt.c +55 -33
@@ -13,6 +13,7 @@#include <linux/init.h> #include <linux/interrupt.h> #include <linux/io.h> +#include <linux/iopoll.h> #include <linux/ioport.h> #include <linux/irq.h> #include <linux/module.h>
@@ -116,6 +117,7 @@ struct sh_cmt_device {void __iomem *mapbase;struct clk *clk;unsigned long rate; +unsigned int reg_delay;raw_spinlock_t lock;/* Protect the shared start/stop register */
@@ -247,10 +249,17 @@ static inline u32 sh_cmt_read_cmstr(struct sh_cmt_channel *ch)static inline void sh_cmt_write_cmstr (struct sh_cmt_channel *ch,u32 value) { -if (ch->iostart) - ch->cmt->info->write_control (ch->iostart,0 , value); -else - ch->cmt->info->write_control (ch->cmt->mapbase,0 , value); +u32 old_value =sh_cmt_read_cmstr (ch); + +if (value != old_value) { +if (ch->iostart) { + ch->cmt->info->write_control (ch->iostart,0 , value); +udelay (ch->cmt->reg_delay); + }else { + ch->cmt->info->write_control (ch->cmt->mapbase,0 , value); +udelay (ch->cmt->reg_delay); + } + } }static inline u32 sh_cmt_read_cmcsr (struct sh_cmt_channel *ch)
@@ -260,7 +269,12 @@ static inline u32 sh_cmt_read_cmcsr(struct sh_cmt_channel *ch)static inline void sh_cmt_write_cmcsr (struct sh_cmt_channel *ch,u32 value) { - ch->cmt->info->write_control (ch->ioctrl,CMCSR , value); +u32 old_value =sh_cmt_read_cmcsr (ch); + +if (value != old_value) { + ch->cmt->info->write_control (ch->ioctrl,CMCSR , value); +udelay (ch->cmt->reg_delay); + } }static inline u32 sh_cmt_read_cmcnt (struct sh_cmt_channel *ch)
@@ -268,14 +282,33 @@ static inline u32 sh_cmt_read_cmcnt(struct sh_cmt_channel *ch)return ch->cmt->info->read_count (ch->ioctrl,CMCNT ); } -static inline void sh_cmt_write_cmcnt (struct sh_cmt_channel *ch,u32 value) +static inline int sh_cmt_write_cmcnt (struct sh_cmt_channel *ch,u32 value) { +/* Tests showed that we need to wait 3 clocks here */ +unsigned int cmcnt_delay =DIV_ROUND_UP (3 * ch->cmt->reg_delay,2 ); +u32 reg; + +if (ch->cmt->info->model >SH_CMT_16BIT ) { +int ret =read_poll_timeout_atomic (sh_cmt_read_cmcsr, reg, + !(reg &SH_CMT32_CMCSR_WRFLG ), +1 , cmcnt_delay, false, ch); +if (ret <0 ) +return ret; + } + ch->cmt->info->write_count (ch->ioctrl,CMCNT , value); +udelay (cmcnt_delay); +return 0 ; }static inline void sh_cmt_write_cmcor (struct sh_cmt_channel *ch,u32 value) { - ch->cmt->info->write_count (ch->ioctrl,CMCOR , value); +u32 old_value = ch->cmt->info->read_count (ch->ioctrl,CMCOR ); + +if (value != old_value) { + ch->cmt->info->write_count (ch->ioctrl,CMCOR , value); +udelay (ch->cmt->reg_delay); + } }static u32 sh_cmt_get_counter (struct sh_cmt_channel *ch,u32 *has_wrapped)
@@ -319,7 +352,7 @@ static void sh_cmt_start_stop_ch(struct sh_cmt_channel *ch, int start)static int sh_cmt_enable (struct sh_cmt_channel *ch) { -int k, ret; +int ret;dev_pm_syscore_device (&ch->cmt->pdev->dev, true);
@@ -347,26 +380,9 @@ static int sh_cmt_enable(struct sh_cmt_channel *ch) }sh_cmt_write_cmcor (ch,0xffffffff ); -sh_cmt_write_cmcnt (ch,0 ); - -/* -* According to the sh73a0 user's manual, as CMCNT can be operated -* only by the RCLK (Pseudo 32 kHz), there's one restriction on -* modifying CMCNT register; two RCLK cycles are necessary before -* this register is either read or any modification of the value -* it holds is reflected in the LSI's actual operation. -* -* While at it, we're supposed to clear out the CMCNT as of this -* moment, so make sure it's processed properly here. This will -* take RCLKx2 at maximum. -*/ -for (k =0 ; k <100 ; k++) { -if (!sh_cmt_read_cmcnt (ch)) -break ; -udelay (1 ); - } + ret =sh_cmt_write_cmcnt (ch,0 ); -if (sh_cmt_read_cmcnt (ch)) { +if (ret ||sh_cmt_read_cmcnt (ch)) {dev_err (&ch->cmt->pdev->dev,"ch%u: cannot clear CMCNT\n" , ch->index); ret = -ETIMEDOUT ;
@@ -987,8 +1003,8 @@ MODULE_DEVICE_TABLE(of, sh_cmt_of_table);static int sh_cmt_setup (struct sh_cmt_device *cmt,struct platform_device *pdev) { -unsigned int mask; -unsigned int i; +unsigned int mask, i; +unsigned long rate;int ret; cmt->pdev = pdev;
@@ -1024,10 +1040,16 @@ static int sh_cmt_setup(struct sh_cmt_device *cmt, struct platform_device *pdev)if (ret <0 ) goto err_clk_unprepare; -if (cmt->info->width ==16 ) - cmt->rate =clk_get_rate (cmt->clk) /512 ; -else - cmt->rate =clk_get_rate (cmt->clk) /8 ; + rate =clk_get_rate (cmt->clk); +if (!rate) { + ret = -EINVAL ; + goto err_clk_disable; + } + +/* We shall wait 2 input clks after register writes */ +if (cmt->info->model >=SH_CMT_48BIT ) + cmt->reg_delay =DIV_ROUND_UP (2UL *USEC_PER_SEC , rate); + cmt->rate = rate / (cmt->info->width ==16 ?512 :8 );/* Map the memory resource(s). */ ret =sh_cmt_map_memory (cmt);
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 113/731 mips: ralink: mt7621: define MT7621_SYSC_BASE with __iomem
In reply to Greg Kroah-HartmanFrom: John Thomson <[email protected]>
[ Upstream commit a2cab953b4c077cc02878d424466d3a6eac32aaf ]
So that MT7621_SYSC_BASE can be used later in multiple functions without needing to repeat this __iomem declaration each time
Stable-dep-of: 7c18b64bba3b ("mips: ralink: mt7621: do not use kzalloc too early")
--- arch/mips/include/asm/mach-ralink/mt7621.h | 4 +++- arch/mips/ralink/mt7621.c | 7 +++---- 2 files changed, 6 insertions(+), 5 deletions(-)
arch/mips/include/asm/mach-ralink/mt7621.h +3 -1
@@ -7,10 +7,12 @@#ifndef _MT7621_REGS_H_#define _MT7621_REGS_H_ +#define IOMEM (x) ((void __iomem *)(KSEG1ADDR(x))) +#define MT7621_PALMBUS_BASE 0x1C000000#define MT7621_PALMBUS_SIZE 0x03FFFFFF -#define MT7621_SYSC_BASE 0x1E000000 +#define MT7621_SYSC_BASE IOMEM(0x1E000000)#define SYSC_REG_CHIP_NAME0 0x00#define SYSC_REG_CHIP_NAME1 0x04
arch/mips/ralink/mt7621.c +3 -4
@@ -95,7 +95,6 @@ static void soc_dev_init(struct ralink_soc_info *soc_info, u32 rev)void __init prom_soc_init (struct ralink_soc_info *soc_info) { -void __iomem *sysc = (void __iomem *)KSEG1ADDR (MT7621_SYSC_BASE );unsigned char *name =NULL ;u32 n0;u32 n1;
@@ -123,8 +122,8 @@ void __init prom_soc_init(struct ralink_soc_info *soc_info)__sync (); } - n0 =__raw_readl (sysc +SYSC_REG_CHIP_NAME0 ); - n1 =__raw_readl (sysc +SYSC_REG_CHIP_NAME1 ); + n0 =__raw_readl (MT7621_SYSC_BASE +SYSC_REG_CHIP_NAME0 ); + n1 =__raw_readl (MT7621_SYSC_BASE +SYSC_REG_CHIP_NAME1 );if (n0 ==MT7621_CHIP_NAME0 && n1 ==MT7621_CHIP_NAME1 ) { name ="MT7621" ;
@@ -133,7 +132,7 @@ void __init prom_soc_init(struct ralink_soc_info *soc_info)panic ("mt7621: unknown SoC, n0:%08x n1:%08x\n" , n0, n1); } ralink_soc =MT762X_SOC_MT7621AT ; - rev =__raw_readl (sysc +SYSC_REG_CHIP_REV ); + rev =__raw_readl (MT7621_SYSC_BASE +SYSC_REG_CHIP_REV ); snprintf(soc_info->sys_type, RAMIPS_SYS_TYPE_LEN, "MediaTek %s ver:%u eco:%u",
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 114/731 mips: ralink: mt7621: soc queries and tests as functions
In reply to Greg Kroah-HartmanFrom: John Thomson <[email protected]>
[ Upstream commit b4767d4c072583dec987225b6fe3f5524a735f42 ]
Move the SoC register value queries and tests to specific functions, to remove repetition of logic
No functional changes intended
Stable-dep-of: 7c18b64bba3b ("mips: ralink: mt7621: do not use kzalloc too early")
--- arch/mips/ralink/mt7621.c | 86 +++++++++++++++++++++++++++------------ 1 file changed, 61 insertions(+), 25 deletions(-)
arch/mips/ralink/mt7621.c +61 -25
@@ -66,7 +66,57 @@ void __init ralink_of_remap(void)panic ("Failed to remap core resources" ); } -static void soc_dev_init (struct ralink_soc_info *soc_info,u32 rev) +static unsigned int __init mt7621_get_soc_name0 (void ) +{ +return __raw_readl (MT7621_SYSC_BASE +SYSC_REG_CHIP_NAME0 ); +} + +static unsigned int __init mt7621_get_soc_name1 (void ) +{ +return __raw_readl (MT7621_SYSC_BASE +SYSC_REG_CHIP_NAME1 ); +} + +static bool __init mt7621_soc_valid (void ) +{ +if (mt7621_get_soc_name0 () ==MT7621_CHIP_NAME0 && +mt7621_get_soc_name1 () ==MT7621_CHIP_NAME1 ) +return true; +else +return false; +} + +static const char __init *mt7621_get_soc_id (void ) +{ +if (mt7621_soc_valid ()) +return "MT7621" ; +else +return "invalid" ; +} + +static unsigned int __init mt7621_get_soc_rev (void ) +{ +return __raw_readl (MT7621_SYSC_BASE +SYSC_REG_CHIP_REV ); +} + +static unsigned int __init mt7621_get_soc_ver (void ) +{ +return (mt7621_get_soc_rev () >>CHIP_REV_VER_SHIFT ) &CHIP_REV_VER_MASK ; +} + +static unsigned int __init mt7621_get_soc_eco (void ) +{ +return (mt7621_get_soc_rev () &CHIP_REV_ECO_MASK ); +} + +static const char __init *mt7621_get_soc_revision (void ) +{ +if (mt7621_get_soc_rev () ==1 &&mt7621_get_soc_eco () ==1 ) +return "E2" ; +else +return "E1" ; +} + +static void soc_dev_init (struct ralink_soc_info *soc_info) {struct soc_device *soc_dev;struct soc_device_attribute *soc_dev_attr;
@@ -77,12 +127,7 @@ static void soc_dev_init(struct ralink_soc_info *soc_info, u32 rev) soc_dev_attr->soc_id ="mt7621" ; soc_dev_attr->family ="Ralink" ; - -if (((rev >>CHIP_REV_VER_SHIFT ) &CHIP_REV_VER_MASK ) ==1 && - (rev &CHIP_REV_ECO_MASK ) ==1 ) - soc_dev_attr->revision ="E2" ; -else - soc_dev_attr->revision ="E1" ; + soc_dev_attr->revision =mt7621_get_soc_revision (); soc_dev_attr->data = soc_info;
@@ -95,11 +140,6 @@ static void soc_dev_init(struct ralink_soc_info *soc_info, u32 rev)void __init prom_soc_init (struct ralink_soc_info *soc_info) { -unsigned char *name =NULL ; -u32 n0; -u32 n1; -u32 rev; -/* Early detection of CMP support */ mips_cm_probe ();mips_cpc_probe ();
@@ -122,27 +162,23 @@ void __init prom_soc_init(struct ralink_soc_info *soc_info)__sync (); } - n0 =__raw_readl (MT7621_SYSC_BASE +SYSC_REG_CHIP_NAME0 ); - n1 =__raw_readl (MT7621_SYSC_BASE +SYSC_REG_CHIP_NAME1 ); - -if (n0 ==MT7621_CHIP_NAME0 && n1 ==MT7621_CHIP_NAME1 ) { - name ="MT7621" ; +if (mt7621_soc_valid ()) soc_info->compatible ="mediatek,mt7621-soc" ; - }else { -panic ("mt7621: unknown SoC, n0:%08x n1:%08x\n" , n0, n1); - } +else +panic ("mt7621: unknown SoC, n0:%08x n1:%08x\n" , +mt7621_get_soc_name0 (), +mt7621_get_soc_name1 ()); ralink_soc =MT762X_SOC_MT7621AT ; - rev =__raw_readl (MT7621_SYSC_BASE +SYSC_REG_CHIP_REV );snprintf (soc_info->sys_type,RAMIPS_SYS_TYPE_LEN ,"MediaTek %s ver:%u eco:%u" , - name, - (rev >>CHIP_REV_VER_SHIFT ) &CHIP_REV_VER_MASK , - (rev &CHIP_REV_ECO_MASK )); +mt7621_get_soc_id (), +mt7621_get_soc_ver (), +mt7621_get_soc_eco ()); soc_info->mem_detect = mt7621_memory_detect; -soc_dev_init (soc_info, rev); +soc_dev_init (soc_info);if (!register_cps_smp_ops ())return ;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 115/731 mips: ralink: mt7621: do not use kzalloc too early
In reply to Greg Kroah-HartmanFrom: John Thomson <[email protected]>
[ Upstream commit 7c18b64bba3bcad1be94b404f47b94a04b91ce79 ]
With CONFIG_SLUB=y, following commit 6edf2576a6cc ("mm/slub: enable debugging memory wasting of kmalloc") mt7621 failed to boot very early, without showing any console messages.
This exposed the pre-existing bug of mt7621.c using kzalloc before normal memory management was available.
Prior to this slub change, there existed the unintended protection against "kmem_cache *s" being NULL as slab_pre_alloc_hook() happened to return NULL and bailed out of slab_alloc_node().
This allowed mt7621 prom_soc_init to fail in the soc_dev_init kzalloc, but continue booting without the SOC_BUS driver device registered.
Console output from a DEBUG_ZBOOT vmlinuz kernel loading, with mm/slub modified to warn on kmem_cache zero or null:
zimage at: 80B842A0 810B4BC0
Uncompressing Linux at load address 80001000
Copy device tree to address 80B80EE0
Now, booting the kernel...
[ 0.000000] Linux version 6.1.0-rc3+ (john@john)
(mipsel-buildroot-linux-gnu-gcc.br_real (Buildroot
2021.11-4428-g6b6741b) 12.2.0, GNU ld (GNU Binutils) 2.39) #73 SMP Wed
Nov 2 05:10:01 AEST 2022
[ 0.000000] ------------[ cut here ]------------
[ 0.000000] WARNING: CPU: 0 PID: 0 at mm/slub.c:3416
kmem_cache_alloc+0x5a4/0x5e8
[ 0.000000] Modules linked in:
[ 0.000000] CPU: 0 PID: 0 Comm: swapper Not tainted 6.1.0-rc3+ #73
[ 0.000000] Stack : 810fff78 80084d98 00000000 00000004 00000000
00000000 80889d04 80c90000
[ 0.000000] 80920000 807bd328 8089d368 80923bd3 00000000
00000001 80889cb0 00000000
[ 0.000000] 00000000 00000000 807bd328 8084bcb1 00000002
00000002 00000001 6d6f4320
[ 0.000000] 00000000 80c97d3d 80c97d68 fffffffc 807bd328
00000000 00000000 00000000
[ 0.000000] 00000000 a0000000 80910000 8110a0b4 00000000
00000020 80010000 80010000
[ 0.000000] ...
[ 0.000000] Call Trace:
[ 0.000000] [<80008260>] show_stack+0x28/0xf0
[ 0.000000] [<8070c958>] dump_stack_lvl+0x60/0x80
[ 0.000000] [<8002e184>] __warn+0xc4/0xf8
[ 0.000000] [<8002e210>] warn_slowpath_fmt+0x58/0xa4
[ 0.000000] [<801c0fac>] kmem_cache_alloc+0x5a4/0x5e8
[ 0.000000] [<8092856c>] prom_soc_init+0x1fc/0x2b4
[ 0.000000] [<80928060>] prom_init+0x44/0xf0
[ 0.000000] [<80929214>] setup_arch+0x4c/0x6a8
[ 0.000000] [<809257e0>] start_kernel+0x88/0x7c0
[ 0.000000]
[ 0.000000] ---[ end trace 0000000000000000 ]---
[ 0.000000] SoC Type: MediaTek MT7621 ver:1 eco:3
[ 0.000000] printk: bootconsole [early0] enabledAllowing soc_device_register to work exposed oops in the mt7621 phy pci, and pci controller drivers from soc_device_match_attr, due to missing sentinels in the quirks tables. These were fixed with:
commit 819b885cd886 ("phy: ralink: mt7621-pci: add sentinel to quirks table")
not yet applied ("PCI: mt7621: add sentinel to quirks table")
--- arch/mips/ralink/mt7621.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-)
arch/mips/ralink/mt7621.c +9 -5
@@ -23,6 +23,7 @@#define MT7621_MEM_TEST_PATTERN 0xaa5555aastatic u32 detect_magic__initdata ; +static struct ralink_soc_info *soc_info_ptr;phys_addr_t mips_cpc_default_phys_base (void ) {
@@ -116,27 +117,30 @@ static const char __init *mt7621_get_soc_revision(void)return "E1" ; } -static void soc_dev_init (struct ralink_soc_info *soc_info) +static int __init mt7621_soc_dev_init (void ) {struct soc_device *soc_dev;struct soc_device_attribute *soc_dev_attr; soc_dev_attr =kzalloc (sizeof (*soc_dev_attr),GFP_KERNEL );if (!soc_dev_attr) -return ; +return -ENOMEM ; soc_dev_attr->soc_id ="mt7621" ; soc_dev_attr->family ="Ralink" ; soc_dev_attr->revision =mt7621_get_soc_revision (); - soc_dev_attr->data = soc_info; + soc_dev_attr->data = soc_info_ptr; soc_dev =soc_device_register (soc_dev_attr);if (IS_ERR (soc_dev)) {kfree (soc_dev_attr); -return ; +return PTR_ERR (soc_dev); } + +return 0 ; } +device_initcall (mt7621_soc_dev_init);void __init prom_soc_init (struct ralink_soc_info *soc_info) {
@@ -178,7 +182,7 @@ void __init prom_soc_init(struct ralink_soc_info *soc_info) soc_info->mem_detect = mt7621_memory_detect; -soc_dev_init (soc_info); + soc_info_ptr = soc_info;if (!register_cps_smp_ops ())return ;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 116/731 futex: Move to kernel/futex/
In reply to Greg Kroah-HartmanFrom: Peter Zijlstra <[email protected]>
[ Upstream commit 77e52ae35463521041906c510fe580d15663bb93 ]
In preparation for splitup..
Stable-dep-of: 90d758896787 ("futex: Resend potentially swallowed owner death notification")
---
MAINTAINERS | 2 +-
kernel/Makefile | 2 +-
kernel/futex/Makefile | 3 +++
kernel/{futex.c => futex/core.c} | 2 +-
4 files changed, 6 insertions(+), 3 deletions(-)
create mode 100644 kernel/futex/Makefile
rename kernel/{futex.c => futex/core.c} (99%)MAINTAINERS +1 -1
@@ -7746,7 +7746,7 @@ F: Documentation/locking/*futex* F: include/asm-generic/futex.h F: include/linux/futex.h F: include/uapi/linux/futex.h -F: kernel/futex.c +F: kernel/futex/* F: tools/perf/bench/futex* F: tools/testing/selftests/futex/
kernel/Makefile +1 -1
@@ -59,7 +59,7 @@ obj-$(CONFIG_FREEZER) += freezer.o obj-$(CONFIG_PROFILING) += profile.o obj-$(CONFIG_STACKTRACE) += stacktrace.o obj-y += time/ -obj-$(CONFIG_FUTEX) += futex.o +obj-$(CONFIG_FUTEX) += futex/ obj-$(CONFIG_GENERIC_ISA_DMA) += dma.o obj-$(CONFIG_SMP) += smp.o ifneq ($(CONFIG_SMP),y)
kernel/futex/Makefile new file +3 -0
@@ -0,0 +1,3 @@ +# SPDX-License-Identifier: GPL-2.0 + +obj-y += core.o
kernel/futex/core.c renamed from kernel/futex.c +1 -1
@@ -42,7 +42,7 @@#include <asm/futex.h> -#include "locking/rtmutex_common.h" +#include "../locking/rtmutex_common.h" /* * READ this before attempting to hack on futexes!
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 117/731 futex: Resend potentially swallowed owner death notification
In reply to Greg Kroah-HartmanFrom: Alexey Izbyshev <[email protected]>
[ Upstream commit 90d758896787048fa3d4209309d4800f3920e66f ]
Commit ca16d5bee598 ("futex: Prevent robust futex exit race") addressed two cases when tasks waiting on a robust non-PI futex remained blocked despite the futex not being owned anymore:
* if the owner died after writing zero to the futex word, but before waking up a waiter
* if a task waiting on the futex was woken up, but died before updating the futex word (effectively swallowing the notification without acting on it)
In the second case, the task could be woken up either by the previous owner (after the futex word was reset to zero) or by the kernel (after the OWNER_DIED bit was set and the TID part of the futex word was reset to zero) if the previous owner died without the resetting the futex.
Because the referenced commit wakes up a potential waiter only if the whole futex word is zero, the latter subcase remains unaddressed.
Fix this by looking only at the TID part of the futex when deciding whether a wake up is needed.
--- kernel/futex/core.c | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-)
kernel/futex/core.c +17 -9
@@ -3632,6 +3632,7 @@ static int handle_futex_death(u32 __user *uaddr, struct task_struct *curr, bool pi, bool pending_op) {u32 uval, nval, mval; +pid_t owner;int err;/* Futex address must be 32bit aligned */
@@ -3653,6 +3654,10 @@ static int handle_futex_death(u32 __user *uaddr, struct task_struct *curr,* 2. A woken up waiter is killed before it can acquire the * futex in user space. * +* In the second case, the wake up notification could be generated +* by the unlock path in user space after setting the futex value +* to zero or by the kernel after setting the OWNER_DIED bit below. +* * In both cases the TID validation below prevents a wakeup of * potential waiters which can cause these waiters to block * forever.
@@ -3661,24 +3666,27 @@ static int handle_futex_death(u32 __user *uaddr, struct task_struct *curr,* * 1) task->robust_list->list_op_pending != NULL * @pending_op == true -* 2) User space futex value == 0 +* 2) The owner part of user space futex value == 0 * 3) Regular futex: @pi == false * * If these conditions are met, it is safe to attempt waking up a * potential waiter without touching the user space futex value and -* trying to set the OWNER_DIED bit. The user space futex value is -* uncontended and the rest of the user space mutex state is -* consistent, so a woken waiter will just take over the -* uncontended futex. Setting the OWNER_DIED bit would create -* inconsistent state and malfunction of the user space owner died -* handling. +* trying to set the OWNER_DIED bit. If the futex value is zero, +* the rest of the user space mutex state is consistent, so a woken +* waiter will just take over the uncontended futex. Setting the +* OWNER_DIED bit would create inconsistent state and malfunction +* of the user space owner died handling. Otherwise, the OWNER_DIED +* bit is already set, and the woken waiter is expected to deal with +* this. */ -if (pending_op && !pi && !uval) { + owner = uval &FUTEX_TID_MASK ; + +if (pending_op && !pi && !owner) {futex_wake (uaddr,1 ,1 ,FUTEX_BITSET_MATCH_ANY );return 0 ; } -if ((uval &FUTEX_TID_MASK ) !=task_pid_vnr (curr)) +if (owner !=task_pid_vnr (curr))return 0 ;/*
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 118/731 cpu/hotplug: Make target_store() a nop when target == state
In reply to Greg Kroah-HartmanFrom: Phil Auld <[email protected]>
[ Upstream commit 64ea6e44f85b9b75925ebe1ba0e6e8430cc4e06f ]
Writing the current state back in hotplug/target calls cpu_down() which will set cpu dying even when it isn't and then nothing will ever clear it. A stress test that reads values and writes them back for all cpu device files in sysfs will trigger the BUG() in select_fallback_rq once all cpus are marked as dying.
kernel/cpu.c::target_store()
...
if (st->state < target)
ret = cpu_up(dev->id, target);
else
ret = cpu_down(dev->id, target);cpu_down() -> cpu_set_state()
bool bringup = st->state < target; ... if (cpu_dying(cpu) != !bringup) set_cpu_dying(cpu, !bringup);
Fix this by letting state==target fall through in the target_store() conditional. Also make sure st->target == target in that case.
--- kernel/cpu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
kernel/cpu.c +3 -1
@@ -2315,8 +2315,10 @@ static ssize_t target_store(struct device *dev, struct device_attribute *attr,if (st->state < target) ret =cpu_up (dev->id, target); -else +else if (st->state > target) ret =cpu_down (dev->id, target); +else if (WARN_ON (st->target != target)) + st->target = target; out:unlock_device_hotplug ();return ret ? ret : count;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 119/731 cpu/hotplug: Do not bail-out in DYING/STARTING sections
In reply to Greg Kroah-HartmanFrom: Vincent Donnefort <[email protected]>
[ Upstream commit 6f855b39e4602b6b42a8e5cbcfefb8a1b8b5f0be ]
The DYING/STARTING callbacks are not expected to fail. However, as reported by Derek, buggy drivers such as tboot are still free to return errors within those sections, which halts the hot(un)plug and leaves the CPU in an unrecoverable state.
As there is no rollback possible, only log the failures and proceed with the following steps.
This restores the hotplug behaviour prior to commit 453e41085183 ("cpu/hotplug: Add cpuhp_invoke_callback_range()")
--- kernel/cpu.c | 56 +++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 40 insertions(+), 16 deletions(-)
kernel/cpu.c +40 -16
@@ -662,21 +662,51 @@ static bool cpuhp_next_state(bool bringup,return true; } -static int cpuhp_invoke_callback_range (bool bringup, -unsigned int cpu, -struct cpuhp_cpu_state *st, -enum cpuhp_state target) +static int __cpuhp_invoke_callback_range (bool bringup, +unsigned int cpu, +struct cpuhp_cpu_state *st, +enum cpuhp_state target, +bool nofail) {enum cpuhp_state state; -int err =0 ; +int ret =0 ;while (cpuhp_next_state (bringup, &state, st, target)) { +int err; + err =cpuhp_invoke_callback (cpu, state, bringup,NULL ,NULL ); -if (err) +if (!err) +continue ; + +if (nofail) { +pr_warn ("CPU %u %s state %s (%d) failed (%d)\n" , + cpu, bringup ?"UP" :"DOWN" , +cpuhp_get_step (st->state)->name, + st->state, err); + ret =-1 ; + }else { + ret = err;break ; + } } -return err; +return ret; +} + +static inline int cpuhp_invoke_callback_range (bool bringup, +unsigned int cpu, +struct cpuhp_cpu_state *st, +enum cpuhp_state target) +{ +return __cpuhp_invoke_callback_range (bringup, cpu, st, target, false); +} + +static inline void cpuhp_invoke_callback_range_nofail (bool bringup, +unsigned int cpu, +struct cpuhp_cpu_state *st, +enum cpuhp_state target) +{ +__cpuhp_invoke_callback_range (bringup, cpu, st, target, true); }static inline bool can_rollback_cpu (struct cpuhp_cpu_state *st)
@@ -994,7 +1024,6 @@ static int take_cpu_down(void *_param)struct cpuhp_cpu_state *st =this_cpu_ptr (&cpuhp_state);enum cpuhp_state target =max ((int )st->target,CPUHP_AP_OFFLINE );int err, cpu =smp_processor_id (); -int ret;/* Ensure this CPU doesn't handle any more interrupts. */ err =__cpu_disable ();
@@ -1007,13 +1036,10 @@ static int take_cpu_down(void *_param)*/ WARN_ON (st->state != (CPUHP_TEARDOWN_CPU -1 )); -/* Invoke the former CPU_DYING callbacks */ - ret =cpuhp_invoke_callback_range (false, cpu, st, target); -/* -* DYING must not fail! +* Invoke the former CPU_DYING callbacks. DYING must not fail! */ -WARN_ON_ONCE (ret); +cpuhp_invoke_callback_range_nofail (false, cpu, st, target);/* Give up timekeeping duties */ tick_handover_do_timer ();
@@ -1285,16 +1311,14 @@ void notify_cpu_starting(unsigned int cpu) {struct cpuhp_cpu_state *st =per_cpu_ptr (&cpuhp_state, cpu);enum cpuhp_state target =min ((int )st->target,CPUHP_AP_ONLINE ); -int ret;rcu_cpu_starting (cpu);/* Enables RCU usage on this CPU. */ cpumask_set_cpu (cpu, &cpus_booted_once_mask); - ret =cpuhp_invoke_callback_range (true, cpu, st, target);/* * STARTING must not fail! */ -WARN_ON_ONCE (ret); +cpuhp_invoke_callback_range_nofail (true, cpu, st, target); }/*
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 120/731 clocksource/drivers/timer-ti-dm: Fix missing clk_disable_unprepare in dmtimer_systimer_init_clock()
In reply to Greg Kroah-HartmanFrom: Yang Yingliang <[email protected]>
[ Upstream commit 180d35a7c05d520314a590c99ad8643d0213f28b ]
If clk_get_rate() fails which is called after clk_prepare_enable(), clk_disable_unprepare() need be called in error path to disable the clock in dmtimer_systimer_init_clock().
--- drivers/clocksource/timer-ti-dm-systimer.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/clocksource/timer-ti-dm-systimer.c +3 -1
@@ -345,8 +345,10 @@ static int __init dmtimer_systimer_init_clock(struct dmtimer_systimer *t,return error; r =clk_get_rate (clock); -if (!r) +if (!r) { +clk_disable_unprepare (clock);return -ENODEV ; + }if (is_ick) t->ick = clock;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 121/731 ACPICA: Fix use-after-free in acpi_ut_copy_ipackage_to_ipackage()
In reply to Greg Kroah-HartmanFrom: Li Zetao <[email protected]>
[ Upstream commit 470188b09e92d83c5a997f25f0e8fb8cd2bc3469 ]
There is an use-after-free reported by KASAN:
BUG: KASAN: use-after-free in acpi_ut_remove_reference+0x3b/0x82 Read of size 1 at addr ffff888112afc460 by task modprobe/2111 CPU: 0 PID: 2111 Comm: modprobe Not tainted 6.1.0-rc7-dirty Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), Call Trace: <TASK> kasan_report+0xae/0xe0 acpi_ut_remove_reference+0x3b/0x82 acpi_ut_copy_iobject_to_iobject+0x3be/0x3d5 acpi_ds_store_object_to_local+0x15d/0x3a0 acpi_ex_store+0x78d/0x7fd acpi_ex_opcode_1A_1T_1R+0xbe4/0xf9b acpi_ps_parse_aml+0x217/0x8d5 ... </TASK>
The root cause of the problem is that the acpi_operand_object is freed when acpi_ut_walk_package_tree() fails in acpi_ut_copy_ipackage_to_ipackage(), lead to repeated release in acpi_ut_copy_iobject_to_iobject(). The problem was introduced by "8aa5e56eeb61" commit, this commit is to fix memory leak in acpi_ut_copy_iobject_to_iobject(), repeatedly adding remove operation, lead to "acpi_operand_object" used after free.
Fix it by removing acpi_ut_remove_reference() in acpi_ut_copy_ipackage_to_ipackage(). acpi_ut_copy_ipackage_to_ipackage() is called to copy an internal package object into another internal package object, when it fails, the memory of acpi_operand_object should be freed by the caller.
--- drivers/acpi/acpica/utcopy.c | 7 ------- 1 file changed, 7 deletions(-)
drivers/acpi/acpica/utcopy.c +0 -7
@@ -916,13 +916,6 @@ acpi_ut_copy_ipackage_to_ipackage(union acpi_operand_object *source_obj, status =acpi_ut_walk_package_tree (source_obj, dest_obj, acpi_ut_copy_ielement_to_ielement, walk_state); -if (ACPI_FAILURE (status)) { - -/* On failure, delete the destination package object */ - -acpi_ut_remove_reference (dest_obj); - } -return_ACPI_STATUS (status); }
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 122/731 uprobes/x86: Allow to probe a NOP instruction with 0x66 prefix
In reply to Greg Kroah-HartmanFrom: Oleg Nesterov <[email protected]>
[ Upstream commit cefa72129e45313655d53a065b8055aaeb01a0c9 ]
Intel ICC -hotpatch inserts 2-byte "0x66 0x90" NOP at the start of each function to reserve extra space for hot-patching, and currently it is not possible to probe these functions because branch_setup_xol_ops() wrongly rejects NOP with REP prefix as it treats them like word-sized branch instructions.
--- arch/x86/kernel/uprobes.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
arch/x86/kernel/uprobes.c +3 -1
@@ -722,8 +722,9 @@ static int branch_setup_xol_ops(struct arch_uprobe *auprobe, struct insn *insn)switch (opc1) {case 0xeb :/* jmp 8 */ case 0xe9 :/* jmp 32 */ -case 0x90 :/* prefix* + nop; same as jmp with .offs = 0 */ break ; +case 0x90 :/* prefix* + nop; same as jmp with .offs = 0 */ + goto setup;case 0xe8 :/* call relative */ branch_clear_offset (auprobe, insn);
@@ -753,6 +754,7 @@ static int branch_setup_xol_ops(struct arch_uprobe *auprobe, struct insn *insn)return -ENOTSUPP ; } +setup: auprobe->branch.opc1 = opc1; auprobe->branch.ilen = insn->length; auprobe->branch.offs = insn->immediate.value;
Signature · 1 line
2.35.1