Page protection flags in linux on an x86 platform
Folks,
I am trying to port some PPC code to x86 based linux. My question is that I am need to create some page mappings using remap_pfn_range. In the code for the PPC, the protection flags being specified are:
__pgprot(_PAGE_NO_CACHE | _PAGE_GUARDED);
But it looks like these do not exist when linux is compiled for the x86 architecture.
What are the relevant protection flags to achieve the same for the x86 architecture.
Thanks for your help.
- Vinay
Quoted 4 lines · Vinay Venkataraghavan
I am trying to port some PPC code to x86 based linux. My question is that I am need to create some page mappings using
remap_pfn_range. In the code for the PPC, the protection flags being specified are:
__pgprot(_PAGE_NO_CACHE | _PAGE_GUARDED);
To make your code portable, use pgprot_noncached(), which works on all architectures.
Arnd <><