patch-2.4.21 linux-2.4.21/include/asm-ppc64/mmu.h

Next file: linux-2.4.21/include/asm-ppc64/mmu_context.h
Previous file: linux-2.4.21/include/asm-ppc64/memory.h
Back to the patch index
Back to the overall index

diff -urN linux-2.4.20/include/asm-ppc64/mmu.h linux-2.4.21/include/asm-ppc64/mmu.h
@@ -168,17 +168,23 @@
 #define PP_RWRW 2	/* Supervisor read/write, User read/write */
 #define PP_RXRX 3	/* Supervisor read,       User read */
 
-
 typedef struct {
 	HPTE *		htab;
 	unsigned long	htab_num_ptegs;
 	unsigned long	htab_hash_mask;
 	unsigned long	next_round_robin;
 	unsigned long   last_kernel_address;
+	unsigned long   htab_lock_shift;
 } HTAB;
 
 extern HTAB htab_data;
 
+#include <linux/cache.h>
+#include <asm/spinlock.h>
+typedef struct {
+	spinlock_t lock;
+} ____cacheline_aligned hash_table_lock_t;
+
 void invalidate_hpte( unsigned long slot );
 long select_hpte_slot( unsigned long vpn );
 void create_valid_hpte( unsigned long slot, unsigned long vpn,
@@ -227,12 +233,18 @@
 		asm volatile("clrldi	%0,%0,16\n\
 			      tlbie	%0,0" : : "r"(va) : "memory");
 	}
-
 	asm volatile("eieio; tlbsync; ptesync": : :"memory");
 }
  
 #endif /* __ASSEMBLY__ */
 
+/*
+ * Location of cpu0's segment table
+ */
+#define STAB0_PAGE	0x9
+#define STAB0_PHYS_ADDR	(STAB0_PAGE<<PAGE_SHIFT)
+#define STAB0_VIRT_ADDR	(KERNELBASE+STAB0_PHYS_ADDR)
+
 /* Block size masks */
 #define BL_128K	0x000
 #define BL_256K 0x001

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)