Page MenuHomeFreeBSD

D39913.diff
No OneTemporary

D39913.diff

diff --git a/sys/dev/hwpmc/hwpmc_arm64.c b/sys/dev/hwpmc/hwpmc_arm64.c
--- a/sys/dev/hwpmc/hwpmc_arm64.c
+++ b/sys/dev/hwpmc/hwpmc_arm64.c
@@ -448,23 +448,6 @@
return (0);
}
-/*
- * XXX don't know what we should do here.
- */
-static int
-arm64_switch_in(struct pmc_cpu *pc, struct pmc_process *pp)
-{
-
- return (0);
-}
-
-static int
-arm64_switch_out(struct pmc_cpu *pc, struct pmc_process *pp)
-{
-
- return (0);
-}
-
static int
arm64_pcpu_init(struct pmc_mdep *md, int cpu)
{
@@ -614,11 +597,8 @@
pcd->pcd_stop_pmc = arm64_stop_pmc;
pcd->pcd_write_pmc = arm64_write_pmc;
- pmc_mdep->pmd_intr = arm64_intr;
- pmc_mdep->pmd_switch_in = arm64_switch_in;
- pmc_mdep->pmd_switch_out = arm64_switch_out;
-
- pmc_mdep->pmd_npmc += arm64_npmcs;
+ pmc_mdep->pmd_intr = arm64_intr;
+ pmc_mdep->pmd_npmc += arm64_npmcs;
#ifdef DEV_ACPI
if (pmc_cmn600_nclasses() > 0)
diff --git a/sys/dev/hwpmc/hwpmc_armv7.c b/sys/dev/hwpmc/hwpmc_armv7.c
--- a/sys/dev/hwpmc/hwpmc_armv7.c
+++ b/sys/dev/hwpmc/hwpmc_armv7.c
@@ -416,23 +416,6 @@
return 0;
}
-/*
- * XXX don't know what we should do here.
- */
-static int
-armv7_switch_in(struct pmc_cpu *pc, struct pmc_process *pp)
-{
-
- return 0;
-}
-
-static int
-armv7_switch_out(struct pmc_cpu *pc, struct pmc_process *pp)
-{
-
- return 0;
-}
-
static int
armv7_pcpu_init(struct pmc_mdep *md, int cpu)
{
@@ -551,11 +534,8 @@
pcd->pcd_stop_pmc = armv7_stop_pmc;
pcd->pcd_write_pmc = armv7_write_pmc;
- pmc_mdep->pmd_intr = armv7_intr;
- pmc_mdep->pmd_switch_in = armv7_switch_in;
- pmc_mdep->pmd_switch_out = armv7_switch_out;
-
- pmc_mdep->pmd_npmc += armv7_npmcs;
+ pmc_mdep->pmd_intr = armv7_intr;
+ pmc_mdep->pmd_npmc += armv7_npmcs;
return (pmc_mdep);
}
diff --git a/sys/dev/hwpmc/hwpmc_mod.c b/sys/dev/hwpmc/hwpmc_mod.c
--- a/sys/dev/hwpmc/hwpmc_mod.c
+++ b/sys/dev/hwpmc/hwpmc_mod.c
@@ -5453,6 +5453,10 @@
sizeof(struct pmc_classdep), M_PMC, M_WAITOK|M_ZERO);
md->pmd_nclass = n;
+ /* Default methods */
+ md->pmd_switch_in = generic_switch_in;
+ md->pmd_switch_out = generic_switch_out;
+
/* Add base class. */
pmc_soft_initialize(md);
return md;
@@ -5490,9 +5494,6 @@
md->pmd_cputype = PMC_CPU_GENERIC;
- md->pmd_switch_in = generic_switch_in;
- md->pmd_switch_out = generic_switch_out;
-
return (md);
}
diff --git a/sys/dev/hwpmc/hwpmc_powerpc.c b/sys/dev/hwpmc/hwpmc_powerpc.c
--- a/sys/dev/hwpmc/hwpmc_powerpc.c
+++ b/sys/dev/hwpmc/hwpmc_powerpc.c
@@ -105,20 +105,6 @@
return (frames);
}
-static int
-powerpc_switch_in(struct pmc_cpu *pc, struct pmc_process *pp)
-{
-
- return (0);
-}
-
-static int
-powerpc_switch_out(struct pmc_cpu *pc, struct pmc_process *pp)
-{
-
- return (0);
-}
-
int
powerpc_describe(int cpu, int ri, struct pmc_info *pi, struct pmc **ppmc)
{
@@ -564,9 +550,6 @@
vers = mfpvr() >> 16;
- pmc_mdep->pmd_switch_in = powerpc_switch_in;
- pmc_mdep->pmd_switch_out = powerpc_switch_out;
-
switch (vers) {
case MPC7447A:
case MPC7448:

File Metadata

Mime Type
text/plain
Expires
Fri, Oct 4, 7:20 PM (21 h, 46 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
13575236
Default Alt Text
D39913.diff (2 KB)

Event Timeline