summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2014-09-06 10:45:30 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2014-09-06 10:45:30 +0000
commit4f56fa998371cc050e77caf01ac8630c5b656945 (patch)
treedbe996c82c1fb9b2315e5521dea2e8d15ffe8fb1 /sys/arch
parentc37dd3becaaf6af61686c4ed38dfaeaf2fb958db (diff)
Rename ci_iactive into ci_flags, this field now holds the going-to-
sleep bit.
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/macppc/dev/macintr.c10
-rw-r--r--sys/arch/macppc/dev/openpic.c8
-rw-r--r--sys/arch/macppc/macppc/genassym.cf6
-rw-r--r--sys/arch/macppc/macppc/locore.S30
-rw-r--r--sys/arch/powerpc/include/cpu.h9
-rw-r--r--sys/arch/socppc/socppc/genassym.cf6
-rw-r--r--sys/arch/socppc/socppc/locore.S30
-rw-r--r--sys/arch/socppc/socppc/machdep.c8
8 files changed, 54 insertions, 53 deletions
diff --git a/sys/arch/macppc/dev/macintr.c b/sys/arch/macppc/dev/macintr.c
index f5013891eaa..b0c69316db0 100644
--- a/sys/arch/macppc/dev/macintr.c
+++ b/sys/arch/macppc/dev/macintr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: macintr.c,v 1.48 2014/08/30 09:42:20 mpi Exp $ */
+/* $OpenBSD: macintr.c,v 1.49 2014/09/06 10:45:29 mpi Exp $ */
/*-
* Copyright (c) 2008 Dale Rahn <drahn@openbsd.org>
@@ -202,7 +202,7 @@ macintr_attach(struct device *parent, struct device *self, void *aux)
ppc_intr_func.lower = macintr_spllower;
ppc_intr_func.x = macintr_splx;
- ci->ci_iactive = 0;
+ ci->ci_flags = 0;
macintr_collect_preconf_intr();
@@ -480,11 +480,11 @@ macintr_do_pending_int()
int pcpl = ci->ci_cpl; /* XXX */
int s;
s = ppc_intr_disable();
- if (ci->ci_iactive & CI_IACTIVE_PROCESSING_SOFT) {
+ if (ci->ci_flags & CI_FLAGS_PROCESSING_SOFT) {
ppc_intr_enable(s);
return;
}
- atomic_setbits_int(&ci->ci_iactive, CI_IACTIVE_PROCESSING_SOFT);
+ atomic_setbits_int(&ci->ci_flags, CI_FLAGS_PROCESSING_SOFT);
do {
if((ci->ci_ipending & SI_TO_IRQBIT(SI_SOFTCLOCK)) &&
@@ -507,7 +507,7 @@ macintr_do_pending_int()
macintr_setipl(pcpl);
ppc_intr_enable(s);
- atomic_clearbits_int(&ci->ci_iactive, CI_IACTIVE_PROCESSING_SOFT);
+ atomic_clearbits_int(&ci->ci_flags, CI_FLAGS_PROCESSING_SOFT);
}
void
diff --git a/sys/arch/macppc/dev/openpic.c b/sys/arch/macppc/dev/openpic.c
index 41e66491bf8..41cc3629acf 100644
--- a/sys/arch/macppc/dev/openpic.c
+++ b/sys/arch/macppc/dev/openpic.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: openpic.c,v 1.73 2014/08/30 09:42:20 mpi Exp $ */
+/* $OpenBSD: openpic.c,v 1.74 2014/09/06 10:45:29 mpi Exp $ */
/*-
* Copyright (c) 2008 Dale Rahn <drahn@openbsd.org>
@@ -462,14 +462,14 @@ openpic_do_pending_int_dis(int pcpl, int s)
struct cpu_info *ci = curcpu();
(void)ppc_intr_disable();
- if (ci->ci_iactive & CI_IACTIVE_PROCESSING_SOFT) {
+ if (ci->ci_flags & CI_FLAGS_PROCESSING_SOFT) {
/* soft interrupts are being processed, just set ipl/return */
openpic_setipl(pcpl);
ppc_intr_enable(s);
return;
}
- atomic_setbits_int(&ci->ci_iactive, CI_IACTIVE_PROCESSING_SOFT);
+ atomic_setbits_int(&ci->ci_flags, CI_FLAGS_PROCESSING_SOFT);
do {
if ((ci->ci_ipending & SI_TO_IRQBIT(SI_SOFTCLOCK)) &&
@@ -502,7 +502,7 @@ openpic_do_pending_int_dis(int pcpl, int s)
} while (ci->ci_ipending & ppc_smask[pcpl]);
openpic_setipl(pcpl); /* Don't use splx... we are here already! */
- atomic_clearbits_int(&ci->ci_iactive, CI_IACTIVE_PROCESSING_SOFT);
+ atomic_clearbits_int(&ci->ci_flags, CI_FLAGS_PROCESSING_SOFT);
ppc_intr_enable(s);
}
diff --git a/sys/arch/macppc/macppc/genassym.cf b/sys/arch/macppc/macppc/genassym.cf
index 04df2e91d24..ba2372e3749 100644
--- a/sys/arch/macppc/macppc/genassym.cf
+++ b/sys/arch/macppc/macppc/genassym.cf
@@ -1,4 +1,4 @@
-# $OpenBSD: genassym.cf,v 1.23 2014/09/06 10:15:52 mpi Exp $
+# $OpenBSD: genassym.cf,v 1.24 2014/09/06 10:45:29 mpi Exp $
#
# Copyright (c) 1982, 1990 The Regents of the University of California.
# All rights reserved.
@@ -87,8 +87,8 @@ member ci_curpcb
member ci_curpm
member ci_want_resched
member ci_cpl
-member ci_iactive
-export CI_IACTIVE_SLEEPING
+member ci_flags
+export CI_FLAGS_SLEEPING
member ci_intrdepth
member ci_intstk
member ci_tempsave
diff --git a/sys/arch/macppc/macppc/locore.S b/sys/arch/macppc/macppc/locore.S
index 7aaf3d81827..b73aa90e311 100644
--- a/sys/arch/macppc/macppc/locore.S
+++ b/sys/arch/macppc/macppc/locore.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: locore.S,v 1.44 2014/09/06 10:15:52 mpi Exp $ */
+/* $OpenBSD: locore.S,v 1.45 2014/09/06 10:45:29 mpi Exp $ */
/* $NetBSD: locore.S,v 1.2 1996/10/16 19:33:09 ws Exp $ */
/*
@@ -238,9 +238,9 @@ _ENTRY(_C_LABEL(cpu_idle_cycle))
* are entering sleep mode.
*/
GET_CPUINFO(%r4)
- lwz %r6,CI_IACTIVE(%r4)
- ori %r6,%r6,CI_IACTIVE_SLEEPING@l
- stw %r6,CI_IACTIVE(%r4)
+ lwz %r6,CI_FLAGS(%r4)
+ ori %r6,%r6,CI_FLAGS_SLEEPING@l
+ stw %r6,CI_FLAGS(%r4)
/* enable interrupts, required before setting POW */
mfmsr %r3
@@ -254,15 +254,15 @@ _ENTRY(_C_LABEL(cpu_idle_cycle))
isync
/*
- * restore interrupts to disabled, so CI_IACTIVE is only modified
+ * restore interrupts to disabled, so CI_FLAGS is only modified
* with interrupts disabled.
*/
mtmsr %r3
isync
- /* clear CI_IACTIVE_SLEEPING since sleeping is over */
- andi. %r6,%r6,~CI_IACTIVE_SLEEPING@l
- stw %r6,CI_IACTIVE(%r4)
+ /* clear CI_FLAGS_SLEEPING since sleeping is over */
+ andi. %r6,%r6,~CI_FLAGS_SLEEPING@l
+ stw %r6,CI_FLAGS(%r4)
idledone:
blr
@@ -730,11 +730,11 @@ _C_LABEL(ddbsize) = .-_C_LABEL(ddblow)
*/
#define CPU_IDLE_CHECK(sr1,sr2,sr3,rSRR0) \
GET_CPUINFO(sr1); \
- lwz sr2,CI_IACTIVE(sr1); \
- andi. sr3,sr2,CI_IACTIVE_SLEEPING@l; \
+ lwz sr2,CI_FLAGS(sr1); \
+ andi. sr3,sr2,CI_FLAGS_SLEEPING@l; \
beq 1f; \
- andi. sr2,sr2,~CI_IACTIVE_SLEEPING@l; \
- stw sr2,CI_IACTIVE(sr1); \
+ andi. sr2,sr2,~CI_FLAGS_SLEEPING@l; \
+ stw sr2,CI_FLAGS(sr1); \
lis rSRR0,_C_LABEL(idledone)@ha; \
addi rSRR0,rSRR0,_C_LABEL(idledone)@l; \
1:
@@ -1293,9 +1293,9 @@ _C_LABEL(ddb_trap):
* about to enter to ddb(8), do not let FRAME_SETUP() below
* change the return address of, and corrupt, this frame.
*/
- lwz %r28,CI_IACTIVE(%r3)
- andi. %r28,%r28,~CI_IACTIVE_SLEEPING@l
- stw %r28,CI_IACTIVE(%r3)
+ lwz %r28,CI_FLAGS(%r3)
+ andi. %r28,%r28,~CI_FLAGS_SLEEPING@l
+ stw %r28,CI_FLAGS(%r3)
mflr %r28
li %r29,EXC_BPT
diff --git a/sys/arch/powerpc/include/cpu.h b/sys/arch/powerpc/include/cpu.h
index ba877a7fc1b..604717d3bcb 100644
--- a/sys/arch/powerpc/include/cpu.h
+++ b/sys/arch/powerpc/include/cpu.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpu.h,v 1.55 2014/09/06 10:15:52 mpi Exp $ */
+/* $OpenBSD: cpu.h,v 1.56 2014/09/06 10:45:29 mpi Exp $ */
/* $NetBSD: cpu.h,v 1.1 1996/09/30 16:34:21 ws Exp $ */
/*
@@ -54,11 +54,12 @@ struct cpu_info {
volatile int ci_want_resched;
volatile int ci_cpl;
- volatile int ci_iactive;
-#define CI_IACTIVE_PROCESSING_SOFT 1
-#define CI_IACTIVE_SLEEPING 2
volatile int ci_ipending;
+ volatile int ci_flags;
+#define CI_FLAGS_PROCESSING_SOFT 1
+#define CI_FLAGS_SLEEPING 2
+
int ci_intrdepth;
char *ci_intstk;
#define CPUSAVE_LEN 8
diff --git a/sys/arch/socppc/socppc/genassym.cf b/sys/arch/socppc/socppc/genassym.cf
index 527c5e3fe33..32844f1049b 100644
--- a/sys/arch/socppc/socppc/genassym.cf
+++ b/sys/arch/socppc/socppc/genassym.cf
@@ -1,4 +1,4 @@
-# $OpenBSD: genassym.cf,v 1.3 2014/09/06 10:15:52 mpi Exp $
+# $OpenBSD: genassym.cf,v 1.4 2014/09/06 10:45:29 mpi Exp $
#
# Copyright (c) 1982, 1990 The Regents of the University of California.
# All rights reserved.
@@ -87,8 +87,8 @@ member ci_curpcb
member ci_curpm
member ci_want_resched
member ci_cpl
-member ci_iactive
-export CI_IACTIVE_SLEEPING
+member ci_flags
+export CI_FLAGS_SLEEPING
member ci_intrdepth
member ci_intstk
member ci_tempsave
diff --git a/sys/arch/socppc/socppc/locore.S b/sys/arch/socppc/socppc/locore.S
index 9145156da2a..5501fd059b1 100644
--- a/sys/arch/socppc/socppc/locore.S
+++ b/sys/arch/socppc/socppc/locore.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: locore.S,v 1.11 2014/09/06 10:15:52 mpi Exp $ */
+/* $OpenBSD: locore.S,v 1.12 2014/09/06 10:45:29 mpi Exp $ */
/* $NetBSD: locore.S,v 1.2 1996/10/16 19:33:09 ws Exp $ */
/*
@@ -257,9 +257,9 @@ _ENTRY(_C_LABEL(cpu_idle_cycle))
* are entering sleep mode.
*/
GET_CPUINFO(%r4)
- lwz %r6,CI_IACTIVE(%r4)
- ori %r6,%r6,CI_IACTIVE_SLEEPING@l
- stw %r6,CI_IACTIVE(%r4)
+ lwz %r6,CI_FLAGS(%r4)
+ ori %r6,%r6,CI_FLAGS_SLEEPING@l
+ stw %r6,CI_FLAGS(%r4)
/* enable interrupts, required before setting POW */
mfmsr %r3
@@ -273,15 +273,15 @@ _ENTRY(_C_LABEL(cpu_idle_cycle))
isync
/*
- * restore interrupts to disabled, so CI_IACTIVE is only modified
+ * restore interrupts to disabled, so CI_FLAGS is only modified
* with interrupts disabled.
*/
mtmsr %r3
isync
- /* clear CI_IACTIVE_SLEEPING since sleeping is over */
- andi. %r6,%r6,~CI_IACTIVE_SLEEPING@l
- stw %r6,CI_IACTIVE(%r4)
+ /* clear CI_FLAGS_SLEEPING since sleeping is over */
+ andi. %r6,%r6,~CI_FLAGS_SLEEPING@l
+ stw %r6,CI_FLAGS(%r4)
idledone:
blr
@@ -749,11 +749,11 @@ _C_LABEL(ddbsize) = .-_C_LABEL(ddblow)
*/
#define CPU_IDLE_CHECK(sr1,sr2,sr3,rSRR0) \
GET_CPUINFO(sr1); \
- lwz sr2,CI_IACTIVE(sr1); \
- andi. sr3,sr2,CI_IACTIVE_SLEEPING@l; \
+ lwz sr2,CI_FLAGS(sr1); \
+ andi. sr3,sr2,CI_FLAGS_SLEEPING@l; \
beq 1f; \
- andi. sr2,sr2,~CI_IACTIVE_SLEEPING@l; \
- stw sr2,CI_IACTIVE(sr1); \
+ andi. sr2,sr2,~CI_FLAGS_SLEEPING@l; \
+ stw sr2,CI_FLAGS(sr1); \
lis rSRR0,_C_LABEL(idledone)@ha; \
addi rSRR0,rSRR0,_C_LABEL(idledone)@l; \
1:
@@ -1312,9 +1312,9 @@ _C_LABEL(ddb_trap):
* about to enter to ddb(8), do not let FRAME_SETUP() below
* change the return address of, and corrupt, this frame.
*/
- lwz %r28,CI_IACTIVE(%r3)
- andi. %r28,%r28,~CI_IACTIVE_SLEEPING@l
- stw %r28,CI_IACTIVE(%r3)
+ lwz %r28,CI_FLAGS(%r3)
+ andi. %r28,%r28,~CI_FLAGS_SLEEPING@l
+ stw %r28,CI_FLAGS(%r3)
mflr %r28
li %r29,EXC_BPT
diff --git a/sys/arch/socppc/socppc/machdep.c b/sys/arch/socppc/socppc/machdep.c
index 230d5319c28..9d348064b59 100644
--- a/sys/arch/socppc/socppc/machdep.c
+++ b/sys/arch/socppc/socppc/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.55 2014/07/21 17:25:47 uebayasi Exp $ */
+/* $OpenBSD: machdep.c,v 1.56 2014/09/06 10:45:29 mpi Exp $ */
/* $NetBSD: machdep.c,v 1.4 1996/10/16 19:33:11 ws Exp $ */
/*
@@ -1098,11 +1098,11 @@ do_pending_int(void)
int pcpl = ci->ci_cpl; /* XXX */
int s;
s = ppc_intr_disable();
- if (ci->ci_iactive & CI_IACTIVE_PROCESSING_SOFT) {
+ if (ci->ci_flags & CI_FLAGS_PROCESSING_SOFT) {
ppc_intr_enable(s);
return;
}
- atomic_setbits_int(&ci->ci_iactive, CI_IACTIVE_PROCESSING_SOFT);
+ atomic_setbits_int(&ci->ci_flags, CI_FLAGS_PROCESSING_SOFT);
do {
if((ci->ci_ipending & SI_TO_IRQBIT(SI_SOFTCLOCK)) &&
@@ -1125,7 +1125,7 @@ do_pending_int(void)
splx(pcpl);
ppc_intr_enable(s);
- atomic_clearbits_int(&ci->ci_iactive, CI_IACTIVE_PROCESSING_SOFT);
+ atomic_clearbits_int(&ci->ci_flags, CI_FLAGS_PROCESSING_SOFT);
}
/*