From: Dana Rubin dana.rubin@ravellosystems.com
First argument should be 'align' and second 'size'.
Signed-off-by: dana.rubin@ravellosystems.com Signed-off-by: shmulik.ladkani@ravellosystems.com --- src/hw/pvscsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/hw/pvscsi.c b/src/hw/pvscsi.c index 05cbd91..7535493 100644 --- a/src/hw/pvscsi.c +++ b/src/hw/pvscsi.c @@ -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_low(sizeof(*dsc), PAGE_SIZE); + struct pvscsi_ring_dsc_s *dsc = memalign_low(PAGE_SIZE, sizeof(*dsc)); if (!dsc) { warn_noalloc(); return;
From: Dana Rubin dana.rubin@ravellosystems.com
Avoid using the scarce ZoneLow memory. This limits max number of pvscsi controllers.
As driver runs in 32bit mode, use ZoneHigh allocation instead.
Signed-off-by: Dana Rubin dana.rubin@ravellosystems.com Signed-off-by: Shmulik Ladkani shmulik.ladkani@ravellosystems.com --- src/hw/pvscsi.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/hw/pvscsi.c b/src/hw/pvscsi.c index 7535493..cd4046c 100644 --- a/src/hw/pvscsi.c +++ b/src/hw/pvscsi.c @@ -167,18 +167,18 @@ pvscsi_init_rings(void *iobase, struct pvscsi_ring_dsc_s **ring_dsc) { struct PVSCSICmdDescSetupRings cmd = {0,};
- struct pvscsi_ring_dsc_s *dsc = memalign_low(PAGE_SIZE, sizeof(*dsc)); + struct pvscsi_ring_dsc_s *dsc = memalign_high(PAGE_SIZE, sizeof(*dsc)); if (!dsc) { warn_noalloc(); return; }
dsc->ring_state = - (struct PVSCSIRingsState *)memalign_low(PAGE_SIZE, PAGE_SIZE); + (struct PVSCSIRingsState *)memalign_high(PAGE_SIZE, PAGE_SIZE); dsc->ring_reqs = - (struct PVSCSIRingReqDesc *)memalign_low(PAGE_SIZE, PAGE_SIZE); + (struct PVSCSIRingReqDesc *)memalign_high(PAGE_SIZE, PAGE_SIZE); dsc->ring_cmps = - (struct PVSCSIRingCmpDesc *)memalign_low(PAGE_SIZE, PAGE_SIZE); + (struct PVSCSIRingCmpDesc *)memalign_high(PAGE_SIZE, PAGE_SIZE); if (!dsc->ring_state || !dsc->ring_reqs || !dsc->ring_cmps) { warn_noalloc(); return;
On Thu, Aug 04, 2016 at 02:22:30PM +0300, Dana Rubin wrote:
From: Dana Rubin dana.rubin@ravellosystems.com
First argument should be 'align' and second 'size'.
Thanks. I committed these two patches.
-Kevin