arm-ccn: Fix building as a module
PATCH v2 1/1 arm-ccn: Fix building as a module
arm-ccn driver uses irq_set_affinity, which is not exported and hence cannot be built as a module, eventhough we have all the bits ready. This patch makes use of the exported helper irq_set_affinity_hint() instead. Also, the __free_irq expects the affinity_hint to be NULL when we free the irq. So set the affinity_hint to NULL at clean up.
Now that we can build it as a module, update the Kconfig to reflect the change.
Applies on 4.6-rc4.
--- drivers/bus/Kconfig | 2 +- drivers/bus/arm-ccn.c | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-)
drivers/bus/Kconfig +1 -1
@@ -48,7 +48,7 @@ config ARM_CCI5xx_PMU If unsure, say Y config ARM_CCN - bool "ARM CCN driver support" + tristate "ARM CCN driver support" depends on ARM || ARM64 depends on PERF_EVENTS help
drivers/bus/arm-ccn.c +4 -3
@@ -1189,7 +1189,7 @@ static int arm_ccn_pmu_cpu_notifier(struct notifier_block *nb,perf_pmu_migrate_context (&dt->pmu, cpu, target);cpumask_set_cpu (target, &dt->cpu);if (ccn->irq) -WARN_ON (irq_set_affinity (ccn->irq, &dt->cpu) !=0 ); +WARN_ON (irq_set_affinity_hint (ccn->irq, &dt->cpu) !=0 );default :break ; }
@@ -1278,7 +1278,7 @@ static int arm_ccn_pmu_init(struct arm_ccn *ccn)/* Also make sure that the overflow interrupt is handled by this CPU */ if (ccn->irq) { - err =irq_set_affinity (ccn->irq, &ccn->dt.cpu); + err =irq_set_affinity_hint (ccn->irq, &ccn->dt.cpu);if (err) {dev_err (ccn->dev,"Failed to set interrupt affinity!\n" ); goto error_set_affinity;
@@ -1306,7 +1306,8 @@ static void arm_ccn_pmu_cleanup(struct arm_ccn *ccn) {int i; -irq_set_affinity (ccn->irq, cpu_possible_mask); +if (ccn->irq) +irq_set_affinity_hint (ccn->irq,NULL );unregister_cpu_notifier (&ccn->dt.cpu_nb);for (i =0 ; i < ccn->num_xps; i++)writel (0 , ccn->xp[i].base +CCN_XP_DT_CONTROL );
Signature · 1 line
1.7.9.5
PATCH v2 1/1 arm-ccn: Fix building as a module
Quoted 11 lines · Suzuki K Poulose
arm-ccn driver uses
irq_set_affinity, which is not exported and hence cannot be built as a module, eventhough we have all the bits ready. This patch makes use of the exported helperirq_set_affinity_hint()instead. Also, the__free_irqexpects theaffinity_hintto be NULL when we free the irq. So set theaffinity_hintto NULL at clean up.Now that we can build it as a module, update the
Kconfigto reflect the change.Applies on 4.6-rc4.
Thanks!
Pawe?
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
Kevin Hilman
AppliedPATCH v2 1/1 arm-ccn: Fix building as a module
Quoted 8 lines · Pawel Moll
Quoted 7 lines · Suzuki K Poulose
arm-ccn driver uses
irq_set_affinity, which is not exported and hence cannot be built as a module, eventhough we have all the bits ready. This patch makes use of the exported helperirq_set_affinity_hint()instead. Also, the__free_irqexpects theaffinity_hintto be NULL when we free the irq. So set theaffinity_hintto NULL at clean up.
Quoted 7 lines
Quoted 4 lines
Now that we can build it as a module, update the
Kconfigto reflect the change.Applies on 4.6-rc4.
Acked-by Pawel Moll <[email protected]>
Applied to arm-soc/fixes with Pawel's ack.
Kevin
PATCH v2 1/1 arm-ccn: Fix building as a module
Quoted 13 lines · Kevin Hilman
Quoted 11 lines · Pawel Moll
Quoted 10 lines · Suzuki K Poulose
arm-ccn driver uses
irq_set_affinity, which is not exported and hence cannot be built as a module, eventhough we have all the bits ready. This patch makes use of the exported helperirq_set_affinity_hint()instead. Also, the__free_irqexpects theaffinity_hintto be NULL when we free the irq. So set theaffinity_hintto NULL at clean up.Now that we can build it as a module, update the
Kconfigto reflect the change.
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
Applies on 4.6-rc4.
Acked-by Pawel Moll <[email protected]>Applied to arm-soc/fixes with Pawel's ack.
Kevin,
Please note that there is a change to Kconfig for ARM_CCN. So if you think changes to Kconfig shouldn't be pushed as a fix, by all means you can push this to 4.7.
The title of the patch doesn't convey that. Sorry about that.
Suzuki
PATCH v2 1/1 arm-ccn: Fix building as a module
Quoted 21 lines · Suzuki K Poulose
Quoted 13 lines · Kevin Hilman
Quoted 11 lines · Pawel Moll
Quoted 10 lines · Suzuki K Poulose
arm-ccn driver uses
irq_set_affinity, which is not exported and hence cannot be built as a module, eventhough we have all the bits ready. This patch makes use of the exported helperirq_set_affinity_hint()instead. Also, the__free_irqexpects theaffinity_hintto be NULL when we free the irq. So set theaffinity_hintto NULL at clean up.Now that we can build it as a module, update the
Kconfigto reflect the change.Quoted 6 lines
Quoted 4 lines
Quoted 1 line
Applies on 4.6-rc4.
Acked-by Pawel Moll <[email protected]>Applied to arm-soc/fixes with Pawel's ack.
Quoted 7 lines
Kevin,
Please note that there is a change to
KconfigforARM_CCN. So if you think changes toKconfigshouldn't be pushed as a fix, by all means you can push this to 4.7.The title of the patch doesn't convey that. Sorry about that.
Thanks, I was just noticing that and thinking that at this stage of the -rc, that would better wait for v4.7.
Please resumit later for v4.7
Thanks,
Kevin