diff options
author | GuanXuetao <gxt@mprc.pku.edu.cn> | 2011-02-26 18:49:26 +0800 |
---|---|---|
committer | GuanXuetao <gxt@mprc.pku.edu.cn> | 2011-03-17 09:19:13 +0800 |
commit | 77c93b2f2388b974253af4149aa025b4751f92ad (patch) | |
tree | 59b3c67518e2cae1f347a2c2bc738a234b349bb4 /arch/unicore32/lib/copy_page.S | |
parent | 28bab059a23aac6bb129b307410e5b63e132a290 (diff) | |
download | kernel_samsung_crespo-77c93b2f2388b974253af4149aa025b4751f92ad.zip kernel_samsung_crespo-77c93b2f2388b974253af4149aa025b4751f92ad.tar.gz kernel_samsung_crespo-77c93b2f2388b974253af4149aa025b4751f92ad.tar.bz2 |
unicore32 additional architecture files: low-level lib: uaccess
This patch implements low-level uaccess libraries.
Signed-off-by: Guan Xuetao <gxt@mprc.pku.edu.cn>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch/unicore32/lib/copy_page.S')
-rw-r--r-- | arch/unicore32/lib/copy_page.S | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/arch/unicore32/lib/copy_page.S b/arch/unicore32/lib/copy_page.S new file mode 100644 index 0000000..3a448d7 --- /dev/null +++ b/arch/unicore32/lib/copy_page.S @@ -0,0 +1,39 @@ +/* + * linux/arch/unicore32/lib/copy_page.S + * + * Code specific to PKUnity SoC and UniCore ISA + * + * Copyright (C) 2001-2010 GUAN Xue-tao + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * ASM optimised string functions + */ +#include <linux/linkage.h> +#include <asm/assembler.h> +#include <generated/asm-offsets.h> +#include <asm/cache.h> + +#define COPY_COUNT (PAGE_SZ/256) + + .text + .align 5 +/* + * UniCore optimised copy_page routine + */ +ENTRY(copy_page) + stm.w (r17 - r19, lr), [sp-] + mov r17, r0 + mov r18, r1 + mov r19, #COPY_COUNT +1: + .rept 4 + ldm.w (r0 - r15), [r18]+ + stm.w (r0 - r15), [r17]+ + .endr + sub.a r19, r19, #1 + bne 1b + ldm.w (r17 - r19, pc), [sp]+ +ENDPROC(copy_page) |