[meta-freescale] [meta-fsl-arm][PATCH] imx-vpu: fix checks of IOGetVirtMem() return value

Eric Nelson eric.nelson at boundarydevices.com
Wed Jun 25 09:22:21 PDT 2014


On 06/25/2014 09:18 AM, Otavio Salvador wrote:
> Hello Eric,
> Hello Lauren,
> 
> On Sat, Jun 21, 2014 at 2:52 PM, Eric Nelson
> <eric.nelson at boundarydevices.com> wrote:
>> The IOGetVirtMem() routine returns the address of a memory block
>> or -1 (MAP_FAILED) to indicate an error.
>>
>> Many callers of this routine tested the return value for <= 0
>> to detect failure, and at least with a 3G/1G memory split
>> configured in the kernel, a negative number (!= -1) is a
>> valid (successful) return value.
>>
>> Without this patch, the IOSystemInit() will often detect
>> failure incorrectly.
>>
>> Signed-off-by: Eric Nelson <eric.nelson at boundarydevices.com>
> 
> Eric, you forgot the add the upstream-status field as:
> 
> diff --git a/recipes-bsp/imx-vpu/imx-vpu/0001-IOGetVirtMem-returns-1-MAP_FAILED-on-failure.patch
> b/recipes-bsp/imx-vpu/imx-vpu/0001-IOGetVirtMem-returns-1-MAP_FAILED-on-failure.patch
> index 26826ba..348a536 100644
> --- a/recipes-bsp/imx-vpu/imx-vpu/0001-IOGetVirtMem-returns-1-MAP_FAILED-on-failure.patch
> +++ b/recipes-bsp/imx-vpu/imx-vpu/0001-IOGetVirtMem-returns-1-MAP_FAILED-on-failure.patch
> @@ -3,6 +3,8 @@ From: Eric Nelson <eric.nelson at boundarydevices.com>
>  Date: Fri, 20 Jun 2014 19:42:38 -0700
>  Subject: [PATCH] IOGetVirtMem returns -1 (MAP_FAILED) on failure
> 
> +Upstream-Status: Pending
> +
>  Signed-off-by: Eric Nelson <eric.nelson at boundarydevices.com>
>  ---
>   vpu/vpu_io.c  | 2 +-
> 
> I have done it here, so no need to resend it but please do it next time.
> 

Thanks Otavio.

> Lauren, this patch should be reviewed internally.
> 

This should be a quick scan, since the routines are pretty simple.

Regards,


Eric


More information about the meta-freescale mailing list