Skip to content

Rtkit startup fixes - #661

Open
a-ramses wants to merge 40 commits into
AsahiLinux:asahi-wipfrom
a-ramses:rtkit-startup-fixes
Open

a-ramses wants to merge 40 commits into
AsahiLinux:asahi-wipfrom
a-ramses:rtkit-startup-fixes

Conversation

@a-ramses

Copy link
Copy Markdown

Enable the ASCWrap v6 receive FIFO and fix endpoint startup, debug-buffer handling and firmware acknowledgements. Poll the mailbox during RTKit and AFK initialization.


Please check all boxes that apply:

  • This code was developed in accordance with the Asahi Linux Copyright Policy
  • I have not used generative AI/LLMs to develop this code, in accordance with the Asahi Linux LLM Policy
  • I have certified the above by adding a Signed-off-by: trailer to every commit

All boxes must be checked before your pull request can be reviewed.

@jannau
jannau force-pushed the asahi-wip branch 2 times, most recently from 7924019 to 1ed3045 Compare November 7, 2026 14:58
hitori-chan added a commit to hitori-chan/linux that referenced this pull request Nov 19, 2026
The hwmon fault attribute was set only when the temperature register
held its reset value (-ENODATA); a good read returned 0 without
writing the result, so hwmon printed whatever its stack held:
temp1_fault read -140737286996992 on each of the six TAS2764s here
and lm-sensors showed every amplifier as FAULT (r222's hw-check,
2026-11-20), while temp1_input read 35-40 C.

Tested on the test kernel AsahiLinux#661 (2026-11-20): with the amplifiers
playing (a game's audio) temp1_input reads 32-38 C and temp1_fault 0
on all six, lm-sensors no FAULT; idle, temp1_input gives -ENODATA and
temp1_fault 1, the reset-value rule as before.
hitori-chan added a commit to hitori-chan/linux that referenced this pull request Nov 20, 2026
… as macOS

The AOP kept sending about 4 messages a second on its AFK endpoints 0x26
and 0x27 through an s2idle freeze (AsahiLinux#661, 2026-11-20: 236 mailbox IRQs in
62 s frozen, all of type 8, msg0 >> 52), one of the freeze's wake sources.

macOS stops each endpoint's queue when the endpoint's AppleSPU goes to
power state 0 (AppleSPU 27.2, _stopQueue 0xfffffe0009e610b4): AFK 0xA4,
answered by 0x87 (_asyncMessage 0xfffffe0009e41ff4), after which the
AOP's endpoint holds its reports (aopfw 27.0.1, sub_1017844, sub_1016260).
At wake _startQueue (0xfffffe0009e60ff4) sends 0xA3 and waits for 0x86.
RTBuddy then tells the AOP the AP sleeps, AP power state 0x201, and 0x20
at wake, leaving the AOP's own power state alone
(RTBuddyManagementEndpoint::_signalApPowerGated 0xfffffe000b79fb08).

The driver now does the same through the platform sleep callbacks:
suspend sends 0xA4 to each endpoint whose rings are set up and waits for
0x87, then sets the AP state 0x201; resume sets 0x20 first (RTKit refuses
an endpoint message otherwise), then sends 0xA3 to each queue it stopped
and waits for 0x86. 0x87 was logged as unknown; 0x86 was ignored. Both
now record the endpoint's acknowledgement and wake the waiter.

Each wait is bounded at 1 s, RTKit's own for a power state's echo, and a
failure is logged, never returned: the PM core does not resume a device
whose suspend failed, though it resumes its children, whose calls would
meet stopped queues. A queue's state follows the message sent, so resume
restarts a queue whose stop went unanswered, and 0x20 follows any 0x201
sent, since a late echo still moves RTKit's AP state. An EPIC call to a
stopped queue fails with EBUSY instead of waiting for an answer that does
not come. The sensors' sleep calls need a bounded call too:
epic_call_timeout gives up with ETIMEDOUT and leaves the call's tag slot
taken, so a late answer completes it rather than failing the ring's read.

The sensors are the AOP's children (platform_device_register_full with
the AOP as parent), so the PM core suspends them first and resumes them
after, as macOS's IOPM orders its children. Built only; not run on the
Mac.
hitori-chan added a commit to hitori-chan/linux that referenced this pull request Nov 20, 2026
The hwmon fault attribute was set only when the temperature register
held its reset value (-ENODATA); a good read returned 0 without
writing the result, so hwmon printed whatever its stack held:
temp1_fault read -140737286996992 on each of the six TAS2764s here
and lm-sensors showed every amplifier as FAULT (r222's hw-check,
2026-11-20), while temp1_input read 35-40 C.

Tested on the test kernel AsahiLinux#661 (2026-11-20): with the amplifiers
playing (a game's audio) temp1_input reads 32-38 C and temp1_fault 0
on all six, lm-sensors no FAULT; idle, temp1_input gives -ENODATA and
temp1_fault 1, the reset-value rule as before.
hitori-chan added a commit to hitori-chan/linux that referenced this pull request Nov 20, 2026
… as macOS

The AOP kept sending about 4 messages a second on its AFK endpoints 0x26
and 0x27 through an s2idle freeze (AsahiLinux#661, 2026-11-20: 236 mailbox IRQs in
62 s frozen, all of type 8, msg0 >> 52), one of the freeze's wake sources.

macOS stops each endpoint's queue when the endpoint's AppleSPU goes to
power state 0 (AppleSPU 27.2, _stopQueue 0xfffffe0009e610b4): AFK 0xA4,
answered by 0x87 (_asyncMessage 0xfffffe0009e41ff4), after which the
AOP's endpoint holds its reports (aopfw 27.0.1, sub_1017844, sub_1016260).
At wake _startQueue (0xfffffe0009e60ff4) sends 0xA3 and waits for 0x86.
RTBuddy then tells the AOP the AP sleeps, AP power state 0x201, and 0x20
at wake, leaving the AOP's own power state alone
(RTBuddyManagementEndpoint::_signalApPowerGated 0xfffffe000b79fb08).

The driver now does the same through the platform sleep callbacks:
suspend sends 0xA4 to each endpoint whose rings are set up and waits for
0x87, then sets the AP state 0x201; resume sets 0x20 first (RTKit refuses
an endpoint message otherwise), then sends 0xA3 to each queue it stopped
and waits for 0x86. 0x87 was logged as unknown; 0x86 was ignored. Both
now record the endpoint's acknowledgement and wake the waiter.

Each wait is bounded at 1 s, RTKit's own for a power state's echo, and a
failure is logged, never returned: the PM core does not resume a device
whose suspend failed, though it resumes its children, whose calls would
meet stopped queues. A queue's state follows the message sent, so resume
restarts a queue whose stop went unanswered, and 0x20 follows any 0x201
sent, since a late echo still moves RTKit's AP state. An EPIC call to a
stopped queue fails with EBUSY instead of waiting for an answer that does
not come.

The sensors' sleep calls need a bounded call too, and its tags follow
macOS's AppleSPUInterface (27.2, AppleSPU 1087.40.4): each command is
numbered from a counter (_spuPerformCommandInternalGated
0xfffffe0009e4822c), taken off the pending set once its 10 s deadline
passed, answered or not (_sendCommandGated 0xfffffe0009e4840c), and an
answer whose tag matches no pending command is dropped
(_handleResponsePacket 0xfffffe0009e62b30). Each call takes the
endpoint's next tag, never 0 nor one still pending, in the subheader's
tag field where the slot's 1-based index went; a reply is matched by
tag, one that matches no call is logged and skipped, and
epic_call_timeout frees its slot when it gives up with ETIMEDOUT, taking
an answer that came just before as the result. With the slot kept
instead, an AOP that never answers a sensor's sleep call would lose a
slot each time (three a suspend for the ALS), and with the eight gone
every call on the endpoint would fail.

The sensors are the AOP's children (platform_device_register_full with
the AOP as parent), so the PM core suspends them first and resumes them
after, as macOS's IOPM orders its children.

The AP state's echo is awaited with the driver's rtkit lock dropped
between looks, every 10 ms for 1 s, RTKit's own wait: RTKit handles the
echo in order with the endpoints' messages on its work queue, and
recv_message takes that lock first, so an endpoint message queued ahead
of the echo (a report in flight, a 0x87 that came after the stop's wait)
would hold it back for the whole second and log a failed AP state.

Run 2026-11-20 (work/scratch/sleep/aop-sleep2-q.sh, the same script
throughout): AsahiLinux#662, and AsahiLinux#663 with lockdep and KASAN, held 54 AOP mailbox
interrupts in a 60 s freeze against stock r222's 389, and 33 in each
10 s one against 65-70: the 3 s awake before each and one stop and one
start ack an endpoint. Awake both endpoints took 199 in 30 s, so the
sensors stream again; after ten 10 s freezes the ambient light, the lid
angle and the IMU read and the AOP's mic records. With the tags and the
echo off the lock, AsahiLinux#664 (lockdep, KASAN): 52 in a 62 s freeze, 33-36 in
each 10 s one, the same reads and recording. Neither debug kernel
reported anything.
hitori-chan added a commit to hitori-chan/linux that referenced this pull request Nov 20, 2026
The hwmon fault attribute was set only when the temperature register
held its reset value (-ENODATA); a good read returned 0 without
writing the result, so hwmon printed whatever its stack held:
temp1_fault read -140737286996992 on each of the six TAS2764s here
and lm-sensors showed every amplifier as FAULT (r222's hw-check,
2026-11-20), while temp1_input read 35-40 C.

Tested on the test kernel AsahiLinux#661 (2026-11-20): with the amplifiers
playing (a game's audio) temp1_input reads 32-38 C and temp1_fault 0
on all six, lm-sensors no FAULT; idle, temp1_input gives -ENODATA and
temp1_fault 1, the reset-value rule as before.
hitori-chan added a commit to hitori-chan/linux that referenced this pull request Nov 20, 2026
… as macOS

The AOP kept sending about 4 messages a second on its AFK endpoints 0x26
and 0x27 through an s2idle freeze (AsahiLinux#661, 2026-11-20: 236 mailbox IRQs in
62 s frozen, all of type 8, msg0 >> 52), one of the freeze's wake sources.

macOS stops each endpoint's queue when the endpoint's AppleSPU goes to
power state 0 (AppleSPU 27.2, _stopQueue 0xfffffe0009e610b4): AFK 0xA4,
answered by 0x87 (_asyncMessage 0xfffffe0009e41ff4), after which the
AOP's endpoint holds its reports (aopfw 27.0.1, sub_1017844, sub_1016260).
At wake _startQueue (0xfffffe0009e60ff4) sends 0xA3 and waits for 0x86.
RTBuddy then tells the AOP the AP sleeps, AP power state 0x201, and 0x20
at wake, leaving the AOP's own power state alone
(RTBuddyManagementEndpoint::_signalApPowerGated 0xfffffe000b79fb08).

The driver now does the same through the platform sleep callbacks:
suspend sends 0xA4 to each endpoint whose rings are set up and waits for
0x87, then sets the AP state 0x201; resume sets 0x20 first (RTKit refuses
an endpoint message otherwise), then sends 0xA3 to each queue it stopped
and waits for 0x86. 0x87 was logged as unknown; 0x86 was ignored. Both
now record the endpoint's acknowledgement and wake the waiter.

Each wait is bounded at 1 s, RTKit's own for a power state's echo, and a
failure is logged, never returned: the PM core does not resume a device
whose suspend failed, though it resumes its children, whose calls would
meet stopped queues. A queue's state follows the message sent, so resume
restarts a queue whose stop went unanswered, and 0x20 follows any 0x201
sent, since a late echo still moves RTKit's AP state. An EPIC call to a
stopped queue fails with EBUSY instead of waiting for an answer that does
not come.

The sensors' sleep calls need a bounded call too, and its tags follow
macOS's AppleSPUInterface (27.2, AppleSPU 1087.40.4): each command is
numbered from a counter (_spuPerformCommandInternalGated
0xfffffe0009e4822c), taken off the pending set once its 10 s deadline
passed, answered or not (_sendCommandGated 0xfffffe0009e4840c), and an
answer whose tag matches no pending command is dropped
(_handleResponsePacket 0xfffffe0009e62b30). Each call takes the
endpoint's next tag, never 0 nor one still pending, in the subheader's
tag field where the slot's 1-based index went; a reply is matched by
tag, one that matches no call is logged and skipped, and
epic_call_timeout frees its slot when it gives up with ETIMEDOUT, taking
an answer that came just before as the result. With the slot kept
instead, an AOP that never answers a sensor's sleep call would lose a
slot each time (three a suspend for the ALS), and with the eight gone
every call on the endpoint would fail.

The sensors are the AOP's children (platform_device_register_full with
the AOP as parent), so the PM core suspends them first and resumes them
after, as macOS's IOPM orders its children.

RTKit gets the request's two halves for it,
apple_rtkit_send_ap_asleep() and apple_rtkit_ap_asleep_acked() (1 for
the echo, 0 not yet, EINVAL another state), with their Rust bindings.
The AP state's echo is awaited with the driver's rtkit lock dropped
between looks, every 10 ms for 1 s, RTKit's own wait: RTKit handles the
echo in order with the endpoints' messages on its work queue, and
recv_message takes that lock first, so an endpoint message queued ahead
of the echo (a report in flight, a 0x87 that came after the stop's wait)
would hold it back for the whole second and log a failed AP state.

Run 2026-11-20 (work/scratch/sleep/aop-sleep2-q.sh, the same script
throughout): AsahiLinux#662, and AsahiLinux#663 with lockdep and KASAN, held 54 AOP mailbox
interrupts in a 60 s freeze against stock r222's 389, and 33 in each
10 s one against 65-70: the 3 s awake before each and one stop and one
start ack an endpoint. Awake both endpoints took 199 in 30 s, so the
sensors stream again; after ten 10 s freezes the ambient light, the lid
angle and the IMU read and the AOP's mic records. With the tags and the
echo off the lock, AsahiLinux#664 (lockdep, KASAN): 52 in a 62 s freeze, 33-36 in
each 10 s one, the same reads and recording. Neither debug kernel
reported anything.
@jannau

jannau commented Nov 25, 2026

Copy link
Copy Markdown
Member

please rebase after I pushed v7.3.6 to asahi-wip. sorry

1 similar comment
@jannau

jannau commented Nov 25, 2026

Copy link
Copy Markdown
Member

please rebase after I pushed v7.3.6 to asahi-wip. sorry

… base index > 0

hw_atl2_hw_packet_filter_set() wraps hw_atl_b0_hw_packet_filter_set()
which has no concept of `l2_filters_base_index` and enables/disables
filters from `HW_ATL_B0_MAC_MIN` (1) to `HW_ATL_B0_MAC_MAX` (33). After
commit 6c1ca11 ("net: atlantic: fix AQC113 HW init: ART, L2 filter
slot, MAC address") this may result in disabling filters set in
hw_atl2.c including the l2 filter for the MAC address. This results in
broken networking on Apple silicon systems with AQC113. The firmware in
this systems report `l2_filters_base_index = 9`.
Copy the formerly wrapped `hw_atl_b0_hw_packet_filter_set()` to handle
this additional complexity.

Fixes: 6c1ca11 ("net: atlantic: fix AQC113 HW init: ART, L2 filter slot, MAC address")
Cc: [email protected]
Signed-off-by: Janne Grunau <[email protected]>
Since commit 6c1ca11 ("net: atlantic: fix AQC113 HW init: ART,
L2 filter slot, MAC address") hw_atl2_hw_multicast_list_set() uses L2
filter slot above the firmware-assigned L2 filter slot for the MAC
address.
On Apple silicon systems with AQC113 the firmware returns
`l2_filters_base_index = 9` and `l2_filter_count = 29` which is
unfortunately less than AQ_HW_MULTICAST_ADDRESS_MAX (32).
Add a new `struct aq_hw_ops` function pointer
hw_get_num_multicast_addresses() so that atl2 variants can report the
lower number of available L2 filter slots. Use this potentially smaller
number in aq_nic_set_multicast_list() to decide when to switch to
promiscuous mode.

Fixes: 6c1ca11 ("net: atlantic: fix AQC113 HW init: ART, L2 filter slot, MAC address")
Cc: [email protected]
Signed-off-by: Janne Grunau <[email protected]>
In commit 00309bf ("ASoC: apple: mca: Support FEs being clock
consumers") the syncgen clock selection was misunderstood resulting in
selecting a random clock. In the capture on multiple BEs for IV sense
data use case the configuration worked partially by sheer luck. On
Macbook Pro's with 6 speakers it could result in desync IV sense data
triggered likely by sample rate changes.
When the FE is a clock consumer select the clock of first used BE as
SYNCGEN_MCLK.
Add function like macros to determine the clock index based on the FE or
BE number.
This is functionally equivalent to the state sent in v2 of "ASoC: apple:
mca: support simultaneous I2S capture on the frontend" in [1].

Link: https://lore.kernel.org/all/[email protected]/ [1]
Fixes: 00309bf ("ASoC: apple: mca: Support FEs being clock consumers")
Fixes: 108a14b ("ASoC: apple: mca: Support capture on multiples BEs")
Signed-off-by: Janne Grunau <[email protected]>
Link: https://patch.msgid.link/20261110-snd-soc-apple-mca-capture-multiple-be-v1-1-d9569a8374c5@jannau.net
Signed-off-by: Mark Brown <[email protected]>
jannau and others added 14 commits November 26, 2026 11:59
Certain Broadcom bluetooth chips (bcm4377/bcm4378/bcm438) need ACL
streams carrying audio to be set as "high priority" using a vendor
specific command to prevent 10-ish second-long dropouts whenever
something does a device scan. This patch sends the command when the
socket priority is set to TC_PRIO_INTERACTIVE, as BlueZ does for audio.

Signed-off-by: Sasha Finkelstein <[email protected]>
The current approach of silently disabling all rust drivers if the
toolchain is missing results in users that try to compile their own
kernels getting a "successful" build and then being confused about where
did their drivers go. In comparison, missing openssl results in a build
failure, not a disappearance of everything that depends on it.

This also means that allyesconfig will depend on rust, but since the
rust experiment concluded with "rust is here to stay", i believe that
allyesconfig should be building rust drivers too.

Signed-off-by: Sasha Finkelstein <[email protected]>
Apple M3 Pro and Max devices are using 'gp00' keys for GPIO in addition
to 'gP00' keys. Add a second compatible to handle this keys with an
additional macsmc-gpio instance.

Signed-off-by: Janne Grunau <[email protected]>
Add support for SMC GPIO keys with a lower letter 'p' via the
"apple,smc-low-gpio" compatible. This adds support for a second
macsmc-gpio controller using 'gp00' keys.
These keys are used on Apple M3 Pro and Max MacBooks in the controller
for keyboard and trackpad and for the built-in DisplayPort to HDMI
converter.

Signed-off-by: Janne Grunau <[email protected]>
Apple M3 Pro and Max devices are using 'gp00' keys for GPIO in addition
to 'gP00' keys. These keys are handled by an additional macsmc-gpio
instance using the "apple,smc-low-gpio" compatible.

Signed-off-by: Janne Grunau <[email protected]>
jannau and others added 9 commits November 26, 2026 20:10
20-30 percent higher framerate while rendering testufo with 5 ufos in
Firefox/kwin on j514s (t6030) with 120 Hz mode.

Signed-off-by: Janne Grunau <[email protected]>
20-30 percent higher framerate while rendering testufo with 5 ufos in
Firefox/kwin on j514s (t6030) with 120 Hz mode.

Signed-off-by: Janne Grunau <[email protected]>
30-40 percent higher framerate while rendering testufo with 5 ufos in
Firefox/kwin on j504 (t8122) (60 Hz mode).

Signed-off-by: Janne Grunau <[email protected]>
Return management-message send failures and stop AFK initialization when
starting its endpoint fails.

Signed-off-by: Ramzi Abdiche <[email protected]>
Set the receive FIFO enable bit on T6030 ASC mailboxes.

Signed-off-by: Ramzi Abdiche <[email protected]>
Start the debug endpoint and provide its requested shared buffers. Free
them on reset and teardown.

Signed-off-by: Ramzi Abdiche <[email protected]>
Poll between short completion waits to recover messages when interrupt
delivery stalls.

Signed-off-by: Ramzi Abdiche <[email protected]>
Add an opt-in immediate acknowledgement path for syslog and IOReport
messages. Reply before dispatching later messages, skipping normal
processing of these log entries.

Signed-off-by: Ramzi Abdiche <[email protected]>
Delay initialization after endpoint startup and poll for its reply.

Signed-off-by: Ramzi Abdiche <[email protected]>
@a-ramses
a-ramses force-pushed the rtkit-startup-fixes branch from aa5ca7f to 82cfb87 Compare November 26, 2026 20:52
hitori-chan added a commit to hitori-chan/linux that referenced this pull request Nov 30, 2026
The hwmon fault attribute was set only when the temperature register
held its reset value (-ENODATA); a good read returned 0 without
writing the result, so hwmon printed whatever its stack held:
temp1_fault read -140737286996992 on each of the six TAS2764s here
and lm-sensors showed every amplifier as FAULT (r222's hw-check,
2026-11-20), while temp1_input read 35-40 C.

Tested on the test kernel AsahiLinux#661 (2026-11-20): with the amplifiers
playing (a game's audio) temp1_input reads 32-38 C and temp1_fault 0
on all six, lm-sensors no FAULT; idle, temp1_input gives -ENODATA and
temp1_fault 1, the reset-value rule as before.
hitori-chan added a commit to hitori-chan/linux that referenced this pull request Nov 30, 2026
… as macOS

The AOP kept sending about 4 messages a second on its AFK endpoints 0x26
and 0x27 through an s2idle freeze (AsahiLinux#661, 2026-11-20: 236 mailbox IRQs in
62 s frozen, all of type 8, msg0 >> 52), one of the freeze's wake sources.

macOS stops each endpoint's queue when the endpoint's AppleSPU goes to
power state 0 (AppleSPU 27.2, _stopQueue 0xfffffe0009e610b4): AFK 0xA4,
answered by 0x87 (_asyncMessage 0xfffffe0009e41ff4), after which the
AOP's endpoint holds its reports (aopfw 27.0.1, sub_1017844, sub_1016260).
At wake _startQueue (0xfffffe0009e60ff4) sends 0xA3 and waits for 0x86.
RTBuddy then tells the AOP the AP sleeps, AP power state 0x201, and 0x20
at wake, leaving the AOP's own power state alone
(RTBuddyManagementEndpoint::_signalApPowerGated 0xfffffe000b79fb08).

The driver now does the same through the platform sleep callbacks:
suspend sends 0xA4 to each endpoint whose rings are set up and waits for
0x87, then sets the AP state 0x201; resume sets 0x20 first (RTKit refuses
an endpoint message otherwise), then sends 0xA3 to each queue it stopped
and waits for 0x86. 0x87 was logged as unknown; 0x86 was ignored. Both
now record the endpoint's acknowledgement and wake the waiter.

Each wait is bounded at 1 s, RTKit's own for a power state's echo, and a
failure is logged, never returned: the PM core does not resume a device
whose suspend failed, though it resumes its children, whose calls would
meet stopped queues. A queue's state follows the message sent, so resume
restarts a queue whose stop went unanswered, and 0x20 follows any 0x201
sent, since a late echo still moves RTKit's AP state. An EPIC call to a
stopped queue fails with EBUSY instead of waiting for an answer that does
not come.

The sensors' sleep calls need a bounded call too, and its tags follow
macOS's AppleSPUInterface (27.2, AppleSPU 1087.40.4): each command is
numbered from a counter (_spuPerformCommandInternalGated
0xfffffe0009e4822c), taken off the pending set once its 10 s deadline
passed, answered or not (_sendCommandGated 0xfffffe0009e4840c), and an
answer whose tag matches no pending command is dropped
(_handleResponsePacket 0xfffffe0009e62b30). Each call takes the
endpoint's next tag, never 0 nor one still pending, in the subheader's
tag field where the slot's 1-based index went; a reply is matched by
tag, one that matches no call is logged and skipped, and
epic_call_timeout frees its slot when it gives up with ETIMEDOUT, taking
an answer that came just before as the result. With the slot kept
instead, an AOP that never answers a sensor's sleep call would lose a
slot each time (three a suspend for the ALS), and with the eight gone
every call on the endpoint would fail.

The sensors are the AOP's children (platform_device_register_full with
the AOP as parent), so the PM core suspends them first and resumes them
after, as macOS's IOPM orders its children.

RTKit gets the request's two halves for it,
apple_rtkit_send_ap_asleep() and apple_rtkit_ap_asleep_acked() (1 for
the echo, 0 not yet, EINVAL another state), with their Rust bindings.
The AP state's echo is awaited with the driver's rtkit lock dropped
between looks, every 10 ms for 1 s, RTKit's own wait: RTKit handles the
echo in order with the endpoints' messages on its work queue, and
recv_message takes that lock first, so an endpoint message queued ahead
of the echo (a report in flight, a 0x87 that came after the stop's wait)
would hold it back for the whole second and log a failed AP state.

Run 2026-11-20 (work/scratch/sleep/aop-sleep2-q.sh, the same script
throughout): AsahiLinux#662, and AsahiLinux#663 with lockdep and KASAN, held 54 AOP mailbox
interrupts in a 60 s freeze against stock r222's 389, and 33 in each
10 s one against 65-70: the 3 s awake before each and one stop and one
start ack an endpoint. Awake both endpoints took 199 in 30 s, so the
sensors stream again; after ten 10 s freezes the ambient light, the lid
angle and the IMU read and the AOP's mic records. With the tags and the
echo off the lock, AsahiLinux#664 (lockdep, KASAN): 52 in a 62 s freeze, 33-36 in
each 10 s one, the same reads and recording. Neither debug kernel
reported anything.
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.

3 participants