]> xenbits.xensource.com Git - xen.git/commitdiff
console/serial: set the default transmit buffer size in Kconfig
authorRoger Pau Monné <roger.pau@citrix.com>
Mon, 4 Jul 2022 12:48:14 +0000 (14:48 +0200)
committerJan Beulich <jbeulich@suse.com>
Mon, 4 Jul 2022 12:48:14 +0000 (14:48 +0200)
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>
xen/drivers/char/Kconfig
xen/drivers/char/serial.c

index e5f7b1d8eb8a425746bb194781f31aa6007bc3f1..dec58bc9936044adb0c945c3464d6ce2a8e45024 100644 (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).
index 5ecba0af338be8432408bacfe78d8210d8f2be43..f6c944bd305b595f57e70cd77843f6ba120c634f 100644 (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))