First, fix when event gets set. Previously, for emulated mode, event was
always set even if the irq_line_state is unchanged. Now, the event gets
set only when the level transitions.
For native mode, event is set only when level transitions from 0 to 1.
This remains correct behavior.
Second, call signal_cpu_int only if event changed. Previously, it was
always called even if irq_lane_state or int_event are unchanged.
Apply the Grand Central fixes from dingusdev/dingusppc#240 to O'Hare,
Heathrow, and Paddington; the Heathrow ERS shows that it expects to
have the same behavior:
- Reevaluate the CPU interrupt when either mask changes, releasing it
if no pending events remain enabled in either bank (section 7.1).
- Keep events latched until software writes InterruptClear, even if a
device deasserts its interrupt line or repeats an assertion (sections
7.2.1 and 7.2.5).
- Replace writable InterruptMask2 bits instead of ORing them, allowing
sources to be disabled while preserving the read-only IntMode bit
(section 7.2.6).