Date: Sat, 9 Apr 2016 01:02:18 +0000 (UTC) From: Justin Hibbits <jhibbits@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r297730 - head/sys/dev/hwpmc Message-ID: <201604090102.u3912I2s040814@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jhibbits Date: Sat Apr 9 01:02:17 2016 New Revision: 297730 URL: https://svnweb.freebsd.org/changeset/base/297730 Log: Fix a masking bug for e500 PMC. No idea how this slipped through my regression testing. pe_code is the event to count, pe_cpu is the CPU family mask. Modified: head/sys/dev/hwpmc/hwpmc_e500.c Modified: head/sys/dev/hwpmc/hwpmc_e500.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_e500.c Sat Apr 9 00:58:38 2016 (r297729) +++ head/sys/dev/hwpmc/hwpmc_e500.c Sat Apr 9 01:02:17 2016 (r297730) @@ -507,6 +507,7 @@ e500_allocate_pmc(int cpu, int ri, struc pe = a->pm_ev; config = PMLCax_FCS | PMLCax_FCU | PMLCax_FCM1 | PMLCax_FCM1; + if (pe < PMC_EV_E500_FIRST || pe > PMC_EV_E500_LAST) return (EINVAL); @@ -517,14 +518,14 @@ e500_allocate_pmc(int cpu, int ri, struc vers = mfpvr() >> 16; switch (vers) { case FSL_E500v1: - pe_cpu_mask = ev->pe_code & PMC_PPC_E500V1; + pe_cpu_mask = ev->pe_cpu & PMC_PPC_E500V1; break; case FSL_E500v2: - pe_cpu_mask = ev->pe_code & PMC_PPC_E500V2; + pe_cpu_mask = ev->pe_cpu & PMC_PPC_E500V2; break; case FSL_E500mc: case FSL_E5500: - pe_cpu_mask = ev->pe_code & PMC_PPC_E500MC; + pe_cpu_mask = ev->pe_cpu & PMC_PPC_E500MC; break; } if (pe_cpu_mask == 0)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201604090102.u3912I2s040814>