Author: br
Date: Wed Apr 19 17:06:32 2017
New Revision: 317151
URL: https://svnweb.freebsd.org/changeset/base/317151

Log:
  Follow r317061 "Remove struct vmmeter from struct pcpu"
  with MD changes for RISC-V.
  
  This unbreaks RISC-V build.
  
  Sponsored by: DARPA, AFRL

Modified:
  head/sys/riscv/include/counter.h
  head/sys/riscv/include/pcpu.h
  head/sys/riscv/riscv/intr_machdep.c
  head/sys/riscv/riscv/minidump_machdep.c

Modified: head/sys/riscv/include/counter.h
==============================================================================
--- head/sys/riscv/include/counter.h    Wed Apr 19 16:24:51 2017        
(r317150)
+++ head/sys/riscv/include/counter.h    Wed Apr 19 17:06:32 2017        
(r317151)
@@ -34,6 +34,10 @@
 #include <sys/proc.h>
 #endif
 
+extern struct pcpu __pcpu[];
+
+#define        EARLY_COUNTER   &__pcpu[0].pc_early_dummy_counter
+
 #define        counter_enter() critical_enter()
 #define        counter_exit()  critical_exit()
 

Modified: head/sys/riscv/include/pcpu.h
==============================================================================
--- head/sys/riscv/include/pcpu.h       Wed Apr 19 16:24:51 2017        
(r317150)
+++ head/sys/riscv/include/pcpu.h       Wed Apr 19 17:06:32 2017        
(r317151)
@@ -46,7 +46,7 @@
 
 #define        PCPU_MD_FIELDS                                                  
\
        uint32_t pc_pending_ipis;       /* IPIs pending to this CPU */  \
-       char __pad[125]
+       char __pad[61]
 
 #ifdef _KERNEL
 

Modified: head/sys/riscv/riscv/intr_machdep.c
==============================================================================
--- head/sys/riscv/riscv/intr_machdep.c Wed Apr 19 16:24:51 2017        
(r317150)
+++ head/sys/riscv/riscv/intr_machdep.c Wed Apr 19 17:06:32 2017        
(r317151)
@@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$");
 #include <sys/cpuset.h>
 #include <sys/interrupt.h>
 #include <sys/smp.h>
+#include <sys/vmmeter.h>
 
 #include <machine/clock.h>
 #include <machine/cpu.h>
@@ -231,7 +232,7 @@ riscv_cpu_intr(struct trapframe *frame)
                event = intr_events[active_irq];
                /* Update counters */
                atomic_add_long(riscv_intr_counters[active_irq], 1);
-               PCPU_INC(cnt.v_intr);
+               VM_CNT_INC(v_intr);
                break;
        default:
                event = NULL;

Modified: head/sys/riscv/riscv/minidump_machdep.c
==============================================================================
--- head/sys/riscv/riscv/minidump_machdep.c     Wed Apr 19 16:24:51 2017        
(r317150)
+++ head/sys/riscv/riscv/minidump_machdep.c     Wed Apr 19 17:06:32 2017        
(r317151)
@@ -37,11 +37,14 @@ __FBSDID("$FreeBSD$");
 #include <sys/kerneldump.h>
 #include <sys/msgbuf.h>
 #include <sys/watchdog.h>
+#include <sys/vmmeter.h>
+
 #include <vm/vm.h>
 #include <vm/vm_param.h>
 #include <vm/vm_page.h>
 #include <vm/vm_phys.h>
 #include <vm/pmap.h>
+
 #include <machine/atomic.h>
 #include <machine/elf.h>
 #include <machine/md_var.h>
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to