Message ID | 20221018140951.127093-3-imbrenda@linux.ibm.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | s390x misc fixes | expand |
On 10/18/22 16:09, Claudio Imbrenda wrote: > Allocate the donated storage with 1M alignment from the normal pool, to > force it to be above 2G without wasting a whole 2G block of memory. > > Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com> Thanks for fixing this :) Reviewed-by: Janosch Frank <frankja@linux.ibm.com> > --- > s390x/uv-host.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/s390x/uv-host.c b/s390x/uv-host.c > index a1a6d120..e1fc0213 100644 > --- a/s390x/uv-host.c > +++ b/s390x/uv-host.c > @@ -329,7 +329,7 @@ static void test_init(void) > struct psw psw; > > /* Donated storage needs to be over 2GB */ > - mem = (uint64_t)memalign(1UL << 31, uvcb_qui.uv_base_stor_len); > + mem = (uint64_t)memalign_pages_flags(SZ_1M, uvcb_qui.uv_base_stor_len, AREA_NORMAL); > > uvcb_init.header.len = sizeof(uvcb_init); > uvcb_init.header.cmd = UVC_CMD_INIT_UV;
On 10/18/22 16:09, Claudio Imbrenda wrote: > Allocate the donated storage with 1M alignment from the normal pool, to > force it to be above 2G without wasting a whole 2G block of memory. > > Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com> LGTM Reviewed-by; Steffen Eiden <seiden@linux.ibm.com> > --- > s390x/uv-host.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/s390x/uv-host.c b/s390x/uv-host.c > index a1a6d120..e1fc0213 100644 > --- a/s390x/uv-host.c > +++ b/s390x/uv-host.c > @@ -329,7 +329,7 @@ static void test_init(void) > struct psw psw; > > /* Donated storage needs to be over 2GB */ > - mem = (uint64_t)memalign(1UL << 31, uvcb_qui.uv_base_stor_len); > + mem = (uint64_t)memalign_pages_flags(SZ_1M, uvcb_qui.uv_base_stor_len, AREA_NORMAL); > > uvcb_init.header.len = sizeof(uvcb_init); > uvcb_init.header.cmd = UVC_CMD_INIT_UV;
diff --git a/s390x/uv-host.c b/s390x/uv-host.c index a1a6d120..e1fc0213 100644 --- a/s390x/uv-host.c +++ b/s390x/uv-host.c @@ -329,7 +329,7 @@ static void test_init(void) struct psw psw; /* Donated storage needs to be over 2GB */ - mem = (uint64_t)memalign(1UL << 31, uvcb_qui.uv_base_stor_len); + mem = (uint64_t)memalign_pages_flags(SZ_1M, uvcb_qui.uv_base_stor_len, AREA_NORMAL); uvcb_init.header.len = sizeof(uvcb_init); uvcb_init.header.cmd = UVC_CMD_INIT_UV;
Allocate the donated storage with 1M alignment from the normal pool, to force it to be above 2G without wasting a whole 2G block of memory. Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com> --- s390x/uv-host.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)