Skip to content

Commit 4f73bc4

Browse files
OneOfMany07gregkh
authored andcommitted
tty: Added a CONFIG_TTY option to allow removal of TTY
The option allows you to remove TTY and compile without errors. This saves space on systems that won't support TTY interfaces anyway. bloat-o-meter output is below. The bulk of this patch consists of Kconfig changes adding "depends on TTY" to various serial devices and similar drivers that require the TTY layer. Ideally, these dependencies would occur on a common intermediate symbol such as SERIO, but most drivers "select SERIO" rather than "depends on SERIO", and "select" does not respect dependencies. bloat-o-meter output comparing our previous minimal to new minimal by removing TTY. The list is filtered to not show removed entries with awk '$3 != "-"' as the list was very long. add/remove: 0/226 grow/shrink: 2/14 up/down: 6/-35356 (-35350) function old new delta chr_dev_init 166 170 +4 allow_signal 80 82 +2 static.__warned 143 142 -1 disallow_signal 63 62 -1 __set_special_pids 95 94 -1 unregister_console 126 121 -5 start_kernel 546 541 -5 register_console 593 588 -5 copy_from_user 45 40 -5 sys_setsid 128 120 -8 sys_vhangup 32 19 -13 do_exit 1543 1526 -17 bitmap_zero 60 40 -20 arch_local_irq_save 137 117 -20 release_task 674 652 -22 static.spin_unlock_irqrestore 308 260 -48 Signed-off-by: Joe Millenbach <jmillenbach@gmail.com> Reviewed-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Josh Triplett <josh@joshtriplett.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent a1bf958 commit 4f73bc4

55 files changed

Lines changed: 165 additions & 47 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎arch/alpha/Kconfig‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ choice
125125

126126
config ALPHA_GENERIC
127127
bool "Generic"
128+
depends on TTY
128129
help
129130
A generic kernel will run on all supported Alpha hardware.
130131

@@ -491,6 +492,7 @@ config VGA_HOSE
491492

492493
config ALPHA_SRM
493494
bool "Use SRM as bootloader" if ALPHA_CABRIOLET || ALPHA_AVANTI_CH || ALPHA_EB64P || ALPHA_PC164 || ALPHA_TAKARA || ALPHA_EB164 || ALPHA_ALCOR || ALPHA_MIATA || ALPHA_LX164 || ALPHA_SX164 || ALPHA_NAUTILUS || ALPHA_NONAME
495+
depends on TTY
494496
default y if ALPHA_JENSEN || ALPHA_MIKASA || ALPHA_SABLE || ALPHA_LYNX || ALPHA_NORITAKE || ALPHA_DP264 || ALPHA_RAWHIDE || ALPHA_EIGER || ALPHA_WILDFIRE || ALPHA_TITAN || ALPHA_SHARK || ALPHA_MARVEL
495497
---help---
496498
There are two different types of booting firmware on Alphas: SRM,

‎arch/ia64/hp/sim/Kconfig‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ config HP_SIMETH
88

99
config HP_SIMSERIAL
1010
bool "Simulated serial driver support"
11+
depends on TTY
1112

1213
config HP_SIMSERIAL_CONSOLE
1314
bool "Console for HP simulator"

‎arch/m68k/Kconfig.devices‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ config NFBLOCK
4141

4242
config NFCON
4343
tristate "NatFeat console driver"
44-
depends on NATFEAT
44+
depends on TTY && NATFEAT
4545
help
4646
Say Y to include support for the ARAnyM NatFeat console driver
4747
which allows the console output to be redirected to the stderr

‎arch/parisc/Kconfig‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ config PARISC
2323
select HAVE_MOD_ARCH_SPECIFIC
2424
select MODULES_USE_ELF_RELA
2525
select CLONE_BACKWARDS
26+
select TTY # Needed for pdc_cons.c
2627

2728
help
2829
The PA-RISC microprocessor is designed by Hewlett-Packard and used

‎arch/tile/Kconfig‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ config DEBUG_COPY_FROM_USER
121121
def_bool n
122122

123123
config HVC_TILE
124+
depends on TTY
124125
select HVC_DRIVER
125126
def_bool y
126127

‎arch/um/Kconfig.common‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ config UML
1212
select GENERIC_CPU_DEVICES
1313
select GENERIC_IO
1414
select GENERIC_CLOCKEVENTS
15+
select TTY # Needed for line.c
1516

1617
config MMU
1718
bool

‎arch/xtensa/Kconfig‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ choice
132132

133133
config XTENSA_PLATFORM_ISS
134134
bool "ISS"
135+
depends on TTY
135136
select XTENSA_CALIBRATE_CCOUNT
136137
select SERIAL_CONSOLE
137138
select XTENSA_ISS_NETWORK

‎drivers/bluetooth/Kconfig‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ config BT_HCIBTSDIO
2626

2727
config BT_HCIUART
2828
tristate "HCI UART driver"
29+
depends on TTY
2930
help
3031
Bluetooth HCI UART driver.
3132
This driver is required if you want to use Bluetooth devices with

‎drivers/char/Kconfig‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ source "drivers/tty/serial/Kconfig"
5353

5454
config TTY_PRINTK
5555
bool "TTY driver to output user messages via printk"
56-
depends on EXPERT
56+
depends on EXPERT && TTY
5757
default n
5858
---help---
5959
If you say Y here, the support for writing user messages (i.e.
@@ -159,7 +159,7 @@ source "drivers/tty/hvc/Kconfig"
159159

160160
config VIRTIO_CONSOLE
161161
tristate "Virtio console"
162-
depends on VIRTIO
162+
depends on VIRTIO && TTY
163163
select HVC_DRIVER
164164
help
165165
Virtio console for use with lguest and other hypervisors.
@@ -392,6 +392,7 @@ config XILINX_HWICAP
392392

393393
config R3964
394394
tristate "Siemens R3964 line discipline"
395+
depends on TTY
395396
---help---
396397
This driver allows synchronous communication with devices using the
397398
Siemens R3964 packet protocol. Unless you are dealing with special
@@ -439,7 +440,7 @@ source "drivers/char/pcmcia/Kconfig"
439440

440441
config MWAVE
441442
tristate "ACP Modem (Mwave) support"
442-
depends on X86
443+
depends on X86 && TTY
443444
select SERIAL_8250
444445
---help---
445446
The ACP modem (Mwave) for Linux is a WinModem. It is composed of a

‎drivers/char/pcmcia/Kconfig‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ menu "PCMCIA character devices"
77

88
config SYNCLINK_CS
99
tristate "SyncLink PC Card support"
10-
depends on PCMCIA
10+
depends on PCMCIA && TTY
1111
help
1212
Enable support for the SyncLink PC Card serial adapter, running
1313
asynchronous and HDLC communications up to 512Kbps. The port is
@@ -45,7 +45,7 @@ config CARDMAN_4040
4545

4646
config IPWIRELESS
4747
tristate "IPWireless 3G UMTS PCMCIA card support"
48-
depends on PCMCIA && NETDEVICES
48+
depends on PCMCIA && NETDEVICES && TTY
4949
select PPP
5050
help
5151
This is a driver for 3G UMTS PCMCIA card from IPWireless company. In

0 commit comments

Comments
 (0)