Subject: Re: modify the cache-inhibit and guard bits from userspace?

From: Arnd Bergmann <[email-masked]>
Date: Tue, 15 Nov 2005 23:38:53 +0100

Am Dienstag 15 November 2005 22:16 schrieb Christopher Friesen:
> What's the most logical way for me to do this? =A0Do I extend mprotect()
> to support additional flags?
>
> Has anyone done this before? =A0I didn't find anything in google.
> Currently the guard bit seems to only be used for ioremap() and in
> __pci_mmap_set_pgprot() if the memory doesn't support write combining.

I have seen an earlier patch that modifies madvise to do this, which seems
a little saner than mprotect, although they can probably both be implemented
in a similar way.

Alternatively, you could write a new file system similar to hugetlbfs and s=
et=20
the cache-inhibit bit in its mmap function.

	Arnd <><