hwpmc_amd.c (aee6e7dc0cabc670f3a9eabac579a030b363a417) | hwpmc_amd.c (04389c855e56d1715637fa43575ec13455a68b2e) |
---|---|
1/*- 2 * SPDX-License-Identifier: BSD-2-Clause-FreeBSD 3 * 4 * Copyright (c) 2003-2008 Joseph Koshy 5 * Copyright (c) 2007 The FreeBSD Foundation 6 * All rights reserved. 7 * 8 * Portions of this software were developed by A. Joseph Koshy under --- 757 unchanged lines hidden (view full) --- 766 767 /* turn off the PMC ENABLE bit */ 768 config = pm->pm_md.pm_amd.pm_amd_evsel & ~AMD_PMC_ENABLE; 769 wrmsr(pd->pm_evsel, config); 770 771 /* 772 * Due to NMI latency on newer AMD processors 773 * NMI interrupts are ignored, which leads to | 1/*- 2 * SPDX-License-Identifier: BSD-2-Clause-FreeBSD 3 * 4 * Copyright (c) 2003-2008 Joseph Koshy 5 * Copyright (c) 2007 The FreeBSD Foundation 6 * All rights reserved. 7 * 8 * Portions of this software were developed by A. Joseph Koshy under --- 757 unchanged lines hidden (view full) --- 766 767 /* turn off the PMC ENABLE bit */ 768 config = pm->pm_md.pm_amd.pm_amd_evsel & ~AMD_PMC_ENABLE; 769 wrmsr(pd->pm_evsel, config); 770 771 /* 772 * Due to NMI latency on newer AMD processors 773 * NMI interrupts are ignored, which leads to |
774 * panic or messages based on kernel configuraiton | 774 * panic or messages based on kernel configuration |
775 */ 776 777 /* Wait for the count to be reset */ 778 for (i = 0; i < OVERFLOW_WAIT_COUNT; i++) { 779 if (rdmsr(pd->pm_perfctr) & (1 << (pd->pm_descr.pd_width - 1))) 780 break; 781 782 DELAY(1); --- 456 unchanged lines hidden --- | 775 */ 776 777 /* Wait for the count to be reset */ 778 for (i = 0; i < OVERFLOW_WAIT_COUNT; i++) { 779 if (rdmsr(pd->pm_perfctr) & (1 << (pd->pm_descr.pd_width - 1))) 780 break; 781 782 DELAY(1); --- 456 unchanged lines hidden --- |