[PATCH v8 4/7] xen/serial: switch txbuf runtime allocation to xvmalloc
| Newsgroups | org.xenproject.lists.xen-devel |
|---|---|
| Message-ID | <[email protected]> |
From: Denis Mukhin <[email protected]> Switch 'txbuf' allocation to xvmalloc_array() since there is no hard requirement to have buffer physically contiguous. Suggested-by: Jan Beulich <[email protected]> Signed-off-by: Denis Mukhin <[email protected]> --- Changes since v7: - new patch --- xen/drivers/char/serial.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xen/drivers/char/serial.c b/xen/drivers/char/serial.c index e3c356408987..cf0abf1893e5 100644 --- a/xen/drivers/char/serial.c +++ b/xen/drivers/char/serial.c @@ -12,6 +12,7 @@ #include <xen/param.h> #include <xen/sections.h> #include <xen/serial.h> +#include <xen/xvmalloc.h> #include <asm/processor.h> @@ -524,8 +525,7 @@ void __init serial_async_transmit(struct serial_port *port) serial_txbufsz = PAGE_SIZE; while ( serial_txbufsz & (serial_txbufsz - 1) ) serial_txbufsz &= serial_txbufsz - 1; - port->txbuf = alloc_xenheap_pages( - get_order_from_bytes(serial_txbufsz), 0); + port->txbuf = xvmalloc_array(char, serial_txbufsz); } /* -- 2.54.0