Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp582914ybb; Wed, 25 Mar 2020 05:51:25 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvzEjiWpIG8/vAEO3Bx5ouM5MPExPrF4fiY+Hz1eX2nAxasYO7RYxOuyrE02akVjIBC+e2U X-Received: by 2002:a05:6808:288:: with SMTP id z8mr2214637oic.149.1585140685163; Wed, 25 Mar 2020 05:51:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585140685; cv=none; d=google.com; s=arc-20160816; b=mlXT/jXHk1An7Yi1YxkOp6msHEWKz176r3uLsKwwkADK5Rh5BJmYRRp/u+/rTS+06N RZTRbQDCzZ2N0on2Az2I3p/WKg7qNfb4lhsatesx4F+eMcFPt5vV5mHNSMKK/ntUOc52 ofWhBSVbDE1qbRciOyOlISAt1ydB67mN/Aa8DP0QSAkZDD6sa/uaLGV13RhYTbX5KpnI 272vBCCABx+hGqJU8fGSgP0FFbzYxDMbO6C8PLx55Nlg9twuOLOFheRS27a7hyPnmf7r GE5apHR++oZOw3blfjf7Rusx/ooTJhN08HG0cgewNMPBQO+M2+m1q6cFBCWO/GrWFwEU Xk7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:from:cc:to:subject :content-transfer-encoding:mime-version:references:in-reply-to :user-agent:date:dkim-signature; bh=vqy9KgzyVYxmnrqFQc0i1Zu/TD9bYgtnU+TgEsbMRRo=; b=RR9XtvdaBUGueWfJYMlzgyxe0PyPVAb8Hk70zSrO2bGn17KUy08Tay/tStNtgQWTQm dVhJ7seWkatWzwhu6G/Zp+Ygn4Cp4a01fZFq9UDjxn2lJIbStMhnid6P+WhQpep7oYZt JPeY3RusgKzFOjkZMjswiazhDFCVz/vsIXVVzzOSGTiKTeo4iLVj/7ZN5YRYSoz0NnYR T1OM4LEN9LNTmnS9tXc32JtlfSBqtkOQS7QZRAxMqQ89LU4xwSwg2qJL2WX5EwIbkqZH ADc/SJ/058mNUmaUODD35Uuaet4plfSIJlPeckBfFI3iqHL/tAZp/9h/8ff/0gXy+4Pv jlUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@flygoat.com header.s=mail header.b=VWDVw0jl; 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=flygoat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r82si10799518oia.155.2020.03.25.05.51.13; Wed, 25 Mar 2020 05:51:25 -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=@flygoat.com header.s=mail header.b=VWDVw0jl; 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=flygoat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727448AbgCYMuv (ORCPT + 99 others); Wed, 25 Mar 2020 08:50:51 -0400 Received: from sender3-op-o12.zoho.com.cn ([124.251.121.243]:17851 "EHLO sender3-op-o12.zoho.com.cn" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726820AbgCYMuu (ORCPT ); Wed, 25 Mar 2020 08:50:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1585140544; s=mail; d=flygoat.com; i=jiaxun.yang@flygoat.com; h=Date:In-Reply-To:References:MIME-Version:Content-Type:Content-Transfer-Encoding:Subject:To:CC:From:Message-ID; bh=vqy9KgzyVYxmnrqFQc0i1Zu/TD9bYgtnU+TgEsbMRRo=; b=VWDVw0jlewF6cYs4orJtnyyrFP4lXEoBwc3qWxgWugL6Qbe5rnNu8cQYlvTuA4Zs GIStJDBaX9M0K3uYMcklLmRX8voyqvSfdxxSmwBsIWhTsTS9QXzABA4xO2dslNYWMvu Jtk1j1/vyJijL2Sv/5B5q8zNdjNl5Pum0UfJ3N88= Received: from [10.233.233.252] (183.157.60.227 [183.157.60.227]) by mx.zoho.com.cn with SMTPS id 1585140543288901.7885813665146; Wed, 25 Mar 2020 20:49:03 +0800 (CST) Date: Wed, 25 Mar 2020 20:48:55 +0800 User-Agent: K-9 Mail for Android In-Reply-To: <20200325123742.GA9911@alpha.franken.de> References: <20200325035537.156911-1-jiaxun.yang@flygoat.com> <20200325035537.156911-7-jiaxun.yang@flygoat.com> <20200325123742.GA9911@alpha.franken.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PATCH v8 06/11] irqchip: mips-cpu: Convert to simple domain To: Thomas Bogendoerfer CC: linux-mips@vger.kernel.org, Huacai Chen , Marc Zyngier , Thomas Gleixner , Jason Cooper , Rob Herring , Mark Rutland , Mauro Carvalho Chehab , "David S. Miller" , Greg Kroah-Hartman , Jonathan Cameron , Andy Shevchenko , Allison Randal , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org From: Jiaxun Yang Message-ID: X-ZohoCNMailClient: External Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org =E4=BA=8E 2020=E5=B9=B43=E6=9C=8825=E6=97=A5 GMT+08:00 =E4=B8=8B=E5=8D=888= :37:42, Thomas Bogendoerfer =E5=86=99=E5=88= =B0: >On Wed, Mar 25, 2020 at 11:54:59AM +0800, Jiaxun Yang wrote: >> The old code is using legacy domain to setup irq_domain for CPU >interrupts >> which requires irq_desc to be preallocated=2E >>=20 >> However, when MIPS_CPU_IRQ_BASE >=3D 16, irq_desc for CPU IRQs may end >up >> unallocated and lead to incorrect behavior=2E >>=20 >> Thus we convert the legacy domain to simple domain which can allocate >> irq_desc during initialization=2E >>=20 >> Signed-off-by: Jiaxun Yang >> Co-developed-by: Huacai Chen >> Signed-off-by: Huacai Chen >> Reviewed-by: Marc Zyngier >> --- >> drivers/irqchip/irq-mips-cpu=2Ec | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >>=20 >> diff --git a/drivers/irqchip/irq-mips-cpu=2Ec >b/drivers/irqchip/irq-mips-cpu=2Ec >> index 95d4fd8f7a96=2E=2Ec3cf7fa76424 100644 >> --- a/drivers/irqchip/irq-mips-cpu=2Ec >> +++ b/drivers/irqchip/irq-mips-cpu=2Ec >> @@ -251,7 +251,7 @@ static void __init __mips_cpu_irq_init(struct >device_node *of_node) >> clear_c0_status(ST0_IM); >> clear_c0_cause(CAUSEF_IP); >> =20 >> - irq_domain =3D irq_domain_add_legacy(of_node, 8, MIPS_CPU_IRQ_BASE, >0, >> + irq_domain =3D irq_domain_add_simple(of_node, 8, MIPS_CPU_IRQ_BASE, >> &mips_cpu_intc_irq_domain_ops, >> NULL); > >this breaks at least IP30 and guess it will break every platform where >MIPS_CPU_IRQ_BASE =3D=3D 0=2E add_legacy will always do >irq_domain_associate_many(), >while add_simple doesn't do it, if first_irq =3D=3D 0=2E > >Marc, what is the reason not doing it all the time ? What's the correct >way here to work with irq_domain_add_simple() in this case ? =20 I guess there is a inconsistent about whether IRQ 0 is a valid IRQ=2E In many places we consider IRQ 0 is invalid but here it should be valid=2E Thanks=2E > >Thomas=2E --=20 Jiaxun Yang