Skip to contentSkip to conversation

alpha update for pte highmem stuff in 2.5.5

PATCH Richard Henderson 1 participant 1 message Feb 22, 2002

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas:
# ChangeSet 1.369.8.3 -> 1.369.8.4
# include/asm-alpha/pgalloc.h 1.6 -> 1.7
# include/asm-alpha/system.h 1.7 -> 1.8
# arch/alpha/kernel/core_irongate.c 1.3 -> 1.4
# include/linux/highmem.h 1.11 -> 1.12
# include/asm-alpha/pgtable.h 1.9 -> 1.10
# arch/alpha/kernel/process.c 1.11 -> 1.12
# arch/alpha/mm/init.c 1.6 -> 1.7
# include/asm-alpha/smp.h 1.5 -> 1.6
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 02/02/21 [email protected] 1.369.8.4
# Update Alpha for Ingo's page tables in highmem patch.
# --------------------------------------------
#

arch/alpha/kernel/core_irongate.c +1 -1
diff -Nru a/arch/alpha/kernel/core_irongate.c b/arch/alpha/kernel/core_irongate.c
@@ -455,7 +455,7 @@
 	if (address >= end)
 		BUG();
 	do {
-		pte_t * pte = pte_alloc(&init_mm, pmd, address);
+		pte_t * pte = pte_alloc_kernel(&init_mm, pmd, address);
 		if (!pte)
 			return -ENOMEM;
 		irongate_remap_area_pte(pte, address, end - address, 
arch/alpha/kernel/process.c +0 -1
diff -Nru a/arch/alpha/kernel/process.c b/arch/alpha/kernel/process.c
@@ -64,7 +64,6 @@
 		while (!need_resched())
 			barrier();
 		schedule();
-		check_pgt_cache();
 	}
 }
 
arch/alpha/mm/init.c +18 -25

72 lines not on this page · raw message

include/asm-alpha/pgalloc.h +34 -89

155 lines not on this page · raw message

include/asm-alpha/pgtable.h +15 -4
diff -Nru a/include/asm-alpha/pgtable.h b/include/asm-alpha/pgtable.h
@@ -248,8 +248,13 @@
 })
 #endif
 
-extern inline unsigned long pmd_page(pmd_t pmd)
-{ return PAGE_OFFSET + ((pmd_val(pmd) & _PFN_MASK) >> (32-PAGE_SHIFT)); }
+extern inline unsigned long
+pmd_page_kernel(pmd_t pmd)
+{
+	return ((pmd_val(pmd) & _PFN_MASK) >> (32-PAGE_SHIFT)) + PAGE_OFFSET;
+}
+
+#define pmd_page(pmd)	(mem_map + ((pmd_val(pmd) & _PFN_MASK) >> 32))
 
 extern inline unsigned long pgd_page(pgd_t pgd)
 { return PAGE_OFFSET + ((pgd_val(pgd) & _PFN_MASK) >> (32-PAGE_SHIFT)); }
@@ -306,10 +311,16 @@
 }
 
 /* Find an entry in the third-level page table.. */
-extern inline pte_t * pte_offset(pmd_t * dir, unsigned long address)
+extern inline pte_t * pte_offset_kernel(pmd_t * dir, unsigned long address)
 {
-	return (pte_t *) pmd_page(*dir) + ((address >> PAGE_SHIFT) & (PTRS_PER_PAGE - 1));
+	return (pte_t *) pmd_page_kernel(*dir)
+		+ ((address >> PAGE_SHIFT) & (PTRS_PER_PAGE - 1));
 }
+
+#define pte_offset_map(dir,addr)	pte_offset_kernel((dir),(addr))
+#define pte_offset_map_nested(dir,addr)	pte_offset_kernel((dir),(addr))
+#define pte_unmap(pte)			do { } while (0)
+#define pte_unmap_nested(pte)		do { } while (0)
 
 extern pgd_t swapper_pg_dir[1024];
 
include/asm-alpha/smp.h +0 -4
diff -Nru a/include/asm-alpha/smp.h b/include/asm-alpha/smp.h
@@ -29,10 +29,6 @@
 	unsigned long last_asn;
 	int need_new_asn;
 	int asn_lock;
-	unsigned long *pgd_cache;
-	unsigned long *pmd_cache;
-	unsigned long *pte_cache;
-	unsigned long pgtable_cache_sz;
 	unsigned long ipi_count;
 	unsigned long irq_attempt[NR_IRQS];
 	unsigned long prof_multiplier;
include/asm-alpha/system.h +1 -0
diff -Nru a/include/asm-alpha/system.h b/include/asm-alpha/system.h
@@ -137,6 +137,7 @@
 	check_mmu_context();						  \
 } while (0)
 
+struct task_struct;
 extern void alpha_switch_to(unsigned long, struct task_struct*);
 
 #define mb() \
include/linux/highmem.h +1 -0
diff -Nru a/include/linux/highmem.h b/include/linux/highmem.h
@@ -4,6 +4,7 @@
 #include <linux/config.h>
 #include <linux/bio.h>
 #include <linux/fs.h>
+#include <asm/pgalloc.h>
 
 #ifdef CONFIG_HIGHMEM