diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/include/asm/pgtable.h | 6 | ||||
-rw-r--r-- | arch/powerpc/mm/hash_low_64.S | 4 |
2 files changed, 8 insertions, 2 deletions
diff --git a/arch/powerpc/include/asm/pgtable.h b/arch/powerpc/include/asm/pgtable.h index a9cbd3ba5c33..4b52726e01ca 100644 --- a/arch/powerpc/include/asm/pgtable.h +++ b/arch/powerpc/include/asm/pgtable.h | |||
@@ -17,6 +17,12 @@ struct mm_struct; | |||
17 | # include <asm/pgtable-ppc32.h> | 17 | # include <asm/pgtable-ppc32.h> |
18 | #endif | 18 | #endif |
19 | 19 | ||
20 | /* | ||
21 | * We save the slot number & secondary bit in the second half of the | ||
22 | * PTE page. We use the 8 bytes per each pte entry. | ||
23 | */ | ||
24 | #define PTE_PAGE_HIDX_OFFSET (PTRS_PER_PTE * 8) | ||
25 | |||
20 | #ifndef __ASSEMBLY__ | 26 | #ifndef __ASSEMBLY__ |
21 | 27 | ||
22 | #include <asm/tlbflush.h> | 28 | #include <asm/tlbflush.h> |
diff --git a/arch/powerpc/mm/hash_low_64.S b/arch/powerpc/mm/hash_low_64.S index 7443481a315c..abdd5e21cdb6 100644 --- a/arch/powerpc/mm/hash_low_64.S +++ b/arch/powerpc/mm/hash_low_64.S | |||
@@ -490,7 +490,7 @@ END_FTR_SECTION(CPU_FTR_NOEXECUTE|CPU_FTR_COHERENT_ICACHE, CPU_FTR_NOEXECUTE) | |||
490 | beq htab_inval_old_hpte | 490 | beq htab_inval_old_hpte |
491 | 491 | ||
492 | ld r6,STK_PARAM(R6)(r1) | 492 | ld r6,STK_PARAM(R6)(r1) |
493 | ori r26,r6,0x8000 /* Load the hidx mask */ | 493 | ori r26,r6,PTE_PAGE_HIDX_OFFSET /* Load the hidx mask. */ |
494 | ld r26,0(r26) | 494 | ld r26,0(r26) |
495 | addi r5,r25,36 /* Check actual HPTE_SUB bit, this */ | 495 | addi r5,r25,36 /* Check actual HPTE_SUB bit, this */ |
496 | rldcr. r0,r31,r5,0 /* must match pgtable.h definition */ | 496 | rldcr. r0,r31,r5,0 /* must match pgtable.h definition */ |
@@ -607,7 +607,7 @@ htab_pte_insert_ok: | |||
607 | sld r4,r4,r5 | 607 | sld r4,r4,r5 |
608 | andc r26,r26,r4 | 608 | andc r26,r26,r4 |
609 | or r26,r26,r3 | 609 | or r26,r26,r3 |
610 | ori r5,r6,0x8000 | 610 | ori r5,r6,PTE_PAGE_HIDX_OFFSET |
611 | std r26,0(r5) | 611 | std r26,0(r5) |
612 | lwsync | 612 | lwsync |
613 | std r30,0(r6) | 613 | std r30,0(r6) |