Author: ian
Date: Sun Jun 23 16:59:06 2019
New Revision: 349315
URL: https://svnweb.freebsd.org/changeset/base/349315

Log:
  MFC r348740-r348741, r348995
  
  r348740:
  Don't refer to the cpu variable in a KASSERT before initializing it.
  
  r348741:
  For armv6 and armv7, build hwpmc_armv7.c as well as the base hwpmc_arm.c.
  
  Submitted by: Arnaud YSMAL <[email protected]>
  
  r348995:
  Don't attempt to include hwpmc support for armv6, we're missing some of the
  necessary support functions in cpu-v6.h, and it may be that the only armv6
  platform we support (RPi, the bcm2835 SOC) is incapable of supporting hwpmc.
  
  Reported by:  dim@

Modified:
  stable/12/sys/dev/hwpmc/hwpmc_armv7.c
  stable/12/sys/modules/hwpmc/Makefile
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/dev/hwpmc/hwpmc_armv7.c
==============================================================================
--- stable/12/sys/dev/hwpmc/hwpmc_armv7.c       Sun Jun 23 16:16:55 2019        
(r349314)
+++ stable/12/sys/dev/hwpmc/hwpmc_armv7.c       Sun Jun 23 16:59:06 2019        
(r349315)
@@ -315,11 +315,11 @@ armv7_intr(struct trapframe *tf)
        int error;
        int reg, cpu;
 
+       cpu = curcpu;
        KASSERT(cpu >= 0 && cpu < pmc_cpu_max(),
            ("[armv7,%d] CPU %d out of range", __LINE__, cpu));
 
        retval = 0;
-       cpu = curcpu;
        pc = armv7_pcpu[cpu];
 
        for (ri = 0; ri < armv7_npmcs; ri++) {

Modified: stable/12/sys/modules/hwpmc/Makefile
==============================================================================
--- stable/12/sys/modules/hwpmc/Makefile        Sun Jun 23 16:16:55 2019        
(r349314)
+++ stable/12/sys/modules/hwpmc/Makefile        Sun Jun 23 16:59:06 2019        
(r349315)
@@ -22,6 +22,10 @@ SRCS+=       device_if.h bus_if.h
 SRCS+= hwpmc_arm.c
 .endif
 
+.if ${MACHINE_ARCH} == "armv7"
+SRCS+= hwpmc_armv7.c
+.endif
+
 .if ${MACHINE_CPUARCH} == "i386"
 SRCS+= hwpmc_amd.c hwpmc_core.c hwpmc_intel.c
 SRCS+= hwpmc_tsc.c hwpmc_x86.c hwpmc_uncore.c
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to