diff options
| author | Anton Blanchard <anton@samba.org> | 2011-05-08 17:18:38 -0400 |
|---|---|---|
| committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2011-05-19 00:30:42 -0400 |
| commit | d988f0e3f84cb8a4f85ccdbca6f6fefcc37bedcb (patch) | |
| tree | 60feffdec36d0a484b0d8d7d8dbdf5baf73aea7e /arch/powerpc/include | |
| parent | 37e0c21e9b5b6d6fd38a444762076c84c6170598 (diff) | |
powerpc: Simplify 4k/64k copy_page logic
To make it easier to add optimised versions of copy_page, remove
the 4kB loop for 64kB pages and just do all the work in copy_page.
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/include')
| -rw-r--r-- | arch/powerpc/include/asm/page_64.h | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/arch/powerpc/include/asm/page_64.h b/arch/powerpc/include/asm/page_64.h index 488c52eb64cb..9356262fd3cc 100644 --- a/arch/powerpc/include/asm/page_64.h +++ b/arch/powerpc/include/asm/page_64.h | |||
| @@ -59,24 +59,7 @@ static __inline__ void clear_page(void *addr) | |||
| 59 | : "ctr", "memory"); | 59 | : "ctr", "memory"); |
| 60 | } | 60 | } |
| 61 | 61 | ||
| 62 | extern void copy_4K_page(void *to, void *from); | 62 | extern void copy_page(void *to, void *from); |
| 63 | |||
| 64 | #ifdef CONFIG_PPC_64K_PAGES | ||
| 65 | static inline void copy_page(void *to, void *from) | ||
| 66 | { | ||
| 67 | unsigned int i; | ||
| 68 | for (i=0; i < (1 << (PAGE_SHIFT - 12)); i++) { | ||
| 69 | copy_4K_page(to, from); | ||
| 70 | to += 4096; | ||
| 71 | from += 4096; | ||
| 72 | } | ||
| 73 | } | ||
| 74 | #else /* CONFIG_PPC_64K_PAGES */ | ||
| 75 | static inline void copy_page(void *to, void *from) | ||
| 76 | { | ||
| 77 | copy_4K_page(to, from); | ||
| 78 | } | ||
| 79 | #endif /* CONFIG_PPC_64K_PAGES */ | ||
| 80 | 63 | ||
| 81 | /* Log 2 of page table size */ | 64 | /* Log 2 of page table size */ |
| 82 | extern u64 ppc64_pft_size; | 65 | extern u64 ppc64_pft_size; |
