ioapic: Factor out counting code to `ioapic_interrupt_count`

No need to keep duplicate variants of counting ioapic interrupts.

Change-Id: I512860297309c46e05cc5379bf61479878817b1e
Signed-off-by: Patrick Georgi <patrick@georgi-clan.de>
Reviewed-on: http://review.coreboot.org/2185
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
1 file changed