arm: dovetail: Deduplicate dovetail fault stubs
PATCH 1/1 arm: dovetail: Deduplicate dovetail fault stubs
From: Jan Kiszka <[email protected]>
---
BTW, the backport of these to <7.3 went wrong, or 7.3 was fixed up without fixing older kernels.
arch/arm/include/asm/trap_entry.h | 25 +++---------------------- 1 file changed, 3 insertions(+), 22 deletions(-)
arch/arm/include/asm/trap_entry.h +3 -22
@@ -5,8 +5,7 @@#include <asm/dovetail.h> #include <asm/trace/exceptions.h> -#ifdef CONFIG_MMU -#ifdef CONFIG_IRQ_PIPELINE +#if defined(CONFIG_MMU ) && defined(CONFIG_IRQ_PIPELINE )#include <linux/irqstage.h>
@@ -55,7 +54,7 @@ static inline void dovetail_fault_exit(int exception, struct pt_regs *regs, hard_local_irq_restore(flags); } -#else /* !CONFIG_IRQ_PIPELINE */ +#else /* !CONFIG_MMU || !CONFIG_IRQ_PIPELINE */ static inline unsigned long dovetail_fault_entry (int exception,struct pt_regs *regs)
@@ -72,24 +71,6 @@ static inline void dovetail_fault_exit(int exception, struct pt_regs *regs, (void )regs; (void )combo; } -#endif /* !CONFIG_IRQ_PIPELINE */ - -#else /* CONFIG_MMU */ -static inline unsigned long dovetail_fault_entry (int exception, -struct pt_regs *regs) -{ - (void )(exception); - (void )(regs); -return 0 ; -} - -static inline void dovetail_fault_exit (int exception,struct pt_regs *regs, -unsigned long combo) -{ - (void )exception; - (void )regs; - (void )combo; -} -#endif /* !CONFIG_MMU */ +#endif /* !CONFIG_MMU || !CONFIG_IRQ_PIPELINE */ #endif
Signature · 1 line
2.47.3
Quoted 7 lines · Jan Kiszka
From: Jan Kiszka <[email protected]>
Signed-off-by Jan Kiszka <[email protected]>---
BTW, the backport of these to <7.3 went wrong, or 7.3 was fixed up without fixing older kernels.
I fixed that up during the 7.3 forward port. But: I cannot send backports for something that has not been released yet.
In addition, if i get this right, this is just a cosmetic change. This is one of the files that has to be regularly rebased. We try to do that with pure additions / removals, to keep the process simple.
That may require some minimal code duplication from time to time. This seems to be the case here.
Quoted 55 lines
arch/arm/include/asm/trap_entry.h | 25 +++---------------------- 1 file changed, 3 insertions(+), 22 deletions(-)arch/arm/include/asm/trap_entry.h +3
-22@@ -5,8 +5,7 @@#include <asm/dovetail.h> #include <asm/trace/exceptions.h> -#ifdef CONFIG_MMU -#ifdef CONFIG_IRQ_PIPELINE +#if defined(CONFIG_MMU ) && defined(CONFIG_IRQ_PIPELINE )#include <linux/irqstage.h> @@ -55,7 +54,7 @@ static inline void dovetail_fault_exit(int exception, struct pt_regs *regs, hard_local_irq_restore(flags); } -#else /* !CONFIG_IRQ_PIPELINE */ +#else /* !CONFIG_MMU || !CONFIG_IRQ_PIPELINE */ static inline unsigned long dovetail_fault_entry (int exception,struct pt_regs *regs)@@ -72,24 +71,6 @@ static inline void dovetail_fault_exit(int exception, struct pt_regs *regs, (void )regs; (void )combo; } -#endif /* !CONFIG_IRQ_PIPELINE */ - -#else /* CONFIG_MMU */ -static inline unsigned long dovetail_fault_entry (int exception, -struct pt_regs *regs) -{ - (void )(exception); - (void )(regs); -return 0 ; -} - -static inline void dovetail_fault_exit (int exception,struct pt_regs *regs, -unsigned long combo) -{ - (void )exception; - (void )regs; - (void )combo; -} -#endif /* !CONFIG_MMU */ +#endif /* !CONFIG_MMU || !CONFIG_IRQ_PIPELINE */ #endif Signature · 1 line
2.47.3
Quoted 6 lines · Florian Bezdeka
Quoted 5 lines · Jan Kiszka
From: Jan Kiszka <[email protected]>
Signed-off-by Jan Kiszka <[email protected]>---
Quoted 7 lines
Quoted 2 lines
BTW, the backport of these to <7.3 went wrong, or 7.3 was fixed up without fixing older kernels.
I fixed that up during the 7.3 forward port. But: I cannot send backports for something that has not been released yet.
In addition, if i get this right, this is just a cosmetic change. This
Yes, makes the code more maintainable.
Quoted 1 line
is one of the files that has to be regularly rebased. We try to do that
Nope, this header is fully dovetail-owned.
Jan
Quoted 61 lines
with pure additions / removals, to keep the process simple.
That may require some minimal code duplication from time to time. This seems to be the case here.
Quoted 55 lines
arch/arm/include/asm/trap_entry.h | 25 +++---------------------- 1 file changed, 3 insertions(+), 22 deletions(-)arch/arm/include/asm/trap_entry.h +3
-22@@ -5,8 +5,7 @@#include <asm/dovetail.h> #include <asm/trace/exceptions.h> -#ifdef CONFIG_MMU -#ifdef CONFIG_IRQ_PIPELINE +#if defined(CONFIG_MMU ) && defined(CONFIG_IRQ_PIPELINE )#include <linux/irqstage.h> @@ -55,7 +54,7 @@ static inline void dovetail_fault_exit(int exception, struct pt_regs *regs, hard_local_irq_restore(flags); } -#else /* !CONFIG_IRQ_PIPELINE */ +#else /* !CONFIG_MMU || !CONFIG_IRQ_PIPELINE */ static inline unsigned long dovetail_fault_entry (int exception,struct pt_regs *regs)@@ -72,24 +71,6 @@ static inline void dovetail_fault_exit(int exception, struct pt_regs *regs, (void )regs; (void )combo; } -#endif /* !CONFIG_IRQ_PIPELINE */ - -#else /* CONFIG_MMU */ -static inline unsigned long dovetail_fault_entry (int exception, -struct pt_regs *regs) -{ - (void )(exception); - (void )(regs); -return 0 ; -} - -static inline void dovetail_fault_exit (int exception,struct pt_regs *regs, -unsigned long combo) -{ - (void )exception; - (void )regs; - (void )combo; -} -#endif /* !CONFIG_MMU */ +#endif /* !CONFIG_MMU || !CONFIG_IRQ_PIPELINE */ #endif Signature · 1 line
2.47.3
Signature · 2 lines
Siemens AG, Foundational Technologies Linux Expert Center