Re: pmap nocache

View: New views
5 Messages — Rating Filter:   Alert me  

Re: pmap nocache

by Christoph Egger :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


>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

Re: pmap nocache

by Martin Husemann :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Wed, Nov 04, 2009 at 09:57:46AM +0100, Christoph Egger wrote:
> This patch introduces the flag argument to pmap_kenter_pa(9):
>
> http://www.netbsd.org/~cegger/pmap_kenter.diff

Where is the pmap(9) change?

Martin

Re: pmap nocache

by Christoph Egger :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


> On Wed, Nov 04, 2009 at 09:57:46AM +0100, Christoph Egger wrote:
> > This patch introduces the flag argument to pmap_kenter_pa(9):
> >
> > http://www.netbsd.org/~cegger/pmap_kenter.diff
>
> Where is the pmap(9) change?

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

Christoph

Re: pmap nocache

by Martin Husemann :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Wed, Nov 04, 2009 at 11:51:41AM +0100, Christoph Egger wrote:
> http://www.netbsd.org/~cegger/pmap9.diff

That is a bit vague - as a pmap author I wouldn't know what to do with prot
and flags and how they interact, nor what values I should expect as flags.

Martin

Re: pmap nocache

by Christoph Egger :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message




> On Wed, Nov 04, 2009 at 11:51:41AM +0100, Christoph Egger wrote:
> > http://www.netbsd.org/~cegger/pmap9.diff
>
> That is a bit vague - as a pmap author I wouldn't know what to do
> with prot and flags and how they interact, nor what values I
> should expect as flags.

Updated (reload).

The description for the prot argument is copied from
pmap_enter().
I documented PMAP_NOCACHE for both pmap_enter and pma_kenter_pa.

Christoph