Skip to content
Snippets Groups Projects
Commit ec516c48 authored by Gabe Black's avatar Gabe Black Committed by Simon Glass
Browse files

x86: Increase the size of the phys_size_t and phys_addr_t types


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: default avatarGabe Black <gabeblack@chromium.org>
Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
parent 0c392909
No related branches found
No related tags found
No related merge requests found
#ifndef _ASM_IO_H #ifndef _ASM_IO_H
#define _ASM_IO_H #define _ASM_IO_H
#include <compiler.h>
/* /*
* This file contains the definitions for the x86 IO instructions * This file contains the definitions for the x86 IO instructions
* inb/inw/inl/outb/outw/outl and the "string versions" of the same * inb/inw/inl/outb/outw/outl and the "string versions" of the same
...@@ -220,7 +222,7 @@ static inline void sync(void) ...@@ -220,7 +222,7 @@ static inline void sync(void)
static inline void * static inline void *
map_physmem(phys_addr_t paddr, unsigned long len, unsigned long flags) 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) ...@@ -233,7 +235,7 @@ static inline void unmap_physmem(void *vaddr, unsigned long flags)
static inline phys_addr_t virt_to_phys(void * vaddr) static inline phys_addr_t virt_to_phys(void * vaddr)
{ {
return (phys_addr_t)(vaddr); return (phys_addr_t)(uintptr_t)(vaddr);
} }
/* /*
......
...@@ -45,8 +45,8 @@ typedef unsigned long long u64; ...@@ -45,8 +45,8 @@ typedef unsigned long long u64;
typedef u32 dma_addr_t; typedef u32 dma_addr_t;
typedef unsigned long phys_addr_t; typedef unsigned long long phys_addr_t;
typedef unsigned long phys_size_t; typedef unsigned long long phys_size_t;
#endif /* __KERNEL__ */ #endif /* __KERNEL__ */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment