Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/powerpc/powerpc Add missing <powerpc/FOO/spr.h> to ...



details:   https://anonhg.NetBSD.org/src/rev/ec166eba3488
branches:  trunk
changeset: 752652:ec166eba3488
user:      matt <matt%NetBSD.org@localhost>
date:      Tue Mar 02 21:53:20 2010 +0000

description:
Add missing <powerpc/FOO/spr.h> to a few files missed on the first pass.

diffstat:

 sys/arch/powerpc/powerpc/kgdb_machdep.c |  31 +++++++++++++++++++++++--------
 1 files changed, 23 insertions(+), 8 deletions(-)

diffs (88 lines):

diff -r 8aa262db1b0d -r ec166eba3488 sys/arch/powerpc/powerpc/kgdb_machdep.c
--- a/sys/arch/powerpc/powerpc/kgdb_machdep.c   Tue Mar 02 21:52:32 2010 +0000
+++ b/sys/arch/powerpc/powerpc/kgdb_machdep.c   Tue Mar 02 21:53:20 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kgdb_machdep.c,v 1.21 2009/01/11 23:20:37 cegger Exp $ */
+/*     $NetBSD: kgdb_machdep.c,v 1.22 2010/03/02 21:53:20 matt Exp $   */
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kgdb_machdep.c,v 1.21 2009/01/11 23:20:37 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kgdb_machdep.c,v 1.22 2010/03/02 21:53:20 matt Exp $");
 
 #include "opt_ddb.h"
 
@@ -54,8 +54,23 @@
 #include <machine/trap.h>
 #include <machine/pmap.h>
 
+#include <powerpc/spr.h>
+#if defined (PPC_OEA) || defined (PPC_OEA601) || defined (PPC_OEA64_BRIDGE)
+#include <powerpc/oea/spr.h>
 #include <powerpc/oea/bat.h>
-#include <powerpc/spr.h>
+
+#elif defined (PPC_OEA64)
+#include <powerpc/oea/spr.h>
+
+#elif defined (PPC_IBM4XX)
+#include <powerpc/booke/spr.h>
+
+#elif defined (PPC_BOOKE)
+#include <powerpc/booke/spr.h>
+
+#else
+#error unknown architecture
+#endif
 
 /*
  * Determine if the memory at va..(va+len) is valid.
@@ -66,7 +81,7 @@
        vaddr_t   last_va;
        paddr_t   pa;
        u_int msr;
-#if !defined (PPC_OEA64) && !defined (PPC_IBM4XX)
+#if defined (PPC_OEA) || defined (PPC_OEA601) || defined (PPC_OEA64_BRIDGE)
        u_int batu, batl;
 #endif
 
@@ -76,7 +91,7 @@
                return 1;
        }
 
-#if !defined (PPC_OEA64) && !defined (PPC_IBM4XX)
+#if defined (PPC_OEA) || defined (PPC_OEA601) || defined (PPC_OEA64_BRIDGE)
        /* Now check battable registers */
 #ifdef PPC_OEA601
        if ((mfpvr() >> 16) == MPC601) {
@@ -129,7 +144,7 @@
                }
 #endif
        }
-#endif /* !defined (PPC_OEA64) && !defined (PPC_IBM4XX) */
+#endif /* PPC_OEA || PPC_OEA601 || PPC_OEA64_BRIDGE */
 
 #if defined(PPC_IBM4XX)
        /* Is it (supposed to be) TLB-reserved mapping? */
@@ -163,7 +178,7 @@
 kgdb_signal(int type)
 {
        switch (type) {
-#ifdef PPC_IBM4XX
+#if defined (PPC_IBM4XX) || defined (PPC_BOOKE)
        case EXC_PIT:           /* 40x - Programmable interval timer */
        case EXC_FIT:           /* 40x - Fixed interval timer */
                return SIGALRM;
@@ -178,7 +193,7 @@
                return SIGSEGV;
 #endif
 
-#if !defined(PPC_OEA64) && !defined (PPC_IBM4XX)
+#if defined (PPC_OEA) || defined (PPC_OEA601) || defined (PPC_OEA64_BRIDGE)
        case EXC_PERF:          /* 604/750/7400 - Performance monitoring */
        case EXC_BPT:           /* 604/750/7400 - Instruction breakpoint */
        case EXC_SMI:           /* 604/750/7400 - System management interrupt */



Home | Main Index | Thread Index | Old Index