summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arch/x86/machine/boot.c11
-rw-r--r--kern/mutex/mutex_adaptive.c9
-rw-r--r--kern/mutex/mutex_plain.c10
-rw-r--r--kern/rtmutex.c9
-rw-r--r--kern/thread.c17
5 files changed, 40 insertions, 16 deletions
diff --git a/arch/x86/machine/boot.c b/arch/x86/machine/boot.c
index afc41d7..6934896 100644
--- a/arch/x86/machine/boot.c
+++ b/arch/x86/machine/boot.c
@@ -350,14 +350,17 @@ boot_setup_paging(struct multiboot_raw_info *mbi, unsigned long eax)
return pmap_setup_paging();
}
+#ifdef CONFIG_X86_PAE
+#define BOOT_PAE_LABEL " PAE"
+#else /* CONFIG_X86_PAE */
+#define BOOT_PAE_LABEL
+#endif /* CONFIG_X86_PAE */
+
void __init
boot_log_info(void)
{
log_info(KERNEL_NAME "/" CONFIG_SUBARCH " " KERNEL_VERSION
-#ifdef CONFIG_X86_PAE
- " PAE"
-#endif /* CONFIG_X86_PAE */
- );
+ BOOT_PAE_LABEL);
}
static void * __init
diff --git a/kern/mutex/mutex_adaptive.c b/kern/mutex/mutex_adaptive.c
index bda5453..db92f9d 100644
--- a/kern/mutex/mutex_adaptive.c
+++ b/kern/mutex/mutex_adaptive.c
@@ -333,9 +333,14 @@ mutex_adaptive_setup(void)
return 0;
}
-INIT_OP_DEFINE(mutex_adaptive_setup,
- INIT_OP_DEP(mutex_adaptive_bootstrap, true),
#ifdef CONFIG_MUTEX_DEBUG
+#define MUTEX_ADAPTIVE_DEBUG_INIT_OP_DEPS \
INIT_OP_DEP(syscnt_setup, true),
+#else /* CONFIG_MUTEX_DEBUG */
+#define MUTEX_ADAPTIVE_DEBUG_INIT_OP_DEPS
#endif /* CONFIG_MUTEX_DEBUG */
+
+INIT_OP_DEFINE(mutex_adaptive_setup,
+ INIT_OP_DEP(mutex_adaptive_bootstrap, true),
+ MUTEX_ADAPTIVE_DEBUG_INIT_OP_DEPS
);
diff --git a/kern/mutex/mutex_plain.c b/kern/mutex/mutex_plain.c
index 266bd70..f12f13f 100644
--- a/kern/mutex/mutex_plain.c
+++ b/kern/mutex/mutex_plain.c
@@ -173,9 +173,15 @@ mutex_plain_setup(void)
return 0;
}
-INIT_OP_DEFINE(mutex_plain_setup,
- INIT_OP_DEP(mutex_plain_bootstrap, true),
#ifdef CONFIG_MUTEX_DEBUG
+#define MUTEX_PLAIN_DEBUG_INIT_OP_DEPS \
INIT_OP_DEP(syscnt_setup, true),
+#else /* CONFIG_MUTEX_DEBUG */
+#define MUTEX_PLAIN_DEBUG_INIT_OP_DEPS
#endif /* CONFIG_MUTEX_DEBUG */
+
+
+INIT_OP_DEFINE(mutex_plain_setup,
+ INIT_OP_DEP(mutex_plain_bootstrap, true),
+ MUTEX_PLAIN_DEBUG_INIT_OP_DEPS
);
diff --git a/kern/rtmutex.c b/kern/rtmutex.c
index 7457196..55d17cd 100644
--- a/kern/rtmutex.c
+++ b/kern/rtmutex.c
@@ -240,9 +240,14 @@ rtmutex_setup(void)
return 0;
}
-INIT_OP_DEFINE(rtmutex_setup,
- INIT_OP_DEP(rtmutex_bootstrap, true),
#ifdef CONFIG_MUTEX_DEBUG
+#define RTMUTEX_DEBUG_INIT_OPS \
INIT_OP_DEP(syscnt_setup, true),
+#else /* CONFIG_MUTEX_DEBUG */
+#define RTMUTEX_DEBUG_INIT_OPS
#endif /* CONFIG_MUTEX_DEBUG */
+
+INIT_OP_DEFINE(rtmutex_setup,
+ INIT_OP_DEP(rtmutex_bootstrap, true),
+ RTMUTEX_DEBUG_INIT_OPS
);
diff --git a/kern/thread.c b/kern/thread.c
index 601cc3f..330b537 100644
--- a/kern/thread.c
+++ b/kern/thread.c
@@ -2310,6 +2310,15 @@ thread_setup(void)
return 0;
}
+#ifdef CONFIG_THREAD_STACK_GUARD
+#define THREAD_STACK_GUARD_INIT_OP_DEPS \
+ INIT_OP_DEP(vm_kmem_setup, true), \
+ INIT_OP_DEP(vm_map_setup, true), \
+ INIT_OP_DEP(vm_page_setup, true),
+#else /* CONFIG_THREAD_STACK_GUARD */
+#define THREAD_STACK_GUARD_INIT_OP_DEPS
+#endif /* CONFIG_THREAD_STACK_GUARD */
+
INIT_OP_DEFINE(thread_setup,
INIT_OP_DEP(cpumap_setup, true),
INIT_OP_DEP(kmem_setup, true),
@@ -2318,12 +2327,8 @@ INIT_OP_DEFINE(thread_setup,
INIT_OP_DEP(task_setup, true),
INIT_OP_DEP(thread_bootstrap, true),
INIT_OP_DEP(turnstile_setup, true),
-#ifdef CONFIG_THREAD_STACK_GUARD
- INIT_OP_DEP(vm_kmem_setup, true),
- INIT_OP_DEP(vm_map_setup, true),
- INIT_OP_DEP(vm_page_setup, true),
-#endif
- );
+ THREAD_STACK_GUARD_INIT_OP_DEPS
+);
void __init
thread_ap_setup(void)