PERFORCE change 230523 for review

Brooks Davis brooks at FreeBSD.org
Wed Jul 3 22:30:39 UTC 2013


http://p4web.freebsd.org/@@230523?ac=10

Change 230523 by brooks at brooks_zenith on 2013/07/03 22:30:08

	Disable output when setting up interrupts.  It seems we can't
	print on the second thread when setting up IPIs.
	
	A bit of other tidying.

Affected files ...

.. //depot/projects/ctsrd/beribsd/src/sys/mips/beri/beri_pic.c#7 edit

Differences ...

==== //depot/projects/ctsrd/beribsd/src/sys/mips/beri/beri_pic.c#7 (text+ko) ====

@@ -218,7 +218,9 @@
 static void
 bp_config_source(device_t ic, int src, int enable, u_long tid, u_long irq)
 {
+#if 0
 	char configstr[64];
+#endif
 	struct beripic_softc *sc;
 	uint64_t config;
 
@@ -229,9 +231,12 @@
 	config |= tid << BP_CFG_SHIFT_TID;
 	config |= irq << BP_CFG_SHIFT_IRQ;
 
-	if (bootverbose)
+#if 0
+	/* There is not valid console when doing IPI setup on APs */
+	if (bootverbose && (tid == 0 || !cold))
 		device_printf(ic, "src %d: %s\n", src,
 		    bp_strconfig(config, configstr, sizeof(configstr)));
+#endif
 	bp_write_cfg(sc, src, config);
 }
 
@@ -552,12 +557,14 @@
 	if (error != 0)
 		goto err;
 
+#ifdef NOTYET
 #ifdef SMP
 	/* XXX: bind ithread to cpu */
 	sc->bp_next_tid++;
 	if (sc->bp_next_tid >= sc->bp_nthreads)
 		sc->bp_next_tid = 0;
 #endif
+#endif
 	if (sc->bp_next_tid == 0) {
 		sc->bp_next_irq++;
 		if (sc->bp_next_irq >= sc->bp_nirqs)
@@ -650,7 +657,7 @@
 
 	bit = 1ULL << (tid % 64);
 	bus_space_write_8(sc->bp_set_bst, sc->bp_set_bsh, 
-	    BP_FIRST_SOFT / 8 + (tid >> 6), bit);
+	    (BP_FIRST_SOFT / 8) + (tid / 64), bit);
 }
 
 static void
@@ -665,7 +672,7 @@
 
 	bit = 1ULL << (tid % 64);
 	bus_space_write_8(sc->bp_clear_bst, sc->bp_clear_bsh, 
-	    BP_FIRST_SOFT / 8 + (tid >> 6), bit);
+	    (BP_FIRST_SOFT / 8) + (tid / 64), bit);
 }
 #endif
 


More information about the p4-projects mailing list