From 15a5e8f238f7b4605e79d2fc2e64cb1592907185 Mon Sep 17 00:00:00 2001 From: thorpej Date: Fri, 9 Aug 2002 23:44:17 +0000 Subject: [PATCH] cpu_fork(): If PMCs are not enabled in the parent, clear the machine- dependent PMC state in the child. --- sys/arch/arm/arm32/vm_machdep.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sys/arch/arm/arm32/vm_machdep.c b/sys/arch/arm/arm32/vm_machdep.c index 2a26fd40d177..2f49462c7884 100644 --- a/sys/arch/arm/arm32/vm_machdep.c +++ b/sys/arch/arm/arm32/vm_machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: vm_machdep.c,v 1.18 2002/08/07 05:14:58 briggs Exp $ */ +/* $NetBSD: vm_machdep.c,v 1.19 2002/08/09 23:44:17 thorpej Exp $ */ /* * Copyright (c) 1994-1998 Mark Brinicombe. @@ -131,6 +131,10 @@ cpu_fork(p1, p2, stack, stacksize, func, arg) #if defined(PERFCTRS) if (PMC_ENABLED(p1)) pmc_md_fork(p1, p2); + else { + p2->p_md.pmc_enabled = 0; + p2->p_md.pmc_state = NULL; + } #endif /* Copy the pcb */