PERFORCE change 97823 for review
Kip Macy
kmacy at FreeBSD.org
Thu May 25 14:00:21 PDT 2006
http://perforce.freebsd.org/chv.cgi?CH=97823
Change 97823 by kmacy at kmacy_storage:sun4v_work on 2006/05/25 20:57:30
only print total number of CPUS on startup
shorten AP string
don't repeatedly print out device info for pci bus on SUN4V
Affected files ...
.. //depot/projects/kmacy_sun4v/src/sys/kern/subr_bus.c#7 edit
.. //depot/projects/kmacy_sun4v/src/sys/sun4v/sun4v/mp_machdep.c#8 edit
Differences ...
==== //depot/projects/kmacy_sun4v/src/sys/kern/subr_bus.c#7 (text+ko) ====
@@ -28,6 +28,7 @@
__FBSDID("$FreeBSD: src/sys/kern/subr_bus.c,v 1.191 2006/04/20 01:44:16 jmg Exp $");
#include "opt_bus.h"
+#include "opt_global.h"
#include <sys/param.h>
#include <sys/conf.h>
@@ -3460,14 +3461,17 @@
flags &= ~INTR_MPSAFE;
error = BUS_SETUP_INTR(dev->parent, dev, r, flags,
handler, arg, cookiep);
+#ifndef SUN4V
if (error == 0) {
if (!(flags & (INTR_MPSAFE | INTR_FAST)))
device_printf(dev, "[GIANT-LOCKED]\n");
if (bootverbose && (flags & INTR_MPSAFE))
device_printf(dev, "[MPSAFE]\n");
+
if (flags & INTR_FAST)
device_printf(dev, "[FAST]\n");
}
+#endif
} else
error = EINVAL;
return (error);
==== //depot/projects/kmacy_sun4v/src/sys/sun4v/sun4v/mp_machdep.c#8 (text+ko) ====
@@ -184,32 +184,7 @@
{
return (mp_maxid > 0);
}
-#if 0
-static void
-start_ap(phandle_t cpu, void *func, u_long arg)
-{
- static struct {
- cell_t name;
- cell_t nargs;
- cell_t nreturns;
- cell_t cpu;
- cell_t func;
- cell_t arg;
- } args = {
- (cell_t)"SUNW,start-cpu",
- 3,
- 0,
- 0,
- 0,
- 0
- };
- args.cpu = cpu;
- args.func = (cell_t)func;
- args.arg = (cell_t)arg;
- openfirmware(&args);
-}
-#else
static int
start_ap_bycpuid(int cpuid, void *func, u_long arg)
{
@@ -238,29 +213,7 @@
return (int)args.result;
}
-#endif
-/*
- * Stop the calling CPU.
- */
-static void
-sun4u_stopself(void)
-{
-#if 0
- static struct {
- cell_t name;
- cell_t nargs;
- cell_t nreturns;
- } args = {
- (cell_t)"SUNW,stop-self",
- 0,
- 0,
- };
- openfirmware_exit(&args);
-#endif
- panic("sun4u_stopself: failed.");
-}
-
/*
* Fire up any non-boot processors.
*/
@@ -304,11 +257,7 @@
mp_ncpus = cpuid + 1;
#if 0
cpu_identify(0, clock, cpuid);
-#else
- printf("cpu%d: UltraSparc T1 Processor (%d.%02d MHz CPU)\n", cpuid,
- (clock + 4999) / 1000000, ((clock + 4999) / 10000) % 100);
#endif
-
va = kmem_alloc(kernel_map, PCPU_PAGES * PAGE_SIZE);
pc = (struct pcpu *)(va + (PCPU_PAGES * PAGE_SIZE)) - 1;
pcpu_init(pc, cpuid, sizeof(*pc));
@@ -320,6 +269,9 @@
if (mp_ncpus == MAXCPU)
break;
}
+ printf("%d cpus: UltraSparc T1 Processor (%d.%02d MHz CPU)\n", mp_ncpus,
+ (clock + 4999) / 1000000, ((clock + 4999) / 10000) % 100);
+
PCPU_SET(other_cpus, all_cpus & ~(1 << PCPU_GET(cpuid)));
smp_active = 1;
}
@@ -385,7 +337,7 @@
smp_cpus++;
KASSERT(curthread != NULL, ("cpu_mp_bootstrap: curthread"));
PCPU_SET(other_cpus, all_cpus & ~(1 << PCPU_GET(cpuid)));
- printf("SMP: AP CPU #%d Launched!\n", PCPU_GET(cpuid));
+ printf("AP: #%d\n", PCPU_GET(cpuid));
csa->csa_count--;
membar(StoreLoad);
csa->csa_state = CPU_BOOTSTRAP;
@@ -437,7 +389,7 @@
while ((started_cpus & PCPU_GET(cpumask)) == 0) {
if ((shutdown_cpus & PCPU_GET(cpumask)) != 0) {
atomic_clear_int(&shutdown_cpus, PCPU_GET(cpumask));
- sun4u_stopself();
+ OF_exit();
}
}
atomic_clear_rel_int(&started_cpus, PCPU_GET(cpumask));
@@ -495,7 +447,6 @@
if (error)
panic("can't handle error %d from cpu_mondo_send\n", error);
}
-
}
More information about the p4-projects
mailing list