summaryrefslogtreecommitdiff
path: root/kern
diff options
context:
space:
mode:
authorRichard Braun <rbraun@sceen.net>2017-03-14 02:01:23 +0100
committerRichard Braun <rbraun@sceen.net>2017-03-14 02:01:23 +0100
commit3578ec83e47c757dc69af2f2876bba5218b38d68 (patch)
treeeaf52f6fbe99ef36a2e6c39a16e59714b3e7562c /kern
parentf85ad668fafcfac5887cad39519ff8a34624a4a0 (diff)
Use the X15 namespace consistently for macros defined by autoconf
Diffstat (limited to 'kern')
-rw-r--r--kern/cpumap.h28
-rw-r--r--kern/kernel.c8
-rw-r--r--kern/kmem_i.h2
-rw-r--r--kern/percpu.c4
-rw-r--r--kern/percpu.h4
-rw-r--r--kern/thread.c2
-rw-r--r--kern/work.c2
-rw-r--r--kern/xcall.c2
8 files changed, 26 insertions, 26 deletions
diff --git a/kern/cpumap.h b/kern/cpumap.h
index 68a040ce..1843a99a 100644
--- a/kern/cpumap.h
+++ b/kern/cpumap.h
@@ -29,31 +29,31 @@
#include <kern/bitmap.h>
struct cpumap {
- BITMAP_DECLARE(cpus, MAX_CPUS);
+ BITMAP_DECLARE(cpus, X15_MAX_CPUS);
};
static inline void
cpumap_zero(struct cpumap *cpumap)
{
- bitmap_zero(cpumap->cpus, MAX_CPUS);
+ bitmap_zero(cpumap->cpus, X15_MAX_CPUS);
}
static inline void
cpumap_fill(struct cpumap *cpumap)
{
- bitmap_fill(cpumap->cpus, MAX_CPUS);
+ bitmap_fill(cpumap->cpus, X15_MAX_CPUS);
}
static inline void
cpumap_copy(struct cpumap *dest, const struct cpumap *src)
{
- bitmap_copy(dest->cpus, src->cpus, MAX_CPUS);
+ bitmap_copy(dest->cpus, src->cpus, X15_MAX_CPUS);
}
static inline int
cpumap_cmp(const struct cpumap *a, const struct cpumap *b)
{
- return bitmap_cmp(a->cpus, b->cpus, MAX_CPUS);
+ return bitmap_cmp(a->cpus, b->cpus, X15_MAX_CPUS);
}
static inline void
@@ -89,50 +89,50 @@ cpumap_test(const struct cpumap *cpumap, int index)
static inline void
cpumap_and(struct cpumap *a, const struct cpumap *b)
{
- bitmap_and(a->cpus, b->cpus, MAX_CPUS);
+ bitmap_and(a->cpus, b->cpus, X15_MAX_CPUS);
}
static inline void
cpumap_or(struct cpumap *a, const struct cpumap *b)
{
- bitmap_or(a->cpus, b->cpus, MAX_CPUS);
+ bitmap_or(a->cpus, b->cpus, X15_MAX_CPUS);
}
static inline void
cpumap_xor(struct cpumap *a, const struct cpumap *b)
{
- bitmap_xor(a->cpus, b->cpus, MAX_CPUS);
+ bitmap_xor(a->cpus, b->cpus, X15_MAX_CPUS);
}
static inline int
cpumap_find_next(const struct cpumap *cpumap, int index)
{
- return bitmap_find_next(cpumap->cpus, MAX_CPUS, index);
+ return bitmap_find_next(cpumap->cpus, X15_MAX_CPUS, index);
}
static inline int
cpumap_find_first(const struct cpumap *cpumap)
{
- return bitmap_find_first(cpumap->cpus, MAX_CPUS);
+ return bitmap_find_first(cpumap->cpus, X15_MAX_CPUS);
}
static inline int
cpumap_find_next_zero(const struct cpumap *cpumap, int index)
{
- return bitmap_find_next_zero(cpumap->cpus, MAX_CPUS, index);
+ return bitmap_find_next_zero(cpumap->cpus, X15_MAX_CPUS, index);
}
static inline int
cpumap_find_first_zero(const struct cpumap *cpumap)
{
- return bitmap_find_first_zero(cpumap->cpus, MAX_CPUS);
+ return bitmap_find_first_zero(cpumap->cpus, X15_MAX_CPUS);
}
#define cpumap_for_each(cpumap, index) \
- bitmap_for_each((cpumap)->cpus, MAX_CPUS, index)
+ bitmap_for_each((cpumap)->cpus, X15_MAX_CPUS, index)
#define cpumap_for_each_zero(cpumap, index) \
- bitmap_for_each_zero((cpumap)->cpus, MAX_CPUS, index)
+ bitmap_for_each_zero((cpumap)->cpus, X15_MAX_CPUS, index)
/*
* Initialize the cpumap module.
diff --git a/kern/kernel.c b/kern/kernel.c
index cd3d3e3b..33f3e6b0 100644
--- a/kern/kernel.c
+++ b/kern/kernel.c
@@ -30,9 +30,9 @@
#include <machine/cpu.h>
#include <vm/vm_page.h>
-#ifdef RUN_TEST_MODULE
+#ifdef X15_RUN_TEST_MODULE
#include <test/test.h>
-#endif /* RUN_TEST_MODULE */
+#endif /* X15_RUN_TEST_MODULE */
void __init
kernel_main(void)
@@ -51,9 +51,9 @@ kernel_main(void)
sref_setup();
vm_page_info();
-#ifdef RUN_TEST_MODULE
+#ifdef X15_RUN_TEST_MODULE
test_setup();
-#endif /* RUN_TEST_MODULE */
+#endif /* X15_RUN_TEST_MODULE */
/*
* Enabling application processors is done late in the boot process for
diff --git a/kern/kmem_i.h b/kern/kmem_i.h
index 01277f49..f3ad8228 100644
--- a/kern/kmem_i.h
+++ b/kern/kmem_i.h
@@ -169,7 +169,7 @@ struct kmem_slab {
*/
struct kmem_cache {
/* CPU pool layer */
- struct kmem_cpu_pool cpu_pools[MAX_CPUS];
+ struct kmem_cpu_pool cpu_pools[X15_MAX_CPUS];
struct kmem_cpu_pool_type *cpu_pool_type;
/* Slab layer */
diff --git a/kern/percpu.c b/kern/percpu.c
index b57788ed..6e0c77d0 100644
--- a/kern/percpu.c
+++ b/kern/percpu.c
@@ -31,7 +31,7 @@
#include <vm/vm_kmem.h>
#include <vm/vm_page.h>
-void *percpu_areas[MAX_CPUS] __read_mostly;
+void *percpu_areas[X15_MAX_CPUS] __read_mostly;
static void *percpu_area_content __initdata;
static size_t percpu_area_size __initdata;
@@ -50,7 +50,7 @@ percpu_setup(void)
unsigned int order;
percpu_area_size = &_epercpu - &_percpu;
- printk("percpu: max_cpus: %u, section size: %zuk\n", MAX_CPUS,
+ printk("percpu: max_cpus: %u, section size: %zuk\n", X15_MAX_CPUS,
percpu_area_size >> 10);
assert(vm_page_aligned(percpu_area_size));
diff --git a/kern/percpu.h b/kern/percpu.h
index 456131a0..73867472 100644
--- a/kern/percpu.h
+++ b/kern/percpu.h
@@ -84,10 +84,10 @@ extern char _epercpu;
static inline void *
percpu_area(unsigned int cpu)
{
- extern void *percpu_areas[MAX_CPUS];
+ extern void *percpu_areas[X15_MAX_CPUS];
void *area;
- assert(cpu < MAX_CPUS);
+ assert(cpu < X15_MAX_CPUS);
area = percpu_areas[cpu];
assert(area != NULL);
return area;
diff --git a/kern/thread.c b/kern/thread.c
index 8ccf628d..81f6594a 100644
--- a/kern/thread.c
+++ b/kern/thread.c
@@ -280,7 +280,7 @@ static struct thread_runq thread_runq __percpu;
* Statically allocated fake threads that provide thread context to processors
* during bootstrap.
*/
-static struct thread thread_booters[MAX_CPUS] __initdata;
+static struct thread thread_booters[X15_MAX_CPUS] __initdata;
static struct kmem_cache thread_cache;
static struct kmem_cache thread_stack_cache;
diff --git a/kern/work.c b/kern/work.c
index 3ba6d2b2..f8e8e340 100644
--- a/kern/work.c
+++ b/kern/work.c
@@ -52,7 +52,7 @@
*/
#define WORK_THREADS_RATIO 4
#define WORK_THREADS_THRESHOLD 512
-#define WORK_MAX_THREADS MAX(MAX_CPUS, WORK_THREADS_THRESHOLD)
+#define WORK_MAX_THREADS MAX(X15_MAX_CPUS, WORK_THREADS_THRESHOLD)
/*
* Work pool flags.
diff --git a/kern/xcall.c b/kern/xcall.c
index 565cd20a..c36f3c48 100644
--- a/kern/xcall.c
+++ b/kern/xcall.c
@@ -49,7 +49,7 @@ struct xcall {
* between multiple cross-calls.
*/
struct xcall_cpu_data {
- struct xcall send_calls[MAX_CPUS];
+ struct xcall send_calls[X15_MAX_CPUS];
struct xcall *recv_call;
struct spinlock lock;