Date: Thu, 31 Oct 2013 03:23:25 +0000 (UTC) From: Ian Lepore <ian@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257419 - head/sys/arm/arm Message-ID: <201310310323.r9V3NPxN083289@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ian Date: Thu Oct 31 03:23:25 2013 New Revision: 257419 URL: http://svnweb.freebsd.org/changeset/base/257419 Log: 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. Modified: head/sys/arm/arm/gic.c Modified: head/sys/arm/arm/gic.c ============================================================================== --- head/sys/arm/arm/gic.c Thu Oct 31 03:12:48 2013 (r257418) +++ head/sys/arm/arm/gic.c Thu Oct 31 03:23:25 2013 (r257419) @@ -271,7 +271,6 @@ arm_get_next_irq(int last_irq) printf("Spurious interrupt detected [0x%08x]\n", active_irq); return -1; } - gic_c_write_4(GICC_EOIR, active_irq); return active_irq; } @@ -279,14 +278,15 @@ arm_get_next_irq(int last_irq) void arm_mask_irq(uintptr_t nb) { + gic_d_write_4(GICD_ICENABLER(nb >> 5), (1UL << (nb & 0x1F))); + gic_c_write_4(GICC_EOIR, nb); } void arm_unmask_irq(uintptr_t nb) { - gic_c_write_4(GICC_EOIR, nb); gic_d_write_4(GICD_ISENABLER(nb >> 5), (1UL << (nb & 0x1F))); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201310310323.r9V3NPxN083289>