From d2fa9e53296500e425f5b633143cd865981a4a33 Mon Sep 17 00:00:00 2001 From: matt Date: Thu, 31 Aug 2006 16:49:21 +0000 Subject: [PATCH] Make cpu_coredump dependent on COREDUMP --- sys/arch/m68k/m68k/vm_machdep.c | 8 ++++++-- sys/arch/mips/mips/vm_machdep.c | 7 +++++-- sys/arch/powerpc/powerpc/vm_machdep.c | 7 +++++-- sys/arch/sh3/sh3/vm_machdep.c | 7 +++++-- sys/arch/sparc/sparc/vm_machdep.c | 7 +++++-- sys/arch/sparc64/sparc64/vm_machdep.c | 8 ++++++-- sys/arch/vax/vax/vm_machdep.c | 7 +++++-- 7 files changed, 37 insertions(+), 14 deletions(-) diff --git a/sys/arch/m68k/m68k/vm_machdep.c b/sys/arch/m68k/m68k/vm_machdep.c index 74410e67a4bc..3c55b1e9d123 100644 --- a/sys/arch/m68k/m68k/vm_machdep.c +++ b/sys/arch/m68k/m68k/vm_machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: vm_machdep.c,v 1.15 2006/07/22 06:58:17 tsutsui Exp $ */ +/* $NetBSD: vm_machdep.c,v 1.16 2006/08/31 16:49:21 matt Exp $ */ /* * Copyright (c) 1982, 1986, 1990, 1993 @@ -77,7 +77,9 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.15 2006/07/22 06:58:17 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.16 2006/08/31 16:49:21 matt Exp $"); + +#include "opt_coredump.h" #include #include @@ -199,6 +201,7 @@ cpu_exit(struct lwp *l) /* NOTREACHED */ } +#ifdef COREDUMP /* * Dump the machine specific header information at the start of a core dump. */ @@ -250,6 +253,7 @@ cpu_coredump(struct lwp *l, void *iocookie, struct core *chdr) return coredump_write(iocookie, UIO_SYSSPACE, &md_core, sizeof(md_core)); } +#endif /* * Map a user I/O request into kernel virtual address space. diff --git a/sys/arch/mips/mips/vm_machdep.c b/sys/arch/mips/mips/vm_machdep.c index 2bf750578867..ed4777a37a6c 100644 --- a/sys/arch/mips/mips/vm_machdep.c +++ b/sys/arch/mips/mips/vm_machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: vm_machdep.c,v 1.111 2006/08/26 20:18:36 matt Exp $ */ +/* $NetBSD: vm_machdep.c,v 1.112 2006/08/31 16:49:21 matt Exp $ */ /* * Copyright (c) 1992, 1993 @@ -77,9 +77,10 @@ */ #include "opt_ddb.h" +#include "opt_coredump.h" #include /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.111 2006/08/26 20:18:36 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.112 2006/08/31 16:49:21 matt Exp $"); #include #include @@ -250,6 +251,7 @@ cpu_exit(struct lwp *l) /* NOTREACHED */ } +#ifdef COREDUMP /* * Dump the machine specific segment at the start of a core dump. */ @@ -289,6 +291,7 @@ cpu_coredump(struct lwp *l, void *iocookie, struct core *chdr) return coredump_write(iocookie, UIO_SYSSPACE, &cpustate, chdr->c_cpusize); } +#endif /* * Map a user I/O request into kernel virtual address space. diff --git a/sys/arch/powerpc/powerpc/vm_machdep.c b/sys/arch/powerpc/powerpc/vm_machdep.c index 3d2b8bfc2821..8d40b18610e4 100644 --- a/sys/arch/powerpc/powerpc/vm_machdep.c +++ b/sys/arch/powerpc/powerpc/vm_machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: vm_machdep.c,v 1.66 2006/08/05 21:26:49 sanjayl Exp $ */ +/* $NetBSD: vm_machdep.c,v 1.67 2006/08/31 16:49:21 matt Exp $ */ /* * Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -32,11 +32,12 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.66 2006/08/05 21:26:49 sanjayl Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.67 2006/08/31 16:49:21 matt Exp $"); #include "opt_altivec.h" #include "opt_multiprocessor.h" #include "opt_ppcarch.h" +#include "opt_coredump.h" #include #include @@ -234,6 +235,7 @@ cpu_exit(struct lwp *l) switch_exit(l, lwp_exit2); } +#ifdef COREDUMP /* * Write the machine-dependent part of a core dump. */ @@ -285,6 +287,7 @@ cpu_coredump(struct lwp *l, void *iocookie, struct core *chdr) return coredump_write(iocookie, UIO_SYSSPACE, &md_core, sizeof(md_core)); } +#endif #ifdef PPC_IBM4XX /* diff --git a/sys/arch/sh3/sh3/vm_machdep.c b/sys/arch/sh3/sh3/vm_machdep.c index 01dd2a340079..cc38626419a3 100644 --- a/sys/arch/sh3/sh3/vm_machdep.c +++ b/sys/arch/sh3/sh3/vm_machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: vm_machdep.c,v 1.52 2006/05/10 06:24:03 skrll Exp $ */ +/* $NetBSD: vm_machdep.c,v 1.53 2006/08/31 16:49:21 matt Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. All rights reserved. @@ -81,9 +81,10 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.52 2006/05/10 06:24:03 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.53 2006/08/31 16:49:21 matt Exp $"); #include "opt_kstack_debug.h" +#include "opt_coredump.h" #include #include @@ -311,6 +312,7 @@ cpu_lwp_free(struct lwp *l, int proc) /* Nothing to do */ } +#ifdef COREDUMP /* * Dump the machine specific segment at the start of a core dump. */ @@ -351,6 +353,7 @@ cpu_coredump(struct lwp *l, void *iocookie, struct core *chdr) return coredump_write(iocookie, UIO_SYSSPACE, &md_core, sizeof(md_core)); } +#endif /* COREDUMP */ /* * Map an IO request into kernel virtual address space. Requests fall into diff --git a/sys/arch/sparc/sparc/vm_machdep.c b/sys/arch/sparc/sparc/vm_machdep.c index f36b582ac7f9..810c8d96a21b 100644 --- a/sys/arch/sparc/sparc/vm_machdep.c +++ b/sys/arch/sparc/sparc/vm_machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: vm_machdep.c,v 1.86 2005/11/16 03:00:23 uwe Exp $ */ +/* $NetBSD: vm_machdep.c,v 1.87 2006/08/31 16:49:21 matt Exp $ */ /* * Copyright (c) 1996 @@ -49,9 +49,10 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.86 2005/11/16 03:00:23 uwe Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.87 2006/08/31 16:49:21 matt Exp $"); #include "opt_multiprocessor.h" +#include "opt_coredump.h" #include #include @@ -333,6 +334,7 @@ cpu_setfunc(struct lwp *l, void (*func)(void *), void *arg) pcb->pcb_wim = 1; /* Fence at window #1 */ } +#ifdef COREDUMP /* * cpu_coredump is called to write a core dump header. * (should this be defined elsewhere? machdep.c?) @@ -373,3 +375,4 @@ cpu_coredump(struct lwp *l, void *iocookie, struct core *chdr) return coredump_write(iocookie, UIO_SYSSPACE, &md_core, sizeof(md_core)); } +#endif diff --git a/sys/arch/sparc64/sparc64/vm_machdep.c b/sys/arch/sparc64/sparc64/vm_machdep.c index d123696474bc..346236328447 100644 --- a/sys/arch/sparc64/sparc64/vm_machdep.c +++ b/sys/arch/sparc64/sparc64/vm_machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: vm_machdep.c,v 1.63 2006/02/11 17:57:32 cdi Exp $ */ +/* $NetBSD: vm_machdep.c,v 1.64 2006/08/31 16:49:21 matt Exp $ */ /* * Copyright (c) 1996-2002 Eduardo Horvath. All rights reserved. @@ -50,7 +50,9 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.63 2006/02/11 17:57:32 cdi Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.64 2006/08/31 16:49:21 matt Exp $"); + +#include "opt_coredump.h" #include #include @@ -330,6 +332,7 @@ cpu_lwp_free(l, proc) } } +#ifdef COREDUMP /* * cpu_coredump is called to write a core dump header. * (should this be defined elsewhere? machdep.c?) @@ -418,3 +421,4 @@ cpu_coredump(struct lwp *l, void *iocookie, struct core *chdr) return coredump_write(iocookie, UIO_SYSSPACE, &md_core, sizeof(md_core)); } +#endif diff --git a/sys/arch/vax/vax/vm_machdep.c b/sys/arch/vax/vax/vm_machdep.c index 68987ee8b6e3..edf1ef448845 100644 --- a/sys/arch/vax/vax/vm_machdep.c +++ b/sys/arch/vax/vax/vm_machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: vm_machdep.c,v 1.91 2006/03/30 04:07:13 chs Exp $ */ +/* $NetBSD: vm_machdep.c,v 1.92 2006/08/31 16:49:22 matt Exp $ */ /* * Copyright (c) 1994 Ludd, University of Lule}, Sweden. @@ -31,10 +31,11 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.91 2006/03/30 04:07:13 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.92 2006/08/31 16:49:22 matt Exp $"); #include "opt_compat_ultrix.h" #include "opt_multiprocessor.h" +#include "opt_coredump.h" #include #include @@ -226,6 +227,7 @@ sys_sysarch(l, v, retval) return (ENOSYS); }; +#ifdef COREDUMP /* * Dump the machine specific header information at the start of a core dump. * First put all regs in PCB for debugging purposes. This is not an good @@ -261,6 +263,7 @@ cpu_coredump(struct lwp *l, void *iocookie, struct core *chdr) return coredump_write(iocookie, UIO_SYSSPACE, &md_core, sizeof(md_core)); } +#endif /* * Map in a bunch of pages read/writable for the kernel.