From: Magnus Damm <magnus.damm@gmail.com>
To: linux-sh@vger.kernel.org
Subject: [PATCH 02/06] ARM: mach-shmobile: Use NR_IRQS_LEGACY as IRQ offset
Date: Wed, 28 Mar 2012 06:40:34 +0000 [thread overview]
Message-ID: <20120328064034.28557.13697.sendpatchset@w520> (raw)
From: Magnus Damm <damm@opensource.se>
Use NR_IRQS_LEGACY as INTC IRQ offset on mach-shmobile.
This moves up the INTC vector 0x0200 from Linux interrupt 0
to NR_IRQS_LEGACY which is set to 16 for the ARM architecture.
Without this change it is impossible to allocate vector 0x0200
together with upcoming IRQ domain support.
Signed-off-by: Magnus Damm <damm@opensource.se>
---
arch/arm/mach-shmobile/entry-intc.S | 2 ++
arch/arm/mach-shmobile/include/mach/irqs.h | 6 ++++--
2 files changed, 6 insertions(+), 2 deletions(-)
--- 0001/arch/arm/mach-shmobile/entry-intc.S
+++ work/arch/arm/mach-shmobile/entry-intc.S 2012-03-27 17:03:51.000000000 +0900
@@ -9,6 +9,7 @@
* warranty of any kind, whether express or implied.
*/
+#include <asm/irq.h>
#include <asm/entry-macro-multi.S>
#define INTCA_BASE 0xe6980000
@@ -44,6 +45,7 @@
/* Convert vector to irq number, same as the evt2irq() macro */
lsr \irqnr, \irqnr, #0x5
subs \irqnr, \irqnr, #16
+ adds \irqnr, \irqnr, #NR_IRQS_LEGACY
1000:
.endm
--- 0001/arch/arm/mach-shmobile/include/mach/irqs.h
+++ work/arch/arm/mach-shmobile/include/mach/irqs.h 2012-03-27 17:03:41.000000000 +0900
@@ -1,14 +1,16 @@
#ifndef __ASM_MACH_IRQS_H
#define __ASM_MACH_IRQS_H
+#include <asm/irq.h>
+
#define NR_IRQS 1024
/* GIC */
#define gic_spi(nr) ((nr) + 32)
/* INTCA */
-#define evt2irq(evt) (((evt) >> 5) - 16)
-#define irq2evt(irq) (((irq) + 16) << 5)
+#define evt2irq(evt) (NR_IRQS_LEGACY + ((evt) >> 5) - 16)
+#define irq2evt(irq) (((irq) + 16 - NR_IRQS_LEGACY) << 5)
/* INTCS */
#define INTCS_VECT_BASE 0x2200
next reply other threads:[~2012-03-28 6:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-28 6:40 Magnus Damm [this message]
2012-03-28 10:22 ` [PATCH 02/06] ARM: mach-shmobile: Use NR_IRQS_LEGACY as IRQ offset Magnus Damm
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=20120328064034.28557.13697.sendpatchset@w520 \
--to=magnus.damm@gmail.com \
--cc=linux-sh@vger.kernel.org \
/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).