#
…

2021-02-23

00:02brandas has joined #asahi
00:07tomtastic has quit [Ping timeout: 256 seconds]
00:11tomtastic has joined #asahi
00:50inglor has quit [Remote host closed the connection]
00:51inglor has joined #asahi
01:02amw has joined #asahi
01:09crabbedhaloablut has quit [Ping timeout: 272 seconds]
01:14crabbedhaloablut has joined #asahi
01:39choozy has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
01:48_whitelogger has joined #asahi
02:27xarkes has quit [Ping timeout: 256 seconds]
02:49xarkes has joined #asahi
03:06Tokamak has quit [Remote host closed the connection]
03:07Tokamak has joined #asahi
03:09Tokamak_ has joined #asahi
03:12Tokamak has quit [Ping timeout: 264 seconds]
03:13yrlf has quit [Quit: Ping timeout (120 seconds)]
03:13yrlf has joined #asahi
03:27DarthCloud has quit [Ping timeout: 268 seconds]
03:38DarthCloud has joined #asahi
04:01PhilippvK has quit [Ping timeout: 240 seconds]
04:02phiologe has joined #asahi
04:04nicolas17 has quit [Ping timeout: 240 seconds]
04:43Tokamak_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
04:45marvin24 has quit [Ping timeout: 240 seconds]
04:45marvin24 has joined #asahi
04:52Tokamak has joined #asahi
04:57odmir_ has quit [Remote host closed the connection]
05:32BaughnLogBot has quit [Ping timeout: 272 seconds]
05:32BaughnLogBot_ has joined #asahi
05:33BaughnLogBot_ is now known as BaughnLogBot
05:42Tokamak has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
06:34VinDuv has joined #asahi
06:36Necrosporus has quit [Ping timeout: 264 seconds]
06:49VinDuv has quit [Quit: Leaving.]
07:16maor26 has joined #asahi
07:49Necrosporus has joined #asahi
08:02amw has quit [Ping timeout: 240 seconds]
08:42raster has joined #asahi
08:54ephe_meral has joined #asahi
08:54maor has joined #asahi
08:55maor26 has quit [Ping timeout: 260 seconds]
09:00erenatas[m] has quit [Quit: Idle for 30+ days]
09:00the_darkfire_[m] has quit [Quit: Idle for 30+ days]
09:25the-mentor has quit [Quit: Ping timeout (120 seconds)]
09:26the-mentor has joined #asahi
09:26thestr4ng3r has quit [Quit: ZNC 1.8.1 - https://znc.in]
09:27thestr4ng3r has joined #asahi
09:48Necrosporus is now known as Guest69869
09:48Guest69869 has quit [Killed (tepper.freenode.net (Nickname regained by services))]
09:48Necrosporus has joined #asahi
09:55klaus has joined #asahi
09:56marcanarnd: how did the draft go over with the other folks?
09:57arndmarcan: I didn't really get any replies
09:58marcanthat must clearly mean it's perfect :)
10:00arndI wonder if the ioremap_np() description should be rephrased to explain under which conditions it is safe to rely on writes being non-posted, rather than just warning that it might not be
10:00marcanit's basically platform-specific, since even on arm64 platforms where nGnRnE is used I bet there are fabrics and buses that break it..
10:01marcando you want specific examples, or what do you have in mind?
10:02arndright, but if we document it along the lines of the new IORESOURCE flag, it could be phrased to explain that the flag can be set by platforms to indicate that it is safe to rely on them being nonposted
10:02arndthat would even make it portable to architectures on which all on-chip I/O is nonposted by definition, so a portable driver can simply check the flag and either fall back to inserting dummy reads or refuse the probe when it is absent
10:03marcanI'm not even sure how true that is... in principle, we don't know for a fact that some sub-bus on the M1 doesn't break this, and thus requires nGnRnE due to the top-level fabric but then doesn't *actually* implemented non-posted semantics
10:03marcanI mean, I hope not, but if that were the case the flag would not mean that any more
10:06marcanconversely, platforms which *support* but do not *require* nE semantics need not set that flag, but drivers may still want to use _np if it is known to work
10:17arndmarcan: About other platforms, my thinking was that the DT flag could be used to make the behavior portable. Clearly a driver can just ask for a NP mapping regardless of the resource type and still work correctly, but that would be a non-portable driver if it relies it the stores being non-posted
10:20arndFor the apple platform, I would expect that none of the internal I/O is posted, and this is likely true for many other SoCs. I can try to find what the AXI and AHB specs say about it
10:31arndmarcan: the AXI3 and AXI4 buses have a 'bufferable' flag in a write transaction that determines whether it's posted or not
10:33marcanarnd: ah, it gets carried around with the transaction?
10:34marcanso the thing is, the DT flag asks the standard APIs to always use nonposted mode
10:35marcanbut most drivers don't *need* nonposted mode, and using it could decrease performance on platforms that have posted mode
10:36marcanso we kind of have two situations to signal; "nonposted mode available and works", and "nonposted mode required"
10:36marcanright now the flag means the latter
10:50bisko has joined #asahi
11:12ephe_meral has quit [Ping timeout: 240 seconds]
11:26mndza has joined #asahi
11:32plainbits has joined #asahi
11:45klaus has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
11:50robinp has joined #asahi
11:54robinp_ has quit [Ping timeout: 268 seconds]
11:57klaus has joined #asahi
12:56mndza has quit []
12:57mndza has joined #asahi
13:06arndmarcan: indeed, the two are incompatible, if we treat the dt property as "required" as it has to be on the mac, then it wouldn't be an opt-out for drivers
13:08marcanwhich is why I push people towards the abstractions that do the right thing
13:08ephe_meral has joined #asahi
13:09marcanarnd: this makes me wonder if we shouldn't make the default ioremap_np not an alias for ioremap, but rather return NULL a la ioremap_uc
13:10marcanthat could even be the "ioremap_np exists" signal; drivers can just try that, and fall back to ioremap
13:10marcanthen every arm64 driver is allowed to use it (and if we have problems with SoCs where nE accesses are not truly nE, that's broken-SoC-needs-a-quirk territory and we can worry about it when we get there, if anyone ever does this)
13:11arndthat would probably be architecture specific again, depending on how the default ioremap areas behave
13:13marcanwhat do you mean?
13:13arndI mean an architecture on which every MMIO write is non-posted can implement ioremap_np() as an alias for ioremap(), while another architecture on which MMIO writes are posted would return NULL
13:14marcanbut that makes sense, no?
13:15arndI think it makes sense, but it's still a bit unclear what should happen on PCIe, where every mmio write is posted regardless of the flag
13:15marcanI was going to mention adding a sentence to that effect ("don't use this for PCIe drivers, ever")
13:18odmir has joined #asahi
13:19marcanif you think this approach works I can give a shot at editing it in the doc
13:24arndyes, please do
13:27arndit's unfortunate how the rules for both ioremap_wc and ioremap_np() depend on the resource flags and on the bus type (pci vs local), but in different ways
13:30marcanarnd: doc updated
13:30odmir has quit [Remote host closed the connection]
13:36arndmarcan: I clarified the ioremap_np() PCI portion to say that this is about memory space (as I/O space is also non-posted), and rephrased last paragraph for ioremap_wc
13:37marcanyup, sounds good
13:38plainbits has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
13:39marcanarnd: think it's good enough to throw into a patch and discuss it on the lists?
13:40arndtwo more things: I'm trying to fit the IORESOURCE_MEM_NONPOSTED flag into the ioremap_np() description, and I'd want to make sure that it compiles into html/pdf form from rst
13:41marcanyeah, I'll do the rst check
13:41marcandon't worry too much about formatting, I'll double check that
13:42zkrx has quit [Ping timeout: 272 seconds]
13:43arndIn Documentation/core-api/timekeeping.rst, I used "c:function::" annotations for the function prototypes, which may be good here as well, but is a lot to type for the dozens of mmio accessors
13:44marcanI can do that if you want, but I kind of worry about readability of the .rst version
13:45jn__now that there's automatic detection for function() syntax in rst, is there still a reason for c:function::?
13:45jn__(it was added not too many kernel releases ago, AFAIK)
13:47arndah, that is probably easier then, it must have come after I last looked at it
13:56snalty has quit [Read error: Connection reset by peer]
13:57zkrx has joined #asahi
13:57snalty has joined #asahi
13:58marcanturns out this was all done before, but never merged that way
14:04marcanlooks like this got dropped in favor of a one-off for pci config spaces
14:04marcanbut returning NULL was already proposed as a better option for arches without support
14:06marcanthere were strong opinions that silent downgrade to ioremap() is a bad idea
14:08marcanarnd: yeah I think what we've ended up with doesn't really go against the discussion back then
14:08marcanso we're probably good
14:17KindOne has quit [Excess Flood]
14:18KindOne has joined #asahi
14:44plainbits has joined #asahi
15:12jaXvi has quit [Ping timeout: 256 seconds]
15:47tmbinc has quit [Quit: WeeChat 2.4]
16:17marcanhonestly, I can't figure out from the ARM ARM how dmb affects ordering between Normal accesses and Device accesses
16:17choozy has joined #asahi
16:22arndmarcan: that might be something only wildea01 fully understands
16:23marcanI'm just going to punt and have a dsb for now then (as I already did in v2)
16:23marcanI have fancier rationale for the stuff between normal memory accesses and atomics
16:23marcanbut once AIC gets involved it's going to be a mb() (or wmb())
16:28odmir has joined #asahi
16:36ephe_meral has quit [Ping timeout: 240 seconds]
16:41hrnz has joined #asahi
16:59nicolas17 has joined #asahi
17:07mndza has quit [Read error: Connection reset by peer]
17:08mndza has joined #asahi
17:42eeeeeta has quit [Quit: we're here, we're queer, connection reset by peer]
17:50nicolas17 has quit [Ping timeout: 264 seconds]
17:50plainbits has quit [Quit: Textual IRC Client: www.textualapp.com]
17:56Tokamak has joined #asahi
18:06odmir has quit [Remote host closed the connection]
18:10VinDuv has joined #asahi
18:11mndza has quit []
18:18nicolas17 has joined #asahi
18:22ky0ko has quit [Ping timeout: 265 seconds]
18:38Tokamak has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
18:41Tokamak has joined #asahi
19:00bisko_ has joined #asahi
19:00jn__(as the Power ISA books say: Old McDonald had a farm, Enforce In-order Execution of I/O)
19:02bisko has quit [Ping timeout: 240 seconds]
19:43ephe_meral has joined #asahi
19:51ky0ko has joined #asahi
19:56KindTwo has joined #asahi
19:58KindOne has quit [Ping timeout: 256 seconds]
19:58KindTwo is now known as KindOne
20:11x56 has quit [Ping timeout: 246 seconds]
20:13x56 has joined #asahi
20:38raster has quit [Remote host closed the connection]
20:48Tokamak_ has joined #asahi
20:51Tokamak has quit [Ping timeout: 246 seconds]
21:03Tokamak_ has quit [Read error: Connection reset by peer]
21:08Tokamak has joined #asahi
21:09Tokamak has quit [Read error: Connection reset by peer]
21:09Tokamak has joined #asahi
21:12rann has quit [Ping timeout: 264 seconds]
21:13Tokamak has quit [Read error: Connection reset by peer]
21:14rann has joined #asahi
21:15tomhv has joined #asahi
21:17Tokamak has joined #asahi
21:17ephe_meral has quit [Ping timeout: 240 seconds]
21:23Tokamak has quit [Read error: Connection reset by peer]
21:23maor26 has joined #asahi
21:24maor has quit [Ping timeout: 240 seconds]
21:25Tokamak has joined #asahi
21:26Tokamak has quit [Read error: Connection reset by peer]
21:27Tokamak has joined #asahi
21:28Tokamak_ has joined #asahi
21:31odmir has joined #asahi
21:31Tokamak has quit [Ping timeout: 246 seconds]
21:44Tokamak has joined #asahi
21:45Tokamak_ has quit [Ping timeout: 240 seconds]
21:49Tokamak has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
21:57VinDuv has quit [Quit: Leaving.]
22:29amw has joined #asahi
22:33Tokamak has joined #asahi
22:46ulaas has quit [*.net *.split]
22:46vafanlignarde has quit [*.net *.split]
22:46dottedmag has quit [*.net *.split]
22:46porkbone has quit [*.net *.split]
22:46zarvox has quit [*.net *.split]
22:48dottedmag has joined #asahi
22:48vafanlignarde has joined #asahi
22:48ulaas has joined #asahi
22:48porkbone has joined #asahi
22:48zarvox has joined #asahi
22:49prusnak has quit [Ping timeout: 264 seconds]
22:50prusnak has joined #asahi
22:51Tokamak has quit [Read error: Connection reset by peer]
22:52Tokamak has joined #asahi
22:53Tokamak has quit [Read error: Connection reset by peer]
22:54Tokamak has joined #asahi
22:55tomhv has quit [Ping timeout: 260 seconds]
23:07brandas has quit [Quit: quit]
23:43xarkes has quit [Ping timeout: 246 seconds]
23:58maor26 has quit [Ping timeout: 240 seconds]
…