Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3649844ybi; Mon, 29 Jul 2019 10:07:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqzdxyFVaOdzYMo87TTbfjToylZwBa+abYp0rHjHLfB3hGgemIje3X3Oi2HNVR+qJpne7bmZ X-Received: by 2002:a63:c23:: with SMTP id b35mr71415656pgl.265.1564420020641; Mon, 29 Jul 2019 10:07:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564420020; cv=none; d=google.com; s=arc-20160816; b=pU6dsCKZGoxm/sM5uCY/sLKegsQfYBEaTgwfKNGgxidlLvHg/Rq08tKynaMAsXbk2H SIfs6OOlPX9bNP8HXEgUs4pjm4MoBoTiwqArPNryr/rP9dvc5Zew2sGfDCj+RPgz5N5W Mj/Sllij9/fbwpOGr7spNH8GLrXktLwkaqUjLE83ryNoje1Zwnex/hwOo3AuGUhGPEQL eliCdM4ggMgc5SULTyWO5eQPrgE6/OJn3f2volEzF/mSm9W7c/ZR3FP5WsId6CKN514g RZC3/GQsJ270VOYMgL0mozBTxqDfqo89SMLNLFW72TzYp5vA/1GJfwizAg4UKqaXTVYI HbJg== 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:mime-version :references:in-reply-to:message-id:cc:to:subject:from:date :dkim-signature; bh=HC/jSkCdvm90Ozg58x1zsdB2BSsxVhaJhq9+3F9/Oi0=; b=uCpzcl35gWK7WjoRtKWQUuWcv4PpEeu5jzkFpXEl3TmOlGblQD3wuBDKccxBBUE0RM O6m7pVZuhjK8xbFWgefWLf/U/EvO/u+5Z2+7hQn1Yjpt36Hc+tzrYolGMMloMSDuOHZ8 V4AXmDq6gfHA6cMrrNaTReNIovFOd80bx5bjVeas9SXoYCTNs3vXYuhspIk29qq4Zm5Z 99nZSofc2TRTU/CZMHp4vP1RfvFtfq8pOoFUlRy+Ix8M4cR8+2JqnTHUmPmHWiiJ2xhn MwH3A+iBv9WpOyj6zU6dMRlFqgtbz/2vgaG+N6ao47nNtq5hRnOY+J/pzyU/wrglOV2U 0Kpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@crapouillou.net header.s=mail header.b=IdFqzbnB; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=crapouillou.net Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j192si30082057pge.393.2019.07.29.10.06.46; Mon, 29 Jul 2019 10:07:00 -0700 (PDT) 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; dkim=fail header.i=@crapouillou.net header.s=mail header.b=IdFqzbnB; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=crapouillou.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387631AbfG2Q5a (ORCPT + 99 others); Mon, 29 Jul 2019 12:57:30 -0400 Received: from outils.crapouillou.net ([89.234.176.41]:38042 "EHLO crapouillou.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387596AbfG2Q5a (ORCPT ); Mon, 29 Jul 2019 12:57:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=crapouillou.net; s=mail; t=1564419447; 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=HC/jSkCdvm90Ozg58x1zsdB2BSsxVhaJhq9+3F9/Oi0=; b=IdFqzbnBdtYEV8yEqrTrmZyrvucwFFswhgvMdFnBFLmG0aqBYWv18fdQdk3xqLA3BR+yKo Y5RcvKDFCYbqbJUL7xRGgk2PB06BY95Xga0IqjwIKN0jGomveent/ipdd/9nvz1rH+6xNe 79F/oSO8mVbCOk61Nl8YMj/BX/JkWMU= Date: Mon, 29 Jul 2019 12:57:12 -0400 From: Paul Cercueil Subject: Re: [PATCH 3/4] irqchip: ingenic: Get virq number from IRQ domain To: Marc Zyngier Cc: Thomas Gleixner , Jason Cooper , linux-kernel@vger.kernel.org, od@zcrc.me, Zhou Yanjie Message-Id: <1564419432.1759.0@crapouillou.net> In-Reply-To: <538e79e5-539b-3066-b662-8ed4ec8bf261@arm.com> References: <20190727191741.30317-1-paul@crapouillou.net> <20190727191741.30317-3-paul@crapouillou.net> <538e79e5-539b-3066-b662-8ed4ec8bf261@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Marc, Le lun. 29 juil. 2019 =E0 6:38, Marc Zyngier a=20 =E9crit : > [+ Zhou Yanjie] >=20 > Paul, >=20 > On 27/07/2019 20:17, Paul Cercueil wrote: >> Get the virq number from the IRQ domain instead of calculating it=20 >> from >> the hardcoded irq base. >>=20 >> Signed-off-by: Paul Cercueil >> --- >> drivers/irqchip/irq-ingenic.c | 7 ++++++- >> 1 file changed, 6 insertions(+), 1 deletion(-) >>=20 >> diff --git a/drivers/irqchip/irq-ingenic.c=20 >> b/drivers/irqchip/irq-ingenic.c >> index d97a3a500249..82a079fa3a3d 100644 >> --- a/drivers/irqchip/irq-ingenic.c >> +++ b/drivers/irqchip/irq-ingenic.c >> @@ -21,6 +21,7 @@ >>=20 >> struct ingenic_intc_data { >> void __iomem *base; >> + struct irq_domain *domain; >> unsigned num_chips; >> }; >>=20 >> @@ -34,6 +35,7 @@ struct ingenic_intc_data { >> static irqreturn_t intc_cascade(int irq, void *data) >> { >> struct ingenic_intc_data *intc =3D irq_get_handler_data(irq); >> + struct irq_domain *domain =3D intc->domain; >> uint32_t irq_reg; >> unsigned i; >>=20 >> @@ -43,7 +45,8 @@ static irqreturn_t intc_cascade(int irq, void=20 >> *data) >> if (!irq_reg) >> continue; >>=20 >> - generic_handle_irq(__fls(irq_reg) + (i * 32) + JZ4740_IRQ_BASE); >> + irq =3D irq_find_mapping(domain, __fls(irq_reg) + (i * 32)); >> + generic_handle_irq(irq); >> } >>=20 >> return IRQ_HANDLED; >> @@ -95,6 +98,8 @@ static int __init ingenic_intc_of_init(struct=20 >> device_node *node, >> goto out_unmap_base; >> } >>=20 >> + intc->domain =3D domain; >> + >> for (i =3D 0; i < num_chips; i++) { >> /* Mask all irqs */ >> writel(0xffffffff, intc->base + (i * CHIP_SIZE) + >>=20 >=20 > This is likely to conflict with this[1] series, which turns the > intc_cascade function into a chained handler (which it should have=20 > been > from the start). Can you please work with Zhou to post a unified=20 > series? >=20 > Having two people working independently on the same file is likely to > end badly otherwise. I'm registered as maintainer for Ingenic SoCs (including ingenic-irq.c) and Zhou didn't Cc me on his patchset... And if he did I'd have a few comments on his patches that would have to be addressed in a V5. If you think my patchset is fine, then maybe merge it then Zhou can just rebase on top? Cheers, -Paul > Thanks, >=20 > M. >=20 > [1] > https://lore.kernel.org/lkml/1564335273-22931-1-git-send-email-zhouyanjie= @zoho.com/ > -- > Jazz is not dead. It just smells funny... =