ARM: perf: de-const struct arm_pmu
This patch removes const qualifiers from instances of struct arm_pmu, and functions initialising them, in preparation for generalising arm_pmu usage to system (AKA uncore) PMUs. This will allow for dynamically modifiable structures (locks, struct pmu) to be added as members of struct arm_pmu. Acked-by: Jamie Iles <jamie@jamieiles.com> Reviewed-by: Jean Pihet <j-pihet@ti.com> Signed-off-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com>
This commit is contained in:

committed by
Will Deacon

parent
90e93648c4
commit
a6c93afed3
@@ -424,7 +424,7 @@ xscale1pmu_write_counter(int counter, u32 val)
|
||||
}
|
||||
}
|
||||
|
||||
static const struct arm_pmu xscale1pmu = {
|
||||
static struct arm_pmu xscale1pmu = {
|
||||
.id = ARM_PERF_PMU_ID_XSCALE1,
|
||||
.name = "xscale1",
|
||||
.handle_irq = xscale1pmu_handle_irq,
|
||||
@@ -442,7 +442,7 @@ static const struct arm_pmu xscale1pmu = {
|
||||
.max_period = (1LLU << 32) - 1,
|
||||
};
|
||||
|
||||
static const struct arm_pmu *__init xscale1pmu_init(void)
|
||||
static struct arm_pmu *__init xscale1pmu_init(void)
|
||||
{
|
||||
return &xscale1pmu;
|
||||
}
|
||||
@@ -786,7 +786,7 @@ xscale2pmu_write_counter(int counter, u32 val)
|
||||
}
|
||||
}
|
||||
|
||||
static const struct arm_pmu xscale2pmu = {
|
||||
static struct arm_pmu xscale2pmu = {
|
||||
.id = ARM_PERF_PMU_ID_XSCALE2,
|
||||
.name = "xscale2",
|
||||
.handle_irq = xscale2pmu_handle_irq,
|
||||
@@ -804,17 +804,17 @@ static const struct arm_pmu xscale2pmu = {
|
||||
.max_period = (1LLU << 32) - 1,
|
||||
};
|
||||
|
||||
static const struct arm_pmu *__init xscale2pmu_init(void)
|
||||
static struct arm_pmu *__init xscale2pmu_init(void)
|
||||
{
|
||||
return &xscale2pmu;
|
||||
}
|
||||
#else
|
||||
static const struct arm_pmu *__init xscale1pmu_init(void)
|
||||
static struct arm_pmu *__init xscale1pmu_init(void)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static const struct arm_pmu *__init xscale2pmu_init(void)
|
||||
static struct arm_pmu *__init xscale2pmu_init(void)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
Reference in New Issue
Block a user