Deleted Added
full compact
hwpmc_core.h (210621) hwpmc_core.h (240164)
1/*-
2 * Copyright (c) 2008 Joseph Koshy
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) 2008 Joseph Koshy
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/dev/hwpmc/hwpmc_core.h 210621 2010-07-29 17:52:23Z gnn $
26 * $FreeBSD: head/sys/dev/hwpmc/hwpmc_core.h 240164 2012-09-06 13:54:01Z fabient $
27 */
28
29#ifndef _DEV_HWPMC_CORE_H_
30#define _DEV_HWPMC_CORE_H_ 1
31
32/*
33 * Fixed-function PMCs.
34 */

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

41#define IAF_ANY 0x4
42#define IAF_PMI 0x8
43
44/*
45 * Programmable PMCs.
46 */
47struct pmc_md_iap_op_pmcallocate {
48 uint32_t pm_iap_config;
27 */
28
29#ifndef _DEV_HWPMC_CORE_H_
30#define _DEV_HWPMC_CORE_H_ 1
31
32/*
33 * Fixed-function PMCs.
34 */

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

41#define IAF_ANY 0x4
42#define IAF_PMI 0x8
43
44/*
45 * Programmable PMCs.
46 */
47struct pmc_md_iap_op_pmcallocate {
48 uint32_t pm_iap_config;
49 uint32_t pm_iap_rsp;
49 uint64_t pm_iap_rsp;
50};
51
52#define IAP_EVSEL(C) ((C) & 0xFF)
53#define IAP_UMASK(C) ((C) & 0xFF00)
54#define IAP_USR (1 << 16)
55#define IAP_OS (1 << 17)
56#define IAP_EDGE (1 << 18)
57#define IAP_INT (1 << 20)
58#define IAP_ANY (1 << 21)
59#define IAP_EN (1 << 22)
60#define IAP_INV (1 << 23)
61#define IAP_CMASK(C) (((C) & 0xFF) << 24)
62
50};
51
52#define IAP_EVSEL(C) ((C) & 0xFF)
53#define IAP_UMASK(C) ((C) & 0xFF00)
54#define IAP_USR (1 << 16)
55#define IAP_OS (1 << 17)
56#define IAP_EDGE (1 << 18)
57#define IAP_INT (1 << 20)
58#define IAP_ANY (1 << 21)
59#define IAP_EN (1 << 22)
60#define IAP_INV (1 << 23)
61#define IAP_CMASK(C) (((C) & 0xFF) << 24)
62
63#define IA_OFFCORE_RSP_MASK 0xF7FF
63#define IA_OFFCORE_RSP_MASK_I7WM 0x000000F7FF
64#define IA_OFFCORE_RSP_MASK_SBIB 0x3F807F8FFF
64
65#ifdef _KERNEL
66
67/*
68 * Fixed-function counters.
69 */
70
71#define IAF_MASK 0xF

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

162#define IA_OFFCORE_RSP1 0x1A7
163
164struct pmc_md_iaf_pmc {
165 uint64_t pm_iaf_ctrl;
166};
167
168struct pmc_md_iap_pmc {
169 uint32_t pm_iap_evsel;
65
66#ifdef _KERNEL
67
68/*
69 * Fixed-function counters.
70 */
71
72#define IAF_MASK 0xF

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

163#define IA_OFFCORE_RSP1 0x1A7
164
165struct pmc_md_iaf_pmc {
166 uint64_t pm_iaf_ctrl;
167};
168
169struct pmc_md_iap_pmc {
170 uint32_t pm_iap_evsel;
170 uint32_t pm_iap_rsp;
171 uint64_t pm_iap_rsp;
171};
172
173/*
174 * Prototypes.
175 */
176
177int pmc_core_initialize(struct pmc_mdep *_md, int _maxcpu);
178void pmc_core_finalize(struct pmc_mdep *_md);

--- 12 unchanged lines hidden ---
172};
173
174/*
175 * Prototypes.
176 */
177
178int pmc_core_initialize(struct pmc_mdep *_md, int _maxcpu);
179void pmc_core_finalize(struct pmc_mdep *_md);

--- 12 unchanged lines hidden ---