From: Vineet Gupta <Vineet.Gupta1@synopsys.com>
To: Yuriy Kolerov <yuriy.kolerov@synopsys.com>,
"linux-snps-arc@lists.infradead.org"
<linux-snps-arc@lists.infradead.org>
Cc: "Alexey.Brodkin@synopsys.com" <Alexey.Brodkin@synopsys.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"marc.zyngier@arm.com" <marc.zyngier@arm.com>
Subject: Re: [PATCH] ARCv2: intc: Disable all core interrupts by default
Date: Wed, 8 Feb 2017 08:08:11 -0800 [thread overview]
Message-ID: <0423cc7d-0b96-2d6d-f02a-67b6951aaa1c@synopsys.com> (raw)
In-Reply-To: <1486508647-5997-1-git-send-email-yuriy.kolerov@synopsys.com>
On 02/07/2017 03:04 PM, Yuriy Kolerov wrote:
> The kernel emits a lot of warnings about unexpected IRQs when
> an appropriate driver is not presented. It happens because all
> interrupts in the core controller are enabled by default after
> reset. It would be wise to keep all interrupts masked by default.
>
> Thus disable all local and common interrupts. If CPU consists of
> only 1 core without IDU then it is necessary to disable all
> interrupts in the core interrupt controller. If CPU contains IDU
> it means that there are may be more than 1 cores and common
> interrupts (>= FIRST_EXT_IRQ) must be disabled in IDU.
This is not elegant. core intc needs to do same thing to all interrupts coming in
- irrespective of whether they are funneled via IDU or not.
> Signed-off-by: Yuriy Kolerov <yuriy.kolerov@synopsys.com>
> ---
> arch/arc/kernel/intc-arcv2.c | 19 +++++++++++++++++++
[snip...]
> +
> for (i = NR_EXCEPTIONS; i < irq_bcr.irqs + NR_EXCEPTIONS; i++) {
> write_aux_reg(AUX_IRQ_SELECT, i);
> write_aux_reg(AUX_IRQ_PRIORITY, ARCV2_IRQ_DEF_PRIO);
> +
> + /*
> + * If IDU exists then all common interrupts >= FIRST_EXT_IRQ
> + * are masked by IDU thus disable only local interrupts (below
> + * FIRST_EXT_IRQ). Otherwise disable all interrupts.
> + */
> + if (!mp.idu || i < FIRST_EXT_IRQ)
> + write_aux_reg(AUX_IRQ_ENABLE, 0);
So you seem to assume that anything > FIRST_EXT_IRQ is coming in via IDU which may
not be case.
external Interrupts can be wired to core directly - not via IDU
- 16 .. 23 are cpu private reserved irq
- 24 .. C are common irqs (via IDU)
- C + 1 .. N are cpu private external irqs
so better to disable all irq_bcr.irqs independent of how they are hooked up !
-Vineet
next prev parent reply other threads:[~2017-02-08 16:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-07 23:04 Yuriy Kolerov
2017-02-08 16:08 ` Vineet Gupta [this message]
2017-02-10 4:08 ` Yuriy Kolerov
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=0423cc7d-0b96-2d6d-f02a-67b6951aaa1c@synopsys.com \
--to=vineet.gupta1@synopsys.com \
--cc=Alexey.Brodkin@synopsys.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-snps-arc@lists.infradead.org \
--cc=marc.zyngier@arm.com \
--cc=yuriy.kolerov@synopsys.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
all inboxes | Powered by JetHome®