lkml.org 
[lkml]   [2009]   [Nov]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
SubjectRe: linux-next: Tree for November 5
Date
On Thursday 05 November 2009 09:31:04 am Bjorn Helgaas wrote:
> On Thursday 05 November 2009 03:38:27 am Sachin Sant wrote:
> > Today's next tree fails to build on i386 with
> >
> > arch/x86/pci/built-in.o: In function `align_resource':
> > arch/x86/pci/acpi.c:82: undefined reference to `__udivdi3'
> >
> > The code in question was added by commit
> > 03db42adfeeabe856dbb6894dd3aaff55838330a.
>
> I'll look into this. I did build and test a 32-bit x86 kernel, but
> I built it on an x86_64 box using "linux32 make ...", which looks like
> it used gcc 4.3.2.

Can you try the patch below, please?


commit 00f16f0a2f4826eadec0565e4b454ab8bc7824cc
Author: Bjorn Helgaas <bjorn.helgaas@hp.com>
Date: Thu Nov 5 10:03:57 2009 -0700

x86/PCI: remove 64-bit division

The roundup() caused a build error (undefined reference to `__udivdi3').
We're aligning to power-of-two boundaries, so it's simpler to just use
ALIGN() anyway, which avoids the division.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>

diff --git a/arch/x86/pci/acpi.c b/arch/x86/pci/acpi.c
index 8ddf4f4..959e548 100644
--- a/arch/x86/pci/acpi.c
+++ b/arch/x86/pci/acpi.c
@@ -69,17 +69,17 @@ align_resource(struct acpi_device *bridge, struct resource *res)
* that claim this address space have starting alignment and length
* constraints, so fix any obvious BIOS goofs.
*/
- if (res->start & (align - 1)) {
+ if (!IS_ALIGNED(res->start, align)) {
dev_printk(KERN_DEBUG, &bridge->dev,
"host bridge window %pR invalid; "
"aligning start to %d-byte boundary\n", res, align);
res->start &= ~(align - 1);
}
- if ((res->end + 1) & (align - 1)) {
+ if (!IS_ALIGNED(res->end + 1, align)) {
dev_printk(KERN_DEBUG, &bridge->dev,
"host bridge window %pR invalid; "
"aligning end to %d-byte boundary\n", res, align);
- res->end = roundup(res->end, align) - 1;
+ res->end = ALIGN(res->end, align) - 1;
}
}


\
 
 \ /
  Last update: 2009-11-05 18:19    [W:2.256 / U:0.840 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site