Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 26 Dec 2007 22:06:19 GMT
From:      John Birrell <jb@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 131730 for review
Message-ID:  <200712262206.lBQM6JgR078117@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=131730

Change 131730 by jb@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 */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200712262206.lBQM6JgR078117>