>From cc48c0adaee97c8385a356aefa5b64a51818b4fd Mon Sep 17 00:00:00 2001
From: Fernando Guzman Lugo <[email protected]>
Date: Mon, 16 Aug 2010 22:28:24 -0500
Subject: [PATCH] iommu: fix end address of vm area comparation in alloc_iovm_area
End address of the vm area is ?start + bytes -1?,
not ?start + byte?. This patch fixes that issue by doing
an inclusive comparison with tmp->da_start. This issue
was preventing allocate an area of size exactly the same
than the free area. I did no change the value of da_end
of each vm area because it is used to get area size in
several places.
Signed-off-by: Fernando Guzman Lugo <[email protected]>
---
arch/arm/plat-omap/iovmm.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/arm/plat-omap/iovmm.c b/arch/arm/plat-omap/iovmm.c
index b8bcad5..8745d4e 100644
--- a/arch/arm/plat-omap/iovmm.c
+++ b/arch/arm/plat-omap/iovmm.c
@@ -295,7 +295,7 @@ static struct iovm_struct *alloc_iovm_area(struct iommu *obj, u32 da,
prev_end = 0;
list_for_each_entry(tmp, &obj->mmap, list) {
- if ((prev_end <= start) && (start + bytes < tmp->da_start))
+ if ((prev_end <= start) && (start + bytes <= tmp->da_start))
goto found;
if (flags & IOVMF_DA_ANON)
--
1.7.0.4
There was a mistake with Hiroshi email. Looping in Hiroshi
Sorry for the noise.
Regards,
Fernando.
________________________________________
From: [email protected] [[email protected]] On Behalf Of Guzman Lugo, Fernando [[email protected]]
Sent: Monday, August 16, 2010 10:51 PM
To: [email protected]; [email protected]
Cc: [email protected]; Kanigeri, Hari
Subject: [PATCH] iommu: fix end address of vm area comparation in alloc_iovm_area
>From cc48c0adaee97c8385a356aefa5b64a51818b4fd Mon Sep 17 00:00:00 2001
From: Fernando Guzman Lugo <[email protected]>
Date: Mon, 16 Aug 2010 22:28:24 -0500
Subject: [PATCH] iommu: fix end address of vm area comparation in alloc_iovm_area
End address of the vm area is ?start + bytes -1?,
not ?start + byte?. This patch fixes that issue by doing
an inclusive comparison with tmp->da_start. This issue
was preventing allocate an area of size exactly the same
than the free area. I did no change the value of da_end
of each vm area because it is used to get area size in
several places.
Signed-off-by: Fernando Guzman Lugo <[email protected]>
---
arch/arm/plat-omap/iovmm.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/arm/plat-omap/iovmm.c b/arch/arm/plat-omap/iovmm.c
index b8bcad5..8745d4e 100644
--- a/arch/arm/plat-omap/iovmm.c
+++ b/arch/arm/plat-omap/iovmm.c
@@ -295,7 +295,7 @@ static struct iovm_struct *alloc_iovm_area(struct iommu *obj, u32 da,
prev_end = 0;
list_for_each_entry(tmp, &obj->mmap, list) {
- if ((prev_end <= start) && (start + bytes < tmp->da_start))
+ if ((prev_end <= start) && (start + bytes <= tmp->da_start))
goto found;
if (flags & IOVMF_DA_ANON)
--
1.7.0.4
From: "ext Guzman Lugo, Fernando" <[email protected]>
Subject: RE: [PATCH] iommu: fix end address of vm area comparation in alloc_iovm_area
Date: Tue, 17 Aug 2010 06:48:14 +0200
> From: [email protected] [[email protected]] On Behalf Of Guzman Lugo, Fernando [[email protected]]
> Sent: Monday, August 16, 2010 10:51 PM
> To: [email protected]; [email protected]
> Cc: [email protected]; Kanigeri, Hari
> Subject: [PATCH] iommu: fix end address of vm area comparation in alloc_iovm_area
>
> From cc48c0adaee97c8385a356aefa5b64a51818b4fd Mon Sep 17 00:00:00 2001
> From: Fernando Guzman Lugo <[email protected]>
> Date: Mon, 16 Aug 2010 22:28:24 -0500
> Subject: [PATCH] iommu: fix end address of vm area comparation in alloc_iovm_area
>
> End address of the vm area is “start + bytes -1”,
> not “start + byte”. This patch fixes that issue by doing
> an inclusive comparison with tmp->da_start. This issue
> was preventing allocate an area of size exactly the same
> than the free area. I did no change the value of da_end
> of each vm area because it is used to get area size in
> several places.
Ok for me. Is this patch against the latest?
>From: Hiroshi DOYU [[email protected]]
>Sent: Tuesday, August 17, 2010 12:27 AM
>To: Guzman Lugo, Fernando
>Cc: [email protected]; [email protected]; Kanigeri, Hari
>Subject: Re: [PATCH] iommu: fix end address of vm area comparation in alloc_iovm_area
>
>From: "ext Guzman Lugo, Fernando" <[email protected]>
>Subject: RE: [PATCH] iommu: fix end address of vm area comparation in alloc_iovm_area
>Date: Tue, 17 Aug 2010 06:48:14 +0200
>
>> From: [email protected] [[email protected]] On Behalf Of Guzman Lugo, Fernando [[email protected]]
>> Sent: Monday, August 16, 2010 10:51 PM
>> To: [email protected]; [email protected]
>> Cc: [email protected]; Kanigeri, Hari
>> Subject: [PATCH] iommu: fix end address of vm area comparation in alloc_iovm_area
>>
>> From cc48c0adaee97c8385a356aefa5b64a51818b4fd Mon Sep 17 00:00:00 2001
>> From: Fernando Guzman Lugo <[email protected]>
>> Date: Mon, 16 Aug 2010 22:28:24 -0500
>> Subject: [PATCH] iommu: fix end address of vm area comparation in alloc_iovm_area
>>
>> End address of the vm area is ?start + bytes -1?,
>> not ?start + byte?. This patch fixes that issue by doing
>> an inclusive comparison with tmp->da_start. This issue
>> was preventing allocate an area of size exactly the same
>> than the free area. I did no change the value of da_end
>> of each vm area because it is used to get area size in
>> several places.
>
>Ok for me. Is this patch against the latest?
not it isn't, but I don't think it could have issues applying. However I will resend it, base against the latest and include you ack.
Regards,
Fernando.