| .. | .. |
|---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-or-later */ |
|---|
| 1 | 2 | /* -*- linux-c -*- ------------------------------------------------------- * |
|---|
| 2 | 3 | * |
|---|
| 3 | 4 | * 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. |
|---|
| 10 | 5 | * |
|---|
| 11 | 6 | * ----------------------------------------------------------------------- */ |
|---|
| 12 | 7 | |
|---|
| .. | .. |
|---|
| 33 | 28 | #include <errno.h> |
|---|
| 34 | 29 | #include <inttypes.h> |
|---|
| 35 | 30 | #include <stddef.h> |
|---|
| 31 | +#include <string.h> |
|---|
| 36 | 32 | #include <sys/mman.h> |
|---|
| 33 | +#include <sys/time.h> |
|---|
| 37 | 34 | #include <sys/types.h> |
|---|
| 38 | 35 | |
|---|
| 39 | 36 | /* Not standard, but glibc defines it */ |
|---|
| .. | .. |
|---|
| 47 | 44 | #ifndef PAGE_SIZE |
|---|
| 48 | 45 | # define PAGE_SIZE 4096 |
|---|
| 49 | 46 | #endif |
|---|
| 47 | +#ifndef PAGE_SHIFT |
|---|
| 48 | +# define PAGE_SHIFT 12 |
|---|
| 49 | +#endif |
|---|
| 50 | 50 | extern const char raid6_empty_zero_page[PAGE_SIZE]; |
|---|
| 51 | 51 | |
|---|
| 52 | 52 | #define __init |
|---|
| 53 | 53 | #define __exit |
|---|
| 54 | | -#define __attribute_const__ __attribute__((const)) |
|---|
| 54 | +#ifndef __attribute_const__ |
|---|
| 55 | +# define __attribute_const__ __attribute__((const)) |
|---|
| 56 | +#endif |
|---|
| 55 | 57 | #define noinline __attribute__((noinline)) |
|---|
| 56 | 58 | |
|---|
| 57 | 59 | #define preempt_enable() |
|---|
| .. | .. |
|---|
| 60 | 62 | #define enable_kernel_altivec() |
|---|
| 61 | 63 | #define disable_kernel_altivec() |
|---|
| 62 | 64 | |
|---|
| 65 | +#undef EXPORT_SYMBOL |
|---|
| 63 | 66 | #define EXPORT_SYMBOL(sym) |
|---|
| 67 | +#undef EXPORT_SYMBOL_GPL |
|---|
| 64 | 68 | #define EXPORT_SYMBOL_GPL(sym) |
|---|
| 65 | 69 | #define MODULE_LICENSE(licence) |
|---|
| 66 | 70 | #define MODULE_DESCRIPTION(desc) |
|---|
| 67 | 71 | #define subsys_initcall(x) |
|---|
| 68 | 72 | #define module_exit(x) |
|---|
| 73 | + |
|---|
| 74 | +#define IS_ENABLED(x) (x) |
|---|
| 75 | +#define CONFIG_RAID6_PQ_BENCHMARK 1 |
|---|
| 69 | 76 | #endif /* __KERNEL__ */ |
|---|
| 70 | 77 | |
|---|
| 71 | 78 | /* Routine choices */ |
|---|