summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVisa Hankala <visa@cvs.openbsd.org>2017-12-27 13:14:43 +0000
committerVisa Hankala <visa@cvs.openbsd.org>2017-12-27 13:14:43 +0000
commit443101e771b00931fa1f07bcc4754a608e0eae66 (patch)
tree3beb527db6b9310c9bf6cf4742a2faad0147ade8
parent45121236b15fd3f56a13727caccc765b6307784d (diff)
Ensure interrupt delivery is disabled when setting interrupt
delivery entry.
-rw-r--r--sys/arch/octeon/dev/octcit.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/arch/octeon/dev/octcit.c b/sys/arch/octeon/dev/octcit.c
index 72e5dbf35f3..c01ee6d73c9 100644
--- a/sys/arch/octeon/dev/octcit.c
+++ b/sys/arch/octeon/dev/octcit.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: octcit.c,v 1.2 2017/08/09 15:10:38 visa Exp $ */
+/* $OpenBSD: octcit.c,v 1.3 2017/12/27 13:14:42 visa Exp $ */
/*
* Copyright (c) 2017 Visa Hankala
@@ -286,6 +286,7 @@ octcit_intr_establish_intsn(int intsn, int level, int flags,
val = CIU3_ISC_CTL_EN | (CIU3_IDT(ci->ci_cpuid, 0) <<
CIU3_ISC_CTL_IDT_SHIFT);
+ CIU3_WR_8(sc, CIU3_ISC_W1C(intsn), CIU3_ISC_W1C_EN);
CIU3_WR_8(sc, CIU3_ISC_CTL(intsn), val);
(void)CIU3_RD_8(sc, CIU3_ISC_CTL(intsn));
@@ -515,6 +516,7 @@ octcit_ipi_establish(int (*func)(void *), cpuid_t cpuid)
intsn = MBOX_INTSN(cpuid);
val = CIU3_ISC_CTL_EN | (CIU3_IDT(cpuid, 1) << CIU3_ISC_CTL_IDT_SHIFT);
+ CIU3_WR_8(sc, CIU3_ISC_W1C(intsn), CIU3_ISC_W1C_EN);
CIU3_WR_8(sc, CIU3_ISC_CTL(intsn), val);
(void)CIU3_RD_8(sc, CIU3_ISC_CTL(intsn));