public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Radu Rendec <rrendec@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: Marc Zyngier <maz@kernel.org>, Thomas Gleixner <tglx@linutronix.de>
Subject: [RFC PATCH 1/5] irq: Always enable parent interrupt tracking
Date: Tue, 30 May 2023 17:45:46 -0400	[thread overview]
Message-ID: <20230530214550.864894-2-rrendec@redhat.com> (raw)
In-Reply-To: <20230530214550.864894-1-rrendec@redhat.com>

The kernel already has some support for tracking the parent interrupt in
the case of chained interrupts, but it is currently used only by the
IRQ-resend code.

This patch enables the parent interrupt tracking code unconditionally.
The IRQ-resend code still depends on CONFIG_HARDIRQS_SW_RESEND.

The intention is to (re)use the existing parent interrupt tracking
support for different purposes, more specifically to expose chained
interrupt topology to userspace. That, in turn, makes it possible to
control the SMP affinity of chained interrupts in a way that does not
break the existing interface and the promises it makes.

Signed-off-by: Radu Rendec <rrendec@redhat.com>
---
 include/linux/irq.h | 7 -------
 kernel/irq/manage.c | 2 --
 2 files changed, 9 deletions(-)

diff --git a/include/linux/irq.h b/include/linux/irq.h
index b1b28affb32a7..7710f157e12de 100644
--- a/include/linux/irq.h
+++ b/include/linux/irq.h
@@ -641,14 +641,7 @@ static inline void irq_force_complete_move(struct irq_desc *desc) { }
 
 extern int no_irq_affinity;
 
-#ifdef CONFIG_HARDIRQS_SW_RESEND
 int irq_set_parent(int irq, int parent_irq);
-#else
-static inline int irq_set_parent(int irq, int parent_irq)
-{
-	return 0;
-}
-#endif
 
 /*
  * Built-in IRQ handlers for various IRQ types,
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index eb862b5f91c42..49683e55261eb 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -1004,7 +1004,6 @@ int __irq_set_trigger(struct irq_desc *desc, unsigned long flags)
 	return ret;
 }
 
-#ifdef CONFIG_HARDIRQS_SW_RESEND
 int irq_set_parent(int irq, int parent_irq)
 {
 	unsigned long flags;
@@ -1019,7 +1018,6 @@ int irq_set_parent(int irq, int parent_irq)
 	return 0;
 }
 EXPORT_SYMBOL_GPL(irq_set_parent);
-#endif
 
 /*
  * Default primary interrupt handler for threaded interrupts. Is
-- 
2.40.1


  reply	other threads:[~2023-05-30 21:47 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-30 21:45 [RFC PATCH 0/5] irq: sysfs interface improvements for SMP affinity control Radu Rendec
2023-05-30 21:45 ` Radu Rendec [this message]
2023-05-31 13:10   ` [RFC PATCH 1/5] irq: Always enable parent interrupt tracking Thomas Gleixner
2023-05-31 22:56     ` Radu Rendec
2023-05-30 21:45 ` [RFC PATCH 2/5] irq: Show the parent chained interrupt in debugfs Radu Rendec
2023-05-30 21:45 ` [RFC PATCH 3/5] irq: Expose chained interrupt parents in sysfs Radu Rendec
2023-05-30 21:45 ` [RFC PATCH 4/5] irq: Move SMP affinity write handler out of proc.c Radu Rendec
2023-05-30 21:45 ` [RFC PATCH 5/5] irq: Add smp_affinity/list attributes to sysfs Radu Rendec
2023-05-31 13:09 ` [RFC PATCH 0/5] irq: sysfs interface improvements for SMP affinity control Thomas Gleixner
2023-05-31 22:54   ` Radu Rendec
2023-06-20 15:58   ` Radu Rendec

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=20230530214550.864894-2-rrendec@redhat.com \
    --to=rrendec@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maz@kernel.org \
    --cc=tglx@linutronix.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox