From 508a6397f9be6553aaa7398183838ce2809dda1e Mon Sep 17 00:00:00 2001 From: Matthew Dempsky Date: Wed, 22 Sep 2010 11:44:02 +0000 Subject: Switch to unconditionally attaching evcounts on TurboChannel interrupts, since inspecting the code, they seem to always attach anyway. This fixes compiler fallout from my evcount simplification. build error reported by naddy@; "seems sensible" deraadt@ --- sys/arch/alpha/tc/tc_3000_300.c | 11 +++++------ sys/arch/alpha/tc/tc_3000_500.c | 11 +++++------ 2 files changed, 10 insertions(+), 12 deletions(-) (limited to 'sys/arch/alpha') diff --git a/sys/arch/alpha/tc/tc_3000_300.c b/sys/arch/alpha/tc/tc_3000_300.c index eae1461e2f0..5ab9b91a1a8 100644 --- a/sys/arch/alpha/tc/tc_3000_300.c +++ b/sys/arch/alpha/tc/tc_3000_300.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tc_3000_300.c,v 1.15 2010/09/20 06:33:46 matthew Exp $ */ +/* $OpenBSD: tc_3000_300.c,v 1.16 2010/09/22 11:44:01 matthew Exp $ */ /* $NetBSD: tc_3000_300.c,v 1.26 2001/07/27 00:25:21 thorpej Exp $ */ /* @@ -119,6 +119,8 @@ tc_3000_300_intr_establish(tcadev, cookie, level, func, arg, name) volatile u_int32_t *imskp; u_long dev = (u_long)cookie; + KASSERT(name != NULL); + #ifdef DIAGNOSTIC /* XXX bounds-check cookie. */ #endif @@ -128,9 +130,7 @@ tc_3000_300_intr_establish(tcadev, cookie, level, func, arg, name) tc_3000_300_intr[dev].tci_func = func; tc_3000_300_intr[dev].tci_arg = arg; - if (name != NULL) - evcount_attach(&tc_3000_300_intr[dev].tci_count, - name, NULL); + evcount_attach(&tc_3000_300_intr[dev].tci_count, name, NULL); imskp = (volatile u_int32_t *)(DEC_3000_300_IOASIC_ADDR + IOASIC_IMSK); switch (dev) { @@ -177,8 +177,7 @@ tc_3000_300_intr_disestablish(tcadev, cookie) tc_3000_300_intr[dev].tci_func = tc_3000_300_intrnull; tc_3000_300_intr[dev].tci_arg = (void *)dev; - if (tc_3000_300_intr[dev].tci_count.ec_parent != NULL) - evcount_detach(&tc_3000_300_intr[dev].tci_count); + evcount_detach(&tc_3000_300_intr[dev].tci_count); } int diff --git a/sys/arch/alpha/tc/tc_3000_500.c b/sys/arch/alpha/tc/tc_3000_500.c index 328f92180d9..37b3ca9c636 100644 --- a/sys/arch/alpha/tc/tc_3000_500.c +++ b/sys/arch/alpha/tc/tc_3000_500.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tc_3000_500.c,v 1.16 2010/09/20 06:33:46 matthew Exp $ */ +/* $OpenBSD: tc_3000_500.c,v 1.17 2010/09/22 11:44:01 matthew Exp $ */ /* $NetBSD: tc_3000_500.c,v 1.24 2001/07/27 00:25:21 thorpej Exp $ */ /* @@ -136,6 +136,8 @@ tc_3000_500_intr_establish(tcadev, cookie, level, func, arg, name) { u_long dev = (u_long)cookie; + KASSERT(name != NULL); + #ifdef DIAGNOSTIC /* XXX bounds-check cookie. */ #endif @@ -145,9 +147,7 @@ tc_3000_500_intr_establish(tcadev, cookie, level, func, arg, name) tc_3000_500_intr[dev].tci_func = func; tc_3000_500_intr[dev].tci_arg = arg; - if (name != NULL) - evcount_attach(&tc_3000_500_intr[dev].tci_count, - name, NULL); + evcount_attach(&tc_3000_500_intr[dev].tci_count, name, NULL); tc_3000_500_imask &= ~tc_3000_500_intrbits[dev]; *(volatile u_int32_t *)TC_3000_500_IMR_WRITE = tc_3000_500_imask; @@ -175,8 +175,7 @@ tc_3000_500_intr_disestablish(tcadev, cookie) tc_3000_500_intr[dev].tci_func = tc_3000_500_intrnull; tc_3000_500_intr[dev].tci_arg = (void *)dev; - if (tc_3000_500_intr[dev].tci_count.ec_parent != NULL) - evcount_detach(&tc_3000_500_intr[dev].tci_count); + evcount_detach(&tc_3000_500_intr[dev].tci_count); } int -- cgit v1.2.3