Commit Graph

919 Commits

Author SHA1 Message Date
Aaron Kling c4710e1aef cpuidle: tegra: Export tegra_cpuidle_pcie_irqs_in_use
Add export for tegra_cpuidle_pcie_irqs_in_use() so that drivers like
pci-tegra can be loaded as a module.

Signed-off-by: Aaron Kling <webgeek1234@gmail.com>
2025-11-01 21:19:35 -05:00
Greg Kroah-Hartman fcc21a6112 Merge 11c7fa11fa ("net: stmmac: dwmac-loongson: Set correct {tx,rx}_fifo_size") into android16-6.12-lts
Steps on the way to 6.12.31

Resolves merge conflicts in:
	kernel/sched/fair.c

Change-Id: I545f90ce44822f1a0f940be224258533b6581077
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2025-07-02 07:08:57 +00:00
Rafael J. Wysocki 083383aba0 cpuidle: menu: Avoid discarding useful information
[ Upstream commit 85975daeaa4d6ec560bfcd354fc9c08ad7f38888 ]

When giving up on making a high-confidence prediction,
get_typical_interval() always returns UINT_MAX which means that the
next idle interval prediction will be based entirely on the time till
the next timer.  However, the information represented by the most
recent intervals may not be completely useless in those cases.

Namely, the largest recent idle interval is an upper bound on the
recently observed idle duration, so it is reasonable to assume that
the next idle duration is unlikely to exceed it.  Moreover, this is
still true after eliminating the suspected outliers if the sample
set still under consideration is at least as large as 50% of the
maximum sample set size.

Accordingly, make get_typical_interval() return the current maximum
recent interval value in that case instead of UINT_MAX.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reported-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Tested-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Reviewed-by: Christian Loehle <christian.loehle@arm.com>
Tested-by: Christian Loehle <christian.loehle@arm.com>
Tested-by: Aboorva Devarajan <aboorvad@linux.ibm.com>
Link: https://patch.msgid.link/7770672.EvYhyI6sBW@rjwysocki.net
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-05-29 11:02:38 +02:00
Greg Kroah-Hartman 6c86d6f4fe Merge 6.12.11 into android16-6.12
GKI (arm64) relevant 28 out of 122 changes, affecting 34 files +368/-94
  cccd51dd22 bpf: Fix bpf_sk_select_reuseport() memory leak [1 file, +18/-12]
  1654578a3b cpuidle: teo: Update documentation after previous changes [1 file, +48/-43]
  7a4fd3df85 net: make page_pool_ref_netmem work with net iovs [1 file, +1/-1]
  2b78cab481 netdev: avoid CFI problems with sock priv helpers [2 files, +25/-5]
  e19f31169f i2c: core: fix reference leak in i2c_register_adapter() [1 file, +1/-0]
  b856d2c138 mac802154: check local interfaces before deleting sdata list [1 file, +4/-0]
  7c37879b76 fs: fix missing declaration of init_files [1 file, +1/-0]
  3d46037625 netfs: Fix non-contiguous donation between completed reads [1 file, +5/-4]
  ac216ffa69 scsi: ufs: core: Honor runtime/system PM levels if set by host controller drivers [1 file, +6/-3]
  402ce16421 iomap: avoid avoid truncating 64-bit offset to 32 bits [1 file, +1/-1]
  621f95fa0b poll_wait: add mb() to fix theoretical race between waitqueue_active() and .poll() [1 file, +9/-1]
  e98394f7bc sched/fair: Fix update_cfs_group() vs DELAY_DEQUEUE [1 file, +5/-1]
  902ef8f16d zram: fix potential UAF of zram table [1 file, +1/-0]
  6771e1279d vsock/bpf: return early if transport is not assigned [1 file, +9/-0]
  677579b641 vsock/virtio: discard packets if the transport changes [1 file, +5/-2]
  450aa12993 vsock/virtio: cancel close work in the destructor [1 file, +21/-8]
  01c178d690 vsock: reset socket state when de-assigning the transport [1 file, +9/-0]
  c23d1d4f8e vsock: prevent null-ptr-deref in vsock_*[has_data|has_space] [1 file, +9/-0]
  280f1fb89a filemap: avoid truncating 64-bit offset to 32 bits [1 file, +1/-1]
  310ac886d6 mm: clear uffd-wp PTE/PMD state on mremap() [4 files, +68/-2]
  c78b04977d mm: vmscan : pgdemote vmstat is not getting updated when MGLRU is enabled. [1 file, +3/-0]
  e96a2838d8 tracing: gfp: Fix the GFP enum values shown for user space tracing tools [1 file, +63/-0]
  115719a953 irqchip: Plug a OF node reference leak in platform_irqchip_probe() [1 file, +1/-3]
  44feb76129 irqchip/gic-v3: Handle CPU_PM_ENTER_FAILED correctly [1 file, +1/-1]
  93955a7788 irqchip/gic-v3-its: Don't enable interrupts in its_irq_set_vcpu_affinity() [1 file, +1/-1]
  38492f6ee8 hrtimers: Handle CPU state correctly on hotplug [3 files, +12/-2]
  12ead225b7 timers/migration: Fix another race between hotplug and idle entry/exit [1 file, +28/-1]
  6e641d499b timers/migration: Enforce group initialization visibility to tree walkers [1 file, +12/-2]

Changes in 6.12.11
	efi/zboot: Limit compression options to GZIP and ZSTD
	net: ethernet: ti: cpsw_ale: Fix cpsw_ale_get_field()
	bpf: Fix bpf_sk_select_reuseport() memory leak
	eth: bnxt: always recalculate features after XDP clearing, fix null-deref
	net: ravb: Fix max TX frame size for RZ/V2M
	openvswitch: fix lockup on tx to unregistering netdev with carrier
	pktgen: Avoid out-of-bounds access in get_imix_entries
	ice: Fix E825 initialization
	ice: Fix quad registers read on E825
	ice: Fix ETH56G FC-FEC Rx offset value
	ice: Introduce ice_get_phy_model() wrapper
	ice: Add ice_get_ctrl_ptp() wrapper to simplify the code
	ice: Use ice_adapter for PTP shared data instead of auxdev
	ice: Add correct PHY lane assignment
	cpuidle: teo: Update documentation after previous changes
	btrfs: add the missing error handling inside get_canonical_dev_path
	gtp: Use for_each_netdev_rcu() in gtp_genl_dump_pdp().
	gtp: Destroy device along with udp socket's netns dismantle.
	pfcp: Destroy device along with udp socket's netns dismantle.
	cpufreq: Move endif to the end of Kconfig file
	nfp: bpf: prevent integer overflow in nfp_bpf_event_output()
	net: xilinx: axienet: Fix IRQ coalescing packet count overflow
	net: fec: handle page_pool_dev_alloc_pages error
	net: make page_pool_ref_netmem work with net iovs
	net/mlx5: Fix RDMA TX steering prio
	net/mlx5: Fix a lockdep warning as part of the write combining test
	net/mlx5: SF, Fix add port error handling
	net/mlx5: Clear port select structure when fail to create
	net/mlx5e: Fix inversion dependency warning while enabling IPsec tunnel
	net/mlx5e: Rely on reqid in IPsec tunnel mode
	net/mlx5e: Always start IPsec sequence number from 1
	netdev: avoid CFI problems with sock priv helpers
	drm/tests: helpers: Fix compiler warning
	drm/vmwgfx: Unreserve BO on error
	drm/vmwgfx: Add new keep_resv BO param
	drm/v3d: Ensure job pointer is set to NULL after job completion
	reset: rzg2l-usbphy-ctrl: Assign proper of node to the allocated device
	soc: ti: pruss: Fix pruss APIs
	i2c: core: fix reference leak in i2c_register_adapter()
	platform/x86: dell-uart-backlight: fix serdev race
	platform/x86: lenovo-yoga-tab2-pro-1380-fastcharger: fix serdev race
	hwmon: (tmp513) Fix division of negative numbers
	Revert "mtd: spi-nor: core: replace dummy buswidth from addr to data"
	i2c: mux: demux-pinctrl: check initial mux selection, too
	i2c: rcar: fix NACK handling when being a target
	i2c: testunit: on errors, repeat NACK until STOP
	hwmon: (ltc2991) Fix mixed signed/unsigned in DIV_ROUND_CLOSEST
	smb: client: fix double free of TCP_Server_Info::hostname
	mac802154: check local interfaces before deleting sdata list
	hfs: Sanity check the root record
	fs/qnx6: Fix building with GCC 15
	fs: fix missing declaration of init_files
	kheaders: Ignore silly-rename files
	netfs: Fix non-contiguous donation between completed reads
	cachefiles: Parse the "secctx" immediately
	scsi: ufs: core: Honor runtime/system PM levels if set by host controller drivers
	gpio: virtuser: lock up configfs that an instantiated device depends on
	gpio: sim: lock up configfs that an instantiated device depends on
	selftests: tc-testing: reduce rshift value
	platform/x86/intel: power-domains: Add Clearwater Forest support
	platform/x86: ISST: Add Clearwater Forest to support list
	ACPI: resource: acpi_dev_irq_override(): Check DMI match last
	sched_ext: keep running prev when prev->scx.slice != 0
	iomap: avoid avoid truncating 64-bit offset to 32 bits
	afs: Fix merge preference rule failure condition
	poll_wait: add mb() to fix theoretical race between waitqueue_active() and .poll()
	selftests/sched_ext: fix build after renames in sched_ext API
	scx: Fix maximal BPF selftest prog
	RDMA/bnxt_re: Fix to export port num to ib_query_qp
	sched_ext: Fix dsq_local_on selftest
	nvmet: propagate npwg topology
	sched/fair: Fix update_cfs_group() vs DELAY_DEQUEUE
	x86/asm: Make serialize() always_inline
	ALSA: hda/realtek: Add support for Ayaneo System using CS35L41 HDA
	ALSA: hda/realtek: fixup ASUS GA605W
	ALSA: hda/realtek: fixup ASUS H7606W
	zram: fix potential UAF of zram table
	i2c: atr: Fix client detach
	mptcp: be sure to send ack when mptcp-level window re-opens
	mptcp: fix spurious wake-up on under memory pressure
	selftests: mptcp: avoid spurious errors on disconnect
	net: ethernet: xgbe: re-add aneg to supported features in PHY quirks
	vsock/bpf: return early if transport is not assigned
	vsock/virtio: discard packets if the transport changes
	vsock/virtio: cancel close work in the destructor
	vsock: reset socket state when de-assigning the transport
	vsock: prevent null-ptr-deref in vsock_*[has_data|has_space]
	nouveau/fence: handle cross device fences properly
	drm/nouveau/disp: Fix missing backlight control on Macbook 5,1
	net/ncsi: fix locking in Get MAC Address handling
	filemap: avoid truncating 64-bit offset to 32 bits
	fs/proc: fix softlockup in __read_vmcore (part 2)
	gpio: xilinx: Convert gpio_lock to raw spinlock
	tools: fix atomic_set() definition to set the value correctly
	pmdomain: imx8mp-blk-ctrl: add missing loop break condition
	mm/kmemleak: fix percpu memory leak detection failure
	selftests/mm: set allocated memory to non-zero content in cow test
	drm/amd/display: Do not elevate mem_type change to full update
	mm: clear uffd-wp PTE/PMD state on mremap()
	mm: vmscan : pgdemote vmstat is not getting updated when MGLRU is enabled.
	tracing: gfp: Fix the GFP enum values shown for user space tracing tools
	irqchip: Plug a OF node reference leak in platform_irqchip_probe()
	irqchip/gic-v3: Handle CPU_PM_ENTER_FAILED correctly
	irqchip/gic-v3-its: Don't enable interrupts in its_irq_set_vcpu_affinity()
	hrtimers: Handle CPU state correctly on hotplug
	timers/migration: Fix another race between hotplug and idle entry/exit
	timers/migration: Enforce group initialization visibility to tree walkers
	x86/fred: Fix the FRED RSP0 MSR out of sync with its per-CPU cache
	drm/i915/fb: Relax clear color alignment to 64 bytes
	drm/xe: Mark ComputeCS read mode as UC on iGPU
	drm/xe/oa: Add missing VISACTL mux registers
	drm/amdgpu/smu13: update powersave optimizations
	drm/amdgpu: fix fw attestation for MP0_14_0_{2/3}
	drm/amdgpu: disable gfxoff with the compute workload on gfx12
	drm/amdgpu: always sync the GFX pipe on ctx switch
	drm/amd/display: Fix PSR-SU not support but still call the amdgpu_dm_psr_enable
	drm/amd/display: Disable replay and psr while VRR is enabled
	drm/amd/display: Do not wait for PSR disable on vbl enable
	Revert "drm/amd/display: Enable urgent latency adjustments for DCN35"
	drm/amd/display: Validate mdoe under MST LCT=1 case as well
	apparmor: allocate xmatch for nullpdb inside aa_alloc_null
	Linux 6.12.11

Change-Id: I44fe9d80e5229632bb5dcbab4d39302fa03c099f
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2025-01-27 00:06:30 -08:00
Rafael J. Wysocki 1654578a3b cpuidle: teo: Update documentation after previous changes
[ Upstream commit 5a597a19a2148d1c5cd987907a60c042ab0f62d5 ]

After previous changes, the description of the teo governor in the
documentation comment does not match the code any more, so update it
as appropriate.

Fixes: 4499143980 ("cpuidle: teo: Remove recent intercepts metric")
Fixes: 2662342079 ("cpuidle: teo: Gather statistics regarding whether or not to stop the tick")
Fixes: 6da8f9ba5a ("cpuidle: teo: Skip tick_nohz_get_sleep_length() call in some cases")
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Christian Loehle <christian.loehle@arm.com>
Link: https://patch.msgid.link/6120335.lOV4Wx5bFT@rjwysocki.net
[ rjw: Corrected 3 typos found by Christian ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-01-23 17:22:49 +01:00
Greg Kroah-Hartman e067e1551b Merge 6.12.10 into android16-6.12
GKI (arm64) relevant 50 out of 186 changes, affecting 60 files +397/-205
  56c4353ce4 jbd2: increase IO priority for writing revoke records [1 file, +1/-1]
  a5bc868610 jbd2: flush filesystem device before updating tail sequence [1 file, +2/-2]
  7adf7df4bb iomap: pass byte granular end position to iomap_add_to_ioend [1 file, +12/-9]
  82c59a86a2 iomap: fix zero padding data issue in concurrent append writes [2 files, +46/-1]
  88ecdfea1b netfs: Fix enomem handling in buffered reads [1 file, +16/-12]
  2c3348864a netfs: Fix missing barriers by using clear_and_wake_up_bit() [2 files, +4/-8]
  43b8d3249b netfs: Fix ceph copy to cache on write-begin [1 file, +4/-2]
  ba37bdfe59 netfs: Fix the (non-)cancellation of copy when cache is temporarily disabled [1 file, +4/-0]
  6f153055ba netfs: Fix is-caching check in read-retry [2 files, +1/-2]
  d9ea94f5cd exfat: fix the infinite loop in exfat_readdir() [1 file, +2/-1]
  942c6f91ab exfat: fix the new buffer was not zeroed before writing [1 file, +6/-0]
  0bebeb6672 exfat: fix the infinite loop in __exfat_free_cluster() [1 file, +10/-0]
  c0f613f214 fuse: respect FOPEN_KEEP_CACHE on opendir [1 file, +2/-0]
  668d8dea2c ovl: pass realinode to ovl_encode_real_fh() instead of realdentry [4 files, +12/-10]
  3c7c90274a ovl: support encoding fid from inode with no alias [1 file, +25/-21]
  a3a9630d4d net: 802: LLC+SNAP OID:PID lookup on start of skb data [1 file, +2/-2]
  e4a92f0d51 tcp/dccp: allow a connection when sk_max_ack_backlog is zero [1 file, +1/-1]
  6fde663f73 net_sched: cls_flow: validate TCA_FLOW_RSHIFT attribute [1 file, +2/-1]
  61b437faf2 net: don't dump Tx and uninitialized NAPIs [1 file, +3/-2]
  52a24538d5 ipvlan: Fix use-after-free in ipvlan_get_iflink(). [1 file, +7/-3]
  ccc1ef1884 Bluetooth: hci_sync: Fix not setting Random Address when required [1 file, +6/-5]
  1f88b53135 Bluetooth: MGMT: Fix Add Device to responding before completing [1 file, +36/-2]
  8b800ea3f3 tcp: Annotate data-race around sk->sk_mark in tcp_v4_send_reset [1 file, +1/-1]
  f559357d03 netfilter: conntrack: clamp maximum hashtable size to INT_MAX [1 file, +4/-1]
  9f3a265836 netfs: Fix kernel async DIO [1 file, +6/-1]
  3f545392e9 netfs: Fix read-retry for fs with no ->prepare_read() [1 file, +2/-1]
  adcde2872f fs: relax assertions on failure to encode file handles [2 files, +3/-6]
  8790d511d4 fs: fix is_mnt_ns_file() [1 file, +8/-2]
  fc89438866 dm-verity FEC: Fix RS FEC repair for roots unaligned to block size (take 2) [1 file, +26/-14]
  dc63fd2e47 cgroup/cpuset: Prevent leakage of isolated CPUs into sched domains [2 files, +28/-15]
  5b80f2fe8a thermal: of: fix OF node leak in of_thermal_zone_find() [1 file, +1/-0]
  11cb1d643a cgroup/cpuset: remove kernfs active break [1 file, +0/-25]
  2b30bffd9a io_uring/timeout: fix multishot updates [1 file, +3/-1]
  aa7496d668 io_uring/sqpoll: zero sqd->thread on tctx errors [1 file, +5/-1]
  360596e7fe topology: Keep the cpumask unchanged when printing cpumap [1 file, +20/-4]
  07f09383b1 tty: serial: 8250: Fix another runtime PM usage counter underflow [1 file, +3/-0]
  8e122d780a usb: gadget: u_serial: Disable ep before setting port to null to fix the crash caused by port being null [1 file, +4/-4]
  e982fcb440 USB: core: Disable LPM only for non-suspended ports [1 file, +4/-3]
  4fb62dea06 usb: fix reference leak in usb_new_device() [1 file, +4/-2]
  8586d6ea62 usb: typec: tcpci: fix NULL pointer issue on shared irq case [1 file, +15/-10]
  4bb6450bfd usb: gadget: f_uac2: Fix incorrect setting of bNumEndpoints [1 file, +1/-0]
  a8b6a18b9b usb: gadget: f_fs: Remove WARN_ON in functionfs_bind [1 file, +1/-1]
  62aa896683 usb: gadget: configfs: Ignore trailing LF for user strings to cdev [1 file, +5/-1]
  a25f1e6f60 usb: host: xhci-plat: set skip_phy_initialization if software node has XHCI_SKIP_PHY_INIT property [1 file, +2/-1]
  b44c99621d iio: inkern: call iio_device_put() only on mapped devices [1 file, +1/-1]
  a7085c3ae4 io_uring/eventfd: ensure io_eventfd_signal() defers another RCU period [1 file, +1/-1]
  bc2aeb35ff block, bfq: fix waker_bfqq UAF after bfq_split_bfqq() [1 file, +10/-2]
  810aad1d7f firewall: remove misplaced semicolon from stm32_firewall_get_firewall [1 file, +1/-1]
  476e4c4a1a io_uring: don't touch sqd->thread off tw add [1 file, +1/-4]
  b683ba0df1 netdev: prevent accessing NAPI instances from another namespace [3 files, +33/-17]

Changes in 6.12.10
	jbd2: increase IO priority for writing revoke records
	jbd2: flush filesystem device before updating tail sequence
	fs/writeback: convert wbc_account_cgroup_owner to take a folio
	iomap: pass byte granular end position to iomap_add_to_ioend
	iomap: fix zero padding data issue in concurrent append writes
	dm array: fix releasing a faulty array block twice in dm_array_cursor_end
	dm array: fix unreleased btree blocks on closing a faulty array cursor
	dm array: fix cursor index when skipping across block boundaries
	netfs: Fix enomem handling in buffered reads
	nfs: Fix oops in nfs_netfs_init_request() when copying to cache
	netfs: Fix missing barriers by using clear_and_wake_up_bit()
	netfs: Fix ceph copy to cache on write-begin
	netfs: Fix the (non-)cancellation of copy when cache is temporarily disabled
	netfs: Fix is-caching check in read-retry
	exfat: fix the infinite loop in exfat_readdir()
	exfat: fix the new buffer was not zeroed before writing
	exfat: fix the infinite loop in __exfat_free_cluster()
	fuse: respect FOPEN_KEEP_CACHE on opendir
	ovl: pass realinode to ovl_encode_real_fh() instead of realdentry
	ovl: support encoding fid from inode with no alias
	ASoC: rt722: add delay time to wait for the calibration procedure
	ASoC: mediatek: disable buffer pre-allocation
	selftests/alsa: Fix circular dependency involving global-timer
	ieee802154: ca8210: Add missing check for kfifo_alloc() in ca8210_probe()
	net: 802: LLC+SNAP OID:PID lookup on start of skb data
	tcp/dccp: allow a connection when sk_max_ack_backlog is zero
	net_sched: cls_flow: validate TCA_FLOW_RSHIFT attribute
	net: libwx: fix firmware mailbox abnormal return
	btrfs: avoid NULL pointer dereference if no valid extent tree
	pds_core: limit loop over fw name list
	bnxt_en: Fix possible memory leak when hwrm_req_replace fails
	bnxt_en: Fix DIM shutdown
	cxgb4: Avoid removal of uninserted tid
	net: don't dump Tx and uninitialized NAPIs
	ice: fix max values for dpll pin phase adjust
	ice: fix incorrect PHY settings for 100 GB/s
	igc: return early when failing to read EECD register
	tls: Fix tls_sw_sendmsg error handling
	ipvlan: Fix use-after-free in ipvlan_get_iflink().
	eth: gve: use appropriate helper to set xdp_features
	Bluetooth: hci_sync: Fix not setting Random Address when required
	Bluetooth: MGMT: Fix Add Device to responding before completing
	Bluetooth: btnxpuart: Fix driver sending truncated data
	Bluetooth: btmtk: Fix failed to send func ctrl for MediaTek devices.
	tcp: Annotate data-race around sk->sk_mark in tcp_v4_send_reset
	net: hns3: fixed reset failure issues caused by the incorrect reset type
	net: hns3: fix missing features due to dev->features configuration too early
	net: hns3: Resolved the issue that the debugfs query result is inconsistent.
	net: hns3: don't auto enable misc vector
	net: hns3: initialize reset_timer before hclgevf_misc_irq_init()
	net: hns3: fixed hclge_fetch_pf_reg accesses bar space out of bounds issue
	net: hns3: fix kernel crash when 1588 is sent on HIP08 devices
	mctp i3c: fix MCTP I3C driver multi-thread issue
	netfilter: nf_tables: imbalance in flowtable binding
	netfilter: conntrack: clamp maximum hashtable size to INT_MAX
	sched: sch_cake: add bounds checks to host bulk flow fairness counts
	net: stmmac: dwmac-tegra: Read iommu stream id from device tree
	rtase: Fix a check for error in rtase_alloc_msix()
	net/mlx5: Fix variable not being completed when function returns
	drm/mediatek: Set private->all_drm_private[i]->drm to NULL if mtk_drm_bind returns err
	drm/mediatek: Move mtk_crtc_finish_page_flip() to ddp_cmdq_cb()
	drm/mediatek: Add support for 180-degree rotation in the display driver
	drm/mediatek: stop selecting foreign drivers
	drm/mediatek: Fix YCbCr422 color format issue for DP
	drm/mediatek: Fix mode valid issue for dp
	drm/mediatek: mtk_dsi: Add registers to pdata to fix MT8186/MT8188
	gpio: virtuser: fix missing lookup table cleanups
	gpio: virtuser: fix handling of multiple conn_ids in lookup table
	drm/mediatek: Add return value check when reading DPCD
	ksmbd: fix a missing return value check bug
	afs: Fix the maximum cell name length
	platform/x86/amd/pmc: Only disable IRQ1 wakeup where i8042 actually enabled it
	platform/x86: intel/pmc: Fix ioremap() of bad address
	ksmbd: fix unexpectedly changed path in ksmbd_vfs_kern_path_locked
	riscv: module: remove relocation_head rel_entry member allocation
	cpuidle: riscv-sbi: fix device node release in early exit of for_each_possible_cpu
	riscv: mm: Fix the out of bound issue of vmemmap address
	riscv: stacktrace: fix backtracing through exceptions
	riscv: use local label names instead of global ones in assembly
	drm/xe: Fix tlb invalidation when wedging
	netfs: Fix kernel async DIO
	netfs: Fix read-retry for fs with no ->prepare_read()
	drivers/perf: riscv: Fix Platform firmware event data
	drivers/perf: riscv: Return error for default case
	dm thin: make get_first_thin use rcu-safe list first function
	scsi: ufs: qcom: Power off the PHY if it was already powered on in ufs_qcom_power_up_sequence()
	vfio/pci: Fallback huge faults for unaligned pfn
	fs: relax assertions on failure to encode file handles
	fs: fix is_mnt_ns_file()
	dm-ebs: don't set the flag DM_TARGET_PASSES_INTEGRITY
	dm-verity FEC: Fix RS FEC repair for roots unaligned to block size (take 2)
	mptcp: sysctl: avail sched: remove write access
	mptcp: sysctl: sched: avoid using current->nsproxy
	mptcp: sysctl: blackhole timeout: avoid using current->nsproxy
	sctp: sysctl: cookie_hmac_alg: avoid using current->nsproxy
	sctp: sysctl: rto_min/max: avoid using current->nsproxy
	sctp: sysctl: auth_enable: avoid using current->nsproxy
	sctp: sysctl: udp_port: avoid using current->nsproxy
	sctp: sysctl: plpmtud_probe_interval: avoid using current->nsproxy
	rds: sysctl: rds_tcp_{rcv,snd}buf: avoid using current->nsproxy
	ksmbd: Implement new SMB3 POSIX type
	btrfs: zlib: fix avail_in bytes for s390 zlib HW compression path
	Revert "drm/mediatek: dsi: Correct calculation formula of PHY Timing"
	drm/amd/display: Remove unnecessary amdgpu_irq_get/put
	drm/amd/display: Add check for granularity in dml ceil/floor helpers
	cgroup/cpuset: Prevent leakage of isolated CPUs into sched domains
	thermal: of: fix OF node leak in of_thermal_zone_find()
	sched_ext: Replace rq_lock() to raw_spin_rq_lock() in scx_ops_bypass()
	sched_ext: switch class when preempted by higher priority scheduler
	cgroup/cpuset: remove kernfs active break
	sched_ext: idle: Refresh idle masks during idle-to-idle transitions
	arm64: dts: qcom: x1e80100: Fix up BAR space size for PCIe6a
	arm64: dts: qcom: sa8775p: Fix the size of 'addr_space' regions
	smb: client: sync the root session and superblock context passwords before automounting
	fs: kill MNT_ONRB
	riscv: Fix sleeping in invalid context in die()
	riscv: kprobes: Fix incorrect address calculation
	gpio: loongson: Fix Loongson-2K2000 ACPI GPIO register offset
	ACPI: resource: Add TongFang GM5HG0A to irq1_edge_low_force_override[]
	ACPI: resource: Add Asus Vivobook X1504VAP to irq1_level_low_skip_override[]
	drm/amdgpu: Add a lock when accessing the buddy trim function
	drm/amd/pm: fix BUG: scheduling while atomic
	drm/amdkfd: fixed page fault when enable MES shader debugger
	drm/amdkfd: wq_release signals dma_fence only when available
	drm/amd/display: fix divide error in DM plane scale calcs
	drm/amd/display: fix page fault due to max surface definition mismatch
	drm/amd/display: increase MAX_SURFACES to the value supported by hw
	io_uring/timeout: fix multishot updates
	io_uring/sqpoll: zero sqd->thread on tctx errors
	USB: serial: option: add MeiG Smart SRM815
	USB: serial: option: add Neoway N723-EA support
	staging: iio: ad9834: Correct phase range check
	staging: iio: ad9832: Correct phase range check
	usb-storage: Add max sectors quirk for Nokia 208
	USB: serial: cp210x: add Phoenix Contact UPS Device
	usb: dwc3: gadget: fix writing NYET threshold
	topology: Keep the cpumask unchanged when printing cpumap
	misc: microchip: pci1xxxx: Resolve kernel panic during GPIO IRQ handling
	misc: microchip: pci1xxxx: Resolve return code mismatch during GPIO set config
	tty: serial: 8250: Fix another runtime PM usage counter underflow
	serial: stm32: use port lock wrappers for break control
	usb: gadget: u_serial: Disable ep before setting port to null to fix the crash caused by port being null
	x86/fpu: Ensure shadow stack is active before "getting" registers
	usb: dwc3-am62: Disable autosuspend during remove
	USB: usblp: return error when setting unsupported protocol
	USB: core: Disable LPM only for non-suspended ports
	usb: fix reference leak in usb_new_device()
	usb: gadget: midi2: Reverse-select at the right place
	usb: chipidea: ci_hdrc_imx: decrement device's refcount in .remove() and in the error path of .probe()
	usb: typec: tcpci: fix NULL pointer issue on shared irq case
	usb: gadget: f_uac2: Fix incorrect setting of bNumEndpoints
	usb: typec: tcpm/tcpci_maxim: fix error code in max_contaminant_read_resistance_kohm()
	usb: gadget: f_fs: Remove WARN_ON in functionfs_bind
	usb: gadget: configfs: Ignore trailing LF for user strings to cdev
	usb: host: xhci-plat: set skip_phy_initialization if software node has XHCI_SKIP_PHY_INIT property
	usb: typec: fix pm usage counter imbalance in ucsi_ccg_sync_control()
	iio: pressure: zpa2326: fix information leak in triggered buffer
	iio: dummy: iio_simply_dummy_buffer: fix information leak in triggered buffer
	iio: light: vcnl4035: fix information leak in triggered buffer
	iio: light: bh1745: fix information leak in triggered buffer
	iio: imu: kmx61: fix information leak in triggered buffer
	iio: adc: rockchip_saradc: fix information leak in triggered buffer
	iio: adc: ti-ads8688: fix information leak in triggered buffer
	iio: adc: ti-ads1119: fix information leak in triggered buffer
	iio: adc: ti-ads1119: fix sample size in scan struct for triggered buffer
	iio: gyro: fxas21002c: Fix missing data update in trigger handler
	iio: adc: ti-ads1298: Add NULL check in ads1298_init
	iio: imu: inv_icm42600: fix timestamps after suspend if sensor is on
	iio: adc: ti-ads124s08: Use gpiod_set_value_cansleep()
	iio: adc: at91: call input_free_device() on allocated iio_dev
	iio: inkern: call iio_device_put() only on mapped devices
	iio: adc: ad7173: fix using shared static info struct
	iio: adc: ad7124: Disable all channels at probe time
	io_uring/eventfd: ensure io_eventfd_signal() defers another RCU period
	arm64: dts: imx95: correct the address length of netcmix_blk_ctrl
	ARM: dts: imxrt1050: Fix clocks for mmc
	arm64: dts: qcom: sa8775p: fix the secure device bootup issue
	hwmon: (drivetemp) Fix driver producing garbage data when SCSI errors occur
	block, bfq: fix waker_bfqq UAF after bfq_split_bfqq()
	arm64: dts: rockchip: add hevc power domain clock to rk3328
	firewall: remove misplaced semicolon from stm32_firewall_get_firewall
	drm/mediatek: Only touch DISP_REG_OVL_PITCH_MSB if AFBC is supported
	io_uring: don't touch sqd->thread off tw add
	iio: imu: inv_icm42600: fix spi burst write not supported
	netdev: prevent accessing NAPI instances from another namespace
	Linux 6.12.10

Change-Id: Ie2f94fe090d61be2389c21427b56a19ec5f88bd6
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2025-01-17 14:59:06 +00:00
Javier Carrasco 0ea7a3e442 cpuidle: riscv-sbi: fix device node release in early exit of for_each_possible_cpu
[ Upstream commit 7e25044b804581b9c029d5a28d8800aebde18043 ]

The 'np' device_node is initialized via of_cpu_device_node_get(), which
requires explicit calls to of_node_put() when it is no longer required
to avoid leaking the resource.

Instead of adding the missing calls to of_node_put() in all execution
paths, use the cleanup attribute for 'np' by means of the __free()
macro, which automatically calls of_node_put() when the variable goes
out of scope. Given that 'np' is only used within the
for_each_possible_cpu(), reduce its scope to release the nood after
every iteration of the loop.

Fixes: 6abf32f1d9 ("cpuidle: Add RISC-V SBI CPU idle driver")
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Link: https://lore.kernel.org/r/20241116-cpuidle-riscv-sbi-cleanup-v3-1-a3a46372ce08@gmail.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-01-17 13:40:44 +01:00
Matthias Maennich f5bf391ca4 Merge 4a39ac5b7d ("Merge tag 'random-6.12-rc1-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/crng/random") into android-mainline
Steps on the way to 6.12-rc1

Bug: 367265496
Change-Id: I115d487c6294c249dd30b708b3164f34be34d874
Signed-off-by: Matthias Maennich <maennich@google.com>
2024-09-27 02:18:36 +00:00
Matthias Maennich cec17c3f69 Merge d22300518d ("Merge tag 'thermal-6.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm") into android-mainline
Steps on the way to 6.12-rc1

Bug: 367265496
Change-Id: I4680f7ffbaacc2bc7324d49881df8aaa8d732c6e
Signed-off-by: Matthias Maennich <maennich@google.com>
2024-09-24 08:46:36 +00:00
Linus Torvalds 200289db26 Merge tag 'pmdomain-v6.12' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/linux-pm
Pull pmdomain updates from Ulf Hansson:
 "pmdomain core:
   - Add support for s2idle for CPU PM domains on PREEMPT_RT
   - Add device managed version of dev_pm_domain_attach|detach_list()
   - Improve layout of the debugfs summary table

  pmdomain providers:
   - amlogic: Remove obsolete vpu domain driver
   - bcm: raspberrypi: Add support for devices used as wakeup-sources
   - imx: Fixup clock handling for imx93 at driver remove
   - rockchip: Add gating support for RK3576
   - rockchip: Add support for RK3576 SoC
   - Some OF parsing simplifications
   - Some simplifications by using dev_err_probe() and guard()

  pmdomain consumers:
   - qcom/media/venus: Convert to the device managed APIs for PM domains

  cpuidle-psci:
   - Add support for s2idle/s2ram for the hierarchical topology on
     PREEMPT_RT
   - Some OF parsing simplifications"

* tag 'pmdomain-v6.12' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/linux-pm: (39 commits)
  pmdomain: core: Reduce debug summary table width
  pmdomain: core: Move mode_status_str()
  pmdomain: core: Fix "managed by" alignment in debug summary
  pmdomain: core: Harden inter-column space in debug summary
  pmdomain: rockchip: Add gating masks for rk3576
  pmdomain: rockchip: Add gating support
  pmdomain: rockchip: Simplify dropping OF node reference
  pmdomain: mediatek: make use of dev_err_cast_probe()
  pmdomain: imx93-pd: drop the context variable "init_off"
  pmdomain: imx93-pd: don't unprepare clocks on driver remove
  pmdomain: imx93-pd: replace dev_err() with dev_err_probe()
  pmdomain: qcom: rpmpd: Simplify locking with guard()
  pmdomain: qcom: rpmhpd: Simplify locking with guard()
  pmdomain: qcom: cpr: Simplify locking with guard()
  pmdomain: qcom: cpr: Simplify with dev_err_probe()
  pmdomain: imx: gpcv2: Simplify with scoped for each OF child loop
  pmdomain: imx: gpc: Simplify with scoped for each OF child loop
  pmdomain: rockchip: SimplUlf Hanssonify locking with guard()
  pmdomain: rockchip: Simplify with scoped for each OF child loop
  pmdomain: qcom-cpr: Use scope based of_node_put() to simplify code.
  ...
2024-09-18 10:49:45 +02:00
Dhruva Gole 6baacf9391 cpuidle: remove dead code from cpuidle_enter_state()
Checking for index < 0 is useless because the find_deepest_state()
function never really returns a negative value.

Since this hasn't been reported in over 9 years it's dead code, so
remove it.

Signed-off-by: Dhruva Gole <d-gole@ti.com>
Link: https://patch.msgid.link/20240821114250.1416421-1-d-gole@ti.com
[ rjw: Subject and changelog edits ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2024-08-22 21:03:52 +02:00
Krzysztof Kozlowski d5c667e049 cpuidle: riscv-sbi: Simplify with scoped for each OF child loop
Use scoped for_each_child_of_node_scoped() when iterating over device
nodes to make code a bit simpler.

Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Anup Patel <anup@brainfault.org>
Link: https://patch.msgid.link/20240820094023.61155-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2024-08-20 21:46:43 +02:00
Krzysztof Kozlowski a309320ddb cpuidle: riscv-sbi: Use scoped device node handling to fix missing of_node_put
Two return statements in sbi_cpuidle_dt_init_states() did not drop the
OF node reference count.  Solve the issue and simplify entire error
handling with scoped/cleanup.h.

Fixes: 6abf32f1d9 ("cpuidle: Add RISC-V SBI CPU idle driver")
Cc: All applicable <stable@vger.kernel.org>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Anup Patel <anup@brainfault.org>
Link: https://patch.msgid.link/20240820094023.61155-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2024-08-20 21:46:43 +02:00
Krzysztof Kozlowski 157519c026 cpuidle: dt_idle_genpd: Simplify with scoped for each OF child loop
Use scoped for_each_child_of_node_scoped() when iterating over device
nodes to make code a bit simpler.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Link: https://lore.kernel.org/r/20240816150931.142208-4-krzysztof.kozlowski@linaro.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2024-08-20 11:30:39 +02:00
Krzysztof Kozlowski 7aa1204d08 cpuidle: psci: Simplify with scoped for each OF child loop
Use scoped for_each_child_of_node_scoped() when iterating over device
nodes to make code a bit simpler.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Link: https://lore.kernel.org/r/20240816150931.142208-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2024-08-20 11:30:39 +02:00
Tudor Ambarus 831f010265 Merge 923a327e8f ("Merge tag 'acpi-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm") into android-mainline
Steps on the way to v6.11-rc1

Change-Id: I4f546d8c67305a09454a70fbb98dd6e73969f48c
Signed-off-by: Tudor Ambarus <tudordana@google.com>
2024-08-12 16:03:56 +00:00
Will McVicker 4cf63363a7 Merge tag 'v6.10-rc1' into android-mainline
Linux 6.10-rc1

Change-Id: Idb352b80ec4035982950ab2aec3bf3fbf4323ec3
Signed-off-by: Matthias Maennich <maennich@google.com>
Signed-off-by: Will McVicker <willmcvicker@google.com>
2024-08-05 09:42:59 -07:00
Ulf Hansson 1c4b2932bd cpuidle: psci: Enable the hierarchical topology for s2idle on PREEMPT_RT
To enable the domain-idle-states to be used during s2idle on a PREEMPT_RT
based configuration, let's allow the re-assignment of the ->enter_s2idle()
callback to psci_enter_s2idle_domain_idle_state().

Similar to s2ram, let's leave the support for CPU hotplug outside
PREEMPT_RT, as it's depending on using runtime PM. For s2idle, this means
that an offline CPU's PM domain will remain powered-on. In practise this
may lead to that a shallower idle-state than necessary gets selected, which
shouldn't be an issue (besides wasting power).

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Tested-by: Raghavendra Kakarla <quic_rkakarla@quicinc.com>  # qcm6490 with PREEMPT_RT set
Acked-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Link: https://lore.kernel.org/r/20240527142557.321610-8-ulf.hansson@linaro.org
2024-08-05 13:25:45 +02:00
Ulf Hansson 4517b1c383 cpuidle: psci: Enable the hierarchical topology for s2ram on PREEMPT_RT
The hierarchical PM domain topology are currently disabled on a PREEMPT_RT
based configuration. As a first step to enable it to be used, let's try to
attach the CPU devices to their PM domains on PREEMPT_RT. In this way the
syscore ops becomes available, allowing the PM domain topology to be
managed during s2ram.

For the moment let's leave the support for CPU hotplug outside PREEMPT_RT,
as it's depending on using runtime PM. For s2ram, this isn't a problem as
all CPUs are managed via the syscore ops.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Tested-by: Raghavendra Kakarla <quic_rkakarla@quicinc.com>  # qcm6490 with PREEMPT_RT set
Acked-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Link: https://lore.kernel.org/r/20240527142557.321610-7-ulf.hansson@linaro.org
2024-08-05 13:24:47 +02:00
Ulf Hansson 88bf68b766 cpuidle: psci: Drop redundant assignment of CPUIDLE_FLAG_RCU_IDLE
When using the hierarchical topology and PSCI OSI-mode we may end up
overriding the deepest idle-state's ->enter|enter_s2idle() callbacks, but
there is no point to also re-assign the CPUIDLE_FLAG_RCU_IDLE for the
idle-state in question, as that has already been set when parsing the
states from DT. See init_state_node().

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Tested-by: Raghavendra Kakarla <quic_rkakarla@quicinc.com>  # qcm6490 with PREEMPT_RT set
Acked-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Link: https://lore.kernel.org/r/20240527142557.321610-6-ulf.hansson@linaro.org
2024-08-05 13:24:28 +02:00
Ulf Hansson c7b45284ab cpuidle: psci-domain: Enable system-wide suspend on PREEMPT_RT
The domain-idle-states are currently disabled on a PREEMPT_RT based
configuration for the cpuidle-psci-domain. To enable them to be used for
system-wide suspend and in particular during s2idle, let's set the
GENPD_FLAG_RPM_ALWAYS_ON instead of GENPD_FLAG_ALWAYS_ON for the
corresponding genpd provider.

In this way, the runtime PM path remains disabled in genpd for its attached
devices, while powering-on/off the PM domain during system-wide suspend
becomes allowed.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Tested-by: Raghavendra Kakarla <quic_rkakarla@quicinc.com>  # qcm6490 with PREEMPT_RT set
Acked-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Link: https://lore.kernel.org/r/20240527142557.321610-5-ulf.hansson@linaro.org
2024-08-05 13:23:34 +02:00
Greg Kroah-Hartman f6ea4b5119 Merge 0c181b1d97 ("Merge tag 'pm-6.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm") into android-mainline
Steps on the way to 6.10-rc1

Change-Id: I965ad70410464664df63da049e7a074aa16cca76
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2024-07-19 10:00:51 +00:00
Greg Kroah-Hartman 016426d5af Merge 5901037324 ("Merge tag 'for-linus' of https://github.com/openrisc/linux") into android-mainline
Steps on the way to 6.10-rc1

Change-Id: Ief35eb5990650571b9392125774142343f7c5500
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Signed-off-by: André Draszik <draszik@google.com>
2024-07-17 18:27:38 +01:00
Christian Loehle 4b20b07ce7 cpuidle: teo: Don't count non-existent intercepts
When bailing out early, teo will not query the sleep length anymore
since commit 6da8f9ba5a ("cpuidle: teo:
Skip tick_nohz_get_sleep_length() call in some cases") with an
expected sleep_length_ns value of KTIME_MAX.
This lead to state0 accumulating lots of 'intercepts' because
the actually measured sleep length was < KTIME_MAX, so query the sleep
length instead for teo to recognize if it still is in an
intercept-likely scenario without alternating between the two modes.

Fundamentally we can only do one of the two:
 1. Skip sleep_length_ns query when we think intercept is likely.
 2. Have accurate data if sleep_length_ns is actually intercepted when
we believe it is currently intercepted.

Previously teo did the former while this patch chooses the latter as
the additional time it takes to query the sleep length was found to be
negligible and the variants of option 1 (count all unknowns as misses
or count all unknown as hits) had significant regressions (as misses
had lots of too shallow idle state selections and as hits had terrible
performance in intercept-heavy workloads).

Fixes: 6da8f9ba5a ("cpuidle: teo: Skip tick_nohz_get_sleep_length() call in some cases")
Link: https://patch.msgid.link/c40acf72-010f-4a8b-80e4-33f133ba266b@arm.com
Signed-off-by: Christian Loehle <christian.loehle@arm.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2024-07-01 18:58:55 +02:00
Christian Loehle 4499143980 cpuidle: teo: Remove recent intercepts metric
The logic for recent intercepts didn't work, there is an underflow
of the 'recent' value that can be observed during boot already, which
teo usually doesn't recover from, making the entire logic pointless.
Furthermore the recent intercepts also were never reset, thus not
actually being very 'recent'.

Having underflowed 'recent' values lead to teo always acting as if
we were in a scenario were expected sleep length based on timers is
too high and it therefore unnecessarily selecting shallower states.

Experiments show that the remaining 'intercept' logic is enough to
quickly react to scenarios in which teo cannot rely on the timer
expected sleep length.

See also here:
https://lore.kernel.org/lkml/0ce2d536-1125-4df8-9a5b-0d5e389cd8af@arm.com/

Fixes: 77577558f2 ("cpuidle: teo: Rework most recent idle duration values treatment")
Link: https://patch.msgid.link/20240628095955.34096-3-christian.loehle@arm.com
Signed-off-by: Christian Loehle <christian.loehle@arm.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2024-06-28 21:03:21 +02:00
Christian Loehle 0a2998fa48 Revert: "cpuidle: teo: Introduce util-awareness"
This reverts commit 9ce0f7c4bc.

Util-awareness was reported to be too aggressive in selecting shallower
states. Additionally a single threshold was found to not be suitable
for reasoning about sleep length as, for all practical purposes,
almost arbitrary sleep lengths are still possible for any load value.

Fixes: 9ce0f7c4bc ("cpuidle: teo: Introduce util-awareness")
Link: https://patch.msgid.link/20240628095955.34096-2-christian.loehle@arm.com
Reported-by: Qais Yousef <qyousef@layalina.io>
Reported-by: Vincent Guittot <vincent.guittot@linaro.org>
Reviewed-by: Qais Yousef <qyousef@layalina.io>
Tested-by: Vincent Guittot <vincent.guittot@linaro.org>
Signed-off-by: Christian Loehle <christian.loehle@arm.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2024-06-28 21:03:21 +02:00
Atul Kumar Pant 63e6b02f57 cpuidle: governors: teo: Fix a typo in a comment
"terget" -> "target"

Signed-off-by: Atul Kumar Pant <atulpant.linux@gmail.com>
Link: https://patch.msgid.link/20240616124025.16477-1-atulpant.linux@gmail.com
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2024-06-21 14:57:07 +02:00
Jeff Johnson 085aa9f58c cpuidle: haltpoll: add missing MODULE_DESCRIPTION() macro
make allmodconfig && make W=1 C=1 reports:
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/cpuidle/cpuidle-haltpoll.o

Add the missing invocation of the MODULE_DESCRIPTION() macro.

Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2024-06-14 18:15:38 +02:00
Christian Loehle bf18311384 cpuidle: menu: Cleanup after loadavg removal
The performance impact of loadavg was removed with commit a7fe5190c0
("cpuidle: menu: Remove get_loadavg() from the performance multiplier")
With only iowait remaining the description can be simplified, remove
also the no longer needed includes.

Signed-off-by: Christian Loehle <christian.loehle@arm.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2024-06-07 20:55:00 +02:00
chihsheng d10af85900 ANDROID: Add all green kselftests in TEST_MAPPING in common/ directory
Bug: 339748167
Change-Id: I7010a2643aefa57aec028c9fd81f43fbc576dce8
Signed-off-by: chihsheng <chihsheng@google.com>
2024-05-24 01:19:39 +00:00
Lee Jones d31eda960d Merge 4cece76496 ("Linux 6.9-rc1") into android-mainline
Steps on the way to v6.9-rc1

Signed-off-by: Lee Jones <joneslee@google.com>
Change-Id: I5c5bd3feea887994728e4e74ba7c6e2fc41d98e0
2024-05-20 16:49:41 +01:00
Lee Jones be0ed51280 Merge 902861e34c ("Merge tag 'mm-stable-2024-03-13-20-04' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm") into android-mainline
Steps on the way to v6.9-rc1

Signed-off-by: Lee Jones <joneslee@google.com>
Change-Id: I876e977a175bf3fb1fb326d046fa15ce9ffb8266
2024-05-20 16:49:21 +01:00
Linus Torvalds 8b35a3bb33 Merge tag 'pmdomain-v6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/linux-pm
Pull pmdomain updates from Ulf Hansson:
 "pmdomain core:
   - Don't clear suspended_count at genpd_prepare()
   - Update the rejected/usage counters at system suspend too

  pmdomain providers:
   - ti-sci: Fix duplicate PD referrals
   - mediatek: Add MT8188 buck isolation setting
   - renesas: Add R-Car M3-W power-off delay quirk
   - renesas: Split R-Car M3-W and M3-W+ sub-drivers

  cpuidle-psci:
   - Update MAINTAINERS to set a git for DT IDLE PM DOMAIN/ARM PSCI PM
     DOMAIN
   - Update init level to core_initcall()
   - Drop superfluous wrappers psci_dt_attach|detach_cpu()"

* tag 'pmdomain-v6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/linux-pm:
  pmdomain: ti-sci: Fix duplicate PD referrals
  pmdomain: core: Don't clear suspended_count at genpd_prepare()
  pmdomain: core: Update the rejected/usage counters at system suspend too
  pmdomain: renesas: rcar-sysc: Add R-Car M3-W power-off delay quirk
  pmdomain: renesas: rcar-sysc: Remove rcar_sysc_nullify() helper
  pmdomain: renesas: rcar-sysc: Split R-Car M3-W and M3-W+ sub-drivers
  pmdomain: renesas: rcar-sysc: Absorb rcar_sysc_ch into rcar_sysc_pd
  MAINTAINERS: Add a git for the DT IDLE PM DOMAIN
  MAINTAINERS: Add a git for the ARM PSCI PM DOMAIN
  cpuidle: psci: Update init level to core_initcall()
  cpuidle: psci: Drop superfluous wrappers psci_dt_attach|detach_cpu()
  pmdomain: mediatek: Add MT8188 buck isolation setting
  pmdomain: mediatek: scpsys: drop driver owner assignment
2024-05-16 08:50:32 -07:00
Linus Torvalds 0c181b1d97 Merge tag 'pm-6.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull power management updates from Rafael Wysocki:
 "These are mostly cpufreq updates, including a significant intel-pstate
  driver update and several amd-pstate improvements plus some updates of
  ARM cpufreq drivers, general fixes and cleanups.

  Also included are changes related to system sleep, power capping
  updates adding support for a new platform and a new hardware feature
  (among other things), a Samsung exynos-asv driver update allowing it
  to change its Energy Model after adjusting voltage, minor cpuidle and
  devfreq updates and a small documentation cleanup.

  Specifics:

   - Rework the handling of disabled turbo in the intel_pstate driver
     and make it update the maximum CPU frequency consistently
     regardless of the reason on top of a number of cleanups (Rafael
     Wysocki)

   - Add missing checks for NULL .exit() cpufreq driver callback to the
     cpufreq core (Viresh Kumar)

   - Prevent pulicy->max from going above the frequency QoS maximum
     value when cpufreq_frequency_table_verify() is used (Xuewen Yan)

   - Prevent a negative CPU number or frequency value from being printed
     if they are really large (Joshua Yeong)

   - Update MAINTAINERS entry for amd-pstate to add two new
     submaintainers and a designated reviewer (Huang Rui)

   - Clean up the amd-pstate driver and update its documentation
     (Gautham Shenoy)

   - Fix the highest frequency issue in the amd-pstate driver which
     limits performance (Perry Yuan)

   - Enable CPPC v2 for certain processors in the family 17H, as
     requested by TR40 processor users who expect improved performance
     and lower system temperature (Perry Yuan)

   - Change latency and delay values to be read from platform firmware
     firstly for more accurate timing (Perry Yuan)

   - A new quirk is introduced for supporting amd-pstate on legacy
     processors which either lack CPPC capability, or only only have
     CPPC v2 capability (Perry Yuan)

   - Sun50i cpufreq: Add support for opp_supported_hw, H616 platform and
     general cleanups (Andre Przywara, Martin Botka, Brandon Cheo Fusi,
     Dan Carpenter, Viresh Kumar)

   - CPPC cpufreq: Fix possible null pointer dereference (Aleksandr
     Mishin)

   - Eliminate uses of of_node_put() from cpufreq (Javier Carrasco,
     Shivani Gupta)

   - brcmstb-avs: ISO C90 forbids mixed declarations (Portia Stephens)

   - mediatek cpufreq: Add support for MT7988A (Sam Shih)

   - cpufreq-qcom-hw: Add SM4450 compatibles in DT bindings (Tengfei
     Fan)

   - Fix struct cpudata::epp_cached kernel-doc in the intel_pstate
     cpufreq driver (Jeff Johnson)

   - Fix kerneldoc description of ladder_do_selection() (Jeff Johnson)

   - Convert the cpuidle kirkwood driver to platform remove callback
     returning void (Yangtao Li)

   - Replace deprecated strncpy() with strscpy() in the hibernation core
     code (Justin Stitt)

   - Use %ps to simplify debug output in the core system-wide suspend
     and resume code (Len Brown)

   - Remove unnecessary else from device_init_wakeup() and make
     device_wakeup_disable() return void (Dhruva Gole)

   - Enable PMU support in the Intel TPMI RAPL driver (Zhang Rui)

   - Add support for ArrowLake-H platform to the Intel RAPL driver
     (Zhang Rui)

   - Avoid explicit cpumask allocation on stack in DTPM (Dawei Li)

   - Make the Samsung exynos-asv driver update the Energy Model after
     adjusting voltage on top of some preliminary changes of the OPP and
     Enery Model generic code (Lukasz Luba)

   - Remove a reference to a function that has been dropped from the
     power management documentation (Bjorn Helgaas)

   - Convert the platfrom remove callback to .remove_new for the
     exyno-nocp, exynos-ppmu, mtk-cci-devfreq, sun8i-a33-mbus, and
     rk3399_dmc devfreq drivers (Uwe Kleine-König)

   - Use DEFINE_SIMPLE_PM_OPS for exyno-bus.c driver (Anand Moon)"

* tag 'pm-6.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (68 commits)
  PM / devfreq: exynos: Use DEFINE_SIMPLE_DEV_PM_OPS for PM functions
  PM / devfreq: rk3399_dmc: Convert to platform remove callback returning void
  PM / devfreq: sun8i-a33-mbus: Convert to platform remove callback returning void
  PM / devfreq: mtk-cci: Convert to platform remove callback returning void
  PM / devfreq: exynos-ppmu: Convert to platform remove callback returning void
  PM / devfreq: exynos-nocp: Convert to platform remove callback returning void
  cpufreq: amd-pstate: fix the highest frequency issue which limits performance
  cpufreq: intel_pstate: fix struct cpudata::epp_cached kernel-doc
  cpuidle: ladder: fix ladder_do_selection() kernel-doc
  powercap: intel_rapl_tpmi: Enable PMU support
  powercap: intel_rapl: Introduce APIs for PMU support
  PM: hibernate: replace deprecated strncpy() with strscpy()
  cpufreq: Fix up printing large CPU numbers and frequency values
  MAINTAINERS: cpufreq: amd-pstate: Add co-maintainers and reviewer
  cpufreq: amd-pstate: remove unused variable lowest_nonlinear_freq
  cpufreq: amd-pstate: fix code format problems
  cpufreq: amd-pstate: Add quirk for the pstate CPPC capabilities missing
  cppc_acpi: print error message if CPPC is unsupported
  cpufreq: amd-pstate: get transition delay and latency value from ACPI tables
  cpufreq: amd-pstate: Bail out if min/max/nominal_freq is 0
  ...
2024-05-14 13:19:15 -07:00
Lee Jones f48aa34a88 Merge 259f7d5e2b ("Merge tag 'thermal-6.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm") into android-mainline
Steps on the way to v6.9-rc1

Signed-off-by: Lee Jones <joneslee@google.com>
Change-Id: Iba3774ffbda85ab5bd6277ce6ef6e3d552d461d3
2024-05-10 16:54:47 +00:00
Jeff Johnson 774459238f cpuidle: ladder: fix ladder_do_selection() kernel-doc
make C=1 reports:

warning: Function parameter or struct member 'dev' not described in 'ladder_do_selection'

Document 'dev' for this function.

Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2024-05-07 13:54:58 +02:00
Dawei Li 6f28c4a852 cpuidle: Avoid explicit cpumask allocation on stack
In general it's preferable to avoid placing cpumasks on the stack, as
for large values of NR_CPUS these can consume significant amounts of
stack space and make stack overflows more likely.

Use cpumask_first_and_and() and cpumask_weight_and() to avoid the need
for a temporary cpumask on the stack.

Signed-off-by: Dawei Li <dawei.li@shingroup.cn>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20240416085454.3547175-8-dawei.li@shingroup.cn
2024-04-24 21:23:49 +02:00
Yangtao Li f9059eb5d7 cpuidle: kirkwood: Convert to platform remove callback returning void
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20230712094014.41787-1-frank.li@vivo.com
2024-04-23 09:21:48 +02:00
Maulik Shah 02e2a4b363 cpuidle: psci: Update init level to core_initcall()
Clients like regulators, interconnects and clocks depend on rpmh-rsc to
vote on resources and rpmh-rsc depends on psci power-domains to complete
probe. All of them are in core_initcall().

Change psci domain init level to core_initcall() to avoid probe defer from
all of the above.

Signed-off-by: Maulik Shah <quic_mkshah@quicinc.com>
Link: https://lore.kernel.org/r/20240217-init_level-v1-2-bde9e11f8317@quicinc.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2024-04-04 13:02:28 +02:00
Ulf Hansson d72d7d6cf7 cpuidle: psci: Drop superfluous wrappers psci_dt_attach|detach_cpu()
To simplify the code, let's drop psci_dt_attach|detach_cpu() and use the
common dt_idle_attach|detach_cpu() directly instead.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Reviewed-by: Sudeep Holla <sudeep.holla@arm.com>
Link: https://lore.kernel.org/r/20240228151139.2650258-1-ulf.hansson@linaro.org
2024-04-04 13:00:39 +02:00
Betty Zhou 27882f9d25 ANDROID: Update TEST_MAPPING configs with imports & presubmit-large
Add imports rule to import platform TEST_MAPPING configs.

Add presubmit-large test group.

Signed-off-by: Betty Zhou <bettyzhou@google.com>
Bug: 332572952
Change-Id: Ifdac0e0cc88456dd886713bd16f0817d8066cd48
2024-04-03 22:38:38 +00:00
Linus Torvalds c150b809f7 Merge tag 'riscv-for-linus-6.9-mw2' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux
Pull RISC-V updates from Palmer Dabbelt:

 - Support for various vector-accelerated crypto routines

 - Hibernation is now enabled for portable kernel builds

 - mmap_rnd_bits_max is larger on systems with larger VAs

 - Support for fast GUP

 - Support for membarrier-based instruction cache synchronization

 - Support for the Andes hart-level interrupt controller and PMU

 - Some cleanups around unaligned access speed probing and Kconfig
   settings

 - Support for ACPI LPI and CPPC

 - Various cleanus related to barriers

 - A handful of fixes

* tag 'riscv-for-linus-6.9-mw2' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: (66 commits)
  riscv: Fix syscall wrapper for >word-size arguments
  crypto: riscv - add vector crypto accelerated AES-CBC-CTS
  crypto: riscv - parallelize AES-CBC decryption
  riscv: Only flush the mm icache when setting an exec pte
  riscv: Use kcalloc() instead of kzalloc()
  riscv/barrier: Add missing space after ','
  riscv/barrier: Consolidate fence definitions
  riscv/barrier: Define RISCV_FULL_BARRIER
  riscv/barrier: Define __{mb,rmb,wmb}
  RISC-V: defconfig: Enable CONFIG_ACPI_CPPC_CPUFREQ
  cpufreq: Move CPPC configs to common Kconfig and add RISC-V
  ACPI: RISC-V: Add CPPC driver
  ACPI: Enable ACPI_PROCESSOR for RISC-V
  ACPI: RISC-V: Add LPI driver
  cpuidle: RISC-V: Move few functions to arch/riscv
  riscv: Introduce set_compat_task() in asm/compat.h
  riscv: Introduce is_compat_thread() into compat.h
  riscv: add compile-time test into is_compat_task()
  riscv: Replace direct thread flag check with is_compat_task()
  riscv: Improve arch_get_mmap_end() macro
  ...
2024-03-22 10:41:13 -07:00
Lee Jones 6e0df9b365 Merge 0507d2526f ("Merge tag 'erofs-for-6.8-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs") into android-mainline
Steps on the way to 6.8-rc1

Change-Id: Ic5d03b4d7e56e77f9210b7ff3483a1743a9562b9
Signed-off-by: Lee Jones <joneslee@google.com>
2024-03-20 14:42:30 +00:00
Sunil V L 6649182a38 cpuidle: RISC-V: Move few functions to arch/riscv
To support ACPI Low Power Idle (LPI), few functions are required which
are currently static functions in the DT based cpuidle driver. Hence,
move them under arch/riscv so that ACPI driver also can use them. Since
they are no longer static functions, append "riscv_" prefix to the
function name.

Signed-off-by: Sunil V L <sunilvl@ventanamicro.com>
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Link: https://lore.kernel.org/r/20240118062930.245937-2-sunilvl@ventanamicro.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
2024-03-19 17:51:38 -07:00
Linus Torvalds 902861e34c Merge tag 'mm-stable-2024-03-13-20-04' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Pull MM updates from Andrew Morton:

 - Sumanth Korikkar has taught s390 to allocate hotplug-time page frames
   from hotplugged memory rather than only from main memory. Series
   "implement "memmap on memory" feature on s390".

 - More folio conversions from Matthew Wilcox in the series

	"Convert memcontrol charge moving to use folios"
	"mm: convert mm counter to take a folio"

 - Chengming Zhou has optimized zswap's rbtree locking, providing
   significant reductions in system time and modest but measurable
   reductions in overall runtimes. The series is "mm/zswap: optimize the
   scalability of zswap rb-tree".

 - Chengming Zhou has also provided the series "mm/zswap: optimize zswap
   lru list" which provides measurable runtime benefits in some
   swap-intensive situations.

 - And Chengming Zhou further optimizes zswap in the series "mm/zswap:
   optimize for dynamic zswap_pools". Measured improvements are modest.

 - zswap cleanups and simplifications from Yosry Ahmed in the series
   "mm: zswap: simplify zswap_swapoff()".

 - In the series "Add DAX ABI for memmap_on_memory", Vishal Verma has
   contributed several DAX cleanups as well as adding a sysfs tunable to
   control the memmap_on_memory setting when the dax device is
   hotplugged as system memory.

 - Johannes Weiner has added the large series "mm: zswap: cleanups",
   which does that.

 - More DAMON work from SeongJae Park in the series

	"mm/damon: make DAMON debugfs interface deprecation unignorable"
	"selftests/damon: add more tests for core functionalities and corner cases"
	"Docs/mm/damon: misc readability improvements"
	"mm/damon: let DAMOS feeds and tame/auto-tune itself"

 - In the series "mm/mempolicy: weighted interleave mempolicy and sysfs
   extension" Rakie Kim has developed a new mempolicy interleaving
   policy wherein we allocate memory across nodes in a weighted fashion
   rather than uniformly. This is beneficial in heterogeneous memory
   environments appearing with CXL.

 - Christophe Leroy has contributed some cleanup and consolidation work
   against the ARM pagetable dumping code in the series "mm: ptdump:
   Refactor CONFIG_DEBUG_WX and check_wx_pages debugfs attribute".

 - Luis Chamberlain has added some additional xarray selftesting in the
   series "test_xarray: advanced API multi-index tests".

 - Muhammad Usama Anjum has reworked the selftest code to make its
   human-readable output conform to the TAP ("Test Anything Protocol")
   format. Amongst other things, this opens up the use of third-party
   tools to parse and process out selftesting results.

 - Ryan Roberts has added fork()-time PTE batching of THP ptes in the
   series "mm/memory: optimize fork() with PTE-mapped THP". Mainly
   targeted at arm64, this significantly speeds up fork() when the
   process has a large number of pte-mapped folios.

 - David Hildenbrand also gets in on the THP pte batching game in his
   series "mm/memory: optimize unmap/zap with PTE-mapped THP". It
   implements batching during munmap() and other pte teardown
   situations. The microbenchmark improvements are nice.

 - And in the series "Transparent Contiguous PTEs for User Mappings"
   Ryan Roberts further utilizes arm's pte's contiguous bit ("contpte
   mappings"). Kernel build times on arm64 improved nicely. Ryan's
   series "Address some contpte nits" provides some followup work.

 - In the series "mm/hugetlb: Restore the reservation" Breno Leitao has
   fixed an obscure hugetlb race which was causing unnecessary page
   faults. He has also added a reproducer under the selftest code.

 - In the series "selftests/mm: Output cleanups for the compaction
   test", Mark Brown did what the title claims.

 - Kinsey Ho has added the series "mm/mglru: code cleanup and
   refactoring".

 - Even more zswap material from Nhat Pham. The series "fix and extend
   zswap kselftests" does as claimed.

 - In the series "Introduce cpu_dcache_is_aliasing() to fix DAX
   regression" Mathieu Desnoyers has cleaned up and fixed rather a mess
   in our handling of DAX on archiecctures which have virtually aliasing
   data caches. The arm architecture is the main beneficiary.

 - Lokesh Gidra's series "per-vma locks in userfaultfd" provides
   dramatic improvements in worst-case mmap_lock hold times during
   certain userfaultfd operations.

 - Some page_owner enhancements and maintenance work from Oscar Salvador
   in his series

	"page_owner: print stacks and their outstanding allocations"
	"page_owner: Fixup and cleanup"

 - Uladzislau Rezki has contributed some vmalloc scalability
   improvements in his series "Mitigate a vmap lock contention". It
   realizes a 12x improvement for a certain microbenchmark.

 - Some kexec/crash cleanup work from Baoquan He in the series "Split
   crash out from kexec and clean up related config items".

 - Some zsmalloc maintenance work from Chengming Zhou in the series

	"mm/zsmalloc: fix and optimize objects/page migration"
	"mm/zsmalloc: some cleanup for get/set_zspage_mapping()"

 - Zi Yan has taught the MM to perform compaction on folios larger than
   order=0. This a step along the path to implementaton of the merging
   of large anonymous folios. The series is named "Enable >0 order folio
   memory compaction".

 - Christoph Hellwig has done quite a lot of cleanup work in the
   pagecache writeback code in his series "convert write_cache_pages()
   to an iterator".

 - Some modest hugetlb cleanups and speedups in Vishal Moola's series
   "Handle hugetlb faults under the VMA lock".

 - Zi Yan has changed the page splitting code so we can split huge pages
   into sizes other than order-0 to better utilize large folios. The
   series is named "Split a folio to any lower order folios".

 - David Hildenbrand has contributed the series "mm: remove
   total_mapcount()", a cleanup.

 - Matthew Wilcox has sought to improve the performance of bulk memory
   freeing in his series "Rearrange batched folio freeing".

 - Gang Li's series "hugetlb: parallelize hugetlb page init on boot"
   provides large improvements in bootup times on large machines which
   are configured to use large numbers of hugetlb pages.

 - Matthew Wilcox's series "PageFlags cleanups" does that.

 - Qi Zheng's series "minor fixes and supplement for ptdesc" does that
   also. S390 is affected.

 - Cleanups to our pagemap utility functions from Peter Xu in his series
   "mm/treewide: Replace pXd_large() with pXd_leaf()".

 - Nico Pache has fixed a few things with our hugepage selftests in his
   series "selftests/mm: Improve Hugepage Test Handling in MM
   Selftests".

 - Also, of course, many singleton patches to many things. Please see
   the individual changelogs for details.

* tag 'mm-stable-2024-03-13-20-04' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: (435 commits)
  mm/zswap: remove the memcpy if acomp is not sleepable
  crypto: introduce: acomp_is_async to expose if comp drivers might sleep
  memtest: use {READ,WRITE}_ONCE in memory scanning
  mm: prohibit the last subpage from reusing the entire large folio
  mm: recover pud_leaf() definitions in nopmd case
  selftests/mm: skip the hugetlb-madvise tests on unmet hugepage requirements
  selftests/mm: skip uffd hugetlb tests with insufficient hugepages
  selftests/mm: dont fail testsuite due to a lack of hugepages
  mm/huge_memory: skip invalid debugfs new_order input for folio split
  mm/huge_memory: check new folio order when split a folio
  mm, vmscan: retry kswapd's priority loop with cache_trim_mode off on failure
  mm: add an explicit smp_wmb() to UFFDIO_CONTINUE
  mm: fix list corruption in put_pages_list
  mm: remove folio from deferred split list before uncharging it
  filemap: avoid unnecessary major faults in filemap_fault()
  mm,page_owner: drop unnecessary check
  mm,page_owner: check for null stack_record before bumping its refcount
  mm: swap: fix race between free_swap_and_cache() and swapoff()
  mm/treewide: align up pXd_leaf() retval across archs
  mm/treewide: drop pXd_large()
  ...
2024-03-14 17:43:30 -07:00
Yosry Ahmed 7dbbc8f57d x86/mm: delete unused cpu argument to leave_mm()
The argument is unused since commit 3d28ebceaf ("x86/mm: Rework lazy
TLB to track the actual loaded mm"), delete it.

Link: https://lkml.kernel.org/r/20240126080644.1714297-1-yosryahmed@google.com
Signed-off-by: Yosry Ahmed <yosryahmed@google.com>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Borislav Petkov (AMD) <bp@alien8.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2024-02-22 10:24:41 -08:00
C Cheng 88390dd788 cpuidle: Avoid potential overflow in integer multiplication
In detail:

In C language, when you perform a multiplication operation, if
both operands are of int type, the multiplication operation is
performed on the int type, and then the result is converted to
the target type. This means that if the product of int type
multiplication exceeds the range that int type can represent,
an overflow will occur even if you store the result in a
variable of int64_t type.

For a multiplication of two int values, it is better to use
mul_u32_u32() rather than s->exit_latency_ns = s->exit_latency *
NSEC_PER_USEC to avoid potential overflow happenning.

Signed-off-by: C Cheng <C.Cheng@mediatek.com>
Signed-off-by: Bo Ye <bo.ye@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
[ rjw: New subject ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2024-02-12 17:07:49 +01:00
Parshuram Sangle 496d0a6485 cpuidle: haltpoll: do not shrink guest poll_limit_ns below grow_start
While adjusting guest halt poll limit, grow block starts at
guest_halt_poll_grow_start without taking intermediate values.
Similar behavior is expected while shrinking the value. This
avoids short interval values which are really not required.

VCPU1 trace (guest_halt_poll_shrink equals 2):

VCPU1 grow 10000
VCPU1 shrink 5000
VCPU1 shrink 2500
VCPU1 shrink 1250
VCPU1 shrink 625
VCPU1 shrink 312
VCPU1 shrink 156
VCPU1 shrink 78
VCPU1 shrink 39
VCPU1 shrink 19
VCPU1 shrink 9
VCPU1 shrink 4

Similar change is done in KVM halt poll flow with below patch:
Link: https://lore.kernel.org/kvm/20211006133021.271905-3-sashal@kernel.org/

Co-developed-by: Rajendran Jaishankar <jaishankar.rajendran@intel.com>
Signed-off-by: Rajendran Jaishankar <jaishankar.rajendran@intel.com>
Signed-off-by: Parshuram Sangle <parshuram.sangle@intel.com>
Reviewed-by: Marcelo Tosatti <mtosatti@redhat.com>
[ rjw: Subject edits ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2024-02-12 17:02:51 +01:00
Borislav Petkov (AMD) c8f5caec3d cpuidle: haltpoll: Do not enable interrupts when entering idle
The cpuidle drivers' ->enter() methods are supposed to be IRQ invariant:

  5e26aa9339 ("cpuidle/poll: Ensure IRQs stay disabled after cpuidle_state::enter() calls")
  bb7b112585 ("cpuidle: Move IRQ state validation")

Do that in the haltpoll driver too.

Fixes: 5e26aa9339 ("cpuidle/poll: Ensure IRQs stay disabled after cpuidle_state::enter() calls")
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218245
Reported-by: <forza@tnonline.net>
Tested-by: <forza@tnonline.net>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
[ rjw: Changelog edits ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2023-12-29 18:08:18 +01:00
Greg Kroah-Hartman 7c4c453d9d Merge b9ff774548 ("Merge tag 'tpmdd-v6.7' of git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd") into android-mainline
Steps on the way to 6.7-rc1

Change-Id: Ib1c6be397d6fe67dc3e698697f10248168b7f691
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2023-11-27 15:41:43 +00:00