linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: robherring2@gmail.com (Rob Herring)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3] ARM: rpc: make default fiq handler run-time installed
Date: Tue, 14 Feb 2012 08:50:18 -0600	[thread overview]
Message-ID: <1329231018-15625-1-git-send-email-robherring2@gmail.com> (raw)
In-Reply-To: <alpine.LFD.2.02.1202082229400.1656@xanadu.home>

From: Rob Herring <rob.herring@calxeda.com>

Only rpc uses disable_fiq macro. Change it to a run-time installed
default FIQ handler. The handler is installed before FIQ is enabled
so the behavior should be unchanged.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
---
Nico,

This removes the use of disable_fiq now. To keep it bisectable, the macro
gets removed from entry-macro-iomd.S in the last patch now.

Rob

 arch/arm/mach-rpc/Makefile |    2 +-
 arch/arm/mach-rpc/fiq.S    |   16 ++++++++++++++++
 arch/arm/mach-rpc/irq.c    |    6 ++++++
 3 files changed, 23 insertions(+), 1 deletions(-)
 create mode 100644 arch/arm/mach-rpc/fiq.S

diff --git a/arch/arm/mach-rpc/Makefile b/arch/arm/mach-rpc/Makefile
index aa77bc9..dfa405c 100644
--- a/arch/arm/mach-rpc/Makefile
+++ b/arch/arm/mach-rpc/Makefile
@@ -4,7 +4,7 @@
 
 # Object file lists.
 
-obj-y			:= dma.o irq.o riscpc.o
+obj-y			:= dma.o fiq.o irq.o riscpc.o
 obj-m			:=
 obj-n			:=
 obj-			:=
diff --git a/arch/arm/mach-rpc/fiq.S b/arch/arm/mach-rpc/fiq.S
new file mode 100644
index 0000000..48ddd57
--- /dev/null
+++ b/arch/arm/mach-rpc/fiq.S
@@ -0,0 +1,16 @@
+#include <linux/linkage.h>
+#include <asm/assembler.h>
+#include <mach/hardware.h>
+#include <mach/entry-macro.S>
+
+	.text
+
+	.global	rpc_default_fiq_end
+ENTRY(rpc_default_fiq_start)
+	mov	r12, #ioc_base_high
+	.if	ioc_base_low
+	orr	r12, r12, #ioc_base_low
+	.endif
+	strb	r12, [r12, #0x38]	@ Disable FIQ register
+	subs	pc, lr, #4
+rpc_default_fiq_end:
diff --git a/arch/arm/mach-rpc/irq.c b/arch/arm/mach-rpc/irq.c
index 2e1b530..cf0e669 100644
--- a/arch/arm/mach-rpc/irq.c
+++ b/arch/arm/mach-rpc/irq.c
@@ -5,6 +5,7 @@
 #include <asm/mach/irq.h>
 #include <asm/hardware/iomd.h>
 #include <asm/irq.h>
+#include <asm/fiq.h>
 
 static void iomd_ack_irq_a(struct irq_data *d)
 {
@@ -112,6 +113,8 @@ static struct irq_chip iomd_fiq_chip = {
 	.irq_unmask	= iomd_unmask_irq_fiq,
 };
 
+extern unsigned char rpc_default_fiq_start, rpc_default_fiq_end;
+
 void __init rpc_init_irq(void)
 {
 	unsigned int irq, flags;
@@ -121,6 +124,9 @@ void __init rpc_init_irq(void)
 	iomd_writeb(0, IOMD_FIQMASK);
 	iomd_writeb(0, IOMD_DMAMASK);
 
+	set_fiq_handler(&rpc_default_fiq_start,
+		&rpc_default_fiq_end - &rpc_default_fiq_start);
+
 	for (irq = 0; irq < NR_IRQS; irq++) {
 		flags = IRQF_VALID;
 
-- 
1.7.5.4

  reply	other threads:[~2012-02-14 14:50 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-09  1:33 [PATCH v2 0/4] entry-macro.S clean-up Rob Herring
2012-02-09  1:33 ` [PATCH v2 1/4] ARM: make arch_ret_to_user macro optional Rob Herring
2012-02-09  6:12   ` Nicolas Pitre
2012-02-09  1:33 ` [PATCH v2 2/4] ARM: rpc: make default fiq handler run-time installed Rob Herring
2012-02-09  6:33   ` Nicolas Pitre
2012-02-14 14:50     ` Rob Herring [this message]
2012-02-14 17:37       ` [PATCH v3] " Nicolas Pitre
2012-02-14 19:12         ` Rob Herring
2012-02-09  1:33 ` [PATCH v2 3/4] ARM: make entry-macro.S depend on !MULTI_IRQ_HANDLER Rob Herring
2012-02-09  6:28   ` Nicolas Pitre
2012-02-09 23:04   ` H Hartley Sweeten
2012-02-09  1:33 ` [PATCH v2 4/4] ARM: remove empty disable_fiq and arch_ret_to_user macros Rob Herring
2012-02-09 23:03   ` H Hartley Sweeten
2012-02-11  6:58   ` Shawn Guo

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=1329231018-15625-1-git-send-email-robherring2@gmail.com \
    --to=robherring2@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.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).