]> xenbits.xensource.com Git - people/andrewcoop/seabios.git/commitdiff
pvscsi: ring_desc do not have to be page aligned
authorLiran Alon <liran.alon@oracle.com>
Tue, 13 Nov 2018 15:53:40 +0000 (17:53 +0200)
committerKevin O'Connor <kevin@koconnor.net>
Wed, 28 Nov 2018 02:19:49 +0000 (21:19 -0500)
In contrast to other allocations made by pvscsi_init_rings(),
ring_desc is only used internally by SeaBIOS (not passed to
device-controller) and there is not restriction which force
it to be page aligned.

Reviewed-by: Mark Kanda <mark.kanda@oracle.com>
Signed-off-by: Liran Alon <liran.alon@oracle.com>
src/hw/pvscsi.c

index e0ea33cd751c291428a7c62e74b310b73902981a..9d7d68d8096404fab1481e8ea14d25c10f57e923 100644 (file)
@@ -167,7 +167,7 @@ pvscsi_init_rings(void *iobase, struct pvscsi_ring_dsc_s **ring_dsc)
 {
     struct PVSCSICmdDescSetupRings cmd = {0,};
 
-    struct pvscsi_ring_dsc_s *dsc = memalign_high(PAGE_SIZE, sizeof(*dsc));
+    struct pvscsi_ring_dsc_s *dsc = malloc_high(sizeof(*dsc));
     if (!dsc) {
         warn_noalloc();
         return;