| /* SPDX-License-Identifier: GPL-2.0-or-later */ |
| * Copyright (C) IBM Corporation, 2012 |
| * Author: Anton Blanchard <anton@au.ibm.com> |
| #ifndef _ASM_POWERPC_XOR_H |
| #define _ASM_POWERPC_XOR_H |
| #include <asm/cputable.h> |
| #include <asm/cpu_has_feature.h> |
| #include <asm/xor_altivec.h> |
| static struct xor_block_template xor_block_altivec = { |
| #define XOR_SPEED_ALTIVEC() \ |
| if (cpu_has_feature(CPU_FTR_ALTIVEC)) \ |
| xor_speed(&xor_block_altivec); \ |
| #define XOR_SPEED_ALTIVEC() |
| /* Also try the generic routines. */ |
| #include <asm-generic/xor.h> |
| #define XOR_TRY_TEMPLATES \ |
| xor_speed(&xor_block_8regs); \ |
| xor_speed(&xor_block_8regs_p); \ |
| xor_speed(&xor_block_32regs); \ |
| xor_speed(&xor_block_32regs_p); \ |
| #endif /* _ASM_POWERPC_XOR_H */ |