xref: /freebsd/sys/dev/hwpmc/hwpmc_tsc.h (revision 95ee2897e98f5d444f26ed2334cc7c439f9c16c6)
1e829eb6dSJoseph Koshy /*-
2*4d846d26SWarner Losh  * SPDX-License-Identifier: BSD-2-Clause
3718cf2ccSPedro F. Giffuni  *
4e829eb6dSJoseph Koshy  * Copyright (c) 2008 Joseph Koshy
5e829eb6dSJoseph Koshy  * All rights reserved.
6e829eb6dSJoseph Koshy  *
7e829eb6dSJoseph Koshy  * Redistribution and use in source and binary forms, with or without
8e829eb6dSJoseph Koshy  * modification, are permitted provided that the following conditions
9e829eb6dSJoseph Koshy  * are met:
10e829eb6dSJoseph Koshy  * 1. Redistributions of source code must retain the above copyright
11e829eb6dSJoseph Koshy  *    notice, this list of conditions and the following disclaimer.
12e829eb6dSJoseph Koshy  * 2. Redistributions in binary form must reproduce the above copyright
13e829eb6dSJoseph Koshy  *    notice, this list of conditions and the following disclaimer in the
14e829eb6dSJoseph Koshy  *    documentation and/or other materials provided with the distribution.
15e829eb6dSJoseph Koshy  *
16e829eb6dSJoseph Koshy  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
17e829eb6dSJoseph Koshy  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18e829eb6dSJoseph Koshy  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19e829eb6dSJoseph Koshy  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20e829eb6dSJoseph Koshy  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21e829eb6dSJoseph Koshy  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22e829eb6dSJoseph Koshy  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23e829eb6dSJoseph Koshy  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24e829eb6dSJoseph Koshy  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25e829eb6dSJoseph Koshy  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26e829eb6dSJoseph Koshy  * SUCH DAMAGE.
27e829eb6dSJoseph Koshy  */
28e829eb6dSJoseph Koshy 
29e829eb6dSJoseph Koshy #ifndef _DEV_HWPMC_TSC_H_
30e829eb6dSJoseph Koshy #define	_DEV_HWPMC_TSC_H_ 1
31e829eb6dSJoseph Koshy 
32e829eb6dSJoseph Koshy #ifdef	_KERNEL
33e829eb6dSJoseph Koshy 
34e829eb6dSJoseph Koshy #define	TSC_NPMCS	1
35e829eb6dSJoseph Koshy 
36e829eb6dSJoseph Koshy /*
37e829eb6dSJoseph Koshy  * Prototypes.
38e829eb6dSJoseph Koshy  */
39e829eb6dSJoseph Koshy 
40e829eb6dSJoseph Koshy int	pmc_tsc_initialize(struct pmc_mdep *_md, int _maxcpu);
41e829eb6dSJoseph Koshy void	pmc_tsc_finalize(struct pmc_mdep *_md);
42e829eb6dSJoseph Koshy #endif	/* _KERNEL */
43e829eb6dSJoseph Koshy #endif	/* _DEV_HWPMC_TSC_H */
44