Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Linux: Kernel

[PATCH] devres: support addresses greater than an unsigned long via dev_ioremap

 

 

Linux kernel RSS feed   Index | Next | Previous | View Threaded


galak at kernel

Apr 28, 2008, 11:22 PM

Post #1 of 5 (1042 views)
Permalink
[PATCH] devres: support addresses greater than an unsigned long via dev_ioremap

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 [at] kernel>
---
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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/


htejun at gmail

Apr 28, 2008, 11:30 PM

Post #2 of 5 (954 views)
Permalink
Re: [PATCH] devres: support addresses greater than an unsigned long via dev_ioremap [In reply to]

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 [at] kernel>

Acked-by: Tejun Heo <htejun [at] gmail>

Thanks.

--
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/


jgarzik at pobox

Apr 28, 2008, 11:37 PM

Post #3 of 5 (967 views)
Permalink
Re: [PATCH] devres: support addresses greater than an unsigned long via dev_ioremap [In reply to]

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 [at] kernel>
>
> Acked-by: Tejun Heo <htejun [at] gmail>

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



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/


galak at kernel

Apr 29, 2008, 7:08 AM

Post #4 of 5 (951 views)
Permalink
Re: [PATCH] devres: support addresses greater than an unsigned long via dev_ioremap [In reply to]

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 [at] kernel>
>> Acked-by: Tejun Heo <htejun [at] gmail>
>
> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/


greg at kroah

Apr 29, 2008, 8:23 AM

Post #5 of 5 (953 views)
Permalink
Re: [PATCH] devres: support addresses greater than an unsigned long via dev_ioremap [In reply to]

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 [at] kernel>
>>> Acked-by: Tejun Heo <htejun [at] gmail>
>>
>> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Linux kernel RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.