Inter-revision diff: patch 3

Comparing v1 (message) to v9 (message)

--- v1
+++ v9
@@ -1,20 +1,21 @@
 From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
 
 This patch simplify hpte_decode for easy switching of virtual address to
-vsid and segment offset combination in the later patch
+virtual page number in the later patch
 
+Reviewed-by: Paul Mackerras <paulus@samba.org>
 Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
 ---
- arch/powerpc/mm/hash_native_64.c |   51 ++++++++++++++++++++++----------------
- 1 file changed, 30 insertions(+), 21 deletions(-)
+ arch/powerpc/mm/hash_native_64.c |   49 ++++++++++++++++++++++----------------
+ 1 file changed, 28 insertions(+), 21 deletions(-)
 
 diff --git a/arch/powerpc/mm/hash_native_64.c b/arch/powerpc/mm/hash_native_64.c
-index cab3892..76c2574 100644
+index 90039bc..660b8bb 100644
 --- a/arch/powerpc/mm/hash_native_64.c
 +++ b/arch/powerpc/mm/hash_native_64.c
-@@ -357,9 +357,10 @@ static void native_hpte_invalidate(unsigned long slot, struct virt_addr va,
+@@ -351,9 +351,10 @@ static void native_hpte_invalidate(unsigned long slot, unsigned long va,
  static void hpte_decode(struct hash_pte *hpte, unsigned long slot,
- 			int *psize, int *ssize, struct virt_addr *va)
+ 			int *psize, int *ssize, unsigned long *va)
  {
 +	unsigned long avpn, pteg, vpi;
  	unsigned long hpte_r = hpte->r;
@@ -24,7 +25,7 @@
  	int i, size, shift, penc;
  
  	if (!(hpte_v & HPTE_V_LARGE))
-@@ -386,32 +387,40 @@ static void hpte_decode(struct hash_pte *hpte, unsigned long slot,
+@@ -380,32 +381,38 @@ static void hpte_decode(struct hash_pte *hpte, unsigned long slot,
  	}
  
  	/* This works for all page sizes, and for 256M and 1T segments */
@@ -59,7 +60,7 @@
 +			vpi = (vsid ^ pteg) & htab_hash_mask;
 +			seg_off |= vpi << shift;
 +		}
-+		va->addr = vsid << 28 | seg_off;
++		*va = vsid << SID_SHIFT | seg_off;
 +	case MMU_SEGSIZE_1T:
 +		/* We only have 40 - 23 bits of seg_off in avpn */
 +		seg_off = (avpn & 0x1ffff) << 23;
@@ -72,14 +73,12 @@
 +			seg_off |= vpi << shift;
  		}
 -		avpn |= (vpi << mmu_psize_defs[size].shift);
-+		va->addr = vsid << 40 | seg_off;
++		*va = vsid << SID_SHIFT_1T | seg_off;
 +	default:
-+		seg_off = 0;
-+		vsid    = 0;
-+		va->addr = 0;
++		*va = size = 0;
  	}
 -
--	va->addr = avpn;
+-	*va = avpn;
  	*psize = size;
 -	*ssize = hpte_v >> HPTE_V_SSIZE_SHIFT;
  }
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help