Module Name:    src
Committed By:   skrll
Date:           Thu May  7 09:56:50 UTC 2009

Modified Files:
        src/sys/arch/hp700/dev: astro.c

Log Message:
Wrap PAGE0 access with hp700_pagezero_{,un}map


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/hp700/dev/astro.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/hp700/dev/astro.c
diff -u src/sys/arch/hp700/dev/astro.c:1.2 src/sys/arch/hp700/dev/astro.c:1.3
--- src/sys/arch/hp700/dev/astro.c:1.2	Thu Apr 30 07:03:12 2009
+++ src/sys/arch/hp700/dev/astro.c	Thu May  7 09:56:50 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: astro.c,v 1.2 2009/04/30 07:03:12 skrll Exp $	*/
+/*	$NetBSD: astro.c,v 1.3 2009/05/07 09:56:50 skrll Exp $	*/
 
 /*	$OpenBSD: astro.c,v 1.8 2007/10/06 23:50:54 krw Exp $	*/
 
@@ -34,6 +34,7 @@
 #include <machine/endian.h>
 
 #include <hp700/dev/cpudevs.h>
+#include <hp700/hp700/machdep.h>
 
 struct astro_regs {
 	uint32_t	rid;
@@ -234,6 +235,7 @@
 	struct vm_page *m;
 	struct pglist mlist;
 	int iova_bits;
+	int pagezero_cookie;
 
 	sc->sc_dmat = ca->ca_dmatag;
 	if (bus_space_map(ca->ca_iot, ca->ca_hpa, sizeof(struct astro_regs),
@@ -306,8 +308,10 @@
 	 * will stop working if we do.  This is fine since the serial port
 	 * doesn't do DMA.
 	 */
+	pagezero_cookie = hp700_pagezero_map();
 	if (PAGE0->mem_cons.pz_class != PCL_DUPLEX)
 		pdc_call((iodcio_t)pdc, 0, PDC_IO, PDC_IO_RESET_DEVICES);
+	hp700_pagezero_unmap(pagezero_cookie);
 
 	/* Enable iova space. */
 	r->tlb_ibase = htole32(1);

Reply via email to