linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Frederic Weisbecker <fweisbec@gmail.com>
To: LKML <linux-kernel@vger.kernel.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Dave Jones <davej@redhat.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Russell King <linux@arm.linux.org.uk>,
	Catalin Iacob <iacobcatalin@gmail.com>,
	"Paul E . McKenney" <paulmck@linux.vnet.ibm.com>,
	Will Deacon <will.deacon@arm.com>, Ingo Molnar <mingo@kernel.org>,
	Catalin Marinas <catalin.marinas@arm.com>
Subject: [PATCH 5/8] arm: Tell irq work about self IPI support
Date: Wed, 10 Sep 2014 23:33:25 +0200	[thread overview]
Message-ID: <1410384808-14760-6-git-send-email-fweisbec@gmail.com> (raw)
In-Reply-To: <1410384808-14760-1-git-send-email-fweisbec@gmail.com>

ARM irq work IPI support depends on SMP support. That information is
partly known at early boottime. Lets implement
arch_irq_work_has_interrupt() accordingly.

Cc: Ingo Molnar <mingo@kernel.org>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
---
 arch/arm/include/asm/Kbuild     |  1 -
 arch/arm/include/asm/irq_work.h | 11 +++++++++++
 arch/arm/kernel/smp.c           |  2 +-
 3 files changed, 12 insertions(+), 2 deletions(-)
 create mode 100644 arch/arm/include/asm/irq_work.h

diff --git a/arch/arm/include/asm/Kbuild b/arch/arm/include/asm/Kbuild
index 202905e..70cd84e 100644
--- a/arch/arm/include/asm/Kbuild
+++ b/arch/arm/include/asm/Kbuild
@@ -11,7 +11,6 @@ generic-y += hash.h
 generic-y += ioctl.h
 generic-y += ipcbuf.h
 generic-y += irq_regs.h
-generic-y += irq_work.h
 generic-y += kdebug.h
 generic-y += local.h
 generic-y += local64.h
diff --git a/arch/arm/include/asm/irq_work.h b/arch/arm/include/asm/irq_work.h
new file mode 100644
index 0000000..712d03e
--- /dev/null
+++ b/arch/arm/include/asm/irq_work.h
@@ -0,0 +1,11 @@
+#ifndef __ASM_ARM_IRQ_WORK_H
+#define __ASM_ARM_IRQ_WORK_H
+
+#include <asm/smp_plat.h>
+
+static inline bool arch_irq_work_has_interrupt(void)
+{
+	return is_smp();
+}
+
+#endif /* _ASM_ARM_IRQ_WORK_H */
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c
index 9388a3d..bbe22fc 100644
--- a/arch/arm/kernel/smp.c
+++ b/arch/arm/kernel/smp.c
@@ -503,7 +503,7 @@ void arch_send_call_function_single_ipi(int cpu)
 #ifdef CONFIG_IRQ_WORK
 void arch_irq_work_raise(void)
 {
-	if (is_smp())
+	if (arch_irq_work_has_interrupt())
 		smp_cross_call(cpumask_of(smp_processor_id()), IPI_IRQ_WORK);
 }
 #endif
-- 
2.1.0


  parent reply	other threads:[~2014-09-10 21:34 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-10 21:33 [PATCH 0/8] nohz: Fix nohz kick irq work on tick v2 Frederic Weisbecker
2014-09-10 21:33 ` [PATCH 1/8] nohz: Move nohz full init call to tick init Frederic Weisbecker
2014-09-10 21:33 ` [PATCH 2/8] irq_work: Introduce arch_irq_work_has_interrupt() Frederic Weisbecker
2014-09-10 21:33 ` [PATCH 3/8] irq_work: Force raised irq work to run on irq work interrupt Frederic Weisbecker
2014-09-10 21:33 ` [PATCH 4/8] x86: Tell irq work about self IPI support Frederic Weisbecker
2014-09-10 21:33 ` Frederic Weisbecker [this message]
2014-09-10 21:33 ` [PATCH 6/8] arm64: " Frederic Weisbecker
2014-09-11  9:00   ` Catalin Marinas
2014-09-13 16:47     ` Frederic Weisbecker
2014-09-10 21:33 ` [PATCH 7/8] nohz: Consolidate nohz full init code Frederic Weisbecker
2014-09-10 21:33 ` [PATCH 8/8] nohz: nohz full depends on irq work self IPI support Frederic Weisbecker
2014-09-11  8:28 ` [PATCH 0/8] nohz: Fix nohz kick irq work on tick v2 Peter Zijlstra
2014-09-12 18:05   ` Frederic Weisbecker
2014-09-12 19:00     ` Peter Zijlstra
  -- strict thread matches above, loose matches on Subject: below --
2014-09-20 20:30 [PATCH 0/8] nohz: Fix nohz kick irq work on tick v3 Frederic Weisbecker
2014-09-20 20:30 ` [PATCH 5/8] arm: Tell irq work about self IPI support Frederic Weisbecker

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=1410384808-14760-6-git-send-email-fweisbec@gmail.com \
    --to=fweisbec@gmail.com \
    --cc=catalin.marinas@arm.com \
    --cc=davej@redhat.com \
    --cc=iacobcatalin@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=mingo@kernel.org \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=will.deacon@arm.com \
    /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;
as well as URLs for NNTP newsgroup(s).