#if defined(__sparc__) && defined(__arch64__)
#include <asm/spitfire.h>
extern struct xor_block_template xor_block_VIS;
extern struct xor_block_template xor_block_niagara;
static __always_inline void __init arch_xor_init(void)
{
if (tlb_type == hypervisor &&
(sun4v_chip_type == SUN4V_CHIP_NIAGARA1 ||
sun4v_chip_type == SUN4V_CHIP_NIAGARA2 ||
sun4v_chip_type == SUN4V_CHIP_NIAGARA3 ||
sun4v_chip_type == SUN4V_CHIP_NIAGARA4 ||
sun4v_chip_type == SUN4V_CHIP_NIAGARA5))
xor_force(&xor_block_niagara);
else
xor_force(&xor_block_VIS);
}
#else
extern struct xor_block_template xor_block_SPARC;
static __always_inline void __init arch_xor_init(void)
{
xor_register(&xor_block_8regs);
xor_register(&xor_block_32regs);
xor_register(&xor_block_SPARC);
}
#endif