Deleted Added
full compact
counter.h (264338) counter.h (302372)
1/*-
2 * Copyright (c) 2012, 2013 Konstantin Belousov <kib@FreeBSD.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 9 unchanged lines hidden (view full) ---

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
1/*-
2 * Copyright (c) 2012, 2013 Konstantin Belousov <kib@FreeBSD.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 9 unchanged lines hidden (view full) ---

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
26 * $FreeBSD: head/sys/powerpc/include/counter.h 264338 2014-04-11 06:17:44Z jhibbits $
26 * $FreeBSD: head/sys/powerpc/include/counter.h 302372 2016-07-06 14:09:49Z nwhitehorn $
27 */
28
29#ifndef __MACHINE_COUNTER_H__
30#define __MACHINE_COUNTER_H__
31
32#include <sys/pcpu.h>
33#ifdef INVARIANTS
34#include <sys/proc.h>

--- 14 unchanged lines hidden (view full) ---

49
50static inline uint64_t
51counter_u64_fetch_inline(uint64_t *p)
52{
53 uint64_t r;
54 int i;
55
56 r = 0;
27 */
28
29#ifndef __MACHINE_COUNTER_H__
30#define __MACHINE_COUNTER_H__
31
32#include <sys/pcpu.h>
33#ifdef INVARIANTS
34#include <sys/proc.h>

--- 14 unchanged lines hidden (view full) ---

49
50static inline uint64_t
51counter_u64_fetch_inline(uint64_t *p)
52{
53 uint64_t r;
54 int i;
55
56 r = 0;
57 for (i = 0; i < mp_ncpus; i++)
57 CPU_FOREACH(i)
58 r += counter_u64_read_one((uint64_t *)p, i);
59
60 return (r);
61}
62
63static void
64counter_u64_zero_one_cpu(void *arg)
65{

--- 97 unchanged lines hidden ---
58 r += counter_u64_read_one((uint64_t *)p, i);
59
60 return (r);
61}
62
63static void
64counter_u64_zero_one_cpu(void *arg)
65{

--- 97 unchanged lines hidden ---