Deleted Added
full compact
hwpmc_piv.c (147191) hwpmc_piv.c (147867)
1/*-
2 * Copyright (c) 2003-2005 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

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

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
27#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2003-2005 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

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

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
27#include <sys/cdefs.h>
28__FBSDID("$FreeBSD: head/sys/dev/hwpmc/hwpmc_piv.c 147191 2005-06-09 19:45:09Z jkoshy $");
28__FBSDID("$FreeBSD: head/sys/dev/hwpmc/hwpmc_piv.c 147867 2005-07-09 17:29:36Z jkoshy $");
29
30#include <sys/param.h>
31#include <sys/lock.h>
32#include <sys/mutex.h>
33#include <sys/pmc.h>
34#include <sys/pmckern.h>
35#include <sys/smp.h>
36#include <sys/systm.h>

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

1669 /*
1670 * On Intel P4 CPUs, the PMC 'pcint' entry in the LAPIC gets
1671 * masked when a PMC interrupts the CPU. We need to unmask
1672 * the interrupt source explicitly.
1673 */
1674
1675 if (did_interrupt)
1676 pmc_x86_lapic_enable_pmc_interrupt();
29
30#include <sys/param.h>
31#include <sys/lock.h>
32#include <sys/mutex.h>
33#include <sys/pmc.h>
34#include <sys/pmckern.h>
35#include <sys/smp.h>
36#include <sys/systm.h>

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

1669 /*
1670 * On Intel P4 CPUs, the PMC 'pcint' entry in the LAPIC gets
1671 * masked when a PMC interrupts the CPU. We need to unmask
1672 * the interrupt source explicitly.
1673 */
1674
1675 if (did_interrupt)
1676 pmc_x86_lapic_enable_pmc_interrupt();
1677 else
1678 atomic_add_int(&pmc_stats.pm_intr_ignored, 1);
1679
1677
1678 atomic_add_int(did_interrupt ? &pmc_stats.pm_intr_processed :
1679 &pmc_stats.pm_intr_ignored, 1);
1680
1680 return did_interrupt;
1681}
1682
1683/*
1684 * Describe a CPU's PMC state.
1685 */
1686
1687static int

--- 113 unchanged lines hidden ---
1681 return did_interrupt;
1682}
1683
1684/*
1685 * Describe a CPU's PMC state.
1686 */
1687
1688static int

--- 113 unchanged lines hidden ---