diff options
author | Paul Mundt <lethal@linux-sh.org> | 2006-09-27 02:13:36 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2006-09-27 02:13:36 -0400 |
commit | 26ff6c11ef38e08990c1e417c299246e6ab18ff7 (patch) | |
tree | ebd37fd0270b7c7dfe8474a046663db78fcdb1ab /include/asm-sh/page.h | |
parent | 9359e757709a211040e4b0151eae69248e7c6eca (diff) |
sh: page table alloc cleanups and page fault optimizations.
Cleanup of page table allocators, using generic folded PMD and PUD
helpers. TLB flushing operations are moved to a more sensible spot.
The page fault handler is also optimized slightly, we no longer waste
cycles on IRQ disabling for flushing of the page from the ITLB, since
we're already under CLI protection by the initial exception handler.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'include/asm-sh/page.h')
-rw-r--r-- | include/asm-sh/page.h | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/include/asm-sh/page.h b/include/asm-sh/page.h index 4811d410d123..51d7281a546a 100644 --- a/include/asm-sh/page.h +++ b/include/asm-sh/page.h | |||
@@ -41,7 +41,8 @@ extern void (*copy_page)(void *to, void *from); | |||
41 | extern void clear_page_slow(void *to); | 41 | extern void clear_page_slow(void *to); |
42 | extern void copy_page_slow(void *to, void *from); | 42 | extern void copy_page_slow(void *to, void *from); |
43 | 43 | ||
44 | #if defined(CONFIG_SH7705_CACHE_32KB) && defined(CONFIG_MMU) | 44 | #if defined(CONFIG_MMU) && (defined(CONFIG_CPU_SH4) || \ |
45 | defined(CONFIG_SH7705_CACHE_32KB)) | ||
45 | struct page; | 46 | struct page; |
46 | extern void clear_user_page(void *to, unsigned long address, struct page *pg); | 47 | extern void clear_user_page(void *to, unsigned long address, struct page *pg); |
47 | extern void copy_user_page(void *to, void *from, unsigned long address, struct page *pg); | 48 | extern void copy_user_page(void *to, void *from, unsigned long address, struct page *pg); |
@@ -50,29 +51,20 @@ extern void __copy_user_page(void *to, void *from, void *orig_to); | |||
50 | #elif defined(CONFIG_CPU_SH2) || defined(CONFIG_CPU_SH3) || !defined(CONFIG_MMU) | 51 | #elif defined(CONFIG_CPU_SH2) || defined(CONFIG_CPU_SH3) || !defined(CONFIG_MMU) |
51 | #define clear_user_page(page, vaddr, pg) clear_page(page) | 52 | #define clear_user_page(page, vaddr, pg) clear_page(page) |
52 | #define copy_user_page(to, from, vaddr, pg) copy_page(to, from) | 53 | #define copy_user_page(to, from, vaddr, pg) copy_page(to, from) |
53 | #elif defined(CONFIG_CPU_SH4) | ||
54 | struct page; | ||
55 | extern void clear_user_page(void *to, unsigned long address, struct page *pg); | ||
56 | extern void copy_user_page(void *to, void *from, unsigned long address, struct page *pg); | ||
57 | extern void __clear_user_page(void *to, void *orig_to); | ||
58 | extern void __copy_user_page(void *to, void *from, void *orig_to); | ||
59 | #endif | 54 | #endif |
60 | 55 | ||
61 | /* | 56 | /* |
62 | * These are used to make use of C type-checking.. | 57 | * These are used to make use of C type-checking.. |
63 | */ | 58 | */ |
64 | typedef struct { unsigned long pte; } pte_t; | 59 | typedef struct { unsigned long pte; } pte_t; |
65 | typedef struct { unsigned long pmd; } pmd_t; | ||
66 | typedef struct { unsigned long pgd; } pgd_t; | 60 | typedef struct { unsigned long pgd; } pgd_t; |
67 | typedef struct { unsigned long pgprot; } pgprot_t; | 61 | typedef struct { unsigned long pgprot; } pgprot_t; |
68 | 62 | ||
69 | #define pte_val(x) ((x).pte) | 63 | #define pte_val(x) ((x).pte) |
70 | #define pmd_val(x) ((x).pmd) | ||
71 | #define pgd_val(x) ((x).pgd) | 64 | #define pgd_val(x) ((x).pgd) |
72 | #define pgprot_val(x) ((x).pgprot) | 65 | #define pgprot_val(x) ((x).pgprot) |
73 | 66 | ||
74 | #define __pte(x) ((pte_t) { (x) } ) | 67 | #define __pte(x) ((pte_t) { (x) } ) |
75 | #define __pmd(x) ((pmd_t) { (x) } ) | ||
76 | #define __pgd(x) ((pgd_t) { (x) } ) | 68 | #define __pgd(x) ((pgd_t) { (x) } ) |
77 | #define __pgprot(x) ((pgprot_t) { (x) } ) | 69 | #define __pgprot(x) ((pgprot_t) { (x) } ) |
78 | 70 | ||