Module Name: src Committed By: he Date: Sun Dec 26 18:00:42 UTC 2010
Modified Files: src/sys/arch/alpha/include: cpu.h Log Message: 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. To generate a diff of this commit: cvs rdiff -u -r1.74 -r1.75 src/sys/arch/alpha/include/cpu.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/alpha/include/cpu.h diff -u src/sys/arch/alpha/include/cpu.h:1.74 src/sys/arch/alpha/include/cpu.h:1.75 --- src/sys/arch/alpha/include/cpu.h:1.74 Mon Apr 28 20:23:11 2008 +++ src/sys/arch/alpha/include/cpu.h Sun Dec 26 18:00:41 2010 @@ -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 */