#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>
#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 <asm/uaccess.h>
#include <trace/events/printk.h>
Go to the source code of this file.
|
add_preferred_console - add a device to the list of preferred consoles.
: device index : options for this console
The last preferred console added will be used for kernel messages and stdin/out/err for init. Normally this is used by console_setup above to handle user-supplied console arguments; however it can also be used by arch-specific code either to override the user or more commonly to provide a default console (ie from PROM variables) when the user has not supplied one.
|
#define | PRINTK_BUF_SIZE 512 |
|
#define | PRINTK_PENDING_WAKEUP 0x01 |
|
#define | PRINTK_PENDING_SCHED 0x02 |
|
bool | console_suspend_enabled = 1 |
|
int | add_preferred_console (char *name, int idx, char *options) |
|
int | update_console_cmdline (char *name, int idx, char *name_new, int idx_new, char *options) |
|
| EXPORT_SYMBOL (console_suspend_enabled) |
|
| __setup ("no_console_suspend", console_suspend_disable) |
|
| module_param_named (console_suspend, console_suspend_enabled, bool, S_IRUGO|S_IWUSR) |
|
| MODULE_PARM_DESC (console_suspend,"suspend console during suspend"" and hibernate operations") |
|
void | suspend_console (void) |
|
void | resume_console (void) |
|
void | console_lock (void) |
|
| EXPORT_SYMBOL (console_lock) |
|
int | console_trylock (void) |
|
| EXPORT_SYMBOL (console_trylock) |
|
int | is_console_locked (void) |
|
void | printk_tick (void) |
|
int | printk_needs_cpu (int cpu) |
|
void | wake_up_klogd (void) |
|
void | console_unlock (void) |
|
| EXPORT_SYMBOL (console_unlock) |
|
void __sched | console_conditional_schedule (void) |
|
| EXPORT_SYMBOL (console_conditional_schedule) |
|
void | console_unblank (void) |
|
struct tty_driver * | console_device (int *index) |
|
void | console_stop (struct console *console) |
|
| EXPORT_SYMBOL (console_stop) |
|
void | console_start (struct console *console) |
|
| EXPORT_SYMBOL (console_start) |
|
| early_param ("keep_bootcon", keep_bootcon_setup) |
|
void | register_console (struct console *newcon) |
|
| EXPORT_SYMBOL (register_console) |
|
int | unregister_console (struct console *console) |
|
| EXPORT_SYMBOL (unregister_console) |
|
| late_initcall (printk_late_init) |
|
#define CREATE_TRACE_POINTS |
#define DEFAULT_CONSOLE_LOGLEVEL 7 /* anything MORE serious than KERN_DEBUG */ |
#define DEFAULT_MESSAGE_LOGLEVEL CONFIG_DEFAULT_MESSAGE_LOGLEVEL |
#define MAX_CMDLINECONSOLES 8 |
#define MINIMUM_CONSOLE_LOGLEVEL 1 /* Minimum loglevel we let people use */ |
#define PRINTK_BUF_SIZE 512 |
#define PRINTK_PENDING_SCHED 0x02 |
#define PRINTK_PENDING_WAKEUP 0x01 |
- Enumerator:
LOG_NOCONS |
|
LOG_NEWLINE |
|
LOG_PREFIX |
|
LOG_CONT |
|
Definition at line 196 of file printk.c.
__setup |
( |
"no_console_suspend" |
, |
|
|
console_suspend_disable |
|
|
) |
| |
console_conditional_schedule - yield the CPU if required
If the console code is currently allowed to sleep, and if this CPU should yield the CPU to another task, do so here.
Must be called within console_lock();.
Definition at line 2134 of file printk.c.
console_lock - lock the console system for exclusive use.
Acquires a lock which guarantees that the caller has exclusive access to the console system and the console_drivers list.
Can sleep, returns nothing.
Definition at line 1909 of file printk.c.
console_trylock - try to lock the console system for exclusive use.
Tried to acquire a lock which guarantees that the caller has exclusive access to the console system and the console_drivers list.
returns 1 on success, and 0 on failure to acquire the lock.
Definition at line 1928 of file printk.c.
console_unlock - unlock the console system
Releases the console_lock which the caller holds on the console system and the console driver list.
While the console_lock was held, console output may have been buffered by printk(). If this is the case, console_unlock(); emits the output prior to releasing the lock.
If there is output waiting, we wake /dev/kmsg and syslog() users.
console_unlock(); may be called from any context.
Definition at line 2027 of file printk.c.
early_param |
( |
"keep_bootcon" |
, |
|
|
keep_bootcon_setup |
|
|
) |
| |
late_initcall |
( |
printk_late_init |
| ) |
|
int printk_needs_cpu |
( |
int |
cpu | ) |
|
suspend_console - suspend the console subsystem
This disables printk() while we go into suspend states
Definition at line 1857 of file printk.c.
Initial value:
Definition at line 67 of file printk.c.
int console_set_on_cmdline |
bool console_suspend_enabled = 1 |