1d2912cb1SThomas Gleixner // SPDX-License-Identifier: GPL-2.0-only 201956597SArd Biesheuvel /* 301956597SArd Biesheuvel * linux/arch/arm/lib/xor-neon.c 401956597SArd Biesheuvel * 501956597SArd Biesheuvel * Copyright (C) 2013 Linaro Ltd <ard.biesheuvel@linaro.org> 601956597SArd Biesheuvel */ 701956597SArd Biesheuvel 801956597SArd Biesheuvel #include <linux/raid/xor.h> 99319206dSArd Biesheuvel #include <linux/module.h> 109319206dSArd Biesheuvel 11*f6fc302dSJeff Johnson MODULE_DESCRIPTION("NEON accelerated XOR implementation"); 129319206dSArd Biesheuvel MODULE_LICENSE("GPL"); 1301956597SArd Biesheuvel 1401956597SArd Biesheuvel #ifndef __ARM_NEON__ 15de9c0d49SNathan Chancellor #error You should compile this file with '-march=armv7-a -mfloat-abi=softfp -mfpu=neon' 1601956597SArd Biesheuvel #endif 1701956597SArd Biesheuvel 1801956597SArd Biesheuvel /* 1901956597SArd Biesheuvel * Pull in the reference implementations while instructing GCC (through 2001956597SArd Biesheuvel * -ftree-vectorize) to attempt to exploit implicit parallelism and emit 21a69cb445SArd Biesheuvel * NEON instructions. Clang does this by default at O2 so no pragma is 22a69cb445SArd Biesheuvel * needed. 2301956597SArd Biesheuvel */ 24a69cb445SArd Biesheuvel #ifdef CONFIG_CC_IS_GCC 2501956597SArd Biesheuvel #pragma GCC optimize "tree-vectorize" 2601956597SArd Biesheuvel #endif 2701956597SArd Biesheuvel 2801956597SArd Biesheuvel #pragma GCC diagnostic ignored "-Wunused-variable" 2901956597SArd Biesheuvel #include <asm-generic/xor.h> 3001956597SArd Biesheuvel 3101956597SArd Biesheuvel struct xor_block_template const xor_block_neon_inner = { 3201956597SArd Biesheuvel .name = "__inner_neon__", 3301956597SArd Biesheuvel .do_2 = xor_8regs_2, 3401956597SArd Biesheuvel .do_3 = xor_8regs_3, 3501956597SArd Biesheuvel .do_4 = xor_8regs_4, 3601956597SArd Biesheuvel .do_5 = xor_8regs_5, 3701956597SArd Biesheuvel }; 389319206dSArd Biesheuvel EXPORT_SYMBOL(xor_block_neon_inner); 39