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 If this is a MODULAR kernel, export...



details:   https://anonhg.NetBSD.org/src/rev/ebfc14e63c2d
branches:  trunk
changeset: 766290:ebfc14e63c2d
user:      matt <matt%NetBSD.org@localhost>
date:      Mon Jun 20 08:18:28 2011 +0000

description:
If this is a MODULAR kernel, export USRSTACK and CPU_MAXNUM as linker symbols
so modules can access them.

diffstat:

 sys/arch/powerpc/powerpc/genassym.cf   |  18 +++++++++++-------
 sys/arch/powerpc/powerpc/locore_subr.S |  10 +++++++++-
 2 files changed, 20 insertions(+), 8 deletions(-)

diffs (81 lines):

diff -r 3f9e87adf959 -r ebfc14e63c2d sys/arch/powerpc/powerpc/genassym.cf
--- a/sys/arch/powerpc/powerpc/genassym.cf      Mon Jun 20 08:13:17 2011 +0000
+++ b/sys/arch/powerpc/powerpc/genassym.cf      Mon Jun 20 08:18:28 2011 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: genassym.cf,v 1.7 2011/06/18 21:17:29 matt Exp $
+#      $NetBSD: genassym.cf,v 1.8 2011/06/20 08:18:28 matt Exp $
 
 #-
 # Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
@@ -48,23 +48,26 @@
 quote #define __INTR_PRIVATE
 
 include <sys/param.h>
-include <sys/intr.h>
+include <sys/bitops.h>
 include <sys/cpu.h>
+include <sys/intr.h>
+include <sys/lwp.h>
 include <sys/mutex.h>
+include <sys/proc.h>
 include <sys/rwlock.h>
-include <sys/lwp.h>
-include <sys/proc.h>
-include <sys/bitops.h>
 
 include <uvm/uvm_extern.h>
 
-include <machine/pcb.h>
-include <machine/frame.h>
+include <powerpc/frame.h>
+include <powerpc/pcb.h>
+include <powerpc/psl.h>
 
 define IPL_HIGH                IPL_HIGH
 define IPL_SCHED               IPL_SCHED
 define IPL_VM                  IPL_VM
 
+define CPU_MAXNUM              CPU_MAXNUM
+
 define FRAMELEN        FRAMELEN
 define FRAME_TF        offsetof(struct ktrapframe, ktf_tf)
 define FRAME_R0        offsetof(struct ktrapframe, ktf_tf.tf_fixreg[0])
@@ -198,6 +201,7 @@
 define PAGE_SIZE       PAGE_SIZE
 define PAGE_MASK       PAGE_MASK
 define PAGE_SHIFT      PAGE_SHIFT
+define USRSTACK        USRSTACK
 
 ifdef  __HAVE_FAST_SOFTINTS
 define __HAVE_FAST_SOFTINTS    __HAVE_FAST_SOFTINTS
diff -r 3f9e87adf959 -r ebfc14e63c2d sys/arch/powerpc/powerpc/locore_subr.S
--- a/sys/arch/powerpc/powerpc/locore_subr.S    Mon Jun 20 08:13:17 2011 +0000
+++ b/sys/arch/powerpc/powerpc/locore_subr.S    Mon Jun 20 08:18:28 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: locore_subr.S,v 1.44 2011/06/17 23:14:40 matt Exp $    */
+/*     $NetBSD: locore_subr.S,v 1.45 2011/06/20 08:18:28 matt Exp $    */
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -77,6 +77,7 @@
 #include "opt_lockdebug.h"
 #include "opt_multiprocessor.h"
 #include "opt_ddb.h"
+#include "opt_modular.h"
 
 #ifdef DDB
 #define        CFRAME_LRSAVE(t0)                                       \
@@ -142,6 +143,13 @@
 GLOBAL(powersave)
        .long   -1
 
+#ifdef MODULAR
+       .global __USRSTACK
+       .equ    __USRSTACK, USRSTACK
+       .global __CPU_MAXNUM
+       .equ    __CPU_MAXNUM, CPU_MAXNUM
+#endif
+
        .text
        .align 2
 /*



Home | Main Index | Thread Index | Old Index