diff options
author | royger <royger@FreeBSD.org> | 2016-10-13 09:37:21 +0000 |
---|---|---|
committer | royger <royger@FreeBSD.org> | 2016-10-13 09:37:21 +0000 |
commit | 2b1e52edeec279364aa791a76e09bf1807e75b83 (patch) | |
tree | 53365a799564ce21f3800cfef0014afd13269d80 /sys/x86 | |
parent | b9a9aa774aad4bf415de175900b5868c1f6f1218 (diff) | |
download | FreeBSD-src-2b1e52edeec279364aa791a76e09bf1807e75b83.zip FreeBSD-src-2b1e52edeec279364aa791a76e09bf1807e75b83.tar.gz |
MFC r303491:
Revert r291022: x86/intr: allow mutex recursion in intr_remove_handler
Sponsored by: Citrix Systems R&D
Diffstat (limited to 'sys/x86')
-rw-r--r-- | sys/x86/x86/intr_machdep.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/sys/x86/x86/intr_machdep.c b/sys/x86/x86/intr_machdep.c index cc50321..9a5e463 100644 --- a/sys/x86/x86/intr_machdep.c +++ b/sys/x86/x86/intr_machdep.c @@ -197,28 +197,19 @@ int intr_remove_handler(void *cookie) { struct intsrc *isrc; - int error, mtx_owned; + int error; isrc = intr_handler_source(cookie); error = intr_event_remove_handler(cookie); if (error == 0) { - /* - * Recursion is needed here so PICs can remove interrupts - * while resuming. It was previously not possible due to - * intr_resume holding the intr_table_lock and - * intr_remove_handler recursing on it. - */ - mtx_owned = mtx_owned(&intr_table_lock); - if (mtx_owned == 0) - mtx_lock(&intr_table_lock); + mtx_lock(&intr_table_lock); isrc->is_handlers--; if (isrc->is_handlers == 0) { isrc->is_pic->pic_disable_source(isrc, PIC_NO_EOI); isrc->is_pic->pic_disable_intr(isrc); } intrcnt_updatename(isrc); - if (mtx_owned == 0) - mtx_unlock(&intr_table_lock); + mtx_unlock(&intr_table_lock); } return (error); } |