Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/mips assembly no longer include <machine/cpu.h>. I...



details:   https://anonhg.NetBSD.org/src/rev/fa9045500b79
branches:  trunk
changeset: 338764:fa9045500b79
user:      matt <matt%NetBSD.org@localhost>
date:      Sun Jun 07 06:07:49 2015 +0000

description:
assembly no longer include <machine/cpu.h>.  Instead MIPS_CURLWP is gotten
from regdef.h and everything else from assym.h.  <mips/mips_param.h> no
longer include <machine/cpu.h>

diffstat:

 sys/arch/mips/cavium/dev/octeon_dwctwo.c |  5 +++--
 sys/arch/mips/include/cpu.h              |  5 ++---
 sys/arch/mips/include/mips_param.h       |  6 +-----
 sys/arch/mips/include/pmap.h             |  4 +++-
 sys/arch/mips/include/regdef.h           |  6 +++++-
 sys/arch/mips/mips/bds_emul.S            |  3 +--
 sys/arch/mips/mips/copy.S                |  3 +--
 sys/arch/mips/mips/fp.S                  |  3 +--
 sys/arch/mips/mips/genassym.cf           |  6 +++++-
 sys/arch/mips/mips/lock_stubs_llsc.S     |  3 +--
 sys/arch/mips/mips/lock_stubs_ras.S      |  3 +--
 11 files changed, 24 insertions(+), 23 deletions(-)

diffs (213 lines):

diff -r 58bdef4e6966 -r fa9045500b79 sys/arch/mips/cavium/dev/octeon_dwctwo.c
--- a/sys/arch/mips/cavium/dev/octeon_dwctwo.c  Sun Jun 07 05:32:38 2015 +0000
+++ b/sys/arch/mips/cavium/dev/octeon_dwctwo.c  Sun Jun 07 06:07:49 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: octeon_dwctwo.c,v 1.2 2015/06/01 22:55:12 matt Exp $   */
+/*     $NetBSD: octeon_dwctwo.c,v 1.3 2015/06/07 06:07:49 matt Exp $   */
 
 /*
  * Copyright (c) 2015 Masao Uebayashi <uebayasi%tombiinc.com@localhost>
@@ -43,7 +43,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: octeon_dwctwo.c,v 1.2 2015/06/01 22:55:12 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: octeon_dwctwo.c,v 1.3 2015/06/07 06:07:49 matt Exp $");
 
 #include "opt_octeon.h"
 #include "opt_usb.h"
@@ -52,6 +52,7 @@
 #include <sys/systm.h>
 #include <sys/device.h>
 #include <sys/bus.h>
+#include <sys/cpu.h>
 #include <sys/workqueue.h>
 
 #include <dev/usb/usb.h>
diff -r 58bdef4e6966 -r fa9045500b79 sys/arch/mips/include/cpu.h
--- a/sys/arch/mips/include/cpu.h       Sun Jun 07 05:32:38 2015 +0000
+++ b/sys/arch/mips/include/cpu.h       Sun Jun 07 06:07:49 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpu.h,v 1.114 2015/06/06 21:38:47 matt Exp $   */
+/*     $NetBSD: cpu.h,v 1.115 2015/06/07 06:07:49 matt Exp $   */
 
 /*-
  * Copyright (c) 1992, 1993
@@ -226,11 +226,10 @@
 #define        CPU_ARCH_MIPS64R2       (1 << 8)
 
 /* Note: must be kept in sync with -ffixed-?? Makefile.mips. */
-#define MIPS_CURLWP             $24
+//     MIPS_CURLWP moved to <mips/regdef.h>
 #define MIPS_CURLWP_QUOTED      "$24"
 #define MIPS_CURLWP_LABEL      _L_T8
 #define MIPS_CURLWP_REG                _R_T8
-#define TF_MIPS_CURLWP(x)      TF_REG_T8(x)
 
 #ifndef _LOCORE
 
diff -r 58bdef4e6966 -r fa9045500b79 sys/arch/mips/include/mips_param.h
--- a/sys/arch/mips/include/mips_param.h        Sun Jun 07 05:32:38 2015 +0000
+++ b/sys/arch/mips/include/mips_param.h        Sun Jun 07 06:07:49 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mips_param.h,v 1.34 2013/05/23 21:39:49 christos Exp $ */
+/*     $NetBSD: mips_param.h,v 1.35 2015/06/07 06:07:49 matt Exp $     */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -25,10 +25,6 @@
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  */
-#ifdef _KERNEL
-#include <machine/cpu.h>
-#endif
-
 /*
  * No reason this can't be common
  */
diff -r 58bdef4e6966 -r fa9045500b79 sys/arch/mips/include/pmap.h
--- a/sys/arch/mips/include/pmap.h      Sun Jun 07 05:32:38 2015 +0000
+++ b/sys/arch/mips/include/pmap.h      Sun Jun 07 06:07:49 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pmap.h,v 1.63 2014/05/11 07:53:28 skrll Exp $  */
+/*     $NetBSD: pmap.h,v 1.64 2015/06/07 06:07:49 matt Exp $   */
 
 /*
  * Copyright (c) 1992, 1993
@@ -78,6 +78,8 @@
 #include "opt_multiprocessor.h"
 #endif
 
+#include <sys/evcnt.h>
+
 #include <mips/cpuregs.h>      /* for KSEG0 below */
 //#include <mips/pte.h>
 
diff -r 58bdef4e6966 -r fa9045500b79 sys/arch/mips/include/regdef.h
--- a/sys/arch/mips/include/regdef.h    Sun Jun 07 05:32:38 2015 +0000
+++ b/sys/arch/mips/include/regdef.h    Sun Jun 07 06:07:49 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: regdef.h,v 1.12 2005/12/11 12:18:09 christos Exp $     */
+/*     $NetBSD: regdef.h,v 1.13 2015/06/07 06:07:49 matt Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -104,4 +104,8 @@
 #define        ta3     $15
 #endif /* __mips_n32 || __mips_n64 */
 
+#ifdef _KERNEL
+#define        MIPS_CURLWP     t8      /* needs to synced with cpu.h */
+#endif
+
 #endif /* _MIPS_REGDEF_H */
diff -r 58bdef4e6966 -r fa9045500b79 sys/arch/mips/mips/bds_emul.S
--- a/sys/arch/mips/mips/bds_emul.S     Sun Jun 07 05:32:38 2015 +0000
+++ b/sys/arch/mips/mips/bds_emul.S     Sun Jun 07 06:07:49 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bds_emul.S,v 1.6 2011/12/25 11:51:15 kiyohara Exp $    */
+/*     $NetBSD: bds_emul.S,v 1.7 2015/06/07 06:07:49 matt Exp $        */
 
 /*
  * Copyright (c) 1992, 1993
@@ -37,7 +37,6 @@
 #include <sys/cdefs.h>
 
 #include <mips/asm.h>
-#include <mips/cpu.h>                  /* for MIPS_CURLWP */
 #include <mips/trap.h>                 /* for T_RES_INST */
 
 #include "assym.h"
diff -r 58bdef4e6966 -r fa9045500b79 sys/arch/mips/mips/copy.S
--- a/sys/arch/mips/mips/copy.S Sun Jun 07 05:32:38 2015 +0000
+++ b/sys/arch/mips/mips/copy.S Sun Jun 07 06:07:49 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: copy.S,v 1.15 2011/08/16 06:55:11 matt Exp $   */
+/*     $NetBSD: copy.S,v 1.16 2015/06/07 06:07:49 matt Exp $   */
 
 /*
  * Copyright (c) 1992, 1993
@@ -57,7 +57,6 @@
 
 #include <sys/errno.h>
 #include <mips/asm.h>
-#include <mips/cpu.h>
 #include "assym.h"
 
        .set    noreorder
diff -r 58bdef4e6966 -r fa9045500b79 sys/arch/mips/mips/fp.S
--- a/sys/arch/mips/mips/fp.S   Sun Jun 07 05:32:38 2015 +0000
+++ b/sys/arch/mips/mips/fp.S   Sun Jun 07 06:07:49 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fp.S,v 1.44 2011/08/16 06:55:11 matt Exp $     */
+/*     $NetBSD: fp.S,v 1.45 2015/06/07 06:07:49 matt Exp $     */
 
 /*
  * Copyright (c) 1992, 1993
@@ -37,7 +37,6 @@
 #include <sys/cdefs.h>
 
 #include <mips/asm.h>
-#include <mips/cpu.h>
 #include <mips/trap.h>
 
 #include "assym.h"
diff -r 58bdef4e6966 -r fa9045500b79 sys/arch/mips/mips/genassym.cf
--- a/sys/arch/mips/mips/genassym.cf    Sun Jun 07 05:32:38 2015 +0000
+++ b/sys/arch/mips/mips/genassym.cf    Sun Jun 07 06:07:49 2015 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: genassym.cf,v 1.58 2015/06/06 21:44:16 matt Exp $
+#      $NetBSD: genassym.cf,v 1.59 2015/06/07 06:07:49 matt Exp $
 #
 # Copyright (c) 1992, 1993
 #      The Regents of the University of California.  All rights reserved.
@@ -196,6 +196,7 @@
 define TF_REG_S6               offsetof(struct trapframe, tf_regs[_R_S6])
 define TF_REG_S7               offsetof(struct trapframe, tf_regs[_R_S7])
 define TF_REG_T8               offsetof(struct trapframe, tf_regs[_R_T8])
+define TF_MIPS_CURLWP          offsetof(struct trapframe, tf_regs[_R_T8])
 define TF_REG_T9               offsetof(struct trapframe, tf_regs[_R_T9])
 define TF_REG_K0               offsetof(struct trapframe, tf_regs[_R_K0])
 define TF_REG_K1               offsetof(struct trapframe, tf_regs[_R_K1])
@@ -330,3 +331,6 @@
 define MO_NUM_TLB_ENTRIES      offsetof(struct mips_options, mips_num_tlb_entries)
 
 define MCI_SDCACHE_SIZE        offsetof(struct mips_cache_info, mci_sdcache_size)
+
+define MIPS_CURLWP_LABEL       MIPS_CURLWP_LABEL
+define MIPS_CURLWP_REG         MIPS_CURLWP_REG
diff -r 58bdef4e6966 -r fa9045500b79 sys/arch/mips/mips/lock_stubs_llsc.S
--- a/sys/arch/mips/mips/lock_stubs_llsc.S      Sun Jun 07 05:32:38 2015 +0000
+++ b/sys/arch/mips/mips/lock_stubs_llsc.S      Sun Jun 07 06:07:49 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: lock_stubs_llsc.S,v 1.3 2015/06/04 02:28:06 matt Exp $ */
+/*     $NetBSD: lock_stubs_llsc.S,v 1.4 2015/06/07 06:07:49 matt Exp $ */
 
 /*-
  * Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -36,7 +36,6 @@
 #include <sys/errno.h>
 
 #include <machine/asm.h>
-#include <machine/cpu.h>               /* MIPS_CURLWP */
 
 #include "assym.h"
 
diff -r 58bdef4e6966 -r fa9045500b79 sys/arch/mips/mips/lock_stubs_ras.S
--- a/sys/arch/mips/mips/lock_stubs_ras.S       Sun Jun 07 05:32:38 2015 +0000
+++ b/sys/arch/mips/mips/lock_stubs_ras.S       Sun Jun 07 06:07:49 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: lock_stubs_ras.S,v 1.4 2011/08/27 13:23:52 bouyer Exp $        */
+/*     $NetBSD: lock_stubs_ras.S,v 1.5 2015/06/07 06:07:49 matt Exp $  */
 
 /*-
  * Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -36,7 +36,6 @@
 #include <sys/errno.h>
 
 #include <machine/asm.h>
-#include <machine/cpu.h>
 
 #include "assym.h"
 



Home | Main Index | Thread Index | Old Index