Source-Changes-HG archive

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

[src/trunk]: src rename sparc64 BLOCK_SIZE and BLOCK_ALIGN to have SPARC64_ p...



details:   https://anonhg.NetBSD.org/src/rev/38c0245d4d9d
branches:  trunk
changeset: 767228:38c0245d4d9d
user:      mrg <mrg%NetBSD.org@localhost>
date:      Tue Jul 12 07:51:33 2011 +0000

description:
rename sparc64 BLOCK_SIZE and BLOCK_ALIGN to have SPARC64_ prefixes.
for the assembler files, define the old names to the new names
since using the new names cause ugliness due to longer identifer
names, and reduces churn.

fixes build issues in dtv and vaguely makes <machine/psl.h> slightly
less name-space invasive.

diffstat:

 lib/libc/arch/sparc64/string/memcpy.S                 |  7 ++++---
 lib/libc/compat/arch/sparc64/sys/compat___sigtramp1.S |  5 ++++-
 sys/arch/sparc64/include/db_machdep.h                 |  4 ++--
 sys/arch/sparc64/include/psl.h                        |  6 +++---
 sys/arch/sparc64/include/reg.h                        |  4 ++--
 sys/arch/sparc64/sparc64/cpu.c                        |  8 ++++----
 sys/arch/sparc64/sparc64/locore.s                     |  5 ++++-
 sys/arch/sparc64/sparc64/memcpyset.s                  |  5 ++++-
 sys/arch/sparc64/sparc64/mp_subr.S                    |  4 +++-
 sys/arch/sparc64/sparc64/pmap.c                       |  9 +++++----
 sys/arch/sparc64/sparc64/svr4_sigcode64.s             |  5 ++++-
 sys/arch/sparc64/sparc64/trap.c                       |  6 +++---
 12 files changed, 42 insertions(+), 26 deletions(-)

diffs (263 lines):

diff -r 514380a17aec -r 38c0245d4d9d lib/libc/arch/sparc64/string/memcpy.S
--- a/lib/libc/arch/sparc64/string/memcpy.S     Tue Jul 12 05:31:49 2011 +0000
+++ b/lib/libc/arch/sparc64/string/memcpy.S     Tue Jul 12 07:51:33 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: memcpy.S,v 1.4 2011/05/25 02:11:16 christos Exp $      */
+/*     $NetBSD: memcpy.S,v 1.5 2011/07/12 07:51:33 mrg Exp $   */
 
 /*
  * Copyright (c) 2001  Eduardo E. Horvath
@@ -46,14 +46,15 @@
 #include <machine/psl.h>
 
 #if defined(LIBC_SCCS) && !defined(lint)
-       RCSID("$NetBSD: memcpy.S,v 1.4 2011/05/25 02:11:16 christos Exp $")
+       RCSID("$NetBSD: memcpy.S,v 1.5 2011/07/12 07:51:33 mrg Exp $")
 #endif  /* LIBC_SCCS and not lint */
 
 #define        EMPTY   nop
 #define        NOTREACHED      ta      1
 
 #define        BCOPY_SMALL     16
-#define        BLOCK_SIZE      64
+#define        BLOCK_SIZE      SPARC64_BLOCK_SIZE
+#define        BLOCK_ALIGN     SPARC64_BLOCK_ALIGN
 
 #if 0
 #define ASI_STORE      ASI_BLK_COMMIT_P
diff -r 514380a17aec -r 38c0245d4d9d lib/libc/compat/arch/sparc64/sys/compat___sigtramp1.S
--- a/lib/libc/compat/arch/sparc64/sys/compat___sigtramp1.S     Tue Jul 12 05:31:49 2011 +0000
+++ b/lib/libc/compat/arch/sparc64/sys/compat___sigtramp1.S     Tue Jul 12 07:51:33 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: compat___sigtramp1.S,v 1.1 2005/10/16 04:41:34 christos Exp $  */
+/*     $NetBSD: compat___sigtramp1.S,v 1.2 2011/07/12 07:51:33 mrg Exp $       */
 
 /*
  * Copyright (c) 1996-2002 Eduardo Horvath
@@ -58,6 +58,9 @@
        .register       %g2,#ignore
        .register       %g3,#ignore
 
+#define BLOCK_SIZE SPARC64_BLOCK_SIZE
+#define BLOCK_ALIGN SPARC64_BLOCK_ALIGN
+
 /*
  * When this code is run, the stack looks like:
  *     [%sp]                   128 bytes to which registers can be dumped
diff -r 514380a17aec -r 38c0245d4d9d sys/arch/sparc64/include/db_machdep.h
--- a/sys/arch/sparc64/include/db_machdep.h     Tue Jul 12 05:31:49 2011 +0000
+++ b/sys/arch/sparc64/include/db_machdep.h     Tue Jul 12 07:51:33 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: db_machdep.h,v 1.32 2011/06/20 09:25:48 nakayama Exp $ */
+/*     $NetBSD: db_machdep.h,v 1.33 2011/07/12 07:51:34 mrg Exp $ */
 
 /*
  * Mach Operating System
@@ -68,7 +68,7 @@
        struct frame64          db_fr;
        struct trapstate        db_ts[5];
        int                     db_tl;
-       struct fpstate64        db_fpstate __aligned(BLOCK_SIZE);
+       struct fpstate64        db_fpstate __aligned(SPARC64_BLOCK_SIZE);
 } db_regs_t;
 
 /* Current CPU register state */
diff -r 514380a17aec -r 38c0245d4d9d sys/arch/sparc64/include/psl.h
--- a/sys/arch/sparc64/include/psl.h    Tue Jul 12 05:31:49 2011 +0000
+++ b/sys/arch/sparc64/include/psl.h    Tue Jul 12 07:51:33 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: psl.h,v 1.48 2011/05/25 12:01:30 mrg Exp $ */
+/*     $NetBSD: psl.h,v 1.49 2011/07/12 07:51:34 mrg Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -265,8 +265,8 @@
 #define CWP            0x01f
 
 /* 64-byte alignment -- this seems the best place to put this. */
-#define BLOCK_SIZE     64
-#define BLOCK_ALIGN    0x3f
+#define SPARC64_BLOCK_SIZE     64
+#define SPARC64_BLOCK_ALIGN    0x3f
 
 #if defined(_KERNEL) && !defined(_LOCORE)
 
diff -r 514380a17aec -r 38c0245d4d9d sys/arch/sparc64/include/reg.h
--- a/sys/arch/sparc64/include/reg.h    Tue Jul 12 05:31:49 2011 +0000
+++ b/sys/arch/sparc64/include/reg.h    Tue Jul 12 07:51:33 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: reg.h,v 1.13 2005/12/11 12:19:10 christos Exp $ */
+/*     $NetBSD: reg.h,v 1.14 2011/07/12 07:51:34 mrg Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -171,7 +171,7 @@
  * XXXX UltraSPARC processors don't implement a floating point queue.
  */
 #define        FP_QSIZE        16
-#define ALIGNFPSTATE(f)                ((struct fpstate64 *)(((long)(f))&(~BLOCK_ALIGN)))
+#define ALIGNFPSTATE(f)                ((struct fpstate64 *)(((long)(f))&(~SPARC64_BLOCK_ALIGN)))
 
 struct fp_qentry {
        int     *fq_addr;               /* the instruction's address */
diff -r 514380a17aec -r 38c0245d4d9d sys/arch/sparc64/sparc64/cpu.c
--- a/sys/arch/sparc64/sparc64/cpu.c    Tue Jul 12 05:31:49 2011 +0000
+++ b/sys/arch/sparc64/sparc64/cpu.c    Tue Jul 12 07:51:33 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpu.c,v 1.99 2011/06/18 18:51:18 nakayama Exp $ */
+/*     $NetBSD: cpu.c,v 1.100 2011/07/12 07:51:34 mrg Exp $ */
 
 /*
  * Copyright (c) 1996
@@ -52,7 +52,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.99 2011/06/18 18:51:18 nakayama Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.100 2011/07/12 07:51:34 mrg Exp $");
 
 #include "opt_multiprocessor.h"
 
@@ -269,8 +269,8 @@
         */
        if (ci->ci_flags & CPUF_PRIMARY) {
                fpstate_cache = pool_cache_init(sizeof(struct fpstate64),
-                                       BLOCK_SIZE, 0, 0, "fpstate", NULL,
-                                       IPL_NONE, NULL, NULL, NULL);
+                                       SPARC64_BLOCK_SIZE, 0, 0, "fpstate",
+                                       NULL, IPL_NONE, NULL, NULL, NULL);
                cpu_reset_fpustate();
        }
 #ifdef MULTIPROCESSOR
diff -r 514380a17aec -r 38c0245d4d9d sys/arch/sparc64/sparc64/locore.s
--- a/sys/arch/sparc64/sparc64/locore.s Tue Jul 12 05:31:49 2011 +0000
+++ b/sys/arch/sparc64/sparc64/locore.s Tue Jul 12 07:51:33 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: locore.s,v 1.334 2011/06/18 18:51:18 nakayama Exp $    */
+/*     $NetBSD: locore.s,v 1.335 2011/07/12 07:51:34 mrg Exp $ */
 
 /*
  * Copyright (c) 2006-2010 Matthew R. Green
@@ -90,6 +90,9 @@
 #include <machine/locore.h>
 #include <sys/syscall.h>
 
+#define BLOCK_SIZE SPARC64_BLOCK_SIZE
+#define BLOCK_ALIGN SPARC64_BLOCK_ALIGN
+
 #include "ksyms.h"
 
 #if 1
diff -r 514380a17aec -r 38c0245d4d9d sys/arch/sparc64/sparc64/memcpyset.s
--- a/sys/arch/sparc64/sparc64/memcpyset.s      Tue Jul 12 05:31:49 2011 +0000
+++ b/sys/arch/sparc64/sparc64/memcpyset.s      Tue Jul 12 07:51:33 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: memcpyset.s,v 1.2 2010/03/07 00:42:58 mrg Exp $        */
+/*     $NetBSD: memcpyset.s,v 1.3 2011/07/12 07:51:34 mrg Exp $        */
 
 /*
  * Copyright (c) 1996-2002 Eduardo Horvath
@@ -37,6 +37,9 @@
 
 #ifdef USE_BLOCK_STORE_LOAD
 
+#define BLOCK_SIZE SPARC64_BLOCK_SIZE
+#define BLOCK_ALIGN SPARC64_BLOCK_ALIGN
+
 /*
  * The following routines allow fpu use in the kernel.
  *
diff -r 514380a17aec -r 38c0245d4d9d sys/arch/sparc64/sparc64/mp_subr.S
--- a/sys/arch/sparc64/sparc64/mp_subr.S        Tue Jul 12 05:31:49 2011 +0000
+++ b/sys/arch/sparc64/sparc64/mp_subr.S        Tue Jul 12 07:51:33 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mp_subr.S,v 1.2 2010/05/29 21:59:34 martin Exp $       */
+/*     $NetBSD: mp_subr.S,v 1.3 2011/07/12 07:51:34 mrg Exp $  */
 
 /*
  * Copyright (c) 2006-2010 Matthew R. Green
@@ -84,6 +84,8 @@
        .register       %g2,#scratch
        .register       %g3,#scratch
 
+#define BLOCK_SIZE SPARC64_BLOCK_SIZE
+#define BLOCK_ALIGN SPARC64_BLOCK_ALIGN
 
 #if defined(MULTIPROCESSOR)
 /*
diff -r 514380a17aec -r 38c0245d4d9d sys/arch/sparc64/sparc64/pmap.c
--- a/sys/arch/sparc64/sparc64/pmap.c   Tue Jul 12 05:31:49 2011 +0000
+++ b/sys/arch/sparc64/sparc64/pmap.c   Tue Jul 12 07:51:33 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pmap.c,v 1.274 2011/06/18 18:51:18 nakayama Exp $      */
+/*     $NetBSD: pmap.c,v 1.275 2011/07/12 07:51:34 mrg Exp $   */
 /*
  *
  * Copyright (C) 1996-1999 Eduardo Horvath.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.274 2011/06/18 18:51:18 nakayama Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.275 2011/07/12 07:51:34 mrg Exp $");
 
 #undef NO_VCACHE /* Don't forget the locked TLB in dostart */
 #define        HWREF
@@ -1291,8 +1291,9 @@
        /*
         * initialize the pmap pools.
         */
-       pool_cache_bootstrap(&pmap_cache, sizeof(struct pmap), BLOCK_SIZE, 0,
-           0, "pmappl", NULL, IPL_NONE, NULL, NULL, NULL);
+       pool_cache_bootstrap(&pmap_cache, sizeof(struct pmap),
+           SPARC64_BLOCK_SIZE, 0, 0, "pmappl", NULL, IPL_NONE, NULL, NULL,
+           NULL);
        pool_cache_bootstrap(&pmap_pv_cache, sizeof(struct pv_entry), 0, 0,
            PR_LARGECACHE, "pv_entry", NULL, IPL_NONE, NULL, NULL, NULL);
 
diff -r 514380a17aec -r 38c0245d4d9d sys/arch/sparc64/sparc64/svr4_sigcode64.s
--- a/sys/arch/sparc64/sparc64/svr4_sigcode64.s Tue Jul 12 05:31:49 2011 +0000
+++ b/sys/arch/sparc64/sparc64/svr4_sigcode64.s Tue Jul 12 07:51:33 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: svr4_sigcode64.s,v 1.3 2002/05/05 08:15:15 thorpej Exp $       */
+/*     $NetBSD: svr4_sigcode64.s,v 1.4 2011/07/12 07:51:34 mrg Exp $   */
 
 /*
  * Copyright (c) 1996-2000 Eduardo Horvath
@@ -69,6 +69,9 @@
        .register       %g2,#scratch
        .register       %g3,#scratch
 
+#define BLOCK_SIZE SPARC64_BLOCK_SIZE
+#define BLOCK_ALIGN SPARC64_BLOCK_ALIGN
+
 /*
  * XXXXX Not implemented yet
  *
diff -r 514380a17aec -r 38c0245d4d9d sys/arch/sparc64/sparc64/trap.c
--- a/sys/arch/sparc64/sparc64/trap.c   Tue Jul 12 05:31:49 2011 +0000
+++ b/sys/arch/sparc64/sparc64/trap.c   Tue Jul 12 07:51:33 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: trap.c,v 1.166 2011/06/23 13:39:40 nakayama Exp $ */
+/*     $NetBSD: trap.c,v 1.167 2011/07/12 07:51:34 mrg Exp $ */
 
 /*
  * Copyright (c) 1996-2002 Eduardo Horvath.  All rights reserved.
@@ -50,7 +50,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.166 2011/06/23 13:39:40 nakayama Exp $");
+__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.167 2011/07/12 07:51:34 mrg Exp $");
 
 #include "opt_ddb.h"
 #include "opt_multiprocessor.h"
@@ -165,7 +165,7 @@
  * set, no matter how it is interpreted.  Appendix N of the Sparc V8 document
  * seems to imply that we should do this, and it does make sense.
  */
-const struct fpstate64 initfpstate __aligned(BLOCK_SIZE) = {
+const struct fpstate64 initfpstate __aligned(SPARC64_BLOCK_SIZE) = {
        .fs_regs =
        { ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0,
          ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0,



Home | Main Index | Thread Index | Old Index