Module Name: src
Committed By: martin
Date: Tue Oct 6 20:03:06 UTC 2015
Modified Files:
src/sys/arch/sparc/include: frame.h openfirm.h types.h
Log Message:
Do not use #ifdef SUN4U when testing for cpu features of post-v8 CPUs,
it is not good for SUN4V-only kernels. Instead use __sparc_v9__ (which
is also defined by the sparc compiler when called with cpu=ultrasparc).
ok: mrg@
To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/sparc/include/frame.h \
src/sys/arch/sparc/include/openfirm.h
cvs rdiff -u -r1.63 -r1.64 src/sys/arch/sparc/include/types.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/sparc/include/frame.h
diff -u src/sys/arch/sparc/include/frame.h:1.8 src/sys/arch/sparc/include/frame.h:1.9
--- src/sys/arch/sparc/include/frame.h:1.8 Tue Apr 12 07:54:16 2011
+++ src/sys/arch/sparc/include/frame.h Tue Oct 6 20:03:05 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: frame.h,v 1.8 2011/04/12 07:54:16 mrg Exp $ */
+/* $NetBSD: frame.h,v 1.9 2015/10/06 20:03:05 martin Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -56,7 +56,7 @@
* windows to the stack.
*/
#ifndef _LOCORE
-#ifndef SUN4U
+#ifndef __sparc_v9__
struct frame {
int32_t fr_local[8]; /* space to save locals (%l0..%l7) */
int32_t fr_arg[6]; /* space to save arguments (%i0..%i5) */
Index: src/sys/arch/sparc/include/openfirm.h
diff -u src/sys/arch/sparc/include/openfirm.h:1.8 src/sys/arch/sparc/include/openfirm.h:1.9
--- src/sys/arch/sparc/include/openfirm.h:1.8 Fri Mar 27 06:10:25 2015
+++ src/sys/arch/sparc/include/openfirm.h Tue Oct 6 20:03:05 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: openfirm.h,v 1.8 2015/03/27 06:10:25 nakayama Exp $ */
+/* $NetBSD: openfirm.h,v 1.9 2015/10/06 20:03:05 martin Exp $ */
/*
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -39,7 +39,7 @@
#include <dev/ofw/openfirm.h>
-#ifdef SUN4U
+#ifdef __sparc_v9__
/* All cells are 8 byte slots */
typedef uint64_t cell_t;
#ifdef __arch64__
@@ -52,14 +52,14 @@ typedef uint64_t cell_t;
#define HDQ2CELL_HI(x) (cell_t)(0)
#define HDQ2CELL_LO(x) (cell_t)(x)
#define CELL2HDQ(hi,lo) (lo)
-#else /* SUN4U */
+#else /* __sparc_v9__ */
/* All cells are 4 byte slots */
typedef uint32_t cell_t;
#define HDL2CELL(x) (cell_t)(x)
#define ADR2CELL(x) (cell_t)(x)
#define HDQ2CELL_HI(x) (cell_t)((x) >> 32)
#define HDQ2CELL_LO(x) (cell_t)(x)
-#endif /* SUN4U */
+#endif /* __sparc_v9__ */
int OF_test(const char *);
int OF_test_method(int, const char *);
Index: src/sys/arch/sparc/include/types.h
diff -u src/sys/arch/sparc/include/types.h:1.63 src/sys/arch/sparc/include/types.h:1.64
--- src/sys/arch/sparc/include/types.h:1.63 Thu Aug 27 12:30:51 2015
+++ src/sys/arch/sparc/include/types.h Tue Oct 6 20:03:05 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: types.h,v 1.63 2015/08/27 12:30:51 pooka Exp $ */
+/* $NetBSD: types.h,v 1.64 2015/10/06 20:03:05 martin Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -73,7 +73,7 @@ typedef unsigned long long int register6
#if defined(_KERNEL)
typedef struct label_t {
-#ifdef SUN4U
+#ifdef __sparc_v9__
register64_t val[2];
#else
register_t val[3];
@@ -87,7 +87,7 @@ typedef vaddr_t vsize_t;
#define PRIxVADDR "lx"
#define PRIxVSIZE "lx"
#define PRIuVSIZE "lu"
-#ifdef SUN4U
+#ifdef __sparc_v9__
#ifdef __arch64__
typedef unsigned long int paddr_t;
#define PRIxPADDR "lx"
@@ -102,7 +102,7 @@ typedef unsigned long long int paddr_t;
typedef unsigned long int paddr_t;
#define PRIxPADDR "lx"
#define PRIuPSIZE "lu"
-#endif /* SUN4U */
+#endif /* __sparc_v9__ */
typedef paddr_t psize_t;
#define PRIxPSIZE PRIxPADDR
#endif
@@ -124,7 +124,7 @@ typedef unsigned char __cpu_simple_lock
#define __HAVE_CPU_VMSPACE_EXEC
#define __HAVE_RAS
-#ifdef SUN4U
+#ifdef __sparc_v9__
#define __HAVE_DEVICE_REGISTER_POSTCONFIG
#define __HAVE_ATOMIC64_OPS
#define __HAVE_CPU_COUNTER /* sparc v9 CPUs have %tick */