Attention is currently required from: Nico Huber, Tim Wawrzynczak. Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/49407 )
Change subject: soc/intel/common/gpio: Add gpio_routes_ioapic_irq function ......................................................................
Patch Set 9:
(5 comments)
File src/soc/intel/common/block/gpio/gpio.c:
https://review.coreboot.org/c/coreboot/+/49407/comment/9fbd7b54_c2d6554e PS9, Line 214: 120 / (sizeof(uint32_t) * BITS_PER_BYTE) + 1 DIV_ROUND_UP(120, sizeof(uint32_t) * BITS_PER_BYTE)
https://review.coreboot.org/c/coreboot/+/49407/comment/74390568_0cf694ae PS9, Line 218: size_t bit_offset = irq % 32; assert(word_offset < ARRAY_SIZE(gpio_ioapic_irqs_used)) or just return after printing an error message?
https://review.coreboot.org/c/coreboot/+/49407/comment/d5b6e26b_b5aa6bae PS9, Line 225: size_t bit_offset = irq % 32; assert(word_offset < ARRAY_SIZE(gpio_ioapic_irqs_used)) or just return false after printing an error message?
https://review.coreboot.org/c/coreboot/+/49407/comment/f9dcd129_cb6b17b5 PS9, Line 263: set_ioapic_used(irq); This should be done before line 236, right? If a platform does not select SOC_INTEL_COMMON_BLOCK_GPIO_ITSS_POL_CFG, then this will never get called. You might have to change the order getween PAD_CFG0_ROUTE_IOAPIC and CONFIG(SOC_INTEL_COMMON_BLOCK_GPIO_ITSS_POL_CFG) checks.
Not for this change, but I think SOC_INTEL_COMMON_BLOCK_GPIO_ITSS_POL_CFG is selected for all platforms using GPIO common block driver. Probably we should drop that config altogether since all Intel SoCs seem to have this support.
File src/soc/intel/common/block/include/intelblocks/gpio.h:
https://review.coreboot.org/c/coreboot/+/49407/comment/36a05171_0d0e7488 PS9, Line 232: routed to IOAPIC I know this is obvious from the function implementation, but should we add a comment here indicating that it checks if any GPIO is currently routed to IOAPIC or GPIO is routed to IOAPIC at the time this call is made? Or do you think that is just adding noise?