hc
2023-12-09 b22da3d8526a935aa31e086e63f60ff3246cb61c
kernel/include/linux/raid/pq.h
....@@ -1,12 +1,7 @@
1
+/* SPDX-License-Identifier: GPL-2.0-or-later */
12 /* -*- linux-c -*- ------------------------------------------------------- *
23 *
34 * Copyright 2003 H. Peter Anvin - All Rights Reserved
4
- *
5
- * This program is free software; you can redistribute it and/or modify
6
- * it under the terms of the GNU General Public License as published by
7
- * the Free Software Foundation, Inc., 53 Temple Place Ste 330,
8
- * Boston MA 02111-1307, USA; either version 2 of the License, or
9
- * (at your option) any later version; incorporated herein by reference.
105 *
116 * ----------------------------------------------------------------------- */
127
....@@ -33,7 +28,9 @@
3328 #include <errno.h>
3429 #include <inttypes.h>
3530 #include <stddef.h>
31
+#include <string.h>
3632 #include <sys/mman.h>
33
+#include <sys/time.h>
3734 #include <sys/types.h>
3835
3936 /* Not standard, but glibc defines it */
....@@ -47,11 +44,16 @@
4744 #ifndef PAGE_SIZE
4845 # define PAGE_SIZE 4096
4946 #endif
47
+#ifndef PAGE_SHIFT
48
+# define PAGE_SHIFT 12
49
+#endif
5050 extern const char raid6_empty_zero_page[PAGE_SIZE];
5151
5252 #define __init
5353 #define __exit
54
-#define __attribute_const__ __attribute__((const))
54
+#ifndef __attribute_const__
55
+# define __attribute_const__ __attribute__((const))
56
+#endif
5557 #define noinline __attribute__((noinline))
5658
5759 #define preempt_enable()
....@@ -60,12 +62,17 @@
6062 #define enable_kernel_altivec()
6163 #define disable_kernel_altivec()
6264
65
+#undef EXPORT_SYMBOL
6366 #define EXPORT_SYMBOL(sym)
67
+#undef EXPORT_SYMBOL_GPL
6468 #define EXPORT_SYMBOL_GPL(sym)
6569 #define MODULE_LICENSE(licence)
6670 #define MODULE_DESCRIPTION(desc)
6771 #define subsys_initcall(x)
6872 #define module_exit(x)
73
+
74
+#define IS_ENABLED(x) (x)
75
+#define CONFIG_RAID6_PQ_BENCHMARK 1
6976 #endif /* __KERNEL__ */
7077
7178 /* Routine choices */