Source-Changes-HG archive

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

[src/trunk]: src Remove <machine/atomic.h>; use <sys/atomic.h> instead.



details:   https://anonhg.NetBSD.org/src/rev/916d16416cfa
branches:  trunk
changeset: 765773:916d16416cfa
user:      matt <matt%NetBSD.org@localhost>
date:      Sun Jun 05 16:52:22 2011 +0000

description:
Remove <machine/atomic.h>; use <sys/atomic.h> instead.
Add <powerpc/cpuset.h> (for mpc85xx pmap).
Add some initial MP code for mpc85xx
Rework ipi code to be common across all ppcs
Change PPC to keep curlwp in %r13 while in the kernel.
Move astpending from cpu_info to mdlwp
Improve cpu_need_resched to be more MP friendly.

diffstat:

 distrib/sets/lists/comp/ad.powerpc         |    4 +-
 distrib/sets/lists/comp/md.amigappc        |    4 +-
 distrib/sets/lists/comp/md.bebox           |    4 +-
 distrib/sets/lists/comp/md.evbppc          |    4 +-
 distrib/sets/lists/comp/md.ibmnws          |    4 +-
 distrib/sets/lists/comp/md.macppc          |    4 +-
 distrib/sets/lists/comp/md.mvmeppc         |    4 +-
 distrib/sets/lists/comp/md.ofppc           |    4 +-
 distrib/sets/lists/comp/md.prep            |    4 +-
 distrib/sets/lists/comp/md.rs6000          |    4 +-
 distrib/sets/lists/comp/md.sandpoint       |    4 +-
 sys/arch/bebox/bebox/pic_bebox.c           |    5 +-
 sys/arch/bebox/include/atomic.h            |    3 -
 sys/arch/evbppc/conf/INSTALL_PMPPC         |    7 +-
 sys/arch/evbppc/include/atomic.h           |    3 -
 sys/arch/evbppc/mpc85xx/machdep.c          |   24 ++++-
 sys/arch/evbppc/mpc85xx/mpc85xx_start.S    |    7 +-
 sys/arch/ibmnws/include/atomic.h           |    3 -
 sys/arch/macppc/include/atomic.h           |    3 -
 sys/arch/macppc/include/intr.h             |    7 +-
 sys/arch/macppc/macppc/cpu.c               |    9 +-
 sys/arch/macppc/macppc/ipi_hammerhead.c    |   32 ++----
 sys/arch/macppc/macppc/machdep.c           |    6 +-
 sys/arch/mvmeppc/include/atomic.h          |    3 -
 sys/arch/ofppc/include/atomic.h            |    3 -
 sys/arch/ofppc/include/intr.h              |    9 +-
 sys/arch/ofppc/ofppc/cpu.c                 |    5 +-
 sys/arch/powerpc/booke/booke_machdep.c     |   41 ++++----
 sys/arch/powerpc/booke/booke_pmap.c        |   13 ++-
 sys/arch/powerpc/booke/booke_stubs.c       |   16 ++-
 sys/arch/powerpc/booke/e500_intr.c         |  132 ++++++++++++++++++++++++++--
 sys/arch/powerpc/booke/e500_mpsubr.S       |  113 ++++++++++++++++++++++++
 sys/arch/powerpc/booke/e500_tlb.c          |   36 +++++++-
 sys/arch/powerpc/booke/genassym.cf         |    5 +-
 sys/arch/powerpc/booke/trap.c              |    6 +-
 sys/arch/powerpc/booke/trap_subr.S         |   26 +++--
 sys/arch/powerpc/conf/files.powerpc        |    4 +-
 sys/arch/powerpc/ibm4xx/genassym.cf        |    4 +-
 sys/arch/powerpc/ibm4xx/trap.c             |    6 +-
 sys/arch/powerpc/ibm4xx/trap_subr.S        |   30 +++---
 sys/arch/powerpc/include/Makefile          |    4 +-
 sys/arch/powerpc/include/asm.h             |   10 +-
 sys/arch/powerpc/include/atomic.h          |  129 ----------------------------
 sys/arch/powerpc/include/booke/cpuvar.h    |    4 +-
 sys/arch/powerpc/include/booke/e500var.h   |   22 ++++-
 sys/arch/powerpc/include/booke/intr.h      |   23 +++-
 sys/arch/powerpc/include/booke/pmap.h      |    7 +-
 sys/arch/powerpc/include/booke/spr.h       |    4 +-
 sys/arch/powerpc/include/booke/vmparam.h   |    4 +-
 sys/arch/powerpc/include/cpu.h             |   20 ++--
 sys/arch/powerpc/include/cpuset.h          |   57 ++++++++++++
 sys/arch/powerpc/include/proc.h            |    3 +-
 sys/arch/powerpc/include/types.h           |    3 +-
 sys/arch/powerpc/oea/cpu_subr.c            |    8 +-
 sys/arch/powerpc/oea/genassym.cf           |    7 +-
 sys/arch/powerpc/pic/files.pic             |    3 +-
 sys/arch/powerpc/pic/intr.c                |    6 +-
 sys/arch/powerpc/pic/ipi.c                 |   49 ++-------
 sys/arch/powerpc/pic/ipi_openpic.c         |   46 +++++----
 sys/arch/powerpc/pic/ipivar.h              |   28 ++---
 sys/arch/powerpc/pic/openpic_common.c      |    9 +-
 sys/arch/powerpc/pic/pic_distopenpic.c     |    9 +-
 sys/arch/powerpc/powerpc/lock_stubs.S      |   22 +---
 sys/arch/powerpc/powerpc/locore_subr.S     |   17 ++-
 sys/arch/powerpc/powerpc/ofwreal.S         |    8 +-
 sys/arch/powerpc/powerpc/powerpc_machdep.c |   95 ++++++++++++++++++++-
 sys/arch/powerpc/powerpc/trap.c            |    6 +-
 sys/arch/powerpc/powerpc/trap_subr.S       |   60 ++++++++----
 sys/arch/prep/include/atomic.h             |    3 -
 sys/arch/rs6000/include/atomic.h           |    3 -
 sys/arch/sandpoint/include/atomic.h        |    3 -
 sys/common/pmap/tlb/pmap.c                 |   33 ++++--
 sys/common/pmap/tlb/pmap.h                 |    8 +-
 sys/common/pmap/tlb/pmap_tlb.c             |   54 ++++++-----
 74 files changed, 850 insertions(+), 522 deletions(-)

diffs (truncated from 3213 to 300 lines):

diff -r ce580fd1e8d6 -r 916d16416cfa distrib/sets/lists/comp/ad.powerpc
--- a/distrib/sets/lists/comp/ad.powerpc        Sun Jun 05 16:33:51 2011 +0000
+++ b/distrib/sets/lists/comp/ad.powerpc        Sun Jun 05 16:52:22 2011 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: ad.powerpc,v 1.49 2011/04/15 19:31:06 joerg Exp $
+# $NetBSD: ad.powerpc,v 1.50 2011/06/05 16:52:22 matt Exp $
 ./usr/bin/elf2aout                             comp-sysutil-bin
 ./usr/bin/psim                                 comp-debug-bin          gdb,gdb=6
 ./usr/include/altivec.h                                comp-obsolete           obsolete
@@ -8,7 +8,7 @@
 ./usr/include/powerpc/ansi.h                   comp-c-include
 ./usr/include/powerpc/aout_machdep.h           comp-c-include
 ./usr/include/powerpc/asm.h                    comp-c-include
-./usr/include/powerpc/atomic.h                 comp-c-include
+./usr/include/powerpc/atomic.h                 comp-obsolete           obsolete
 ./usr/include/powerpc/bat.h                    comp-obsolete           obsolete
 ./usr/include/powerpc/bswap.h                  comp-c-include
 ./usr/include/powerpc/bus.h                    comp-obsolete           obsolete
diff -r ce580fd1e8d6 -r 916d16416cfa distrib/sets/lists/comp/md.amigappc
--- a/distrib/sets/lists/comp/md.amigappc       Sun Jun 05 16:33:51 2011 +0000
+++ b/distrib/sets/lists/comp/md.amigappc       Sun Jun 05 16:52:22 2011 +0000
@@ -1,11 +1,11 @@
-# $NetBSD: md.amigappc,v 1.6 2010/03/02 21:54:06 matt Exp $
+# $NetBSD: md.amigappc,v 1.7 2011/06/05 16:52:22 matt Exp $
 ./usr/include/ieeefp.h                         comp-c-include
 ./usr/include/amigappc                         comp-c-include
 ./usr/include/amigappc/_G_config.h             comp-obsolete           obsolete
 ./usr/include/amigappc/ansi.h                  comp-c-include
 ./usr/include/amigappc/aout_machdep.h          comp-c-include
 ./usr/include/amigappc/asm.h                   comp-c-include
-./usr/include/amigappc/atomic.h                        comp-c-include
+./usr/include/amigappc/atomic.h                        comp-obsolete           obsolete
 #XXX./usr/include/amigappc/autoconf.h          comp-c-include
 ./usr/include/amigappc/bat.h                   comp-obsolete           obsolete
 #XXX./usr/include/amigappc/bus.h                       comp-c-include
diff -r ce580fd1e8d6 -r 916d16416cfa distrib/sets/lists/comp/md.bebox
--- a/distrib/sets/lists/comp/md.bebox  Sun Jun 05 16:33:51 2011 +0000
+++ b/distrib/sets/lists/comp/md.bebox  Sun Jun 05 16:52:22 2011 +0000
@@ -1,10 +1,10 @@
-# $NetBSD: md.bebox,v 1.32 2010/03/14 23:19:18 mrg Exp $
+# $NetBSD: md.bebox,v 1.33 2011/06/05 16:52:22 matt Exp $
 ./usr/include/bebox                            comp-c-include
 ./usr/include/bebox/_G_config.h                        comp-obsolete           obsolete
 ./usr/include/bebox/ansi.h                     comp-c-include
 ./usr/include/bebox/aout_machdep.h             comp-c-include
 ./usr/include/bebox/asm.h                      comp-c-include
-./usr/include/bebox/atomic.h                   comp-c-include
+./usr/include/bebox/atomic.h                   comp-obsolete           obsolete
 ./usr/include/bebox/bat.h                      comp-obsolete           obsolete
 ./usr/include/bebox/bootinfo.h                 comp-c-include
 ./usr/include/bebox/bswap.h                    comp-c-include
diff -r ce580fd1e8d6 -r 916d16416cfa distrib/sets/lists/comp/md.evbppc
--- a/distrib/sets/lists/comp/md.evbppc Sun Jun 05 16:33:51 2011 +0000
+++ b/distrib/sets/lists/comp/md.evbppc Sun Jun 05 16:52:22 2011 +0000
@@ -1,10 +1,10 @@
-# $NetBSD: md.evbppc,v 1.10 2010/03/02 21:54:06 matt Exp $
+# $NetBSD: md.evbppc,v 1.11 2011/06/05 16:52:22 matt Exp $
 ./usr/include/evbppc                           comp-c-include
 ./usr/include/evbppc/_G_config.h               comp-obsolete           obsolete
 ./usr/include/evbppc/ansi.h                    comp-c-include
 ./usr/include/evbppc/aout_machdep.h            comp-c-include
 ./usr/include/evbppc/asm.h                     comp-c-include
-./usr/include/evbppc/atomic.h                  comp-c-include
+./usr/include/evbppc/atomic.h                  comp-obsolete           obsolete
 ./usr/include/evbppc/bswap.h                   comp-c-include
 ./usr/include/evbppc/bus.h                     comp-obsolete           obsolete
 ./usr/include/evbppc/cdefs.h                   comp-c-include
diff -r ce580fd1e8d6 -r 916d16416cfa distrib/sets/lists/comp/md.ibmnws
--- a/distrib/sets/lists/comp/md.ibmnws Sun Jun 05 16:33:51 2011 +0000
+++ b/distrib/sets/lists/comp/md.ibmnws Sun Jun 05 16:52:22 2011 +0000
@@ -1,10 +1,10 @@
-# $NetBSD: md.ibmnws,v 1.8 2010/03/02 21:54:06 matt Exp $
+# $NetBSD: md.ibmnws,v 1.9 2011/06/05 16:52:22 matt Exp $
 ./usr/include/ibmnws                           comp-c-include
 ./usr/include/ibmnws/_G_config.h               comp-obsolete           obsolete
 ./usr/include/ibmnws/ansi.h                    comp-c-include
 ./usr/include/ibmnws/aout_machdep.h            comp-c-include
 ./usr/include/ibmnws/asm.h                     comp-c-include
-./usr/include/ibmnws/atomic.h                  comp-c-include
+./usr/include/ibmnws/atomic.h                  comp-obsolete           obsolete
 ./usr/include/ibmnws/bat.h                     comp-obsolete           obsolete
 ./usr/include/ibmnws/bswap.h                   comp-c-include
 ./usr/include/ibmnws/bus.h                     comp-obsolete           obsolete
diff -r ce580fd1e8d6 -r 916d16416cfa distrib/sets/lists/comp/md.macppc
--- a/distrib/sets/lists/comp/md.macppc Sun Jun 05 16:33:51 2011 +0000
+++ b/distrib/sets/lists/comp/md.macppc Sun Jun 05 16:52:22 2011 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: md.macppc,v 1.33 2010/03/02 21:54:06 matt Exp $
+# $NetBSD: md.macppc,v 1.34 2011/06/05 16:52:22 matt Exp $
 ./usr/include/ieeefp.h                         comp-c-include
 ./usr/include/macppc                           comp-c-include
 ./usr/include/macppc/_G_config.h               comp-obsolete           obsolete
@@ -7,7 +7,7 @@
 ./usr/include/macppc/aout_machdep.h            comp-c-include
 ./usr/include/macppc/apmvar.h                  comp-c-include
 ./usr/include/macppc/asm.h                     comp-c-include
-./usr/include/macppc/atomic.h                  comp-c-include
+./usr/include/macppc/atomic.h                  comp-obsolete           obsolete
 ./usr/include/macppc/autoconf.h                        comp-c-include
 ./usr/include/macppc/bat.h                     comp-obsolete           obsolete
 ./usr/include/macppc/bswap.h                   comp-c-include
diff -r ce580fd1e8d6 -r 916d16416cfa distrib/sets/lists/comp/md.mvmeppc
--- a/distrib/sets/lists/comp/md.mvmeppc        Sun Jun 05 16:33:51 2011 +0000
+++ b/distrib/sets/lists/comp/md.mvmeppc        Sun Jun 05 16:52:22 2011 +0000
@@ -1,11 +1,11 @@
-# $NetBSD: md.mvmeppc,v 1.12 2010/03/02 21:54:06 matt Exp $
+# $NetBSD: md.mvmeppc,v 1.13 2011/06/05 16:52:22 matt Exp $
 ./usr/include/ieeefp.h                         comp-c-include
 ./usr/include/mvmeppc                          comp-c-include
 ./usr/include/mvmeppc/_G_config.h              comp-obsolete           obsolete
 ./usr/include/mvmeppc/ansi.h                   comp-c-include
 ./usr/include/mvmeppc/aout_machdep.h           comp-c-include
 ./usr/include/mvmeppc/asm.h                    comp-c-include
-./usr/include/mvmeppc/atomic.h                 comp-c-include
+./usr/include/mvmeppc/atomic.h                 comp-obsolete           obsolete
 ./usr/include/mvmeppc/bat.h                    comp-obsolete           obsolete
 ./usr/include/mvmeppc/bootinfo.h               comp-c-include
 ./usr/include/mvmeppc/bswap.h                  comp-c-include
diff -r ce580fd1e8d6 -r 916d16416cfa distrib/sets/lists/comp/md.ofppc
--- a/distrib/sets/lists/comp/md.ofppc  Sun Jun 05 16:33:51 2011 +0000
+++ b/distrib/sets/lists/comp/md.ofppc  Sun Jun 05 16:52:22 2011 +0000
@@ -1,11 +1,11 @@
-# $NetBSD: md.ofppc,v 1.11 2010/11/15 12:26:36 njoly Exp $
+# $NetBSD: md.ofppc,v 1.12 2011/06/05 16:52:22 matt Exp $
 ./usr/include/ieeefp.h                         comp-c-include
 ./usr/include/ofppc                            comp-c-include
 ./usr/include/ofppc/_G_config.h                        comp-obsolete           obsolete
 ./usr/include/ofppc/ansi.h                     comp-c-include
 ./usr/include/ofppc/aout_machdep.h             comp-c-include
 ./usr/include/ofppc/asm.h                      comp-c-include
-./usr/include/ofppc/atomic.h                   comp-c-include
+./usr/include/ofppc/atomic.h                   comp-obsolete           obsolete
 ./usr/include/ofppc/bat.h                      comp-obsolete           obsolete
 ./usr/include/ofppc/bswap.h                    comp-c-include
 ./usr/include/ofppc/cdefs.h                    comp-c-include
diff -r ce580fd1e8d6 -r 916d16416cfa distrib/sets/lists/comp/md.prep
--- a/distrib/sets/lists/comp/md.prep   Sun Jun 05 16:33:51 2011 +0000
+++ b/distrib/sets/lists/comp/md.prep   Sun Jun 05 16:52:22 2011 +0000
@@ -1,11 +1,11 @@
-# $NetBSD: md.prep,v 1.25 2010/03/14 23:19:18 mrg Exp $
+# $NetBSD: md.prep,v 1.26 2011/06/05 16:52:22 matt Exp $
 ./usr/include/ieeefp.h                         comp-c-include
 ./usr/include/prep                             comp-c-include
 ./usr/include/prep/_G_config.h                 comp-obsolete           obsolete
 ./usr/include/prep/ansi.h                      comp-c-include
 ./usr/include/prep/aout_machdep.h              comp-c-include
 ./usr/include/prep/asm.h                       comp-c-include
-./usr/include/prep/atomic.h                    comp-c-include
+./usr/include/prep/atomic.h                    comp-obsolete           obsolete
 ./usr/include/prep/bat.h                       comp-obsolete           obsolete
 ./usr/include/prep/bootinfo.h                  comp-c-include
 ./usr/include/prep/bswap.h                     comp-c-include
diff -r ce580fd1e8d6 -r 916d16416cfa distrib/sets/lists/comp/md.rs6000
--- a/distrib/sets/lists/comp/md.rs6000 Sun Jun 05 16:33:51 2011 +0000
+++ b/distrib/sets/lists/comp/md.rs6000 Sun Jun 05 16:52:22 2011 +0000
@@ -1,10 +1,10 @@
-# $NetBSD: md.rs6000,v 1.3 2010/03/14 23:19:18 mrg Exp $
+# $NetBSD: md.rs6000,v 1.4 2011/06/05 16:52:22 matt Exp $
 ./usr/include/ieeefp.h                         comp-c-include
 ./usr/include/rs6000                           comp-c-include
 ./usr/include/rs6000/ansi.h                    comp-c-include
 ./usr/include/rs6000/aout_machdep.h            comp-c-include
 ./usr/include/rs6000/asm.h                     comp-c-include
-./usr/include/rs6000/atomic.h                  comp-c-include
+./usr/include/rs6000/atomic.h                  comp-obsolete           obsolete
 ./usr/include/rs6000/bootinfo.h                        comp-c-include
 ./usr/include/rs6000/bswap.h                   comp-c-include
 ./usr/include/rs6000/cdefs.h                   comp-c-include
diff -r ce580fd1e8d6 -r 916d16416cfa distrib/sets/lists/comp/md.sandpoint
--- a/distrib/sets/lists/comp/md.sandpoint      Sun Jun 05 16:33:51 2011 +0000
+++ b/distrib/sets/lists/comp/md.sandpoint      Sun Jun 05 16:52:22 2011 +0000
@@ -1,11 +1,11 @@
-# $NetBSD: md.sandpoint,v 1.14 2010/03/02 21:54:06 matt Exp $
+# $NetBSD: md.sandpoint,v 1.15 2011/06/05 16:52:22 matt Exp $
 ./usr/include/ieeefp.h                         comp-c-include
 ./usr/include/sandpoint                                comp-c-include
 ./usr/include/sandpoint/_G_config.h            comp-obsolete           obsolete
 ./usr/include/sandpoint/ansi.h                 comp-c-include
 ./usr/include/sandpoint/aout_machdep.h         comp-c-include
 ./usr/include/sandpoint/asm.h                  comp-c-include
-./usr/include/sandpoint/atomic.h               comp-c-include
+./usr/include/sandpoint/atomic.h               comp-obsolete           obsolete
 ./usr/include/sandpoint/bootinfo.h             comp-c-include
 ./usr/include/sandpoint/bswap.h                        comp-c-include
 ./usr/include/sandpoint/bus.h                  comp-obsolete           obsolete
diff -r ce580fd1e8d6 -r 916d16416cfa sys/arch/bebox/bebox/pic_bebox.c
--- a/sys/arch/bebox/bebox/pic_bebox.c  Sun Jun 05 16:33:51 2011 +0000
+++ b/sys/arch/bebox/bebox/pic_bebox.c  Sun Jun 05 16:52:22 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pic_bebox.c,v 1.6 2008/04/28 20:23:15 martin Exp $ */
+/* $NetBSD: pic_bebox.c,v 1.7 2011/06/05 16:52:23 matt Exp $ */
 
 /*-
  * Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pic_bebox.c,v 1.6 2008/04/28 20:23:15 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pic_bebox.c,v 1.7 2011/06/05 16:52:23 matt Exp $");
 
 #include <sys/param.h>
 #include <sys/malloc.h>
@@ -38,7 +38,6 @@
 
 #include <uvm/uvm_extern.h>
 
-#include <machine/atomic.h>
 #include <machine/pio.h>
 
 #include <arch/powerpc/pic/picvar.h>
diff -r ce580fd1e8d6 -r 916d16416cfa sys/arch/bebox/include/atomic.h
--- a/sys/arch/bebox/include/atomic.h   Sun Jun 05 16:33:51 2011 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-/*     $NetBSD: atomic.h,v 1.2 2005/12/11 12:17:03 christos Exp $      */
-
-#include <powerpc/atomic.h>
diff -r ce580fd1e8d6 -r 916d16416cfa sys/arch/evbppc/conf/INSTALL_PMPPC
--- a/sys/arch/evbppc/conf/INSTALL_PMPPC        Sun Jun 05 16:33:51 2011 +0000
+++ b/sys/arch/evbppc/conf/INSTALL_PMPPC        Sun Jun 05 16:52:22 2011 +0000
@@ -1,8 +1,8 @@
-#      $NetBSD: INSTALL_PMPPC,v 1.2 2011/01/18 01:07:06 matt Exp $
+#      $NetBSD: INSTALL_PMPPC,v 1.3 2011/06/05 16:52:23 matt Exp $
 
 include "arch/evbppc/conf/PMPPC"
 
-#ident                 "INSTALL_PMPPC-$Revision: 1.2 $"
+#ident                 "INSTALL_PMPPC-$Revision: 1.3 $"
 
 # DEBUG options turned on:
 
@@ -10,7 +10,7 @@
 
 pseudo-device  md
 
-makeoptions    NEEDS_MDSETIMAGE="yes"
+makeoptions    NEED_MDSETIMAGE="yes"
 
 no config      netbsd
 config         netbsd root on md0a
@@ -23,4 +23,3 @@
 ## the `ramdisk' image (which is built in distrib/evbppc/ramdisk/ramdisk).
 options        MEMORY_DISK_ROOT_SIZE=6144      # size of memory disk, in blocks
 options        MEMORY_DISK_RBFLAGS=RB_SINGLE   # boot in single-user mode
-
diff -r ce580fd1e8d6 -r 916d16416cfa sys/arch/evbppc/include/atomic.h
--- a/sys/arch/evbppc/include/atomic.h  Sun Jun 05 16:33:51 2011 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-/*     $NetBSD: atomic.h,v 1.2 2005/12/11 12:17:12 christos Exp $      */
-
-#include <powerpc/atomic.h>
diff -r ce580fd1e8d6 -r 916d16416cfa sys/arch/evbppc/mpc85xx/machdep.c
--- a/sys/arch/evbppc/mpc85xx/machdep.c Sun Jun 05 16:33:51 2011 +0000
+++ b/sys/arch/evbppc/mpc85xx/machdep.c Sun Jun 05 16:52:22 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.6 2011/05/28 05:21:40 matt Exp $ */
+/*     $NetBSD: machdep.c,v 1.7 2011/06/05 16:52:23 matt Exp $ */
 /*-
  * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -709,10 +709,30 @@
        e500_tlb_print(self, "tlb0", mfspr(SPR_TLB0CFG));
        e500_tlb_print(self, "tlb1", mfspr(SPR_TLB1CFG));
 
-       intr_cpu_init(ci);
+       intr_cpu_attach(ci);
        cpu_evcnt_attach(ci);
+
+       if (ci == curcpu())
+               intr_cpu_hatch(ci);
 }
 
+void
+e500_ipi_halt(void)
+{
+       register_t msr, hid0;
+
+       msr = wrtee(0);
+
+       hid0 = mfspr(SPR_HID0);
+       hid0 = (hid0 & ~HID0_TBEN) | HID0_DOZE;
+       mtspr(SPR_HID0, hid0);
+
+       msr = (msr & ~(PSL_EE|PSL_CE|PSL_ME)) | PSL_WE;
+       mtmsr(msr);
+       for (;;);       /* loop forever */
+}
+
+
 static void
 calltozero(void)
 {
diff -r ce580fd1e8d6 -r 916d16416cfa sys/arch/evbppc/mpc85xx/mpc85xx_start.S
--- a/sys/arch/evbppc/mpc85xx/mpc85xx_start.S   Sun Jun 05 16:33:51 2011 +0000
+++ b/sys/arch/evbppc/mpc85xx/mpc85xx_start.S   Sun Jun 05 16:52:22 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mpc85xx_start.S,v 1.2 2011/01/18 01:10:25 matt Exp $   */
+/*     $NetBSD: mpc85xx_start.S,v 1.3 2011/06/05 16:52:23 matt Exp $   */



Home | Main Index | Thread Index | Old Index