forked from Minki/linux
30919b0bf3
This implements arch_remove_reservations() so allocate_resource() can avoid any arch-specific reserved areas. This currently just avoids the BIOS area (the first 1MB), but could be used for E820 reserved areas if that turns out to be necessary. We previously avoided this area in pcibios_align_resource(). This patch moves the test from that PCI-specific path to a generic path, so *all* resource allocations will avoid this area. Acked-by: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
12 lines
243 B
C
12 lines
243 B
C
#include <linux/ioport.h>
|
|
#include <asm/e820.h>
|
|
|
|
void arch_remove_reservations(struct resource *avail)
|
|
{
|
|
/* Trim out BIOS area (low 1MB) */
|
|
if (avail->flags & IORESOURCE_MEM) {
|
|
if (avail->start < BIOS_END)
|
|
avail->start = BIOS_END;
|
|
}
|
|
}
|