From patchwork Fri Dec 10 05:58:44 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 397302 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oBA5tXXd016888 for ; Fri, 10 Dec 2010 05:55:33 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751180Ab0LJFzP (ORCPT ); Fri, 10 Dec 2010 00:55:15 -0500 Received: from mail-px0-f179.google.com ([209.85.212.179]:48977 "EHLO mail-px0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751016Ab0LJFzL (ORCPT ); Fri, 10 Dec 2010 00:55:11 -0500 Received: by pxi20 with SMTP id 20so956966pxi.10 for ; Thu, 09 Dec 2010 21:55:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:date:message-id :in-reply-to:references:subject; bh=SDZstV4P/zxQd8GaIB5Y255kLGyvd1EL8YufDxdkS7E=; b=Cl0XQ4j3iDL5uM3KAwIBXtaHs/36mra2AKtT3/hqfJfHu/zcr3EeEsjl/fh4aAftG1 ZGNgZshjb9L+P5ubw6oNpiXoOZycq1FdfByoWYQ4pbnrLDmOF/rTPn6d/1OoPgxcl1o+ HGnOW1q1Ov7+xtuihQepWtibCf25w9wJJLzCk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:date:message-id:in-reply-to:references:subject; b=GUp7OUZhkMANPsrLYeupP2c5TBlsWEmB+meEGwCXoorwYSDidHAoQGxQ/g7GoYGCfl kA+gT4KIyphaLLBZIHZcWAk0f0eHqgpprABFSFYuYgFAmUuFLR1Mvpw6aQ1jhwnPb1rN ZAHaVTIm4PA8X9Fvux1EuKjudXJIlLj/eO8UE= Received: by 10.142.201.9 with SMTP id y9mr212016wff.92.1291960510850; Thu, 09 Dec 2010 21:55:10 -0800 (PST) Received: from [127.0.0.1] (210.253.155.90.customerlink.pwd.ne.jp [210.253.155.90]) by mx.google.com with ESMTPS id p8sm3515022wff.4.2010.12.09.21.55.08 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 09 Dec 2010 21:55:09 -0800 (PST) From: Magnus Damm To: linux@arm.linux.org.uk Cc: Magnus Damm , eric.y.miao@gmail.com, linux-arm-kernel@lists.infradead.org, linux-sh@vger.kernel.org Date: Fri, 10 Dec 2010 14:58:44 +0900 Message-Id: <20101210055844.8635.36194.sendpatchset@t400s> In-Reply-To: <20101210055835.8635.98614.sendpatchset@t400s> References: <20101210055835.8635.98614.sendpatchset@t400s> Subject: [PATCH 01/02][RFC] ARM: Introduce Subarch IRQ handler macros Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Fri, 10 Dec 2010 05:55:33 +0000 (UTC) --- /dev/null +++ work/arch/arm/include/asm/entry-macro-multi.S 2010-12-09 23:07:01.000000000 +0900 @@ -0,0 +1,43 @@ +/* + * Interrupt handling. Preserves r7, r8, r9 + */ + .macro arch_irq_handler_default + get_irqnr_preamble r5, lr +1: get_irqnr_and_base r0, r6, r5, lr + movne r1, sp + @ + @ routine called with r0 = irq number, r1 = struct pt_regs * + @ + adrne lr, BSYM(1b) + bne asm_do_IRQ + +#ifdef CONFIG_SMP + /* + * XXX + * + * this macro assumes that irqstat (r6) and base (r5) are + * preserved from get_irqnr_and_base above + */ + ALT_SMP(test_for_ipi r0, r6, r5, lr) + ALT_UP_B(9998f) + movne r1, sp + adrne lr, BSYM(1b) + bne do_IPI + +#ifdef CONFIG_LOCAL_TIMERS + test_for_ltirq r0, r6, r5, lr + movne r0, sp + adrne lr, BSYM(1b) + bne do_local_timer +#endif +9998: +#endif + .endm + + .macro arch_irq_handler, symbol_name + .align 5 + .global \symbol_name +\symbol_name: + arch_irq_handler_default + mov pc, lr + .endm --- 0002/arch/arm/kernel/entry-armv.S +++ work/arch/arm/kernel/entry-armv.S 2010-12-09 23:07:13.000000000 +0900 @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include @@ -38,35 +39,7 @@ adrne lr, BSYM(9997f) ldrne pc, [r1] #endif - get_irqnr_preamble r5, lr -1: get_irqnr_and_base r0, r6, r5, lr - movne r1, sp - @ - @ routine called with r0 = irq number, r1 = struct pt_regs * - @ - adrne lr, BSYM(1b) - bne asm_do_IRQ - -#ifdef CONFIG_SMP - /* - * XXX - * - * this macro assumes that irqstat (r6) and base (r5) are - * preserved from get_irqnr_and_base above - */ - ALT_SMP(test_for_ipi r0, r6, r5, lr) - ALT_UP_B(9997f) - movne r1, sp - adrne lr, BSYM(1b) - bne do_IPI - -#ifdef CONFIG_LOCAL_TIMERS - test_for_ltirq r0, r6, r5, lr - movne r0, sp - adrne lr, BSYM(1b) - bne do_local_timer -#endif -#endif + arch_irq_handler_default 9997: .endm