From owner-svn-src-head@freebsd.org Fri Jun 8 05:01:10 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CD9AA1010069; Fri, 8 Jun 2018 05:01:10 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7F6B4727B0; Fri, 8 Jun 2018 05:01:10 +0000 (UTC) (envelope-from mmacy@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6209723F4; Fri, 8 Jun 2018 05:01:10 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5851Aoo007315; Fri, 8 Jun 2018 05:01:10 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5851ALU007314; Fri, 8 Jun 2018 05:01:10 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <201806080501.w5851ALU007314@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Fri, 8 Jun 2018 05:01:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334828 - head/sys/dev/hwpmc X-SVN-Group: head X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: head/sys/dev/hwpmc X-SVN-Commit-Revision: 334828 X-SVN-Commit-Repository: base 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.26 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: Fri, 08 Jun 2018 05:01:11 -0000 Author: mmacy Date: Fri Jun 8 05:01:09 2018 New Revision: 334828 URL: https://svnweb.freebsd.org/changeset/base/334828 Log: hwpmc: avoid undefined variable on LINT Modified: head/sys/dev/hwpmc/hwpmc_core.c Modified: head/sys/dev/hwpmc/hwpmc_core.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_core.c Fri Jun 8 04:58:03 2018 (r334827) +++ head/sys/dev/hwpmc/hwpmc_core.c Fri Jun 8 05:01:09 2018 (r334828) @@ -1118,12 +1118,13 @@ core_intr(struct trapframe *tf) static int core2_intr(struct trapframe *tf) { - int error, found_interrupt, n; + int error, found_interrupt, n, cpu; uint64_t flag, intrstatus, intrenable, msr; struct pmc *pm; struct core_cpu *cc; pmc_value_t v; + cpu = curcpu; PMCDBG3(MDP,INT, 1, "cpu=%d tf=0x%p um=%d", cpu, (void *) tf, TRAPF_USERMODE(tf)); @@ -1140,7 +1141,7 @@ core2_intr(struct trapframe *tf) (uintmax_t) intrstatus); found_interrupt = 0; - cc = core_pcpu[curcpu]; + cc = core_pcpu[cpu]; KASSERT(cc != NULL, ("[core,%d] null pcpu", __LINE__));