Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-9]: src/sys/arch/alpha/alpha Pull up following revision(s) (reque...
details: https://anonhg.NetBSD.org/src/rev/a61b3d19ff00
branches: netbsd-9
changeset: 937981:a61b3d19ff00
user: martin <martin%NetBSD.org@localhost>
date: Sat Aug 29 17:02:36 2020 +0000
description:
Pull up following revision(s) (requested by thorpej in ticket #1069):
sys/arch/alpha/alpha/prom.c: revision 1.52
Make sure init_prom_interface() only runs once, otherwise we initialize
a mutex twice, and that upsets LOCKDEBUG. But instead of seeing a
proper message about it, the output happens before the PROM console
interfcace is initialized, we would end up with a translation fault
back into SRM.
diffstat:
sys/arch/alpha/alpha/prom.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diffs (38 lines):
diff -r 511de1287f31 -r a61b3d19ff00 sys/arch/alpha/alpha/prom.c
--- a/sys/arch/alpha/alpha/prom.c Sat Aug 29 17:00:28 2020 +0000
+++ b/sys/arch/alpha/alpha/prom.c Sat Aug 29 17:02:36 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: prom.c,v 1.50 2018/09/03 16:29:22 riastradh Exp $ */
+/* $NetBSD: prom.c,v 1.50.4.1 2020/08/29 17:02:36 martin Exp $ */
/*
* Copyright (c) 1992, 1994, 1995, 1996 Carnegie Mellon University
@@ -27,7 +27,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: prom.c,v 1.50 2018/09/03 16:29:22 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: prom.c,v 1.50.4.1 2020/08/29 17:02:36 martin Exp $");
#include "opt_multiprocessor.h"
@@ -78,6 +78,11 @@
void
init_prom_interface(struct rpb *rpb)
{
+ static bool prom_interface_initialized;
+
+ if (prom_interface_initialized)
+ return;
+
struct crb *c;
c = (struct crb *)((char *)rpb + rpb->rpb_crb_off);
@@ -86,6 +91,7 @@
prom_dispatch_v.routine = c->crb_v_dispatch->entry_va;
mutex_init(&prom_lock, MUTEX_DEFAULT, IPL_HIGH);
+ prom_interface_initialized = true;
}
void
Home |
Main Index |
Thread Index |
Old Index