[parisc-linux-cvs] DIFF -pa6 entry.S

Grant Grundler grundler@dsl2.external.hp.com
Tue, 19 Mar 2002 22:11:02 -0700


Grant Grundler wrote:
> 2.4.18-pa6
> enable FB on Pa2.0 machines.
> Fixes missing address bits for page table entries.
> Works on both 32 and 64-bit kernels.
> Thanks to Thomas Bogendoerf for recognizing the problem
> and fixing it for 64-bit kernels.


Index: Makefile
===================================================================
RCS file: /var/cvs/linux/Makefile,v
retrieving revision 1.275
diff -u -p -r1.275 Makefile
--- Makefile	2002/03/07 21:13:11	1.275
+++ Makefile	2002/03/12 20:17:22
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 4
 SUBLEVEL = 18
-EXTRAVERSION = -pa4
+EXTRAVERSION = -pa5
 
 KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
 
Index: arch/parisc/kernel/entry.S
===================================================================
RCS file: /var/cvs/linux/arch/parisc/kernel/entry.S,v
retrieving revision 1.90
diff -u -p -r1.90 entry.S
--- arch/parisc/kernel/entry.S	2002/03/03 23:00:10	1.90
+++ arch/parisc/kernel/entry.S	2002/03/12 20:17:23
@@ -1045,8 +1045,6 @@ dtlb_miss_20w:
 	space_to_prot   spc prot        /* create prot id from space */
 	depd            pte,8,7,prot    /* add in prot bits from pte */
 
-	extrd,u,*=      pte,_PAGE_NO_CACHE_BIT+32,1,r0
-	depdi		1,12,1,prot
 	extrd,u,*=      pte,_PAGE_USER_BIT+32,1,r0
 	depdi		7,11,3,prot   /* Set for user space (1 rsvd for read) */
 	extrd,u,*= 	pte,_PAGE_GATEWAY_BIT+32,1,r0
@@ -1055,7 +1053,7 @@ dtlb_miss_20w:
 	/* Get rid of prot bits and convert to page addr for idtlbt */
 
 	depdi		0,63,12,pte
-	extrd,u         pte,56,32,pte
+	extrd,u         pte,56,52,pte
 	idtlbt          pte,prot
 
 	rfir
@@ -1124,8 +1122,6 @@ nadtlb_miss_20w:
 	space_to_prot   spc prot        /* create prot id from space */
 	depd            pte,8,7,prot    /* add in prot bits from pte */
 
-	extrd,u,*=      pte,_PAGE_NO_CACHE_BIT+32,1,r0
-	depdi		1,12,1,prot
 	extrd,u,*=      pte,_PAGE_USER_BIT+32,1,r0
 	depdi		7,11,3,prot   /* Set for user space (1 rsvd for read) */
 	extrd,u,*= 	pte,_PAGE_GATEWAY_BIT+32,1,r0
@@ -1134,7 +1130,7 @@ nadtlb_miss_20w:
 	/* Get rid of prot bits and convert to page addr for idtlbt */
 
 	depdi		0,63,12,pte
-	extrd,u         pte,56,32,pte
+	extrd,u         pte,56,52,pte
 	idtlbt          pte,prot
 
 	rfir
@@ -1151,7 +1147,7 @@ nadtlb_check_flush_20w:
 	/* Get rid of prot bits and convert to page addr for idtlbt */
 
 	depdi		0,63,12,pte
-	extrd,u         pte,56,32,pte
+	extrd,u         pte,56,52,pte
 	idtlbt          pte,prot
 
 	rfir
@@ -1356,8 +1352,13 @@ dtlb_miss_20:
 
 	/* Get rid of prot bits and convert to page addr for idtlbt */
 
-	depdi		0,63,12,pte
-	extrd,u		pte,56,25,pte
+	/* FIXME - sign extension of 0xf0... range is incorrect!
+	** extrd,s below needs to "f-extend" to "0xf0f0f0...".
+	** 4 instances of this to fix.
+	*/
+
+	depdi		0,63,12,pte	/* clear lower 12 bits */
+	extrd,s		pte,56,25,pte	/* bit 31:8 >> 8  */ 
 	idtlbt          pte,prot
 
 	rfir
@@ -1423,8 +1424,8 @@ nadtlb_miss_20:
 
 	/* Get rid of prot bits and convert to page addr for idtlbt */
 
-	depdi		0,63,12,pte
-	extrd,u		pte,56,25,pte
+	depdi		0,63,12,pte	/* clear lower 12 bits */
+	extrd,s		pte,56,25,pte	/* bit 31:8 >> 8  */ 
 	idtlbt          pte,prot
 
 	rfir
@@ -1673,8 +1674,8 @@ itlb_miss_common_20:
 
 	/* Get rid of prot bits and convert to page addr for iitlbt */
 
-	depdi		0,63,12,pte
-	extrd,u		pte,56,25,pte
+	depdi		0,63,12,pte	/* clear lower 12 bits */
+	extrd,s		pte,56,25,pte	/* bit 31:8 >> 8  */ 
 	iitlbt          pte,prot
 
 	rfir
@@ -1743,8 +1744,6 @@ dbit_nolock_20w:
 	space_to_prot   spc prot        /* create prot id from space */
 	depd            pte,8,7,prot    /* add in prot bits from pte */
 
-	extrd,u,*=      pte,_PAGE_NO_CACHE_BIT+32,1,r0
-	depdi		1,12,1,prot
 	extrd,u,*=      pte,_PAGE_USER_BIT+32,1,r0
 	depdi		7,11,3,prot   /* Set for user space (1 rsvd for read) */
 	extrd,u,*= 	pte,_PAGE_GATEWAY_BIT+32,1,r0
@@ -1753,7 +1752,7 @@ dbit_nolock_20w:
 	/* Get rid of prot bits and convert to page addr for idtlbt */
 
 	depdi		0,63,12,pte
-	extrd,u         pte,56,32,pte
+	extrd,u         pte,56,52,pte
 	idtlbt          pte,prot
 #ifdef CONFIG_SMP
 	CMPIB=,n        0,spc,dbit_nounlock_20w
@@ -1892,8 +1891,8 @@ dbit_nolock_20:
 
 	/* Get rid of prot bits and convert to page addr for idtlbt */
 
-	depdi		0,63,12,pte
-	extrd,u		pte,56,25,pte
+	depdi		0,63,12,pte	/* clear lower 12 bits */
+	extrd,s		pte,56,25,pte	/* bit 31:8 >> 8  */ 
 	idtlbt          pte,prot
 #ifdef CONFIG_SMP
 	CMPIB=,n        0,spc,dbit_nounlock_20