[Top][All Lists]

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

Re: cache coherency in DMA and MMIO

From: Samuel Thibault
Subject: Re: cache coherency in DMA and MMIO
Date: Fri, 23 Apr 2010 13:37:48 +0200
User-agent: Mutt/1.5.12-2006-07-14

Da Zheng, le Fri 23 Apr 2010 14:51:22 +0800, a écrit :
> They are not just one or two variables. They are an array of structure
> variables. Should I define all fields of the structure with volatile 
> qualifier?

You can qualify the whole structure

> It's strange. The Linux driver doesn't do so but it definitely works in the
> Linux kernel.

It does (or should do): such pointers have the __io qualifier.

> I use the mem device to allocate MMIO space. I guess INTEL_PTE_NCACHE and
> INTEL_PTE_WTHRU haven't been set to the MMIO pages, right?

Depends on how you use the mem device. It it ends up using pmap_enter()
to actually fill the page table, it will notice whether your physical
addresses are within RAM or above, see the code there.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]