Commit eee5a9fa authored by Arjan van de Ven's avatar Arjan van de Ven Committed by Linus Torvalds
Browse files

[PATCH] x86_64: Rename e820_mapped to e820_any_mapped



Rename e820_mapped to e820_any_mapped since it tests if any part of the
range is mapped according to the type.

Later steps will introduce e820_all_mapped which will check if the
entire range is mapped with the type.  Both have their merit.
Signed-off-by: default avatarArjan van de Ven <arjan@linux.intel.com>
Signed-off-by: default avatarAndi Kleen <ak@suse.de>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent a8062231
...@@ -80,7 +80,7 @@ static int __init aperture_valid(char *name, u64 aper_base, u32 aper_size) ...@@ -80,7 +80,7 @@ static int __init aperture_valid(char *name, u64 aper_base, u32 aper_size)
printk("Aperture from %s beyond 4GB. Ignoring.\n",name); printk("Aperture from %s beyond 4GB. Ignoring.\n",name);
return 0; return 0;
} }
if (e820_mapped(aper_base, aper_base + aper_size, E820_RAM)) { if (e820_any_mapped(aper_base, aper_base + aper_size, E820_RAM)) {
printk("Aperture from %s pointing to e820 RAM. Ignoring.\n",name); printk("Aperture from %s pointing to e820 RAM. Ignoring.\n",name);
return 0; return 0;
} }
......
...@@ -80,7 +80,8 @@ static inline int bad_addr(unsigned long *addrp, unsigned long size) ...@@ -80,7 +80,8 @@ static inline int bad_addr(unsigned long *addrp, unsigned long size)
return 0; return 0;
} }
int __meminit e820_mapped(unsigned long start, unsigned long end, unsigned type) int __meminit
e820_any_mapped(unsigned long start, unsigned long end, unsigned type)
{ {
int i; int i;
for (i = 0; i < e820.nr_map; i++) { for (i = 0; i < e820.nr_map; i++) {
......
...@@ -305,7 +305,7 @@ static void __meminit phys_pud_init(pud_t *pud, unsigned long address, unsigned ...@@ -305,7 +305,7 @@ static void __meminit phys_pud_init(pud_t *pud, unsigned long address, unsigned
if (paddr >= end) if (paddr >= end)
break; break;
if (!after_bootmem && !e820_mapped(paddr, paddr+PUD_SIZE, 0)) { if (!after_bootmem && !e820_any_mapped(paddr, paddr+PUD_SIZE, 0)) {
set_pud(pud, __pud(0)); set_pud(pud, __pud(0));
continue; continue;
} }
......
...@@ -47,7 +47,7 @@ extern void contig_e820_setup(void); ...@@ -47,7 +47,7 @@ extern void contig_e820_setup(void);
extern unsigned long e820_end_of_ram(void); extern unsigned long e820_end_of_ram(void);
extern void e820_reserve_resources(void); extern void e820_reserve_resources(void);
extern void e820_print_map(char *who); extern void e820_print_map(char *who);
extern int e820_mapped(unsigned long start, unsigned long end, unsigned type); extern int e820_any_mapped(unsigned long start, unsigned long end, unsigned type);
extern void e820_bootmem_free(pg_data_t *pgdat, unsigned long start,unsigned long end); extern void e820_bootmem_free(pg_data_t *pgdat, unsigned long start,unsigned long end);
extern void e820_setup_gap(void); extern void e820_setup_gap(void);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment