Skip to content

Commit

Permalink
Revert "x86/PCI: allocate space from the end of a region, not the beg…
Browse files Browse the repository at this point in the history
…inning"

This reverts commit dc9887d.

Acked-by: H. Peter Anvin <[email protected]>
Signed-off-by: Bjorn Helgaas <[email protected]>
Signed-off-by: Jesse Barnes <[email protected]>
  • Loading branch information
Bjorn Helgaas authored and jbarnes993 committed Dec 17, 2010
1 parent 5e52f1c commit d14125e
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions arch/x86/pci/i386.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,21 +65,16 @@ pcibios_align_resource(void *data, const struct resource *res,
resource_size_t size, resource_size_t align)
{
struct pci_dev *dev = data;
resource_size_t start = round_down(res->end - size + 1, align);
resource_size_t start = res->start;

if (res->flags & IORESOURCE_IO) {

/*
* If we're avoiding ISA aliases, the largest contiguous I/O
* port space is 256 bytes. Clearing bits 9 and 10 preserves
* all 256-byte and smaller alignments, so the result will
* still be correctly aligned.
*/
if (!skip_isa_ioresource_align(dev))
start &= ~0x300;
if (skip_isa_ioresource_align(dev))
return start;
if (start & 0x300)
start = (start + 0x3ff) & ~0x3ff;
} else if (res->flags & IORESOURCE_MEM) {
if (start < BIOS_END)
start = res->end; /* fail; no space */
start = BIOS_END;
}
return start;
}
Expand Down

0 comments on commit d14125e

Please sign in to comment.