|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen staging] console/serial: set the default transmit buffer size in Kconfig
commit 4df2e99d731402da48afb19dc970ccab5a0814d6
Author: Roger Pau Monné <roger.pau@xxxxxxxxxx>
AuthorDate: Mon Jul 4 14:48:14 2022 +0200
Commit: Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Mon Jul 4 14:48:14 2022 +0200
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@xxxxxxxxxx>
Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
---
xen/drivers/char/Kconfig | 10 ++++++++++
xen/drivers/char/serial.c | 2 +-
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/xen/drivers/char/Kconfig b/xen/drivers/char/Kconfig
index e5f7b1d8eb..dec58bc993 100644
--- a/xen/drivers/char/Kconfig
+++ b/xen/drivers/char/Kconfig
@@ -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).
diff --git a/xen/drivers/char/serial.c b/xen/drivers/char/serial.c
index 5ecba0af33..f6c944bd30 100644
--- a/xen/drivers/char/serial.c
+++ b/xen/drivers/char/serial.c
@@ -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))
--
generated by git-patchbot for /home/xen/git/xen.git#staging
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |