1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * Copyright (C) 2008 Mark Nelson, IBM Corp.
6 #include <asm/processor.h>
7 #include <asm/ppc_asm.h>
8 #include <asm/asm-offsets.h>
9 #include <asm/export.h>
10 #include <asm/feature-fixups.h>
14 .tc ppc64_caches[TC],ppc64_caches
17 _GLOBAL_TOC(copy_page)
21 #ifdef CONFIG_PPC_BOOK3S_64
24 ALT_FTR_SECTION_END_IFCLR(CPU_FTR_VMX_COPY)
27 ld r10,PPC64_CACHES@toc(r2)
28 lwz r11,DCACHEL1LOGBLOCKSIZE(r10) /* log2 of cache block size */
29 lwz r12,DCACHEL1BLOCKSIZE(r10) /* get cache block size */
39 END_FTR_SECTION_IFSET(CPU_FTR_CP_USE_DCBTZ)
41 srdi r8,r5,7 /* page is copied in 128 byte strides */
42 addi r8,r8,-1 /* one stride copied outside loop */
113 EXPORT_SYMBOL(copy_page)