From patchwork Wed Apr 18 13:40:20 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 7920 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 880E523E13 for ; Wed, 18 Apr 2012 13:40:41 +0000 (UTC) Received: from mail-iy0-f180.google.com (mail-iy0-f180.google.com [209.85.210.180]) by fiordland.canonical.com (Postfix) with ESMTP id 40DE0A18342 for ; Wed, 18 Apr 2012 13:40:41 +0000 (UTC) Received: by iage36 with SMTP id e36so14288804iag.11 for ; Wed, 18 Apr 2012 06:40:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:mime-version:content-type :x-gm-message-state; bh=swAGmbvl08uU5Ac1ACXOcfqEK3GHq81O1uuUjwOgjLA=; b=MsP8tvE+BstEeAqwrwiz+gtewpJbsSsft6+GotmQ4H0axGvr2U2MxpYkD0o2PUpz8f 5NntzkE0cuN6+OgJCEW3/7X1u/YLCxnVHl4l7dJfH87PsxM4xIVBdPq1D6Lf3WjonPIp Rb2Sv99glCWeKjL0D3/lDU6u2u04it6jy8bKXz+KcII5d4TYLC7jetR+iE1JWHh/26/K yjo/hNxD+a6IfYQb92ZJYns6tOVEmZv7S6NgCq6QpyJWFiQWaWrWum9SQIgk/+yGrcR1 YuqFcZ5C8yhrOwoXUVRPUcc2oef4gcXQudpAy2SSWddD3caEbGWZXo6f3PQVCZxa7lII +0ew== Received: by 10.42.19.72 with SMTP id a8mr629842icb.39.1334756440706; Wed, 18 Apr 2012 06:40:40 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.231.137.198 with SMTP id x6csp217174ibt; Wed, 18 Apr 2012 06:40:40 -0700 (PDT) Received: by 10.213.101.11 with SMTP id a11mr221304ebo.81.1334756439255; Wed, 18 Apr 2012 06:40:39 -0700 (PDT) Received: from eu1sys200aog120.obsmtp.com (eu1sys200aog120.obsmtp.com. [207.126.144.149]) by mx.google.com with SMTP id w3si5752525eef.209.2012.04.18.06.40.32 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 18 Apr 2012 06:40:39 -0700 (PDT) Received-SPF: neutral (google.com: 207.126.144.149 is neither permitted nor denied by best guess record for domain of linus.walleij@stericsson.com) client-ip=207.126.144.149; Authentication-Results: mx.google.com; spf=neutral (google.com: 207.126.144.149 is neither permitted nor denied by best guess record for domain of linus.walleij@stericsson.com) smtp.mail=linus.walleij@stericsson.com Received: from beta.dmz-us.st.com ([167.4.1.35]) (using TLSv1) by eu1sys200aob120.postini.com ([207.126.147.11]) with SMTP ID DSNKT47ETnFaXh7rGkHc3l86eDDEYjBY9JgS@postini.com; Wed, 18 Apr 2012 13:40:36 UTC Received: from zeta.dmz-us.st.com (ns4.st.com [167.4.16.71]) by beta.dmz-us.st.com (STMicroelectronics) with ESMTP id 05EA465; Wed, 18 Apr 2012 13:40:09 +0000 (GMT) Received: from relay1.stm.gmessaging.net (unknown [10.230.100.17]) by zeta.dmz-us.st.com (STMicroelectronics) with ESMTP id B1FE661; Wed, 18 Apr 2012 11:34:49 +0000 (GMT) Received: from exdcvycastm022.EQ1STM.local (alteon-source-exch [10.230.100.61]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (Client CN "exdcvycastm022", Issuer "exdcvycastm022" (not verified)) by relay1.stm.gmessaging.net (Postfix) with ESMTPS id 8A5F224C075; Wed, 18 Apr 2012 15:40:18 +0200 (CEST) Received: from steludxu4075.lud.stericsson.com (10.230.100.153) by smtp.stericsson.com (10.230.100.30) with Microsoft SMTP Server (TLS) id 8.3.83.0; Wed, 18 Apr 2012 15:40:25 +0200 From: Linus Walleij To: Benjamin Herrenschmidt , Grant Likely Cc: , Linus Walleij Subject: [PATCH] irqdomain: print a warning if domains contain IRQ 0 Date: Wed, 18 Apr 2012 15:40:20 +0200 Message-ID: <1334756420-12019-1-git-send-email-linus.walleij@stericsson.com> X-Mailer: git-send-email 1.7.9.2 MIME-Version: 1.0 X-Gm-Message-State: ALoCoQkaMD7H58cidGI1uVbri/3fKz75mIWcRWDnn9I34x1SYHJ3IyGOnbVzP4FfR1RE32MvHTUI From: Linus Walleij Some of the clients using IRQ domains from the ARM VIC (arch/arm/common/vic.c) don't know that their (hardware) IRQ 0 is silently ignored by the IRQ core, they will just notice that they're not getting this IRQ anymore. So print a warning if a domain contains IRQ 0 (NO_IRQ) so we get some noise about it atleast. Signed-off-by: Linus Walleij --- kernel/irq/irqdomain.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c index 0e0ba5f..1444454 100644 --- a/kernel/irq/irqdomain.c +++ b/kernel/irq/irqdomain.c @@ -136,8 +136,10 @@ struct irq_domain *irq_domain_add_legacy(struct device_node *of_node, int hwirq = first_hwirq + i; /* IRQ0 gets ignored */ - if (!irq) + if (!irq) { + pr_warn("trying to register IRQ 0 (NO_IRQ) in an irq domain\n"); continue; + } /* Legacy flags are left to default at this point, * one can then use irq_create_mapping() to