Commits

Anonymous committed 4207c7b

daily push: Tue Jun 21 07:00:04 CET 2011

  • Participants
  • Parent commits 76d5b32

Comments (0)

Files changed (8)

File src/9kron/k8/acore.c

 
 	n = nil;
 
-	pmcupdate(m);
+	_pmcupdate(m);
 	if(m->proc != nil){
 		m->proc->nactrap++;
 		m->proc->actime1 = fastticks(nil);
 	memmove(m->proc->dbgreg, u, sizeof *u);
 	m->icc->note = n;
 	fpuprocsave(m->proc);
-	pmcupdate(m);
+	_pmcupdate(m);
 	mfence();
 	m->icc->fn = nil;
 	ready(m->proc);

File src/9kron/k8/trap.c

 	intrtimes[vno][diff]++;
 }
 
+static void
+pmcnop(Mach *)
+{
+}
+
+void (*_pmcupdate)(Mach *m) = pmcnop;
+
 /* go to user space */
 void
 kexit(Ureg*)
 		mp = m;
 	tos->core = mp->machno;	
 	tos->nixtype = mp->nixtype;
-	pmcupdate(m);	
+	_pmcupdate(m);	
 	/*
 	 * The process may change its core.
 	 * Be sure it has the right cyclefreq.
 	clockintr = 0;
 
 
-	pmcupdate(m);
+	_pmcupdate(m);
 
 	vno = ureg->type;
 	if(ctl = vctl[vno]){

File src/9kron/port/devpmc.c

 	int i, j, ncores, nr;
 	Mach *mp;
 
+	_pmcupdate = pmcupdate;
 	ncores = 0;
 	nr = pmcnregs();
 	for(i = 0; i < MACHMAX; i++) {

File src/9kron/port/pmc.h

 int		pmcsetctr(u32int coreno, u64int v, u32int regno);
 
 void		pmcupdate(Mach *m);
+extern	void (*_pmcupdate)(Mach *m);

File src/9kron2/k8/acore.c

 
 	n = nil;
 
-	pmcupdate(m);
+	_pmcupdate(m);
 	if(m->proc != nil){
 		m->proc->nactrap++;
 		m->proc->actime1 = fastticks(nil);
 	memmove(m->proc->dbgreg, u, sizeof *u);
 	m->icc->note = n;
 	fpuprocsave(m->proc);
-	pmcupdate(m);
+	_pmcupdate(m);
 	mfence();
 	m->icc->fn = nil;
 	ready(m->proc);

File src/9kron2/k8/trap.c

 	intrtimes[vno][diff]++;
 }
 
+static void
+pmcnop(Mach *)
+{
+}
+
+void (*_pmcupdate)(Mach *m) = pmcnop;
+
 /* go to user space */
 void
 kexit(Ureg*)
 		mp = m;
 	tos->core = mp->machno;	
 	tos->nixtype = mp->nixtype;
-	pmcupdate(m);	
+	_pmcupdate(m);	
 	/*
 	 * The process may change its core.
 	 * Be sure it has the right cyclefreq.
 	if(up != nil)
 		up->ntrap++;	/* stats only, races ok */
 
-	pmcupdate(m);
+	_pmcupdate(m);
 
 	vno = ureg->type;
 	if(ctl = vctl[vno]){

File src/9kron2/port/devpmc.c

 	int i, j, ncores, nr;
 	Mach *mp;
 
+	_pmcupdate = pmcupdate;
 	ncores = 0;
 	nr = pmcnregs();
 	for(i = 0; i < MACHMAX; i++) {

File src/9kron2/port/pmc.h

 int		pmcsetctr(u32int coreno, u64int v, u32int regno);
 
 void		pmcupdate(Mach *m);
+extern	void (*_pmcupdate)(Mach *m);