tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: PCI BAR's prefetchable bit and pci_mapreg_map()



Hello,

On Wed, 22 Mar 2017 16:35:21 +0900
Masanobu SAITOH <msaitoh%execsw.org@localhost> wrote:

>   So what should we do?
> 
>   A) modify pci_mapreg_map(). Stop setting BUS_SPACE_MAP_PREFETCHABLE
>      by defalut when prefetchable bit is set. If a driver really know
>      the whole area of the BAR is prefetchable, set BUS_SPACE_MAP_PREFETCHABLE
>      in the 4th argument(busflags) of pci_mapreg_map(). pci_mapreg_map()
>      check for both the 4th argument and the prefetchable bit, it sets
>      BUS_SPACE_MAP_PREFETCHABLE only when both bits are set.
...
> I prefer A.

So do I. As you said, not many video drivers use pci_mapreg_map() and
the ones that do can be trivially modified. The driver should decide if
it wants write combining or similar.

have fun
Michael


Home | Main Index | Thread Index | Old Index