Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 8 Jun 2018 05:01:10 +0000 (UTC)
From:      Matt Macy <mmacy@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r334828 - head/sys/dev/hwpmc
Message-ID:  <201806080501.w5851ALU007314@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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__));
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201806080501.w5851ALU007314>