Deleted Added
full compact
hwpmc_ppro.c (184802) hwpmc_ppro.c (185341)
1/*-
2 * Copyright (c) 2003-2005,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-2005,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_ppro.c 184802 2008-11-09 17:37:54Z jkoshy $");
32__FBSDID("$FreeBSD: head/sys/dev/hwpmc/hwpmc_ppro.c 185341 2008-11-26 19:25:13Z jkim $");
33
34#include <sys/param.h>
35#include <sys/lock.h>
36#include <sys/mutex.h>
37#include <sys/pmc.h>
38#include <sys/pmckern.h>
39#include <sys/smp.h>
40#include <sys/systm.h>
41
42#include <machine/cpu.h>
43#include <machine/cpufunc.h>
33
34#include <sys/param.h>
35#include <sys/lock.h>
36#include <sys/mutex.h>
37#include <sys/pmc.h>
38#include <sys/pmckern.h>
39#include <sys/smp.h>
40#include <sys/systm.h>
41
42#include <machine/cpu.h>
43#include <machine/cpufunc.h>
44#include <machine/cputypes.h>
44#include <machine/md_var.h>
45#include <machine/pmc_mdep.h>
46#include <machine/specialreg.h>
47
48/*
49 * PENTIUM PRO SUPPORT
50 *
51 * Quirks:

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

774 return (0);
775}
776
777int
778pmc_p6_initialize(struct pmc_mdep *md, int ncpus)
779{
780 struct pmc_classdep *pcd;
781
45#include <machine/md_var.h>
46#include <machine/pmc_mdep.h>
47#include <machine/specialreg.h>
48
49/*
50 * PENTIUM PRO SUPPORT
51 *
52 * Quirks:

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

775 return (0);
776}
777
778int
779pmc_p6_initialize(struct pmc_mdep *md, int ncpus)
780{
781 struct pmc_classdep *pcd;
782
782 KASSERT(strcmp(cpu_vendor, "GenuineIntel") == 0,
783 KASSERT(cpu_vendor_id == CPU_VENDOR_INTEL,
783 ("[p6,%d] Initializing non-intel processor", __LINE__));
784
785 PMCDBG(MDP,INI,1, "%s", "p6-initialize");
786
787 /* Allocate space for pointers to per-cpu descriptors. */
788 p6_pcpu = malloc(sizeof(struct p6_cpu **) * ncpus, M_PMC,
789 M_ZERO|M_WAITOK);
790

--- 70 unchanged lines hidden ---
784 ("[p6,%d] Initializing non-intel processor", __LINE__));
785
786 PMCDBG(MDP,INI,1, "%s", "p6-initialize");
787
788 /* Allocate space for pointers to per-cpu descriptors. */
789 p6_pcpu = malloc(sizeof(struct p6_cpu **) * ncpus, M_PMC,
790 M_ZERO|M_WAITOK);
791

--- 70 unchanged lines hidden ---