diff options
Diffstat (limited to 'include/asm-powerpc/pgtable-ppc32.h')
-rw-r--r-- | include/asm-powerpc/pgtable-ppc32.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/include/asm-powerpc/pgtable-ppc32.h b/include/asm-powerpc/pgtable-ppc32.h index 86a54a4a8a2a..d1332bbcbd9b 100644 --- a/include/asm-powerpc/pgtable-ppc32.h +++ b/include/asm-powerpc/pgtable-ppc32.h | |||
@@ -11,6 +11,11 @@ | |||
11 | extern unsigned long va_to_phys(unsigned long address); | 11 | extern unsigned long va_to_phys(unsigned long address); |
12 | extern pte_t *va_to_pte(unsigned long address); | 12 | extern pte_t *va_to_pte(unsigned long address); |
13 | extern unsigned long ioremap_bot, ioremap_base; | 13 | extern unsigned long ioremap_bot, ioremap_base; |
14 | |||
15 | #ifdef CONFIG_44x | ||
16 | extern int icache_44x_need_flush; | ||
17 | #endif | ||
18 | |||
14 | #endif /* __ASSEMBLY__ */ | 19 | #endif /* __ASSEMBLY__ */ |
15 | 20 | ||
16 | /* | 21 | /* |
@@ -81,6 +86,11 @@ extern unsigned long ioremap_bot, ioremap_base; | |||
81 | * entries per page directory level: our page-table tree is two-level, so | 86 | * entries per page directory level: our page-table tree is two-level, so |
82 | * we don't really have any PMD directory. | 87 | * we don't really have any PMD directory. |
83 | */ | 88 | */ |
89 | #ifndef __ASSEMBLY__ | ||
90 | #define PTE_TABLE_SIZE (sizeof(pte_t) << PTE_SHIFT) | ||
91 | #define PGD_TABLE_SIZE (sizeof(pgd_t) << (32 - PGDIR_SHIFT)) | ||
92 | #endif /* __ASSEMBLY__ */ | ||
93 | |||
84 | #define PTRS_PER_PTE (1 << PTE_SHIFT) | 94 | #define PTRS_PER_PTE (1 << PTE_SHIFT) |
85 | #define PTRS_PER_PMD 1 | 95 | #define PTRS_PER_PMD 1 |
86 | #define PTRS_PER_PGD (1 << (32 - PGDIR_SHIFT)) | 96 | #define PTRS_PER_PGD (1 << (32 - PGDIR_SHIFT)) |
@@ -562,6 +572,10 @@ static inline unsigned long pte_update(pte_t *p, unsigned long clr, | |||
562 | : "=&r" (old), "=&r" (tmp), "=m" (*p) | 572 | : "=&r" (old), "=&r" (tmp), "=m" (*p) |
563 | : "r" (p), "r" (clr), "r" (set), "m" (*p) | 573 | : "r" (p), "r" (clr), "r" (set), "m" (*p) |
564 | : "cc" ); | 574 | : "cc" ); |
575 | #ifdef CONFIG_44x | ||
576 | if ((old & _PAGE_USER) && (old & _PAGE_HWEXEC)) | ||
577 | icache_44x_need_flush = 1; | ||
578 | #endif | ||
565 | return old; | 579 | return old; |
566 | } | 580 | } |
567 | #else | 581 | #else |
@@ -582,6 +596,10 @@ static inline unsigned long long pte_update(pte_t *p, unsigned long clr, | |||
582 | : "=&r" (old), "=&r" (tmp), "=m" (*p) | 596 | : "=&r" (old), "=&r" (tmp), "=m" (*p) |
583 | : "r" (p), "r" ((unsigned long)(p) + 4), "r" (clr), "r" (set), "m" (*p) | 597 | : "r" (p), "r" ((unsigned long)(p) + 4), "r" (clr), "r" (set), "m" (*p) |
584 | : "cc" ); | 598 | : "cc" ); |
599 | #ifdef CONFIG_44x | ||
600 | if ((old & _PAGE_USER) && (old & _PAGE_HWEXEC)) | ||
601 | icache_44x_need_flush = 1; | ||
602 | #endif | ||
585 | return old; | 603 | return old; |
586 | } | 604 | } |
587 | #endif | 605 | #endif |