patch-2.4.5 linux/include/asm-ppc/mmu_context.h
Next file: linux/include/asm-ppc/module.h
Previous file: linux/include/asm-ppc/mmu.h
Back to the patch index
Back to the overall index
- Lines: 43
- Date:
Mon May 21 15:02:06 2001
- Orig file:
v2.4.4/linux/include/asm-ppc/mmu_context.h
- Orig date:
Mon Jan 22 15:41:15 2001
diff -u --recursive --new-file v2.4.4/linux/include/asm-ppc/mmu_context.h linux/include/asm-ppc/mmu_context.h
@@ -1,3 +1,6 @@
+/*
+ * BK Id: SCCS/s.mmu_context.h 1.9 05/17/01 18:14:25 cort
+ */
#include <linux/config.h>
#ifdef __KERNEL__
@@ -18,6 +21,12 @@
of any task that makes a kernel entry. Shared does not mean they
are not protected, just that the ASID comparison is not performed.
-- Dan
+
+ The IBM4xx has 256 contexts, so we can just rotate through these
+ as a way of "switching" contexts. If the TID of the TLB is zero,
+ the PID/TID comparison is disabled, so we can use a TID of zero
+ to represent all kernel pages as shared among all contexts.
+ -- Dan
*/
static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk, unsigned cpu)
@@ -26,12 +35,22 @@
#ifdef CONFIG_8xx
#define NO_CONTEXT 16
#define LAST_CONTEXT 15
+#define BASE_CONTEXT (-1)
+#define MUNGE_CONTEXT(n) (n)
+#define flush_hash_segments(X, Y) do { } while (0)
+
+#elif CONFIG_4xx
+#define NO_CONTEXT 256
+#define LAST_CONTEXT 255
+#define BASE_CONTEXT (0)
#define MUNGE_CONTEXT(n) (n)
+#define flush_hash_segments(X, Y) do { } while (0)
#else
/* PPC 6xx, 7xx CPUs */
#define NO_CONTEXT 0
+#define BASE_CONTEXT (0)
#define LAST_CONTEXT 0xfffff
/*
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)