Skip to content
Snippets Groups Projects
Select Git revision
  • cf9b1106c81c45cde02208fca49d3f3e4ab6ee74
  • openEuler-1.0-LTS default protected
  • openEuler-22.09
  • OLK-5.10
  • openEuler-22.03-LTS
  • openEuler-22.03-LTS-Ascend
  • master
  • openEuler-22.03-LTS-LoongArch-NW
  • openEuler-22.09-HCK
  • openEuler-20.03-LTS-SP3
  • openEuler-21.09
  • openEuler-21.03
  • openEuler-20.09
  • 4.19.90-2210.5.0
  • 5.10.0-123.0.0
  • 5.10.0-60.63.0
  • 5.10.0-60.62.0
  • 4.19.90-2210.4.0
  • 5.10.0-121.0.0
  • 5.10.0-60.61.0
  • 4.19.90-2210.3.0
  • 5.10.0-60.60.0
  • 5.10.0-120.0.0
  • 5.10.0-60.59.0
  • 5.10.0-119.0.0
  • 4.19.90-2210.2.0
  • 4.19.90-2210.1.0
  • 5.10.0-118.0.0
  • 5.10.0-106.19.0
  • 5.10.0-60.58.0
  • 4.19.90-2209.6.0
  • 5.10.0-106.18.0
  • 5.10.0-106.17.0
33 results

printk.c

Blame
  • printk.c 80.99 KiB
    /*
     *  linux/kernel/printk.c
     *
     *  Copyright (C) 1991, 1992  Linus Torvalds
     *
     * Modified to make sys_syslog() more flexible: added commands to
     * return the last 4k of kernel messages, regardless of whether
     * they've been read or not.  Added option to suppress kernel printk's
     * to the console.  Added hook for sending the console messages
     * elsewhere, in preparation for a serial line console (someday).
     * Ted Ts'o, 2/11/93.
     * Modified for sysctl support, 1/8/97, Chris Horn.
     * Fixed SMP synchronization, 08/08/99, Manfred Spraul
     *     manfred@colorfullife.com
     * Rewrote bits to get rid of console_lock
     *	01Mar01 Andrew Morton
     */
    
    #include <linux/kernel.h>
    #include <linux/mm.h>
    #include <linux/tty.h>
    #include <linux/tty_driver.h>
    #include <linux/console.h>
    #include <linux/init.h>
    #include <linux/jiffies.h>
    #include <linux/nmi.h>
    #include <linux/module.h>
    #include <linux/moduleparam.h>
    #include <linux/interrupt.h>			/* For in_interrupt() */
    #include <linux/delay.h>
    #include <linux/smp.h>
    #include <linux/security.h>
    #include <linux/bootmem.h>
    #include <linux/memblock.h>
    #include <linux/syscalls.h>
    #include <linux/kexec.h>
    #include <linux/kdb.h>
    #include <linux/ratelimit.h>
    #include <linux/kmsg_dump.h>
    #include <linux/syslog.h>
    #include <linux/cpu.h>
    #include <linux/notifier.h>
    #include <linux/rculist.h>
    #include <linux/poll.h>
    #include <linux/irq_work.h>
    #include <linux/utsname.h>
    #include <linux/ctype.h>
    #include <linux/uio.h>
    
    #include <asm/uaccess.h>
    #include <asm-generic/sections.h>
    
    #define CREATE_TRACE_POINTS
    #include <trace/events/printk.h>
    
    #include "console_cmdline.h"
    #include "braille.h"
    #include "internal.h"
    
    int console_printk[4] = {
    	CONSOLE_LOGLEVEL_DEFAULT,	/* console_loglevel */
    	MESSAGE_LOGLEVEL_DEFAULT,	/* default_message_loglevel */
    	CONSOLE_LOGLEVEL_MIN,		/* minimum_console_loglevel */
    	CONSOLE_LOGLEVEL_DEFAULT,	/* default_console_loglevel */
    };
    
    /*
     * Low level drivers may need that to know if they can schedule in
     * their unblank() callback or not. So let's export it.
     */