[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1440138067-4314-33-git-send-email-yinghai@kernel.org>
Date: Thu, 20 Aug 2015 23:20:47 -0700
From: Yinghai Lu <yinghai@...nel.org>
To: Bjorn Helgaas <bhelgaas@...gle.com>,
David Miller <davem@...emloft.net>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Wei Yang <weiyang@...ux.vnet.ibm.com>, TJ <linux@....tj>,
Yijing Wang <wangyijing@...wei.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
linux-pci@...r.kernel.org, linux-kernel@...r.kernel.org,
Yinghai Lu <yinghai@...nel.org>
Subject: [PATCH v4 32/52] PCI: Kill macro checking for bus io port sizing
We can use new generic version skip_isa_ioresource_align() instead
the old marcro, so kill the marco.
Signed-off-by: Yinghai Lu <yinghai@...nel.org>
---
drivers/pci/setup-bus.c | 17 +++++++----------
1 file changed, 7 insertions(+), 10 deletions(-)
diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c
index 1f08bed..1048483 100644
--- a/drivers/pci/setup-bus.c
+++ b/drivers/pci/setup-bus.c
@@ -1166,15 +1166,12 @@ int skip_isa_ioresource_align(struct pci_bus *bus)
return 0;
}
-static resource_size_t size_aligned_for_isa(resource_size_t size)
+static resource_size_t size_aligned_for_isa(resource_size_t size,
+ struct pci_bus *bus)
{
- /*
- * To be fixed in 2.5: we should have sort of HAVE_ISA
- * flag in the struct pci_bus.
- */
-#if defined(CONFIG_ISA) || defined(CONFIG_EISA)
- size = (size & 0xff) + ((size & ~0xffUL) << 2);
-#endif
+ if (!skip_isa_ioresource_align(bus))
+ size = (size & 0xff) + ((size & ~0xffUL) << 2);
+
return size;
}
@@ -1243,12 +1240,12 @@ static void pbus_size_io(struct pci_bus *bus, resource_size_t min_size,
}
}
- size = size_aligned_for_isa(size);
+ size = size_aligned_for_isa(size, bus);
size += size1;
if (size || min_size)
size0 = calculate_size(size, min_size,
resource_size(b_res), min_align);
- sum_add_size = size_aligned_for_isa(sum_add_size);
+ sum_add_size = size_aligned_for_isa(sum_add_size, bus);
sum_add_size += sum_add_size1;
if (sum_add_size < min_sum_size)
sum_add_size = min_sum_size;
--
1.8.4.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists