Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.5 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 539E9C33CA9 for ; Mon, 13 Jan 2020 16:33:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 25D2D214AF for ; Mon, 13 Jan 2020 16:33:48 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=crapouillou.net header.i=@crapouillou.net header.b="VY8usctL" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729015AbgAMQdr (ORCPT ); Mon, 13 Jan 2020 11:33:47 -0500 Received: from outils.crapouillou.net ([89.234.176.41]:53490 "EHLO crapouillou.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728873AbgAMQdq (ORCPT ); Mon, 13 Jan 2020 11:33:46 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=crapouillou.net; s=mail; t=1578933220; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=UCCNUg/hYOZ2GevfOy70EMdcJBLEX9zMTL09kz3du0A=; b=VY8usctL5Na9LW5iq15oeb1NIUwcwGcaERMaKEbK3OUTTChLrHwFhmy3fSY65LyxzNZL0G Y/14RycD0A1V49W4njuz5rQNpI9f+SB1pcFBVnkvoiAnfvGTSzzooKwQEnCREKgQ/NO4a/ w1Gjjoj+uU63+H3nJZPbyVhnUdmJx3o= From: Paul Cercueil To: Thomas Gleixner , Jason Cooper , Marc Zyngier Cc: od@zcrc.me, linux-kernel@vger.kernel.org, Paul Cercueil , "H . Nikolaus Schaller" , =?UTF-8?q?=E5=91=A8=E7=90=B0=E6=9D=B0?= Subject: [PATCH v2] irqchip: ingenic: Get rid of the legacy IRQ domain Date: Mon, 13 Jan 2020 13:33:29 -0300 Message-Id: <20200113163329.34282-2-paul@crapouillou.net> In-Reply-To: <20200113163329.34282-1-paul@crapouillou.net> References: <20200113163329.34282-1-paul@crapouillou.net> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Get rid of the legacy IRQ domain and hardcoded IRQ base, since all the Ingenic drivers and platform code have been updated to use devicetree. This also fixes the kernel being flooded with messages like: [ 0.000000] irq: :interrupt-controller@10001000 didn't like hwirq-0x0 to VIRQ8 mapping (rc=-19) Fixes: 8bc7464b5140 ("irqchip: ingenic: Alloc generic chips from IRQ domain"). Signed-off-by: Paul Cercueil Tested-by: H. Nikolaus Schaller Tested-by: 周琰杰 (Zhou Yanjie) --- Notes: v2: Update commit message to explain the reason of the fix drivers/irqchip/irq-ingenic.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/irqchip/irq-ingenic.c b/drivers/irqchip/irq-ingenic.c index 01d18b39069e..c5589ee0dfb3 100644 --- a/drivers/irqchip/irq-ingenic.c +++ b/drivers/irqchip/irq-ingenic.c @@ -17,7 +17,6 @@ #include #include -#include struct ingenic_intc_data { void __iomem *base; @@ -50,7 +49,7 @@ static irqreturn_t intc_cascade(int irq, void *data) while (pending) { int bit = __fls(pending); - irq = irq_find_mapping(domain, bit + (i * 32)); + irq = irq_linear_revmap(domain, bit + (i * 32)); generic_handle_irq(irq); pending &= ~BIT(bit); } @@ -97,8 +96,7 @@ static int __init ingenic_intc_of_init(struct device_node *node, goto out_unmap_irq; } - domain = irq_domain_add_legacy(node, num_chips * 32, - JZ4740_IRQ_BASE, 0, + domain = irq_domain_add_linear(node, num_chips * 32, &irq_generic_chip_ops, NULL); if (!domain) { err = -ENOMEM; -- 2.24.1