linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: mm: use phys_addr_t in __arm_ioremap functions
@ 2015-01-14 17:22 Vitaly Andrianov
  2015-01-14 17:40 ` Russell King - ARM Linux
  0 siblings, 1 reply; 2+ messages in thread
From: Vitaly Andrianov @ 2015-01-14 17:22 UTC (permalink / raw)
  To: linux-arm-kernel

On a 32 bit ARM architecture with LPAE extension physical addresses
cannot fit into unsigned long variable.

This patch fixes the ioremap_page, __map_ioremap_pfn_caller,
__arm_ioremap and __arm_ioremap_exec functions.

Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
Acked-by: Murali Karicheri <m-karicheri2@ti.com>
---
 arch/arm/include/asm/mach/map.h | 2 +-
 arch/arm/mm/ioremap.c           | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/include/asm/mach/map.h b/arch/arm/include/asm/mach/map.h
index 2fe141f..836f006 100644
--- a/arch/arm/include/asm/mach/map.h
+++ b/arch/arm/include/asm/mach/map.h
@@ -52,7 +52,7 @@ extern const struct mem_type *get_mem_type(unsigned int type);
 /*
  * external interface to remap single page with appropriate type
  */
-extern int ioremap_page(unsigned long virt, unsigned long phys,
+extern int ioremap_page(unsigned long virt, phys_addr_t phys,
 			const struct mem_type *mtype);
 #else
 #define iotable_init(map,num)	do { } while (0)
diff --git a/arch/arm/mm/ioremap.c b/arch/arm/mm/ioremap.c
index f123d6e..e0fe50f 100644
--- a/arch/arm/mm/ioremap.c
+++ b/arch/arm/mm/ioremap.c
@@ -103,7 +103,7 @@ void __init add_static_vm_early(struct static_vm *svm)
 	list_add_tail(&svm->list, &curr_svm->list);
 }
 
-int ioremap_page(unsigned long virt, unsigned long phys,
+int ioremap_page(unsigned long virt, phys_addr_t phys,
 		 const struct mem_type *mtype)
 {
 	return ioremap_page_range(virt, virt + PAGE_SIZE, phys,
-- 
1.9.1

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

* [PATCH] ARM: mm: use phys_addr_t in __arm_ioremap functions
  2015-01-14 17:22 [PATCH] ARM: mm: use phys_addr_t in __arm_ioremap functions Vitaly Andrianov
@ 2015-01-14 17:40 ` Russell King - ARM Linux
  0 siblings, 0 replies; 2+ messages in thread
From: Russell King - ARM Linux @ 2015-01-14 17:40 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Jan 14, 2015 at 12:22:34PM -0500, Vitaly Andrianov wrote:
> On a 32 bit ARM architecture with LPAE extension physical addresses
> cannot fit into unsigned long variable.
> 
> This patch fixes the ioremap_page, __map_ioremap_pfn_caller,
> __arm_ioremap and __arm_ioremap_exec functions.

This patch does not do what the description says.  It only touches one
function - ioremap_page(), which from what I can see is never called.

It looks like it was introduced by Hiroshi DOYU without coming through
my core ARM tree (was it even reviewed?) in 2009, but six years on, it
doesn't have any users:

$ git grep 'ioremap_page\>'
arch/arm/include/asm/mach/map.h:extern int ioremap_page(unsigned long virt, unsi...
arch/arm/mm/ioremap.c:int ioremap_page(unsigned long virt, unsigned long phys,
arch/arm/mm/ioremap.c:EXPORT_SYMBOL(ioremap_page);
arch/unicore32/mm/ioremap.c:int ioremap_page(unsigned long virt, unsigned long p...
arch/unicore32/mm/ioremap.c:EXPORT_SYMBOL(ioremap_page);

I'd much rather see a patch deleting ioremap_page().

Thanks.

-- 
FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up
according to speedtest.net.

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

end of thread, other threads:[~2015-01-14 17:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-14 17:22 [PATCH] ARM: mm: use phys_addr_t in __arm_ioremap functions Vitaly Andrianov
2015-01-14 17:40 ` Russell King - ARM Linux

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