#
…

2021-04-07

00:01vlixa has quit [Remote host closed the connection]
00:02vlixa has joined #asahi
00:41choozy has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
01:01shenkithe bcm5719 (a tg3 supported device) has an open source firmware re-implementation
01:51brentr123[m]did i seriously get kicked from #freenode_#asahi-gpu:matrix.org for being idle for 30 days? i dont really talk in there, im just a observer
01:55Graypup_brentr123[m], that's matrix
01:56brentr123[m]anyway to fix that?
01:56Graypup_talking once every 30d, using a normal irc client :/
01:57Graypup_i was reminded by your message to look at matrix to not get kicked from a project channel i care about greatly on matrix ;-;
02:47Calchan has joined #asahi
03:02phiologe has quit [Ping timeout: 258 seconds]
03:02phiologe has joined #asahi
03:36marcankettenis_: one thing I do want is for Linux not to depend on u-boot initialization, unless there are very good practical reasons for that
03:36marcanbeacuse the ability to boot linux directly from m1n1 (during testing) is quite handy
04:02marvin24 has quit [Ping timeout: 252 seconds]
04:02marvin24 has joined #asahi
04:20amwIf I'm understanding the end plan is signed (minimal) m1n1 -> u-boot (complex boot loader support) -> Linux
04:20amwSo m1n1 is very rarely upgraded but u-boot occasionally bugfixed/extra features, Linux regularly upgraded
04:30jeffmiw_ has joined #asahi
04:33taziden has quit [Ping timeout: 258 seconds]
04:34jeffmiw_ has quit [Ping timeout: 240 seconds]
04:55marcanactually, m1n1 and u-boot will be upgraded together, as they are combined into one file
04:56marcanand you need to go into 1TR to upgrade them (it cannot be done from linux or any normal OS)
04:56marcanmany users will probably do m1n1 -> u-boot -> grub -> Linux
04:56marcangrub is the first piece that will be easily upgradable
05:00taziden has joined #asahi
06:32zkrx has quit [Ping timeout: 240 seconds]
06:34zkrx has joined #asahi
07:28wicast has quit [Ping timeout: 260 seconds]
07:30wicast has joined #asahi
07:33klaus has joined #asahi
07:40arndshenki: it looks like that tg3 firmware is always flashed into the chip though, so no need to load any blob (open source or not) into the device for network booting
07:44raster has joined #asahi
07:45svendidn't someone have a simple python apple device tree parser? I can't seem to find that one anymore
07:46jeffmiw_ has joined #asahi
07:51jeffmiw_ has quit [Ping timeout: 268 seconds]
07:57svenj`ey: I think it was simpler and didn't depend on some custom restruct thing. but that one should work as well, thanks!
08:30mazsven: I think kettenis_ pointed me to this a while ago (though I can't find the original source): https://pastebin.ubuntu.com/p/sBTGfSzj3p/
08:31ephe_meral1 has joined #asahi
08:40furkan has quit [Ping timeout: 246 seconds]
08:43svenmaz: I think that was the one I had in mind, thanks
08:45arndmarcan: regarding the v4 submission, it seems that there were only very minor comments that you can just fix up and send a v5 pull request with any additional changes as fixups on top.
08:45marcanarnd: I think so, yeah
08:46arndmaz: I see you gave a Reviewed-by for the irqchip driver. Do you think we should also get an Acked-by from tglx for merging it through the soc tree in addition?
08:48mazarnd: tglx usually isn't that interested in the non-x86 irqchip stuff, which is why I'm dealing with it.
08:48arndmarcan: can you send that pull request in the next two days then? I don't want to merge it too late, and it seems there won't be an -rc8 this time after all
08:48arndmaz: ok, fair enough
08:49marcanif we're good on everything else I can send it today, but we still have the hard dep on the FIQ series
08:49marcanmaz: has that gone through yet?
08:49mazarnd: I'll just mention the driver in my PR to tglx.
08:49mazmarcan: nah, I'm preparing the branch at the moment.
08:49mazmarcan: actually, the FIQ stuff is in the arm64 tree.
08:50marcaneverything else is soft, so I think I don't need it as a merge base for my PR, right arnd? the worst that will happen is that if the merge order is "wrong", intermediate states will fail the dtb linter (due to missing bindings), but no build failures or anything like that
08:50mazmarcan: I expect arnd to drag it.
08:50marcanah, in that case I will use that as a base
08:50kharit[m] has quit [Ping timeout: 248 seconds]
08:50ponikrf[m] has quit [Ping timeout: 248 seconds]
08:50wagood[m] has quit [Ping timeout: 248 seconds]
08:50hothotleg[m] has quit [Ping timeout: 248 seconds]
08:50ryanhrob[m] has quit [Ping timeout: 248 seconds]
08:50r1fl has quit [Ping timeout: 248 seconds]
08:50tardyp has quit [Ping timeout: 248 seconds]
08:50marcanjust need a final commit to make sure I don't pull in an incomplete series
08:50arndright, I thought that's what you had already done last week
08:51rcombs has quit [Ping timeout: 248 seconds]
08:51marcannot quite, didn't know it was in amd64 already
08:51marcan(but almost)
08:51mazI'm trying to get Will to get the VHE crap a once over.
08:51marcanthat one is completely orthogonal, so we don't have a merge dep on it
08:53marcanarnd: if you think the potential dtb check noise risk from merge order is OK, then I suggest I just base my series on the FIQ commit in the amd64 tree (or some later commit); that avoids having to do any actual merges at all
08:53r1fl has joined #asahi
08:53tardyp has joined #asahi
08:53marcanotherwise I can merge in gregkh's tty thing like I did for the v4 tree
08:53arndmarcan: isn't the tty series also needed in order to boot with a serial console?
08:53marcanit is, but not to build
08:54arndI would much prefer to have a branch that actually works standalone
08:54marcanin that case I'll have to do it like v4, that's FIQ + VHE + tty
08:55marcando you need me to sign the PR?
08:55arndRemind me what the VHE series is for, is that also required for booting?
08:55marcanit wouldn't be a kernel version ago :-)
08:56mazthe CPUs can't do non-VHE, which is the way Linux boots now.
08:56marcanbut recent changes broke booting on noncompliant VHE-only systems (M1)
08:56rcombs has joined #asahi
08:57marcanmaz is just trying to make this merge as fun as possible for everyone :-)
08:57arndmarcan: please sign the PR with the key that you plan to use in the future, even if that doesn't have any signatures from other developers yet
08:58marcanlet me cook something up then. debating whether to use my "usual" yubikey (if I can associate it sanely to a PGP identity, nominally I've only used it for SSH purposes so far, note: ed25519 keys) or throw an RSA 2k key into a spare I have lying around
08:59mazmarcan: always happy to help.
08:59marcan(jokes aside, going from random drive-patches to ALSA every odd year to upstreaming *this* SoC of all things at *this* time has been quite the crash course in kernel procedures)
09:00tburgin[m] has quit [Quit: Idle for 30+ days]
09:02svenyou should be able to just create a signature-only (S) subkey on that yubikey and sign that with your C pgp parent key. I'd strongly recommend to try that on a separate yubikey before though since I managed to delete a key like that before :D
09:04marcanif I'm going to have a long-term identity for this I probably want a hard offsite backup of that parent key (encrypted etc); I care less about that for SSH keys since I have redundant ones and can always just use one to update the others
09:05marcanbut in principle that should work with the parent key done on-CPU (in an offline computer at least) and then signing the signature-only subkeys I already have, maybe
09:05marcanwill have to test :p
09:05sventhat's what I did a while ago :)
09:06svenbut I didn't read any warnings etc. and overwrote one of my ssh keys on my yubikey
09:06svenworked fine for the second one though
09:09marcanbbiab, need to run to the pharmacy before it closes
09:09marcanI'll wrap this up today after I'm back :)
09:12furkan has joined #asahi
09:13svenmarcan: ah, btw., can I just put the clock gate + i2c stuff under you in the MAINTAINERS file?
09:23furkan has quit [Ping timeout: 240 seconds]
09:25furkan has joined #asahi
09:37ponikrf[m] has joined #asahi
09:37ryanhrob[m] has joined #asahi
09:38wagood[m] has joined #asahi
09:41kharit[m] has joined #asahi
09:44brandas has quit [Remote host closed the connection]
09:45kettenis_marcan: based on the discussion from yesterday I think my immediate goal would be to let m1n1 do some minimal RC port initialization and let u-boot take it from there
09:47kettenis_that means the device tree would contain enough information for linux to bring up pcie if booted directly from m1n1
09:47hothotleg[m] has joined #asahi
09:53kettenis_that doesn't mean m1n1 can't be extended later to fully bring up pcie
10:05arndkettenis_: I suppose this means we don't put a /chosen/linux,pci-probe-only property in the DT, but u-boot may add this to speed up the boot
10:07arndit's slightly annoying to have linux do a complete PCI bus/resource assignment even when the firmware has done it correctly already, but somehow we ended up doing that on most machines
10:13arndmarcan: fwiw, https://www.kernel.org/doc/html/latest/process/maintainer-pgp-guide.html seems to suggest that ed25519 is preferred over rsa2k keys, no need to worry about old pgp versions here
10:27marcankettenis_: right, that's fine; I just wanted to make sure u-boot wouldn't do things the kernel doesn't
10:28furkan has quit [Ping timeout: 252 seconds]
10:29marcanarnd: excellent
10:29furkan has joined #asahi
10:33kettenis_arnd: yes adding a property like that would be easy
10:43brandas has joined #asahi
11:00furkan has quit [Ping timeout: 246 seconds]
11:08furkan has joined #asahi
11:31rjeffman has joined #asahi
11:33jeffmiw_ has joined #asahi
11:35jeffmiw_ has quit [Remote host closed the connection]
11:35jeffmiw_ has joined #asahi
11:53amw has quit [Quit: WeeChat 2.3]
11:59jeffmiw_ has quit [Remote host closed the connection]
12:03amw has joined #asahi
12:38choozy has joined #asahi
12:41luca020400 has quit [Remote host closed the connection]
12:44luca020400 has joined #asahi
12:48luca020400 has quit [Remote host closed the connection]
12:49luca020400 has joined #asahi
13:08jeffmiw_ has joined #asahi
13:12jeffmiw_ has quit [Ping timeout: 260 seconds]
13:39choozy has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
14:00klaus has quit [Ping timeout: 246 seconds]
14:22marcanokay, did the gpg key dance, seems I have a set-up that works
14:24marcanarnd: I can set up a non-github server too if you prefer
14:28marcanplease check that the key is kosher and such; if it looks good I'll sign it with my old less-securely-managed key (for continuity) and if you want we can do a verification over video or something like that
14:29delrothjust post it on twitter /s
14:29marcanI added it to github for starters, so it shows the verified badge :p
14:34arndmarcan: github is fine, but the tag description should be more than one line. You can probably just copy most of the v4 cover-letter text into that
14:34marcanI was going to ask about that
14:34arndI usually also add a Signed-off-by line to a tag, though some others don't
14:35marcanI'll use the cover letter then, add add the minor v5 change notes
14:35arndthe tag description should not contain the '[PATCH v4]' prefix on the subject line
14:35marcanleave vN to the tag name, right?
14:35arndI don't know what the latest is on keeping the change nodes in the tag description. I usually don't do it myself, but I've seen others do it
14:36marcancan also just go in the PR email
14:36arndI don't care about the tag name for the purpose of the pull request, I'd say including v5 in the name makes sense unless it's unchanged from v4
14:36arndgit request-pull just pastes the tag description, so that makes it in there automatically
14:38marcando people prefer https:// or git://?
14:39arndI think there is a slight preference for https://
14:40arndI'm still confused about the nVHE patches, the tag you sent now has these at the bottom after the other two merges. Shouldn't this be a merge commit to get the same commits that make it into the arm64 tree?
14:40arndor do these just go through the soc tree without showing up in the arm64 tree as well?
14:46mazno, they must go via the arm64 tree.
14:46mazneither Will nor Catalin have even Acked the second patch, which is the critical one.
14:56marcanarnd: those were in there for testing purposes, because they weren't in arm64 yet
14:56arndmarcan: ok, got it
14:56marcanso we're blocked on that, but I can get everything else in order
14:57mazmarcan: as you pointed out, that's not really a blocker. these patches can land independently, and nothing breaks compilation wise.
14:57arndmarcan: in this case, it makes sense to start the tag description with '[DONT PULL]' and an explanation
14:58arndmaz: I said earlier that I'd prefer the branch to have all the patches to make it work (not just build) in one piece
14:58arndobviously if we expect that to take longer, that is something we can reconsider
14:59choozy has joined #asahi
14:59arndOr I could merge the rest into a standalone branch, and then merge the VHE patches on top after they make it into the arm64 tree
15:00mazarnd: I don't really see what that buys us. it's not like we're merging a fully working system. At the current state of things, it only gives you a serial console...
15:05arndthe worst case would be someone needing to bisect an m1 specific (boot time, I guess) regression that is caused by something else merged into v5.13. In this case, "someone" most likely ends up being marcan, and he can figure it out regardless ;-)
15:07arndmaz: if we merge the m1 support without the VHE patches, do we still need the FIQ patches to cleanly build, or should marcan drop those as well then?
15:08arndnevermind, I see it's needed to build the aic driver
15:09mazarnd: yup, that's the ugly link in the chain.
15:13arndmarcan: ok, please just drop the VHE patches from the branch, and send that pull to soc@kernel.org with cc to everyone that commented in the past, and explain the situation with all the dependencies in the tag.
15:14arndI'll be busy with the backlog of other pull requests for the rest of my day here, so no need for you to loose sleep over doing it today. If you send it by tomorrow, I'll pull it in right away
15:16arndwe can still debate over whether I should merge in the VHE branch into the soc tree after that makes it into the arm64 tree
15:21brinly has quit [Ping timeout: 260 seconds]
15:24brinly has joined #asahi
16:00Hetflik[m] has quit [Quit: Idle for 30+ days]
16:00mofux[m] has quit [Quit: Idle for 30+ days]
16:10mofux[m] has joined #asahi
17:12modwizcode has joined #asahi
17:18marcanarnd: cool, got it
17:18marcanthanks! :)
17:18marcanmaz: does the #define thing I proposed make sense to change? at least it'll make the real meaning of those hwirqs more evident
17:23VinDuv has joined #asahi
17:24zopieux has quit [Ping timeout: 246 seconds]
17:26zopieux has joined #asahi
17:29omoiti has joined #asahi
17:32vimal has quit [Remote host closed the connection]
18:20yrlf has quit [Quit: The Lounge - https://thelounge.chat]
18:21yrlf has joined #asahi
18:28TheJollyRoger has quit [Remote host closed the connection]
18:28TheJollyRoger has joined #asahi
18:53omoiti has quit [Ping timeout: 240 seconds]
18:59svenugh.. the M1 support 4k pages as well, doesn't it?
19:00svenwill pointed out on the ML that this will be trouble if the iommu only supports 16k pages
19:08sorear has joined #asahi
19:14marcanyeah, it does
19:14marcanwhat about the sub-page stuff in the IOMMU, is that useful?
19:15sveni thought about that, but i'm not sure how. i think it's just a write protect but not 100% yet.
19:16svenhttps://gist.github.com/bazad/1faef1a6fe396b820a43170b43e38be1 i did find this though. there's some iphone that already has the t8020,dart with page-size (4): 0x1000
19:16svenlet's see if it's maybe just a bit somewhere that selects it
19:40kettenis_it means that you're exposing more memory to the device than desirable
19:41kettenis_and may end up having to expose the same set of 4k pages multiple times
19:43kettenis_not sure how linux handles DMA of network packets, but the problem probably already exists in that area when two packets are stored in a single page
19:44kettenis_in other news, there is more evidence that the pcie root ports are based on synopsys designware crap
19:44kettenis_version 5.30a-ea15 to be specific
19:45marcanno big surprise there, considering USB is also designware
19:46marcanI'm really curious about thunderbolt though
19:46marcanhow that ties in
19:46sveni also couldn't really add a mapping from an iova/to a paddr that's not aligned to 16k easily
19:46sventhere's also at least a BUG_ON((granule > PAGE_SIZE) in the linux iommu code which i should hit with 4k cpu pages
19:49svengood news on the pcie root port though :)
19:49svenlet's hope there's even more hw that's a variant of something known
19:50omoiti has joined #asahi
19:58kettenis_sven: I'll probably need a tunables_apply_local() variant that takes an explicit base address
20:00svenah, yeah. i've been meaning to get back to that
20:01svendo you also need one that walks up the ADT or takes a parent node for the "regs" property?
20:01kettenis_if I have one that takes a base address, I can use that
20:02ephe_meral1 has quit [Ping timeout: 240 seconds]
20:02kettenis_I need that base address later on anyway
20:02kettenis_so I'd just call adt_get_reg() on the parent node myself
20:03sventrue. is that base address not based on a reg property at all?
20:03sven(i.e. it's nothing like regs[25] + some_offset?)
20:03kettenis_it is based on a reg property
20:03kettenis_but the reg property is in the parent node
20:04svenah, okay. so it'll be somewhat ugly anyway.
20:04svenmight be more flexible to just have the base address as an argument then
20:05kettenis_not sure what marcan wants to do
20:05kettenis_could just pull what you have now and I add the function I need as part of the pcie setup code
20:06svensounds like we'll either need tunables_apply_local(.., base_addr) or tunables_apply_local(.., "parent-node", parent_reg_idx, addr_offset)
20:07svenor just do that for now :)
20:08kettenis_the first approach would make most sense in my context
20:10arndsven: the dma-mapping API does not guarantee dma_map_sg() to produce a consecutive bus address range even with an IOMMU, so for normal drivers it should be fine even when the iotlb page size is larger than the CPU page size. You still get the isolation and address-expanding properties
20:11svenkettenis_: it also sounds like it's the most flexible to me. the current function could just use that one as well internally so that we don't have to duplicate any code
20:11arndhowever, anything that relies on controlling the iommu from the driver directly will have a problem
20:12arndso no SVA, no vfio, and no probably no GPU with with per-task contexts
20:16svenokay, so at least some thing will work with 4k pages then even if i don't find a way to switch the iommu to 4k pages as well
20:16sven*things
20:16svenstill not great though
20:21luca020400 has quit [Ping timeout: 248 seconds]
20:21arndsven: it also appears that you will hit that BUG_ON() in init_iova_domain() when setting up the domain for the dma-mapping API. I'm fairly sure that it is possible to lift that restriction, but I don't know how invasive the changes will be for that.
20:32odmir has joined #asahi
20:33luca020400 has joined #asahi
20:38luca020400 has quit [Remote host closed the connection]
20:39luca020400 has joined #asahi
20:41luca020400 has quit [Remote host closed the connection]
20:41luca020400 has joined #asahi
20:44luca020400 has quit [Client Quit]
20:44luca020400 has joined #asahi
20:47svenyeah, i'll just remove that BUG_ON tomorrow and see what happens with 4k pages.
20:47jeffmiw_ has joined #asahi
20:47svenbut after that i think i should include at least will in this discussion since he'll likely have a strong opinion how to deal with this situation as well
20:47sven+include
20:48svenkettenis_: just pushed tunables_apply_local_addr(const char *path, const char *prop, uintptr_t base)
20:50luca020400 has quit [Quit: WeeChat 3.1]
20:50luca020400 has joined #asahi
20:51jeffmiw_ has quit [Ping timeout: 260 seconds]
20:52luca020400 has quit [Read error: Connection reset by peer]
20:52luca020400 has joined #asahi
20:52kettenis_sven: thanks, I'll give it a go
20:58arndsven: maybe also loop in Jean-Philippe Brucker <jean-philippe@linaro.org>, he's jbru on #armlinux. Will is wildea01 there, fwiw. I don't know if Robin Murphy is on IRC, but he's the one that added the BUG_ON() when implementing support for multiple i/o page sizes
20:58luca020400 has quit [Quit: WeeChat 3.1]
20:59luca020400 has joined #asahi
21:01luca020400 has quit [Client Quit]
21:01luca020400 has joined #asahi
21:03svenwill do, thanks!
21:03luca020400 has quit [Read error: Connection reset by peer]
21:05luca020400 has joined #asahi
21:06omoiti has quit [Ping timeout: 240 seconds]
21:08luca020400 has quit [Client Quit]
21:08luca020400 has joined #asahi
21:10VinDuv has quit [Quit: Leaving.]
21:12luca020400 has quit [Client Quit]
21:12luca020400 has joined #asahi
21:14luca020400 has quit [Read error: Connection reset by peer]
21:15luca020400 has joined #asahi
21:18luca020400 has quit [Client Quit]
21:18luca020400 has joined #asahi
21:19luca020400 has quit [Client Quit]
21:21luca020400 has joined #asahi
21:22omoiti has joined #asahi
21:38PendulumSwinger7 has joined #asahi
21:41PendulumSwinger has quit [Ping timeout: 268 seconds]
21:41PendulumSwinger7 is now known as PendulumSwinger
21:59choozy has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
22:17furkan has quit [Remote host closed the connection]
22:18omoiti has quit [Ping timeout: 268 seconds]
22:20TheJollyRoger has quit [Remote host closed the connection]
22:20TheJollyRoger has joined #asahi
22:35Bublik_ has quit [Ping timeout: 260 seconds]
22:37Bublik_ has joined #asahi
23:29raster has quit [Quit: Gettin' stinky!]
23:48omoiti has joined #asahi
…