xen/x86: ioapic: Simplify ioapic_init()
authorJulien Grall <jgrall@amazon.com>
Fri, 27 Mar 2020 18:36:20 +0000 (18:36 +0000)
committerJulien Grall <jgrall@amazon.com>
Fri, 10 Apr 2020 11:23:48 +0000 (12:23 +0100)
commit13dcb32b6b585d9a29997e81c0a9610cf1a7f64d
tree8f799060e879be07b6ec03873fbd4c98408c589e
parent996ff16416b62154400468fb91fc32ba7eccf620
xen/x86: ioapic: Simplify ioapic_init()

Since commit 9facd54a45 "x86/ioapic: Add register level checks to detect
bogus io-apic entries", Xen is able to cope with IO APICs not mapped in
the fixmap.

Therefore the whole logic to allocate a fake page for some IO APICs is
unnecessary.

With the logic removed, the code can be simplified a lot as we don't
need to go through all the IO APIC if SMP has not been detected or a
bogus zero IO-APIC address has been detected.

To avoid another level of tabulation, the simplification is now moved in
its own function.

Signed-off-by: Julien Grall <jgrall@amazon.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/io_apic.c