tech-kern archive

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

Re: pmap nocache



>Christoph Egger wrote:
>>
>>Andrew Doran wrote:
>>> On Thu, Apr 16, 2009 at 10:53:20PM +0200, Christoph Egger wrote:
>>>
>>>> Attached x86_nocache.diff removes the TLB flush
>>>> when mapping dma-safe memory.
>>>>
>>>> Attached pmap_md.diff adds a PMAP_MD_MASK.
>>>> For x86 PAT feature you need six MD PMAP types.
>>>>
>>>> Comments?
>>>
>>> Looks good to me, thanks for doing this - that bit of code has
>>> caused me a lot of headaches recently.
>>
>>Committed.
http://mail-index.netbsd.org/source-changes/2009/04/18/msg220025.html

>>
>>> IIRC bus_space does something similar but uses pmap_kenter_pa().
>>
>>You're asking for attached patch? :)
>>
>>> I think it would be worthwhile adding a flags argument to handle it.
>>
>>I'm (ab)using the prot argument for this. Either we add a flags
>> argument or we change change the type of the prot argument.
>>
>>Christoph
>
>I think we should add a flags argument instead.
>
>christos


This patch introduces the flag argument to pmap_kenter_pa(9):

http://www.netbsd.org/~cegger/pmap_kenter.diff


This patch implements the new flag for x86 and makes bus_space use of it:

http://www.netbsd.org/~cegger/busspace_nocache.diff


First patch has been (cross-)compile tested on 30 kernels.
Second patch has been run-tested on i386 and amd64.

Comments?

Christoph


Home | Main Index | Thread Index | Old Index