Messages in this thread Patch in this message | | | From | Petr Tesarik <> | Subject | [PATCH 09/10] x86: provide arch-specific valid_phys_addr_range() | Date | Fri, 17 Jun 2011 10:48:05 +0200 |
| |
The default implementation in drivers/char/mem.c refuses to map high memory, but since xlate_dev_mem_ptr() can now handle high memory on x86, all physical addresses are valid.
We needn't check the available physical memory (or memory holes) here, because these cases are handled by xlate_dev_mem_ptr (using pfn_valid).
Signed-off-by: Petr Tesarik <ptesarik@suse.cz> --- arch/x86/include/asm/io.h | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/arch/x86/include/asm/io.h b/arch/x86/include/asm/io.h index 9b994dd..e3150fe 100644 --- a/arch/x86/include/asm/io.h +++ b/arch/x86/include/asm/io.h @@ -311,6 +311,17 @@ BUILDIO(b, b, char) BUILDIO(w, w, short) BUILDIO(l, , int) +#define ARCH_HAS_VALID_PHYS_ADDR_RANGE +static inline int valid_phys_addr_range (phys_addr_t addr, size_t size) +{ + return 1; +} + +static inline int valid_mmap_phys_addr_range (unsigned long pfn, size_t size) +{ + return 1; +} + extern void *xlate_dev_mem_ptr(phys_addr_t phys); extern void unxlate_dev_mem_ptr(phys_addr_t phys, void *addr); -- 1.7.3.4
| |