From patchwork Wed Nov 21 02:58:25 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 1777801 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id C3CC13FD1A for ; Wed, 21 Nov 2012 03:01:42 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1Tb0Wo-0002iY-WB; Wed, 21 Nov 2012 02:59:07 +0000 Received: from mail-ob0-f177.google.com ([209.85.214.177]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1Tb0WZ-0002gd-K9 for linux-arm-kernel@lists.infradead.org; Wed, 21 Nov 2012 02:58:52 +0000 Received: by mail-ob0-f177.google.com with SMTP id eh20so6497237obb.36 for ; Tue, 20 Nov 2012 18:58:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=oqZ3huyUiL2zn9P4cwpRsZgxYnsTxAkO/Cl0oR5CINw=; b=uWKVwrl4YUjA7+Pv+fPRnQs9dVh2iBRu1+/zwLRPRqoe+CnHuM1rvyKFV/Hlg2fEwK LJiP+Hu/SBMbghovb4Vj9qYa3xLcAXcyMG5NsTOCCOqlpqRwnlrL2Eneh0i0jP++eY7g i9HIsbj/pOr7ifxvGIgRsncm4lzOGzEaTz+nM4VX4kjnbZkhTsdKrPGFRf9Nq68VDQw8 s4HGFuGh9KnaPakbMo+F6W0BicPJLTv2UKiGIsgiuBSvRl/7WOhiizOV+jxutDh97Gb4 E5edCYkaePRZMveRE2z3XLOiE2/YKo80iQDH9YPN5lVYQBPYGDD30vUXqsjss6cBs05P I0+A== Received: by 10.60.24.7 with SMTP id q7mr14735530oef.108.1353466730313; Tue, 20 Nov 2012 18:58:50 -0800 (PST) Received: from rob-laptop.grandenetworks.net (65-36-73-129.dyn.grandenetworks.net. [65.36.73.129]) by mx.google.com with ESMTPS id j7sm14784173obv.7.2012.11.20.18.58.48 (version=SSLv3 cipher=OTHER); Tue, 20 Nov 2012 18:58:49 -0800 (PST) From: Rob Herring To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 1/9] arm: add set_handle_irq() to register the parent IRQ controller handler function Date: Tue, 20 Nov 2012 20:58:25 -0600 Message-Id: <1353466713-18967-2-git-send-email-robherring2@gmail.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1353466713-18967-1-git-send-email-robherring2@gmail.com> References: <1353466713-18967-1-git-send-email-robherring2@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20121120_215851_833764_E88D6849 X-CRM114-Status: GOOD ( 11.74 ) X-Spam-Score: -2.5 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.5 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.214.177 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (robherring2[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit (robherring2[at]gmail.com) -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Cc: thomas.petazzoni@free-electrons.com, Olof Johansson , Russell King , Arnd Bergmann X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org From: Thomas Petazzoni In order to allow irqchip drivers to register their IRQ handling function as the parent IRQ controller handler function, we provide a convenience function. This will avoid poking directly into the global handle_arch_irq variable. Suggested by Arnd Bergmann. [Rob Herring: remove warning. 1st one to initialize wins.] Signed-off-by: Thomas Petazzoni --- arch/arm/include/asm/mach/irq.h | 1 + arch/arm/kernel/irq.c | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/arch/arm/include/asm/mach/irq.h b/arch/arm/include/asm/mach/irq.h index 15cb035..18c8830 100644 --- a/arch/arm/include/asm/mach/irq.h +++ b/arch/arm/include/asm/mach/irq.h @@ -22,6 +22,7 @@ extern int show_fiq_list(struct seq_file *, int); #ifdef CONFIG_MULTI_IRQ_HANDLER extern void (*handle_arch_irq)(struct pt_regs *); +extern void set_handle_irq(void (*handle_irq)(struct pt_regs *)); #endif /* diff --git a/arch/arm/kernel/irq.c b/arch/arm/kernel/irq.c index 8961650..8e4ef4c 100644 --- a/arch/arm/kernel/irq.c +++ b/arch/arm/kernel/irq.c @@ -117,6 +117,16 @@ void __init init_IRQ(void) machine_desc->init_irq(); } +#ifdef CONFIG_MULTI_IRQ_HANDLER +void __init set_handle_irq(void (*handle_irq)(struct pt_regs *)) +{ + if (handle_arch_irq) + return; + + handle_arch_irq = handle_irq; +} +#endif + #ifdef CONFIG_SPARSE_IRQ int __init arch_probe_nr_irqs(void) {