aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuis R. Rodriguez <mcgrof@kernel.org>2016-05-25 20:47:59 -0700
committerLuis R. Rodriguez <mcgrof@kernel.org>2016-05-25 20:47:39 -0700
commitf89c6c0bddcbdc8e81853240d4556e07708f0b84 (patch)
treea7b1271519c2cac8305d74b67f8d55d041a2323a
parent3f7fc849a2516957834bc39969625dd5898a77a4 (diff)
downloadlinker-tables-20160525-dev-v3.tar.gz
compiler.h, kprobes.h: add missing header files20160525-dev-v3
I forgot to add these, and fix a few compile errors. Signed-off-by: Luis R. Rodriguez <mcgrof@kernel.org>
-rw-r--r--arch/x86/kernel/init.c2
-rw-r--r--arch/x86/kernel/sort-init.c10
-rw-r--r--include/linux/compiler.h10
-rw-r--r--include/linux/kprobes.h4
4 files changed, 20 insertions, 6 deletions
diff --git a/arch/x86/kernel/init.c b/arch/x86/kernel/init.c
index f16f1d4..e7ed26f 100644
--- a/arch/x86/kernel/init.c
+++ b/arch/x86/kernel/init.c
@@ -24,7 +24,7 @@ void x86_init_fn_early_init(void)
int ret;
struct x86_init_fn *init_fn;
- unsigned int num_inits = SECTION_RANGE_SIZE(x86_init_fns);
+ unsigned int num_inits = LINUX_SECTION_SIZE(x86_init_fns);
pr_info("Number of init entries: %d\n", num_inits);
diff --git a/arch/x86/kernel/sort-init.c b/arch/x86/kernel/sort-init.c
index 6a1f068..6bf5eac 100644
--- a/arch/x86/kernel/sort-init.c
+++ b/arch/x86/kernel/sort-init.c
@@ -102,13 +102,13 @@ static void x86_init_fn_check(struct x86_init_fn *start,
void __ref x86_init_fn_init_tables(void)
{
- unsigned int num_inits = SECTION_RANGE_SIZE(x86_init_fns);
+ unsigned int num_inits = LINUX_SECTION_SIZE(x86_init_fns);
if (!num_inits)
return;
- x86_init_fn_sort(SECTION_RANGE_START(x86_init_fns),
- SECTION_RANGE_END(x86_init_fns));
- x86_init_fn_check(SECTION_RANGE_START(x86_init_fns),
- SECTION_RANGE_END(x86_init_fns));
+ x86_init_fn_sort(LINUX_SECTION_START(x86_init_fns),
+ LINUX_SECTION_END(x86_init_fns));
+ x86_init_fn_check(LINUX_SECTION_START(x86_init_fns),
+ LINUX_SECTION_END(x86_init_fns));
}
diff --git a/include/linux/compiler.h b/include/linux/compiler.h
new file mode 100644
index 0000000..1a98213
--- /dev/null
+++ b/include/linux/compiler.h
@@ -0,0 +1,10 @@
+#ifndef __LINUX_COMPILER_H
+#define __LINUX_COMPILER_H
+
+#include <linux/sections.h>
+
+#ifdef CONFIG_KPROBES
+#define __kprobes __LINUX_SECTION(SECTION_TEXT, kprobes)
+#endif
+
+#endif /* __LINUX_COMPILER_H */
diff --git a/include/linux/kprobes.h b/include/linux/kprobes.h
new file mode 100644
index 0000000..de5c9ec
--- /dev/null
+++ b/include/linux/kprobes.h
@@ -0,0 +1,4 @@
+#include <linux/ranges.h>
+#include <linux/compiler.h>
+
+DECLARE_SECTION_RANGE(kprobes);