]> xenbits.xensource.com Git - xen.git/commitdiff
serial: don't waste space allocated for the tx buffer(s)
authorJan Beulich <jbeulich@suse.com>
Fri, 27 Jul 2012 07:57:20 +0000 (09:57 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 27 Jul 2012 07:57:20 +0000 (09:57 +0200)
We're allocating minimally a full page, so no reason to not also use
all that space.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
xen/drivers/char/serial.c

index 8591ae28fd835c7dceddea27833b69df9921a994..fa47d3a3e4b87114c35b706f58032a857daef5f9 100644 (file)
@@ -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(