hwpmc_amd.c (145774) | hwpmc_amd.c (146799) |
---|---|
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 --- 12 unchanged lines hidden (view full) --- 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 28#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 --- 12 unchanged lines hidden (view full) --- 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 28#include <sys/cdefs.h> |
29__FBSDID("$FreeBSD: head/sys/dev/hwpmc/hwpmc_amd.c 145774 2005-05-01 14:11:49Z jkoshy $"); | 29__FBSDID("$FreeBSD: head/sys/dev/hwpmc/hwpmc_amd.c 146799 2005-05-30 06:29:29Z jkoshy $"); |
30 31/* Support for the AMD K7 and later processors */ 32 33#include <sys/param.h> 34#include <sys/lock.h> 35#include <sys/malloc.h> 36#include <sys/mutex.h> 37#include <sys/pmc.h> --- 696 unchanged lines hidden (view full) --- 734/* 735 * Interrupt handler. This function needs to return '1' if the 736 * interrupt was this CPU's PMCs or '0' otherwise. It is not allowed 737 * to sleep or do anything a 'fast' interrupt handler is not allowed 738 * to do. 739 */ 740 741static int | 30 31/* Support for the AMD K7 and later processors */ 32 33#include <sys/param.h> 34#include <sys/lock.h> 35#include <sys/malloc.h> 36#include <sys/mutex.h> 37#include <sys/pmc.h> --- 696 unchanged lines hidden (view full) --- 734/* 735 * Interrupt handler. This function needs to return '1' if the 736 * interrupt was this CPU's PMCs or '0' otherwise. It is not allowed 737 * to sleep or do anything a 'fast' interrupt handler is not allowed 738 * to do. 739 */ 740 741static int |
742amd_intr(int cpu, uintptr_t eip) | 742amd_intr(int cpu, uintptr_t eip, int usermode) |
743{ 744 int i, retval; 745 enum pmc_mode mode; 746 uint32_t perfctr; 747 struct pmc *pm; 748 struct pmc_cpu *pc; 749 struct pmc_hw *phw; 750 | 743{ 744 int i, retval; 745 enum pmc_mode mode; 746 uint32_t perfctr; 747 struct pmc *pm; 748 struct pmc_cpu *pc; 749 struct pmc_hw *phw; 750 |
751 (void) usermode; 752 |
|
751 KASSERT(cpu >= 0 && cpu < mp_ncpus, 752 ("[amd,%d] out of range CPU %d", __LINE__, cpu)); 753 754 retval = 0; 755 756 pc = pmc_pcpu[cpu]; 757 758 /* --- 270 unchanged lines hidden --- | 753 KASSERT(cpu >= 0 && cpu < mp_ncpus, 754 ("[amd,%d] out of range CPU %d", __LINE__, cpu)); 755 756 retval = 0; 757 758 pc = pmc_pcpu[cpu]; 759 760 /* --- 270 unchanged lines hidden --- |