#asahi-dev · 2026-06-15 07:35
svenfrom yesterday: 11:36:17 <sven> fwiw, we essentially got confirmation that wfi losing state on m4+ is expected because that cyc_ovrd thing we set just doesn’t exist anymore#asahi-dev · 2026-06-15 07:32
svenyes, but xnu doesn't touch it anymore. there's even a "/* CPU_OVRD register accesses are banned */" comment#asahi-dev · 2026-06-15 07:29
svenand if this is regarding wfi: at this point it looks like the "force wfi to use clock gating only" debug settings are just gone in hardware so even filing a feedback report wouldn't really help us#asahi-dev · 2026-06-15 07:28
svenyeah#asahi-dev · 2026-06-15 07:26
sveni think file feedback report -> forward FBxxx number to some apple engineer kinda works so no need to try and escalate that to something else#asahi-dev · 2026-06-14 19:45
svenunless they somehow always trap it there i guess?#asahi-dev · 2026-06-14 19:45
svenyeah, that's what just came to my mind as well#asahi-dev · 2026-06-14 19:45
sventhough actually.. who knows.#asahi-dev · 2026-06-14 19:44
svenno idea actually, but i'd guess so#asahi-dev · 2026-06-14 19:41
svenoh right, el2 should just make sure to trap wfi from el1 and ensure it works#asahi-dev · 2026-06-14 19:11
svenif we had documentation i'd prefer the first device released where it happened but oh well#asahi-dev · 2026-06-14 19:11
sveni'd just use the first device where it was noticed#asahi-dev · 2026-06-14 18:36
svenlooks good to me, will send r-b once it's on the list#asahi-dev · 2026-06-14 17:50
sventhat works I guess #asahi-dev · 2026-06-14 17:32
sveni still think that "the only way to get cpu midr into the kernel is to lump them together with M-series" conclusion is wrong at the very best. but i also don't see how adding them hurts *shrug*#asahi-dev · 2026-06-14 17:26
sveni'm very confused how any of this is related to the wfi errata thing#asahi-dev · 2026-06-14 17:21
sveni half-expect only the workaround for m4+ will be accepted because really m1n1 is the only bootloader and we always set the correct bits in cyc_ovrd#asahi-dev · 2026-06-14 17:20
svenwhich brings me back to "pre-m1 can always be a follow up patch"#asahi-dev · 2026-06-14 17:18
svenuh... where?#asahi-dev · 2026-06-14 17:18
svendoesn't that already somehow work?#asahi-dev · 2026-06-14 17:18
svenand why do you need pre-m1 support?#asahi-dev · 2026-06-14 17:18
svenmeh, pre-m1 can always come later#asahi-dev · 2026-06-14 16:14
svenespecially useful if you need a v2, v3, etc.#asahi-dev · 2026-06-14 16:14
sven^-- that#asahi-dev · 2026-06-14 16:13
svenwhatever you used to send the email works otherwise, it looks good#asahi-dev · 2026-06-14 16:11
svenyou'll get complaints about the #define location but that's fine since we have no idea where to put them #asahi-dev · 2026-06-14 16:11
sveni.e. #define CYC_OVRD_WFI_MODE_MASK GENMASK(...) and then FIELD_GET(read_sysreg_s(...), CYC_OVRD_WFI_MODE_MASK) != 2#asahi-dev · 2026-06-14 16:10
sven*and probably use FIELD_GET for the CYC_OVRD check#asahi-dev · 2026-06-14 16:10
svenyeah, i'd add a cover letter. and probablyt u#asahi-dev · 2026-06-14 16:05
svenfeel free to send them to sven@kernel.org#asahi-dev · 2026-06-14 16:04
svensure#asahi-dev · 2026-06-14 16:00
svenalso, fwiw, checkpatch is generally just a recommendation and does have false positives sometimes (especially for WARNINGS)#asahi-dev · 2026-06-14 15:58
sveni'd also add "This workaround no longer exists since M4" to the commit message just to make it clear we're not doing this for fun#asahi-dev · 2026-06-14 15:57
svenah, pmu has some SYS_IMP_APL as well but there's also in a header file for it#asahi-dev · 2026-06-14 15:56
sveni guess the place can also just be yak shaved on the ML then :D#asahi-dev · 2026-06-14 15:56
svenhm... i think the only SYS_IMP_APL regs we need in the kernel are for aic and those are just defined directly at the driver#asahi-dev · 2026-06-14 15:55
sven#define wfit(val) asm volatile(ALTERNATIVE("msr s0_3_c1_c0_1, %0", "msr s0_3_c1_c0_0, %0", ARM64_WORKAROUND_WFI_STATE) \ <-- what's that msr s0_3... thing? shouldn't that also be nop?#asahi-dev · 2026-06-14 15:54
svenyou also want at least two commits i think, one to add the MIDRs and another one for the wfi alternative thing#asahi-dev · 2026-06-14 15:53
svenwhat is it complaining about?#asahi-dev · 2026-06-14 15:18
svenbut there’s not much Apple can do if that cyc_ovrd bit is gone at this point #asahi-dev · 2026-06-14 12:53
svendo we care? I don’t think we use that in Linux #asahi-dev · 2026-06-14 12:51
sventhe aic sysreg will allegedly be fixed with the next beta fwiw#asahi-dev · 2026-06-14 09:36
svenit’s effectively a cpu errata :/#asahi-dev · 2026-06-14 09:36
svenfwiw, we essentially got confirmation that wfi losing state on m4+ is expected because that cyc_ovrd thing we set just doesn’t exist anymore #asahi-dev · 2026-06-13 16:54
svenyou should be able to send an IPI to the other core and wake it up that way#asahi-dev · 2026-06-13 15:28
svenlooks like the linux cpuidle drivers saves x18-x30#asahi-dev · 2026-06-13 15:27
sventhen probably just a mistake i guess#asahi-dev · 2026-06-13 15:27
sventhen we're just saving that#asahi-dev · 2026-06-13 15:27
svenwait, don't we store the original value for that cyc_ovrd thingy in x0?#asahi-dev · 2026-06-13 15:27
svenprobably a mistake then