Skip to content
Snippets Groups Projects
Select Git revision
  • d6f068a53b5a7d719e7c66554356a2af6da9cda7
  • vme-testing default
  • ci-test
  • master
  • remoteproc
  • am625-sk-ov5640
  • pcal6534-upstreaming
  • lps22df-upstreaming
  • msc-upstreaming
  • imx8mp
  • iio/noa1305
  • vme-next
  • vme-next-4.14-rc4
  • v4.14-rc4
  • v4.14-rc3
  • v4.14-rc2
  • v4.14-rc1
  • v4.13
  • vme-next-4.13-rc7
  • v4.13-rc7
  • v4.13-rc6
  • v4.13-rc5
  • v4.13-rc4
  • v4.13-rc3
  • v4.13-rc2
  • v4.13-rc1
  • v4.12
  • v4.12-rc7
  • v4.12-rc6
  • v4.12-rc5
  • v4.12-rc4
  • v4.12-rc3
32 results

logger_interface.h

Blame
  • printk.c 25.20 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 
     *     manfreds@colorfullife.com
     * Rewrote bits to get rid of console_lock
     *	01Mar01 Andrew Morton <andrewm@uow.edu.au>
     */
    
    #include <linux/kernel.h>
    #include <linux/mm.h>
    #include <linux/tty.h>
    #include <linux/tty_driver.h>
    #include <linux/smp_lock.h>
    #include <linux/console.h>
    #include <linux/init.h>
    #include <linux/module.h>
    #include <linux/interrupt.h>			/* For in_interrupt() */
    #include <linux/config.h>
    #include <linux/delay.h>
    #include <linux/smp.h>
    #include <linux/security.h>
    #include <linux/bootmem.h>
    #include <linux/syscalls.h>
    
    #include <asm/uaccess.h>
    
    #define __LOG_BUF_LEN	(1 << CONFIG_LOG_BUF_SHIFT)
    
    /* printk's without a loglevel use this.. */
    #define DEFAULT_MESSAGE_LOGLEVEL 4 /* KERN_WARNING */
    
    /* We show everything that is MORE important than this.. */
    #define MINIMUM_CONSOLE_LOGLEVEL 1 /* Minimum loglevel we let people use */
    #define DEFAULT_CONSOLE_LOGLEVEL 7 /* anything MORE serious than KERN_DEBUG */
    
    DECLARE_WAIT_QUEUE_HEAD(log_wait);
    
    int console_printk[4] = {
    	DEFAULT_CONSOLE_LOGLEVEL,	/* console_loglevel */
    	DEFAULT_MESSAGE_LOGLEVEL,	/* default_message_loglevel */
    	MINIMUM_CONSOLE_LOGLEVEL,	/* minimum_console_loglevel */
    	DEFAULT_CONSOLE_LOGLEVEL,	/* default_console_loglevel */
    };
    
    EXPORT_SYMBOL(console_printk);
    
    /*
     * Low lever drivers may need that to know if they can schedule in
     * their unblank() callback or not. So let's export it.
     */
    int oops_in_progress;
    EXPORT_SYMBOL(oops_in_progress);
    
    /*
     * console_sem protects the console_drivers list, and also
     * provides serialisation for access to the entire console
     * driver system.
     */
    static DECLARE_MUTEX(console_sem);
    struct console *console_drivers;