*** tpb <[email protected]> has joined #openrisc | 00:00 | |
shorne | arnd: I tested setting IO_SPACE_LIMIT to zero, it seems to work, but looking at generated code I see ioport_map() will now always return zero | 06:48 |
---|---|---|
arnd | yes, that is expected | 06:48 |
shorne | which looks to be because of: port &= IO_SPACE_LIMIT; | 06:48 |
arnd | anything calling this function should check for NULL return and either fail or return an error | 06:49 |
arnd | or have an alternative I mean | 06:49 |
shorne | I don't use any drivers that do: ioport_map(), but wou;dnt that cause issues?... | 06:49 |
arnd | if IO_SPACE_LIMIT is set to 0, that means no I/O ports are supported, so you can only use hardware built in the last two decades | 06:50 |
shorne | it seems I will not use any of those devices that do use ioport_map, so maybe its ok | 06:50 |
shorne | if thats what you were expecting then, I got it :) | 06:50 |
arnd | I had a look at the device emulation in qemu the other day, to see if anything in there actually requires I/O ports | 06:50 |
arnd | the main user is the PCI-ISA bridge on x86 PCs that is used to attach legacy PC devices like keyboard controller, floppy, soundblaster etc | 06:51 |
arnd | the only one that you would likely see on a new architecture is the VGA display | 06:51 |
shorne | I don't think so, I just grepped the kernel source for usages of ioport_map, I don't see any drivers I would be using. There is nothing that I recognized that would be in qemu | 06:52 |
shorne | I think its safe | 06:52 |
arnd | and I think VGA can use either PIO or MMIO access, so you are still fine, or you just use a more modern graphical output | 06:52 |
shorne | alright cool, just wanted to sync up with you on that | 06:53 |
arnd | Niklas Schnelle was working on a series to add Kconfig dependencies to all device drivers that require PIO, so those can be left out from an allmodconfig build on s390 | 06:53 |
arnd | that is actually the best case I think, because nobody should care about most of those drivers, and the few drivers that people do care about should all have a fallback and work either way | 06:54 |
arnd | we still try hard to keep PIO working on ARM to avoid regressions, but I always have a bad feeling about it because it just causes more problems that it's worth | 06:55 |
shorne | yeah, and it causes confusion for new platforms I am sure thinking they need to support it | 06:57 |
shorne | I see riscv adopted it | 06:57 |
arnd | right, I think the main advantage is that implementing PIO avoids the compile-time warnings that Niklas is trying to avoid on s390 | 07:26 |
arnd | in particular, clang correctly points out that an access to I/O ports turns into a NULL pointer dereference on s390, gcc currently doesn't notice this | 07:27 |
arnd | s390 has no way of supporting PIO in in their PCI host bridge hardware, so it would be silly to add it there | 07:28 |
arnd | an earlier patch from Niklas tried to just turn the accesses into nops, but torvalds didn't like that and said we should just disable those drivers | 07:28 |
shorne | I see, Ill start looking at those patches, its interesting | 07:29 |
shorne | I found it, reading, also there are some news articles too | 07:34 |
shorne | reading... it says co-developed by you | 07:35 |
shorne | I wonder if it makes sense for "younger" architectures like riscv, microblaze to remove their support for ioports | 07:37 |
shorne | arnd: One other question, I don't think I need to define PCI_IOBASE, if I am not using PIO do I? I am looking through how the kernel uses it and it seems all related to PIO only | 08:15 |
shorne | I have left it defined as 0, and things seems to work fine | 08:15 |
arnd | right, if you have IO_SPACE_LIMIT set to zero, PCI_IOBASE does not matter | 08:16 |
shorne | thanks for confirming, thats what it looked like, it makes things simiple | 08:17 |
shorne | Now I just need to think better resource allocation in the virt platform | 08:17 |
shorne | but thats all controlled via device tree | 08:18 |
*** littlebobeep <littlebobeep!~alMalsamo@gateway/tor-sasl/almalsamo> has joined #openrisc | 15:49 | |
*** littlebobeep <littlebobeep!~alMalsamo@gateway/tor-sasl/almalsamo> has quit IRC (Remote host closed the connection) | 15:50 | |
*** littlebobeep <littlebobeep!~alMalsamo@gateway/tor-sasl/almalsamo> has joined #openrisc | 15:54 | |
*** shorne <[email protected]> has quit IRC (Read error: Connection reset by peer) | 16:39 | |
*** shorne <[email protected]> has joined #openrisc | 16:45 | |
*** littlebobeep <littlebobeep!~alMalsamo@gateway/tor-sasl/almalsamo> has quit IRC (Ping timeout: 268 seconds) | 17:00 |
Generated by irclog2html.py 2.17.2 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!