interrupt_controller: device driver can configure IO APIC delivery mode
interrupt_controller: device driver can configure IO APIC delivery mode

Currently all IO APIC interrupts are configured at fixed delivery mode,
which is good for HEPT timer interrupt but it imposes burdens to
device drivers to properly handle the repeated interrupt sent to all
processors.

This patch makes it more flexible so that device drivers can specify
the delivery mode it desires in the IRQ connect APIs.

- Don't hard code IOAPIC_FIXED in z_ioapic_irq_set(), meaning the
  IRQ delivery mode is passed in from the 'flags' argument and
  individual device driver needs to choose delivery mode for its own
  IO APIC interrupt.

- To support different delivery mode in different IO APIC interrupts,
  need to save and restore RTE[10:8] during IOAPIC suspend and resume.

If device driver doesn't pass either IOAPIC_FIXED or IOAPIC_LOWEST
in IRQ_CONNECT()/irq_connect_dynamic() alike APIs, the delivery mode
bit fields in the target RTE register are '0' which implies fixed mode.
If the device driver wants the interrupt to be delivered to one CPU
only, it needs to explicitly specify IOAPIC_LOWEST in one of the IRQ
connect APIs.

Signed-off-by: Zide Chen <09a0dff98440d5beac510b9e43a2f53ed7511963@intel.com>

finikorg/zephyr,nashif/zephyr,nashif/zephyr,finikorg/zephyr,zephyrproject-rtos/zephyr,finikorg/zephyr,finikorg/zephyr,galak/zephyr,zephyrproject-rtos/zephyr,nashif/zephyr,Vudentz/zephyr,Vudentz/zephyr,galak/zephyr,zephyrproject-rtos/zephyr,Vudentz/zephyr,nashif/zephyr,nashif/zephyr,zephyrproject-rtos/zephyr,Vudentz/zephyr,galak/zephyr,Vudentz/zephyr,Vudentz/zephyr,finikorg/zephyr,galak/zephyr,galak/zephyr,zephyrproject-rtos/zephyr