Module Name:    src
Committed By:   soren
Date:           Tue Jul 23 07:40:38 UTC 2013

Modified Files:
        src/sys/dev/pci: puc.c

Log Message:
Restrict the hack for offset BAR's to x86.
A cleaner fix requires a rewrite of puc.c, but not today.


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/sys/dev/pci/puc.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/dev/pci/puc.c
diff -u src/sys/dev/pci/puc.c:1.35 src/sys/dev/pci/puc.c:1.36
--- src/sys/dev/pci/puc.c:1.35	Mon Jul 22 14:52:02 2013
+++ src/sys/dev/pci/puc.c	Tue Jul 23 07:40:38 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: puc.c,v 1.35 2013/07/22 14:52:02 soren Exp $	*/
+/*	$NetBSD: puc.c,v 1.36 2013/07/23 07:40:38 soren Exp $	*/
 
 /*
  * Copyright (c) 1996, 1998, 1999
@@ -53,7 +53,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: puc.c,v 1.35 2013/07/22 14:52:02 soren Exp $");
+__KERNEL_RCSID(0, "$NetBSD: puc.c,v 1.36 2013/07/23 07:40:38 soren Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -265,9 +265,11 @@ puc_attach(device_t parent, device_t sel
 		    sc->sc_bar_mappings[barindex].a +
 		    sc->sc_desc->ports[i].offset, &subregion_handle);
 		if (is_console) {
-                        sc->sc_bar_mappings[barindex].mapped = 1;
-                       	sc->sc_bar_mappings[barindex].h = subregion_handle -
+			sc->sc_bar_mappings[barindex].mapped = 1;
+#if defined(amd64) || defined(i386)
+			sc->sc_bar_mappings[barindex].h = subregion_handle -
 			    sc->sc_desc->ports[i].offset;	/* XXX hack */
+#endif
 		}
 #endif
 		if (!sc->sc_bar_mappings[barindex].mapped) {

Reply via email to