summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/arch/aviion/aviion/av400_machdep.c13
-rw-r--r--sys/arch/aviion/aviion/av530_machdep.c25
-rw-r--r--sys/arch/aviion/aviion/machdep.c16
-rw-r--r--sys/arch/aviion/include/board.h8
4 files changed, 39 insertions, 23 deletions
diff --git a/sys/arch/aviion/aviion/av400_machdep.c b/sys/arch/aviion/aviion/av400_machdep.c
index 3c662bb8c0d..41d00f47fbc 100644
--- a/sys/arch/aviion/aviion/av400_machdep.c
+++ b/sys/arch/aviion/aviion/av400_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: av400_machdep.c,v 1.21 2013/02/17 18:07:36 miod Exp $ */
+/* $OpenBSD: av400_machdep.c,v 1.22 2013/10/07 19:09:07 miod Exp $ */
/*
* Copyright (c) 2006, 2007, Miodrag Vallat.
*
@@ -203,6 +203,7 @@ const struct board board_av400 = {
m88100_smp_setup,
#endif
av400_intsrc,
+ av400_exintsrc,
av400_get_vme_ranges,
av400_ptable
@@ -462,7 +463,7 @@ av400_clock_ipi_handler(struct trapframe *eframe)
/*
* Provide the interrupt masks for a given logical interrupt source.
*/
-u_int64_t
+u_int32_t
av400_intsrc(int i)
{
static const u_int32_t intsrc[] = {
@@ -486,7 +487,13 @@ av400_intsrc(int i)
AV400_IRQ_VME7
};
- return ((u_int64_t)intsrc[i]);
+ return intsrc[i];
+}
+
+u_int32_t
+av400_exintsrc(int i)
+{
+ return 0;
}
/*
diff --git a/sys/arch/aviion/aviion/av530_machdep.c b/sys/arch/aviion/aviion/av530_machdep.c
index b548d18c34a..70796223722 100644
--- a/sys/arch/aviion/aviion/av530_machdep.c
+++ b/sys/arch/aviion/aviion/av530_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: av530_machdep.c,v 1.7 2013/02/17 18:07:36 miod Exp $ */
+/* $OpenBSD: av530_machdep.c,v 1.8 2013/10/07 19:09:08 miod Exp $ */
/*
* Copyright (c) 2006, 2007, 2010 Miodrag Vallat.
*
@@ -92,15 +92,15 @@ const struct board board_av530 = {
m88100_smp_setup,
#endif
av530_intsrc,
+ av530_exintsrc,
av530_get_vme_ranges,
av530_ptable
};
/*
- * The MVME188 interrupt arbiter has 25 orthogonal interrupt sources.
- * On the AViiON 530 machines, there are even more interrupt sources in use,
- * requiring the use of two arbiters.
+ * The AViiON 530 machines have two interrupt arbiter for 32 orthognal
+ * interrupt sources each.
* We fold this model in the 8-level spl model this port uses, enforcing
* priorities manually with the interrupt masks.
*/
@@ -385,7 +385,7 @@ av530_clock_ipi_handler(struct trapframe *eframe)
/*
* Provide the interrupt masks for a given logical interrupt source.
*/
-u_int64_t
+u_int32_t
av530_intsrc(int i)
{
static const u_int32_t intsrc[] = {
@@ -407,7 +407,15 @@ av530_intsrc(int i)
AV530_IRQ_VME5,
AV530_IRQ_VME6,
AV530_IRQ_VME7
- }, ext_intsrc[] = {
+ };
+
+ return intsrc[i];
+}
+
+u_int32_t
+av530_exintsrc(int i)
+{
+ static const u_int32_t exintsrc[] = {
0,
0,
0,
@@ -427,11 +435,8 @@ av530_intsrc(int i)
0,
0
};
- uint64_t isrc;
- isrc = ext_intsrc[i];
- isrc = (isrc << 32) | intsrc[i];
- return isrc;
+ return exintsrc[i];
}
/*
diff --git a/sys/arch/aviion/aviion/machdep.c b/sys/arch/aviion/aviion/machdep.c
index 7700d677aab..de8985acaa4 100644
--- a/sys/arch/aviion/aviion/machdep.c
+++ b/sys/arch/aviion/aviion/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.53 2013/09/28 19:56:47 miod Exp $ */
+/* $OpenBSD: machdep.c,v 1.54 2013/10/07 19:09:08 miod Exp $ */
/*
* Copyright (c) 2007 Miodrag Vallat.
*
@@ -929,15 +929,16 @@ void
intsrc_enable(u_int intsrc, int ipl)
{
u_int32_t psr;
- u_int64_t intmask = platform->intsrc(intsrc);
+ u_int32_t intmask = platform->intsrc(intsrc);
+ u_int32_t exintmask = platform->exintsrc(intsrc);
int i;
psr = get_psr();
set_psr(psr | PSR_IND);
for (i = IPL_NONE; i < ipl; i++) {
- int_mask_val[i] |= (u_int32_t)intmask;
- ext_int_mask_val[i] |= (u_int32_t)(intmask >> 32);
+ int_mask_val[i] |= intmask;
+ ext_int_mask_val[i] |= exintmask;
}
setipl(getipl());
@@ -948,15 +949,16 @@ void
intsrc_disable(u_int intsrc)
{
u_int32_t psr;
- u_int64_t intmask = platform->intsrc(intsrc);
+ u_int32_t intmask = platform->intsrc(intsrc);
+ u_int32_t exintmask = platform->exintsrc(intsrc);
int i;
psr = get_psr();
set_psr(psr | PSR_IND);
for (i = 0; i < NIPLS; i++) {
- int_mask_val[i] &= ~((u_int32_t)intmask);
- ext_int_mask_val[i] &= ~((u_int32_t)(intmask >> 32));
+ int_mask_val[i] &= ~intmask;
+ ext_int_mask_val[i] &= ~exintmask;
}
setipl(getipl());
diff --git a/sys/arch/aviion/include/board.h b/sys/arch/aviion/include/board.h
index c6478ef1884..4c843947bd3 100644
--- a/sys/arch/aviion/include/board.h
+++ b/sys/arch/aviion/include/board.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: board.h,v 1.9 2011/01/02 13:40:07 miod Exp $ */
+/* $OpenBSD: board.h,v 1.10 2013/10/07 19:09:11 miod Exp $ */
/*
* Copyright (c) 2006, 2007, Miodrag Vallat
*
@@ -89,7 +89,8 @@ struct board {
void (*smp_setup)(struct cpu_info *);
#endif
- u_int64_t (*intsrc)(int);
+ u_int32_t (*intsrc)(int);
+ u_int32_t (*exintsrc)(int);
const struct vme_range *(*get_vme_ranges)(void);
const struct pmap_table *ptable;
@@ -109,7 +110,8 @@ u_int av##b##_setipl(u_int); \
u_int av##b##_raiseipl(u_int); \
void av##b##_send_ipi(int, cpuid_t); \
void av##b##_smp_setup(struct cpu_info *); \
-u_int64_t av##b##_intsrc(int); \
+u_int32_t av##b##_intsrc(int); \
+u_int32_t av##b##_exintsrc(int); \
const struct vme_range *av##b##_get_vme_ranges(void);
DECLARE_BOARD(400);