Source-Changes-HG archive

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

[src/trunk]: src/sys/arch Centralize ARM CPU configuration information by add...



details:   https://anonhg.NetBSD.org/src/rev/4cc1ba714d58
branches:  trunk
changeset: 525533:4cc1ba714d58
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Fri Apr 12 18:50:29 2002 +0000

description:
Centralize ARM CPU configuration information by adding a new header
file, <arm/cpuconf.h>, which pulls in "opt_cputypes.h" and then defines
the following:
* CPU_NTYPES -- now many CPU types are configured into the kernel.  What
  you really want to know is "== 1" or "> 1".
* Defines ARM_ARCH_2, ARM_ARCH_3, ARM_ARCH_4, ARM_ARCH_5, depending
  on which ARM architecture versions are configured (based on CPU_*
  options).  Also defines ARM_NARCH to determins how many architecture
  versions are configured.
* Defines ARM_MMU_MEMC, ARM_MMU_GENERIC, ARM_MMU_XSCALE depending on
  which classes of ARM MMUs are configured into the kernel, and ARM_NMMUS
  to determine how many MMU classes are configured.

Remove the needless inclusion of "opt_cputypes.h" in several places.
Convert remaining users to <arm/cpuconf.h>.

diffstat:

 sys/arch/acorn26/acorn26/cpu.c             |    7 +-
 sys/arch/acorn26/acorn26/except.c          |    6 +-
 sys/arch/acorn26/acorn26/locore.S          |    7 +-
 sys/arch/acorn26/acorn26/pmap.c            |    7 +-
 sys/arch/acorn32/acorn32/rpc_machdep.c     |    7 +-
 sys/arch/arm/arm/cpufunc.c                 |    4 +-
 sys/arch/arm/arm/fiq_subr.S                |    4 +-
 sys/arch/arm/arm/undefined.c               |    5 +-
 sys/arch/arm/arm32/cpu.c                   |    7 +-
 sys/arch/arm/arm32/fault.c                 |    5 +-
 sys/arch/arm/conf/files.arm                |    4 +-
 sys/arch/arm/footbridge/footbridge.c       |    5 +-
 sys/arch/arm/include/arm32/pmap.h          |   36 +------
 sys/arch/arm/include/cpu.h                 |    4 +-
 sys/arch/arm/include/cpuconf.h             |  140 +++++++++++++++++++++++++++++
 sys/arch/arm/include/cpufunc.h             |   10 +-
 sys/arch/arm/sa11x0/sa11x0_irq.S           |    3 +-
 sys/arch/arm/sa11x0/sa11x0_irqhandler.c    |    3 +-
 sys/arch/cats/include/irqhandler.h         |    6 +-
 sys/arch/evbarm/ifpga/ifpga.c              |    3 +-
 sys/arch/evbarm/ifpga/irqhandler.h         |    6 +-
 sys/arch/hpcarm/hpcarm/hpc_machdep.c       |    4 +-
 sys/arch/hpcarm/include/irqhandler.h       |    6 +-
 sys/arch/hpcarm/sa11x0/sa11x0_irq.S        |    3 +-
 sys/arch/hpcarm/sa11x0/sa11x0_irqhandler.c |    4 +-
 sys/arch/netwinder/include/irqhandler.h    |    6 +-
 26 files changed, 197 insertions(+), 105 deletions(-)

diffs (truncated from 776 to 300 lines):

diff -r 4aba03ab7e14 -r 4cc1ba714d58 sys/arch/acorn26/acorn26/cpu.c
--- a/sys/arch/acorn26/acorn26/cpu.c    Fri Apr 12 18:44:57 2002 +0000
+++ b/sys/arch/acorn26/acorn26/cpu.c    Fri Apr 12 18:50:29 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.c,v 1.2 2002/03/24 23:37:42 bjh21 Exp $ */
+/* $NetBSD: cpu.c,v 1.3 2002/04/12 18:50:30 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2000, 2001 Ben Harris
@@ -32,7 +32,7 @@
 
 #include <sys/param.h>
 
-__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.2 2002/03/24 23:37:42 bjh21 Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.3 2002/04/12 18:50:30 thorpej Exp $");
 
 #include <sys/device.h>
 #include <sys/proc.h>
@@ -41,14 +41,13 @@
 #include <sys/user.h>
 #include <uvm/uvm_extern.h>
 #include <arm/armreg.h>
+#include <arm/cpuconf.h>
 #include <arm/undefined.h>
 #include <machine/machdep.h>
 #include <machine/pcb.h>
 
 #include <arch/acorn26/acorn26/cpuvar.h>
 
-#include "opt_cputypes.h"
-
 static int cpu_match(struct device *, struct cfdata *, void *);
 static void cpu_attach(struct device *, struct device *, void *);
 static int cpu_search(struct device *, struct cfdata *, void *);
diff -r 4aba03ab7e14 -r 4cc1ba714d58 sys/arch/acorn26/acorn26/except.c
--- a/sys/arch/acorn26/acorn26/except.c Fri Apr 12 18:44:57 2002 +0000
+++ b/sys/arch/acorn26/acorn26/except.c Fri Apr 12 18:50:29 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: except.c,v 1.2 2002/03/24 23:37:42 bjh21 Exp $ */
+/* $NetBSD: except.c,v 1.3 2002/04/12 18:50:30 thorpej Exp $ */
 /*-
  * Copyright (c) 1998, 1999, 2000 Ben Harris
  * All rights reserved.
@@ -31,9 +31,8 @@
 
 #include <sys/param.h>
 
-__KERNEL_RCSID(0, "$NetBSD: except.c,v 1.2 2002/03/24 23:37:42 bjh21 Exp $");
+__KERNEL_RCSID(0, "$NetBSD: except.c,v 1.3 2002/04/12 18:50:30 thorpej Exp $");
 
-#include "opt_cputypes.h"
 #include "opt_ddb.h"
 #include "opt_ktrace.h"
 
@@ -46,6 +45,7 @@
 #include <uvm/uvm_extern.h>
 
 #include <arm/armreg.h>
+#include <arm/cpuconf.h>
 #include <machine/intr.h>
 #include <machine/machdep.h>
 #include <machine/pcb.h>
diff -r 4aba03ab7e14 -r 4cc1ba714d58 sys/arch/acorn26/acorn26/locore.S
--- a/sys/arch/acorn26/acorn26/locore.S Fri Apr 12 18:44:57 2002 +0000
+++ b/sys/arch/acorn26/acorn26/locore.S Fri Apr 12 18:50:29 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: locore.S,v 1.2 2002/03/24 23:37:42 bjh21 Exp $ */
+/* $NetBSD: locore.S,v 1.3 2002/04/12 18:50:30 thorpej Exp $ */
 /*
  * Copyright (c) 1998, 1999, 2000 Ben Harris
  * Copyright (C) 1994-1997 Mark Brinicombe
@@ -44,7 +44,8 @@
 #include <arm/trap.h>
 #include "assym.h"
 
-#include "opt_cputypes.h"
+#include <arm/cpuconf.h>
+
 #include "opt_ddb.h"
 
 #include "fiq.h"
@@ -456,4 +457,4 @@
        .global _C_LABEL(eintrcnt)
 _C_LABEL(eintrcnt):
 
-RCSID("$NetBSD: locore.S,v 1.2 2002/03/24 23:37:42 bjh21 Exp $")
+RCSID("$NetBSD: locore.S,v 1.3 2002/04/12 18:50:30 thorpej Exp $")
diff -r 4aba03ab7e14 -r 4cc1ba714d58 sys/arch/acorn26/acorn26/pmap.c
--- a/sys/arch/acorn26/acorn26/pmap.c   Fri Apr 12 18:44:57 2002 +0000
+++ b/sys/arch/acorn26/acorn26/pmap.c   Fri Apr 12 18:50:29 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.2 2002/03/24 23:37:42 bjh21 Exp $ */
+/* $NetBSD: pmap.c,v 1.3 2002/04/12 18:50:30 thorpej Exp $ */
 /*-
  * Copyright (c) 1997, 1998, 2000 Ben Harris
  * All rights reserved.
@@ -96,14 +96,13 @@
  * referenced/modified emulation.
  */
 
-#include "opt_cputypes.h"
 #include "opt_ddb.h"
 #include "opt_uvmhist.h"
 #include "arcvideo.h"
 
 #include <sys/param.h>
 
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.2 2002/03/24 23:37:42 bjh21 Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.3 2002/04/12 18:50:30 thorpej Exp $");
 
 #include <sys/kernel.h> /* for cold */
 #include <sys/malloc.h>
@@ -113,6 +112,8 @@
 #include <uvm/uvm_extern.h>
 #include <uvm/uvm_stat.h>
 
+#include <arm/cpuconf.h>
+
 #include <machine/intr.h>
 #include <machine/machdep.h>
 #include <machine/memcreg.h>
diff -r 4aba03ab7e14 -r 4cc1ba714d58 sys/arch/acorn32/acorn32/rpc_machdep.c
--- a/sys/arch/acorn32/acorn32/rpc_machdep.c    Fri Apr 12 18:44:57 2002 +0000
+++ b/sys/arch/acorn32/acorn32/rpc_machdep.c    Fri Apr 12 18:50:29 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rpc_machdep.c,v 1.34 2002/04/10 22:30:44 thorpej Exp $ */
+/*     $NetBSD: rpc_machdep.c,v 1.35 2002/04/12 18:50:30 thorpej Exp $ */
 
 /*
  * Copyright (c) 2000-2001 Reinoud Zandijk.
@@ -47,8 +47,6 @@
  * Updated for new bootloader 22/10/00
  */
 
-
-#include "opt_cputypes.h"
 #include "opt_ddb.h"
 #include "opt_pmap_debug.h"
 #include "vidcvideo.h"
@@ -57,7 +55,7 @@
 
 #include <sys/param.h>
 
-__KERNEL_RCSID(0, "$NetBSD: rpc_machdep.c,v 1.34 2002/04/10 22:30:44 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rpc_machdep.c,v 1.35 2002/04/12 18:50:30 thorpej Exp $");
 
 #include <sys/systm.h>
 #include <sys/kernel.h>
@@ -80,6 +78,7 @@
 #include <machine/cpu.h>
 #include <machine/io.h>
 #include <machine/intr.h>
+#include <arm/cpuconf.h>
 #include <arm/arm32/katelib.h>
 #include <arm/arm32/machdep.h>
 #include <machine/vconsole.h>
diff -r 4aba03ab7e14 -r 4cc1ba714d58 sys/arch/arm/arm/cpufunc.c
--- a/sys/arch/arm/arm/cpufunc.c        Fri Apr 12 18:44:57 2002 +0000
+++ b/sys/arch/arm/arm/cpufunc.c        Fri Apr 12 18:50:29 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpufunc.c,v 1.40 2002/04/09 21:00:42 thorpej Exp $     */
+/*     $NetBSD: cpufunc.c,v 1.41 2002/04/12 18:50:31 thorpej Exp $     */
 
 /*
  * arm7tdmi support code Copyright (c) 2001 John Fremlin
@@ -46,7 +46,6 @@
  */
 
 #include "opt_compat_netbsd.h"
-#include "opt_cputypes.h"
 #include "opt_cpuoptions.h"
 
 #include <sys/types.h>
@@ -58,6 +57,7 @@
 
 #include <uvm/uvm.h>
 
+#include <arm/cpuconf.h>
 #include <arm/cpufunc.h>
 
 #ifdef CPU_XSCALE_80200
diff -r 4aba03ab7e14 -r 4cc1ba714d58 sys/arch/arm/arm/fiq_subr.S
--- a/sys/arch/arm/arm/fiq_subr.S       Fri Apr 12 18:44:57 2002 +0000
+++ b/sys/arch/arm/arm/fiq_subr.S       Fri Apr 12 18:50:29 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fiq_subr.S,v 1.2 2002/01/01 16:24:33 skrll Exp $       */
+/*     $NetBSD: fiq_subr.S,v 1.3 2002/04/12 18:50:31 thorpej Exp $     */
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -36,10 +36,10 @@
  */
 
 #include "assym.h"
-#include "opt_cputypes.h"
 
 #include <arm/armreg.h>
 #include <arm/asm.h>
+#include <arm/cpuconf.h>
 
 /*
  * MODE_CHANGE_NOP should be inserted between a mode change and a
diff -r 4aba03ab7e14 -r 4cc1ba714d58 sys/arch/arm/arm/undefined.c
--- a/sys/arch/arm/arm/undefined.c      Fri Apr 12 18:44:57 2002 +0000
+++ b/sys/arch/arm/arm/undefined.c      Fri Apr 12 18:50:29 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: undefined.c,v 1.13 2002/03/24 15:49:39 bjh21 Exp $     */
+/*     $NetBSD: undefined.c,v 1.14 2002/04/12 18:50:31 thorpej Exp $   */
 
 /*
  * Copyright (c) 2001 Ben Harris.
@@ -46,12 +46,11 @@
 
 #define FAST_FPE
 
-#include "opt_cputypes.h"
 #include "opt_ddb.h"
 
 #include <sys/param.h>
 
-__KERNEL_RCSID(0, "$NetBSD: undefined.c,v 1.13 2002/03/24 15:49:39 bjh21 Exp $");
+__KERNEL_RCSID(0, "$NetBSD: undefined.c,v 1.14 2002/04/12 18:50:31 thorpej Exp $");
 
 #include <sys/malloc.h>
 #include <sys/queue.h>
diff -r 4aba03ab7e14 -r 4cc1ba714d58 sys/arch/arm/arm32/cpu.c
--- a/sys/arch/arm/arm32/cpu.c  Fri Apr 12 18:44:57 2002 +0000
+++ b/sys/arch/arm/arm32/cpu.c  Fri Apr 12 18:50:29 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpu.c,v 1.32 2002/03/27 01:34:48 thorpej Exp $ */
+/*     $NetBSD: cpu.c,v 1.33 2002/04/12 18:50:31 thorpej Exp $ */
 
 /*
  * Copyright (c) 1995 Mark Brinicombe.
@@ -42,11 +42,10 @@
  */
 
 #include "opt_armfpe.h"
-#include "opt_cputypes.h"
 
 #include <sys/param.h>
 
-__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.32 2002/03/27 01:34:48 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.33 2002/04/12 18:50:31 thorpej Exp $");
 
 #include <sys/systm.h>
 #include <sys/malloc.h>
@@ -55,6 +54,8 @@
 #include <uvm/uvm_extern.h>
 #include <machine/conf.h>
 #include <machine/cpu.h>
+
+#include <arm/cpuconf.h>
 #include <arm/undefined.h>
 
 #ifdef ARMFPE
diff -r 4aba03ab7e14 -r 4cc1ba714d58 sys/arch/arm/arm32/fault.c
--- a/sys/arch/arm/arm32/fault.c        Fri Apr 12 18:44:57 2002 +0000
+++ b/sys/arch/arm/arm32/fault.c        Fri Apr 12 18:50:29 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fault.c,v 1.17 2002/04/04 12:39:55 skrll Exp $ */
+/*     $NetBSD: fault.c,v 1.18 2002/04/12 18:50:31 thorpej Exp $       */
 
 /*
  * Copyright (c) 1994-1997 Mark Brinicombe.
@@ -43,7 +43,6 @@
  * Created      : 28/11/94
  */
 
-#include "opt_cputypes.h"
 #include "opt_ddb.h"
 #include "opt_pmap_debug.h"
 
@@ -56,6 +55,8 @@
 
 #include <uvm/uvm_extern.h>
 
+#include <arm/cpuconf.h>
+
 #include <machine/frame.h>
 #include <arm/arm32/katelib.h>
 #include <machine/cpu.h>
diff -r 4aba03ab7e14 -r 4cc1ba714d58 sys/arch/arm/conf/files.arm
--- a/sys/arch/arm/conf/files.arm       Fri Apr 12 18:44:57 2002 +0000
+++ b/sys/arch/arm/conf/files.arm       Fri Apr 12 18:50:29 2002 +0000
@@ -1,9 +1,9 @@
-#      $NetBSD: files.arm,v 1.56 2002/03/26 19:29:45 thorpej Exp $
+#      $NetBSD: files.arm,v 1.57 2002/04/12 18:50:31 thorpej Exp $
 
 # temporary define to allow easy moving to ../arch/arm/arm32
 defflag                                ARM32
 
-# CPU types
+# CPU types.  Make sure to update <arm/cpuconf.h> if you change this list.
 defflag        opt_cputypes.h          CPU_ARM2 CPU_ARM250 CPU_ARM3
 defflag        opt_cputypes.h          CPU_ARM6 CPU_ARM7 CPU_ARM7TDMI CPU_ARM8
                                CPU_ARM9 CPU_SA110 CPU_SA1100 CPU_SA1110
diff -r 4aba03ab7e14 -r 4cc1ba714d58 sys/arch/arm/footbridge/footbridge.c
--- a/sys/arch/arm/footbridge/footbridge.c      Fri Apr 12 18:44:57 2002 +0000
+++ b/sys/arch/arm/footbridge/footbridge.c      Fri Apr 12 18:50:29 2002 +0000



Home | Main Index | Thread Index | Old Index