Author: marcel
Date: Sun Mar 16 22:56:22 2014
New Revision: 263254
URL: http://svnweb.freebsd.org/changeset/base/263254

Log:
  Move the implementation of kdb_cpu_trap() from <machine/kdb.h> to
  machdep.c. This makes it easier to add conditional code based on
  options.

Modified:
  head/sys/ia64/ia64/machdep.c
  head/sys/ia64/include/kdb.h

Modified: head/sys/ia64/ia64/machdep.c
==============================================================================
--- head/sys/ia64/ia64/machdep.c        Sun Mar 16 21:57:05 2014        
(r263253)
+++ head/sys/ia64/ia64/machdep.c        Sun Mar 16 22:56:22 2014        
(r263254)
@@ -86,6 +86,7 @@ __FBSDID("$FreeBSD$");
 #include <machine/elf.h>
 #include <machine/fpu.h>
 #include <machine/intr.h>
+#include <machine/kdb.h>
 #include <machine/mca.h>
 #include <machine/md_var.h>
 #include <machine/pal.h>
@@ -562,6 +563,18 @@ spinlock_exit(void)
 }
 
 void
+kdb_cpu_trap(int vector, int code __unused)
+{
+
+       __asm __volatile("flushrs;;");
+
+       /* Restart after the break instruction. */
+       if (vector == IA64_VEC_BREAK &&
+           kdb_frame->tf_special.ifa == IA64_FIXED_BREAK)
+               kdb_frame->tf_special.psr += IA64_PSR_RI_1;
+}
+
+void
 map_vhpt(uintptr_t vhpt)
 {
        pt_entry_t pte;

Modified: head/sys/ia64/include/kdb.h
==============================================================================
--- head/sys/ia64/include/kdb.h Sun Mar 16 21:57:05 2014        (r263253)
+++ head/sys/ia64/include/kdb.h Sun Mar 16 22:56:22 2014        (r263254)
@@ -35,6 +35,8 @@
 
 #define        KDB_STOPPEDPCB(pc)      (&(pc)->pc_md.pcb)
 
+void kdb_cpu_trap(int, int);
+
 static __inline void
 kdb_cpu_clear_singlestep(void)
 {
@@ -62,14 +64,4 @@ kdb_cpu_sync_icache(unsigned char *addr,
        }
 }
 
-static __inline void
-kdb_cpu_trap(int vector, int _)
-{
-       __asm __volatile("flushrs;;");
-
-       if (vector == IA64_VEC_BREAK &&
-           kdb_frame->tf_special.ifa == IA64_FIXED_BREAK)
-                kdb_frame->tf_special.psr += IA64_PSR_RI_1;
-}
-
 #endif /* _MACHINE_KDB_H_ */
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to