From 898a77521de97b1e4af9458b82bcc21bc7a6e799 Mon Sep 17 00:00:00 2001 From: Martin Roth Date: Thu, 1 Jun 2017 11:39:59 -0600 Subject: arch/*: Update Kconfig symbol usage - Update all symbols to use IS_ENABLED() - Update non-romcc usage to use 'if' instead of '#if' where it makes sense. Change-Id: I5a84414d2d1631e35ac91efb67a0d4c1f673bf85 Signed-off-by: Martin Roth Reviewed-on: https://review.coreboot.org/20005 Reviewed-by: Paul Menzel Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi --- src/arch/x86/pirq_routing.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src/arch/x86/pirq_routing.c') diff --git a/src/arch/x86/pirq_routing.c b/src/arch/x86/pirq_routing.c index 405dad0ed4..892201e57c 100644 --- a/src/arch/x86/pirq_routing.c +++ b/src/arch/x86/pirq_routing.c @@ -18,8 +18,12 @@ #include #include #include +#include + +void __attribute__((weak)) pirq_assign_irqs(const unsigned char pirq[CONFIG_MAX_PIRQ_LINKS]) +{ +} -#if CONFIG_DEBUG_PIRQ static void check_pirq_routing_table(struct irq_routing_table *rt) { uint8_t *addr = (uint8_t *)rt; @@ -97,9 +101,7 @@ static int verify_copy_pirq_routing_table(unsigned long addr, return 0; } -#endif -#if CONFIG_PIRQ_ROUTE static u8 pirq_get_next_free_irq(u8 *pirq, u16 bitmap) { int i, link; @@ -185,7 +187,6 @@ static void pirq_route_irqs(unsigned long addr) pirq_assign_irqs(pirq); } -#endif unsigned long copy_pirq_routing_table(unsigned long addr, const struct irq_routing_table *routing_table) @@ -198,11 +199,10 @@ unsigned long copy_pirq_routing_table(unsigned long addr, addr); memcpy((void *)addr, routing_table, routing_table->size); printk(BIOS_INFO, "done.\n"); -#if CONFIG_DEBUG_PIRQ - verify_copy_pirq_routing_table(addr, routing_table); -#endif -#if CONFIG_PIRQ_ROUTE - pirq_route_irqs(addr); -#endif + if (IS_ENABLED(CONFIG_DEBUG_PIRQ)) + verify_copy_pirq_routing_table(addr, routing_table); + if (IS_ENABLED(CONFIG_PIRQ_ROUTE)) + pirq_route_irqs(addr); + return addr + routing_table->size; } -- cgit v1.2.3