Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp1882946ybc; Wed, 20 Nov 2019 05:41:19 -0800 (PST) X-Google-Smtp-Source: APXvYqyXzeXgHe85hBvhf1ufDsjbDwh6iHh4RFY3L07MsRGuzy3I2bAh6xKf14FHZEfOunirceQl X-Received: by 2002:a17:906:5397:: with SMTP id g23mr5319107ejo.93.1574257279206; Wed, 20 Nov 2019 05:41:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574257279; cv=none; d=google.com; s=arc-20160816; b=y/5cbk444F55TgZzDZz/B/1ajKoio8f6RRm2PGoenFNXyywLo6vHOS4I8hnmrPB9Hm msteYJ0aqaZfb/AmumQDzPmQMY9DiCzQorE3HZjVivUeqZ6m0apOe5JkVwSJkh06KPaF UPs8pFQVGinhNsjnxuPL4Du2/GmwEmeQW+/SonGhE1nFcI4PCtdJcL/uMqodMaItJPXp A9axsFDzh30G88exe5ILM4NEIYw9N/QgpbUU/eJgbj9Qh1OBHuR9JfLR7EkwWxhXg8Iq flWAC+PUBWpZ+einKwJQusqvNtXBX3MPJXDOM249+upT++sE4bMhPhyUtR06ZOLAfXyC 3htw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :robot-unsubscribe:robot-id:message-id:mime-version:references :in-reply-to:cc:subject:to:reply-to:from:date; bh=DOPfMb0tnljNbZq6bWg5aEXPAP+FXMHyLFbYSV+J3mI=; b=L/y/v8CRYM3k9F1opQXWILfZW3NNvqtGIW/T3eTGPog3EBQZUCPm91uTi/MxOUVmfA 4pwkxRN1LYITsElwmv2zN8dqzL7zvjCq5ONUOPLiJJCTB5Xtuobli2AjP4ZAJFYW36KS BDrzg4bA8gZNR0wGbOYQBpzi9t4Ty1zpAL2WbSWG38D60R0PeTs27uL4UmeTbb855KZD wAN/CbHeozs41tt0Uqnqimaf+FHx49sMj57boVslFwIF+uR+hL+sUgfZksuHcB1Gkquy Xf/xWywMarwXw6f3Dc6R/p6xs+ieo7V+OjrWgjBCV56Kt0T0+XgW5aE5JQedEwRphIPl yEkg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c24si15413083ejs.366.2019.11.20.05.40.55; Wed, 20 Nov 2019 05:41:19 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730198AbfKTNVN (ORCPT + 99 others); Wed, 20 Nov 2019 08:21:13 -0500 Received: from Galois.linutronix.de ([193.142.43.55]:56713 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730184AbfKTNVL (ORCPT ); Wed, 20 Nov 2019 08:21:11 -0500 Received: from [5.158.153.53] (helo=tip-bot2.lab.linutronix.de) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1iXPuv-00076J-2j; Wed, 20 Nov 2019 14:21:09 +0100 Received: from [127.0.1.1] (localhost [IPv6:::1]) by tip-bot2.lab.linutronix.de (Postfix) with ESMTP id 927CF1C19FE; Wed, 20 Nov 2019 14:21:02 +0100 (CET) Date: Wed, 20 Nov 2019 13:21:02 -0000 From: "tip-bot2 for Paul Cercueil" Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: irq/core] irqchip: ingenic: Get virq number from IRQ domain Cc: Paul Cercueil , Marc Zyngier , Ingo Molnar , Borislav Petkov , linux-kernel@vger.kernel.org In-Reply-To: <1570015525-27018-4-git-send-email-zhouyanjie@zoho.com> References: <1570015525-27018-4-git-send-email-zhouyanjie@zoho.com> MIME-Version: 1.0 Message-ID: <157425606250.12247.13541398452844645434.tip-bot2@tip-bot2> X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the irq/core branch of tip: Commit-ID: 208caadce5d4d38f48af965206bbd4473d265080 Gitweb: https://git.kernel.org/tip/208caadce5d4d38f48af965206bbd4473d265080 Author: Paul Cercueil AuthorDate: Wed, 02 Oct 2019 19:25:23 +08:00 Committer: Marc Zyngier CommitterDate: Sun, 10 Nov 2019 18:55:30 irqchip: ingenic: Get virq number from IRQ domain Get the virq number from the IRQ domain instead of calculating it from the hardcoded irq base. Signed-off-by: Paul Cercueil Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/1570015525-27018-4-git-send-email-zhouyanjie@zoho.com --- drivers/irqchip/irq-ingenic.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/irqchip/irq-ingenic.c b/drivers/irqchip/irq-ingenic.c index d97a3a5..82a079f 100644 --- a/drivers/irqchip/irq-ingenic.c +++ b/drivers/irqchip/irq-ingenic.c @@ -21,6 +21,7 @@ struct ingenic_intc_data { void __iomem *base; + struct irq_domain *domain; unsigned num_chips; }; @@ -34,6 +35,7 @@ struct ingenic_intc_data { static irqreturn_t intc_cascade(int irq, void *data) { struct ingenic_intc_data *intc = irq_get_handler_data(irq); + struct irq_domain *domain = intc->domain; uint32_t irq_reg; unsigned i; @@ -43,7 +45,8 @@ static irqreturn_t intc_cascade(int irq, void *data) if (!irq_reg) continue; - generic_handle_irq(__fls(irq_reg) + (i * 32) + JZ4740_IRQ_BASE); + irq = irq_find_mapping(domain, __fls(irq_reg) + (i * 32)); + generic_handle_irq(irq); } return IRQ_HANDLED; @@ -95,6 +98,8 @@ static int __init ingenic_intc_of_init(struct device_node *node, goto out_unmap_base; } + intc->domain = domain; + for (i = 0; i < num_chips; i++) { /* Mask all irqs */ writel(0xffffffff, intc->base + (i * CHIP_SIZE) +