hwpmc_amd.c (233628) | hwpmc_amd.c (240650) |
---|---|
1/*- 2 * Copyright (c) 2003-2008 Joseph Koshy 3 * Copyright (c) 2007 The FreeBSD Foundation 4 * All rights reserved. 5 * 6 * Portions of this software were developed by A. Joseph Koshy under 7 * sponsorship from the FreeBSD Foundation and Google, Inc. 8 * --- 15 unchanged lines hidden (view full) --- 24 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28 * SUCH DAMAGE. 29 */ 30 31#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2003-2008 Joseph Koshy 3 * Copyright (c) 2007 The FreeBSD Foundation 4 * All rights reserved. 5 * 6 * Portions of this software were developed by A. Joseph Koshy under 7 * sponsorship from the FreeBSD Foundation and Google, Inc. 8 * --- 15 unchanged lines hidden (view full) --- 24 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28 * SUCH DAMAGE. 29 */ 30 31#include <sys/cdefs.h> |
32__FBSDID("$FreeBSD: head/sys/dev/hwpmc/hwpmc_amd.c 233628 2012-03-28 20:58:30Z fabient $"); | 32__FBSDID("$FreeBSD: head/sys/dev/hwpmc/hwpmc_amd.c 240650 2012-09-18 13:33:39Z avg $"); |
33 34/* Support for the AMD K7 and later processors */ 35 36#include <sys/param.h> 37#include <sys/lock.h> 38#include <sys/malloc.h> 39#include <sys/mutex.h> 40#include <sys/pmc.h> --- 793 unchanged lines hidden (view full) --- 834 return (0); 835 836 amd_pcpu[cpu] = NULL; 837 838#ifdef DEBUG 839 for (i = 0; i < AMD_NPMCS; i++) { 840 KASSERT(pac->pc_amdpmcs[i].phw_pmc == NULL, 841 ("[amd,%d] CPU%d/PMC%d in use", __LINE__, cpu, i)); | 33 34/* Support for the AMD K7 and later processors */ 35 36#include <sys/param.h> 37#include <sys/lock.h> 38#include <sys/malloc.h> 39#include <sys/mutex.h> 40#include <sys/pmc.h> --- 793 unchanged lines hidden (view full) --- 834 return (0); 835 836 amd_pcpu[cpu] = NULL; 837 838#ifdef DEBUG 839 for (i = 0; i < AMD_NPMCS; i++) { 840 KASSERT(pac->pc_amdpmcs[i].phw_pmc == NULL, 841 ("[amd,%d] CPU%d/PMC%d in use", __LINE__, cpu, i)); |
842 KASSERT(AMD_PMC_IS_STOPPED(AMD_PMC_EVSEL_0 + (i-1)), | 842 KASSERT(AMD_PMC_IS_STOPPED(AMD_PMC_EVSEL_0 + i), |
843 ("[amd,%d] CPU%d/PMC%d not stopped", __LINE__, cpu, i)); 844 } 845#endif 846 847 pc = pmc_pcpu[cpu]; 848 KASSERT(pc != NULL, ("[amd,%d] NULL per-cpu state", __LINE__)); 849 850#if defined(__amd64__) --- 183 unchanged lines hidden --- | 843 ("[amd,%d] CPU%d/PMC%d not stopped", __LINE__, cpu, i)); 844 } 845#endif 846 847 pc = pmc_pcpu[cpu]; 848 KASSERT(pc != NULL, ("[amd,%d] NULL per-cpu state", __LINE__)); 849 850#if defined(__amd64__) --- 183 unchanged lines hidden --- |