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()

> The plan E is OK, but it makes code duplication and the [code] won't
> be simple.  To make code simple,

How does it lead to code duplication?

Also, it seems to me correctness has higher priority tha simplicity.
And plan A

>>  A) modify pci_mapreg_map().  Stop setting
>>  BUS_SPACE_MAP_PREFETCHABLE by defalut when prefetchable bit is set.
>>  If a driver really know[s] 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[s]
>>  for both the 4th argument and the prefetchable bit, it sets
>>  BUS_SPACE_MAP_PREFETCHABLE only when both bits are set.

doesn't sound correct to me, in view of the devices mentioned upthread
that actually are prefetchable but which don't set the prefetchable BAR
bit: they won't get prefetch under plan A.

/~\ The ASCII				  Mouse
\ / Ribbon Campaign
 X  Against HTML
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B

Home | Main Index | Thread Index | Old Index