aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/mm
diff options
context:
space:
mode:
authorBecky Bruce <becky.bruce@freescale.com>2008-09-03 11:37:53 -0400
committerPaul Mackerras <paulus@samba.org>2008-09-15 14:08:42 -0400
commitaaf4a9b0f78786e6915077cbbb1d6f4fb6a8ee0b (patch)
tree521bc9b99e7bbc235cba4a0179324f60a5986cd6 /arch/powerpc/mm
parentce400c0102d8e1367266115ce6bc22333e5e3da6 (diff)
powerpc: Rename PTE_SIZE to HPTE_SIZE
It's the size of the hardware PTE; make that clear in the name. Signed-off-by: Becky Bruce <becky.bruce@freescale.com> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/mm')
-rw-r--r--arch/powerpc/mm/hash_low_32.S36
1 files changed, 18 insertions, 18 deletions
diff --git a/arch/powerpc/mm/hash_low_32.S b/arch/powerpc/mm/hash_low_32.S
index b9ba7d930801..c41d658176ac 100644
--- a/arch/powerpc/mm/hash_low_32.S
+++ b/arch/powerpc/mm/hash_low_32.S
@@ -285,7 +285,7 @@ Hash_bits = 12 /* e.g. 256kB hash table */
285Hash_msk = (((1 << Hash_bits) - 1) * 64) 285Hash_msk = (((1 << Hash_bits) - 1) * 64)
286 286
287/* defines for the PTE format for 32-bit PPCs */ 287/* defines for the PTE format for 32-bit PPCs */
288#define PTE_SIZE 8 288#define HPTE_SIZE 8
289#define PTEG_SIZE 64 289#define PTEG_SIZE 64
290#define LG_PTEG_SIZE 6 290#define LG_PTEG_SIZE 6
291#define LDPTEu lwzu 291#define LDPTEu lwzu
@@ -342,8 +342,8 @@ _GLOBAL(hash_page_patch_A)
342 342
343 /* Search the primary PTEG for a PTE whose 1st (d)word matches r5 */ 343 /* Search the primary PTEG for a PTE whose 1st (d)word matches r5 */
344 mtctr r0 344 mtctr r0
345 addi r4,r3,-PTE_SIZE 345 addi r4,r3,-HPTE_SIZE
3461: LDPTEu r6,PTE_SIZE(r4) /* get next PTE */ 3461: LDPTEu r6,HPTE_SIZE(r4) /* get next PTE */
347 CMPPTE 0,r6,r5 347 CMPPTE 0,r6,r5
348 bdnzf 2,1b /* loop while ctr != 0 && !cr0.eq */ 348 bdnzf 2,1b /* loop while ctr != 0 && !cr0.eq */
349 beq+ found_slot 349 beq+ found_slot
@@ -353,9 +353,9 @@ _GLOBAL(hash_page_patch_A)
353_GLOBAL(hash_page_patch_B) 353_GLOBAL(hash_page_patch_B)
354 xoris r4,r3,Hash_msk>>16 /* compute secondary hash */ 354 xoris r4,r3,Hash_msk>>16 /* compute secondary hash */
355 xori r4,r4,(-PTEG_SIZE & 0xffff) 355 xori r4,r4,(-PTEG_SIZE & 0xffff)
356 addi r4,r4,-PTE_SIZE 356 addi r4,r4,-HPTE_SIZE
357 mtctr r0 357 mtctr r0
3582: LDPTEu r6,PTE_SIZE(r4) 3582: LDPTEu r6,HPTE_SIZE(r4)
359 CMPPTE 0,r6,r5 359 CMPPTE 0,r6,r5
360 bdnzf 2,2b 360 bdnzf 2,2b
361 beq+ found_slot 361 beq+ found_slot
@@ -363,8 +363,8 @@ _GLOBAL(hash_page_patch_B)
363 363
364 /* Search the primary PTEG for an empty slot */ 364 /* Search the primary PTEG for an empty slot */
36510: mtctr r0 36510: mtctr r0
366 addi r4,r3,-PTE_SIZE /* search primary PTEG */ 366 addi r4,r3,-HPTE_SIZE /* search primary PTEG */
3671: LDPTEu r6,PTE_SIZE(r4) /* get next PTE */ 3671: LDPTEu r6,HPTE_SIZE(r4) /* get next PTE */
368 TST_V(r6) /* test valid bit */ 368 TST_V(r6) /* test valid bit */
369 bdnzf 2,1b /* loop while ctr != 0 && !cr0.eq */ 369 bdnzf 2,1b /* loop while ctr != 0 && !cr0.eq */
370 beq+ found_empty 370 beq+ found_empty
@@ -380,9 +380,9 @@ _GLOBAL(hash_page_patch_B)
380_GLOBAL(hash_page_patch_C) 380_GLOBAL(hash_page_patch_C)
381 xoris r4,r3,Hash_msk>>16 /* compute secondary hash */ 381 xoris r4,r3,Hash_msk>>16 /* compute secondary hash */
382 xori r4,r4,(-PTEG_SIZE & 0xffff) 382 xori r4,r4,(-PTEG_SIZE & 0xffff)
383 addi r4,r4,-PTE_SIZE 383 addi r4,r4,-HPTE_SIZE
384 mtctr r0 384 mtctr r0
3852: LDPTEu r6,PTE_SIZE(r4) 3852: LDPTEu r6,HPTE_SIZE(r4)
386 TST_V(r6) 386 TST_V(r6)
387 bdnzf 2,2b 387 bdnzf 2,2b
388 beq+ found_empty 388 beq+ found_empty
@@ -409,11 +409,11 @@ _GLOBAL(hash_page_patch_C)
409 409
4101: addis r4,r7,next_slot@ha /* get next evict slot */ 4101: addis r4,r7,next_slot@ha /* get next evict slot */
411 lwz r6,next_slot@l(r4) 411 lwz r6,next_slot@l(r4)
412 addi r6,r6,PTE_SIZE /* search for candidate */ 412 addi r6,r6,HPTE_SIZE /* search for candidate */
413 andi. r6,r6,7*PTE_SIZE 413 andi. r6,r6,7*HPTE_SIZE
414 stw r6,next_slot@l(r4) 414 stw r6,next_slot@l(r4)
415 add r4,r3,r6 415 add r4,r3,r6
416 LDPTE r0,PTE_SIZE/2(r4) /* get PTE second word */ 416 LDPTE r0,HPTE_SIZE/2(r4) /* get PTE second word */
417 clrrwi r0,r0,12 417 clrrwi r0,r0,12
418 lis r6,etext@h 418 lis r6,etext@h
419 ori r6,r6,etext@l /* get etext */ 419 ori r6,r6,etext@l /* get etext */
@@ -426,7 +426,7 @@ _GLOBAL(hash_page_patch_C)
426found_empty: 426found_empty:
427 STPTE r5,0(r4) 427 STPTE r5,0(r4)
428found_slot: 428found_slot:
429 STPTE r8,PTE_SIZE/2(r4) 429 STPTE r8,HPTE_SIZE/2(r4)
430 430
431#else /* CONFIG_SMP */ 431#else /* CONFIG_SMP */
432/* 432/*
@@ -452,7 +452,7 @@ found_slot:
452 STPTE r5,0(r4) 452 STPTE r5,0(r4)
453 sync 453 sync
454 TLBSYNC 454 TLBSYNC
455 STPTE r8,PTE_SIZE/2(r4) /* put in correct RPN, WIMG, PP bits */ 455 STPTE r8,HPTE_SIZE/2(r4) /* put in correct RPN, WIMG, PP bits */
456 sync 456 sync
457 SET_V(r5) 457 SET_V(r5)
458 STPTE r5,0(r4) /* finally set V bit in PTE */ 458 STPTE r5,0(r4) /* finally set V bit in PTE */
@@ -562,8 +562,8 @@ _GLOBAL(flush_hash_patch_A)
562 /* Search the primary PTEG for a PTE whose 1st (d)word matches r5 */ 562 /* Search the primary PTEG for a PTE whose 1st (d)word matches r5 */
563 li r0,8 /* PTEs/group */ 563 li r0,8 /* PTEs/group */
564 mtctr r0 564 mtctr r0
565 addi r12,r8,-PTE_SIZE 565 addi r12,r8,-HPTE_SIZE
5661: LDPTEu r0,PTE_SIZE(r12) /* get next PTE */ 5661: LDPTEu r0,HPTE_SIZE(r12) /* get next PTE */
567 CMPPTE 0,r0,r11 567 CMPPTE 0,r0,r11
568 bdnzf 2,1b /* loop while ctr != 0 && !cr0.eq */ 568 bdnzf 2,1b /* loop while ctr != 0 && !cr0.eq */
569 beq+ 3f 569 beq+ 3f
@@ -574,9 +574,9 @@ _GLOBAL(flush_hash_patch_A)
574_GLOBAL(flush_hash_patch_B) 574_GLOBAL(flush_hash_patch_B)
575 xoris r12,r8,Hash_msk>>16 /* compute secondary hash */ 575 xoris r12,r8,Hash_msk>>16 /* compute secondary hash */
576 xori r12,r12,(-PTEG_SIZE & 0xffff) 576 xori r12,r12,(-PTEG_SIZE & 0xffff)
577 addi r12,r12,-PTE_SIZE 577 addi r12,r12,-HPTE_SIZE
578 mtctr r0 578 mtctr r0
5792: LDPTEu r0,PTE_SIZE(r12) 5792: LDPTEu r0,HPTE_SIZE(r12)
580 CMPPTE 0,r0,r11 580 CMPPTE 0,r0,r11
581 bdnzf 2,2b 581 bdnzf 2,2b
582 xori r11,r11,PTE_H /* clear H again */ 582 xori r11,r11,PTE_H /* clear H again */