diff options
author | Bjorn Helgaas <bjorn.helgaas@hp.com> | 2006-03-26 04:37:05 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-26 11:56:54 -0500 |
commit | 136939a2b5aa4302281215745ccd567e1df2e8d4 (patch) | |
tree | 384841deada5b0ceb44c255e0474866bbc8d3354 /include | |
parent | 3ed3bce846abc7ef460104b461cac793e41afe5e (diff) |
[PATCH] EFI, /dev/mem: simplify efi_mem_attribute_range()
Pass the size, not a pointer to the size, to efi_mem_attribute_range().
This function validates memory regions for the /dev/mem read/write/mmap paths.
The pointer allows arches to reduce the size of the range, but I think that's
unnecessary complexity. Simplifying it will let me use
efi_mem_attribute_range() to improve the ia64 ioremap() implementation.
Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Cc: Matt Domsch <Matt_Domsch@dell.com>
Cc: "Tolentino, Matthew E" <matthew.e.tolentino@intel.com>
Cc: "Brown, Len" <len.brown@intel.com>
Cc: Andi Kleen <ak@muc.de>
Acked-by: "Luck, Tony" <tony.luck@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-ia64/io.h | 4 | ||||
-rw-r--r-- | include/linux/efi.h | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/include/asm-ia64/io.h b/include/asm-ia64/io.h index 0d9bcc36f2a9..acba019b08e9 100644 --- a/include/asm-ia64/io.h +++ b/include/asm-ia64/io.h | |||
@@ -88,8 +88,8 @@ phys_to_virt (unsigned long address) | |||
88 | } | 88 | } |
89 | 89 | ||
90 | #define ARCH_HAS_VALID_PHYS_ADDR_RANGE | 90 | #define ARCH_HAS_VALID_PHYS_ADDR_RANGE |
91 | extern int valid_phys_addr_range (unsigned long addr, size_t *count); /* efi.c */ | 91 | extern int valid_phys_addr_range (unsigned long addr, size_t count); /* efi.c */ |
92 | extern int valid_mmap_phys_addr_range (unsigned long addr, size_t *count); | 92 | extern int valid_mmap_phys_addr_range (unsigned long addr, size_t count); |
93 | 93 | ||
94 | /* | 94 | /* |
95 | * The following two macros are deprecated and scheduled for removal. | 95 | * The following two macros are deprecated and scheduled for removal. |
diff --git a/include/linux/efi.h b/include/linux/efi.h index c7c5dd316182..d15725470aa4 100644 --- a/include/linux/efi.h +++ b/include/linux/efi.h | |||
@@ -292,6 +292,8 @@ extern void efi_enter_virtual_mode (void); /* switch EFI to virtual mode, if pos | |||
292 | extern u64 efi_get_iobase (void); | 292 | extern u64 efi_get_iobase (void); |
293 | extern u32 efi_mem_type (unsigned long phys_addr); | 293 | extern u32 efi_mem_type (unsigned long phys_addr); |
294 | extern u64 efi_mem_attributes (unsigned long phys_addr); | 294 | extern u64 efi_mem_attributes (unsigned long phys_addr); |
295 | extern int efi_mem_attribute_range (unsigned long phys_addr, unsigned long size, | ||
296 | u64 attr); | ||
295 | extern int __init efi_uart_console_only (void); | 297 | extern int __init efi_uart_console_only (void); |
296 | extern void efi_initialize_iomem_resources(struct resource *code_resource, | 298 | extern void efi_initialize_iomem_resources(struct resource *code_resource, |
297 | struct resource *data_resource); | 299 | struct resource *data_resource); |