]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
x86: Increase the size of the phys_size_t and phys_addr_t types
authorGabe Black <gabeblack@chromium.org>
Tue, 23 Oct 2012 18:04:44 +0000 (18:04 +0000)
committerSimon Glass <sjg@chromium.org>
Thu, 6 Dec 2012 22:30:40 +0000 (14:30 -0800)
These types should be 64 bits long to reflect the fact that physical
addresses and the size of physical areas of memory are more than 32 bits
long.

Signed-off-by: Gabe Black <gabeblack@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
arch/x86/include/asm/io.h
arch/x86/include/asm/types.h

index 84a638da78df17ca46d8c62c4750d17bc6d97d28..86bac90e8e882650829b7ce9177e5198339237a5 100644 (file)
@@ -1,6 +1,8 @@
 #ifndef _ASM_IO_H
 #define _ASM_IO_H
 
+#include <compiler.h>
+
 /*
  * This file contains the definitions for the x86 IO instructions
  * inb/inw/inl/outb/outw/outl and the "string versions" of the same
@@ -220,7 +222,7 @@ static inline void sync(void)
 static inline void *
 map_physmem(phys_addr_t paddr, unsigned long len, unsigned long flags)
 {
-       return (void *)paddr;
+       return (void *)(uintptr_t)paddr;
 }
 
 /*
@@ -233,7 +235,7 @@ static inline void unmap_physmem(void *vaddr, unsigned long flags)
 
 static inline phys_addr_t virt_to_phys(void * vaddr)
 {
-       return (phys_addr_t)(vaddr);
+       return (phys_addr_t)(uintptr_t)(vaddr);
 }
 
 /*
index 9a40e383eb35afc93ac0b07cbded5530908b4a18..e9fde88f7d4a52a414d7a44d655185f61f3c96b8 100644 (file)
@@ -45,8 +45,8 @@ typedef unsigned long long u64;
 
 typedef u32 dma_addr_t;
 
-typedef unsigned long phys_addr_t;
-typedef unsigned long phys_size_t;
+typedef unsigned long long phys_addr_t;
+typedef unsigned long long phys_size_t;
 
 #endif /* __KERNEL__ */