linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] devres: support addresses greater than an unsigned long via dev_ioremap
@ 2008-04-29  6:22 Kumar Gala
  2008-04-29  6:30 ` Tejun Heo
  0 siblings, 1 reply; 8+ messages in thread
From: Kumar Gala @ 2008-04-29  6:22 UTC (permalink / raw)
  To: htejun, Andrew Morton, jgarzik; +Cc: linuxppc-dev, linux-kernel

Use a resource_size_t instead of unsigned long since some arch's are
capable of having ioremap deal with addresses greater than the size of a
unsigned long.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
---
 include/linux/io.h |    4 ++--
 lib/devres.c       |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/linux/io.h b/include/linux/io.h
index e3b2dda..831f57c 100644
--- a/include/linux/io.h
+++ b/include/linux/io.h
@@ -58,9 +58,9 @@ static inline void devm_ioport_unmap(struct device *dev, void __iomem *addr)
 }
 #endif

-void __iomem * devm_ioremap(struct device *dev, unsigned long offset,
+void __iomem * devm_ioremap(struct device *dev, resource_size_t offset,
 			    unsigned long size);
-void __iomem * devm_ioremap_nocache(struct device *dev, unsigned long offset,
+void __iomem * devm_ioremap_nocache(struct device *dev, resource_size_t offset,
 				    unsigned long size);
 void devm_iounmap(struct device *dev, void __iomem *addr);
 int check_signature(const volatile void __iomem *io_addr,
diff --git a/lib/devres.c b/lib/devres.c
index edc27a5..26c87c4 100644
--- a/lib/devres.c
+++ b/lib/devres.c
@@ -20,7 +20,7 @@ static int devm_ioremap_match(struct device *dev, void *res, void *match_data)
  *
  * Managed ioremap().  Map is automatically unmapped on driver detach.
  */
-void __iomem *devm_ioremap(struct device *dev, unsigned long offset,
+void __iomem *devm_ioremap(struct device *dev, resource_size_t offset,
 			   unsigned long size)
 {
 	void __iomem **ptr, *addr;
@@ -49,7 +49,7 @@ EXPORT_SYMBOL(devm_ioremap);
  * Managed ioremap_nocache().  Map is automatically unmapped on driver
  * detach.
  */
-void __iomem *devm_ioremap_nocache(struct device *dev, unsigned long offset,
+void __iomem *devm_ioremap_nocache(struct device *dev, resource_size_t offset,
 				   unsigned long size)
 {
 	void __iomem **ptr, *addr;
-- 
1.5.4.1

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

* Re: [PATCH] devres: support addresses greater than an unsigned long via dev_ioremap
  2008-04-29  6:22 [PATCH] devres: support addresses greater than an unsigned long via dev_ioremap Kumar Gala
@ 2008-04-29  6:30 ` Tejun Heo
  2008-04-29  6:37   ` Jeff Garzik
  0 siblings, 1 reply; 8+ messages in thread
From: Tejun Heo @ 2008-04-29  6:30 UTC (permalink / raw)
  To: Kumar Gala; +Cc: Andrew Morton, linuxppc-dev, jgarzik, linux-kernel

Kumar Gala wrote:
> Use a resource_size_t instead of unsigned long since some arch's are
> capable of having ioremap deal with addresses greater than the size of a
> unsigned long.
> 
> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>

Acked-by: Tejun Heo <htejun@gmail.com>

Thanks.

-- 
tejun

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

* Re: [PATCH] devres: support addresses greater than an unsigned long via dev_ioremap
  2008-04-29  6:30 ` Tejun Heo
@ 2008-04-29  6:37   ` Jeff Garzik
  2008-04-29 14:08     ` Kumar Gala
  0 siblings, 1 reply; 8+ messages in thread
From: Jeff Garzik @ 2008-04-29  6:37 UTC (permalink / raw)
  To: Tejun Heo
  Cc: Andrew Morton, Greg KH, Jesse Barnes, linux-kernel, linuxppc-dev

Tejun Heo wrote:
> Kumar Gala wrote:
>> Use a resource_size_t instead of unsigned long since some arch's are
>> capable of having ioremap deal with addresses greater than the size of a
>> unsigned long.
>>
>> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
> 
> Acked-by: Tejun Heo <htejun@gmail.com>

Fine with me, too.

I think devres changes should go via GregKH (device core) or Jesse (PCI) 
rather than my libata tree, unless there are obvious dependencies...

	Jeff

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

* Re: [PATCH] devres: support addresses greater than an unsigned long via dev_ioremap
  2008-04-29  6:37   ` Jeff Garzik
@ 2008-04-29 14:08     ` Kumar Gala
  2008-04-29 15:23       ` Greg KH
  2008-04-29 15:56       ` [PATCH] devres: support addresses greater than an unsigned long via dev_ioremap Jon Loeliger
  0 siblings, 2 replies; 8+ messages in thread
From: Kumar Gala @ 2008-04-29 14:08 UTC (permalink / raw)
  To: Greg KH
  Cc: Andrew Morton, Tejun Heo, lkml Mailing List, Jesse Barnes,
	linuxppc-dev@ozlabs.org list, Jeff Garzik


On Apr 29, 2008, at 1:37 AM, Jeff Garzik wrote:
> Tejun Heo wrote:
>> Kumar Gala wrote:
>>> Use a resource_size_t instead of unsigned long since some arch's are
>>> capable of having ioremap deal with addresses greater than the  
>>> size of a
>>> unsigned long.
>>>
>>> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
>> Acked-by: Tejun Heo <htejun@gmail.com>
>
> Fine with me, too.
>
> I think devres changes should go via GregKH (device core) or Jesse  
> (PCI) rather than my libata tree, unless there are obvious  
> dependencies...

GregKH will you handle pushing this to Linus.  Its a pretty trivial  
patch and would be nice to go into 2.6.26.  I would also consider it a  
bug fix of shorts for any driver using devres and resource_size_t  
being typedef'd to u64 on a 32-bit processor.

- k

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

* Re: [PATCH] devres: support addresses greater than an unsigned long via dev_ioremap
  2008-04-29 14:08     ` Kumar Gala
@ 2008-04-29 15:23       ` Greg KH
  2008-04-29 15:25         ` [PATCH][RESEND] " Kumar Gala
  2008-04-29 15:56       ` [PATCH] devres: support addresses greater than an unsigned long via dev_ioremap Jon Loeliger
  1 sibling, 1 reply; 8+ messages in thread
From: Greg KH @ 2008-04-29 15:23 UTC (permalink / raw)
  To: Kumar Gala
  Cc: Andrew Morton, Tejun Heo, lkml Mailing List, Jesse Barnes,
	linuxppc-dev@ozlabs.org list, Jeff Garzik

On Tue, Apr 29, 2008 at 09:08:14AM -0500, Kumar Gala wrote:
>
> On Apr 29, 2008, at 1:37 AM, Jeff Garzik wrote:
>> Tejun Heo wrote:
>>> Kumar Gala wrote:
>>>> Use a resource_size_t instead of unsigned long since some arch's are
>>>> capable of having ioremap deal with addresses greater than the size of a
>>>> unsigned long.
>>>>
>>>> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
>>> Acked-by: Tejun Heo <htejun@gmail.com>
>>
>> Fine with me, too.
>>
>> I think devres changes should go via GregKH (device core) or Jesse (PCI) 
>> rather than my libata tree, unless there are obvious dependencies...
>
> GregKH will you handle pushing this to Linus.  Its a pretty trivial patch 
> and would be nice to go into 2.6.26.  I would also consider it a bug fix of 
> shorts for any driver using devres and resource_size_t being typedef'd to 
> u64 on a 32-bit processor.

Sure, I'd be glad to.  But I don't see the patch, care to resend it to
me?

thanks,

greg k-h

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

* [PATCH][RESEND] devres: support addresses greater than an unsigned long via dev_ioremap
  2008-04-29 15:23       ` Greg KH
@ 2008-04-29 15:25         ` Kumar Gala
  2008-04-30 18:42           ` patch devres-support-addresses-greater-than-an-unsigned-long-via-dev_ioremap.patch added to gregkh-2.6 tree gregkh
  0 siblings, 1 reply; 8+ messages in thread
From: Kumar Gala @ 2008-04-29 15:25 UTC (permalink / raw)
  To: Greg KH
  Cc: Andrew Morton, Tejun Heo, lkml Mailing List, Jesse Barnes,
	linuxppc-dev@ozlabs.org list, Jeff Garzik

Use a resource_size_t instead of unsigned long since some arch's are
capable of having ioremap deal with addresses greater than the size of a
unsigned long.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
---

For GregKH to actually get the patch.

- k

 include/linux/io.h |    4 ++--
 lib/devres.c       |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/linux/io.h b/include/linux/io.h
index e3b2dda..831f57c 100644
--- a/include/linux/io.h
+++ b/include/linux/io.h
@@ -58,9 +58,9 @@ static inline void devm_ioport_unmap(struct device *dev, void __iomem *addr)
 }
 #endif

-void __iomem * devm_ioremap(struct device *dev, unsigned long offset,
+void __iomem * devm_ioremap(struct device *dev, resource_size_t offset,
 			    unsigned long size);
-void __iomem * devm_ioremap_nocache(struct device *dev, unsigned long offset,
+void __iomem * devm_ioremap_nocache(struct device *dev, resource_size_t offset,
 				    unsigned long size);
 void devm_iounmap(struct device *dev, void __iomem *addr);
 int check_signature(const volatile void __iomem *io_addr,
diff --git a/lib/devres.c b/lib/devres.c
index edc27a5..26c87c4 100644
--- a/lib/devres.c
+++ b/lib/devres.c
@@ -20,7 +20,7 @@ static int devm_ioremap_match(struct device *dev, void *res, void *match_data)
  *
  * Managed ioremap().  Map is automatically unmapped on driver detach.
  */
-void __iomem *devm_ioremap(struct device *dev, unsigned long offset,
+void __iomem *devm_ioremap(struct device *dev, resource_size_t offset,
 			   unsigned long size)
 {
 	void __iomem **ptr, *addr;
@@ -49,7 +49,7 @@ EXPORT_SYMBOL(devm_ioremap);
  * Managed ioremap_nocache().  Map is automatically unmapped on driver
  * detach.
  */
-void __iomem *devm_ioremap_nocache(struct device *dev, unsigned long offset,
+void __iomem *devm_ioremap_nocache(struct device *dev, resource_size_t offset,
 				   unsigned long size)
 {
 	void __iomem **ptr, *addr;
-- 
1.5.4.1

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

* Re: [PATCH] devres: support addresses greater than an unsigned long via dev_ioremap
  2008-04-29 14:08     ` Kumar Gala
  2008-04-29 15:23       ` Greg KH
@ 2008-04-29 15:56       ` Jon Loeliger
  1 sibling, 0 replies; 8+ messages in thread
From: Jon Loeliger @ 2008-04-29 15:56 UTC (permalink / raw)
  To: Kumar Gala; +Cc: linuxppc-dev@ozlabs.org list

Kumar Gala wrote:
>
> Its a pretty trivial 
> patch and would be nice to go into 2.6.26.  I would also consider it a 
> bug fix of shorts for any driver

Looked like a bugfix of longs to me... :-)

jdl

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

* patch devres-support-addresses-greater-than-an-unsigned-long-via-dev_ioremap.patch added to gregkh-2.6 tree
  2008-04-29 15:25         ` [PATCH][RESEND] " Kumar Gala
@ 2008-04-30 18:42           ` gregkh
  0 siblings, 0 replies; 8+ messages in thread
From: gregkh @ 2008-04-30 18:42 UTC (permalink / raw)
  To: galak, akpm, gregkh, greg, htejun, jbarnes, jgarzik, linux-kernel,
	linuxppc-dev


This is a note to let you know that I've just added the patch titled

     Subject: devres: support addresses greater than an unsigned long via dev_ioremap

to my gregkh-2.6 tree.  Its filename is

     devres-support-addresses-greater-than-an-unsigned-long-via-dev_ioremap.patch

This tree can be found at 
    http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/patches/


>From galak@kernel.crashing.org  Wed Apr 30 11:27:51 2008
From: Kumar Gala <galak@kernel.crashing.org>
Date: Tue, 29 Apr 2008 10:25:48 -0500 (CDT)
Subject: devres: support addresses greater than an unsigned long via dev_ioremap
To: Greg KH <greg@kroah.com>
Cc: Tejun Heo <htejun@gmail.com>, Jeff Garzik <jgarzik@pobox.com>, Andrew Morton <akpm@osdl.org>, "linuxppc-dev@ozlabs.org list" <linuxppc-dev@ozlabs.org>, lkml Mailing List <linux-kernel@vger.kernel.org>, Jesse Barnes <jbarnes@virtuousgeek.org>
Message-ID: <Pine.LNX.4.64.0804291025140.25102@blarg.am.freescale.net>


Use a resource_size_t instead of unsigned long since some arch's are
capable of having ioremap deal with addresses greater than the size of a
unsigned long.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Cc: Tejun Heo <htejun@gmail.com>
Cc: Jeff Garzik <jgarzik@pobox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 include/linux/io.h |    4 ++--
 lib/devres.c       |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

--- a/include/linux/io.h
+++ b/include/linux/io.h
@@ -58,9 +58,9 @@ static inline void devm_ioport_unmap(str
 }
 #endif
 
-void __iomem * devm_ioremap(struct device *dev, unsigned long offset,
+void __iomem * devm_ioremap(struct device *dev, resource_size_t offset,
 			    unsigned long size);
-void __iomem * devm_ioremap_nocache(struct device *dev, unsigned long offset,
+void __iomem * devm_ioremap_nocache(struct device *dev, resource_size_t offset,
 				    unsigned long size);
 void devm_iounmap(struct device *dev, void __iomem *addr);
 int check_signature(const volatile void __iomem *io_addr,
--- a/lib/devres.c
+++ b/lib/devres.c
@@ -20,7 +20,7 @@ static int devm_ioremap_match(struct dev
  *
  * Managed ioremap().  Map is automatically unmapped on driver detach.
  */
-void __iomem *devm_ioremap(struct device *dev, unsigned long offset,
+void __iomem *devm_ioremap(struct device *dev, resource_size_t offset,
 			   unsigned long size)
 {
 	void __iomem **ptr, *addr;
@@ -49,7 +49,7 @@ EXPORT_SYMBOL(devm_ioremap);
  * Managed ioremap_nocache().  Map is automatically unmapped on driver
  * detach.
  */
-void __iomem *devm_ioremap_nocache(struct device *dev, unsigned long offset,
+void __iomem *devm_ioremap_nocache(struct device *dev, resource_size_t offset,
 				   unsigned long size)
 {
 	void __iomem **ptr, *addr;


Patches currently in gregkh-2.6 which might be from galak@kernel.crashing.org are

driver-core/devres-support-addresses-greater-than-an-unsigned-long-via-dev_ioremap.patch

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

end of thread, other threads:[~2008-04-30 19:28 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-29  6:22 [PATCH] devres: support addresses greater than an unsigned long via dev_ioremap Kumar Gala
2008-04-29  6:30 ` Tejun Heo
2008-04-29  6:37   ` Jeff Garzik
2008-04-29 14:08     ` Kumar Gala
2008-04-29 15:23       ` Greg KH
2008-04-29 15:25         ` [PATCH][RESEND] " Kumar Gala
2008-04-30 18:42           ` patch devres-support-addresses-greater-than-an-unsigned-long-via-dev_ioremap.patch added to gregkh-2.6 tree gregkh
2008-04-29 15:56       ` [PATCH] devres: support addresses greater than an unsigned long via dev_ioremap Jon Loeliger

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).