diff options
author | Petr Mladek <pmladek@suse.com> | 2020-02-24 13:13:31 +0100 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2020-05-19 15:51:16 +0200 |
commit | 8c4e93c362ff114def211d4629b120af86eb1275 (patch) | |
tree | e2568aa0d2327ceb10846e0273740820f6d6c4ac /kernel/printk/internal.h | |
parent | 1ed0948eea079a4c802d08cdb2e8db1eee0860f1 (diff) | |
download | lwn-8c4e93c362ff114def211d4629b120af86eb1275.tar.gz lwn-8c4e93c362ff114def211d4629b120af86eb1275.zip |
printk: Prepare for nested printk_nmi_enter()
There is plenty of space in the printk_context variable. Reserve one byte
there for the NMI context to be on the safe side.
It should never overflow. The BUG_ON(in_nmi() == NMI_MASK) in nmi_enter()
will trigger much earlier.
Signed-off-by: Petr Mladek <pmladek@suse.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Alexandre Chartre <alexandre.chartre@oracle.com>
Link: https://lkml.kernel.org/r/20200505134100.681374113@linutronix.de
Diffstat (limited to 'kernel/printk/internal.h')
-rw-r--r-- | kernel/printk/internal.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/kernel/printk/internal.h b/kernel/printk/internal.h index b2b0f526f249..660f9a6bf73a 100644 --- a/kernel/printk/internal.h +++ b/kernel/printk/internal.h @@ -6,9 +6,11 @@ #ifdef CONFIG_PRINTK -#define PRINTK_SAFE_CONTEXT_MASK 0x3fffffff -#define PRINTK_NMI_DIRECT_CONTEXT_MASK 0x40000000 -#define PRINTK_NMI_CONTEXT_MASK 0x80000000 +#define PRINTK_SAFE_CONTEXT_MASK 0x007ffffff +#define PRINTK_NMI_DIRECT_CONTEXT_MASK 0x008000000 +#define PRINTK_NMI_CONTEXT_MASK 0xff0000000 + +#define PRINTK_NMI_CONTEXT_OFFSET 0x010000000 extern raw_spinlock_t logbuf_lock; |