Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp3224019rdg; Tue, 17 Oct 2023 08:08:01 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGf0TCLnjZ0AuUOHrOVQWaqTHARLz57Tpji5F6Qk7vW715GLxUtxjQ/0VqxkyHKkaXqEbP2 X-Received: by 2002:a05:6a00:1708:b0:6be:731:20d7 with SMTP id h8-20020a056a00170800b006be073120d7mr2894669pfc.11.1697555280953; Tue, 17 Oct 2023 08:08:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697555280; cv=none; d=google.com; s=arc-20160816; b=m4D4BgFWsRIydceMTfWH+GvJjH1AAAcDLDJ605IvOydqEILLVzpDrBeUXUgWYhS8RD VFEPng7Hdinl4/TBybhQtHksJYjBHrA1Tynm+0sT4ddV9AMAfc+qHcGsvmyNeUHwDKIu qCGXJfM4QXZRvj3oj0LxkWDClgQv3pZ1+xjebOgqrLbFDPjzwZJFTwT3TAos4CPFlJUd mxd7E0ZknToiL1fG7jDpihYIBQTujo2Ndu+8yyeXIpBdL0RQgJUyPmfjFBUqL0+Ja8jY u1Vt8j8wb7rdJ7XKZKbFNBAbbWpmg3wVDRm3mbO73hSbclTaDknUithniIkvkdJ+xv4v 2saQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=fc+BeKPfjaApdVuZ2mptOISBL2EV+8avGTyYqpZGpXk=; fh=RnUagPANjiWoJjRLbaUonphMGDXoZKlnpY/mR5xiDRM=; b=bkg6Na69GaR30/ovDLPX/UxkQyU9VRhIPfPVjfUyYNN1uZsjrxL7r5um2OjIbJTScO PueNmdHW0NIP57Vt5i6PBCzysL16Z9VEGZ22GH+wowR0Uzmz/uRYZnO9EE9s0uqDblhT 4BIZjJbnZyAMrvgX76KqxdVYLd0GuMaeXpbKn1D7wQ4PwFjm7Lh66Mx5Kzcy8Ykz6yCq Cb+7sr4lk7CgwJbOHn5XwFzjOJzxlp/C65+/fvW5mJUrFBG2tV2V6d/P+P9LBtmS9bNs d7uNir7ShHx8/V8j2mE2PyZufmD40zbP3Zt0yjsy6J2Wx7CPPJAJTHO55QqQRdKHTUOI a5fQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=XXul8jSn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id f21-20020a056a0022d500b006b7d62ed165si1877500pfj.94.2023.10.17.08.07.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Oct 2023 08:08:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=XXul8jSn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 37DEA80C0DCB; Tue, 17 Oct 2023 08:07:51 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344285AbjJQPHj (ORCPT + 99 others); Tue, 17 Oct 2023 11:07:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48266 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344279AbjJQPH3 (ORCPT ); Tue, 17 Oct 2023 11:07:29 -0400 Received: from mail-pf1-x434.google.com (mail-pf1-x434.google.com [IPv6:2607:f8b0:4864:20::434]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1533919BC; Tue, 17 Oct 2023 08:05:46 -0700 (PDT) Received: by mail-pf1-x434.google.com with SMTP id d2e1a72fcca58-6bd0e1b1890so2280142b3a.3; Tue, 17 Oct 2023 08:05:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697555145; x=1698159945; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=fc+BeKPfjaApdVuZ2mptOISBL2EV+8avGTyYqpZGpXk=; b=XXul8jSnElKAFWr77zuxxKgHVM3pz0IZPj6/FpQ8+C4jV27uH6yxhPJi5lfIuvQA9O msdvn+yNOVDyENYae5tdXkquwpiyeK8mXoeT/MXofb0vAz7UEqqcBWHYh/Z0hbRHCEV/ 69x0apS8T1CS5Qa7R3Yr+wuycUbXC8y4iK/Fj62ieAKk9CqQXvWParEGK630Erh4FgkK zr6dPiTq2VnBfXM+26TbP0KLy8Sws8ggwcAZZukpCte23XFNHZ6ikMf1F0vqFf+oWq2h EG5NdQMJdkIw1lNKnJe97yaOiWZuXTX+srzngs9ctg70dwTT23vQW4lkk05cDfBoXxn9 DRYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697555145; x=1698159945; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=fc+BeKPfjaApdVuZ2mptOISBL2EV+8avGTyYqpZGpXk=; b=o0GInIXWBMlXZJtEb7cx7pySnGeZr/uK5RUEsXoTfeknaAoIk9/btpufbSdTvlWn+I 6raG0reMrR28rt501KTp/zvzH7IAhy/Z6blube97wXSBZHj9i/VG8IzS3331fJCkywqE bt4eOAhjXAl/Gq+M0Dvg4sGs5c33LYy3B0/si7IeZemVIl/RXK6fkyXCmbfPrCvBtk0y /iLIRBgcuQf4prZx41ZxgJVcu/teRdYFapd51d35WHCMhKCzxvXKGljqgQNAJC3YOG7d lnkEl/gHNTEWn0G0XXrgWHRAcxdlbMSq1krLUnp2dKatPkYUP/e7bK0uPoQDFZm/bE78 hdEQ== X-Gm-Message-State: AOJu0YyhN814NgvlKV8vqM5scJzFG5axfIQw+AdpWO6PEwIYmW2UMjkm szwfQZYMd3+I8dHegtr3X6jwehkilZXUWQqrDWg= X-Received: by 2002:a05:6a20:3d01:b0:163:9f1d:b464 with SMTP id y1-20020a056a203d0100b001639f1db464mr2630754pzi.5.1697555145234; Tue, 17 Oct 2023 08:05:45 -0700 (PDT) MIME-Version: 1.0 References: <20230821061315.3416836-1-zhoubinbin@loongson.cn> <6ba31912-6738-6156-d5f4-3c8d3a3ca7bc@linaro.org> <86wmxcejav.wl-maz@kernel.org> <86pm2ye2si.wl-maz@kernel.org> In-Reply-To: From: Jonas Gorski Date: Tue, 17 Oct 2023 17:05:33 +0200 Message-ID: Subject: Re: [PATCH v2] dt-bindings: interrupt-controller: loongson,liointc: Fix warnings about liointc-2.0 To: Binbin Zhou Cc: Marc Zyngier , Jiaxun Yang , Krzysztof Kozlowski , Binbin Zhou , Huacai Chen , Thomas Gleixner , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Huacai Chen , loongson-kernel@lists.loongnix.cn, devicetree@vger.kernel.org, Thomas Bogendoerfer , linux-mips@vger.kernel.org, diasyzhang@tencent.com, linux-kernel@vger.kernel.org, frowand.list@gmail.com Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Tue, 17 Oct 2023 08:07:51 -0700 (PDT) On Mon, 16 Oct 2023 at 13:26, Binbin Zhou wrote: > > Hi all: > > Sorry, it's been a while since the last discussion. > > Previously, Krzysztof suggested using the standard "interrupt-map" > attribute instead of the "loongson,parent_int_map" attribute, which I > tried to implement, but the downside of this approach seems to be > obvious. > > First of all, let me explain again the interrupt routing of the > loongson liointc. > For example, the Loongson-2K1000 has 64 interrupt sources, each with > the following 8-bit interrupt routing registers (main regs attribute > in dts): > > +----+-------------------------------------------------------------------+ > | bit | description > | > +----+-------------------------------------------------------------------+ > | 3:0 | Processor core to route | > | 7:4 | Routed processor core interrupt pins (INT0--INT3) | > +-----+------------------------------------------------------------------+ > > The "loongson,parent_int_map" attribute is to describe the routed > interrupt pins to cpuintc. > > However, the "interrupt-map" attribute is not supposed to be used for > interrupt controller in the normal case. Though since commit > 041284181226 ("of/irq: Allow matching of an interrupt-map local to an > interrupt controller"), the "interrupt-map" attribute can be used in > interrupt controller nodes. Some interrupt controllers were found not > to work properly later, so in commit de4adddcbcc2 ("of/irq: Add a > quirk for controllers with their own definition of interrupt-map"), a > quirk was added for these interrupt controllers. As we can see from > the commit message, this is a bad solution in itself. > > Similarly, if we choose to use the "interrupt-map" attribute in the > interrupt controller, we have to use this unfriendly solution (quirk). > Because we hope of_irq_parse_raw() stops at the liointc level rather > than goto its parent level. > > So, I don't think it's a good choice to use a bad solution as a replacement. > > Do you have any other ideas? Assuming this is changeable at runtime, this sounds to me like this mapping/routing could easily be exposed as irqchip cpu affinity. Then userspace can apply all the performance optimizations it wants (and can easily update them without fiddling with the kernel/dts). And then there would be no need to hardcode/describe it in the dts(i) at all. Best Regards, Jonas