Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0-only
0002 /*
0003  * linux/arch/arm/lib/xor-neon.c
0004  *
0005  * Copyright (C) 2013 Linaro Ltd <ard.biesheuvel@linaro.org>
0006  */
0007 
0008 #include <linux/raid/xor.h>
0009 #include <linux/module.h>
0010 
0011 MODULE_LICENSE("GPL");
0012 
0013 #ifndef __ARM_NEON__
0014 #error You should compile this file with '-march=armv7-a -mfloat-abi=softfp -mfpu=neon'
0015 #endif
0016 
0017 /*
0018  * Pull in the reference implementations while instructing GCC (through
0019  * -ftree-vectorize) to attempt to exploit implicit parallelism and emit
0020  * NEON instructions. Clang does this by default at O2 so no pragma is
0021  * needed.
0022  */
0023 #ifdef CONFIG_CC_IS_GCC
0024 #pragma GCC optimize "tree-vectorize"
0025 #endif
0026 
0027 #pragma GCC diagnostic ignored "-Wunused-variable"
0028 #include <asm-generic/xor.h>
0029 
0030 struct xor_block_template const xor_block_neon_inner = {
0031     .name   = "__inner_neon__",
0032     .do_2   = xor_8regs_2,
0033     .do_3   = xor_8regs_3,
0034     .do_4   = xor_8regs_4,
0035     .do_5   = xor_8regs_5,
0036 };
0037 EXPORT_SYMBOL(xor_block_neon_inner);