Commit 2f36fa13 authored by Thomas Gleixner's avatar Thomas Gleixner Committed by Ingo Molnar

x86: clean up arch/x86/kernel/e820_64.c

White space and coding style cleanup.
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 05fccb0e
/* /*
* Handle the memory map. * Handle the memory map.
* The functions here do the job until bootmem takes over. * The functions here do the job until bootmem takes over.
* *
...@@ -29,44 +29,44 @@ ...@@ -29,44 +29,44 @@
struct e820map e820; struct e820map e820;
/* /*
* PFN of last memory page. * PFN of last memory page.
*/ */
unsigned long end_pfn; unsigned long end_pfn;
EXPORT_SYMBOL(end_pfn); EXPORT_SYMBOL(end_pfn);
/* /*
* end_pfn only includes RAM, while end_pfn_map includes all e820 entries. * end_pfn only includes RAM, while end_pfn_map includes all e820 entries.
* The direct mapping extends to end_pfn_map, so that we can directly access * The direct mapping extends to end_pfn_map, so that we can directly access
* apertures, ACPI and other tables without having to play with fixmaps. * apertures, ACPI and other tables without having to play with fixmaps.
*/ */
unsigned long end_pfn_map; unsigned long end_pfn_map;
/* /*
* Last pfn which the user wants to use. * Last pfn which the user wants to use.
*/ */
static unsigned long __initdata end_user_pfn = MAXMEM>>PAGE_SHIFT; static unsigned long __initdata end_user_pfn = MAXMEM>>PAGE_SHIFT;
extern struct resource code_resource, data_resource, bss_resource; extern struct resource code_resource, data_resource, bss_resource;
/* Check for some hardcoded bad areas that early boot is not allowed to touch */ /* Check for some hardcoded bad areas that early boot is not allowed to touch */
static inline int bad_addr(unsigned long *addrp, unsigned long size) static inline int bad_addr(unsigned long *addrp, unsigned long size)
{ {
unsigned long addr = *addrp, last = addr + size; unsigned long addr = *addrp, last = addr + size;
/* various gunk below that needed for SMP startup */ /* various gunk below that needed for SMP startup */
if (addr < 0x8000) { if (addr < 0x8000) {
*addrp = PAGE_ALIGN(0x8000); *addrp = PAGE_ALIGN(0x8000);
return 1; return 1;
} }
/* direct mapping tables of the kernel */ /* direct mapping tables of the kernel */
if (last >= table_start<<PAGE_SHIFT && addr < table_end<<PAGE_SHIFT) { if (last >= table_start<<PAGE_SHIFT && addr < table_end<<PAGE_SHIFT) {
*addrp = PAGE_ALIGN(table_end << PAGE_SHIFT); *addrp = PAGE_ALIGN(table_end << PAGE_SHIFT);
return 1; return 1;
} }
/* initrd */ /* initrd */
#ifdef CONFIG_BLK_DEV_INITRD #ifdef CONFIG_BLK_DEV_INITRD
if (boot_params.hdr.type_of_loader && boot_params.hdr.ramdisk_image) { if (boot_params.hdr.type_of_loader && boot_params.hdr.ramdisk_image) {
unsigned long ramdisk_image = boot_params.hdr.ramdisk_image; unsigned long ramdisk_image = boot_params.hdr.ramdisk_image;
...@@ -77,7 +77,7 @@ static inline int bad_addr(unsigned long *addrp, unsigned long size) ...@@ -77,7 +77,7 @@ static inline int bad_addr(unsigned long *addrp, unsigned long size)
*addrp = PAGE_ALIGN(ramdisk_end); *addrp = PAGE_ALIGN(ramdisk_end);
return 1; return 1;
} }
} }
#endif #endif
/* kernel code */ /* kernel code */
if (last >= __pa_symbol(&_text) && addr < __pa_symbol(&_end)) { if (last >= __pa_symbol(&_text) && addr < __pa_symbol(&_end)) {
...@@ -97,9 +97,9 @@ static inline int bad_addr(unsigned long *addrp, unsigned long size) ...@@ -97,9 +97,9 @@ static inline int bad_addr(unsigned long *addrp, unsigned long size)
return 1; return 1;
} }
#endif #endif
/* XXX ramdisk image here? */ /* XXX ramdisk image here? */
return 0; return 0;
} }
/* /*
* This function checks if any part of the range <start,end> is mapped * This function checks if any part of the range <start,end> is mapped
...@@ -107,16 +107,18 @@ static inline int bad_addr(unsigned long *addrp, unsigned long size) ...@@ -107,16 +107,18 @@ static inline int bad_addr(unsigned long *addrp, unsigned long size)
*/ */
int int
e820_any_mapped(unsigned long start, unsigned long end, unsigned type) e820_any_mapped(unsigned long start, unsigned long end, unsigned type)
{ {
int i; int i;
for (i = 0; i < e820.nr_map; i++) {
struct e820entry *ei = &e820.map[i]; for (i = 0; i < e820.nr_map; i++) {
if (type && ei->type != type) struct e820entry *ei = &e820.map[i];
if (type && ei->type != type)
continue; continue;
if (ei->addr >= end || ei->addr + ei->size <= start) if (ei->addr >= end || ei->addr + ei->size <= start)
continue; continue;
return 1; return 1;
} }
return 0; return 0;
} }
EXPORT_SYMBOL_GPL(e820_any_mapped); EXPORT_SYMBOL_GPL(e820_any_mapped);
...@@ -127,11 +129,14 @@ EXPORT_SYMBOL_GPL(e820_any_mapped); ...@@ -127,11 +129,14 @@ EXPORT_SYMBOL_GPL(e820_any_mapped);
* Note: this function only works correct if the e820 table is sorted and * Note: this function only works correct if the e820 table is sorted and
* not-overlapping, which is the case * not-overlapping, which is the case
*/ */
int __init e820_all_mapped(unsigned long start, unsigned long end, unsigned type) int __init e820_all_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++) {
struct e820entry *ei = &e820.map[i]; struct e820entry *ei = &e820.map[i];
if (type && ei->type != type) if (type && ei->type != type)
continue; continue;
/* is the region (part) in overlap with the current region ?*/ /* is the region (part) in overlap with the current region ?*/
...@@ -143,59 +148,66 @@ int __init e820_all_mapped(unsigned long start, unsigned long end, unsigned type ...@@ -143,59 +148,66 @@ int __init e820_all_mapped(unsigned long start, unsigned long end, unsigned type
*/ */
if (ei->addr <= start) if (ei->addr <= start)
start = ei->addr + ei->size; start = ei->addr + ei->size;
/* if start is now at or beyond end, we're done, full coverage */ /*
* if start is now at or beyond end, we're done, full
* coverage
*/
if (start >= end) if (start >= end)
return 1; /* we're done */ return 1;
} }
return 0; return 0;
} }
/* /*
* Find a free area in a specific range. * Find a free area in a specific range.
*/ */
unsigned long __init find_e820_area(unsigned long start, unsigned long end, unsigned size) unsigned long __init find_e820_area(unsigned long start, unsigned long end,
{ unsigned size)
int i; {
for (i = 0; i < e820.nr_map; i++) { int i;
struct e820entry *ei = &e820.map[i];
unsigned long addr = ei->addr, last; for (i = 0; i < e820.nr_map; i++) {
if (ei->type != E820_RAM) struct e820entry *ei = &e820.map[i];
continue; unsigned long addr = ei->addr, last;
if (addr < start)
if (ei->type != E820_RAM)
continue;
if (addr < start)
addr = start; addr = start;
if (addr > ei->addr + ei->size) if (addr > ei->addr + ei->size)
continue; continue;
while (bad_addr(&addr, size) && addr+size <= ei->addr+ei->size) while (bad_addr(&addr, size) && addr+size <= ei->addr+ei->size)
; ;
last = PAGE_ALIGN(addr) + size; last = PAGE_ALIGN(addr) + size;
if (last > ei->addr + ei->size) if (last > ei->addr + ei->size)
continue; continue;
if (last > end) if (last > end)
continue; continue;
return addr; return addr;
} }
return -1UL; return -1UL;
} }
/* /*
* Find the highest page frame number we have available * Find the highest page frame number we have available
*/ */
unsigned long __init e820_end_of_ram(void) unsigned long __init e820_end_of_ram(void)
{ {
unsigned long end_pfn = 0; unsigned long end_pfn;
end_pfn = find_max_pfn_with_active_regions(); end_pfn = find_max_pfn_with_active_regions();
if (end_pfn > end_pfn_map) if (end_pfn > end_pfn_map)
end_pfn_map = end_pfn; end_pfn_map = end_pfn;
if (end_pfn_map > MAXMEM>>PAGE_SHIFT) if (end_pfn_map > MAXMEM>>PAGE_SHIFT)
end_pfn_map = MAXMEM>>PAGE_SHIFT; end_pfn_map = MAXMEM>>PAGE_SHIFT;
if (end_pfn > end_user_pfn) if (end_pfn > end_user_pfn)
end_pfn = end_user_pfn; end_pfn = end_user_pfn;
if (end_pfn > end_pfn_map) if (end_pfn > end_pfn_map)
end_pfn = end_pfn_map; end_pfn = end_pfn_map;
printk("end_pfn_map = %lu\n", end_pfn_map); printk(KERN_INFO "end_pfn_map = %lu\n", end_pfn_map);
return end_pfn; return end_pfn;
} }
/* /*
...@@ -219,9 +231,9 @@ void __init e820_reserve_resources(void) ...@@ -219,9 +231,9 @@ void __init e820_reserve_resources(void)
request_resource(&iomem_resource, res); request_resource(&iomem_resource, res);
if (e820.map[i].type == E820_RAM) { if (e820.map[i].type == E820_RAM) {
/* /*
* We don't know which RAM region contains kernel data, * We don't know which RAM region contains kernel data,
* so we try it repeatedly and let the resource manager * so we try it repeatedly and let the resource manager
* test it. * test it.
*/ */
request_resource(res, &code_resource); request_resource(res, &code_resource);
request_resource(res, &data_resource); request_resource(res, &data_resource);
...@@ -322,9 +334,9 @@ e820_register_active_regions(int nid, unsigned long start_pfn, ...@@ -322,9 +334,9 @@ e820_register_active_regions(int nid, unsigned long start_pfn,
add_active_range(nid, ei_startpfn, ei_endpfn); add_active_range(nid, ei_startpfn, ei_endpfn);
} }
/* /*
* Add a memory region to the kernel e820 map. * Add a memory region to the kernel e820 map.
*/ */
void __init add_memory_region(unsigned long start, unsigned long size, int type) void __init add_memory_region(unsigned long start, unsigned long size, int type)
{ {
int x = e820.nr_map; int x = e820.nr_map;
...@@ -349,9 +361,7 @@ unsigned long __init e820_hole_size(unsigned long start, unsigned long end) ...@@ -349,9 +361,7 @@ unsigned long __init e820_hole_size(unsigned long start, unsigned long end)
{ {
unsigned long start_pfn = start >> PAGE_SHIFT; unsigned long start_pfn = start >> PAGE_SHIFT;
unsigned long end_pfn = end >> PAGE_SHIFT; unsigned long end_pfn = end >> PAGE_SHIFT;
unsigned long ei_startpfn; unsigned long ei_startpfn, ei_endpfn, ram = 0;
unsigned long ei_endpfn;
unsigned long ram = 0;
int i; int i;
for (i = 0; i < e820.nr_map; i++) { for (i = 0; i < e820.nr_map; i++) {
...@@ -369,22 +379,25 @@ void __init e820_print_map(char *who) ...@@ -369,22 +379,25 @@ void __init e820_print_map(char *who)
for (i = 0; i < e820.nr_map; i++) { for (i = 0; i < e820.nr_map; i++) {
printk(KERN_INFO " %s: %016Lx - %016Lx ", who, printk(KERN_INFO " %s: %016Lx - %016Lx ", who,
(unsigned long long) e820.map[i].addr, (unsigned long long) e820.map[i].addr,
(unsigned long long) (e820.map[i].addr + e820.map[i].size)); (unsigned long long)
(e820.map[i].addr + e820.map[i].size));
switch (e820.map[i].type) { switch (e820.map[i].type) {
case E820_RAM: printk("(usable)\n"); case E820_RAM:
break; printk(KERN_CONT "(usable)\n");
break;
case E820_RESERVED: case E820_RESERVED:
printk("(reserved)\n"); printk(KERN_CONT "(reserved)\n");
break; break;
case E820_ACPI: case E820_ACPI:
printk("(ACPI data)\n"); printk(KERN_CONT "(ACPI data)\n");
break; break;
case E820_NVS: case E820_NVS:
printk("(ACPI NVS)\n"); printk(KERN_CONT "(ACPI NVS)\n");
break; break;
default: printk("type %u\n", e820.map[i].type); default:
break; printk(KERN_CONT "type %u\n", e820.map[i].type);
break;
} }
} }
} }
...@@ -392,11 +405,11 @@ void __init e820_print_map(char *who) ...@@ -392,11 +405,11 @@ void __init e820_print_map(char *who)
/* /*
* Sanitize the BIOS e820 map. * Sanitize the BIOS e820 map.
* *
* Some e820 responses include overlapping entries. The following * Some e820 responses include overlapping entries. The following
* replaces the original e820 map with a new one, removing overlaps. * replaces the original e820 map with a new one, removing overlaps.
* *
*/ */
static int __init sanitize_e820_map(struct e820entry * biosmap, char * pnr_map) static int __init sanitize_e820_map(struct e820entry *biosmap, char *pnr_map)
{ {
struct change_member { struct change_member {
struct e820entry *pbios; /* pointer to original bios entry */ struct e820entry *pbios; /* pointer to original bios entry */
...@@ -416,7 +429,8 @@ static int __init sanitize_e820_map(struct e820entry * biosmap, char * pnr_map) ...@@ -416,7 +429,8 @@ static int __init sanitize_e820_map(struct e820entry * biosmap, char * pnr_map)
int i; int i;
/* /*
Visually we're performing the following (1,2,3,4 = memory types)... Visually we're performing the following
(1,2,3,4 = memory types)...
Sample memory map (w/overlaps): Sample memory map (w/overlaps):
____22__________________ ____22__________________
...@@ -458,22 +472,23 @@ static int __init sanitize_e820_map(struct e820entry * biosmap, char * pnr_map) ...@@ -458,22 +472,23 @@ static int __init sanitize_e820_map(struct e820entry * biosmap, char * pnr_map)
old_nr = *pnr_map; old_nr = *pnr_map;
/* bail out if we find any unreasonable addresses in bios map */ /* bail out if we find any unreasonable addresses in bios map */
for (i=0; i<old_nr; i++) for (i = 0; i < old_nr; i++)
if (biosmap[i].addr + biosmap[i].size < biosmap[i].addr) if (biosmap[i].addr + biosmap[i].size < biosmap[i].addr)
return -1; return -1;
/* create pointers for initial change-point information (for sorting) */ /* create pointers for initial change-point information (for sorting) */
for (i=0; i < 2*old_nr; i++) for (i = 0; i < 2 * old_nr; i++)
change_point[i] = &change_point_list[i]; change_point[i] = &change_point_list[i];
/* record all known change-points (starting and ending addresses), /* record all known change-points (starting and ending addresses),
omitting those that are for empty memory regions */ omitting those that are for empty memory regions */
chgidx = 0; chgidx = 0;
for (i=0; i < old_nr; i++) { for (i = 0; i < old_nr; i++) {
if (biosmap[i].size != 0) { if (biosmap[i].size != 0) {
change_point[chgidx]->addr = biosmap[i].addr; change_point[chgidx]->addr = biosmap[i].addr;
change_point[chgidx++]->pbios = &biosmap[i]; change_point[chgidx++]->pbios = &biosmap[i];
change_point[chgidx]->addr = biosmap[i].addr + biosmap[i].size; change_point[chgidx]->addr = biosmap[i].addr +
biosmap[i].size;
change_point[chgidx++]->pbios = &biosmap[i]; change_point[chgidx++]->pbios = &biosmap[i];
} }
} }
...@@ -483,75 +498,106 @@ static int __init sanitize_e820_map(struct e820entry * biosmap, char * pnr_map) ...@@ -483,75 +498,106 @@ static int __init sanitize_e820_map(struct e820entry * biosmap, char * pnr_map)
still_changing = 1; still_changing = 1;
while (still_changing) { while (still_changing) {
still_changing = 0; still_changing = 0;
for (i=1; i < chg_nr; i++) { for (i = 1; i < chg_nr; i++) {
/* if <current_addr> > <last_addr>, swap */ unsigned long long curaddr, lastaddr;
/* or, if current=<start_addr> & last=<end_addr>, swap */ unsigned long long curpbaddr, lastpbaddr;
if ((change_point[i]->addr < change_point[i-1]->addr) ||
((change_point[i]->addr == change_point[i-1]->addr) && curaddr = change_point[i]->addr;
(change_point[i]->addr == change_point[i]->pbios->addr) && lastaddr = change_point[i - 1]->addr;
(change_point[i-1]->addr != change_point[i-1]->pbios->addr)) curpbaddr = change_point[i]->pbios->addr;
) lastpbaddr = change_point[i - 1]->pbios->addr;
{
/*
* swap entries, when:
*
* curaddr > lastaddr or
* curaddr == lastaddr and curaddr == curpbaddr and
* lastaddr != lastpbaddr
*/
if (curaddr < lastaddr ||
(curaddr == lastaddr && curaddr == curpbaddr &&
lastaddr != lastpbaddr)) {
change_tmp = change_point[i]; change_tmp = change_point[i];
change_point[i] = change_point[i-1]; change_point[i] = change_point[i-1];
change_point[i-1] = change_tmp; change_point[i-1] = change_tmp;
still_changing=1; still_changing = 1;
} }
} }
} }
/* create a new bios memory map, removing overlaps */ /* create a new bios memory map, removing overlaps */
overlap_entries=0; /* number of entries in the overlap table */ overlap_entries = 0; /* number of entries in the overlap table */
new_bios_entry=0; /* index for creating new bios map entries */ new_bios_entry = 0; /* index for creating new bios map entries */
last_type = 0; /* start with undefined memory type */ last_type = 0; /* start with undefined memory type */
last_addr = 0; /* start with 0 as last starting address */ last_addr = 0; /* start with 0 as last starting address */
/* loop through change-points, determining affect on the new bios map */ /* loop through change-points, determining affect on the new bios map */
for (chgidx=0; chgidx < chg_nr; chgidx++) for (chgidx = 0; chgidx < chg_nr; chgidx++) {
{
/* keep track of all overlapping bios entries */ /* keep track of all overlapping bios entries */
if (change_point[chgidx]->addr == change_point[chgidx]->pbios->addr) if (change_point[chgidx]->addr ==
{ change_point[chgidx]->pbios->addr) {
/* add map entry to overlap list (> 1 entry implies an overlap) */ /*
overlap_list[overlap_entries++]=change_point[chgidx]->pbios; * add map entry to overlap list (> 1 entry
} * implies an overlap)
else */
{ overlap_list[overlap_entries++] =
/* remove entry from list (order independent, so swap with last) */ change_point[chgidx]->pbios;
for (i=0; i<overlap_entries; i++) } else {
{ /*
if (overlap_list[i] == change_point[chgidx]->pbios) * remove entry from list (order independent,
overlap_list[i] = overlap_list[overlap_entries-1]; * so swap with last)
*/
for (i = 0; i < overlap_entries; i++) {
if (overlap_list[i] ==
change_point[chgidx]->pbios)
overlap_list[i] =
overlap_list[overlap_entries-1];
} }
overlap_entries--; overlap_entries--;
} }
/* if there are overlapping entries, decide which "type" to use */ /*
/* (larger value takes precedence -- 1=usable, 2,3,4,4+=unusable) */ * if there are overlapping entries, decide which
* "type" to use (larger value takes precedence --
* 1=usable, 2,3,4,4+=unusable)
*/
current_type = 0; current_type = 0;
for (i=0; i<overlap_entries; i++) for (i = 0; i < overlap_entries; i++)
if (overlap_list[i]->type > current_type) if (overlap_list[i]->type > current_type)
current_type = overlap_list[i]->type; current_type = overlap_list[i]->type;
/* continue building up new bios map based on this information */ /*
* continue building up new bios map based on this
* information
*/
if (current_type != last_type) { if (current_type != last_type) {
if (last_type != 0) { if (last_type != 0) {
new_bios[new_bios_entry].size = new_bios[new_bios_entry].size =
change_point[chgidx]->addr - last_addr; change_point[chgidx]->addr - last_addr;
/* move forward only if the new size was non-zero */ /*
* move forward only if the new size
* was non-zero
*/
if (new_bios[new_bios_entry].size != 0) if (new_bios[new_bios_entry].size != 0)
/*
* no more space left for new
* bios entries ?
*/
if (++new_bios_entry >= E820MAX) if (++new_bios_entry >= E820MAX)
break; /* no more space left for new bios entries */ break;
} }
if (current_type != 0) { if (current_type != 0) {
new_bios[new_bios_entry].addr = change_point[chgidx]->addr; new_bios[new_bios_entry].addr =
change_point[chgidx]->addr;
new_bios[new_bios_entry].type = current_type; new_bios[new_bios_entry].type = current_type;
last_addr=change_point[chgidx]->addr; last_addr = change_point[chgidx]->addr;
} }
last_type = current_type; last_type = current_type;
} }
} }
new_nr = new_bios_entry; /* retain count for new bios entries */ /* retain count for new bios entries */
new_nr = new_bios_entry;
/* copy new bios mapping into original location */ /* copy new bios mapping into original location */
memcpy(biosmap, new_bios, new_nr*sizeof(struct e820entry)); memcpy(biosmap, new_bios, new_nr * sizeof(struct e820entry));
*pnr_map = new_nr; *pnr_map = new_nr;
return 0; return 0;
...@@ -566,7 +612,7 @@ static int __init sanitize_e820_map(struct e820entry * biosmap, char * pnr_map) ...@@ -566,7 +612,7 @@ static int __init sanitize_e820_map(struct e820entry * biosmap, char * pnr_map)
* will have given us a memory map that we can use to properly * will have given us a memory map that we can use to properly
* set up memory. If we aren't, we'll fake a memory map. * set up memory. If we aren't, we'll fake a memory map.
*/ */
static int __init copy_e820_map(struct e820entry * biosmap, int nr_map) static int __init copy_e820_map(struct e820entry *biosmap, int nr_map)
{ {
/* Only one memory region (or negative)? Ignore it */ /* Only one memory region (or negative)? Ignore it */
if (nr_map < 2) if (nr_map < 2)
...@@ -583,7 +629,7 @@ static int __init copy_e820_map(struct e820entry * biosmap, int nr_map) ...@@ -583,7 +629,7 @@ static int __init copy_e820_map(struct e820entry * biosmap, int nr_map)
return -1; return -1;
add_memory_region(start, size, type); add_memory_region(start, size, type);
} while (biosmap++,--nr_map); } while (biosmap++, --nr_map);
return 0; return 0;
} }
...@@ -613,9 +659,9 @@ static int __init parse_memopt(char *p) ...@@ -613,9 +659,9 @@ static int __init parse_memopt(char *p)
if (!p) if (!p)
return -EINVAL; return -EINVAL;
end_user_pfn = memparse(p, &p); end_user_pfn = memparse(p, &p);
end_user_pfn >>= PAGE_SHIFT; end_user_pfn >>= PAGE_SHIFT;
return 0; return 0;
} }
early_param("mem", parse_memopt); early_param("mem", parse_memopt);
static int userdef __initdata; static int userdef __initdata;
...@@ -627,9 +673,9 @@ static int __init parse_memmap_opt(char *p) ...@@ -627,9 +673,9 @@ static int __init parse_memmap_opt(char *p)
if (!strcmp(p, "exactmap")) { if (!strcmp(p, "exactmap")) {
#ifdef CONFIG_CRASH_DUMP #ifdef CONFIG_CRASH_DUMP
/* If we are doing a crash dump, we /*
* still need to know the real mem * If we are doing a crash dump, we still need to know
* size before original memory map is * the real mem size before original memory map is
* reset. * reset.
*/ */
e820_register_active_regions(0, 0, -1UL); e820_register_active_regions(0, 0, -1UL);
...@@ -713,8 +759,10 @@ __init void e820_setup_gap(void) ...@@ -713,8 +759,10 @@ __init void e820_setup_gap(void)
if (!found) { if (!found) {
gapstart = (end_pfn << PAGE_SHIFT) + 1024*1024; gapstart = (end_pfn << PAGE_SHIFT) + 1024*1024;
printk(KERN_ERR "PCI: Warning: Cannot find a gap in the 32bit address range\n" printk(KERN_ERR "PCI: Warning: Cannot find a gap in the 32bit "
KERN_ERR "PCI: Unassigned devices with 32bit resource registers may break!\n"); "address range\n"
KERN_ERR "PCI: Unassigned devices with 32bit resource "
"registers may break!\n");
} }
/* /*
...@@ -727,8 +775,9 @@ __init void e820_setup_gap(void) ...@@ -727,8 +775,9 @@ __init void e820_setup_gap(void)
/* Fun with two's complement */ /* Fun with two's complement */
pci_mem_start = (gapstart + round) & -round; pci_mem_start = (gapstart + round) & -round;
printk(KERN_INFO "Allocating PCI resources starting at %lx (gap: %lx:%lx)\n", printk(KERN_INFO
pci_mem_start, gapstart, gapsize); "Allocating PCI resources starting at %lx (gap: %lx:%lx)\n",
pci_mem_start, gapstart, gapsize);
} }
int __init arch_get_ram_range(int slot, u64 *addr, u64 *size) int __init arch_get_ram_range(int slot, u64 *addr, u64 *size)
......
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