1ae2c6ca6SDavid S. Miller/* NG4copy_page.S: Niagara-4 optimized copy page. 2ae2c6ca6SDavid S. Miller * 3ae2c6ca6SDavid S. Miller * Copyright (C) 2012 (davem@davemloft.net) 4ae2c6ca6SDavid S. Miller */ 5ae2c6ca6SDavid S. Miller 6ae2c6ca6SDavid S. Miller#include <asm/asi.h> 7ae2c6ca6SDavid S. Miller#include <asm/page.h> 8ae2c6ca6SDavid S. Miller 9ae2c6ca6SDavid S. Miller .text 10ae2c6ca6SDavid S. Miller .align 32 11ae2c6ca6SDavid S. Miller 12ae2c6ca6SDavid S. Miller .register %g2, #scratch 13ae2c6ca6SDavid S. Miller .register %g3, #scratch 14ae2c6ca6SDavid S. Miller 15ae2c6ca6SDavid S. Miller .globl NG4copy_user_page 16ae2c6ca6SDavid S. MillerNG4copy_user_page: /* %o0=dest, %o1=src, %o2=vaddr */ 17ae2c6ca6SDavid S. Miller prefetch [%o1 + 0x000], #n_reads_strong 18ae2c6ca6SDavid S. Miller prefetch [%o1 + 0x040], #n_reads_strong 19ae2c6ca6SDavid S. Miller prefetch [%o1 + 0x080], #n_reads_strong 20ae2c6ca6SDavid S. Miller prefetch [%o1 + 0x0c0], #n_reads_strong 21ae2c6ca6SDavid S. Miller set PAGE_SIZE, %g7 22ae2c6ca6SDavid S. Miller prefetch [%o1 + 0x100], #n_reads_strong 23ae2c6ca6SDavid S. Miller prefetch [%o1 + 0x140], #n_reads_strong 24ae2c6ca6SDavid S. Miller prefetch [%o1 + 0x180], #n_reads_strong 25ae2c6ca6SDavid S. Miller prefetch [%o1 + 0x1c0], #n_reads_strong 26ae2c6ca6SDavid S. Miller1: 27ae2c6ca6SDavid S. Miller ldx [%o1 + 0x00], %o2 28ae2c6ca6SDavid S. Miller subcc %g7, 0x40, %g7 29ae2c6ca6SDavid S. Miller ldx [%o1 + 0x08], %o3 30ae2c6ca6SDavid S. Miller ldx [%o1 + 0x10], %o4 31ae2c6ca6SDavid S. Miller ldx [%o1 + 0x18], %o5 32ae2c6ca6SDavid S. Miller ldx [%o1 + 0x20], %g1 33ae2c6ca6SDavid S. Miller stxa %o2, [%o0] ASI_BLK_INIT_QUAD_LDD_P 34ae2c6ca6SDavid S. Miller add %o0, 0x08, %o0 35ae2c6ca6SDavid S. Miller ldx [%o1 + 0x28], %g2 36ae2c6ca6SDavid S. Miller stxa %o3, [%o0] ASI_BLK_INIT_QUAD_LDD_P 37ae2c6ca6SDavid S. Miller add %o0, 0x08, %o0 38ae2c6ca6SDavid S. Miller ldx [%o1 + 0x30], %g3 39ae2c6ca6SDavid S. Miller stxa %o4, [%o0] ASI_BLK_INIT_QUAD_LDD_P 40ae2c6ca6SDavid S. Miller add %o0, 0x08, %o0 41ae2c6ca6SDavid S. Miller ldx [%o1 + 0x38], %o2 42ae2c6ca6SDavid S. Miller add %o1, 0x40, %o1 43ae2c6ca6SDavid S. Miller stxa %o5, [%o0] ASI_BLK_INIT_QUAD_LDD_P 44ae2c6ca6SDavid S. Miller add %o0, 0x08, %o0 45ae2c6ca6SDavid S. Miller stxa %g1, [%o0] ASI_BLK_INIT_QUAD_LDD_P 46ae2c6ca6SDavid S. Miller add %o0, 0x08, %o0 47ae2c6ca6SDavid S. Miller stxa %g2, [%o0] ASI_BLK_INIT_QUAD_LDD_P 48ae2c6ca6SDavid S. Miller add %o0, 0x08, %o0 49ae2c6ca6SDavid S. Miller stxa %g3, [%o0] ASI_BLK_INIT_QUAD_LDD_P 50ae2c6ca6SDavid S. Miller add %o0, 0x08, %o0 51ae2c6ca6SDavid S. Miller stxa %o2, [%o0] ASI_BLK_INIT_QUAD_LDD_P 52ae2c6ca6SDavid S. Miller add %o0, 0x08, %o0 53ae2c6ca6SDavid S. Miller bne,pt %icc, 1b 54ae2c6ca6SDavid S. Miller prefetch [%o1 + 0x200], #n_reads_strong 55ae2c6ca6SDavid S. Miller retl 56ae2c6ca6SDavid S. Miller membar #StoreLoad | #StoreStore 57ae2c6ca6SDavid S. Miller .size NG4copy_user_page,.-NG4copy_user_page 58