Commit ea7f1b6e authored by Bjorn Helgaas's avatar Bjorn Helgaas Committed by Jesse Barnes

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: default avatarBjorn Helgaas <bjorn.helgaas@hp.com>
Acked-by: default avatarRandy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
parent 0efea000
......@@ -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;
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment