Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arc Merge forward from matt-nb5-mips64.
details: https://anonhg.NetBSD.org/src/rev/0a7faf4fc936
branches: trunk
changeset: 762367:0a7faf4fc936
user: matt <matt%NetBSD.org@localhost>
date: Sun Feb 20 07:52:42 2011 +0000
description:
Merge forward from matt-nb5-mips64.
Adapt to new interrupt/spl framework.
Add LP64 support.
diffstat:
sys/arch/arc/arc/autoconf.c | 7 +-
sys/arch/arc/arc/bus_dma.c | 26 ++++----
sys/arch/arc/arc/bus_space_sparse.c | 6 +-
sys/arch/arc/arc/c_magnum.c | 43 ++++++-------
sys/arch/arc/arc/c_nec_eisa.c | 41 ++++++-------
sys/arch/arc/arc/c_nec_pci.c | 41 ++++++-------
sys/arch/arc/arc/cpu.c | 15 ++--
sys/arch/arc/arc/interrupt.c | 96 +++++++++++++-------------------
sys/arch/arc/arc/machdep.c | 26 ++------
sys/arch/arc/arc/p_dti_arcstation.c | 43 +++++--------
sys/arch/arc/arc/p_dti_tyne.c | 47 ++++++---------
sys/arch/arc/arc/p_sni_rm200pci.c | 43 +++++--------
sys/arch/arc/conf/files.arc | 3 +-
sys/arch/arc/include/intr.h | 56 +------------------
sys/arch/arc/include/netbsd32_machdep.h | 3 +
sys/arch/arc/isa/isadma_bounce.c | 12 +--
sys/arch/arc/pci/necpb.c | 6 +-
sys/arch/arc/stand/boot/Makefile | 10 ++-
sys/arch/arc/stand/boot/boot.c | 10 +--
sys/arch/arc/stand/boot/disk.c | 12 +--
sys/arch/arc/stand/boot/getchar.c | 6 +-
sys/arch/arc/stand/boot/putchar.c | 8 +-
sys/arch/arc/stand/boot/start.S | 4 +-
23 files changed, 226 insertions(+), 338 deletions(-)
diffs (truncated from 1228 to 300 lines):
diff -r 083ea3a8c4fe -r 0a7faf4fc936 sys/arch/arc/arc/autoconf.c
--- a/sys/arch/arc/arc/autoconf.c Sun Feb 20 07:51:21 2011 +0000
+++ b/sys/arch/arc/arc/autoconf.c Sun Feb 20 07:52:42 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: autoconf.c,v 1.32 2007/12/03 15:33:12 ad Exp $ */
+/* $NetBSD: autoconf.c,v 1.33 2011/02/20 07:52:42 matt Exp $ */
/* $OpenBSD: autoconf.c,v 1.9 1997/05/18 13:45:20 pefo Exp $ */
/*
@@ -88,7 +88,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.32 2007/12/03 15:33:12 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.33 2011/02/20 07:52:42 matt Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -148,9 +148,10 @@
* to disable it other than setting status register by spl(9).
*/
_spllower(MIPS_INT_MASK_5);
+#error need fix
#else
/* enable all source forcing SOFT_INTs cleared */
- _splnone();
+ spl0();
#endif
}
diff -r 083ea3a8c4fe -r 0a7faf4fc936 sys/arch/arc/arc/bus_dma.c
--- a/sys/arch/arc/arc/bus_dma.c Sun Feb 20 07:51:21 2011 +0000
+++ b/sys/arch/arc/arc/bus_dma.c Sun Feb 20 07:52:42 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bus_dma.c,v 1.31 2010/11/12 13:18:56 uebayasi Exp $ */
+/* $NetBSD: bus_dma.c,v 1.32 2011/02/20 07:52:42 matt Exp $ */
/* NetBSD: bus_dma.c,v 1.20 2000/01/10 03:24:36 simonb Exp */
/*-
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.31 2010/11/12 13:18:56 uebayasi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.32 2011/02/20 07:52:42 matt Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -53,8 +53,6 @@
void *, bus_size_t, struct vmspace *, int, paddr_t *,
int *, int);
-extern paddr_t avail_start, avail_end; /* from pmap.c */
-
void
_bus_dma_tag_init(bus_dma_tag_t t)
{
@@ -405,6 +403,7 @@
_bus_dmamap_sync(bus_dma_tag_t t, bus_dmamap_t map, bus_addr_t offset,
bus_size_t len, int ops)
{
+ const struct mips_cache_info * const mci = &mips_cache_info;
bus_size_t minlen;
bus_addr_t addr, start, end, preboundary, firstboundary, lastboundary;
int i, useindex;
@@ -517,19 +516,19 @@
case BUS_DMASYNC_PREREAD:
end = start + minlen;
- preboundary = start & ~mips_dcache_align_mask;
- firstboundary = (start + mips_dcache_align_mask)
- & ~mips_dcache_align_mask;
- lastboundary = end & ~mips_dcache_align_mask;
+ preboundary = start & ~mci->mci_dcache_align_mask;
+ firstboundary = (start + mci->mci_dcache_align_mask)
+ & ~mci->mci_dcache_align_mask;
+ lastboundary = end & ~mci->mci_dcache_align_mask;
if (preboundary < start && preboundary < lastboundary)
mips_dcache_wbinv_range(preboundary,
- mips_dcache_align);
+ mci->mci_dcache_align);
if (firstboundary < lastboundary)
mips_dcache_inv_range(firstboundary,
lastboundary - firstboundary);
if (lastboundary < end)
mips_dcache_wbinv_range(lastboundary,
- mips_dcache_align);
+ mci->mci_dcache_align);
break;
case BUS_DMASYNC_PREWRITE:
@@ -555,7 +554,8 @@
{
return _bus_dmamem_alloc_range(t, size, alignment, boundary,
- segs, nsegs, rsegs, flags, avail_start, trunc_page(avail_end));
+ segs, nsegs, rsegs, flags, mips_avail_start,
+ trunc_page(mips_avail_end));
}
/*
@@ -575,7 +575,7 @@
/* Always round the size. */
size = round_page(size);
- high = avail_end - PAGE_SIZE;
+ high = mips_avail_end - PAGE_SIZE;
/*
* Allocate pages from the VM system.
@@ -599,7 +599,7 @@
for (; m != NULL; m = TAILQ_NEXT(m, pageq.queue)) {
curaddr = VM_PAGE_TO_PHYS(m);
#ifdef DIAGNOSTIC
- if (curaddr < avail_start || curaddr >= high) {
+ if (curaddr < mips_avail_start || curaddr >= high) {
printf("uvm_pglistalloc returned non-sensical"
" address 0x%llx\n", (long long)curaddr);
panic("_bus_dmamem_alloc_range");
diff -r 083ea3a8c4fe -r 0a7faf4fc936 sys/arch/arc/arc/bus_space_sparse.c
--- a/sys/arch/arc/arc/bus_space_sparse.c Sun Feb 20 07:51:21 2011 +0000
+++ b/sys/arch/arc/arc/bus_space_sparse.c Sun Feb 20 07:52:42 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bus_space_sparse.c,v 1.16 2009/11/07 07:27:41 cegger Exp $ */
+/* $NetBSD: bus_space_sparse.c,v 1.17 2011/02/20 07:52:42 matt Exp $ */
/* NetBSD: bus_machdep.c,v 1.1 2000/01/26 18:48:00 drochner Exp */
/*-
@@ -39,7 +39,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bus_space_sparse.c,v 1.16 2009/11/07 07:27:41 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bus_space_sparse.c,v 1.17 2011/02/20 07:52:42 matt Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -71,7 +71,7 @@
pte = kvtopte(start);
entry = pte->pt_entry & mask;
pte->pt_entry &= entry;
- MachTLBUpdate(start, entry);
+ tlb_update(start, entry);
}
}
diff -r 083ea3a8c4fe -r 0a7faf4fc936 sys/arch/arc/arc/c_magnum.c
--- a/sys/arch/arc/arc/c_magnum.c Sun Feb 20 07:51:21 2011 +0000
+++ b/sys/arch/arc/arc/c_magnum.c Sun Feb 20 07:52:42 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: c_magnum.c,v 1.20 2011/02/08 20:20:08 rmind Exp $ */
+/* $NetBSD: c_magnum.c,v 1.21 2011/02/20 07:52:42 matt Exp $ */
/* $OpenBSD: machdep.c,v 1.36 1999/05/22 21:22:19 weingart Exp $ */
/*
@@ -43,11 +43,14 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: c_magnum.c,v 1.20 2011/02/08 20:20:08 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: c_magnum.c,v 1.21 2011/02/20 07:52:42 matt Exp $");
+#define __INTR_PRIVATE
#include <sys/param.h>
#include <sys/systm.h>
+#include <sys/intr.h>
#include <sys/device.h>
+
#include <uvm/uvm_extern.h>
#include <machine/autoconf.h>
@@ -83,26 +86,20 @@
* This is a mask of bits to clear in the SR when we go to a
* given interrupt priority level.
*/
-static const uint32_t magnum_ipl_sr_bits[_IPL_N] = {
- [IPL_NONE] = 0,
- [IPL_SOFTCLOCK] =
- MIPS_SOFT_INT_MASK_0,
- [IPL_SOFTNET] =
- MIPS_SOFT_INT_MASK_0 | MIPS_SOFT_INT_MASK_1,
- [IPL_VM] =
- MIPS_SOFT_INT_MASK_0 | MIPS_SOFT_INT_MASK_1 |
- MIPS_INT_MASK_0 |
- MIPS_INT_MASK_1 |
- MIPS_INT_MASK_2 |
- MIPS_INT_MASK_3,
- [IPL_SCHED] =
- MIPS_SOFT_INT_MASK_0 | MIPS_SOFT_INT_MASK_1 |
- MIPS_INT_MASK_0 |
- MIPS_INT_MASK_1 |
- MIPS_INT_MASK_2 |
- MIPS_INT_MASK_3 |
- MIPS_INT_MASK_4 |
- MIPS_INT_MASK_5,
+static const struct ipl_sr_map magnum_ipl_sr_map = {
+ .sr_bits = {
+ [IPL_NONE] = 0,
+ [IPL_SOFTCLOCK] = MIPS_SOFT_INT_MASK_0,
+ [IPL_SOFTNET] = MIPS_SOFT_INT_MASK,
+ [IPL_VM] = MIPS_SOFT_INT_MASK
+ | MIPS_INT_MASK_0
+ | MIPS_INT_MASK_1
+ | MIPS_INT_MASK_2
+ | MIPS_INT_MASK_3,
+ [IPL_SCHED] = MIPS_INT_MASK,
+ [IPL_DDB] = MIPS_INT_MASK,
+ [IPL_HIGH] = MIPS_INT_MASK,
+ },
};
uint32_t
@@ -193,7 +190,7 @@
/*
* Initialize interrupt priority
*/
- ipl_sr_bits = magnum_ipl_sr_bits;
+ ipl_sr_map = magnum_ipl_sr_map;
/*
* Initialize I/O address offset
diff -r 083ea3a8c4fe -r 0a7faf4fc936 sys/arch/arc/arc/c_nec_eisa.c
--- a/sys/arch/arc/arc/c_nec_eisa.c Sun Feb 20 07:51:21 2011 +0000
+++ b/sys/arch/arc/arc/c_nec_eisa.c Sun Feb 20 07:52:42 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: c_nec_eisa.c,v 1.15 2008/05/14 13:29:27 tsutsui Exp $ */
+/* $NetBSD: c_nec_eisa.c,v 1.16 2011/02/20 07:52:42 matt Exp $ */
/*-
* Copyright (c) 2003 Izumi Tsutsui. All rights reserved.
@@ -55,12 +55,15 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: c_nec_eisa.c,v 1.15 2008/05/14 13:29:27 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: c_nec_eisa.c,v 1.16 2011/02/20 07:52:42 matt Exp $");
+#define __INTR_PRIVATE
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/kcore.h>
#include <sys/device.h>
+#include <sys/intr.h>
+
#include <uvm/uvm_extern.h>
#include <machine/autoconf.h>
@@ -103,25 +106,19 @@
* This is a mask of bits to clear in the SR when we go to a
* given interrupt priority level.
*/
-static const uint32_t nec_eisa_ipl_sr_bits[_IPL_N] = {
- [IPL_NONE] = 0,
- [IPL_SOFTCLOCK] =
- MIPS_SOFT_INT_MASK_0,
- [IPL_SOFTNET] =
- MIPS_SOFT_INT_MASK_0 | MIPS_SOFT_INT_MASK_1,
- [IPL_VM] =
- MIPS_SOFT_INT_MASK_0 | MIPS_SOFT_INT_MASK_1 |
- MIPS_INT_MASK_0 |
- MIPS_INT_MASK_1 |
- MIPS_INT_MASK_2,
- [IPL_SCHED] =
- MIPS_SOFT_INT_MASK_0 | MIPS_SOFT_INT_MASK_1 |
- MIPS_INT_MASK_0 |
- MIPS_INT_MASK_1 |
- MIPS_INT_MASK_2 |
- MIPS_INT_MASK_3 |
- MIPS_INT_MASK_4 |
- MIPS_INT_MASK_5,
+static const struct ipl_sr_map nec_eisa_ipl_sr_map = {
+ .sr_bits = {
+ [IPL_NONE] = 0,
+ [IPL_SOFTCLOCK] = MIPS_SOFT_INT_MASK_0,
+ [IPL_SOFTNET] = MIPS_SOFT_INT_MASK,
+ [IPL_VM] = MIPS_SOFT_INT_MASK
+ | MIPS_INT_MASK_0
+ | MIPS_INT_MASK_1
+ | MIPS_INT_MASK_2,
+ [IPL_SCHED] = MIPS_INT_MASK,
+ [IPL_DDB] = MIPS_INT_MASK,
+ [IPL_HIGH] = MIPS_INT_MASK,
+ },
};
int
@@ -161,7 +158,7 @@
/*
* Initialize interrupt priority
*/
- ipl_sr_bits = nec_eisa_ipl_sr_bits;
+ ipl_sr_map = nec_eisa_ipl_sr_map;
/*
* Initialize I/O address offset
diff -r 083ea3a8c4fe -r 0a7faf4fc936 sys/arch/arc/arc/c_nec_pci.c
--- a/sys/arch/arc/arc/c_nec_pci.c Sun Feb 20 07:51:21 2011 +0000
+++ b/sys/arch/arc/arc/c_nec_pci.c Sun Feb 20 07:52:42 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: c_nec_pci.c,v 1.17 2007/12/03 15:33:13 ad Exp $ */
Home |
Main Index |
Thread Index |
Old Index