aboutsummaryrefslogtreecommitdiff
path: root/sys/sparc64/sparc64/exception.S
diff options
context:
space:
mode:
authorGleb Smirnoff <glebius@FreeBSD.org>2017-04-17 17:34:47 +0000
committerGleb Smirnoff <glebius@FreeBSD.org>2017-04-17 17:34:47 +0000
commit83c9dea1bac40c7c7cbde4ccb3d747134311ab5a (patch)
tree7679e220e254a60031cd36e1421cb9c844a72521 /sys/sparc64/sparc64/exception.S
parent21d5d37ba4c0131d6c141695366e266e32cc3bc1 (diff)
downloadsrc-83c9dea1bac40c7c7cbde4ccb3d747134311ab5a.tar.gz
src-83c9dea1bac40c7c7cbde4ccb3d747134311ab5a.zip
- Remove 'struct vmmeter' from 'struct pcpu', leaving only global vmmeter
in place. To do per-cpu stats, convert all fields that previously were maintained in the vmmeters that sit in pcpus to counter(9). - Since some vmmeter stats may be touched at very early stages of boot, before we have set up UMA and we can do counter_u64_alloc(), provide an early counter mechanism: o Leave one spare uint64_t in struct pcpu, named pc_early_dummy_counter. o Point counter(9) fields of vmmeter to pcpu[0].pc_early_dummy_counter, so that at early stages of boot, before counters are allocated we already point to a counter that can be safely written to. o For sparc64 that required a whole dummy pcpu[MAXCPU] array. Further related changes: - Don't include vmmeter.h into pcpu.h. - vm.stats.vm.v_swappgsout and vm.stats.vm.v_swappgsin changed to 64-bit, to match kernel representation. - struct vmmeter hidden under _KERNEL, and only vmstat(1) is an exclusion. This is based on benno@'s 4-year old patch: https://lists.freebsd.org/pipermail/freebsd-arch/2013-July/014471.html Reviewed by: kib, gallatin, marius, lidl Differential Revision: https://reviews.freebsd.org/D10156
Notes
Notes: svn path=/head/; revision=317061
Diffstat (limited to 'sys/sparc64/sparc64/exception.S')
-rw-r--r--sys/sparc64/sparc64/exception.S12
1 files changed, 4 insertions, 8 deletions
diff --git a/sys/sparc64/sparc64/exception.S b/sys/sparc64/sparc64/exception.S
index 8a1160ba80aa..dc5a7a0001e5 100644
--- a/sys/sparc64/sparc64/exception.S
+++ b/sys/sparc64/sparc64/exception.S
@@ -2476,9 +2476,8 @@ ENTRY(tl0_intr)
inc %l1
stx %l1, [%l0]
- lduw [PCPU(CNT) + V_INTR], %l0
- inc %l0
- stw %l0, [PCPU(CNT) + V_INTR]
+ call counter_intr_inc
+ nop
ba,a %xcc, tl0_ret
nop
@@ -2989,11 +2988,8 @@ ENTRY(tl1_intr)
add %l5, %l4, %l4
ldx [%l4], %l5
inc %l5
- stx %l5, [%l4]
-
- lduw [PCPU(CNT) + V_INTR], %l4
- inc %l4
- stw %l4, [PCPU(CNT) + V_INTR]
+ call counter_intr_inc
+ stx %l5, [%l4]
ldx [%sp + SPOFF + CCFSZ + TF_Y], %l4