summaryrefslogtreecommitdiff
path: root/drivers/tty
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/Kconfig105
-rw-r--r--drivers/tty/hvc/hvc_console.c2
-rw-r--r--drivers/tty/hvc/hvc_xen.c5
-rw-r--r--drivers/tty/serial/8250/8250_core.c4
-rw-r--r--drivers/tty/serial/8250/8250_early.c2
-rw-r--r--drivers/tty/serial/8250/8250_port.c2
-rw-r--r--drivers/tty/serial/digicolor-usart.c2
-rw-r--r--drivers/tty/vt/vt.c45
8 files changed, 10 insertions, 157 deletions
diff --git a/drivers/tty/Kconfig b/drivers/tty/Kconfig
index a92a5c8e1..13e17cd39 100644
--- a/drivers/tty/Kconfig
+++ b/drivers/tty/Kconfig
@@ -75,111 +75,6 @@ config VT_CONSOLE_SLEEP
def_bool y
depends on VT_CONSOLE && PM_SLEEP
-menuconfig VT_CKO
- bool "Colored kernel message output"
- depends on VT_CONSOLE
- ---help---
- This option enables kernel messages to be emitted in
- colors other than the default.
-
- The color value you need to enter is composed (OR-ed)
- of a foreground and a background color.
-
- Foreground:
- 0x00 = black, 0x08 = dark gray,
- 0x01 = red, 0x09 = light red,
- 0x02 = green, 0x0A = light green,
- 0x03 = brown, 0x0B = yellow,
- 0x04 = blue, 0x0C = light blue,
- 0x05 = magenta, 0x0D = light magenta,
- 0x06 = cyan, 0x0E = light cyan,
- 0x07 = gray, 0x0F = white,
-
- (Foreground colors 0x08 to 0x0F do not work when a VGA
- console font with 512 glyphs is used.)
-
- Background:
- 0x00 = black, 0x40 = blue,
- 0x10 = red, 0x50 = magenta,
- 0x20 = green, 0x60 = cyan,
- 0x30 = brown, 0x70 = gray,
-
- For example, 0x1F would yield white on red.
-
- If unsure, say N.
-
-config VT_PRINTK_EMERG_COLOR
- hex "Emergency messages color"
- range 0x00 0xFF
- depends on VT_CKO
- default 0x07
- ---help---
- This option defines with which color kernel emergency messages will
- be printed to the console.
-
-config VT_PRINTK_ALERT_COLOR
- hex "Alert messages color"
- range 0x00 0xFF
- depends on VT_CKO
- default 0x07
- ---help---
- This option defines with which color kernel alert messages will
- be printed to the console.
-
-config VT_PRINTK_CRIT_COLOR
- hex "Critical messages color"
- range 0x00 0xFF
- depends on VT_CKO
- default 0x07
- ---help---
- This option defines with which color kernel critical messages will
- be printed to the console.
-
-config VT_PRINTK_ERR_COLOR
- hex "Error messages color"
- range 0x00 0xFF
- depends on VT_CKO
- default 0x07
- ---help---
- This option defines with which color kernel error messages will
- be printed to the console.
-
-config VT_PRINTK_WARNING_COLOR
- hex "Warning messages color"
- range 0x00 0xFF
- depends on VT_CKO
- default 0x07
- ---help---
- This option defines with which color kernel warning messages will
- be printed to the console.
-
-config VT_PRINTK_NOTICE_COLOR
- hex "Notice messages color"
- range 0x00 0xFF
- depends on VT_CKO
- default 0x07
- ---help---
- This option defines with which color kernel notice messages will
- be printed to the console.
-
-config VT_PRINTK_INFO_COLOR
- hex "Information messages color"
- range 0x00 0xFF
- depends on VT_CKO
- default 0x07
- ---help---
- This option defines with which color kernel information messages will
- be printed to the console.
-
-config VT_PRINTK_DEBUG_COLOR
- hex "Debug messages color"
- range 0x00 0xFF
- depends on VT_CKO
- default 0x07
- ---help---
- This option defines with which color kernel debug messages will
- be printed to the console.
-
config NR_TTY_DEVICES
int "Maximum tty device number"
depends on VT
diff --git a/drivers/tty/hvc/hvc_console.c b/drivers/tty/hvc/hvc_console.c
index 3155b464e..e46d62899 100644
--- a/drivers/tty/hvc/hvc_console.c
+++ b/drivers/tty/hvc/hvc_console.c
@@ -141,7 +141,7 @@ static uint32_t vtermnos[MAX_NR_HVC_CONSOLES] =
*/
static void hvc_console_print(struct console *co, const char *b,
- unsigned count, unsigned loglevel)
+ unsigned count)
{
char c[N_OUTBUF] __ALIGNED__;
unsigned i = 0, n = 0;
diff --git a/drivers/tty/hvc/hvc_xen.c b/drivers/tty/hvc/hvc_xen.c
index 8ddcade42..5e87e4866 100644
--- a/drivers/tty/hvc/hvc_xen.c
+++ b/drivers/tty/hvc/hvc_xen.c
@@ -629,7 +629,7 @@ static int __init xenboot_setup_console(struct console *console, char *string)
}
static void xenboot_write_console(struct console *console, const char *string,
- unsigned len, unsigned loglevel)
+ unsigned len)
{
unsigned int linelen, off = 0;
const char *pos;
@@ -693,8 +693,7 @@ void xen_raw_printk(const char *fmt, ...)
static void xenboot_earlycon_write(struct console *console,
const char *string,
- unsigned len,
- unsigned loglevel)
+ unsigned len)
{
dom0_write_console(0, string, len);
}
diff --git a/drivers/tty/serial/8250/8250_core.c b/drivers/tty/serial/8250/8250_core.c
index 11ccfa00c..2f4f5ee65 100644
--- a/drivers/tty/serial/8250/8250_core.c
+++ b/drivers/tty/serial/8250/8250_core.c
@@ -587,11 +587,11 @@ serial8250_register_ports(struct uart_driver *drv, struct device *dev)
#ifdef CONFIG_SERIAL_8250_CONSOLE
static void univ8250_console_write(struct console *co, const char *s,
- unsigned int count, unsigned int loglevel)
+ unsigned int count)
{
struct uart_8250_port *up = &serial8250_ports[co->index];
- serial8250_console_write(up, s, count, loglevel);
+ serial8250_console_write(up, s, count);
}
static int univ8250_console_setup(struct console *co, char *options)
diff --git a/drivers/tty/serial/8250/8250_early.c b/drivers/tty/serial/8250/8250_early.c
index d3757a53c..8d08ff5c4 100644
--- a/drivers/tty/serial/8250/8250_early.c
+++ b/drivers/tty/serial/8250/8250_early.c
@@ -97,7 +97,7 @@ static void __init serial_putc(struct uart_port *port, int c)
}
static void __init early_serial8250_write(struct console *console,
- const char *s, unsigned int count, unsigned int loglevel)
+ const char *s, unsigned int count)
{
struct earlycon_device *device = console->data;
struct uart_port *port = &device->port;
diff --git a/drivers/tty/serial/8250/8250_port.c b/drivers/tty/serial/8250/8250_port.c
index 4743075ae..00ad2637b 100644
--- a/drivers/tty/serial/8250/8250_port.c
+++ b/drivers/tty/serial/8250/8250_port.c
@@ -3081,7 +3081,7 @@ static void serial8250_console_restore(struct uart_8250_port *up)
* The console_lock must be held when we get here.
*/
void serial8250_console_write(struct uart_8250_port *up, const char *s,
- unsigned int count, unsigned int loglevel)
+ unsigned int count)
{
struct uart_port *port = &up->port;
unsigned long flags;
diff --git a/drivers/tty/serial/digicolor-usart.c b/drivers/tty/serial/digicolor-usart.c
index 8a1734357..02ad6953b 100644
--- a/drivers/tty/serial/digicolor-usart.c
+++ b/drivers/tty/serial/digicolor-usart.c
@@ -394,7 +394,7 @@ static void digicolor_uart_console_putchar(struct uart_port *port, int ch)
}
static void digicolor_uart_console_write(struct console *co, const char *c,
- unsigned n, unsigned loglevel)
+ unsigned n)
{
struct uart_port *port = digicolor_ports[co->index];
u8 status;
diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c
index f9ae08ef4..bd523adb9 100644
--- a/drivers/tty/vt/vt.c
+++ b/drivers/tty/vt/vt.c
@@ -71,7 +71,6 @@
*/
#include <linux/module.h>
-#include <linux/moduleparam.h>
#include <linux/types.h>
#include <linux/sched.h>
#include <linux/tty.h>
@@ -2532,44 +2531,16 @@ int vt_kmsg_redirect(int new)
return kmsg_con;
}
-#ifdef CONFIG_VT_CKO
-static unsigned int printk_color[8] __read_mostly = {
- CONFIG_VT_PRINTK_EMERG_COLOR, /* KERN_EMERG */
- CONFIG_VT_PRINTK_ALERT_COLOR, /* KERN_ALERT */
- CONFIG_VT_PRINTK_CRIT_COLOR, /* KERN_CRIT */
- CONFIG_VT_PRINTK_ERR_COLOR, /* KERN_ERR */
- CONFIG_VT_PRINTK_WARNING_COLOR, /* KERN_WARNING */
- CONFIG_VT_PRINTK_NOTICE_COLOR, /* KERN_NOTICE */
- CONFIG_VT_PRINTK_INFO_COLOR, /* KERN_INFO */
- CONFIG_VT_PRINTK_DEBUG_COLOR, /* KERN_DEBUG */
-};
-module_param_array(printk_color, uint, NULL, S_IRUGO | S_IWUSR);
-
-static inline void vc_set_color(struct vc_data *vc, unsigned char color)
-{
- vc->vc_color = color_table[color & 0xF] |
- (color_table[(color >> 4) & 0x7] << 4) |
- (color & 0x80);
- update_attr(vc);
-}
-#else
-static unsigned int printk_color[8];
-static inline void vc_set_color(const struct vc_data *vc, unsigned char c)
-{
-}
-#endif
-
/*
* Console on virtual terminal
*
* The console must be locked when we get here.
*/
-static void vt_console_print(struct console *co, const char *b, unsigned count,
- unsigned int loglevel)
+static void vt_console_print(struct console *co, const char *b, unsigned count)
{
struct vc_data *vc = vc_cons[fg_console].d;
- unsigned char current_color, c;
+ unsigned char c;
static DEFINE_SPINLOCK(printing_lock);
const ushort *start;
ushort cnt = 0;
@@ -2605,20 +2576,11 @@ static void vt_console_print(struct console *co, const char *b, unsigned count,
start = (ushort *)vc->vc_pos;
- /*
- * We always get a valid loglevel - <8> and "no level" is transformed
- * to <4> in the typical kernel.
- */
- current_color = printk_color[loglevel];
- vc_set_color(vc, current_color);
-
-
/* Contrived structure to try to emulate original need_wrap behaviour
* Problems caused when we have need_wrap set on '\n' character */
while (count--) {
c = *b++;
if (c == 10 || c == 13 || c == 8 || vc->vc_need_wrap) {
- vc_set_color(vc, vc->vc_def_color);
if (cnt > 0) {
if (CON_IS_VISIBLE(vc))
vc->vc_sw->con_putcs(vc, start, cnt, vc->vc_y, vc->vc_x);
@@ -2631,7 +2593,6 @@ static void vt_console_print(struct console *co, const char *b, unsigned count,
bs(vc);
start = (ushort *)vc->vc_pos;
myx = vc->vc_x;
- vc_set_color(vc, current_color);
continue;
}
if (c != 13)
@@ -2639,7 +2600,6 @@ static void vt_console_print(struct console *co, const char *b, unsigned count,
cr(vc);
start = (ushort *)vc->vc_pos;
myx = vc->vc_x;
- vc_set_color(vc, current_color);
if (c == 10 || c == 13)
continue;
}
@@ -2662,7 +2622,6 @@ static void vt_console_print(struct console *co, const char *b, unsigned count,
vc->vc_need_wrap = 1;
}
}
- vc_set_color(vc, vc->vc_def_color);
set_cursor(vc);
notify_update(vc);