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.

Samuel


Reply via email to