From patchwork Sun Oct 12 18:13:59 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Agner X-Patchwork-Id: 5071311 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 877DEC11AC for ; Sun, 12 Oct 2014 18:18:26 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B1957201F2 for ; Sun, 12 Oct 2014 18:18:25 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D3138201EC for ; Sun, 12 Oct 2014 18:18:24 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XdNgq-0003MZ-Ea; Sun, 12 Oct 2014 18:16:20 +0000 Received: from mail.kmu-office.ch ([178.209.48.102]) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XdNfZ-0001aB-Cy for linux-arm-kernel@lists.infradead.org; Sun, 12 Oct 2014 18:15:03 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.kmu-office.ch (Postfix) with ESMTP id CD168A495D for ; Sun, 12 Oct 2014 20:12:24 +0200 (CEST) X-Virus-Scanned: by amavisd-new at kmu-office.ch X-Amavis-Alert: BAD HEADER, Duplicate header field: "In-Reply-To" Received: from mail.kmu-office.ch ([127.0.0.1]) by localhost (mail.kmu-office.ch [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id AKGFOSGuGXUi for ; Sun, 12 Oct 2014 20:12:24 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail.kmu-office.ch (Postfix) with ESMTP id 905E8A4996 for ; Sun, 12 Oct 2014 20:12:19 +0200 (CEST) Received: from trochilidae.localdomain (80-254-69-12.dynamic.monzoon.net [80.254.69.12]) (Authenticated sender: stefan@agner.ch) by mail.kmu-office.ch (Postfix) with ESMTPSA id D033EA4992; Sun, 12 Oct 2014 20:12:18 +0200 (CEST) From: Stefan Agner To: shawn.guo@linaro.org, kernel@pengutronix.de, u.kleine-koenig@pengutronix.de Subject: [RFC 5/7] irqchip: nvic: increase number of external interrupts to 112 Date: Sun, 12 Oct 2014 20:13:59 +0200 Message-Id: X-Mailer: git-send-email 2.1.2 In-Reply-To: References: In-Reply-To: References: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20141012_111501_655191_505CB068 X-CRM114-Status: UNSURE ( 9.70 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.0 (/) Cc: devicetree@vger.kernel.org, linux@arm.linux.org.uk, arnd@arndb.de, Stefan Agner , marcel@ziswiler.com, olof@lixom.net, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP So far only vectors for up to 48 external interrupts have been registred in the vector table. Increase the amount of registred external vectors to 112. Also add a warning in case NVIC reports support for more interrupts than 128. Signed-off-by: Stefan Agner --- arch/arm/kernel/entry-v7m.S | 4 ++-- drivers/irqchip/irq-nvic.c | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/arm/kernel/entry-v7m.S b/arch/arm/kernel/entry-v7m.S index 2260f18..1c5deac 100644 --- a/arch/arm/kernel/entry-v7m.S +++ b/arch/arm/kernel/entry-v7m.S @@ -136,6 +136,6 @@ ENTRY(vector_table) .long __invalid_entry @ 13 - Reserved .long __pendsv_entry @ 14 - PendSV .long __invalid_entry @ 15 - SysTick - .rept 64 - 16 - .long __irq_entry @ 16..64 - External Interrupts + .rept 128 - 16 + .long __irq_entry @ 16..128 - External Interrupts .endr diff --git a/drivers/irqchip/irq-nvic.c b/drivers/irqchip/irq-nvic.c index 4ff0805..3ecb5fe 100644 --- a/drivers/irqchip/irq-nvic.c +++ b/drivers/irqchip/irq-nvic.c @@ -69,6 +69,8 @@ static int __init nvic_of_init(struct device_node *node, if (irqs > NVIC_MAX_IRQ) irqs = NVIC_MAX_IRQ; + WARN(irqs > 128, "vector table in entry-v7m.S configured for 128 irqs"); + nvic_irq_domain = irq_domain_add_linear(node, irqs, &irq_generic_chip_ops, NULL); if (!nvic_irq_domain) {