All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Rutland <mark.rutland@arm.com>
To: linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, will@kernel.org,
	catalin.marinas@arm.com
Cc: james.morse@arm.com, marcan@marcan.st, mark.rutland@arm.com,
	maz@kernel.org, tglx@linutronix.de
Subject: [PATCHv3 0/6] arm64: Support FIQ controller registration
Date: Mon, 15 Mar 2021 11:56:23 +0000	[thread overview]
Message-ID: <20210315115629.57191-1-mark.rutland@arm.com> (raw)

Hector's M1 support series [1] shows that some platforms have critical
interrupts wired to FIQ, and to support these platforms we need to support
handling FIQ exceptions. Other contemporary platforms don't use FIQ (since e.g.
this is usually routed to EL3), and as we never expect to take an FIQ, we have
the FIQ vector cause a panic.

Since the use of FIQ is a platform integration detail (which can differ across
bare-metal and virtualized environments), we need be able to explicitly opt-in
to handling FIQs while retaining the existing behaviour otherwise. This series
adds a new set_handle_fiq() hook so that the FIQ controller can do so, and
where no controller is registered the default handler will panic(). For
consistency the set_handle_irq() code is made to do the same.

The first four patches move arm64 over to a local set_handle_irq()
implementation, which is written to share code with a set_handle_fiq() function
in the last two patches. This adds a default handler which will directly
panic() rather than branching to NULL if an IRQ is taken unexpectedly, and the
boot-time panic in the absence of a handler is removed (for consistently with
FIQ support added later).

The penultimate patch reworks arm64's IRQ masking to always keep DAIF.[IF] in
sync, so that we can treat IRQ and FIQ as equals. This is cherry-picked from
Hector's reply [2] to the first version of this series.

The final patch adds the low-level FIQ exception handling and registration
mechanism atop the prior rework.

I'm hoping this is ready to be merged into the arm64 tree, given the
preparatory cleanup made it into v5.12-rc3. I've pushed the series out to my
arm64/fiq branch [3] on kernel.org, also tagged as arm64-fiq-20210315, atop
v5.12-rc3.

Since v1 [4]:
* Rebase to v5.12-rc1
* Pick up Hector's latest DAIF.[IF] patch
* Use "root {IRQ,FIQ} handler" rather than "{IRQ,FIQ} controller"
* Remove existing panic per Marc's comments
* Log registered root handlers
* Make default root handlers static
* Remove redundant el0_fiq_invalid_compat, per Joey's comments

Since v2 [5]:
* Fold in Hector's Tested-by tags
* Rebase to v5.12-rc3
* Drop patches merged in v5.12-rc3

[1] https://http://lore.kernel.org/r/20210215121713.57687-1-marcan@marcan.st
[2] https://lore.kernel.org/r/20210219172530.45805-1-marcan@marcan.st
[3] https://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git/log/?h=arm64/fiq
[4] https://lore.kernel.org/r/20210219113904.41736-1-mark.rutland@arm.com
[5] https://lore.kernel.org/r/20210302101211.2328-1-mark.rutland@arm.com

Thanks,
Mark.

Hector Martin (1):
  arm64: Always keep DAIF.[IF] in sync

Marc Zyngier (3):
  genirq: Allow architectures to override set_handle_irq() fallback
  arm64: don't use GENERIC_IRQ_MULTI_HANDLER
  arm64: entry: factor irq triage logic into macros

Mark Rutland (2):
  arm64: irq: rework root IRQ handler registration
  arm64: irq: allow FIQs to be handled

 arch/arm64/Kconfig                  |   1 -
 arch/arm64/include/asm/arch_gicv3.h |   2 +-
 arch/arm64/include/asm/assembler.h  |   8 +--
 arch/arm64/include/asm/daifflags.h  |  10 ++--
 arch/arm64/include/asm/irq.h        |   4 ++
 arch/arm64/include/asm/irqflags.h   |  16 +++--
 arch/arm64/kernel/entry.S           | 114 +++++++++++++++++++++---------------
 arch/arm64/kernel/irq.c             |  35 ++++++++++-
 arch/arm64/kernel/process.c         |   2 +-
 arch/arm64/kernel/smp.c             |   1 +
 include/linux/irq.h                 |   2 +
 11 files changed, 125 insertions(+), 70 deletions(-)

-- 
2.11.0


WARNING: multiple messages have this Message-ID (diff)
From: Mark Rutland <mark.rutland@arm.com>
To: linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, will@kernel.org,
	catalin.marinas@arm.com
Cc: james.morse@arm.com, marcan@marcan.st, mark.rutland@arm.com,
	maz@kernel.org, tglx@linutronix.de
Subject: [PATCHv3 0/6] arm64: Support FIQ controller registration
Date: Mon, 15 Mar 2021 11:56:23 +0000	[thread overview]
Message-ID: <20210315115629.57191-1-mark.rutland@arm.com> (raw)

Hector's M1 support series [1] shows that some platforms have critical
interrupts wired to FIQ, and to support these platforms we need to support
handling FIQ exceptions. Other contemporary platforms don't use FIQ (since e.g.
this is usually routed to EL3), and as we never expect to take an FIQ, we have
the FIQ vector cause a panic.

Since the use of FIQ is a platform integration detail (which can differ across
bare-metal and virtualized environments), we need be able to explicitly opt-in
to handling FIQs while retaining the existing behaviour otherwise. This series
adds a new set_handle_fiq() hook so that the FIQ controller can do so, and
where no controller is registered the default handler will panic(). For
consistency the set_handle_irq() code is made to do the same.

The first four patches move arm64 over to a local set_handle_irq()
implementation, which is written to share code with a set_handle_fiq() function
in the last two patches. This adds a default handler which will directly
panic() rather than branching to NULL if an IRQ is taken unexpectedly, and the
boot-time panic in the absence of a handler is removed (for consistently with
FIQ support added later).

The penultimate patch reworks arm64's IRQ masking to always keep DAIF.[IF] in
sync, so that we can treat IRQ and FIQ as equals. This is cherry-picked from
Hector's reply [2] to the first version of this series.

The final patch adds the low-level FIQ exception handling and registration
mechanism atop the prior rework.

I'm hoping this is ready to be merged into the arm64 tree, given the
preparatory cleanup made it into v5.12-rc3. I've pushed the series out to my
arm64/fiq branch [3] on kernel.org, also tagged as arm64-fiq-20210315, atop
v5.12-rc3.

Since v1 [4]:
* Rebase to v5.12-rc1
* Pick up Hector's latest DAIF.[IF] patch
* Use "root {IRQ,FIQ} handler" rather than "{IRQ,FIQ} controller"
* Remove existing panic per Marc's comments
* Log registered root handlers
* Make default root handlers static
* Remove redundant el0_fiq_invalid_compat, per Joey's comments

Since v2 [5]:
* Fold in Hector's Tested-by tags
* Rebase to v5.12-rc3
* Drop patches merged in v5.12-rc3

[1] https://http://lore.kernel.org/r/20210215121713.57687-1-marcan@marcan.st
[2] https://lore.kernel.org/r/20210219172530.45805-1-marcan@marcan.st
[3] https://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git/log/?h=arm64/fiq
[4] https://lore.kernel.org/r/20210219113904.41736-1-mark.rutland@arm.com
[5] https://lore.kernel.org/r/20210302101211.2328-1-mark.rutland@arm.com

Thanks,
Mark.

Hector Martin (1):
  arm64: Always keep DAIF.[IF] in sync

Marc Zyngier (3):
  genirq: Allow architectures to override set_handle_irq() fallback
  arm64: don't use GENERIC_IRQ_MULTI_HANDLER
  arm64: entry: factor irq triage logic into macros

Mark Rutland (2):
  arm64: irq: rework root IRQ handler registration
  arm64: irq: allow FIQs to be handled

 arch/arm64/Kconfig                  |   1 -
 arch/arm64/include/asm/arch_gicv3.h |   2 +-
 arch/arm64/include/asm/assembler.h  |   8 +--
 arch/arm64/include/asm/daifflags.h  |  10 ++--
 arch/arm64/include/asm/irq.h        |   4 ++
 arch/arm64/include/asm/irqflags.h   |  16 +++--
 arch/arm64/kernel/entry.S           | 114 +++++++++++++++++++++---------------
 arch/arm64/kernel/irq.c             |  35 ++++++++++-
 arch/arm64/kernel/process.c         |   2 +-
 arch/arm64/kernel/smp.c             |   1 +
 include/linux/irq.h                 |   2 +
 11 files changed, 125 insertions(+), 70 deletions(-)

-- 
2.11.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

             reply	other threads:[~2021-03-15 11:57 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-15 11:56 Mark Rutland [this message]
2021-03-15 11:56 ` [PATCHv3 0/6] arm64: Support FIQ controller registration Mark Rutland
2021-03-15 11:56 ` [PATCHv3 1/6] genirq: Allow architectures to override set_handle_irq() fallback Mark Rutland
2021-03-15 11:56   ` Mark Rutland
2021-03-15 11:56 ` [PATCHv3 2/6] arm64: don't use GENERIC_IRQ_MULTI_HANDLER Mark Rutland
2021-03-15 11:56   ` Mark Rutland
2021-03-15 19:28   ` Christoph Hellwig
2021-03-15 19:28     ` Christoph Hellwig
2021-03-22 10:29     ` Mark Rutland
2021-03-22 10:29       ` Mark Rutland
2021-03-15 11:56 ` [PATCHv3 3/6] arm64: irq: rework root IRQ handler registration Mark Rutland
2021-03-15 11:56   ` Mark Rutland
2021-03-24 16:49   ` Will Deacon
2021-03-24 16:49     ` Will Deacon
2021-03-15 11:56 ` [PATCHv3 4/6] arm64: entry: factor irq triage logic into macros Mark Rutland
2021-03-15 11:56   ` Mark Rutland
2021-03-24 16:56   ` Will Deacon
2021-03-24 16:56     ` Will Deacon
2021-03-15 11:56 ` [PATCHv3 5/6] arm64: Always keep DAIF.[IF] in sync Mark Rutland
2021-03-15 11:56   ` Mark Rutland
2021-03-24 17:00   ` Will Deacon
2021-03-24 17:00     ` Will Deacon
2021-03-15 11:56 ` [PATCHv3 6/6] arm64: irq: allow FIQs to be handled Mark Rutland
2021-03-15 11:56   ` Mark Rutland
2021-03-24 17:03   ` Will Deacon
2021-03-24 17:03     ` Will Deacon
2021-03-24 20:38 ` [PATCHv3 0/6] arm64: Support FIQ controller registration Catalin Marinas
2021-03-24 20:38   ` Catalin Marinas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210315115629.57191-1-mark.rutland@arm.com \
    --to=mark.rutland@arm.com \
    --cc=catalin.marinas@arm.com \
    --cc=james.morse@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcan@marcan.st \
    --cc=maz@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.