2015-04-21 15:06:20

by Anders Roxell

[permalink] [raw]
Subject: [PATCH 0/2] arm64: make it possible to enable threadirqs

Hi,

This patchset makes it possible to pass "threadirqs" on the CONFIG_CMDLINE to
make IRQs threaded.
This is safe to use now because all timer interrupts and the perf interrupt are
marked NO_THREAD.

NOTE: I had to add this patch [1] to be able to test this on a juno board.
Without this patch, I see unhandled IRQs in mainline. However, it is unclear
whether or not this will be the actual fix that appears in mainline [2].

Cheers,
Anders

[1] http://lists.infradead.org/pipermail/linux-arm-kernel/2015-January/319901.html
[2] http://lists.infradead.org/pipermail/linux-arm-kernel/2015-February/322251.html

Anders Roxell (2):
arm64: Mark PMU interrupt IRQF_NO_THREAD
arm64: Allow forced irq threading

arch/arm64/Kconfig | 1 +
arch/arm64/kernel/perf_event.c | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)

--
2.1.4


2015-04-21 15:06:39

by Anders Roxell

[permalink] [raw]
Subject: [PATCH 1/2] arm64: Mark PMU interrupt IRQF_NO_THREAD

Mark the PMU interrupts as non-threadable, as is the case with
arch/arm: d9c3365 ARM: 7813/1: Mark pmu interupt IRQF_NO_THREAD

Suggested-by: Sebastian Andrzej Siewior <[email protected]>
Signed-off-by: Anders Roxell <[email protected]>
---
arch/arm64/kernel/perf_event.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/kernel/perf_event.c b/arch/arm64/kernel/perf_event.c
index 195991d..7db5c84 100644
--- a/arch/arm64/kernel/perf_event.c
+++ b/arch/arm64/kernel/perf_event.c
@@ -488,7 +488,7 @@ armpmu_reserve_hardware(struct arm_pmu *armpmu)
}

err = request_irq(irq, armpmu->handle_irq,
- IRQF_NOBALANCING,
+ IRQF_NOBALANCING | IRQF_NO_THREAD,
"arm-pmu", armpmu);
if (err) {
pr_err("unable to request IRQ%d for ARM PMU counters\n",
--
2.1.4

2015-04-21 15:06:58

by Anders Roxell

[permalink] [raw]
Subject: [PATCH 2/2] arm64: Allow forced irq threading

Now its safe to allow forced interrupt threading for arm64,
all timer interrupts and the perf interrupt are marked NO_THREAD, as is
the case with arch/arm: da0ec6f ARM: 7814/2: Allow forced irq threading

Suggested-by: Sebastian Andrzej Siewior <[email protected]>
Signed-off-by: Anders Roxell <[email protected]>
---
arch/arm64/Kconfig | 1 +
1 file changed, 1 insertion(+)

diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index b8d96f1..1abb840 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -68,6 +68,7 @@ config ARM64
select HAVE_RCU_TABLE_FREE
select HAVE_SYSCALL_TRACEPOINTS
select IRQ_DOMAIN
+ select IRQ_FORCED_THREADING
select MODULES_USE_ELF_RELA
select NO_BOOTMEM
select OF
--
2.1.4

2015-04-23 10:46:31

by Will Deacon

[permalink] [raw]
Subject: Re: [PATCH 1/2] arm64: Mark PMU interrupt IRQF_NO_THREAD

On Tue, Apr 21, 2015 at 04:05:54PM +0100, Anders Roxell wrote:
> Mark the PMU interrupts as non-threadable, as is the case with
> arch/arm: d9c3365 ARM: 7813/1: Mark pmu interupt IRQF_NO_THREAD
>
> Suggested-by: Sebastian Andrzej Siewior <[email protected]>
> Signed-off-by: Anders Roxell <[email protected]>
> ---
> arch/arm64/kernel/perf_event.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)

Acked-by: Will Deacon <[email protected]>

Catalin can queue this for 4.2.

Cheers,

Will

> diff --git a/arch/arm64/kernel/perf_event.c b/arch/arm64/kernel/perf_event.c
> index 195991d..7db5c84 100644
> --- a/arch/arm64/kernel/perf_event.c
> +++ b/arch/arm64/kernel/perf_event.c
> @@ -488,7 +488,7 @@ armpmu_reserve_hardware(struct arm_pmu *armpmu)
> }
>
> err = request_irq(irq, armpmu->handle_irq,
> - IRQF_NOBALANCING,
> + IRQF_NOBALANCING | IRQF_NO_THREAD,
> "arm-pmu", armpmu);
> if (err) {
> pr_err("unable to request IRQ%d for ARM PMU counters\n",
> --
> 2.1.4
>