2 * linux/arch/arm/lib/copypage-feroceon.S
4 * Copyright (C) 2008 Marvell Semiconductors
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
10 * This handles copy_user_page and clear_user_page on Feroceon
11 * more optimally than the generic implementations.
13 #include <linux/linkage.h>
14 #include <linux/init.h>
15 #include <asm/asm-offsets.h>
20 ENTRY(feroceon_copy_user_page)
21 stmfd sp!, {r4-r9, lr}
34 mcr p15, 0, r0, c7, c14, 1 @ clean and invalidate D line
38 mcr p15, 0, r0, c7, c14, 1 @ clean and invalidate D line
42 mcr p15, 0, r0, c7, c14, 1 @ clean and invalidate D line
46 mcr p15, 0, r0, c7, c14, 1 @ clean and invalidate D line
50 mcr p15, 0, r0, c7, c14, 1 @ clean and invalidate D line
54 mcr p15, 0, r0, c7, c14, 1 @ clean and invalidate D line
58 mcr p15, 0, r0, c7, c14, 1 @ clean and invalidate D line
61 subs ip, ip, #(32 * 8)
62 mcr p15, 0, r0, c7, c14, 1 @ clean and invalidate D line
65 mcr p15, 0, ip, c7, c10, 4 @ drain WB
66 ldmfd sp!, {r4-r9, pc}
70 ENTRY(feroceon_clear_user_page)
71 stmfd sp!, {r4-r7, lr}
81 1: stmia r0, {r2-r7, ip, lr}
83 mcr p15, 0, r0, c7, c14, 1 @ clean and invalidate D line
86 mcr p15, 0, r1, c7, c10, 4 @ drain WB
87 ldmfd sp!, {r4-r7, pc}
91 .type feroceon_user_fns, #object
92 ENTRY(feroceon_user_fns)
93 .long feroceon_clear_user_page
94 .long feroceon_copy_user_page
95 .size feroceon_user_fns, . - feroceon_user_fns