Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/alpha/include Since struct cpu_data isn't the first...



details:   https://anonhg.NetBSD.org/src/rev/8aaed2a5bd8f
branches:  trunk
changeset: 760099:8aaed2a5bd8f
user:      he <he%NetBSD.org@localhost>
date:      Sun Dec 26 18:00:41 2010 +0000

description:
Since struct cpu_data isn't the first member in struct cpu_info, instead
expose the initial portion of struct cpu_info if _KMEMUSER is defined.

diffstat:

 sys/arch/alpha/include/cpu.h |  12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diffs (45 lines):

diff -r bb47a0c47621 -r 8aaed2a5bd8f sys/arch/alpha/include/cpu.h
--- a/sys/arch/alpha/include/cpu.h      Sun Dec 26 17:48:37 2010 +0000
+++ b/sys/arch/alpha/include/cpu.h      Sun Dec 26 18:00:41 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.h,v 1.74 2008/04/28 20:23:11 martin Exp $ */
+/* $NetBSD: cpu.h,v 1.75 2010/12/26 18:00:41 he Exp $ */
 
 /*-
  * Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -120,10 +120,12 @@
 
 #include <machine/alpha_cpu.h>
 
-#ifdef _KERNEL
+#if defined(_KERNEL) || defined(_KMEMUSER)
 #include <sys/cpu_data.h>
+#ifndef _KMEMUSER
 #include <sys/cctr.h>
 #include <machine/frame.h>
+#endif
 
 /*
  * Machine check information.
@@ -145,6 +147,7 @@
         */
        struct lwp *ci_curlwp;          /* current owner of the processor */
        struct cpu_data ci_data;        /* MI per-cpu data */
+#ifndef _KMEMUSER
        struct cctr_state ci_cc;        /* cycle counter state */
        struct cpu_info *ci_next;       /* next cpu_info structure */
        int ci_mtx_count;
@@ -165,8 +168,13 @@
        volatile u_long ci_flags;       /* flags; see below */
        volatile u_long ci_ipis;        /* interprocessor interrupts pending */
 #endif
+#endif /* _KMEMUSER */
 };
 
+#endif /* _KERNEL || _KMEMUSER */
+
+#if defined(_KERNEL)
+
 #define        CPUF_PRIMARY    0x01            /* CPU is primary CPU */
 #define        CPUF_PRESENT    0x02            /* CPU is present */
 #define        CPUF_RUNNING    0x04            /* CPU is running */



Home | Main Index | Thread Index | Old Index