Skip to content
  • Prarit Bhargava's avatar
    5c73d5ae
    printk: remove NMI tracking · 5c73d5ae
    Prarit Bhargava authored
    Bugzilla: http://bugzilla.redhat.com/2023082
    
    
    
    commit 85e3e7fbbb720b9897fba9a99659e31cbd1c082e
    Author: John Ogness <john.ogness@linutronix.de>
    Date:   Thu Jul 15 21:39:57 2021 +0206
    
        printk: remove NMI tracking
    
        All NMI contexts are handled the same as the safe context: store the
        message and defer printing. There is no need to have special NMI
        context tracking for this. Using in_nmi() is enough.
    
        There are several parts of the kernel that are manually calling into
        the printk NMI context tracking in order to cause general printk
        deferred printing:
    
            arch/arm/kernel/smp.c
            arch/powerpc/kexec/crash.c
            kernel/trace/trace.c
    
        For arm/kernel/smp.c and powerpc/kexec/crash.c, provide a new
        function pair printk_deferred_enter/exit that explicitly achieves the
        same objective.
    
        For ftrace, remove the printk context manipulation completely. It was
        added in commit 03fc7f9c ("printk/nmi: Prevent deadlock when
        accessing the main log buffer in NMI"). The purpose was to enforce
        storing messages directly into the ring buffer even in NMI context.
        It really should have only modified the behavior in NMI context.
        There is no need for a special behavior any longer. All messages are
        always stored directly now. The console deferring is handled
        transparently in vprintk().
    
    Signed-off-by: default avatarJohn Ogness <john.ogness@linutronix.de>
        [pmladek@suse.com: Remove special handling in ftrace.c completely.
    Signed-off-by: default avatarPetr Mladek <pmladek@suse.com>
        Link: https://lore.kernel.org/r/20210715193359.25946-5-john.ogness@linutronix.de
    
    
    
    Signed-off-by: default avatarPrarit Bhargava <prarit@redhat.com>
    5c73d5ae
    printk: remove NMI tracking
    Prarit Bhargava authored
    Bugzilla: http://bugzilla.redhat.com/2023082
    
    
    
    commit 85e3e7fbbb720b9897fba9a99659e31cbd1c082e
    Author: John Ogness <john.ogness@linutronix.de>
    Date:   Thu Jul 15 21:39:57 2021 +0206
    
        printk: remove NMI tracking
    
        All NMI contexts are handled the same as the safe context: store the
        message and defer printing. There is no need to have special NMI
        context tracking for this. Using in_nmi() is enough.
    
        There are several parts of the kernel that are manually calling into
        the printk NMI context tracking in order to cause general printk
        deferred printing:
    
            arch/arm/kernel/smp.c
            arch/powerpc/kexec/crash.c
            kernel/trace/trace.c
    
        For arm/kernel/smp.c and powerpc/kexec/crash.c, provide a new
        function pair printk_deferred_enter/exit that explicitly achieves the
        same objective.
    
        For ftrace, remove the printk context manipulation completely. It was
        added in commit 03fc7f9c ("printk/nmi: Prevent deadlock when
        accessing the main log buffer in NMI"). The purpose was to enforce
        storing messages directly into the ring buffer even in NMI context.
        It really should have only modified the behavior in NMI context.
        There is no need for a special behavior any longer. All messages are
        always stored directly now. The console deferring is handled
        transparently in vprintk().
    
    Signed-off-by: default avatarJohn Ogness <john.ogness@linutronix.de>
        [pmladek@suse.com: Remove special handling in ftrace.c completely.
    Signed-off-by: default avatarPetr Mladek <pmladek@suse.com>
        Link: https://lore.kernel.org/r/20210715193359.25946-5-john.ogness@linutronix.de
    
    
    
    Signed-off-by: default avatarPrarit Bhargava <prarit@redhat.com>
Loading