introduce two APIs for page attribute

Introduce two APIs for page attribute. flushing tlb/cache in every page
attribute is expensive. AGP gart usually will do a lot of operations to
change a page to uc, new APIs can reduce flush.

Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Cc: airlied@linux.ie
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Arjan van de Ven <arjan@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
Shaohua Li
2008-08-04 14:51:24 +08:00
committed by Ingo Molnar
parent 012f09e794
commit 1ac2f7d55b
2 changed files with 53 additions and 8 deletions

View File

@ -57,6 +57,8 @@ int _set_memory_uc(unsigned long addr, int numpages);
int _set_memory_wc(unsigned long addr, int numpages);
int _set_memory_wb(unsigned long addr, int numpages);
int set_memory_uc(unsigned long addr, int numpages);
int set_memory_uc_noflush(unsigned long addr, int numpages);
void set_memory_flush_all(void);
int set_memory_wc(unsigned long addr, int numpages);
int set_memory_wb(unsigned long addr, int numpages);
int set_memory_x(unsigned long addr, int numpages);
@ -87,6 +89,7 @@ int set_memory_4k(unsigned long addr, int numpages);
*/
int set_pages_uc(struct page *page, int numpages);
int set_pages_uc_noflush(struct page *page, int numpages);
int set_pages_wb(struct page *page, int numpages);
int set_pages_x(struct page *page, int numpages);
int set_pages_nx(struct page *page, int numpages);