#
#asahi · 2023-03-07 11:50
mort_and yeah, I've done some rust development and the tooling is always kind of a pain.. especially since everyone seems to be using nightly features so you need a nightly rustc but not one that's too new so that the nightly feature has changed
#asahi · 2023-03-07 11:49
mort_so far I've used bindgen from the repos
#asahi · 2023-03-07 11:49
chadmedrust tooling can be super annoying, especially since kernel rust hasnt really settled yet
#asahi · 2023-03-07 11:49
chadmedwhich will install bindgen into your cargo env
#asahi · 2023-03-07 11:49
chadmedfor the latest released tag you should be using rust 1.62 and the bindgen-cli crate
#asahi · 2023-03-07 11:48
mort_the only explanation I can think of is that the kernel isn't actually identical because of bindgen version differences or other toolchain differences
#asahi · 2023-03-07 11:46
mort_I mean, I have a mess and a kernel which work together from the repos, I would expect that if I compile my own identical kernel from the exact same kernel source code it would work with the mesa from the repos
#asahi · 2023-03-07 11:45
chadmedthe uapi is not stable and the kernel tags usually only work with one or two mesa commits before it breaks again
#asahi · 2023-03-07 11:45
chadmeddid you install the corresponding mesa package too?
#asahi · 2023-03-07 11:44
chadmedtheyre actually different things afaict
#asahi · 2023-03-07 11:43
chadmedtry using bindgen-cli not cbindgen
#asahi · 2023-03-07 11:39
mort_maybe it breaks because my cbindgen is too new? There was a warning about that but I assumed cbindgen would at least be backwards compatible
#asahi · 2023-03-07 11:38
mort_hmm that's the exact one I've been using
#asahi · 2023-03-07 11:33
j`ey_that's 6.1-asahi2-2
#asahi · 2023-03-07 11:32
j`ey_https://github.com/AsahiLinux/PKGBUILDs/commit/d66008ea33ce6547a806fd197688a9344c02f6ef
#asahi · 2023-03-07 11:31
mort_turns out plasma fails to start when installing an edge kernel from an h modified Asahi pkgbuild as well, that's odd. Does anyone know what exact PKGBUILDs commit the current edge kernel was built from?
#asahi · 2023-03-07 10:56
j`ey_but there's no higher exception level, since m1 only supports up to EL2
#asahi · 2023-03-07 10:56
j`ey_well I mean the macOS kernel must do the stuff, for PSCI it's firmware that does it, PSCI just does a hvc/smc
#asahi · 2023-03-07 10:55
mort_does macOS also just use WFI?
#asahi · 2023-03-07 10:54
j`ey_there isn't power management stuff!
#asahi · 2023-03-07 10:53
mort_maybe Apple's power management stuff is PSCI-like enough that tapering over the differences makes sense
#asahi · 2023-03-07 10:52
mort_I won't argue against the second approach since I don't know enough about it, but it feels a bit weird
#asahi · 2023-03-07 10:51
mort_so non-PSCI devices don't even get WFI idle until they have made a hack to make their hardware look like it supports PSCI to the rest of the kernel
#asahi · 2023-03-07 10:51
mort_Hmm. Thinking about it from an upstream perspective: one approach would lead to a generic arm cpuidle driver which at least makes WFI idle work on non-PSCI devices, and then non-PSCI devices could add their own hardware specific cpuidle driver as they get to that point. The other approach leads to the one psci driver being the only option on arm,
#asahi · 2023-03-07 10:37
sven*some
#asahi · 2023-03-07 10:37
svenI’d really just hack it for now since the proper solution is sone psci-like conduit anyway
#asahi · 2023-03-07 10:37
mort_the logic is pretty much, "Here's the set of PSCI idle states", not "Here's the list of idle states, this one and that one happens to use PSCI"
#asahi · 2023-03-07 10:35
mort_I don't see a clean way to make that code add a wfi idle state without possibly breaking existing devicetrees or at least making kinda semantically weird changes to make psci code card about wfi
#asahi · 2023-03-07 10:34
mort_the issue is, at the moment, all devices with additional psci devices get wfi for free, it's not listed in the devicetree anywhere; and all the logic to add idle states from the devicetree are highly psci specific and the function has psci in the name
#asahi · 2023-03-07 10:31
chadmedits easier for us to add stuff to our devicetrees that we maintain than it is to get totally new bindings and mechanisms upstreamed
#asahi · 2023-03-07 10:30
chadmedjust "go to this code if the idle state is wfi"
#asahi · 2023-03-07 10:30
chadmedthat way you dont need to introduce any _new_ checks per se
#asahi · 2023-03-07 10:30
chadmedthen have the driver probe based on that
#asahi · 2023-03-07 10:29
chadmedif idle-states has binding documentation you could propose just adding "wfi" as a valid value or somethign
#asahi · 2023-03-07 10:17
mort_then if that was ever to be upstreamed I suppose we'd need to add another devicetree thing which lets you opt in to using the cpuidle-arm driver despite not having additional idle states, as it is it would try to activate on any system if the aforementioned check is removed
#asahi · 2023-03-07 10:16
mort_well, just remove the code which says, "if there was no additional idle states in the devicetree, don't activate the driver"
#asahi · 2023-03-07 10:10
chadmedright right so your plan is to just hack in a path where it keeps the core in WFI if theres no psci interface available?
#asahi · 2023-03-07 10:08
mort_so I didn't get to test whether the idle thing actually worked or not before going to sleep
#asahi · 2023-03-07 10:07
mort_I made a kernel like that yesterday but I must've messed up building it somehow, everything worked including sddm except that plasma failed to start due to a bunch of Qt errors..
#asahi · 2023-03-07 10:06
mort_chadmed: yes, but it gets those idle states from the devicetree: and it has a hard coded wfi idle state that doesn't rely on psci. If there was a way to tell it to activate, but not give it any idle states other than the default wfi one, I don't see any reason why it wouldn't work
#asahi · 2023-03-07 10:04
chadmedlike isnt that the whole problem
#asahi · 2023-03-07 10:03
chadmedcpuidle-arm relies on calling into firmware to handle psci doesnt it?
#asahi · 2023-03-07 10:02
mort_sven: the issue that it doesn't work without a cpuidle driver is in the core code, I'm looking at maybe being able to use the cpuidle-arm driver on the M1
#asahi · 2023-03-07 09:56
sven*in
#asahi · 2023-03-07 09:55
svenmort_: I don’t know much about the idle code but from those LKML threads it seems to me that the issue is on the core code
#asahi · 2023-03-07 06:12
rgi'm wondering what changes the edge configuration provide.
#asahi · 2023-03-07 05:51
taniyamai've tried timedatectl set-local-rtc but after a resstart, the clock is back at January 1st, 1970
#asahi · 2023-03-07 05:48
taniyamamy RTC time is stuck in 1970, any idea on how I could fix it? Any help would be appreciated
#asahi · 2023-03-07 05:42
rgi'm going to build asahi-wip kernel, should i apply config.edge to kernel config?
#asahi · 2023-03-06 23:54
mort_I'm guessing it'll work if I get an old rust toolchain, but man do I find rust annoying to work with -- in general, not just in the kernel

plus ›