1*e20043b4SChristoph Hellwig /* SPDX-License-Identifier: GPL-2.0 */ 2*e20043b4SChristoph Hellwig /* 3*e20043b4SChristoph Hellwig * Copyright (C) 1997, 1999 Jakub Jelinek (jj@ultra.linux.cz) 4*e20043b4SChristoph Hellwig * Copyright (C) 2006 David S. Miller <davem@davemloft.net> 5*e20043b4SChristoph Hellwig */ 6*e20043b4SChristoph Hellwig #if defined(__sparc__) && defined(__arch64__) 7*e20043b4SChristoph Hellwig #include <asm/spitfire.h> 8*e20043b4SChristoph Hellwig 9*e20043b4SChristoph Hellwig extern struct xor_block_template xor_block_VIS; 10*e20043b4SChristoph Hellwig extern struct xor_block_template xor_block_niagara; 11*e20043b4SChristoph Hellwig 12*e20043b4SChristoph Hellwig static __always_inline void __init arch_xor_init(void) 13*e20043b4SChristoph Hellwig { 14*e20043b4SChristoph Hellwig /* Force VIS for everything except Niagara. */ 15*e20043b4SChristoph Hellwig if (tlb_type == hypervisor && 16*e20043b4SChristoph Hellwig (sun4v_chip_type == SUN4V_CHIP_NIAGARA1 || 17*e20043b4SChristoph Hellwig sun4v_chip_type == SUN4V_CHIP_NIAGARA2 || 18*e20043b4SChristoph Hellwig sun4v_chip_type == SUN4V_CHIP_NIAGARA3 || 19*e20043b4SChristoph Hellwig sun4v_chip_type == SUN4V_CHIP_NIAGARA4 || 20*e20043b4SChristoph Hellwig sun4v_chip_type == SUN4V_CHIP_NIAGARA5)) 21*e20043b4SChristoph Hellwig xor_force(&xor_block_niagara); 22*e20043b4SChristoph Hellwig else 23*e20043b4SChristoph Hellwig xor_force(&xor_block_VIS); 24*e20043b4SChristoph Hellwig } 25*e20043b4SChristoph Hellwig #else /* sparc64 */ 26*e20043b4SChristoph Hellwig 27*e20043b4SChristoph Hellwig extern struct xor_block_template xor_block_SPARC; 28*e20043b4SChristoph Hellwig 29*e20043b4SChristoph Hellwig static __always_inline void __init arch_xor_init(void) 30*e20043b4SChristoph Hellwig { 31*e20043b4SChristoph Hellwig xor_register(&xor_block_8regs); 32*e20043b4SChristoph Hellwig xor_register(&xor_block_32regs); 33*e20043b4SChristoph Hellwig xor_register(&xor_block_SPARC); 34*e20043b4SChristoph Hellwig } 35*e20043b4SChristoph Hellwig #endif /* !sparc64 */ 36