X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=cirros-testvm%2Fsrc-cirros%2Fbuildroot-2015.05%2Fpackage%2Ffreescale-imx%2Fimx-vpu%2F0001-vpu-io-fix-IOSystemInit-failure.patch;fp=cirros-testvm%2Fsrc-cirros%2Fbuildroot-2015.05%2Fpackage%2Ffreescale-imx%2Fimx-vpu%2F0001-vpu-io-fix-IOSystemInit-failure.patch;h=ed93193e5c78e728cde4bdf56ebc942c6c77e46d;hb=b0a0f15dfaa205161a7fcb20cf1b8cd4948c2ef3;hp=0000000000000000000000000000000000000000;hpb=c6ac3cd55ee2da956195eee393b0882105dfad4e;p=packages%2Ftrusty%2Fcirros-testvm.git diff --git a/cirros-testvm/src-cirros/buildroot-2015.05/package/freescale-imx/imx-vpu/0001-vpu-io-fix-IOSystemInit-failure.patch b/cirros-testvm/src-cirros/buildroot-2015.05/package/freescale-imx/imx-vpu/0001-vpu-io-fix-IOSystemInit-failure.patch new file mode 100644 index 0000000..ed93193 --- /dev/null +++ b/cirros-testvm/src-cirros/buildroot-2015.05/package/freescale-imx/imx-vpu/0001-vpu-io-fix-IOSystemInit-failure.patch @@ -0,0 +1,32 @@ +[PATCH] vpu-io: fix IOSystemInit failure + +When using a kernel where user/kernel split is 3G/1G, the address +returned by IOGetVirtMem() can appear to be a negative int. + +IOSystemInit() incorrectly checks the return value of IOGetVirtMem(). +IOGetVirtMem() returns -1 on error (and not MAP_FAILED, nor any other +negative value.) + +Fix that by correctly checking against -1 (and not MAP_FAILED!) + +Signed-off-by: Gary Bisson +[yann.morin.1998@free.fr: expand the commit log] +Signed-off-by: "Yann E. MORIN" +--- + vpu/vpu_io.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/vpu/vpu_io.c b/vpu/vpu_io.c +index 8cbb571..14759da 100644 +--- a/vpu/vpu_io.c ++++ b/vpu/vpu_io.c +@@ -265,7 +265,7 @@ int IOSystemInit(void *callback) + goto err; + } + +- if (IOGetVirtMem(&bit_work_addr) <= 0) ++ if (IOGetVirtMem(&bit_work_addr) == -1) + goto err; + #endif + UnlockVpu(vpu_semap); +