I re-worked the patch. This time it uses fixmap; I added config parameters to disable this code and to handle non-default base address. Unless generic solution for auto detection found, it seems appropriate way to go. Autodetection problem isolated in 2 places: is_pcie_platform and, while it is not do real auto detection, configuration option for custom base. Vladimir. Linus Torvalds wrote: >On Mon, 15 Dec 2003, Vladimir Kondratiev wrote: > > >>There is alternative solution, for each transaction to ioremap/unmap >>corresponded page. >> >> > >Nope, you can't do that. It's not really supported from interrupts and >early boot - both of which will want to access PCI config space. > > > >>I don't like it, it involves huge overhead. >> >> > >Indeed it would. But using fixmaps does _not_. > >But a fixmap will be easy to use, and reasonable efficient: it will >allocate just one virtual page, and then it will force a TLB flush when it >switches over the mapping. > >You can improve the efficiency by caching the "last fixmap entry" and only >doing "set_fixmap()" when changing devices. > >You could also do a per-cpu fixmap, which would help further, but that >ends up being more work too. Probably not worth it, especially as it is >entirely possible that the hardware requires single-threaded access >anyway (ie I would not be surprised at all if the southbridge got very >confused if you tried to do overlapping config accesses).. > > Linus > >