Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/powerpc/include All ports have to expose 'struct cp...



details:   https://anonhg.NetBSD.org/src/rev/59fba2cff981
branches:  trunk
changeset: 759953:59fba2cff981
user:      phx <phx%NetBSD.org@localhost>
date:      Tue Dec 21 20:39:53 2010 +0000

description:
All ports have to expose 'struct cpu_info' when _KMEMUSER is defined.
We will just expose cpu_info.ci_data for the moment, which is needed for
vmstat(1) to compile. Doing so with the whole cpu_info structure is
problematic, because of imask_t.

diffstat:

 sys/arch/powerpc/include/cpu.h |  11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diffs (49 lines):

diff -r c7a80f7525fa -r 59fba2cff981 sys/arch/powerpc/include/cpu.h
--- a/sys/arch/powerpc/include/cpu.h    Tue Dec 21 20:30:13 2010 +0000
+++ b/sys/arch/powerpc/include/cpu.h    Tue Dec 21 20:39:53 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpu.h,v 1.72 2010/11/13 13:13:34 uebayasi Exp $        */
+/*     $NetBSD: cpu.h,v 1.73 2010/12/21 20:39:53 phx Exp $     */
 
 /*
  * Copyright (C) 1999 Wolfgang Solfrank.
@@ -42,23 +42,26 @@
        int icache_line_size;
 };
 
-#ifdef _KERNEL
+#if defined(_KERNEL) || defined(_KMEMUSER)
 #if defined(_KERNEL_OPT)
 #include "opt_lockdebug.h"
 #include "opt_multiprocessor.h"
 #include "opt_ppcarch.h"
 #endif
 
+#ifdef _KERNEL
 #include <machine/frame.h>
 #include <machine/psl.h>
 #include <machine/intr.h>
 #include <sys/device_if.h>
 #include <sys/evcnt.h>
+#endif
 
 #include <sys/cpu_data.h>
 
 struct cpu_info {
        struct cpu_data ci_data;        /* MI per-cpu data */
+#ifdef _KERNEL
        struct device *ci_dev;          /* device of corresponding cpu */
        struct lwp *ci_curlwp;          /* current owner of the processor */
 
@@ -135,7 +138,11 @@
        struct evcnt ci_ev_vecsw;       /* Altivec context switches */
        struct evcnt ci_ev_umchk;       /* user MCHK events */
        struct evcnt ci_ev_ipi;         /* IPIs received */
+#endif /* _KERNEL */
 };
+#endif /* _KERNEL || _KMEMUSER */
+
+#ifdef _KERNEL
 
 #ifdef MULTIPROCESSOR
 



Home | Main Index | Thread Index | Old Index