Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/alpha/pci The tsc(4) bus initialization was using a...
details: https://anonhg.NetBSD.org/src/rev/5cfb4c9b66f3
branches: trunk
changeset: 748662:5cfb4c9b66f3
user: mhitch <mhitch%NetBSD.org@localhost>
date: Fri Oct 30 18:55:45 2009 +0000
description:
The tsc(4) bus initialization was using a single statically allocated
extent storage for each tsp(4), which caused a LOCKDEBUG kernel to fail
because the extent storage contained a mutex which panics when the second
mutex_init() is attempted. Put the extent storage into the tsp_config
structure so each tsp(4) gets it own. Fixes PR port-alpha/38358.
diffstat:
sys/arch/alpha/pci/tsp_bus_io.c | 6 ++++--
sys/arch/alpha/pci/tsp_bus_mem.c | 7 +++++--
sys/arch/alpha/pci/tsvar.h | 6 +++++-
3 files changed, 14 insertions(+), 5 deletions(-)
diffs (82 lines):
diff -r 5da6d9574c5b -r 5cfb4c9b66f3 sys/arch/alpha/pci/tsp_bus_io.c
--- a/sys/arch/alpha/pci/tsp_bus_io.c Fri Oct 30 17:18:51 2009 +0000
+++ b/sys/arch/alpha/pci/tsp_bus_io.c Fri Oct 30 18:55:45 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tsp_bus_io.c,v 1.5 2000/06/29 08:58:50 mrg Exp $ */
+/* $NetBSD: tsp_bus_io.c,v 1.6 2009/10/30 18:55:45 mhitch Exp $ */
/*-
* Copyright (c) 1999 by Ross Harvey. All rights reserved.
@@ -33,7 +33,7 @@
#include <sys/cdefs.h>
-__KERNEL_RCSID(1, "$NetBSD: tsp_bus_io.c,v 1.5 2000/06/29 08:58:50 mrg Exp $");
+__KERNEL_RCSID(1, "$NetBSD: tsp_bus_io.c,v 1.6 2009/10/30 18:55:45 mhitch Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -58,6 +58,8 @@
#define CHIP_EX_MALLOC_SAFE(v) (((TSPCON)(v))->pc_mallocsafe)
#define CHIP_IO_EXTENT(v) (((TSPCON)(v))->pc_io_ex)
+#define CHIP_IO_EX_STORE(v) (((TSPCON)(v))->pc_io_exstorage)
+#define CHIP_IO_EX_STORE_SIZE(v) (sizeof (((TSPCON)(v))->pc_io_exstorage))
#define CHIP_IO_SYS_START(v) (((TSPCON)(v))->pc_iobase | P_PCI_IO)
diff -r 5da6d9574c5b -r 5cfb4c9b66f3 sys/arch/alpha/pci/tsp_bus_mem.c
--- a/sys/arch/alpha/pci/tsp_bus_mem.c Fri Oct 30 17:18:51 2009 +0000
+++ b/sys/arch/alpha/pci/tsp_bus_mem.c Fri Oct 30 18:55:45 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tsp_bus_mem.c,v 1.8 2005/12/11 12:16:17 christos Exp $ */
+/* $NetBSD: tsp_bus_mem.c,v 1.9 2009/10/30 18:55:45 mhitch Exp $ */
/*-
* Copyright (c) 1999 by Ross Harvey. All rights reserved.
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tsp_bus_mem.c,v 1.8 2005/12/11 12:16:17 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tsp_bus_mem.c,v 1.9 2009/10/30 18:55:45 mhitch Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -55,6 +55,9 @@
#define CHIP_EX_MALLOC_SAFE(v) (((struct tsp_config *)(v))->pc_mallocsafe)
#define CHIP_MEM_EXTENT(v) (((struct tsp_config *)(v))->pc_mem_ex)
+#define CHIP_MEM_EX_STORE(v) (((struct tsp_config *)(v))->pc_mem_exstorage)
+#define CHIP_MEM_EX_STORE_SIZE(v) \
+ (sizeof (((struct tsp_config *)(v))->pc_mem_exstorage))
#define CHIP_MEM_SYS_START(v) (((struct tsp_config *)(v))->pc_iobase)
diff -r 5da6d9574c5b -r 5cfb4c9b66f3 sys/arch/alpha/pci/tsvar.h
--- a/sys/arch/alpha/pci/tsvar.h Fri Oct 30 17:18:51 2009 +0000
+++ b/sys/arch/alpha/pci/tsvar.h Fri Oct 30 18:55:45 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tsvar.h,v 1.6 2009/03/14 14:45:53 dsl Exp $ */
+/* $NetBSD: tsvar.h,v 1.7 2009/10/30 18:55:45 mhitch Exp $ */
/*-
* Copyright (c) 1999 by Ross Harvey. All rights reserved.
@@ -35,6 +35,8 @@
#include <dev/pci/pcivar.h>
#include <alpha/pci/pci_sgmap_pte64.h>
+#define _FSTORE (EXTENT_FIXED_STORAGE_SIZE(8) / sizeof(long))
+
#define tsvar() { Generate ctags(1) key. }
struct tsc_softc {
@@ -58,6 +60,8 @@
u_int32_t pc_hae_mem;
u_int32_t pc_hae_io;
+ long pc_io_exstorage[_FSTORE];
+ long pc_mem_exstorage[_FSTORE];
struct extent *pc_io_ex, *pc_mem_ex;
int pc_mallocsafe;
};
Home |
Main Index |
Thread Index |
Old Index