Skip to content

arm64: dts: apple: add opp-microwatt to t8103/t600x#229

Merged
marcan merged 1 commit intoAsahiLinux:asahi-wipfrom
chadmed:eas/m1-v2
Nov 6, 2023
Merged

arm64: dts: apple: add opp-microwatt to t8103/t600x#229
marcan merged 1 commit intoAsahiLinux:asahi-wipfrom
chadmed:eas/m1-v2

Conversation

@chadmed
Copy link
Copy Markdown
Member

@chadmed chadmed commented Nov 6, 2023

This patch adds measured opp-microwatt values for the Firestorm and Icestorm application cores found in Apple's T8103 (M1), T6000 (M1 Pro), T6001 (M1 Max) and T6002 (M1 Ultra) SoCs.

Values were measured from the System Management Controller's core cluster power meter. A version of freqbench modified to read this power meter was used to orchestrate testing, running 1,000,000 iterations of coremark on a single core from each cluster at each operating point. The bulk of the testing was done on a T6000.

Note that Apple calibrates voltage regulator settings for each SoC as they come off the assembly line, introducing some natural variance between machines. Testing across multiple machines with identical SoCs reveals no measurable impact on the accuracy of the EM subsystem's cost calculations.

This patch adds measured opp-microwatt values for the
Firestorm and Icestorm application cores found in Apple's
T8103 (M1), T6000 (M1 Pro), T6001 (M1 Max) and T6002 (M1 Ultra) SoCs.

Values were measured from the System Management Controller's
core cluster power meter. A version of freqbench modified
to read this power meter was used to orchestrate testing,
running 1,000,000 iterations of coremark on a single core
from each cluster at each operating point. The bulk of the
testing was done on a T6000.

Note that Apple calibrates voltage regulator settings for
each SoC as they come off the assembly line, introducing some
natural variance between machines. Testing across multiple
machines with identical SoCs reveals no measurable impact
on the accuracy of the EM subsystem's cost calculations.

Signed-off-by: James Calligeros <jcalligeros99@gmail.com>
@marcan marcan merged commit 70bb807 into AsahiLinux:asahi-wip Nov 6, 2023
asdfugil pushed a commit to HoolockLinux/linux that referenced this pull request Mar 10, 2026
XSK wakeup must use the async ICOSQ (with proper locking), as it is not
guaranteed to run on the same CPU as the channel.

The commit that converted the NAPI trigger path to use the sync ICOSQ
incorrectly applied the same change to XSK, causing XSK wakeups to use
the sync ICOSQ as well. Revert XSK flows to use the async ICOSQ.

XDP program attach/detach triggers channel reopen, while XSK pool
enable/disable can happen on-the-fly via NDOs without reopening
channels. As a result, xsk_pool state cannot be reliably used at
mlx5e_open_channel() time to decide whether an async ICOSQ is needed.

Update the async_icosq_needed logic to depend on the presence of an XDP
program rather than the xsk_pool, ensuring the async ICOSQ is available
when XSK wakeups are enabled.

This fixes multiple issues:

1. Illegal synchronize_rcu() in an RCU read- side critical section via
   mlx5e_xsk_wakeup() -> mlx5e_trigger_napi_icosq() ->
   synchronize_net(). The stack holds RCU read-lock in xsk_poll().

2. Hitting a NULL pointer dereference in mlx5e_xsk_wakeup():

[] BUG: kernel NULL pointer dereference, address: 0000000000000240
[] #PF: supervisor read access in kernel mode
[] #PF: error_code(0x0000) - not-present page
[] PGD 0 P4D 0
[] Oops: Oops: 0000 [AsahiLinux#1] SMP
[] CPU: 0 UID: 0 PID: 2255 Comm: qemu-system-x86 Not tainted 6.19.0-rc5+ AsahiLinux#229 PREEMPT(none)
[] Hardware name: [...]
[] RIP: 0010:mlx5e_xsk_wakeup+0x53/0x90 [mlx5_core]

Reported-by: Daniel Borkmann <daniel@iogearbox.net>
Closes: https://lore.kernel.org/all/20260123223916.361295-1-daniel@iogearbox.net/
Fixes: 56aca3e ("net/mlx5e: Use regular ICOSQ for triggering NAPI")
Tested-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Reviewed-by: Dragos Tatulea <dtatulea@nvidia.com>
Acked-by: Alice Mikityanska <alice.kernel@fastmail.im>
Link: https://patch.msgid.link/20260217074525.1761454-1-tariqt@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants