#asahi-dev · 2022-03-21 16:13
mazsven: just don't post it as "RFC". that's an awesome incentive for people to ignore patches. also, the merge window isn't the best time to post these things...#asahi-dev · 2022-03-21 10:01
mazsven: if anything, please put a comment close to the lock being taken on submission. it really is the sort of thing someone eventually will eventually try and remove.#asahi-dev · 2022-03-21 08:59
mazTBH, I can perfectly see how such a bug would occur if I was to write the firmware side of this. #asahi-dev · 2022-03-21 08:39
mazbut the interrupt only cares about the completion queue, right? what this avoids is concurrent writes of the SQ and CQ. maybe this is just working around a HW/FQ bug...#asahi-dev · 2022-03-21 08:22
mazis there a FIFO status that tells you whether it is safe to queue something?#asahi-dev · 2022-03-21 08:21
mazthen it would mean that this writes races against something else and is somehow lost?#asahi-dev · 2022-03-21 08:10
mazit'd be worth trying a full fat dma_mb() (which translates into dmb osh), and see if that sticks. but without understanding how that can ionfluence the rest of the stack, it's hard to reason about it.#asahi-dev · 2022-03-21 08:09
mazright, but the writel()/readl_relaxed() could still be reordered as a pair (they can't be reordered between themselves -- same address, but the pair could be reordered wrt the rest of the code).#asahi-dev · 2022-03-21 08:04
mazsven: catching up: what's the latest on the nvme lock thingy?#asahi-dev · 2022-03-20 11:48
mazis busy building a *second* serial adapter...#asahi-dev · 2022-03-20 11:40
mazI'd offer my Studio, but I have to wait for another couple of months...#asahi-dev · 2022-03-20 11:39
mazguess we need someone with an expensive laptop willing to experiment... :-/#asahi-dev · 2022-03-20 11:37
mazhas anyone tried reading back from the FIFO instead of the lock?#asahi-dev · 2022-03-20 11:34
mazthat's odd. if the lock solves anything, it has to be ordering, because this doesn't protect anything.#asahi-dev · 2022-03-20 11:25
mazthe 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.#asahi-dev · 2022-03-20 11:24
mazyou 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'.#asahi-dev · 2022-03-20 11:21
mazif you have an affected system at hand, I'd replace the lock/unlock with a dmb right after the writel(), just to see...#asahi-dev · 2022-03-20 11:19
maz(well, not really forcing, but actually providing ordering)#asahi-dev · 2022-03-20 11:19
mazso it could be that you are actually using the release effect of the unlock, forcing the write to be made visible to the controller.#asahi-dev · 2022-03-20 11:17
mazcan the nvme controller execute things without the writel() being issued if it was already processing commands?#asahi-dev · 2022-03-20 11:10
mazon its own, this lock doesn't provide much guarantee, but that's all I can think of to explain its (possible) effect.#asahi-dev · 2022-03-20 11:09
mazsven: 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.#asahi-dev · 2022-03-17 14:12
mazI already deal with Android, so I'm done when it comes to Linux forks.#asahi-dev · 2022-03-17 14:06
mazalso, how much of that is reproducible with upstream?#asahi-dev · 2022-03-17 14:03
mazwell, it's not supposed to be removable. I'm missing a suppresss_bind somewhere, clearly.#asahi-dev · 2022-03-17 14:02
mazthat, no.#asahi-dev · 2022-03-17 14:01
mazmarcan: yup.#asahi-dev · 2022-03-17 14:01
mazmarcan: I have never seen USB or Ethernet not coming up on mine. but I only run upstream.#asahi-dev · 2022-03-17 14:00
mazkettenis: without knowing whether they tag their BHB (or equivalent structure) by context, it is really hard to know.#asahi-dev · 2022-03-15 17:17
mazmarcan: let be rephrase that: PCIe over a long, thin wire.#asahi-dev · 2022-03-15 17:16
maz(nobody needs a display, everyone needs a bunch of PCIe cards).#asahi-dev · 2022-03-15 17:15
mazsven: TB. you know you want it.#asahi-dev · 2022-03-14 10:27
mazshould have been Ethernet from the very start! :D#asahi-dev · 2022-03-14 09:00
mazyup, definitely. SYS_ID_AA64ISAR2_EL1 strikes again (it killed QEMU on HVF as well)#asahi-dev · 2022-03-14 08:25
mazj`ey: it usually is, but in this case, I stand by it! ;-)#asahi-dev · 2022-03-14 08:22
mazj`ey: when do you get this crash? is that bare metal or under m1n1 as a HV?#asahi-dev · 2022-03-11 17:49
mazjannau: I'm debugging something else ATM, I'll try to have a look later.#asahi-dev · 2022-03-11 17:28
mazjannau: so we leave the port in the state it was left by the FW?#asahi-dev · 2022-03-11 16:32
mazbut yeah, the port does exist on the HW, and we should just mark it as disabled.#asahi-dev · 2022-03-11 16:31
mazjannau: I'm not sure I get what you changed exactly. we should be able to handle having less ports being described, but it could be that there is a driver bug using the number of ports#asahi-dev · 2022-03-11 16:02
mazthe perf tool is not exactly friendly with this sort of setups.#asahi-dev · 2022-03-11 16:02
mazmarcan: that's how we deal with big.little. one PMU per CPU type.#asahi-dev · 2022-03-11 09:26
mazmarcan: I've merged the series, please check the conflict resolution#asahi-dev · 2022-03-10 15:17
mazrobher: btw, if you could look at marcan's AICv2 series, I need an Ack from you on the binding patch (at least).#asahi-dev · 2022-03-10 14:55
maz(will trade an mcbin for... anything)#asahi-dev · 2022-03-10 14:55
mazit's totally unmaintainable. but at the same time, nobody maintains this platform.#asahi-dev · 2022-03-10 14:32
mazas long as it doesn't look like the Armada 80x0 stuff...#asahi-dev · 2022-03-08 17:09
mazthanks