PERFORCE change 135941 for review
Marcel Moolenaar
marcel at FreeBSD.org
Fri Feb 22 05:31:35 UTC 2008
http://perforce.freebsd.org/chv.cgi?CH=135941
Change 135941 by marcel at marcel_xcllnt on 2008/02/22 05:31:11
Unify <machine/kdb.h>
Simply stop using an inline function and instead put
the prototype in the header. The implementation has
been moved to machdep.c.
Affected files ...
.. //depot/projects/e500/sys/powerpc/aim/machdep.c#9 edit
.. //depot/projects/e500/sys/powerpc/booke/machdep.c#11 edit
.. //depot/projects/e500/sys/powerpc/include/kdb.h#4 edit
Differences ...
==== //depot/projects/e500/sys/powerpc/aim/machdep.c#9 (text+ko) ====
@@ -107,6 +107,7 @@
#include <machine/cpu.h>
#include <machine/elf.h>
#include <machine/fpu.h>
+#include <machine/kdb.h>
#include <machine/md_var.h>
#include <machine/metadata.h>
#include <machine/mmuvar.h>
@@ -897,6 +898,20 @@
return (0);
}
+void
+kdb_cpu_clear_singlestep(void)
+{
+
+ kdb_frame->srr1 &= ~PSL_SE;
+}
+
+void
+kdb_cpu_set_singlestep(void)
+{
+
+ kdb_frame->srr1 |= PSL_SE;
+}
+
/*
* Initialise a struct pcpu.
*/
==== //depot/projects/e500/sys/powerpc/booke/machdep.c#11 (text+ko) ====
@@ -119,6 +119,7 @@
#include <vm/vm_pager.h>
#include <machine/cpu.h>
+#include <machine/kdb.h>
#include <machine/reg.h>
#include <machine/vmparam.h>
#include <machine/spr.h>
@@ -785,6 +786,26 @@
}
void
+kdb_cpu_clear_singlestep(void)
+{
+ register_t r;
+
+ r = mfspr(SPR_DBCR0);
+ mtspr(SPR_DBCR0, r & ~DBCR0_IC);
+ kdb_frame->srr1 &= ~PSL_DE;
+}
+
+void
+kdb_cpu_set_singlestep(void)
+{
+ register_t r;
+
+ r = mfspr(SPR_DBCR0);
+ mtspr(SPR_DBCR0, r | DBCR0_IC | DBCR0_IDM);
+ kdb_frame->srr1 |= PSL_DE;
+}
+
+void
sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask)
{
struct trapframe *tf;
==== //depot/projects/e500/sys/powerpc/include/kdb.h#4 (text+ko) ====
@@ -35,43 +35,13 @@
#include <machine/psl.h>
#include <machine/spr.h>
-static __inline void
-kdb_cpu_clear_singlestep(void)
-{
-#ifdef E500
- u_int value;
-
- value = mfspr(SPR_DBCR0);
+void kdb_cpu_clear_singlestep(void);
+void kdb_cpu_set_singlestep(void);
- value &= ~DBCR0_IC;
- mtspr(SPR_DBCR0, value);
- kdb_frame->srr1 &= ~PSL_DE;
-#else
- kdb_frame->srr1 &= ~PSL_SE;
-#endif
-}
-
static __inline void
-kdb_cpu_set_singlestep(void)
+kdb_cpu_sync_icache(unsigned char *addr, size_t size)
{
-#ifdef E500
- u_int value;
- u_int msr_value;
-
- value = mfspr(SPR_DBCR0);
- value = value | DBCR0_IC | DBCR0_IDM;
- mtspr(SPR_DBCR0, value);
-
- msr_value = mfmsr();
- kdb_frame->srr1 |= PSL_DE;
-#else
- kdb_frame->srr1 |= PSL_SE;
-#endif
-}
-static __inline void
-kdb_cpu_sync_icache(unsigned char *addr, size_t size)
-{
__syncicache(addr, size);
}
More information about the p4-projects
mailing list