Deleted Added
full compact
hwpmc_amd.c (147191) hwpmc_amd.c (147510)
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 147191 2005-06-09 19:45:09Z jkoshy $");
29__FBSDID("$FreeBSD: head/sys/dev/hwpmc/hwpmc_amd.c 147510 2005-06-21 06:03:30Z 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>

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

916 /*
917 * The presence of hardware performance counters on the AMD
918 * Athlon, Duron or later processors, is _not_ indicated by
919 * any of the processor feature flags set by the 'CPUID'
920 * instruction, so we only check the 'instruction family'
921 * field returned by CPUID for instruction family >= 6.
922 */
923
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>

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

916 /*
917 * The presence of hardware performance counters on the AMD
918 * Athlon, Duron or later processors, is _not_ indicated by
919 * any of the processor feature flags set by the 'CPUID'
920 * instruction, so we only check the 'instruction family'
921 * field returned by CPUID for instruction family >= 6.
922 */
923
924 cputype = -1;
924 class = cputype = -1;
925 name = NULL;
925 switch (cpu_id & 0xF00) {
926 case 0x600: /* Athlon(tm) processor */
927 cputype = PMC_CPU_AMD_K7;
928 class = PMC_CLASS_K7;
929 name = "K7";
930 break;
931 case 0xF00: /* Athlon64/Opteron processor */
932 cputype = PMC_CPU_AMD_K8;

--- 64 unchanged lines hidden ---
926 switch (cpu_id & 0xF00) {
927 case 0x600: /* Athlon(tm) processor */
928 cputype = PMC_CPU_AMD_K7;
929 class = PMC_CLASS_K7;
930 name = "K7";
931 break;
932 case 0xF00: /* Athlon64/Opteron processor */
933 cputype = PMC_CPU_AMD_K8;

--- 64 unchanged lines hidden ---