diff options
author | Richard Braun <rbraun@sceen.net> | 2017-06-22 23:57:51 +0200 |
---|---|---|
committer | Richard Braun <rbraun@sceen.net> | 2017-06-22 23:57:51 +0200 |
commit | 49f414edfa049023b5f68f272a1f2e512be4a598 (patch) | |
tree | 5a10faebffc3914c931fced056bc85e1257a9f79 | |
parent | 71b302e2c41f7bfb92beda8961a6d57bef2bd14e (diff) |
kern/macros: move the __read_mostly macro here
-rw-r--r-- | arch/x86/machine/param.h | 5 | ||||
-rw-r--r-- | arch/x86/machine/strace.c | 2 | ||||
-rw-r--r-- | kern/cpumap.c | 2 | ||||
-rw-r--r-- | kern/llsync.c | 1 | ||||
-rw-r--r-- | kern/macros.h | 5 | ||||
-rw-r--r-- | kern/percpu.c | 1 | ||||
-rw-r--r-- | kern/task.c | 2 | ||||
-rw-r--r-- | vm/vm_kmem.c | 1 | ||||
-rw-r--r-- | vm/vm_kmem.h | 1 |
9 files changed, 10 insertions, 10 deletions
diff --git a/arch/x86/machine/param.h b/arch/x86/machine/param.h index 557bc800..86ce81b1 100644 --- a/arch/x86/machine/param.h +++ b/arch/x86/machine/param.h @@ -47,11 +47,6 @@ #endif /* __LP64__ */ /* - * Attributes for variables that are mostly read and seldom changed. - */ -#define __read_mostly __section(".data.read_mostly") - -/* * System timer frequency. * * The selected value of 200 translates to a period of 5ms, small enough to diff --git a/arch/x86/machine/strace.c b/arch/x86/machine/strace.c index 6c28cf15..4b7e7438 100644 --- a/arch/x86/machine/strace.c +++ b/arch/x86/machine/strace.c @@ -22,7 +22,7 @@ #include <kern/init.h> #include <kern/kmem.h> #include <kern/log.h> -#include <kern/param.h> +#include <kern/macros.h> #include <machine/elf.h> #include <machine/multiboot.h> #include <machine/pmap.h> diff --git a/kern/cpumap.c b/kern/cpumap.c index 5582e681..e4ae864e 100644 --- a/kern/cpumap.c +++ b/kern/cpumap.c @@ -21,7 +21,7 @@ #include <kern/cpumap.h> #include <kern/error.h> #include <kern/kmem.h> -#include <kern/param.h> +#include <kern/macros.h> #include <machine/cpu.h> static struct cpumap cpumap_active_cpus __read_mostly = { { 1 } }; diff --git a/kern/llsync.c b/kern/llsync.c index 4704e806..e3398693 100644 --- a/kern/llsync.c +++ b/kern/llsync.c @@ -45,7 +45,6 @@ #include <kern/llsync_i.h> #include <kern/macros.h> #include <kern/mutex.h> -#include <kern/param.h> #include <kern/percpu.h> #include <kern/spinlock.h> #include <kern/syscnt.h> diff --git a/kern/macros.h b/kern/macros.h index 8f0d10ca..63ded053 100644 --- a/kern/macros.h +++ b/kern/macros.h @@ -25,6 +25,11 @@ #include <stddef.h> #endif /* __ASSEMBLER__ */ +/* + * Attributes for variables that are mostly read and seldom changed. + */ +#define __read_mostly __section(".data.read_mostly") + #define MACRO_BEGIN ({ #define MACRO_END }) diff --git a/kern/percpu.c b/kern/percpu.c index 805825a8..c21376f1 100644 --- a/kern/percpu.c +++ b/kern/percpu.c @@ -25,7 +25,6 @@ #include <kern/log.h> #include <kern/macros.h> #include <kern/panic.h> -#include <kern/param.h> #include <kern/percpu.h> #include <machine/cpu.h> #include <vm/vm_kmem.h> diff --git a/kern/task.c b/kern/task.c index a5281994..af3cb4c4 100644 --- a/kern/task.c +++ b/kern/task.c @@ -23,7 +23,7 @@ #include <kern/init.h> #include <kern/kmem.h> #include <kern/list.h> -#include <kern/param.h> +#include <kern/macros.h> #include <kern/shell.h> #include <kern/spinlock.h> #include <kern/task.h> diff --git a/vm/vm_kmem.c b/vm/vm_kmem.c index a9ba842d..8139ddb1 100644 --- a/vm/vm_kmem.c +++ b/vm/vm_kmem.c @@ -24,6 +24,7 @@ #include <kern/cpumap.h> #include <kern/init.h> +#include <kern/macros.h> #include <kern/panic.h> #include <kern/param.h> #include <machine/pmap.h> diff --git a/vm/vm_kmem.h b/vm/vm_kmem.h index c4b5295c..30c7cd32 100644 --- a/vm/vm_kmem.h +++ b/vm/vm_kmem.h @@ -20,6 +20,7 @@ #include <stdint.h> +#include <kern/param.h> #include <machine/types.h> /* |