1// SPDX-License-Identifier: GPL-2.0 2// Copyright (C) 2005-2017 Andes Technology Corporation 3 4#include <linux/linkage.h> 5#include <asm/export.h> 6#include <asm/page.h> 7 8 .text 9ENTRY(copy_page) 10 pushm $r2, $r10 11 movi $r2, PAGE_SIZE >> 5 12.Lcopy_loop: 13 lmw.bim $r3, [$r1], $r10 14 smw.bim $r3, [$r0], $r10 15 subi45 $r2, #1 16 bnez38 $r2, .Lcopy_loop 17 popm $r2, $r10 18 ret 19ENDPROC(copy_page) 20EXPORT_SYMBOL(copy_page) 21 22ENTRY(clear_page) 23 pushm $r1, $r9 24 movi $r1, PAGE_SIZE >> 5 25 movi55 $r2, #0 26 movi55 $r3, #0 27 movi55 $r4, #0 28 movi55 $r5, #0 29 movi55 $r6, #0 30 movi55 $r7, #0 31 movi55 $r8, #0 32 movi55 $r9, #0 33.Lclear_loop: 34 smw.bim $r2, [$r0], $r9 35 subi45 $r1, #1 36 bnez38 $r1, .Lclear_loop 37 popm $r1, $r9 38 ret 39ENDPROC(clear_page) 40EXPORT_SYMBOL(clear_page) 41