From owner-svn-src-head@freebsd.org Mon May 23 15:26:37 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2109BB47037; Mon, 23 May 2016 15:26:37 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DED691082; Mon, 23 May 2016 15:26:36 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u4NFQZo0072659; Mon, 23 May 2016 15:26:35 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u4NFQZH1072658; Mon, 23 May 2016 15:26:35 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201605231526.u4NFQZH1072658@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 23 May 2016 15:26:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r300510 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 May 2016 15:26:37 -0000 Author: andrew Date: Mon May 23 15:26:35 2016 New Revision: 300510 URL: https://svnweb.freebsd.org/changeset/base/300510 Log: Add the needed hwpmc hooks to subr_intr.c. This is needed for the correct operation of hwpmc on, for example, arm64 with intrng. Obtained from: ABT Systems Ltd Sponsored by: The FreeBSD Foundation Modified: head/sys/kern/subr_intr.c Modified: head/sys/kern/subr_intr.c ============================================================================== --- head/sys/kern/subr_intr.c Mon May 23 15:11:01 2016 (r300509) +++ head/sys/kern/subr_intr.c Mon May 23 15:26:35 2016 (r300510) @@ -37,6 +37,7 @@ __FBSDID("$FreeBSD$"); #include "opt_acpi.h" #include "opt_ddb.h" +#include "opt_hwpmc_hooks.h" #include "opt_platform.h" #include @@ -53,6 +54,10 @@ __FBSDID("$FreeBSD$"); #include #include #include +#ifdef HWPMC_HOOKS +#include +#endif + #include #include #include @@ -311,6 +316,10 @@ intr_irq_handler(struct trapframe *tf) irq_root_filter(irq_root_arg); td->td_intr_frame = oldframe; critical_exit(); +#ifdef HWPMC_HOOKS + if (pmc_hook && (PCPU_GET(curthread)->td_pflags & TDP_CALLCHAIN)) + pmc_hook(PCPU_GET(curthread), PMC_FN_USER_CALLCHAIN, tf); +#endif } /*