Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/algor Merge forward from matt-nb5-mips64.
details: https://anonhg.NetBSD.org/src/rev/083ea3a8c4fe
branches: trunk
changeset: 762366:083ea3a8c4fe
user: matt <matt%NetBSD.org@localhost>
date: Sun Feb 20 07:51:21 2011 +0000
description:
Merge forward from matt-nb5-mips64.
Adapt to new interrupt/spl framework.
diffstat:
sys/arch/algor/algor/algor_p4032_intr.c | 24 ++-----
sys/arch/algor/algor/algor_p4032var.h | 4 +-
sys/arch/algor/algor/algor_p5064_intr.c | 29 ++++-----
sys/arch/algor/algor/algor_p5064var.h | 4 +-
sys/arch/algor/algor/algor_p6032_intr.c | 21 ++----
sys/arch/algor/algor/cpu.c | 23 ++++---
sys/arch/algor/algor/interrupt.c | 95 ++++++++++++--------------------
sys/arch/algor/algor/machdep.c | 90 +++++++-----------------------
sys/arch/algor/conf/P4032 | 6 +-
sys/arch/algor/conf/P5064 | 6 +-
sys/arch/algor/conf/P5064-64 | 6 +-
sys/arch/algor/conf/files.algor | 3 +-
sys/arch/algor/dev/mainbus.c | 6 +-
sys/arch/algor/include/autoconf.h | 8 +-
sys/arch/algor/include/intr.h | 57 +------------------
sys/arch/algor/isa/isadma_bounce.c | 12 +--
16 files changed, 129 insertions(+), 265 deletions(-)
diffs (truncated from 950 to 300 lines):
diff -r 1398d739ee5f -r 083ea3a8c4fe sys/arch/algor/algor/algor_p4032_intr.c
--- a/sys/arch/algor/algor/algor_p4032_intr.c Sun Feb 20 07:50:24 2011 +0000
+++ b/sys/arch/algor/algor/algor_p4032_intr.c Sun Feb 20 07:51:21 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: algor_p4032_intr.c,v 1.20 2008/05/26 15:59:29 tsutsui Exp $ */
+/* $NetBSD: algor_p4032_intr.c,v 1.21 2011/02/20 07:51:21 matt Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -38,9 +38,10 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: algor_p4032_intr.c,v 1.20 2008/05/26 15:59:29 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: algor_p4032_intr.c,v 1.21 2011/02/20 07:51:21 matt Exp $");
#include "opt_ddb.h"
+#define __INTR_PRIVATE
#include <sys/param.h>
#include <sys/queue.h>
@@ -99,7 +100,7 @@
#define IRQMAP_8BITBASE NPCIIRQS
#define NIRQMAPS (IRQMAP_8BITBASE + N8BITIRQS)
-const char *p4032_intrnames[NIRQMAPS] = {
+const char * const p4032_intrnames[NIRQMAPS] = {
/*
* PCI INTERRUPTS
*/
@@ -205,12 +206,12 @@
};
struct p4032_cpuintr p4032_cpuintrs[NINTRS];
-const char *p4032_cpuintrnames[NINTRS] = {
+const char * const p4032_cpuintrnames[NINTRS] = {
"int 0 (pci)",
"int 1 (8-bit)",
};
-const char *p4032_intrgroups[NINTRS] = {
+const char * const p4032_intrgroups[NINTRS] = {
"pci",
"8-bit",
};
@@ -226,7 +227,7 @@
void algor_p4032_pci_intr_disestablish(void *, void *);
void algor_p4032_pci_conf_interrupt(void *, int, int, int, int, int *);
-void algor_p4032_iointr(u_int32_t, u_int32_t, u_int32_t, u_int32_t);
+void algor_p4032_iointr(int, vaddr_t, uint32_t);
void
algor_p4032_intr_init(struct p4032_config *acp)
@@ -242,7 +243,6 @@
evcnt_attach_dynamic(&p4032_cpuintrs[i].cintr_count,
EVCNT_TYPE_INTR, NULL, "mips", p4032_cpuintrnames[i]);
}
- evcnt_attach_static(&mips_int5_evcnt);
for (i = 0; i < NIRQMAPS; i++) {
irqmap = &p4032_irqmap[i];
@@ -414,8 +414,7 @@
}
void
-algor_p4032_iointr(u_int32_t status, u_int32_t cause, u_int32_t pc,
- u_int32_t ipending)
+algor_p4032_iointr(int ipl, vaddr_t pc, u_int32_t ipending)
{
const struct p4032_irqmap *irqmap;
struct algor_intrhand *ih;
@@ -452,9 +451,6 @@
* XXX the floppy interrupt here.
*/
- cause &= ~MIPS_INT_MASK_3;
- _splset(MIPS_SR_INT_IE |
- ((status & ~cause) & MIPS_HARD_INT_MASK));
}
/*
@@ -481,11 +477,7 @@
(*ih->ih_func)(ih->ih_arg);
}
}
- cause &= ~(MIPS_INT_MASK_0 << level);
}
-
- /* Re-enable anything that we have processed. */
- _splset(MIPS_SR_INT_IE | ((status & ~cause) & MIPS_HARD_INT_MASK));
}
/*****************************************************************************
diff -r 1398d739ee5f -r 083ea3a8c4fe sys/arch/algor/algor/algor_p4032var.h
--- a/sys/arch/algor/algor/algor_p4032var.h Sun Feb 20 07:50:24 2011 +0000
+++ b/sys/arch/algor/algor/algor_p4032var.h Sun Feb 20 07:51:21 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: algor_p4032var.h,v 1.5 2008/04/28 20:23:10 martin Exp $ */
+/* $NetBSD: algor_p4032var.h,v 1.6 2011/02/20 07:51:21 matt Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -72,7 +72,7 @@
void algor_p4032_intr_init(struct p4032_config *);
-void algor_p4032_iointr(u_int32_t, u_int32_t, u_int32_t, u_int32_t);
+void algor_p4032_iointr(int, vaddr_t, uint32_t);
void algor_p4032_cal_timer(bus_space_tag_t, bus_space_handle_t);
#endif /* _KERNEL */
diff -r 1398d739ee5f -r 083ea3a8c4fe sys/arch/algor/algor/algor_p5064_intr.c
--- a/sys/arch/algor/algor/algor_p5064_intr.c Sun Feb 20 07:50:24 2011 +0000
+++ b/sys/arch/algor/algor/algor_p5064_intr.c Sun Feb 20 07:51:21 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: algor_p5064_intr.c,v 1.23 2008/05/26 15:59:29 tsutsui Exp $ */
+/* $NetBSD: algor_p5064_intr.c,v 1.24 2011/02/20 07:51:21 matt Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -38,9 +38,10 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: algor_p5064_intr.c,v 1.23 2008/05/26 15:59:29 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: algor_p5064_intr.c,v 1.24 2011/02/20 07:51:21 matt Exp $");
#include "opt_ddb.h"
+#define __INTR_PRIVATE
#include <sys/param.h>
#include <sys/queue.h>
@@ -68,11 +69,11 @@
#include <dev/isa/isavar.h>
-#define REGVAL(x) *((volatile u_int32_t *)(MIPS_PHYS_TO_KSEG1((x))))
+#define REGVAL(x) *((volatile uint32_t *)(MIPS_PHYS_TO_KSEG1((x))))
struct p5064_irqreg {
bus_addr_t addr;
- u_int32_t val;
+ uint32_t val;
};
#define IRQREG_LOCINT 0
@@ -111,7 +112,7 @@
#define IRQMAP_ISABASE (IRQMAP_LOCBASE + NLOCIRQS)
#define NIRQMAPS (IRQMAP_ISABASE + NISAIRQS)
-const char *p5064_intrnames[NIRQMAPS] = {
+const char * const p5064_intrnames[NIRQMAPS] = {
/*
* PCI INTERRUPTS
*/
@@ -274,13 +275,13 @@
};
struct p5064_cpuintr p5064_cpuintrs[NINTRS];
-const char *p5064_cpuintrnames[NINTRS] = {
+const char * const p5064_cpuintrnames[NINTRS] = {
"int 0 (isa)",
"int 1 (pci)",
"int 2 (local)",
};
-const char *p5064_intrgroups[NINTRS] = {
+const char * const p5064_intrgroups[NINTRS] = {
"isa",
"pci",
"local",
@@ -305,7 +306,7 @@
void algor_p5064_isa_intr_disestablish(void *, void *);
int algor_p5064_isa_intr_alloc(void *, int, int, int *);
-void algor_p5064_iointr(u_int32_t, u_int32_t, u_int32_t, u_int32_t);
+void algor_p5064_iointr(int, vaddr_t, uint32_t);
void
algor_p5064_intr_init(struct p5064_config *acp)
@@ -321,7 +322,6 @@
evcnt_attach_dynamic(&p5064_cpuintrs[i].cintr_count,
EVCNT_TYPE_INTR, NULL, "mips", p5064_cpuintrnames[i]);
}
- evcnt_attach_static(&mips_int5_evcnt);
for (i = 0; i < NIRQMAPS; i++) {
irqmap = &p5064_irqmap[i];
@@ -362,7 +362,7 @@
algor_p5064_cal_timer(bus_space_tag_t st, bus_space_handle_t sh)
{
u_long ctrdiff[4], startctr, endctr, cps;
- u_int32_t irr;
+ uint32_t irr;
int i;
/* Disable interrupts first. */
@@ -507,13 +507,12 @@
}
void
-algor_p5064_iointr(u_int32_t status, u_int32_t cause, u_int32_t pc,
- u_int32_t ipending)
+algor_p5064_iointr(int ipl, vaddr_t pc, uint32_t ipending)
{
const struct p5064_irqmap *irqmap;
struct algor_intrhand *ih;
int level, i;
- u_int32_t irr[NIRQREG];
+ uint32_t irr[NIRQREG];
/* Check for PANIC interrupts. */
if (ipending & MIPS_INT_MASK_4) {
@@ -566,11 +565,7 @@
(*ih->ih_func)(ih->ih_arg);
}
}
- cause &= ~(MIPS_INT_MASK_0 << level);
}
-
- /* Re-enable anything that we have processed. */
- _splset(MIPS_SR_INT_IE | ((status & ~cause) & MIPS_HARD_INT_MASK));
}
/*****************************************************************************
diff -r 1398d739ee5f -r 083ea3a8c4fe sys/arch/algor/algor/algor_p5064var.h
--- a/sys/arch/algor/algor/algor_p5064var.h Sun Feb 20 07:50:24 2011 +0000
+++ b/sys/arch/algor/algor/algor_p5064var.h Sun Feb 20 07:51:21 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: algor_p5064var.h,v 1.6 2008/04/28 20:23:10 martin Exp $ */
+/* $NetBSD: algor_p5064var.h,v 1.7 2011/02/20 07:51:21 matt Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -75,7 +75,7 @@
void algor_p5064_intr_init(struct p5064_config *);
-void algor_p5064_iointr(u_int32_t, u_int32_t, u_int32_t, u_int32_t);
+void algor_p5064_iointr(int, vaddr_t, uint32_t);
void algor_p5064_cal_timer(bus_space_tag_t, bus_space_handle_t);
#endif /* _KERNEL */
diff -r 1398d739ee5f -r 083ea3a8c4fe sys/arch/algor/algor/algor_p6032_intr.c
--- a/sys/arch/algor/algor/algor_p6032_intr.c Sun Feb 20 07:50:24 2011 +0000
+++ b/sys/arch/algor/algor/algor_p6032_intr.c Sun Feb 20 07:51:21 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: algor_p6032_intr.c,v 1.16 2008/05/26 15:59:29 tsutsui Exp $ */
+/* $NetBSD: algor_p6032_intr.c,v 1.17 2011/02/20 07:51:21 matt Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -37,9 +37,10 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: algor_p6032_intr.c,v 1.16 2008/05/26 15:59:29 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: algor_p6032_intr.c,v 1.17 2011/02/20 07:51:21 matt Exp $");
#include "opt_ddb.h"
+#define __INTR_PRIVATE
#include <sys/param.h>
#include <sys/queue.h>
@@ -182,7 +183,7 @@
void algor_p6032_pci_intr_disestablish(void *, void *);
void algor_p6032_pci_conf_interrupt(void *, int, int, int, int, int *);
-void algor_p6032_iointr(u_int32_t, u_int32_t, u_int32_t, u_int32_t);
+void algor_p6032_iointr(int, vaddr_t, uint32_t);
void
algor_p6032_intr_init(struct p6032_config *acp)
@@ -196,7 +197,6 @@
evcnt_attach_dynamic(&p6032_cpuintrs[i].cintr_count,
EVCNT_TYPE_INTR, NULL, "mips", p6032_cpuintrnames[i]);
}
- evcnt_attach_static(&mips_int5_evcnt);
for (i = 0; i <= NIRQMAPS; i++) {
irqmap = &p6032_irqmap[i];
@@ -240,7 +240,7 @@
algor_p6032_cal_timer(bus_space_tag_t st, bus_space_handle_t sh)
{
u_long ctrdiff[4], startctr, endctr, cps;
- u_int8_t regc;
+ uint8_t regc;
int i;
/* Disable interrupts first. */
@@ -371,13 +371,12 @@
}
void
-algor_p6032_iointr(u_int32_t status, u_int32_t cause, u_int32_t pc,
- u_int32_t ipending)
+algor_p6032_iointr(int ipl, vaddr_t pc, uint32_t ipending)
{
const struct p6032_irqmap *irqmap;
Home |
Main Index |
Thread Index |
Old Index