/*1* linux/arch/arm/lib/copypage.S2*3* Copyright (C) 1995-1999 Russell King4*5* This program is free software; you can redistribute it and/or modify6* it under the terms of the GNU General Public License version 2 as7* published by the Free Software Foundation.8*9* ASM optimised string functions10*/11#include <linux/linkage.h>12#include <asm/assembler.h>13#include <asm/asm-offsets.h>14#include <asm/cache.h>1516#define COPY_COUNT (PAGE_SZ / (2 * L1_CACHE_BYTES) PLD( -1 ))1718.text19.align 520/*21* StrongARM optimised copy_page routine22* now 1.78bytes/cycle, was 1.60 bytes/cycle (50MHz bus -> 89MB/s)23* Note that we probably achieve closer to the 100MB/s target with24* the core clock switching.25*/26ENTRY(copy_page)27stmfd sp!, {r4, lr} @ 228PLD( pld [r1, #0] )29PLD( pld [r1, #L1_CACHE_BYTES] )30mov r2, #COPY_COUNT @ 131ldmia r1!, {r3, r4, ip, lr} @ 4+1321: PLD( pld [r1, #2 * L1_CACHE_BYTES])33PLD( pld [r1, #3 * L1_CACHE_BYTES])342:35.rept (2 * L1_CACHE_BYTES / 16 - 1)36stmia r0!, {r3, r4, ip, lr} @ 437ldmia r1!, {r3, r4, ip, lr} @ 438.endr39subs r2, r2, #1 @ 140stmia r0!, {r3, r4, ip, lr} @ 441ldmgtia r1!, {r3, r4, ip, lr} @ 442bgt 1b @ 143PLD( ldmeqia r1!, {r3, r4, ip, lr} )44PLD( beq 2b )45ldmfd sp!, {r4, pc} @ 346ENDPROC(copy_page)474849