lkml.org 
[lkml]   [2008]   [Jan]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] [5/36] CPA: Implement change_page_attr_addr entry point for i386
Date

Similar to 64bit.

Needed by PAT patches. Replaces 5ec5c5a2302ca8794da03f8bedec931a2a814ae9

Note: should probably be put before PAT patches to avoid bisect failures later

Signed-off-by: Andi Kleen <ak@suse.de>

---
arch/x86/mm/pageattr_32.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
Index: linux/arch/x86/mm/pageattr_32.c
===================================================================
--- linux.orig/arch/x86/mm/pageattr_32.c
+++ linux/arch/x86/mm/pageattr_32.c
@@ -233,6 +233,21 @@ int change_page_attr(struct page *page,
return err;
}

+int change_page_attr_addr(unsigned long addr, int numpages, pgprot_t prot)
+{
+ int i;
+ unsigned long pfn = (addr >> PAGE_SHIFT);
+ for (i = 0; i < numpages; i++) {
+ if (!pfn_valid(pfn + i)) {
+ break;
+ } else {
+ pte_t *pte = lookup_address(addr + i*PAGE_SIZE);
+ BUG_ON(pte && !pte_none(*pte));
+ }
+ }
+ return change_page_attr(virt_to_page(addr), i, prot);
+}
+
void global_flush_tlb(void)
{
struct list_head l;

\
 
 \ /
  Last update: 2008-01-16 23:19    [W:0.475 / U:0.204 seconds]
©2003-2014 Jasper Spaans. Advertise on this site