From 958624daebc6eff50e916c6e13bff773d675f7bf Mon Sep 17 00:00:00 2001 From: Bjorn Helgaas Date: Thu, 16 Dec 2010 10:38:31 -0700 Subject: [PATCH] --- yaml --- r: 223412 b: refs/heads/master c: d14125ecfee05473de46f06d992db109308c57a3 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/x86/pci/i386.c | 17 ++++++----------- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/[refs] b/[refs] index 391803cb6378..440174d23883 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 5e52f1c5e85fdc3831eeae8b546577e94a586f81 +refs/heads/master: d14125ecfee05473de46f06d992db109308c57a3 diff --git a/trunk/arch/x86/pci/i386.c b/trunk/arch/x86/pci/i386.c index c4bb261c106e..8379c2c3d076 100644 --- a/trunk/arch/x86/pci/i386.c +++ b/trunk/arch/x86/pci/i386.c @@ -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; }