diff options
author | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2018-05-06 07:00:40 +0300 |
---|---|---|
committer | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2018-05-09 05:21:21 +0000 |
commit | cebb6844170e4085ecb6fa2bb2cb5851d41ca641 (patch) | |
tree | 74277d4c3926d73cc1034ed9da56a14441db97e2 /src/console | |
parent | f5b7e80c22322578f09431b98dfaf9033eb5480e (diff) |
console: Skip non-BSP printk() earlier
Fix regression after commit:
6032018 console: only allow console messages after initialization
Bail out early on AP CPUs, this avoids use of CAR_GLOBAL when
we have SQUELCH_EARLY_SMP=y.
Change-Id: I506c5fbec43a6eb6f6d9362d62a040def9e1e7bb
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/26120
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'src/console')
-rw-r--r-- | src/console/printk.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/console/printk.c b/src/console/printk.c index 2f7e27719b..c10cf97dc4 100644 --- a/src/console/printk.c +++ b/src/console/printk.c @@ -44,13 +44,12 @@ int do_printk(int msg_level, const char *fmt, ...) va_list args; int i; - if (!console_log_level(msg_level)) + if (IS_ENABLED(CONFIG_SQUELCH_EARLY_SMP) && ENV_CACHE_AS_RAM && + !boot_cpu()) return 0; -#if IS_ENABLED (CONFIG_SQUELCH_EARLY_SMP) && defined(__PRE_RAM__) - if (!boot_cpu()) + if (!console_log_level(msg_level)) return 0; -#endif DISABLE_TRACE; #ifdef __PRE_RAM__ |