Greg's tree changes resource.start and resource.end to u64. So ppc fails to link due to missing 64-bit divide helpers. Fix. Signed-off-by: Andrew Morton --- 25-akpm/arch/ppc/kernel/pci.c | 19 ++++++++++++++----- 1 files changed, 14 insertions(+), 5 deletions(-) diff -puN arch/ppc/kernel/pci.c~ppc32-64-bit-resource-fix arch/ppc/kernel/pci.c --- 25/arch/ppc/kernel/pci.c~ppc32-64-bit-resource-fix 2005-02-22 23:27:09.000000000 -0800 +++ 25-akpm/arch/ppc/kernel/pci.c 2005-02-22 23:27:33.000000000 -0800 @@ -21,6 +21,7 @@ #include #include #include +#include #undef DEBUG @@ -1088,6 +1089,18 @@ do_update_p2p_io_resource(struct pci_bus #endif } + +static u64 push_end(struct resource *res, u64 size) +{ + u64 end; + + end = res->end + size; + do_div(end, size + 1); + end *= size + 1; + end += size; + return end; +} + /* This function is pretty basic and actually quite broken for the * general case, it's enough for us right now though. It's supposed * to tell us if we need to open an IO range at all or not and what @@ -1100,10 +1113,6 @@ check_for_io_childs(struct pci_bus *bus, int i; int rc = 0; -#define push_end(res, size) do { unsigned long __sz = (size) ; \ - res->end = ((res->end + __sz) / (__sz + 1)) * (__sz + 1) + __sz; \ - } while (0) - list_for_each_entry(dev, &bus->devices, bus_list) { u16 class = dev->class >> 8; @@ -1117,7 +1126,7 @@ check_for_io_childs(struct pci_bus *bus, for (i=0; iclass >> 8 == PCI_CLASS_BRIDGE_PCI && i >= PCI_BRIDGE_RESOURCES) _