[PATCH] highmem fixes

From: Anton Blanchard (anton@linuxcare.com)
Date: Sun Jul 30 2000 - 21:22:40 EST


Hi,

Two things:

- We forget to flush the cache before unmapping highmem pages.
- We should use set_pte.

These were found while adding highmem support for sparc32.

Anton

diff -r -u --new-file --exclude-from=exclude linux/mm/highmem.c linux_highmem/mm/highmem.c
--- linux/mm/highmem.c Fri Jul 28 10:41:30 2000
+++ linux_highmem/mm/highmem.c Sun Jul 30 04:06:17 2000
@@ -119,6 +119,8 @@
 {
         int i;
 
+ flush_cache_all();
+
         for (i = 0; i < LAST_PKMAP; i++) {
                 struct page *page;
                 pte_t pte;
@@ -182,7 +184,7 @@
                 }
         }
         vaddr = PKMAP_ADDR(last_pkmap_nr);
- pkmap_page_table[last_pkmap_nr] = mk_pte(page, kmap_prot);
+ set_pte(&(pkmap_page_table[last_pkmap_nr]), mk_pte(page, kmap_prot));
 
         pkmap_count[last_pkmap_nr] = 1;
         page->virtual = vaddr;

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Jul 31 2000 - 21:00:32 EST