summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/ia64/kernel/efi.c4
-rw-r--r--arch/x86/platform/efi/efi.c6
-rw-r--r--include/linux/efi.h2
3 files changed, 6 insertions, 6 deletions
diff --git a/arch/ia64/kernel/efi.c b/arch/ia64/kernel/efi.c
index 121295637d0d..81416000c5e0 100644
--- a/arch/ia64/kernel/efi.c
+++ b/arch/ia64/kernel/efi.c
@@ -757,14 +757,14 @@ efi_memmap_intersects (unsigned long phys_addr, unsigned long size)
757 return 0; 757 return 0;
758} 758}
759 759
760u32 760int
761efi_mem_type (unsigned long phys_addr) 761efi_mem_type (unsigned long phys_addr)
762{ 762{
763 efi_memory_desc_t *md = efi_memory_descriptor(phys_addr); 763 efi_memory_desc_t *md = efi_memory_descriptor(phys_addr);
764 764
765 if (md) 765 if (md)
766 return md->type; 766 return md->type;
767 return 0; 767 return -EINVAL;
768} 768}
769 769
770u64 770u64
diff --git a/arch/x86/platform/efi/efi.c b/arch/x86/platform/efi/efi.c
index f084d8718ac4..6217b23e85f6 100644
--- a/arch/x86/platform/efi/efi.c
+++ b/arch/x86/platform/efi/efi.c
@@ -1035,12 +1035,12 @@ void __init efi_enter_virtual_mode(void)
1035/* 1035/*
1036 * Convenience functions to obtain memory types and attributes 1036 * Convenience functions to obtain memory types and attributes
1037 */ 1037 */
1038u32 efi_mem_type(unsigned long phys_addr) 1038int efi_mem_type(unsigned long phys_addr)
1039{ 1039{
1040 efi_memory_desc_t *md; 1040 efi_memory_desc_t *md;
1041 1041
1042 if (!efi_enabled(EFI_MEMMAP)) 1042 if (!efi_enabled(EFI_MEMMAP))
1043 return 0; 1043 return -ENOTSUPP;
1044 1044
1045 for_each_efi_memory_desc(md) { 1045 for_each_efi_memory_desc(md) {
1046 if ((md->phys_addr <= phys_addr) && 1046 if ((md->phys_addr <= phys_addr) &&
@@ -1048,7 +1048,7 @@ u32 efi_mem_type(unsigned long phys_addr)
1048 (md->num_pages << EFI_PAGE_SHIFT)))) 1048 (md->num_pages << EFI_PAGE_SHIFT))))
1049 return md->type; 1049 return md->type;
1050 } 1050 }
1051 return 0; 1051 return -EINVAL;
1052} 1052}
1053 1053
1054static int __init arch_parse_efi_cmdline(char *str) 1054static int __init arch_parse_efi_cmdline(char *str)
diff --git a/include/linux/efi.h b/include/linux/efi.h
index 8e24f099bd3f..4e47f78430be 100644
--- a/include/linux/efi.h
+++ b/include/linux/efi.h
@@ -985,7 +985,7 @@ static inline void efi_esrt_init(void) { }
985extern int efi_config_parse_tables(void *config_tables, int count, int sz, 985extern int efi_config_parse_tables(void *config_tables, int count, int sz,
986 efi_config_table_type_t *arch_tables); 986 efi_config_table_type_t *arch_tables);
987extern u64 efi_get_iobase (void); 987extern u64 efi_get_iobase (void);
988extern u32 efi_mem_type (unsigned long phys_addr); 988extern int efi_mem_type(unsigned long phys_addr);
989extern u64 efi_mem_attributes (unsigned long phys_addr); 989extern u64 efi_mem_attributes (unsigned long phys_addr);
990extern u64 efi_mem_attribute (unsigned long phys_addr, unsigned long size); 990extern u64 efi_mem_attribute (unsigned long phys_addr, unsigned long size);
991extern int __init efi_uart_console_only (void); 991extern int __init efi_uart_console_only (void);