Deleted Added
full compact
hwpmc_amd.c (184802) hwpmc_amd.c (184992)
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 184802 2008-11-09 17:37:54Z jkoshy $");
32__FBSDID("$FreeBSD: head/sys/dev/hwpmc/hwpmc_amd.c 184992 2008-11-15 10:56:36Z jkoshy $");
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>

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

953 pcd->pcd_num = AMD_NPMCS;
954 pcd->pcd_ri = pmc_mdep->pmd_npmc;
955 pcd->pcd_width = 48;
956
957 /* fill in the correct pmc name and class */
958 for (i = 0; i < AMD_NPMCS; i++) {
959 (void) snprintf(amd_pmcdesc[i].pm_descr.pd_name,
960 sizeof(amd_pmcdesc[i].pm_descr.pd_name), "%s-%d",
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>

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

953 pcd->pcd_num = AMD_NPMCS;
954 pcd->pcd_ri = pmc_mdep->pmd_npmc;
955 pcd->pcd_width = 48;
956
957 /* fill in the correct pmc name and class */
958 for (i = 0; i < AMD_NPMCS; i++) {
959 (void) snprintf(amd_pmcdesc[i].pm_descr.pd_name,
960 sizeof(amd_pmcdesc[i].pm_descr.pd_name), "%s-%d",
961 name, i-1);
961 name, i);
962 amd_pmcdesc[i].pm_descr.pd_class = class;
963 }
964
965 pcd->pcd_allocate_pmc = amd_allocate_pmc;
966 pcd->pcd_config_pmc = amd_config_pmc;
967 pcd->pcd_describe = amd_describe;
968 pcd->pcd_get_config = amd_get_config;
969 pcd->pcd_get_msr = amd_get_msr;

--- 71 unchanged lines hidden ---
962 amd_pmcdesc[i].pm_descr.pd_class = class;
963 }
964
965 pcd->pcd_allocate_pmc = amd_allocate_pmc;
966 pcd->pcd_config_pmc = amd_config_pmc;
967 pcd->pcd_describe = amd_describe;
968 pcd->pcd_get_config = amd_get_config;
969 pcd->pcd_get_msr = amd_get_msr;

--- 71 unchanged lines hidden ---