mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Yuriy Kolerov <yuriy.kolerov@synopsys.com>
To: linux-snps-arc@lists.infradead.org
Cc: Vineet.Gupta1@synopsys.com, Alexey.Brodkin@synopsys.com,
	linux-kernel@vger.kernel.org, tglx@linutronix.de,
	Yuriy Kolerov <yuriy.kolerov@synopsys.com>
Subject: [PATCH v2 1/2] ARC: SMP: Set the default affinity to the boot cpu
Date: Fri,  9 Dec 2016 12:59:31 +0300	[thread overview]
Message-ID: <1481277572-18283-1-git-send-email-yuriy.kolerov@synopsys.com> (raw)

By default the kernel sets a value for default affinity which may
not correspond to the real bitmap of potentially online CPUs. E.g.
for ARC HS processors with 2 cores the default value of affinity in
the kernel may be 0xF and it is wrong in this case. This happens
because init_irq_default_affinity() sets all bits in
irq_default_affinity variable by default.

It is better to set the default value of affinity to the boot core
to guarantee that value of irq_default_affinity contains at least
one valid online CPU during the early stage of booting. It is
necessary for proper configuration of affinity for common interrupt.

Signed-off-by: Yuriy Kolerov <yuriy.kolerov@synopsys.com>
---
 arch/arc/kernel/irq.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/arch/arc/kernel/irq.c b/arch/arc/kernel/irq.c
index 538b36a..e53bfd5 100644
--- a/arch/arc/kernel/irq.c
+++ b/arch/arc/kernel/irq.c
@@ -20,6 +20,12 @@
  */
 void __init init_IRQ(void)
 {
+#ifdef CONFIG_SMP
+	/* Set the default affinity to the boot cpu. */
+	cpumask_clear(irq_default_affinity);
+	cpumask_set_cpu(smp_processor_id(), irq_default_affinity);
+#endif
+
 	/*
 	 * process the entire interrupt tree in one go
 	 * Any external intc will be setup provided DT chains them
-- 
2.7.4

             reply	other threads:[~2016-12-09  9:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-09  9:59 Yuriy Kolerov [this message]
2016-12-09  9:59 ` [PATCH v2 2/2] ARCv2: MCIP: Deprecate setting of affinity in Device Tree Yuriy Kolerov
2016-12-13 17:45   ` Vineet Gupta
2016-12-13 17:40 ` [PATCH v2 1/2] ARC: SMP: Set the default affinity to the boot cpu Vineet Gupta

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=1481277572-18283-1-git-send-email-yuriy.kolerov@synopsys.com \
    --to=yuriy.kolerov@synopsys.com \
    --cc=Alexey.Brodkin@synopsys.com \
    --cc=Vineet.Gupta1@synopsys.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-snps-arc@lists.infradead.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

all inboxes | Powered by JetHome®