aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-03-24 14:22:39 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-03-24 14:22:39 -0400
commitb9e76a00749521f2b080fa8a4fb15f66538ab756 (patch)
tree814bd118b1a44b370b080d96cbe19763aebf9f69 /arch
parent92896bd9fd75b1c993b92874d339a8088bb75560 (diff)
x86-32: Pass the full resource data to ioremap()
It appears that 64-bit PCI resources cannot possibly ever have worked on x86-32 even when the RESOURCES_64BIT config option was set, because any driver that tried to [pci_]ioremap() the resource would have been unable to do so because the high 32 bits would have been silently dropped on the floor by the ioremap() routines that only used "unsigned long". Change them to use "resource_size_t" instead, which properly encodes the whole 64-bit resource data if RESOURCES_64BIT is enabled. Acked-by: H. Peter Anvin <hpa@kernel.org> Acked-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/mm/ioremap.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/x86/mm/ioremap.c b/arch/x86/mm/ioremap.c
index 8fe576baa148..4afaba0ed722 100644
--- a/arch/x86/mm/ioremap.c
+++ b/arch/x86/mm/ioremap.c
@@ -106,7 +106,7 @@ static int ioremap_change_attr(unsigned long vaddr, unsigned long size,
106 * have to convert them into an offset in a page-aligned mapping, but the 106 * have to convert them into an offset in a page-aligned mapping, but the
107 * caller shouldn't need to know that small detail. 107 * caller shouldn't need to know that small detail.
108 */ 108 */
109static void __iomem *__ioremap(unsigned long phys_addr, unsigned long size, 109static void __iomem *__ioremap(resource_size_t phys_addr, unsigned long size,
110 enum ioremap_mode mode) 110 enum ioremap_mode mode)
111{ 111{
112 unsigned long pfn, offset, last_addr, vaddr; 112 unsigned long pfn, offset, last_addr, vaddr;
@@ -193,13 +193,13 @@ static void __iomem *__ioremap(unsigned long phys_addr, unsigned long size,
193 * 193 *
194 * Must be freed with iounmap. 194 * Must be freed with iounmap.
195 */ 195 */
196void __iomem *ioremap_nocache(unsigned long phys_addr, unsigned long size) 196void __iomem *ioremap_nocache(resource_size_t phys_addr, unsigned long size)
197{ 197{
198 return __ioremap(phys_addr, size, IOR_MODE_UNCACHED); 198 return __ioremap(phys_addr, size, IOR_MODE_UNCACHED);
199} 199}
200EXPORT_SYMBOL(ioremap_nocache); 200EXPORT_SYMBOL(ioremap_nocache);
201 201
202void __iomem *ioremap_cache(unsigned long phys_addr, unsigned long size) 202void __iomem *ioremap_cache(resource_size_t phys_addr, unsigned long size)
203{ 203{
204 return __ioremap(phys_addr, size, IOR_MODE_CACHED); 204 return __ioremap(phys_addr, size, IOR_MODE_CACHED);
205} 205}