Skip to content

Commit

Permalink
PMC: remove now orphaned PMC for INTEL XScale processors.
Browse files Browse the repository at this point in the history
Support for XScale architecture has been deleted in FreeBSD 13.
  • Loading branch information
strejda committed Dec 25, 2020
1 parent f5baf8b commit aa76f0c
Show file tree
Hide file tree
Showing 7 changed files with 3 additions and 331 deletions.
1 change: 0 additions & 1 deletion lib/libpmc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ MAN+= pmc.tsc.3
MAN+= pmc.ucf.3
MAN+= pmc.westmere.3
MAN+= pmc.westmereuc.3
MAN+= pmc.xscale.3

MLINKS+= \
pmc_allocate.3 pmc_release.3 \
Expand Down
46 changes: 1 addition & 45 deletions lib/libpmc/libpmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,6 @@ static int tsc_allocate_pmc(enum pmc_event _pe, char *_ctrspec,
struct pmc_op_pmcallocate *_pmc_config);
#endif
#if defined(__arm__)
#if defined(__XSCALE__)
static int xscale_allocate_pmc(enum pmc_event _pe, char *_ctrspec,
struct pmc_op_pmcallocate *_pmc_config);
#endif
static int armv7_allocate_pmc(enum pmc_event _pe, char *_ctrspec,
struct pmc_op_pmcallocate *_pmc_config);
#endif
Expand Down Expand Up @@ -140,7 +136,6 @@ struct pmc_class_descr {

PMC_CLASSDEP_TABLE(iaf, IAF);
PMC_CLASSDEP_TABLE(k8, K8);
PMC_CLASSDEP_TABLE(xscale, XSCALE);
PMC_CLASSDEP_TABLE(armv7, ARMV7);
PMC_CLASSDEP_TABLE(armv8, ARMV8);
PMC_CLASSDEP_TABLE(beri, BERI);
Expand Down Expand Up @@ -193,7 +188,6 @@ static const struct pmc_event_descr cortex_a76_event_table[] =
}

PMC_MDEP_TABLE(k8, K8, PMC_CLASS_SOFT, PMC_CLASS_TSC);
PMC_MDEP_TABLE(xscale, XSCALE, PMC_CLASS_SOFT, PMC_CLASS_XSCALE);
PMC_MDEP_TABLE(beri, BERI, PMC_CLASS_SOFT, PMC_CLASS_BERI);
PMC_MDEP_TABLE(cortex_a8, ARMV7, PMC_CLASS_SOFT, PMC_CLASS_ARMV7);
PMC_MDEP_TABLE(cortex_a9, ARMV7, PMC_CLASS_SOFT, PMC_CLASS_ARMV7);
Expand Down Expand Up @@ -234,9 +228,6 @@ PMC_CLASS_TABLE_DESC(k8, K8, k8, k8);
PMC_CLASS_TABLE_DESC(tsc, TSC, tsc, tsc);
#endif
#if defined(__arm__)
#if defined(__XSCALE__)
PMC_CLASS_TABLE_DESC(xscale, XSCALE, xscale, xscale);
#endif
PMC_CLASS_TABLE_DESC(cortex_a8, ARMV7, cortex_a8, armv7);
PMC_CLASS_TABLE_DESC(cortex_a9, ARMV7, cortex_a9, armv7);
#endif
Expand Down Expand Up @@ -770,29 +761,6 @@ soft_allocate_pmc(enum pmc_event pe, char *ctrspec,
}

#if defined(__arm__)
#if defined(__XSCALE__)

static struct pmc_event_alias xscale_aliases[] = {
EV_ALIAS("branches", "BRANCH_RETIRED"),
EV_ALIAS("branch-mispredicts", "BRANCH_MISPRED"),
EV_ALIAS("dc-misses", "DC_MISS"),
EV_ALIAS("ic-misses", "IC_MISS"),
EV_ALIAS("instructions", "INSTR_RETIRED"),
EV_ALIAS(NULL, NULL)
};
static int
xscale_allocate_pmc(enum pmc_event pe, char *ctrspec __unused,
struct pmc_op_pmcallocate *pmc_config __unused)
{
switch (pe) {
default:
break;
}

return (0);
}
#endif

static struct pmc_event_alias cortex_a8_aliases[] = {
EV_ALIAS("dc-misses", "L1_DCACHE_REFILL"),
EV_ALIAS("ic-misses", "L1_ICACHE_REFILL"),
Expand Down Expand Up @@ -1264,10 +1232,6 @@ pmc_event_names_of_class(enum pmc_class cl, const char ***eventnames,
ev = k8_event_table;
count = PMC_EVENT_TABLE_SIZE(k8);
break;
case PMC_CLASS_XSCALE:
ev = xscale_event_table;
count = PMC_EVENT_TABLE_SIZE(xscale);
break;
case PMC_CLASS_ARMV7:
switch (cpu_info.pm_cputype) {
default:
Expand Down Expand Up @@ -1521,12 +1485,6 @@ pmc_init(void)
PMC_MDEP_INIT(generic);
break;
#if defined(__arm__)
#if defined(__XSCALE__)
case PMC_CPU_INTEL_XSCALE:
PMC_MDEP_INIT(xscale);
pmc_class_table[n] = &xscale_class_table_descr;
break;
#endif
case PMC_CPU_ARMV7_CORTEX_A8:
PMC_MDEP_INIT(cortex_a8);
pmc_class_table[n] = &cortex_a8_class_table_descr;
Expand Down Expand Up @@ -1667,9 +1625,7 @@ _pmc_name_of_event(enum pmc_event pe, enum pmc_cputype cpu)
if (pe >= PMC_EV_K8_FIRST && pe <= PMC_EV_K8_LAST) {
ev = k8_event_table;
evfence = k8_event_table + PMC_EVENT_TABLE_SIZE(k8);
} else if (pe >= PMC_EV_XSCALE_FIRST && pe <= PMC_EV_XSCALE_LAST) {
ev = xscale_event_table;
evfence = xscale_event_table + PMC_EVENT_TABLE_SIZE(xscale);

} else if (pe >= PMC_EV_ARMV7_FIRST && pe <= PMC_EV_ARMV7_LAST) {
switch (cpu) {
case PMC_CPU_ARMV7_CORTEX_A8:
Expand Down
3 changes: 1 addition & 2 deletions lib/libpmc/pmc.3
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
.\"
.\" $FreeBSD$
.\"
.Dd April 6, 2017
.Dd December 12, 2020
.Dt PMC 3
.Os
.Sh NAME
Expand Down Expand Up @@ -545,7 +545,6 @@ API is
.Xr pmc.tsc 3 ,
.Xr pmc.westmere 3 ,
.Xr pmc.westmereuc 3 ,
.Xr pmc.xscale 3 ,
.Xr pmc_allocate 3 ,
.Xr pmc_attach 3 ,
.Xr pmc_capabilities 3 ,
Expand Down
156 changes: 0 additions & 156 deletions lib/libpmc/pmc.xscale.3

This file was deleted.

6 changes: 0 additions & 6 deletions sys/arm/include/pmc_mdep.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,12 @@
#ifndef _MACHINE_PMC_MDEP_H_
#define _MACHINE_PMC_MDEP_H_

#define PMC_MDEP_CLASS_INDEX_XSCALE 1
#define PMC_MDEP_CLASS_INDEX_ARMV7 1
/*
* On the ARM platform we support the following PMCs.
*
* XSCALE Intel XScale processors
* ARMV7 ARM Cortex-A processors
*/
#include <dev/hwpmc/hwpmc_xscale.h>
#include <dev/hwpmc/hwpmc_armv7.h>

union pmc_md_op_pmcallocate {
Expand All @@ -52,7 +49,6 @@ union pmc_md_op_pmcallocate {

#ifdef _KERNEL
union pmc_md_pmc {
struct pmc_md_xscale_pmc pm_xscale;
struct pmc_md_armv7_pmc pm_armv7;
};

Expand Down Expand Up @@ -80,8 +76,6 @@ union pmc_md_pmc {
/*
* Prototypes
*/
struct pmc_mdep *pmc_xscale_initialize(void);
void pmc_xscale_finalize(struct pmc_mdep *_md);
struct pmc_mdep *pmc_armv7_initialize(void);
void pmc_armv7_finalize(struct pmc_mdep *_md);
#endif /* _KERNEL */
Expand Down
72 changes: 0 additions & 72 deletions sys/dev/hwpmc/hwpmc_xscale.h

This file was deleted.

Loading

0 comments on commit aa76f0c

Please sign in to comment.