Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 3 Jun 2009 19:03:37 GMT
From:      Arnar Mar Sig <antab@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 163436 for review
Message-ID:  <200906031903.n53J3bsT007745@repoman.freebsd.org>

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

Change 163436 by antab@antab_farm on 2009/06/03 19:03:35

	* Handle ast after long tlb miss
	* Implement cpu_throw()

Affected files ...

.. //depot/projects/avr32/src/sys/avr32/avr32/exception.S#14 edit
.. //depot/projects/avr32/src/sys/avr32/avr32/vm_machdep.c#12 edit

Differences ...

==== //depot/projects/avr32/src/sys/avr32/avr32/exception.S#14 (text+ko) ====

@@ -177,6 +177,7 @@
 	mov	r11, sp
 	csrf	AT32_SYS_SR_EM				/* Enable exceptions */
 	rcall   trap
+	rcall	handle_ast
 	POP_TLB_TRAPFRAME(EX)
 	rete
 

==== //depot/projects/avr32/src/sys/avr32/avr32/vm_machdep.c#12 (text+ko) ====

@@ -220,8 +220,18 @@
 void
 cpu_throw(struct thread *old, struct thread *new)
 {
-	avr32_impl();
-	panic("cpu_throw returns");
+	register_t sr;
+	pmap_t pmap;
+
+	sr = intr_disable();
+
+	PCPU_SET(curthread, new);
+	PCPU_SET(curpcb, curthread->td_pcb);
+	pmap = vmspace_pmap(new->td_proc->p_vmspace);
+	pmap_activate(new);
+
+	restorectx(new, pmap, sr);
+	panic("cpu_throw: restorectx() returned");
 }
 
 void



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