Don't iterate through the bits of the pending interrupt register if the
whole register is zero.  Most of the registers will be zero most of the time.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@257418 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Do not EOI an interrupt until the point after the filter handlers / before
threaded handlers.

It's not easy to see from the diffs of this change exactly how it
accomplishes the above.  The arm_mask_irq() and arm_unmask_irq() functions
are, respectively, the pre_thread and post_thread hooks.  Not seen in
these diffs, the arm_post_filter() routine also EOIs.  The post_filter
routine runs after filter handlers if there will be no threaded handlers,
so it just EOIs.  The pre_thread routine masks the interrupt (at the
controller, not the source) and EOIs.  So one way or another, the EOI
happens at the point where filter handlers are done.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@257419 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f