Re: [PATCH Dovetail v2 2/6] arm: irq_pipeline: Move fault_entry() fault_exit() into separate header

Philippe Gerum <[email protected]> Wed, 17 Jun 2026 08:11:35 +0200
Newsgroups dev.linux.lists.xenomai
Message-ID <[email protected]>
Florian Bezdeka <[email protected]> writes:

> Introducing a new header allows us to keep the implementation as
> static inline function. Moving them into asm/dovetail.h or
> asm/irq_pipeline.h would require us to rewrite those helpers as macros.
>
> Signed-off-by: Florian Bezdeka <[email protected]>
> ---
>  arch/arm/include/asm/trap_entry.h | 82 +++++++++++++++++++++++++++++++++++++++
>  arch/arm/mm/fault.c               | 65 +------------------------------
>  2 files changed, 83 insertions(+), 64 deletions(-)
>
> diff --git a/arch/arm/include/asm/trap_entry.h b/arch/arm/include/asm/trap_entry.h
> new file mode 100644
> index 0000000000000000000000000000000000000000..56cf3352c38d9347e989f9b4f6be0b7d649d9b13
> --- /dev/null
> +++ b/arch/arm/include/asm/trap_entry.h
> @@ -0,0 +1,82 @@
> +/* SPDX-License-Identifier: GPL-2.0 */
> +#ifndef _ASMARM_TRAP_ENTRY_H
> +#define _ASMARM_TRAP_ENTRY_H
> +
> +#include <asm/dovetail.h>
> +#include <asm/trace/exceptions.h>
> +
> +#ifdef CONFIG_MMU
> +#ifdef CONFIG_IRQ_PIPELINE
> +/*
> + * We need to synchronize the virtual interrupt state with the hard
> + * interrupt state we received on entry, then turn hardirqs back on to
> + * allow code which does not require strict serialization to be
> + * preempted by an out-of-band activity.
> + */
> +static inline unsigned long fault_entry(int exception, struct pt_regs *regs)
> +{

We need a prefix to fault_entry() in order not to pollute the namespace.

-- 
Philippe.