18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 28c2ecf20Sopenharmony_ci/* NG4copy_page.S: Niagara-4 optimized clear page. 38c2ecf20Sopenharmony_ci * 48c2ecf20Sopenharmony_ci * Copyright (C) 2012 (davem@davemloft.net) 58c2ecf20Sopenharmony_ci */ 68c2ecf20Sopenharmony_ci 78c2ecf20Sopenharmony_ci#include <asm/asi.h> 88c2ecf20Sopenharmony_ci#include <asm/page.h> 98c2ecf20Sopenharmony_ci 108c2ecf20Sopenharmony_ci .text 118c2ecf20Sopenharmony_ci 128c2ecf20Sopenharmony_ci .register %g3, #scratch 138c2ecf20Sopenharmony_ci 148c2ecf20Sopenharmony_ci .align 32 158c2ecf20Sopenharmony_ci .globl NG4clear_page 168c2ecf20Sopenharmony_ci .globl NG4clear_user_page 178c2ecf20Sopenharmony_ciNG4clear_page: /* %o0=dest */ 188c2ecf20Sopenharmony_ciNG4clear_user_page: /* %o0=dest, %o1=vaddr */ 198c2ecf20Sopenharmony_ci set PAGE_SIZE, %g7 208c2ecf20Sopenharmony_ci mov 0x20, %g3 218c2ecf20Sopenharmony_ci1: stxa %g0, [%o0 + %g0] ASI_ST_BLKINIT_MRU_P 228c2ecf20Sopenharmony_ci subcc %g7, 0x40, %g7 238c2ecf20Sopenharmony_ci stxa %g0, [%o0 + %g3] ASI_ST_BLKINIT_MRU_P 248c2ecf20Sopenharmony_ci bne,pt %xcc, 1b 258c2ecf20Sopenharmony_ci add %o0, 0x40, %o0 268c2ecf20Sopenharmony_ci membar #StoreLoad|#StoreStore 278c2ecf20Sopenharmony_ci retl 288c2ecf20Sopenharmony_ci nop 298c2ecf20Sopenharmony_ci .size NG4clear_page,.-NG4clear_page 308c2ecf20Sopenharmony_ci .size NG4clear_user_page,.-NG4clear_user_page 31