diff mbox series

[4/5] s390/irq,nmi: do not include <linux/vtime.h> header

Message ID 966148629217b56139f40c38ffbb45ca229bd489.1706470223.git.agordeev@linux.ibm.com (mailing list archive)
State Handled Elsewhere, archived
Headers show
Series sched/vtime: vtime.h headers cleanup | expand

Commit Message

Alexander Gordeev Jan. 28, 2024, 7:58 p.m. UTC
update_timer_sys() and update_timer_mcck() are inlines used for
CPU time accounting from the interrupt and machine-check handlers.
These routines are specific to s390 architecture, but declared
via <linux/vtime.h> header, which in turn inludes <asm/vtime.h>.
Avoid the extra loop and include <asm/vtime.h> header directly.

Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
---
 arch/s390/kernel/irq.c | 1 +
 arch/s390/kernel/nmi.c | 1 +
 2 files changed, 2 insertions(+)

Comments

Heiko Carstens Jan. 29, 2024, 9:51 a.m. UTC | #1
On Sun, Jan 28, 2024 at 08:58:53PM +0100, Alexander Gordeev wrote:
> update_timer_sys() and update_timer_mcck() are inlines used for
> CPU time accounting from the interrupt and machine-check handlers.
> These routines are specific to s390 architecture, but declared
> via <linux/vtime.h> header, which in turn inludes <asm/vtime.h>.
> Avoid the extra loop and include <asm/vtime.h> header directly.
> 
> Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
> ---
>  arch/s390/kernel/irq.c | 1 +
>  arch/s390/kernel/nmi.c | 1 +
>  2 files changed, 2 insertions(+)
...
> +++ b/arch/s390/kernel/irq.c
> +#include <asm/vtime.h>
...
> +++ b/arch/s390/kernel/nmi.c
> +#include <asm/vtime.h>

It is confusing when the patch subject is "do not include.." and all
what this patch is doing is to add two includes. I see what this is
doing: getting rid of the implicit include of asm/vtime.h most likely
via linux/hardirq.h, but that's not very obvious.

Anyway:
Acked-by: Heiko Carstens <hca@linux.ibm.com>
Alexander Gordeev Feb. 7, 2024, 2:14 p.m. UTC | #2
On Mon, Jan 29, 2024 at 10:51:44AM +0100, Heiko Carstens wrote:
> It is confusing when the patch subject is "do not include.." and all
> what this patch is doing is to add two includes. I see what this is
> doing: getting rid of the implicit include of asm/vtime.h most likely
> via linux/hardirq.h, but that's not very obvious.
> 
> Anyway:
> Acked-by: Heiko Carstens <hca@linux.ibm.com>

Thank you, Heiko!

Whether this wording sounds better?

s390/irq,nmi: include <asm/vtime.h> header directly                         

update_timer_sys() and update_timer_mcck() are inlines used for             
CPU time accounting from the interrupt and machine-check handlers.          
These routines are specific to s390 architecture, but included              
via <linux/vtime.h> header implicitly. Avoid the extra loop and             
include <asm/vtime.h> header directly.
diff mbox series

Patch

diff --git a/arch/s390/kernel/irq.c b/arch/s390/kernel/irq.c
index 6f71b0ce1068..259496fe0ef9 100644
--- a/arch/s390/kernel/irq.c
+++ b/arch/s390/kernel/irq.c
@@ -29,6 +29,7 @@ 
 #include <asm/hw_irq.h>
 #include <asm/stacktrace.h>
 #include <asm/softirq_stack.h>
+#include <asm/vtime.h>
 #include "entry.h"
 
 DEFINE_PER_CPU_SHARED_ALIGNED(struct irq_stat, irq_stat);
diff --git a/arch/s390/kernel/nmi.c b/arch/s390/kernel/nmi.c
index 9ad44c26d1a2..4422a27faace 100644
--- a/arch/s390/kernel/nmi.c
+++ b/arch/s390/kernel/nmi.c
@@ -32,6 +32,7 @@ 
 #include <asm/asm-offsets.h>
 #include <asm/pai.h>
 #include <asm/vx-insn.h>
+#include <asm/vtime.h>
 #include <asm/fpu/api.h>
 
 struct mcck_struct {