linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] OMAP: iovmm: fix SW flags passed by user
@ 2011-03-25 16:46 Omar Ramirez Luna
  2011-03-25 17:30 ` Sergei Shtylyov
  0 siblings, 1 reply; 5+ messages in thread
From: Omar Ramirez Luna @ 2011-03-25 16:46 UTC (permalink / raw)
  To: Hiroshi DOYU, Tony Lindgren
  Cc: Russell King, Omar Ramirez Luna, David Cohen, l-o, lak

Commit d038aee24dcd changes iovmm to receive flags specified by user,
however the upper 16 bits of the flags are wiped by iovmm itself.

This fixes IOVMF_DA_FIXED flags from being lost, and lets the user
map its desired "device addresses".

Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
---
 arch/arm/plat-omap/include/plat/iovmm.h |    3 ---
 arch/arm/plat-omap/iovmm.c              |    4 ----
 2 files changed, 0 insertions(+), 7 deletions(-)

diff --git a/arch/arm/plat-omap/include/plat/iovmm.h b/arch/arm/plat-omap/include/plat/iovmm.h
index 32a2f6c..e992b96 100644
--- a/arch/arm/plat-omap/include/plat/iovmm.h
+++ b/arch/arm/plat-omap/include/plat/iovmm.h
@@ -29,9 +29,6 @@ struct iovm_struct {
  * lower 16 bit is used for h/w and upper 16 bit is for s/w.
  */
 #define IOVMF_SW_SHIFT		16
-#define IOVMF_HW_SIZE		(1 << IOVMF_SW_SHIFT)
-#define IOVMF_HW_MASK		(IOVMF_HW_SIZE - 1)
-#define IOVMF_SW_MASK		(~IOVMF_HW_MASK)UL
 
 /*
  * iovma: h/w flags derived from cam and ram attribute
diff --git a/arch/arm/plat-omap/iovmm.c b/arch/arm/plat-omap/iovmm.c
index 51ef43e..83a37c5 100644
--- a/arch/arm/plat-omap/iovmm.c
+++ b/arch/arm/plat-omap/iovmm.c
@@ -648,7 +648,6 @@ u32 iommu_vmap(struct iommu *obj, u32 da, const struct sg_table *sgt,
 			return PTR_ERR(va);
 	}
 
-	flags &= IOVMF_HW_MASK;
 	flags |= IOVMF_DISCONT;
 	flags |= IOVMF_MMIO;
 
@@ -706,7 +705,6 @@ u32 iommu_vmalloc(struct iommu *obj, u32 da, size_t bytes, u32 flags)
 	if (!va)
 		return -ENOMEM;
 
-	flags &= IOVMF_HW_MASK;
 	flags |= IOVMF_DISCONT;
 	flags |= IOVMF_ALLOC;
 
@@ -795,7 +793,6 @@ u32 iommu_kmap(struct iommu *obj, u32 da, u32 pa, size_t bytes,
 	if (!va)
 		return -ENOMEM;
 
-	flags &= IOVMF_HW_MASK;
 	flags |= IOVMF_LINEAR;
 	flags |= IOVMF_MMIO;
 
@@ -853,7 +850,6 @@ u32 iommu_kmalloc(struct iommu *obj, u32 da, size_t bytes, u32 flags)
 		return -ENOMEM;
 	pa = virt_to_phys(va);
 
-	flags &= IOVMF_HW_MASK;
 	flags |= IOVMF_LINEAR;
 	flags |= IOVMF_ALLOC;
 
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] OMAP: iovmm: fix SW flags passed by user
  2011-03-25 16:46 [PATCH] OMAP: iovmm: fix SW flags passed by user Omar Ramirez Luna
@ 2011-03-25 17:30 ` Sergei Shtylyov
  2011-03-25 17:36   ` Ramirez Luna, Omar
  0 siblings, 1 reply; 5+ messages in thread
From: Sergei Shtylyov @ 2011-03-25 17:30 UTC (permalink / raw)
  To: Omar Ramirez Luna
  Cc: Hiroshi DOYU, Tony Lindgren, l-o, Russell King, David Cohen, lak

Hello.

Omar Ramirez Luna wrote:

> Commit d038aee24dcd changes iovmm to receive flags specified by user,

    Please also specify that commit's summary for the human readers. Bare ID is 
only usable to gitweb...

> however the upper 16 bits of the flags are wiped by iovmm itself.

> This fixes IOVMF_DA_FIXED flags from being lost, and lets the user
> map its desired "device addresses".

> Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>

WBR, Sergei


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] OMAP: iovmm: fix SW flags passed by user
  2011-03-25 17:30 ` Sergei Shtylyov
@ 2011-03-25 17:36   ` Ramirez Luna, Omar
  2011-03-25 20:05     ` Russell King - ARM Linux
  0 siblings, 1 reply; 5+ messages in thread
From: Ramirez Luna, Omar @ 2011-03-25 17:36 UTC (permalink / raw)
  To: Sergei Shtylyov
  Cc: Hiroshi DOYU, Tony Lindgren, l-o, Russell King, David Cohen, lak

On Fri, Mar 25, 2011 at 12:30 PM, Sergei Shtylyov <sshtylyov@mvista.com> wrote:
> Hello.
>
> Omar Ramirez Luna wrote:
>
>> Commit d038aee24dcd changes iovmm to receive flags specified by user,
>
>   Please also specify that commit's summary for the human readers. Bare ID
> is only usable to gitweb...

Here it is the patch, introducing the change:

https://patchwork.kernel.org/patch/620871/

If accepted by Hiroshi, I can update the description making reference
to this patch instead of commit.

Regards,

Omar
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] OMAP: iovmm: fix SW flags passed by user
  2011-03-25 17:36   ` Ramirez Luna, Omar
@ 2011-03-25 20:05     ` Russell King - ARM Linux
  2011-03-25 20:14       ` Ramirez Luna, Omar
  0 siblings, 1 reply; 5+ messages in thread
From: Russell King - ARM Linux @ 2011-03-25 20:05 UTC (permalink / raw)
  To: Ramirez Luna, Omar
  Cc: Sergei Shtylyov, Hiroshi DOYU, Tony Lindgren, l-o, David Cohen,
	lak

On Fri, Mar 25, 2011 at 12:36:57PM -0500, Ramirez Luna, Omar wrote:
> On Fri, Mar 25, 2011 at 12:30 PM, Sergei Shtylyov <sshtylyov@mvista.com> wrote:
> > Hello.
> >
> > Omar Ramirez Luna wrote:
> >
> >> Commit d038aee24dcd changes iovmm to receive flags specified by user,
> >
> >   Please also specify that commit's summary for the human readers. Bare ID
> > is only usable to gitweb...
> 
> Here it is the patch, introducing the change:
> 
> https://patchwork.kernel.org/patch/620871/
> 
> If accepted by Hiroshi, I can update the description making reference
> to this patch instead of commit.

It is a requirement that all descriptions which refer to a commit shall
contain both the commit ID *and* the summary line for that commit.
Failure to ensure that's the case results in rejection of the patch
until it conforms.
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] OMAP: iovmm: fix SW flags passed by user
  2011-03-25 20:05     ` Russell King - ARM Linux
@ 2011-03-25 20:14       ` Ramirez Luna, Omar
  0 siblings, 0 replies; 5+ messages in thread
From: Ramirez Luna, Omar @ 2011-03-25 20:14 UTC (permalink / raw)
  To: Russell King - ARM Linux
  Cc: Sergei Shtylyov, Tony Lindgren, Hiroshi DOYU, David Cohen, l-o,
	lak

On Fri, Mar 25, 2011 at 3:05 PM, Russell King - ARM Linux
<linux@arm.linux.org.uk>
>> >> Commit d038aee24dcd changes iovmm to receive flags specified by user,
>> >
>> >   Please also specify that commit's summary for the human readers. Bare ID
>> > is only usable to gitweb...
>>
>> Here it is the patch, introducing the change:
>>
>> https://patchwork.kernel.org/patch/620871/
>>
>> If accepted by Hiroshi, I can update the description making reference
>> to this patch instead of commit.
>
> It is a requirement that all descriptions which refer to a commit shall
> contain both the commit ID *and* the summary line for that commit.
> Failure to ensure that's the case results in rejection of the patch
> until it conforms.

Not a problem then... resending v2.

Regards,

Omar

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-03-25 20:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-25 16:46 [PATCH] OMAP: iovmm: fix SW flags passed by user Omar Ramirez Luna
2011-03-25 17:30 ` Sergei Shtylyov
2011-03-25 17:36   ` Ramirez Luna, Omar
2011-03-25 20:05     ` Russell King - ARM Linux
2011-03-25 20:14       ` Ramirez Luna, Omar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).