From patchwork Fri Jul 13 19:05:59 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gilles Chanteperdrix X-Patchwork-Id: 1196701 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id ACCC7DFFFD for ; Fri, 13 Jul 2012 19:10:33 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1SplCh-0003bc-NC; Fri, 13 Jul 2012 19:07:03 +0000 Received: from casper.infradead.org ([2001:770:15f::2]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1SplCM-0003WN-R9 for linux-arm-kernel@merlin.infradead.org; Fri, 13 Jul 2012 19:06:43 +0000 Received: from xenomai.org ([88.191.95.136]) by casper.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1SplCJ-00049M-Kz for linux-arm-kernel@lists.infradead.org; Fri, 13 Jul 2012 19:06:40 +0000 Received: from men13-3-82-231-18-196.fbx.proxad.net ([82.231.18.196] helo=hermes.local) by xenomai.org with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.72) (envelope-from ) id 1SplBh-0006Ok-JW for linux-arm-kernel@lists.infradead.org; Fri, 13 Jul 2012 21:06:10 +0200 Received: from localhost ([127.0.0.1] helo=hermes.local) by hermes.local with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.72) (envelope-from ) id 1SplBf-0006wD-OU for linux-arm-kernel@lists.infradead.org; Fri, 13 Jul 2012 21:05:59 +0200 Message-ID: <50007197.8030403@xenomai.org> Date: Fri, 13 Jul 2012 21:05:59 +0200 From: Gilles Chanteperdrix Organization: Xenomai User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8.1.24) Gecko/20100329 Lightning/0.8 Icedove/2.0.0.14 Mnenhy/0.7.6.666 MIME-Version: 1.0 To: ARM Linux Mailing List Subject: Loading handle_arch_irq with a PC relative load X-Enigmail-Version: 1.0.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20120713_200639_844694_EFF7BD9D X-CRM114-Status: GOOD ( 12.53 ) X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.3.2 on casper.infradead.org summary: Content analysis details: (-1.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 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: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org I do not know if it is really useful, but it seems it would be possible to reduce the number of memory accesses to just one in the irq_handler macro in the case where CONFIG_MULTI_IRQ_HANDLER is enabled, by using a PC relative load, with something like the following patch: diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S index 0d1851c..48ee46a 100644 --- a/arch/arm/kernel/entry-armv.S +++ b/arch/arm/kernel/entry-armv.S @@ -37,10 +37,9 @@ */ .macro irq_handler #ifdef CONFIG_MULTI_IRQ_HANDLER - ldr r1, =handle_arch_irq mov r0, sp adr lr, BSYM(9997f) - ldr pc, [r1] + ldr pc, handle_arch_irq #else arch_irq_handler_default #endif @@ -325,6 +324,12 @@ ENDPROC(__pabt_svc) #endif .LCfp: .word fp_enter +#ifdef CONFIG_MULTI_IRQ_HANDLER + .globl handle_arch_irq +handle_arch_irq: + .space 4 +#endif + /* * User mode handlers @@ -1151,9 +1156,3 @@ cr_alignment: .space 4 cr_no_alignment: .space 4 - -#ifdef CONFIG_MULTI_IRQ_HANDLER - .globl handle_arch_irq -handle_arch_irq: - .space 4 -#endif