From: Jan Beulich Date: Fri, 27 Jul 2012 07:57:20 +0000 (+0200) Subject: serial: don't waste space allocated for the tx buffer(s) X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~8118 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=7e45ec6a46a9c2026e6148c0020a92ce29b5d12e;p=xen.git serial: don't waste space allocated for the tx buffer(s) We're allocating minimally a full page, so no reason to not also use all that space. Signed-off-by: Jan Beulich Acked-by: Keir Fraser --- diff --git a/xen/drivers/char/serial.c b/xen/drivers/char/serial.c index 8591ae28fd..fa47d3a3e4 100644 --- a/xen/drivers/char/serial.c +++ b/xen/drivers/char/serial.c @@ -483,8 +483,8 @@ void __init serial_async_transmit(struct serial_port *port) BUG_ON(!port->driver->tx_empty); if ( port->txbuf != NULL ) return; - if ( serial_txbufsz < 512 ) - serial_txbufsz = 512; + if ( serial_txbufsz < PAGE_SIZE ) + serial_txbufsz = PAGE_SIZE; while ( serial_txbufsz & (serial_txbufsz - 1) ) serial_txbufsz &= serial_txbufsz - 1; port->txbuf = alloc_xenheap_pages(