linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] arm-ccn: Fix building as a module
@ 2016-04-22  9:43 Suzuki K Poulose
  2016-04-22 11:32 ` Pawel Moll
  0 siblings, 1 reply; 5+ messages in thread
From: Suzuki K Poulose @ 2016-04-22  9:43 UTC (permalink / raw)
  To: linux-arm-kernel

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.

Cc: Pawel Moll <pawel.moll@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
Cc: arm at kernel.org
Cc: Olof Johansson <olof@lixom.net>
Cc: Anrnd Bergmann <arnd@arndb.de>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
---
 drivers/bus/Kconfig   |    2 +-
 drivers/bus/arm-ccn.c |    7 ++++---
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/bus/Kconfig b/drivers/bus/Kconfig
index d4a3a31..3efc996 100644
--- a/drivers/bus/Kconfig
+++ b/drivers/bus/Kconfig
@@ -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
diff --git a/drivers/bus/arm-ccn.c b/drivers/bus/arm-ccn.c
index 7082c72..acc3eb5 100644
--- a/drivers/bus/arm-ccn.c
+++ b/drivers/bus/arm-ccn.c
@@ -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);
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH v2] arm-ccn: Fix building as a module
  2016-04-22  9:43 [PATCH v2] arm-ccn: Fix building as a module Suzuki K Poulose
@ 2016-04-22 11:32 ` Pawel Moll
  2016-04-22 15:41   ` Kevin Hilman
  0 siblings, 1 reply; 5+ messages in thread
From: Pawel Moll @ 2016-04-22 11:32 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, 2016-04-22 at 10:43 +0100, Suzuki K Poulose wrote:
> 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.

Acked-by: Pawel Moll <pawel.moll@arm.com>

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.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH v2] arm-ccn: Fix building as a module
  2016-04-22 11:32 ` Pawel Moll
@ 2016-04-22 15:41   ` Kevin Hilman
  2016-04-22 16:24     ` Suzuki K Poulose
  0 siblings, 1 reply; 5+ messages in thread
From: Kevin Hilman @ 2016-04-22 15:41 UTC (permalink / raw)
  To: linux-arm-kernel

Pawel Moll <pawel.moll@arm.com> writes:

> On Fri, 2016-04-22 at 10:43 +0100, Suzuki K Poulose wrote:
>> 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.
>
> Acked-by: Pawel Moll <pawel.moll@arm.com>
>

Applied to arm-soc/fixes with Pawel's ack.

Kevin

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH v2] arm-ccn: Fix building as a module
  2016-04-22 15:41   ` Kevin Hilman
@ 2016-04-22 16:24     ` Suzuki K Poulose
  2016-04-22 16:44       ` Kevin Hilman
  0 siblings, 1 reply; 5+ messages in thread
From: Suzuki K Poulose @ 2016-04-22 16:24 UTC (permalink / raw)
  To: linux-arm-kernel

On 22/04/16 16:41, Kevin Hilman wrote:
> Pawel Moll <pawel.moll@arm.com> writes:
>
>> On Fri, 2016-04-22 at 10:43 +0100, Suzuki K Poulose wrote:
>>> 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.
>>
>> Acked-by: Pawel Moll <pawel.moll@arm.com>
>>
>
> 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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH v2] arm-ccn: Fix building as a module
  2016-04-22 16:24     ` Suzuki K Poulose
@ 2016-04-22 16:44       ` Kevin Hilman
  0 siblings, 0 replies; 5+ messages in thread
From: Kevin Hilman @ 2016-04-22 16:44 UTC (permalink / raw)
  To: linux-arm-kernel

Suzuki K Poulose <Suzuki.Poulose@arm.com> writes:

> On 22/04/16 16:41, Kevin Hilman wrote:
>> Pawel Moll <pawel.moll@arm.com> writes:
>>
>>> On Fri, 2016-04-22 at 10:43 +0100, Suzuki K Poulose wrote:
>>>> 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.
>>>
>>> Acked-by: Pawel Moll <pawel.moll@arm.com>
>>>
>>
>> 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.

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-04-22 16:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-22  9:43 [PATCH v2] arm-ccn: Fix building as a module Suzuki K Poulose
2016-04-22 11:32 ` Pawel Moll
2016-04-22 15:41   ` Kevin Hilman
2016-04-22 16:24     ` Suzuki K Poulose
2016-04-22 16:44       ` Kevin Hilman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).