Re: [PATCH] x86: create array based interface to change page attribute

Thomas Hellström
2008-04-08T06:13:40Z

Arjan van de Ven wrote:
> Thomas Hellström wrote:
>> Ouch, so we'll be needing an ioremap_wc(), I guess. We probably
>> shouldn't use the linear kernel map for this anyway, since that would
>> require a chipset flush for each ring commit. We can actually use
>> vmap() with a wc page protection for that, but an ioremap_wc() would
>> certainly save us a lot of trouble.
>
> please don't use vmap() as a hack for mapping IO memory when you
> should use ioremap_wc()....
I think you've misinterpreted. We must use vmap() if we need to map the
cpu side of the aperture, (real pages) and ioremap() if we map the
device side, which is io memory. Some devices accept both, but what I
was saying was we should try to avoid the vmap() alternative, since it,
like using the kernel mapping directly, requires a chipset flush after
update.
> Lets get this thing right rather than finding whichever hack of the day
> happens to work with the implementation from yesterday.
/Thomas