From: NIIBE Y. <gn...@m1...> - 2001-12-20 02:55:13
|
Here's a patch to implement non-cached mmap. 2001-12-20 Takashi Yoshii <yos...@hi...> * include/asm-sh/pgtable.h (pgprot_noncached): Defined and implemented. Index: include/asm-sh/pgtable.h =================================================================== RCS file: /cvsroot/linuxsh/linux/include/asm-sh/pgtable.h,v retrieving revision 1.2 diff -u -3 -p -r1.2 pgtable.h --- include/asm-sh/pgtable.h 2001/12/03 22:15:35 1.2 +++ include/asm-sh/pgtable.h 2001/12/20 02:51:09 @@ -237,6 +237,19 @@ static inline pte_t pte_mkyoung(pte_t pt static inline pte_t pte_mkwrite(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) | _PAGE_RW)); return pte; } /* + * Macro and implementation to make a page protection as uncachable. + */ +#define pgprot_noncached pgprot_noncached + +static inline pgprot_t pgprot_noncached(pgprot_t _prot) +{ + unsigned long prot = pgprot_val(_prot); + + prot &= ~_PAGE_CACHABLE; + return __pgprot(prot); +} + +/* * Conversion functions: convert a page and protection to a page entry, * and a page entry and page directory to the page they refer to. * -- |