console/serial: set the default transmit buffer size in Kconfig

Take the opportunity to convert the variable to read-only after init.

No functional change intended.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
This commit is contained in:
Roger Pau Monné authored and Jan Beulich committed 2022-07-04 14:48:14 +02:00
1 parent a0bb0960e5
commit 4df2e99d73
2 files changed
+11 -1

No files matched your search

+10
View File
@@ -74,3 +74,13 @@ config HAS_EHCI
help
This selects the USB based EHCI debug port to be used as a UART. If
you have an x86 based system with USB, say Y.
config SERIAL_TX_BUFSIZE
int "Size of the transmit serial buffer"
default 16384
help
Controls the default size of the transmit buffer (in bytes) used by
the serial driver. Note the value provided will be rounded down to
the nearest power of 2.
Default value is 16384 (16kiB).
+1 -1
View File
@@ -16,7 +16,7 @@
/* Never drop characters, even if the async transmit buffer fills. */
/* #define SERIAL_NEVER_DROP_CHARS 1 */
unsigned int __read_mostly serial_txbufsz = 16384;
unsigned int __ro_after_init serial_txbufsz = CONFIG_SERIAL_TX_BUFSIZE;
size_param("serial_tx_buffer", serial_txbufsz);
#define mask_serial_rxbuf_idx(_i) ((_i)&(serial_rxbufsz-1))
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.