Module Name: src Committed By: matt Date: Wed Dec 22 02:42:29 UTC 2010
Modified Files: src/sys/arch/amiga/include: cpu.h src/sys/arch/atari/include: cpu.h src/sys/arch/cesfic/include: cpu.h src/sys/arch/hp300/include: cpu.h src/sys/arch/luna68k/include: cpu.h src/sys/arch/m68k/include: cpu.h types.h src/sys/arch/mac68k/include: cpu.h src/sys/arch/mvme68k/include: cpu.h src/sys/arch/news68k/include: cpu.h src/sys/arch/next68k/include: cpu.h src/sys/arch/sun68k/include: cpu.h src/sys/arch/x68k/include: cpu.h Log Message: Collect cpu_info and friends and move to m68k/include/cpu.h Add a define __HAVE_CPU_DATA_FIRST which means that cpu_data is the first member in struct cpu_info. To generate a diff of this commit: cvs rdiff -u -r1.75 -r1.76 src/sys/arch/amiga/include/cpu.h cvs rdiff -u -r1.64 -r1.65 src/sys/arch/atari/include/cpu.h cvs rdiff -u -r1.24 -r1.25 src/sys/arch/cesfic/include/cpu.h cvs rdiff -u -r1.62 -r1.63 src/sys/arch/hp300/include/cpu.h cvs rdiff -u -r1.27 -r1.28 src/sys/arch/luna68k/include/cpu.h cvs rdiff -u -r1.11 -r1.12 src/sys/arch/m68k/include/cpu.h cvs rdiff -u -r1.28 -r1.29 src/sys/arch/m68k/include/types.h cvs rdiff -u -r1.93 -r1.94 src/sys/arch/mac68k/include/cpu.h cvs rdiff -u -r1.44 -r1.45 src/sys/arch/mvme68k/include/cpu.h cvs rdiff -u -r1.36 -r1.37 src/sys/arch/news68k/include/cpu.h cvs rdiff -u -r1.42 -r1.43 src/sys/arch/next68k/include/cpu.h cvs rdiff -u -r1.21 -r1.22 src/sys/arch/sun68k/include/cpu.h cvs rdiff -u -r1.50 -r1.51 src/sys/arch/x68k/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/amiga/include/cpu.h diff -u src/sys/arch/amiga/include/cpu.h:1.75 src/sys/arch/amiga/include/cpu.h:1.76 --- src/sys/arch/amiga/include/cpu.h:1.75 Tue Feb 9 18:13:10 2010 +++ src/sys/arch/amiga/include/cpu.h Wed Dec 22 02:42:27 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.h,v 1.75 2010/02/09 18:13:10 phx Exp $ */ +/* $NetBSD: cpu.h,v 1.76 2010/12/22 02:42:27 matt Exp $ */ /* * Copyright (c) 1982, 1990 The Regents of the University of California. @@ -94,28 +94,6 @@ #include <m68k/cpu.h> #define M68K_MMU_MOTOROLA -#include <sys/cpu_data.h> -struct cpu_info { - struct cpu_data ci_data; /* MI per-cpu data */ - cpuid_t ci_cpuid; - int ci_mtx_count; - int ci_mtx_oldspl; - int ci_want_resched; -}; - -extern struct cpu_info cpu_info_store; - -#define curcpu() (&cpu_info_store) - -/* - * definitions of cpu-dependent requirements - * referenced in generic code - */ -#define cpu_number() 0 - -void cpu_proc_fork(struct proc *, struct proc *); - - extern volatile unsigned int interrupt_depth; /* * Arguments to hardclock and gatherstats encapsulate the previous Index: src/sys/arch/atari/include/cpu.h diff -u src/sys/arch/atari/include/cpu.h:1.64 src/sys/arch/atari/include/cpu.h:1.65 --- src/sys/arch/atari/include/cpu.h:1.64 Mon Nov 23 00:11:43 2009 +++ src/sys/arch/atari/include/cpu.h Wed Dec 22 02:42:27 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.h,v 1.64 2009/11/23 00:11:43 rmind Exp $ */ +/* $NetBSD: cpu.h,v 1.65 2010/12/22 02:42:27 matt Exp $ */ /* * Copyright (c) 1982, 1990 The Regents of the University of California. @@ -95,25 +95,6 @@ #include <m68k/cpu.h> #define M68K_MMU_MOTOROLA -#include <sys/cpu_data.h> -struct cpu_info { - struct cpu_data ci_data; /* MI per-cpu data */ - cpuid_t ci_cpuid; - int ci_want_resched; - int ci_mtx_count; - int ci_mtx_oldspl; -}; - -extern struct cpu_info cpu_info_store; - -#define curcpu() (&cpu_info_store) - -/* - * definitions of cpu-dependent requirements - * referenced in generic code - */ -#define cpu_number() 0 - void cpu_proc_fork(struct proc *, struct proc *); /* Index: src/sys/arch/cesfic/include/cpu.h diff -u src/sys/arch/cesfic/include/cpu.h:1.24 src/sys/arch/cesfic/include/cpu.h:1.25 --- src/sys/arch/cesfic/include/cpu.h:1.24 Sun Jun 6 04:50:06 2010 +++ src/sys/arch/cesfic/include/cpu.h Wed Dec 22 02:42:27 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.h,v 1.24 2010/06/06 04:50:06 mrg Exp $ */ +/* $NetBSD: cpu.h,v 1.25 2010/12/22 02:42:27 matt Exp $ */ /* * Copyright (c) 1982, 1990, 1993 @@ -91,27 +91,6 @@ */ #include <m68k/cpu.h> -#include <sys/cpu_data.h> -struct cpu_info { - struct cpu_data ci_data; /* MI per-cpu data */ - cpuid_t ci_cpuid; - int ci_mtx_count; - int ci_mtx_oldspl; - int ci_want_resched; -}; - -extern struct cpu_info cpu_info_store; - -#define curcpu() (&cpu_info_store) - -/* - * definitions of cpu-dependent requirements - * referenced in generic code - */ -#define cpu_number() 0 - -void cpu_proc_fork(struct proc *, struct proc *); - /* * Arguments to hardclock and gatherstats encapsulate the previous * machine state in an opaque clockframe. One the hp300, we use Index: src/sys/arch/hp300/include/cpu.h diff -u src/sys/arch/hp300/include/cpu.h:1.62 src/sys/arch/hp300/include/cpu.h:1.63 --- src/sys/arch/hp300/include/cpu.h:1.62 Fri Dec 11 19:43:18 2009 +++ src/sys/arch/hp300/include/cpu.h Wed Dec 22 02:42:27 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.h,v 1.62 2009/12/11 19:43:18 tsutsui Exp $ */ +/* $NetBSD: cpu.h,v 1.63 2010/12/22 02:42:27 matt Exp $ */ /* * Copyright (c) 1982, 1990, 1993 @@ -100,27 +100,6 @@ */ #include <machine/intr.h> -#include <sys/cpu_data.h> -struct cpu_info { - struct cpu_data ci_data; /* MI per-cpu data */ - cpuid_t ci_cpuid; - int ci_mtx_count; - int ci_mtx_oldspl; - int ci_want_resched; -}; - -extern struct cpu_info cpu_info_store; - -#define curcpu() (&cpu_info_store) - -/* - * definitions of cpu-dependent requirements - * referenced in generic code - */ -#define cpu_number() 0 - -void cpu_proc_fork(struct proc *, struct proc *); - /* * Arguments to hardclock and gatherstats encapsulate the previous * machine state in an opaque clockframe. One the hp300, we use Index: src/sys/arch/luna68k/include/cpu.h diff -u src/sys/arch/luna68k/include/cpu.h:1.27 src/sys/arch/luna68k/include/cpu.h:1.28 --- src/sys/arch/luna68k/include/cpu.h:1.27 Wed Oct 21 21:12:00 2009 +++ src/sys/arch/luna68k/include/cpu.h Wed Dec 22 02:42:27 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.h,v 1.27 2009/10/21 21:12:00 rmind Exp $ */ +/* $NetBSD: cpu.h,v 1.28 2010/12/22 02:42:27 matt Exp $ */ /* * Copyright (c) 1982, 1990, 1993 @@ -91,27 +91,6 @@ #include <m68k/cpu.h> #define M68K_MMU_MOTOROLA -#include <sys/cpu_data.h> -struct cpu_info { - struct cpu_data ci_data; /* MI per-cpu data */ - cpuid_t ci_cpuid; - int ci_mtx_count; - int ci_mtx_oldspl; - int ci_want_resched; -}; - -extern struct cpu_info cpu_info_store; - -#define curcpu() (&cpu_info_store) - -/* - * definitions of cpu-dependent requirements - * referenced in generic code - */ -#define cpu_number() 0 - -void cpu_proc_fork(struct proc *, struct proc *); - /* * Arguments to hardclock and gatherstats encapsulate the previous * machine state in an opaque clockframe. One the luna68k, we use Index: src/sys/arch/m68k/include/cpu.h diff -u src/sys/arch/m68k/include/cpu.h:1.11 src/sys/arch/m68k/include/cpu.h:1.12 --- src/sys/arch/m68k/include/cpu.h:1.11 Sun Dec 11 12:17:53 2005 +++ src/sys/arch/m68k/include/cpu.h Wed Dec 22 02:42:28 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.h,v 1.11 2005/12/11 12:17:53 christos Exp $ */ +/* $NetBSD: cpu.h,v 1.12 2010/12/22 02:42:28 matt Exp $ */ /* * Copyright (c) 1982, 1990, 1993 @@ -197,11 +197,32 @@ #define CACHE60_ON (CACHE40_ON|IC60_CABC|IC60_EBC|DC60_ESB) #define CACHE60_OFF (CACHE40_OFF|IC60_CABC) +#include <sys/cpu_data.h> + +#if defined(_KERNEL) || defined(_KMEMUSER) +struct cpu_info { + struct cpu_data ci_data; /* MI per-cpu data */ + cpuid_t ci_cpuid; + int ci_mtx_count; + int ci_mtx_oldspl; + volatile int ci_want_resched; + volatile int ci_idepth; +}; +#endif /* _KERNEL || _KMEMUSER */ + #ifdef _KERNEL +extern struct cpu_info cpu_info_store; + +struct proc; +void cpu_proc_fork(struct proc *, struct proc *); + +#define curcpu() (&cpu_info_store) + /* - * From m68k/syscall.c + * definitions of cpu-dependent requirements + * referenced in generic code */ -/* extern void syscall(register_t, struct frame); Only called from locore.s */ +#define cpu_number() 0 #define LWP_PC(l) (((struct trapframe *)((l)->l_md.md_regs))->tf_pc) #endif /* _KERNEL */ Index: src/sys/arch/m68k/include/types.h diff -u src/sys/arch/m68k/include/types.h:1.28 src/sys/arch/m68k/include/types.h:1.29 --- src/sys/arch/m68k/include/types.h:1.28 Fri Dec 11 05:52:03 2009 +++ src/sys/arch/m68k/include/types.h Wed Dec 22 02:42:28 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: types.h,v 1.28 2009/12/11 05:52:03 matt Exp $ */ +/* $NetBSD: types.h,v 1.29 2010/12/22 02:42:28 matt Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -72,6 +72,7 @@ #define __NO_STRICT_ALIGNMENT #define __HAVE_SYSCALL_INTERN +#define __HAVE_CPU_DATA_FIRST #if defined(_KERNEL) #define __HAVE_RAS Index: src/sys/arch/mac68k/include/cpu.h diff -u src/sys/arch/mac68k/include/cpu.h:1.93 src/sys/arch/mac68k/include/cpu.h:1.94 --- src/sys/arch/mac68k/include/cpu.h:1.93 Wed Oct 21 21:12:00 2009 +++ src/sys/arch/mac68k/include/cpu.h Wed Dec 22 02:42:28 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.h,v 1.93 2009/10/21 21:12:00 rmind Exp $ */ +/* $NetBSD: cpu.h,v 1.94 2010/12/22 02:42:28 matt Exp $ */ /* * Copyright (c) 1982, 1990 The Regents of the University of California. @@ -115,28 +115,6 @@ */ #include <machine/intr.h> -#include <sys/cpu_data.h> -struct cpu_info { - struct cpu_data ci_data; /* MI per-cpu data */ - cpuid_t ci_cpuid; - int ci_mtx_oldspl; - int ci_mtx_count; - int ci_want_resched; -}; - -extern struct cpu_info cpu_info_store; - -#define curcpu() (&cpu_info_store) - -/* - * definitions of cpu-dependent requirements - * referenced in generic code - */ -#define cpu_number() 0 - -void cpu_proc_fork(struct proc *, struct proc *); - - /* * Arguments to hardclock and gatherstats encapsulate the previous * machine state in an opaque clockframe. One the hp300, we use Index: src/sys/arch/mvme68k/include/cpu.h diff -u src/sys/arch/mvme68k/include/cpu.h:1.44 src/sys/arch/mvme68k/include/cpu.h:1.45 --- src/sys/arch/mvme68k/include/cpu.h:1.44 Sun Jun 6 04:50:07 2010 +++ src/sys/arch/mvme68k/include/cpu.h Wed Dec 22 02:42:28 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.h,v 1.44 2010/06/06 04:50:07 mrg Exp $ */ +/* $NetBSD: cpu.h,v 1.45 2010/12/22 02:42:28 matt Exp $ */ /* * Copyright (c) 1982, 1990, 1993 @@ -96,27 +96,6 @@ #include <m68k/cpu.h> #define M68K_MMU_MOTOROLA -#include <sys/cpu_data.h> -struct cpu_info { - struct cpu_data ci_data; /* MI per-cpu data */ - cpuid_t ci_cpuid; - int ci_mtx_count; - int ci_mtx_oldspl; - int ci_want_resched; -}; - -extern struct cpu_info cpu_info_store; - -#define curcpu() (&cpu_info_store) - -/* - * definitions of cpu-dependent requirements - * referenced in generic code - */ -#define cpu_number() 0 - -void cpu_proc_fork(struct proc *, struct proc *); - /* * Arguments to hardclock and gatherstats encapsulate the previous * machine state in an opaque clockframe. One the mvme68k, we use Index: src/sys/arch/news68k/include/cpu.h diff -u src/sys/arch/news68k/include/cpu.h:1.36 src/sys/arch/news68k/include/cpu.h:1.37 --- src/sys/arch/news68k/include/cpu.h:1.36 Sun Jun 6 04:50:07 2010 +++ src/sys/arch/news68k/include/cpu.h Wed Dec 22 02:42:28 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.h,v 1.36 2010/06/06 04:50:07 mrg Exp $ */ +/* $NetBSD: cpu.h,v 1.37 2010/12/22 02:42:28 matt Exp $ */ /* * Copyright (c) 1982, 1990, 1993 @@ -116,27 +116,6 @@ */ #include <machine/intr.h> -#include <sys/cpu_data.h> -struct cpu_info { - struct cpu_data ci_data; /* MI per-cpu data */ - cpuid_t ci_cpuid; - int ci_mtx_count; - int ci_mtx_oldspl; - int ci_want_resched; -}; - -extern struct cpu_info cpu_info_store; - -#define curcpu() (&cpu_info_store) - -/* - * definitions of cpu-dependent requirements - * referenced in generic code - */ -#define cpu_number() 0 - -void cpu_proc_fork(struct proc *, struct proc *); - /* * Arguments to hardclock and gatherstats encapsulate the previous * machine state in an opaque clockframe. One the hp300, we use Index: src/sys/arch/next68k/include/cpu.h diff -u src/sys/arch/next68k/include/cpu.h:1.42 src/sys/arch/next68k/include/cpu.h:1.43 --- src/sys/arch/next68k/include/cpu.h:1.42 Sun Jun 6 04:50:08 2010 +++ src/sys/arch/next68k/include/cpu.h Wed Dec 22 02:42:28 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.h,v 1.42 2010/06/06 04:50:08 mrg Exp $ */ +/* $NetBSD: cpu.h,v 1.43 2010/12/22 02:42:28 matt Exp $ */ /* * Copyright (c) 1982, 1990, 1993 @@ -103,28 +103,6 @@ */ #include <machine/intr.h> -#include <sys/cpu_data.h> -struct cpu_info { - struct cpu_data ci_data; /* MI per-cpu data */ - cpuid_t ci_cpuid; - int ci_mtx_count; - int ci_mtx_oldspl; - int ci_want_resched; -}; - -extern struct cpu_info cpu_info_store; - -#define curcpu() (&cpu_info_store) - -/* - * definitions of cpu-dependent requirements - * referenced in generic code - */ -#define cpu_number() 0 - -void cpu_proc_fork(struct proc *, struct proc *); - - /* * Arguments to hardclock and gatherstats encapsulate the previous * machine state in an opaque clockframe. One the hp300, we use Index: src/sys/arch/sun68k/include/cpu.h diff -u src/sys/arch/sun68k/include/cpu.h:1.21 src/sys/arch/sun68k/include/cpu.h:1.22 --- src/sys/arch/sun68k/include/cpu.h:1.21 Wed Oct 21 21:12:03 2009 +++ src/sys/arch/sun68k/include/cpu.h Wed Dec 22 02:42:29 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.h,v 1.21 2009/10/21 21:12:03 rmind Exp $ */ +/* $NetBSD: cpu.h,v 1.22 2010/12/22 02:42:29 matt Exp $ */ /* * Copyright (c) 1982, 1990 The Regents of the University of California. @@ -102,27 +102,6 @@ * code to identify machine-dependent functions, etc. */ -#include <sys/cpu_data.h> -struct cpu_info { - struct cpu_data ci_data; /* MI per-cpu data */ - cpuid_t ci_cpuid; - int ci_mtx_count; - int ci_mtx_oldspl; - int ci_want_resched; -}; - -extern struct cpu_info cpu_info_store; - -#define curcpu() (&cpu_info_store) - -/* - * definitions of cpu-dependent requirements - * referenced in generic code - */ -#define cpu_number() 0 - -void cpu_proc_fork(struct proc *, struct proc *); - /* * Arguments to hardclock and gatherstats encapsulate the previous * machine state in an opaque clockframe. On the sun68k, we use Index: src/sys/arch/x68k/include/cpu.h diff -u src/sys/arch/x68k/include/cpu.h:1.50 src/sys/arch/x68k/include/cpu.h:1.51 --- src/sys/arch/x68k/include/cpu.h:1.50 Sun Jun 6 04:52:01 2010 +++ src/sys/arch/x68k/include/cpu.h Wed Dec 22 02:42:29 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.h,v 1.50 2010/06/06 04:52:01 mrg Exp $ */ +/* $NetBSD: cpu.h,v 1.51 2010/12/22 02:42:29 matt Exp $ */ /* * Copyright (c) 1982, 1990, 1993 @@ -101,27 +101,6 @@ */ #include <machine/intr.h> -#include <sys/cpu_data.h> -struct cpu_info { - struct cpu_data ci_data; /* MI per-cpu data */ - cpuid_t ci_cpuid; - int ci_mtx_count; - int ci_mtx_oldspl; - int ci_want_resched; -}; - -extern struct cpu_info cpu_info_store; - -#define curcpu() (&cpu_info_store) - -/* - * definitions of cpu-dependent requirements - * referenced in generic code - */ -#define cpu_number() 0 - -void cpu_proc_fork(struct proc *, struct proc *); - /* * Arguments to hardclock and gatherstats encapsulate the previous * machine state in an opaque clockframe. One the x68k, we use