diff options
Diffstat (limited to 'arch/sh64/kernel/pci_sh5.c')
-rw-r--r-- | arch/sh64/kernel/pci_sh5.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/arch/sh64/kernel/pci_sh5.c b/arch/sh64/kernel/pci_sh5.c index 49862e165c06..fb51660847c8 100644 --- a/arch/sh64/kernel/pci_sh5.c +++ b/arch/sh64/kernel/pci_sh5.c | |||
@@ -340,8 +340,9 @@ static int __init map_cayman_irq(struct pci_dev *dev, u8 slot, u8 pin) | |||
340 | return result; | 340 | return result; |
341 | } | 341 | } |
342 | 342 | ||
343 | irqreturn_t pcish5_err_irq(int irq, void *dev_id, struct pt_regs *regs) | 343 | static irqreturn_t pcish5_err_irq(int irq, void *dev_id) |
344 | { | 344 | { |
345 | struct pt_regs *regs = get_irq_regs(); | ||
345 | unsigned pci_int, pci_air, pci_cir, pci_aint; | 346 | unsigned pci_int, pci_air, pci_cir, pci_aint; |
346 | 347 | ||
347 | pci_int = SH5PCI_READ(INT); | 348 | pci_int = SH5PCI_READ(INT); |
@@ -368,15 +369,13 @@ irqreturn_t pcish5_err_irq(int irq, void *dev_id, struct pt_regs *regs) | |||
368 | return IRQ_HANDLED; | 369 | return IRQ_HANDLED; |
369 | } | 370 | } |
370 | 371 | ||
371 | irqreturn_t pcish5_serr_irq(int irq, void *dev_id, struct pt_regs *regs) | 372 | static irqreturn_t pcish5_serr_irq(int irq, void *dev_id) |
372 | { | 373 | { |
373 | printk("SERR IRQ\n"); | 374 | printk("SERR IRQ\n"); |
374 | 375 | ||
375 | return IRQ_NONE; | 376 | return IRQ_NONE; |
376 | } | 377 | } |
377 | 378 | ||
378 | #define ROUND_UP(x, a) (((x) + (a) - 1) & ~((a) - 1)) | ||
379 | |||
380 | static void __init | 379 | static void __init |
381 | pcibios_size_bridge(struct pci_bus *bus, struct resource *ior, | 380 | pcibios_size_bridge(struct pci_bus *bus, struct resource *ior, |
382 | struct resource *memr) | 381 | struct resource *memr) |
@@ -433,8 +432,8 @@ pcibios_size_bridge(struct pci_bus *bus, struct resource *ior, | |||
433 | mem_res.end -= mem_res.start; | 432 | mem_res.end -= mem_res.start; |
434 | 433 | ||
435 | /* Align the sizes up by bridge rules */ | 434 | /* Align the sizes up by bridge rules */ |
436 | io_res.end = ROUND_UP(io_res.end, 4*1024) - 1; | 435 | io_res.end = ALIGN(io_res.end, 4*1024) - 1; |
437 | mem_res.end = ROUND_UP(mem_res.end, 1*1024*1024) - 1; | 436 | mem_res.end = ALIGN(mem_res.end, 1*1024*1024) - 1; |
438 | 437 | ||
439 | /* Adjust the bridge's allocation requirements */ | 438 | /* Adjust the bridge's allocation requirements */ |
440 | bridge->resource[0].end = bridge->resource[0].start + io_res.end; | 439 | bridge->resource[0].end = bridge->resource[0].start + io_res.end; |
@@ -447,18 +446,16 @@ pcibios_size_bridge(struct pci_bus *bus, struct resource *ior, | |||
447 | 446 | ||
448 | /* adjust parent's resource requirements */ | 447 | /* adjust parent's resource requirements */ |
449 | if (ior) { | 448 | if (ior) { |
450 | ior->end = ROUND_UP(ior->end, 4*1024); | 449 | ior->end = ALIGN(ior->end, 4*1024); |
451 | ior->end += io_res.end; | 450 | ior->end += io_res.end; |
452 | } | 451 | } |
453 | 452 | ||
454 | if (memr) { | 453 | if (memr) { |
455 | memr->end = ROUND_UP(memr->end, 1*1024*1024); | 454 | memr->end = ALIGN(memr->end, 1*1024*1024); |
456 | memr->end += mem_res.end; | 455 | memr->end += mem_res.end; |
457 | } | 456 | } |
458 | } | 457 | } |
459 | 458 | ||
460 | #undef ROUND_UP | ||
461 | |||
462 | static void __init pcibios_size_bridges(void) | 459 | static void __init pcibios_size_bridges(void) |
463 | { | 460 | { |
464 | struct resource io_res, mem_res; | 461 | struct resource io_res, mem_res; |