2022-03-20
00:27phire has quit [Server closed connection]
00:27phire has joined #asahi-dev
00:32amw has quit [Server closed connection]
00:32amw has joined #asahi-dev
00:35_whitelogger has joined #asahi-dev
00:41rikkaa has joined #asahi-dev
00:59arekm has quit [Remote host closed the connection]
00:59arekm has joined #asahi-dev
01:03chadmed has joined #asahi-dev
01:12m6wiq has quit []
01:42aratuk has joined #asahi-dev
01:42aratuk has quit []
02:05robinp_ has joined #asahi-dev
02:07robinp_ is now known as robinp
02:52riker77_ has joined #asahi-dev
02:57riker77 has quit [Ping timeout: 480 seconds]
02:57riker77_ is now known as riker77
03:13PhilippvK has joined #asahi-dev
03:17phiologe has quit [Ping timeout: 480 seconds]
03:27kov has quit [Quit: Coyote finally caught me]
03:27kov has joined #asahi-dev
03:37nicolas17 has quit [Ping timeout: 480 seconds]
03:48swampertx[m] has joined #asahi-dev
03:55kylealanhale has joined #asahi-dev
04:10kylealanhale has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
04:26Dcow[m]1oh, here the stupid question... (full message at https://matrix.org/_matrix/media/r0/download/matrix.org/zDLaHuckJQgFngahFnqemhOQ)
04:31M0x8FF[m]0x8FF: Did you make sure your wifi firmware loaded? Mine did not on the first boot after install
05:18PermissionDenied[m] has joined #asahi-dev
05:21winter has quit [Quit: The Lounge - https://thelounge.chat]
05:22winter has joined #asahi-dev
05:48kameks has joined #asahi-dev
06:24doggkrusehas anyone actually built chromium natively on asahi? the aarch64 native build chain is quite broken
06:26Glanzmanndoggkruse: A few people did. I think tpw_rules did: See here: https://pbot.rmdir.de/Gnwc4Q-j3TAXCFyAaYnugA
06:37r0ni has quit [Quit: Textual IRC Client: www.textualapp.com]
06:46kameks has quit [Ping timeout: 480 seconds]
07:11doggkruse has quit [Quit: Konversation terminated!]
07:13doggkruse has joined #asahi-dev
07:17the_lanetly_052 has joined #asahi-dev
07:28doggkruse has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
07:52aycippo[m] has joined #asahi-dev
08:01the_lanetly_052 has quit [Ping timeout: 480 seconds]
08:25kylealanhale has joined #asahi-dev
08:45riker77 has quit [Quit: Quitting IRC - gone for good...]
08:53sventhe kernel bot started screaming at me after I fixed that compile test makefile thing so I’ll have to check what I need to fix there
08:56MajorBiscuit has joined #asahi-dev
09:01riker77 has joined #asahi-dev
09:11rikkaa has quit [Quit: Connection closed for inactivity]
09:51the_lanetly_052 has joined #asahi-dev
09:58kameks has joined #asahi-dev
10:17Ry_Darcy_ has joined #asahi-dev
10:29Ry_Darcy_ has quit [Remote host closed the connection]
10:30svenj`ey: let's see if the bot is happier with this https://github.com/AsahiLinux/linux/commits/nvme-rfc. just need to finish the cover letter now
10:32sveni still don't understand why that lock is required. and i can't even reproduce the errors without that lock on my mini :/
10:35rikkaa has joined #asahi-dev
10:39PaterTemporalis has joined #asahi-dev
10:48m6wiq has joined #asahi-dev
10:56ExeciN[m] has joined #asahi-dev
11:09mazsven: I wonder if dma_wmb() properly orders things on this system. it expends as dmb(oshst), while the spin_lock() would have be an acquire in the IS domain.
11:10mazon its own, this lock doesn't provide much guarantee, but that's all I can think of to explain its (possible) effect.
11:14svenso the weird thing that all I should need at that point is the guarantee that the memcpy before is visible to the nvme controller. that writel there writes to a hardware FIFO anyway that should be large enough
11:15svenand without the lock on some machines the command still executes just fine (so the nvme controller saw it) but never generates a completion interrupt
11:17mazcan the nvme controller execute things without the writel() being issued if it was already processing commands?
11:19mazso it could be that you are actually using the release effect of the unlock, forcing the write to be made visible to the controller.
11:21mazif you have an affected system at hand, I'd replace the lock/unlock with a dmb right after the writel(), just to see...
11:22sveni'm also not sure I completely understand. what do I want to order against with an additional dmb after the writel?
11:23Axe has joined #asahi-dev
11:24mazyou want to order the writel and whatever comes after it. my hunch is that although you have ordered the write to memory with the subsequent writel(), the writel() itself can be moved far down the line as there is nothing to 'make it happen now'.
11:25mazthe unlock has *some* effects on that by only allowing sunsequen writes to be hoisted up into the lock, but the write itself is guaranteed tto be visible after the unlock.
11:27svenohh.. okay. let me think what the consequences would be if the writel happens far down the line
11:27PaterTemporalis has quit [Ping timeout: 480 seconds]
11:29kloenk has quit [Remote host closed the connection]
11:30Axe has quit [Remote host closed the connection]
11:32svenhrm, not sure there are any. I just submit a command there and then just wait until the controller puts it to the completion queue and fires an interrupt. i don't even care if the controller only sees the write seconds later.
11:33sveniirc the bug was then that the command appeard on the completion queue but no interrupt was triggered. it was only picked up after the 30 second timeout by polling that queue.
11:34mazthat's odd. if the lock solves anything, it has to be ordering, because this doesn't protect anything.
11:35svenmy other guess was that it was some kind of race condition and the lock just made it unlikely to lose that race
11:36sven(race condition as in "you can't submit a command when you do X with the nvme controller at the same time")
11:37svenbut then again, I can't reproduce this on my M1 at all. maybe it's just something strange that only happens on the Max/Pro
11:45chadmedim soooo tempted to flog off this j314s and buy a mac studio instead but i really need a machine i can haul to the lab :(
11:52sventhat would be great! can you first try to just revert https://github.com/AsahiLinux/linux/commit/af81cf607423e842a6a0146e8cd35cbaf6aab178 on the asahi branch and see if nvme still works?
12:24kameks has quit [Ping timeout: 480 seconds]
12:25Glanzmannsven: Regarding the lock, I can reproduce it every time with that kernel config https://tg.st/u/config-2022-03-09-16k and run 'find / &> /dev/null'
12:27kylealanhale has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
12:29Glanzmannsven: If you want I build the kernel with the spinlock removed and try to reproduce it.
12:30svenwould be interesting to see if it still happens when running under the m1n1 hv and trace_nvme.py
12:30Jamie[m]1update: not booting the new kernel, I think mkinitcpio disagrees with linux on what the modules directory should be called -_-
12:31svenwaaait…. maybe I could never reproduce it because I’m always running under the hv these daya
12:31Glanzmannj`ey: No. But if sven wants to be able to reproduce the issue **without** the lock, than I can give him a setup where he can do so.
12:32Glanzmannsven: I was running a full blown desktop. X started up but shortly after I lost all disk I/O.
12:33Glanzmannsven: Should I try to reproduce on the mini and give you remote access or detailed instructions?
12:35Jamie[m]1sven: giving up for today, I don't understand arch's kernel/initramfs infrastructure and gotta sleep
12:37svenGlanzmann: can you try what happens when you have no spinlock but add a readl(q->sq_db); just after the writel(tag, q->sq_db);?
12:49darkapex1 has joined #asahi-dev
12:51darkapex has quit [Ping timeout: 480 seconds]
12:52chadmed has quit [Ping timeout: 480 seconds]
13:03darkapex2 has joined #asahi-dev
13:04BitcoinCandyWarrior has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
13:04darkapex1 has quit [Ping timeout: 480 seconds]
13:04BitcoinCandyWarrior has joined #asahi-dev
13:10darkapex2 is now known as darkapex
13:10BitcoinCandyWarrior has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
13:11BitcoinCandyWarrior has joined #asahi-dev
13:12Glanzmannsven: I never waited before that long, but it seems also to recover by itself: https://pbot.rmdir.de/AcIMdgAWlZpigSsaTO7Wpg
13:13Glanzmannsven: I applied this patch to reproduce the issue, that was correct? https://tg.st/u/0001-try-to-reproduce-svens-regression.patch
13:15Glanzmannsven: Like that? https://tg.st/u/0001-13-37-sven-Glanzmann-can-you-try-what-happens-when-y.patch
13:20Glanzmannsven: https://pbot.rmdir.de/2jHVuMZk7D53MclAh1nqvA https://pbot.rmdir.de/4ItThxDkjkkdvjUN68lkOg
13:22Glanzmannsven: Like that I assume? tg.st/u/0001-13-37-sven-Glanzmann-can-you-try-what-happens-when-y.patch (press ctrl-r)
13:24qiuren[m] has joined #asahi-dev
13:26Glanzmannsven: Can't reproduce with readl_relaxed: https://pbot.rmdir.de/PF0qr6JfJv1X1sT7UPUk3A
13:27svenmaz: ^-- looks like you were correct, it's somehow ordering related. i'm still as confused as before though.
13:27BitcoinCandyWarrior has quit [Ping timeout: 480 seconds]
13:28Glanzmannsven / max: That means the cpu pipelining is reordering the instructions and issues the trigger before the data is there?
13:29svenno, the writel should ensure that the memcpy is visible to the device. the readl_relaxed afterwards just ensures that the writel is visible
13:32Glanzmannsven: If we ever want to reproduce the issue, I put the script I used to reproduce it, here: https://tg.st/u/99989368b0df7bbaaa65816ff9f0715cbed53883a93ba65153069e7c4f89fce7_bootstrap.sh
13:32Glanzmannj`ey: So should I stay with the readl_relaxed and ping axboe if we get more iops now? :-)
13:33svenyeah, readl_relaxed should be much cheaper than disabling irqs locally. but i doubt we get more iops
13:36the_lanetly_052 has quit [Ping timeout: 480 seconds]
13:37Glanzmannsven: IIRC we had 11000 iops, now i only get avg=9734.91, but maybe I'm misrembering. Let me try my wifes laptop without the the patch.
13:44jannausven: judging by tracing dcpext/dispext are just dcp/disp instances which are not configured by iboot
13:47Glanzmannsven: I just put my old kernel back and tried to reboot, guess what happened: https://tg.st/u/IMG_20220320_144608609_HDR.jpg that was with the readl_relaxed.
13:48Glanzmannsven: And that was after I run find multiple times, did two fio runs, installed a new kernel ...
13:49JasonAntwi-Appah[m] has joined #asahi-dev
14:06m6wiq1 has joined #asahi-dev
14:08m6wiq has quit [Read error: Connection reset by peer]
14:18m6wiq1 has quit [Remote host closed the connection]
14:22justeinkemp[m] has joined #asahi-dev
14:24skipwich has quit [Quit: DISCONNECT]
14:25skipwich has joined #asahi-dev
14:47MajorBiscuit has quit [Ping timeout: 480 seconds]
14:51rikkaa has quit [Quit: Connection closed for inactivity]
15:06j`eyI have this weird u-boot thing when usin the hv, if I hit esc to stop auto boot, and then just hit enter, I always get 'Unknown command 'ry 'help''
15:26kloenk has joined #asahi-dev
15:33brstream[m] has joined #asahi-dev
15:40marcanI think there's some issues with the vUART in general, Linux loses characters if I paste too fast
16:41cadawerum1[m] has joined #asahi-dev
16:48svenand then there are some missing pokes that macOS does to bring up what it calls “dpphy” but they are obvious from a hv trace
16:48svenwhat I started with was literally the output of macOS debug serial + the MMIO trace copy and pasted into the driver :D
16:53marcanjannau: it should be 95% identical, I'm just wondering if there's a callback or two that could be added/removed
16:56AdwyzzOLEDEdition[m] is now known as AdryzzOLEDEdition[m]
17:02kylealanhale has joined #asahi-dev
17:07doggkruse has joined #asahi-dev
17:23nicolas17 has joined #asahi-dev
17:27jannaudart-dcpext is locked and has 2 premapped regions, starting at 0 and the same size as dart-dcp
17:40alyssa has joined #asahi-dev
17:41alyssa(And then when I agree, we'll change the headers and marcan will stop boycotting the patches :-p)
17:44alyssaI, Alyssa Anne Rosenzweig, domiciled at [redacted], Ontario, hereby license my DCP driver as the "MIT" license used by other Asahi Linux kernel drivers.
17:49jannauthere's modeset bug resulting in 1 swap every 2 seconds or so and I'm not sure what we want to do about "HACK: increase vblank wait timeout"
17:49marcanand also just in general I might want to look at locked dart and have opinions on that :p
18:04jannaualyssa: I push m1n1 (branch dcp) and linux (branch asahi-dcp) which work for me right now
18:06jannauas in right now, I think it's just rebases onto newer asahi upstream commits but it is the state currently working for me
18:09jannaum1 imac but except for the higher resolution I haven't seen a difference between mini and imac
18:10ore has joined #asahi-dev
18:11meenmachine has joined #asahi-dev
18:11alyssasMar 20 18:08:17 rootfs kernel: [ 3.552461] apple-dcp 231c00000.dcp: error (____ptrval____): Failed to boot RTKit: -62
18:11MikaB[m] has joined #asahi-dev
18:11alyssaMar 20 18:08:17 rootfs kernel: [ 3.554447] apple-dcp: probe of 231c00000.dcp failed with error 307044352
18:15alyssa(Even with DRM_APPLE=n, simplefb doesn't work -- DART reserved mappings aren't working properly)
18:17meenmachine has quit [Read error: Connection reset by peer]
18:18jannauI would have expected 'apple-dart 231304000.iommu: reserved region: IOVA [mem 0x013fc000-0x0bd07fff] PA [mem 0x9da4f0000-0x9e4dfbfff]', not sure which log level though
18:24jannaualyssa: you can check if the reserved mem regions are ing the dtb with 'dtc -I fs -O dts -o - /proc/device-tree | grep -A 50 reserved-memory'
18:27m6wiq has joined #asahi-dev
18:46meenmachine has joined #asahi-dev
18:48King_InuYasha has joined #asahi-dev
18:56yuyichao_ has joined #asahi-dev
18:57meenmachine has quit [Quit: Textual IRC Client: www.textualapp.com]
18:57yuyichao has quit [Read error: Connection reset by peer]
18:57meenmachine has joined #asahi-dev
19:25jannausven: atc-WIP fails for me with 'dwc3 382280000.usb: failed to reinitialize core' when booted with usb device connected. both bare metal and HV
19:34jannau"new SuperSpeed Plus Gen 2x1" after replugging, boot still fails with "failed to reinitialize core"
19:43svenphy-apple-atc 383000000.phy: tunables and/or fuses not available; only USB2 will be supported
19:47meenmachine has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
19:49svenhttps://github.com/AsahiLinux/linux/commit/edd8b87e1973b03d2a8ae654018e6a01cd1cc03e#diff-4ec98212264a78f99613cc50412966b95ae4f37367bcc01ce9d14fdfec19573fR1072 that should be -ENOENT
19:51doggkruse has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
19:53doggkruse has joined #asahi-dev
19:57jannau"tunables and/or fuses not available" is gone, otherwise unchanged behavior. Is it expected that it takes 5 seconds before the device is attached?
19:57sveni noticed it took a while but i assumed that was mostly because dwc3 has to recreate everything
19:58m6wiq has quit []
19:59svenhuh, it's actually ~5 seconds before it even says "new superspeed device". that seems wrong.
20:01svenmaybe some of those missing pokes are required to make that part faster. i don't think there's any sleep(4.8s) anywhere in the code
20:09doggkruse has quit [Ping timeout: 480 seconds]
20:09sveni'll take a closer look tomorrow but it sounds like something with the usb role switch hack goes wrong
20:13m6wiq has joined #asahi-dev
20:23kylealanhale has quit [Quit: Textual IRC Client: www.textualapp.com]
20:32PaterTemporalis has joined #asahi-dev
20:38chengsun has quit [Quit: Quit]
20:38chengsun has joined #asahi-dev
20:38m6wiq has quit []
20:42meenmachine has joined #asahi-dev
21:14trouter has quit [Quit: ZNC 1.8.2 - https://znc.in]
21:16trouter has joined #asahi-dev
21:20m6wiq has joined #asahi-dev
21:42meenmachine has quit [Read error: Connection reset by peer]
21:54m6wiq has quit []
21:58LuEvers[m]marcan: just out of interest: where does pacstrap take the url from?
22:04pphilipss has joined #asahi-dev
22:11sirn has quit [Server closed connection]
22:11sirn has joined #asahi-dev
22:23shenki has quit [Server closed connection]
22:23shenki has joined #asahi-dev
22:27abrasive has quit [Server closed connection]
22:28abrasive has joined #asahi-dev
22:34phire has quit [Server closed connection]
22:34phire has joined #asahi-dev
22:40robinp has quit [Server closed connection]
22:40robinp has joined #asahi-dev
22:41winteris that an issue since it's not using the Bunny mirror? weren't those at the bottom as fallbacks anyways?
22:44chengsun has quit [Quit: Quit]
22:44chengsun has joined #asahi-dev
22:57di1[m] has joined #asahi-dev
23:00yrlf has quit [Quit: The Lounge - https://thelounge.chat]
23:01yrlf has joined #asahi-dev