summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Braun <rbraun@sceen.net>2017-10-31 00:53:02 +0100
committerRichard Braun <rbraun@sceen.net>2017-10-31 00:53:02 +0100
commit3aa27e426b61b92cdb0e5b5503dd12ece85b4d69 (patch)
tree545c6ce2ff6c0d6ec795cd87a7d0fd623504c28b
parent3fc6079789f3a6c4b7fdb885bac7da2ffde11634 (diff)
parentb5c668a0b8fdc6e9c3b60765b1a7f321916b49c8 (diff)
Merge branch 'master' into arm_port_dev
-rw-r--r--arch/x86/machine/pmap.c1
-rw-r--r--kern/Kconfig10
-rw-r--r--kern/fmt.c6
-rw-r--r--kern/macros.h9
-rw-r--r--kern/sleepq.c2
-rwxr-xr-xtools/build_configs.py6
6 files changed, 24 insertions, 10 deletions
diff --git a/arch/x86/machine/pmap.c b/arch/x86/machine/pmap.c
index fc2c0a0f..5ed05027 100644
--- a/arch/x86/machine/pmap.c
+++ b/arch/x86/machine/pmap.c
@@ -40,7 +40,6 @@
#include <machine/biosmem.h>
#include <machine/boot.h>
#include <machine/cpu.h>
-#include <machine/lapic.h>
#include <machine/page.h>
#include <machine/pmap.h>
#include <machine/tcb.h>
diff --git a/kern/Kconfig b/kern/Kconfig
index df0cbacb..7c718d4c 100644
--- a/kern/Kconfig
+++ b/kern/Kconfig
@@ -1,16 +1,16 @@
menu "General setup"
-config MULTIPROCESSOR
+config SMP
bool "Multiprocessor support"
default y
---help---
Enable support for machines with multiple processors.
config MAX_CPUS
- int "Maximum number of supported CPUs" if MULTIPROCESSOR
- range 2 512 if MULTIPROCESSOR
- default "1" if !MULTIPROCESSOR
- default "128" if MULTIPROCESSOR
+ int "Maximum number of supported CPUs" if SMP
+ range 2 512 if SMP
+ default "1" if !SMP
+ default "128" if SMP
---help---
Maximum number of supported processors.
diff --git a/kern/fmt.c b/kern/fmt.c
index 03ababe4..1ba77cb0 100644
--- a/kern/fmt.c
+++ b/kern/fmt.c
@@ -326,6 +326,7 @@ fmt_sprintf_state_consume_modifier(struct fmt_sprintf_state *state)
break;
case 'z':
state->modifier = FMT_MODIFIER_SIZE;
+ __fallthrough;
case 't':
state->modifier = FMT_MODIFIER_PTRDIFF;
break;
@@ -347,6 +348,7 @@ fmt_sprintf_state_consume_specifier(struct fmt_sprintf_state *state)
case 'd':
case 'i':
state->flags |= FMT_FORMAT_CONV_SIGNED;
+ __fallthrough;
case 'u':
state->base = 10;
state->specifier = FMT_SPECIFIER_INT;
@@ -358,8 +360,10 @@ fmt_sprintf_state_consume_specifier(struct fmt_sprintf_state *state)
case 'p':
state->flags |= FMT_FORMAT_ALT_FORM;
state->modifier = FMT_MODIFIER_PTR;
+ __fallthrough;
case 'x':
state->flags |= FMT_FORMAT_LOWER;
+ __fallthrough;
case 'X':
state->base = 16;
state->specifier = FMT_SPECIFIER_INT;
@@ -1011,6 +1015,7 @@ fmt_sscanf_state_consume_specifier(struct fmt_sscanf_state *state)
break;
case 'd':
state->flags |= FMT_FORMAT_CONV_SIGNED;
+ __fallthrough;
case 'u':
state->base = 10;
state->specifier = FMT_SPECIFIER_INT;
@@ -1021,6 +1026,7 @@ fmt_sscanf_state_consume_specifier(struct fmt_sscanf_state *state)
break;
case 'p':
state->modifier = FMT_MODIFIER_PTR;
+ __fallthrough;
case 'x':
case 'X':
state->base = 16;
diff --git a/kern/macros.h b/kern/macros.h
index d09eca40..23ad4d22 100644
--- a/kern/macros.h
+++ b/kern/macros.h
@@ -106,4 +106,13 @@ moo_print(const char *s)
#define __used __attribute__((used))
#endif
+#ifndef __fallthrough
+#if __GNUC__ >= 7
+#define __fallthrough __attribute__((fallthrough))
+#else
+/* TODO: clang 6 might add support for -Wimplicit-fallthrough */
+#define __fallthrough
+#endif
+#endif
+
#endif /* _KERN_MACROS_H */
diff --git a/kern/sleepq.c b/kern/sleepq.c
index 294ad7ca..77bcd021 100644
--- a/kern/sleepq.c
+++ b/kern/sleepq.c
@@ -450,7 +450,7 @@ sleepq_wait_common(struct sleepq *sleepq, const char *wchan,
sleepq_waiter_init(&waiter, thread);
sleepq_add_waiter(sleepq, &waiter);
- do {
+ do {
if (!timed) {
thread_sleep(&sleepq->bucket->lock, sleepq->sync_obj, wchan);
error = 0;
diff --git a/tools/build_configs.py b/tools/build_configs.py
index 96d1fbbe..00d05921 100755
--- a/tools/build_configs.py
+++ b/tools/build_configs.py
@@ -78,7 +78,7 @@ all_cc_options_dict = {
small_options_dict = {
'CONFIG_CC_OPTIONS' : gen_cc_options_list(all_cc_options_dict),
- 'CONFIG_MULTIPROCESSOR' : ['y', 'n'],
+ 'CONFIG_SMP' : ['y', 'n'],
'CONFIG_MAX_CPUS' : ['1', '128'],
'CONFIG_ASSERT' : ['y', 'n'],
}
@@ -113,11 +113,11 @@ all_filters_list = [
'CONFIG_CC_OPTIONS' : [True, re.compile('-flto')],
},
{
- 'CONFIG_MULTIPROCESSOR' : [True, 'y'],
+ 'CONFIG_SMP' : [True, 'y'],
'CONFIG_MAX_CPUS' : [True, '1'],
},
{
- 'CONFIG_MULTIPROCESSOR' : [True, 'n'],
+ 'CONFIG_SMP' : [True, 'n'],
'CONFIG_MAX_CPUS' : [False, '1'],
},
{