PERFORCE change 131730 for review
John Birrell
jb at FreeBSD.org
Wed Dec 26 14:06:20 PST 2007
http://perforce.freebsd.org/chv.cgi?CH=131730
Change 131730 by jb at jb_freebsd1 on 2007/12/26 22:05:36
Use mp_maxid instead of MAXCPU.
Enable firing the cyclics now with a check that the cyclic has
actually initialised (cpu_cyclic != NULL).
Affected files ...
.. //depot/projects/dtrace/src/sys/cddl/kern/kern_cyclic.c#7 edit
Differences ...
==== //depot/projects/dtrace/src/sys/cddl/kern/kern_cyclic.c#7 (text+ko) ====
@@ -43,8 +43,10 @@
* that the asserts work. On FreeBSD, if a CPU exists, it is
* enabled.
*/
- for (i = 0; i < MAXCPU; i++)
+ for (i = 0; i <= mp_maxid; i++) {
+ cyclic_cpu[i].cpuid = i;
cyclic_cpu[i].cpu_flags &= CPU_ENABLE;
+ }
/* Initialise the machine-dependent backend. */
cyclic_machdep_init();
@@ -78,14 +80,14 @@
{
cpu_t *c = &cyclic_cpu[curcpu];
- c->cpu_intr_actv |= (1 << CY_HIGH_LEVEL);
+ if (c->cpu_cyclic != NULL) {
+ c->cpu_intr_actv |= (1 << CY_HIGH_LEVEL);
-#ifdef DOODAD
- /* Fire any timers that are due. */
- cyclic_fire(c);
-#endif
+ /* Fire any timers that are due. */
+ cyclic_fire(c);
- c->cpu_intr_actv &= ~(1 << CY_HIGH_LEVEL);
+ c->cpu_intr_actv &= ~(1 << CY_HIGH_LEVEL);
+ }
}
/* ARGSUSED */
More information about the p4-projects
mailing list