aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-08-10 18:03:42 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-08-10 18:03:42 -0400
commitfc385c313275b114bc6ad36e60c5177d63250548 (patch)
tree3436184ec3af11e6506df5233889700a74427055 /include
parenta92b166e6b8c3c0037493690b2800b0b0dd92063 (diff)
parent235dae5d094c415fcf0fc79fa637f1901bc8afe2 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6: (68 commits) U6715 16550A serial driver support Char: nozomi, set tty->driver_data appropriately Char: nozomi, fix tty->count counting serial: max3107: Fix gpiolib support hsu: call PCI pm hooks in suspend/resume function hsu: some code cleanup hsu: add a periodic timer to check dma rx channel hsu: driver for Medfield High Speed UART device mxser: remove unnesesary NULL check serial: add support for OX16PCI958 card serial: 68328serial.c: remove dead (ALMA_ANS | DRAGONIXVZ | M68EZ328ADS) timbuart: use __devinit and __devexit macros for probe and remove serial: MMIO32 support for 8250_early.c serial: mcf: don't take spinlocks in already protected functions serial: general fixes in the serial_rs485 structure serial: fix missing bit coverage of ASYNC_FLAGS serial: "altera_uart: simplify altera_uart_console_putc()" checkpatch fixes serial: crisv10: formatting of pointers in printk() vt: Fix warning: statement with no effect due to vt_kern.h tty_io: remove casts from void* ...
Diffstat (limited to 'include')
-rw-r--r--include/asm-generic/ioctls.h8
-rw-r--r--include/asm-generic/termbits.h1
-rw-r--r--include/linux/console_struct.h4
-rw-r--r--include/linux/fb.h4
-rw-r--r--include/linux/istallion.h2
-rw-r--r--include/linux/serial.h9
-rw-r--r--include/linux/serial_8250.h5
-rw-r--r--include/linux/serial_core.h11
-rw-r--r--include/linux/serial_mfd.h47
-rw-r--r--include/linux/serial_reg.h16
-rw-r--r--include/linux/tty.h52
-rw-r--r--include/linux/vt_kern.h64
12 files changed, 202 insertions, 21 deletions
diff --git a/include/asm-generic/ioctls.h b/include/asm-generic/ioctls.h
index a799e20a769e..8554cb6a81b9 100644
--- a/include/asm-generic/ioctls.h
+++ b/include/asm-generic/ioctls.h
@@ -69,6 +69,7 @@
69#define TCSETX 0x5433 69#define TCSETX 0x5433
70#define TCSETXF 0x5434 70#define TCSETXF 0x5434
71#define TCSETXW 0x5435 71#define TCSETXW 0x5435
72#define TIOCSIG _IOW('T', 0x36, int) /* pty: generate signal */
72 73
73#define FIONCLEX 0x5450 74#define FIONCLEX 0x5450
74#define FIOCLEX 0x5451 75#define FIOCLEX 0x5451
@@ -87,12 +88,10 @@
87#define TIOCGICOUNT 0x545D /* read serial port inline interrupt counts */ 88#define TIOCGICOUNT 0x545D /* read serial port inline interrupt counts */
88 89
89/* 90/*
90 * some architectures define FIOQSIZE as 0x545E, which is used for 91 * Some arches already define FIOQSIZE due to a historical
91 * TIOCGHAYESESP on others 92 * conflict with a Hayes modem-specific ioctl value.
92 */ 93 */
93#ifndef FIOQSIZE 94#ifndef FIOQSIZE
94# define TIOCGHAYESESP 0x545E /* Get Hayes ESP configuration */
95# define TIOCSHAYESESP 0x545F /* Set Hayes ESP configuration */
96# define FIOQSIZE 0x5460 95# define FIOQSIZE 0x5460
97#endif 96#endif
98 97
@@ -104,6 +103,7 @@
104#define TIOCPKT_START 8 103#define TIOCPKT_START 8
105#define TIOCPKT_NOSTOP 16 104#define TIOCPKT_NOSTOP 16
106#define TIOCPKT_DOSTOP 32 105#define TIOCPKT_DOSTOP 32
106#define TIOCPKT_IOCTL 64
107 107
108#define TIOCSER_TEMT 0x01 /* Transmitter physically empty */ 108#define TIOCSER_TEMT 0x01 /* Transmitter physically empty */
109 109
diff --git a/include/asm-generic/termbits.h b/include/asm-generic/termbits.h
index 1c9773d48cb0..232b4781aef3 100644
--- a/include/asm-generic/termbits.h
+++ b/include/asm-generic/termbits.h
@@ -178,6 +178,7 @@ struct ktermios {
178#define FLUSHO 0010000 178#define FLUSHO 0010000
179#define PENDIN 0040000 179#define PENDIN 0040000
180#define IEXTEN 0100000 180#define IEXTEN 0100000
181#define EXTPROC 0200000
181 182
182/* tcflow() and TCXONC use these */ 183/* tcflow() and TCXONC use these */
183#define TCOOFF 0 184#define TCOOFF 0
diff --git a/include/linux/console_struct.h b/include/linux/console_struct.h
index 38fe59dc89ae..7f0c32908568 100644
--- a/include/linux/console_struct.h
+++ b/include/linux/console_struct.h
@@ -21,6 +21,8 @@ struct vt_struct;
21#define NPAR 16 21#define NPAR 16
22 22
23struct vc_data { 23struct vc_data {
24 struct tty_port port; /* Upper level data */
25
24 unsigned short vc_num; /* Console number */ 26 unsigned short vc_num; /* Console number */
25 unsigned int vc_cols; /* [#] Console size */ 27 unsigned int vc_cols; /* [#] Console size */
26 unsigned int vc_rows; 28 unsigned int vc_rows;
@@ -56,7 +58,6 @@ struct vc_data {
56 /* VT terminal data */ 58 /* VT terminal data */
57 unsigned int vc_state; /* Escape sequence parser state */ 59 unsigned int vc_state; /* Escape sequence parser state */
58 unsigned int vc_npar,vc_par[NPAR]; /* Parameters of current escape sequence */ 60 unsigned int vc_npar,vc_par[NPAR]; /* Parameters of current escape sequence */
59 struct tty_struct *vc_tty; /* TTY we are attached to */
60 /* data for manual vt switching */ 61 /* data for manual vt switching */
61 struct vt_mode vt_mode; 62 struct vt_mode vt_mode;
62 struct pid *vt_pid; 63 struct pid *vt_pid;
@@ -105,6 +106,7 @@ struct vc_data {
105 struct vc_data **vc_display_fg; /* [!] Ptr to var holding fg console for this display */ 106 struct vc_data **vc_display_fg; /* [!] Ptr to var holding fg console for this display */
106 unsigned long vc_uni_pagedir; 107 unsigned long vc_uni_pagedir;
107 unsigned long *vc_uni_pagedir_loc; /* [!] Location of uni_pagedir variable for this console */ 108 unsigned long *vc_uni_pagedir_loc; /* [!] Location of uni_pagedir variable for this console */
109 bool vc_panic_force_write; /* when oops/panic this VC can accept forced output/blanking */
108 /* additional information is in vt_kern.h */ 110 /* additional information is in vt_kern.h */
109}; 111};
110 112
diff --git a/include/linux/fb.h b/include/linux/fb.h
index 0c5659c41b01..f0268deca658 100644
--- a/include/linux/fb.h
+++ b/include/linux/fb.h
@@ -825,6 +825,10 @@ struct fb_tile_ops {
825 */ 825 */
826#define FBINFO_BE_MATH 0x100000 826#define FBINFO_BE_MATH 0x100000
827 827
828/* report to the VT layer that this fb driver can accept forced console
829 output like oopses */
830#define FBINFO_CAN_FORCE_OUTPUT 0x200000
831
828struct fb_info { 832struct fb_info {
829 int node; 833 int node;
830 int flags; 834 int flags;
diff --git a/include/linux/istallion.h b/include/linux/istallion.h
index 7faca98c7d14..ad700a60c158 100644
--- a/include/linux/istallion.h
+++ b/include/linux/istallion.h
@@ -86,7 +86,7 @@ struct stlibrd {
86 unsigned long magic; 86 unsigned long magic;
87 unsigned int brdnr; 87 unsigned int brdnr;
88 unsigned int brdtype; 88 unsigned int brdtype;
89 unsigned int state; 89 unsigned long state;
90 unsigned int nrpanels; 90 unsigned int nrpanels;
91 unsigned int nrports; 91 unsigned int nrports;
92 unsigned int nrdevs; 92 unsigned int nrdevs;
diff --git a/include/linux/serial.h b/include/linux/serial.h
index c8613c3ff9d3..1ebc694a6d52 100644
--- a/include/linux/serial.h
+++ b/include/linux/serial.h
@@ -77,7 +77,8 @@ struct serial_struct {
77#define PORT_16654 11 77#define PORT_16654 11
78#define PORT_16850 12 78#define PORT_16850 12
79#define PORT_RSA 13 /* RSA-DV II/S card */ 79#define PORT_RSA 13 /* RSA-DV II/S card */
80#define PORT_MAX 13 80#define PORT_U6_16550A 14
81#define PORT_MAX 14
81 82
82#define SERIAL_IO_PORT 0 83#define SERIAL_IO_PORT 0
83#define SERIAL_IO_HUB6 1 84#define SERIAL_IO_HUB6 1
@@ -151,7 +152,7 @@ struct serial_uart_config {
151#define ASYNC_BUGGY_UART (1U << ASYNCB_BUGGY_UART) 152#define ASYNC_BUGGY_UART (1U << ASYNCB_BUGGY_UART)
152#define ASYNC_AUTOPROBE (1U << ASYNCB_AUTOPROBE) 153#define ASYNC_AUTOPROBE (1U << ASYNCB_AUTOPROBE)
153 154
154#define ASYNC_FLAGS ((1U << ASYNCB_LAST_USER) - 1) 155#define ASYNC_FLAGS ((1U << (ASYNCB_LAST_USER + 1)) - 1)
155#define ASYNC_USR_MASK (ASYNC_SPD_HI|ASYNC_SPD_VHI| \ 156#define ASYNC_USR_MASK (ASYNC_SPD_HI|ASYNC_SPD_VHI| \
156 ASYNC_CALLOUT_NOHUP|ASYNC_SPD_SHI|ASYNC_LOW_LATENCY) 157 ASYNC_CALLOUT_NOHUP|ASYNC_SPD_SHI|ASYNC_LOW_LATENCY)
157#define ASYNC_SPD_CUST (ASYNC_SPD_HI|ASYNC_SPD_VHI) 158#define ASYNC_SPD_CUST (ASYNC_SPD_HI|ASYNC_SPD_VHI)
@@ -210,8 +211,10 @@ struct serial_rs485 {
210#define SER_RS485_ENABLED (1 << 0) 211#define SER_RS485_ENABLED (1 << 0)
211#define SER_RS485_RTS_ON_SEND (1 << 1) 212#define SER_RS485_RTS_ON_SEND (1 << 1)
212#define SER_RS485_RTS_AFTER_SEND (1 << 2) 213#define SER_RS485_RTS_AFTER_SEND (1 << 2)
214#define SER_RS485_RTS_BEFORE_SEND (1 << 3)
213 __u32 delay_rts_before_send; /* Milliseconds */ 215 __u32 delay_rts_before_send; /* Milliseconds */
214 __u32 padding[6]; /* Memory is cheap, new structs 216 __u32 delay_rts_after_send; /* Milliseconds */
217 __u32 padding[5]; /* Memory is cheap, new structs
215 are a royal PITA .. */ 218 are a royal PITA .. */
216}; 219};
217 220
diff --git a/include/linux/serial_8250.h b/include/linux/serial_8250.h
index fb46aba11fb5..7638deaaba65 100644
--- a/include/linux/serial_8250.h
+++ b/include/linux/serial_8250.h
@@ -32,6 +32,9 @@ struct plat_serial8250_port {
32 unsigned int type; /* If UPF_FIXED_TYPE */ 32 unsigned int type; /* If UPF_FIXED_TYPE */
33 unsigned int (*serial_in)(struct uart_port *, int); 33 unsigned int (*serial_in)(struct uart_port *, int);
34 void (*serial_out)(struct uart_port *, int, int); 34 void (*serial_out)(struct uart_port *, int, int);
35 void (*set_termios)(struct uart_port *,
36 struct ktermios *new,
37 struct ktermios *old);
35}; 38};
36 39
37/* 40/*
@@ -71,5 +74,7 @@ extern int early_serial_setup(struct uart_port *port);
71extern int serial8250_find_port(struct uart_port *p); 74extern int serial8250_find_port(struct uart_port *p);
72extern int serial8250_find_port_for_earlycon(void); 75extern int serial8250_find_port_for_earlycon(void);
73extern int setup_early_serial8250_console(char *cmdline); 76extern int setup_early_serial8250_console(char *cmdline);
77extern void serial8250_do_set_termios(struct uart_port *port,
78 struct ktermios *termios, struct ktermios *old);
74 79
75#endif 80#endif
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h
index f10db6e5f3b5..8129ca2d57e3 100644
--- a/include/linux/serial_core.h
+++ b/include/linux/serial_core.h
@@ -186,6 +186,12 @@
186#define PORT_ALTERA_JTAGUART 91 186#define PORT_ALTERA_JTAGUART 91
187#define PORT_ALTERA_UART 92 187#define PORT_ALTERA_UART 92
188 188
189/* MAX3107 */
190#define PORT_MAX3107 94
191
192/* High Speed UART for Medfield */
193#define PORT_MFD 95
194
189#ifdef __KERNEL__ 195#ifdef __KERNEL__
190 196
191#include <linux/compiler.h> 197#include <linux/compiler.h>
@@ -220,7 +226,7 @@ struct uart_ops {
220 void (*flush_buffer)(struct uart_port *); 226 void (*flush_buffer)(struct uart_port *);
221 void (*set_termios)(struct uart_port *, struct ktermios *new, 227 void (*set_termios)(struct uart_port *, struct ktermios *new,
222 struct ktermios *old); 228 struct ktermios *old);
223 void (*set_ldisc)(struct uart_port *); 229 void (*set_ldisc)(struct uart_port *, int new);
224 void (*pm)(struct uart_port *, unsigned int state, 230 void (*pm)(struct uart_port *, unsigned int state,
225 unsigned int oldstate); 231 unsigned int oldstate);
226 int (*set_wake)(struct uart_port *, unsigned int state); 232 int (*set_wake)(struct uart_port *, unsigned int state);
@@ -276,6 +282,9 @@ struct uart_port {
276 unsigned char __iomem *membase; /* read/write[bwl] */ 282 unsigned char __iomem *membase; /* read/write[bwl] */
277 unsigned int (*serial_in)(struct uart_port *, int); 283 unsigned int (*serial_in)(struct uart_port *, int);
278 void (*serial_out)(struct uart_port *, int, int); 284 void (*serial_out)(struct uart_port *, int, int);
285 void (*set_termios)(struct uart_port *,
286 struct ktermios *new,
287 struct ktermios *old);
279 unsigned int irq; /* irq number */ 288 unsigned int irq; /* irq number */
280 unsigned long irqflags; /* irq flags */ 289 unsigned long irqflags; /* irq flags */
281 unsigned int uartclk; /* base uart clock */ 290 unsigned int uartclk; /* base uart clock */
diff --git a/include/linux/serial_mfd.h b/include/linux/serial_mfd.h
new file mode 100644
index 000000000000..2b071e0b034d
--- /dev/null
+++ b/include/linux/serial_mfd.h
@@ -0,0 +1,47 @@
1#ifndef _SERIAL_MFD_H_
2#define _SERIAL_MFD_H_
3
4/* HW register offset definition */
5#define UART_FOR 0x08
6#define UART_PS 0x0C
7#define UART_MUL 0x0D
8#define UART_DIV 0x0E
9
10#define HSU_GBL_IEN 0x0
11#define HSU_GBL_IST 0x4
12
13#define HSU_GBL_INT_BIT_PORT0 0x0
14#define HSU_GBL_INT_BIT_PORT1 0x1
15#define HSU_GBL_INT_BIT_PORT2 0x2
16#define HSU_GBL_INT_BIT_IRI 0x3
17#define HSU_GBL_INT_BIT_HDLC 0x4
18#define HSU_GBL_INT_BIT_DMA 0x5
19
20#define HSU_GBL_ISR 0x8
21#define HSU_GBL_DMASR 0x400
22#define HSU_GBL_DMAISR 0x404
23
24#define HSU_PORT_REG_OFFSET 0x80
25#define HSU_PORT0_REG_OFFSET 0x80
26#define HSU_PORT1_REG_OFFSET 0x100
27#define HSU_PORT2_REG_OFFSET 0x180
28#define HSU_PORT_REG_LENGTH 0x80
29
30#define HSU_DMA_CHANS_REG_OFFSET 0x500
31#define HSU_DMA_CHANS_REG_LENGTH 0x40
32
33#define HSU_CH_SR 0x0 /* channel status reg */
34#define HSU_CH_CR 0x4 /* control reg */
35#define HSU_CH_DCR 0x8 /* descriptor control reg */
36#define HSU_CH_BSR 0x10 /* max fifo buffer size reg */
37#define HSU_CH_MOTSR 0x14 /* minimum ocp transfer size */
38#define HSU_CH_D0SAR 0x20 /* desc 0 start addr */
39#define HSU_CH_D0TSR 0x24 /* desc 0 transfer size */
40#define HSU_CH_D1SAR 0x28
41#define HSU_CH_D1TSR 0x2C
42#define HSU_CH_D2SAR 0x30
43#define HSU_CH_D2TSR 0x34
44#define HSU_CH_D3SAR 0x38
45#define HSU_CH_D3TSR 0x3C
46
47#endif
diff --git a/include/linux/serial_reg.h b/include/linux/serial_reg.h
index cf9327c051ad..c7a0ce11cd47 100644
--- a/include/linux/serial_reg.h
+++ b/include/linux/serial_reg.h
@@ -221,8 +221,24 @@
221#define UART_FCR_PXAR16 0x80 /* receive FIFO threshold = 16 */ 221#define UART_FCR_PXAR16 0x80 /* receive FIFO threshold = 16 */
222#define UART_FCR_PXAR32 0xc0 /* receive FIFO threshold = 32 */ 222#define UART_FCR_PXAR32 0xc0 /* receive FIFO threshold = 32 */
223 223
224/*
225 * Intel MID on-chip HSU (High Speed UART) defined bits
226 */
227#define UART_FCR_HSU_64_1B 0x00 /* receive FIFO treshold = 1 */
228#define UART_FCR_HSU_64_16B 0x40 /* receive FIFO treshold = 16 */
229#define UART_FCR_HSU_64_32B 0x80 /* receive FIFO treshold = 32 */
230#define UART_FCR_HSU_64_56B 0xc0 /* receive FIFO treshold = 56 */
231
232#define UART_FCR_HSU_16_1B 0x00 /* receive FIFO treshold = 1 */
233#define UART_FCR_HSU_16_4B 0x40 /* receive FIFO treshold = 4 */
234#define UART_FCR_HSU_16_8B 0x80 /* receive FIFO treshold = 8 */
235#define UART_FCR_HSU_16_14B 0xc0 /* receive FIFO treshold = 14 */
224 236
237#define UART_FCR_HSU_64B_FIFO 0x20 /* chose 64 bytes FIFO */
238#define UART_FCR_HSU_16B_FIFO 0x00 /* chose 16 bytes FIFO */
225 239
240#define UART_FCR_HALF_EMPT_TXI 0x00 /* trigger TX_EMPT IRQ for half empty */
241#define UART_FCR_FULL_EMPT_TXI 0x08 /* trigger TX_EMPT IRQ for full empty */
226 242
227/* 243/*
228 * These register definitions are for the 16C950 244 * These register definitions are for the 16C950
diff --git a/include/linux/tty.h b/include/linux/tty.h
index 7802a243ee13..1437da3ddc62 100644
--- a/include/linux/tty.h
+++ b/include/linux/tty.h
@@ -13,6 +13,7 @@
13#include <linux/tty_driver.h> 13#include <linux/tty_driver.h>
14#include <linux/tty_ldisc.h> 14#include <linux/tty_ldisc.h>
15#include <linux/mutex.h> 15#include <linux/mutex.h>
16#include <linux/smp_lock.h>
16 17
17#include <asm/system.h> 18#include <asm/system.h>
18 19
@@ -179,6 +180,7 @@ struct tty_bufhead {
179#define L_FLUSHO(tty) _L_FLAG((tty), FLUSHO) 180#define L_FLUSHO(tty) _L_FLAG((tty), FLUSHO)
180#define L_PENDIN(tty) _L_FLAG((tty), PENDIN) 181#define L_PENDIN(tty) _L_FLAG((tty), PENDIN)
181#define L_IEXTEN(tty) _L_FLAG((tty), IEXTEN) 182#define L_IEXTEN(tty) _L_FLAG((tty), IEXTEN)
183#define L_EXTPROC(tty) _L_FLAG((tty), EXTPROC)
182 184
183struct device; 185struct device;
184struct signal_struct; 186struct signal_struct;
@@ -415,6 +417,7 @@ extern int is_ignored(int sig);
415extern int tty_signal(int sig, struct tty_struct *tty); 417extern int tty_signal(int sig, struct tty_struct *tty);
416extern void tty_hangup(struct tty_struct *tty); 418extern void tty_hangup(struct tty_struct *tty);
417extern void tty_vhangup(struct tty_struct *tty); 419extern void tty_vhangup(struct tty_struct *tty);
420extern void tty_vhangup_locked(struct tty_struct *tty);
418extern void tty_vhangup_self(void); 421extern void tty_vhangup_self(void);
419extern void tty_unhangup(struct file *filp); 422extern void tty_unhangup(struct file *filp);
420extern int tty_hung_up_p(struct file *filp); 423extern int tty_hung_up_p(struct file *filp);
@@ -575,5 +578,54 @@ extern int vt_ioctl(struct tty_struct *tty, struct file *file,
575extern long vt_compat_ioctl(struct tty_struct *tty, struct file * file, 578extern long vt_compat_ioctl(struct tty_struct *tty, struct file * file,
576 unsigned int cmd, unsigned long arg); 579 unsigned int cmd, unsigned long arg);
577 580
581/* tty_mutex.c */
582/* functions for preparation of BKL removal */
583extern void __lockfunc tty_lock(void) __acquires(tty_lock);
584extern void __lockfunc tty_unlock(void) __releases(tty_lock);
585extern struct task_struct *__big_tty_mutex_owner;
586#define tty_locked() (current == __big_tty_mutex_owner)
587
588/*
589 * wait_event_interruptible_tty -- wait for a condition with the tty lock held
590 *
591 * The condition we are waiting for might take a long time to
592 * become true, or might depend on another thread taking the
593 * BTM. In either case, we need to drop the BTM to guarantee
594 * forward progress. This is a leftover from the conversion
595 * from the BKL and should eventually get removed as the BTM
596 * falls out of use.
597 *
598 * Do not use in new code.
599 */
600#define wait_event_interruptible_tty(wq, condition) \
601({ \
602 int __ret = 0; \
603 if (!(condition)) { \
604 __wait_event_interruptible_tty(wq, condition, __ret); \
605 } \
606 __ret; \
607})
608
609#define __wait_event_interruptible_tty(wq, condition, ret) \
610do { \
611 DEFINE_WAIT(__wait); \
612 \
613 for (;;) { \
614 prepare_to_wait(&wq, &__wait, TASK_INTERRUPTIBLE); \
615 if (condition) \
616 break; \
617 if (!signal_pending(current)) { \
618 tty_unlock(); \
619 schedule(); \
620 tty_lock(); \
621 continue; \
622 } \
623 ret = -ERESTARTSYS; \
624 break; \
625 } \
626 finish_wait(&wq, &__wait); \
627} while (0)
628
629
578#endif /* __KERNEL__ */ 630#endif /* __KERNEL__ */
579#endif 631#endif
diff --git a/include/linux/vt_kern.h b/include/linux/vt_kern.h
index 7f56db4a79f0..6625cc1ab758 100644
--- a/include/linux/vt_kern.h
+++ b/include/linux/vt_kern.h
@@ -76,17 +76,52 @@ int con_copy_unimap(struct vc_data *dst_vc, struct vc_data *src_vc);
76#define vc_translate(vc, c) ((vc)->vc_translate[(c) | \ 76#define vc_translate(vc, c) ((vc)->vc_translate[(c) | \
77 ((vc)->vc_toggle_meta ? 0x80 : 0)]) 77 ((vc)->vc_toggle_meta ? 0x80 : 0)])
78#else 78#else
79#define con_set_trans_old(arg) (0) 79static inline int con_set_trans_old(unsigned char __user *table)
80#define con_get_trans_old(arg) (-EINVAL) 80{
81#define con_set_trans_new(arg) (0) 81 return 0;
82#define con_get_trans_new(arg) (-EINVAL) 82}
83#define con_clear_unimap(vc, ui) (0) 83static inline int con_get_trans_old(unsigned char __user *table)
84#define con_set_unimap(vc, ct, list) (0) 84{
85#define con_set_default_unimap(vc) (0) 85 return -EINVAL;
86#define con_copy_unimap(d, s) (0) 86}
87#define con_get_unimap(vc, ct, uct, list) (-EINVAL) 87static inline int con_set_trans_new(unsigned short __user *table)
88#define con_free_unimap(vc) do { ; } while (0) 88{
89#define con_protect_unimap(vc, rdonly) do { ; } while (0) 89 return 0;
90}
91static inline int con_get_trans_new(unsigned short __user *table)
92{
93 return -EINVAL;
94}
95static inline int con_clear_unimap(struct vc_data *vc, struct unimapinit *ui)
96{
97 return 0;
98}
99static inline
100int con_set_unimap(struct vc_data *vc, ushort ct, struct unipair __user *list)
101{
102 return 0;
103}
104static inline
105int con_get_unimap(struct vc_data *vc, ushort ct, ushort __user *uct,
106 struct unipair __user *list)
107{
108 return -EINVAL;
109}
110static inline int con_set_default_unimap(struct vc_data *vc)
111{
112 return 0;
113}
114static inline void con_free_unimap(struct vc_data *vc)
115{
116}
117static inline void con_protect_unimap(struct vc_data *vc, int rdonly)
118{
119}
120static inline
121int con_copy_unimap(struct vc_data *dst_vc, struct vc_data *src_vc)
122{
123 return 0;
124}
90 125
91#define vc_translate(vc, c) (c) 126#define vc_translate(vc, c) (c)
92#endif 127#endif
@@ -100,6 +135,13 @@ extern int unbind_con_driver(const struct consw *csw, int first, int last,
100 int deflt); 135 int deflt);
101int vty_init(const struct file_operations *console_fops); 136int vty_init(const struct file_operations *console_fops);
102 137
138static inline bool vt_force_oops_output(struct vc_data *vc)
139{
140 if (oops_in_progress && vc->vc_panic_force_write)
141 return true;
142 return false;
143}
144
103/* 145/*
104 * vc_screen.c shares this temporary buffer with the console write code so that 146 * vc_screen.c shares this temporary buffer with the console write code so that
105 * we can easily avoid touching user space while holding the console spinlock. 147 * we can easily avoid touching user space while holding the console spinlock.