Received: by 2002:a05:6358:f14:b0:e5:3b68:ec04 with SMTP id b20csp975319rwj; Fri, 23 Dec 2022 10:32:56 -0800 (PST) X-Google-Smtp-Source: AMrXdXumdUM4J1hBW8rMmJlyHwHu3YEM4CaUZgFf+RsVeY5Y1jQBkIAbZVYyFbf1I3wB1D9OweZf X-Received: by 2002:a17:90a:9d8b:b0:219:7a1e:e643 with SMTP id k11-20020a17090a9d8b00b002197a1ee643mr11944970pjp.9.1671820376475; Fri, 23 Dec 2022 10:32:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671820376; cv=none; d=google.com; s=arc-20160816; b=NKLaWjRDPyECfFjOP7l6+lDaK83uDJWFV31tsU6Dlxbnh3nWtiHFDWKX9G/DKW1eI7 ANgJk/knjFV7QDuyxx7nu/mvRb6cUN804fTDrC3thF5/nKMMoVjU7liQuvPdhOKqj9ZI BsLC0sKjEdgPE59/3sxSAZI31PZOdQM3zPPAf4WqLYFo9w0SUekBEXFXvJb6L1Jqp6k1 eFhR3bz6R2vt3ddYsUXVm6HOOImvqdL1t47KJ9wf0H3672e/KLhQAfv+j8tWcFKQ6TJK yla4vBfz6aLiBlHYGNc0YBmUPf2UcIFVuYFvqKG35gefKJ+nbg54Pp8ZViWP9Pndey8L i9LQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=JDIg5CY2JaKsFGB2lcAV6dA1ibP6/hePKm8xnPYIyyI=; b=y5igetG4d68VOSbb9XS2IpPhh9WQtMqos+y0nVhxzxrI0b3uo7EZGK0eHo3vGK/YVy 42lDrYlVY+cKmrsA4hxTWau4VUrCfxMjOjxR3XTURKtFOmVUan+bJMUn8THysLTGpNj/ 7F6OOZaoSvw+U7Q2besF1DMGy1iyY8TBFgadOT7sEnAC9jrHWvOuHnOwW+rbbQ1zhH5n D+FrdyPSKlzs2+f50ACyR0KAXz3GmQ8FUxTVuwCEr6/5pnQPRblSgHdZ/Mg1lq2VVO2o t/KVD2MfeahryKehDTmVGYy072zWUHzGBrn/NRJT7tcX9L/f1gsKStBYzqrxGSYM+63m d6uQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=yJYm1pAi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o7-20020a635a07000000b00478ee0ffc8bsi4065592pgb.792.2022.12.23.10.32.47; Fri, 23 Dec 2022 10:32:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=yJYm1pAi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231592AbiLWRSm (ORCPT + 65 others); Fri, 23 Dec 2022 12:18:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35090 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231699AbiLWRSg (ORCPT ); Fri, 23 Dec 2022 12:18:36 -0500 Received: from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com [IPv6:2a00:1450:4864:20::12f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D34B61572D for ; Fri, 23 Dec 2022 09:18:34 -0800 (PST) Received: by mail-lf1-x12f.google.com with SMTP id g13so7807703lfv.7 for ; Fri, 23 Dec 2022 09:18:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=JDIg5CY2JaKsFGB2lcAV6dA1ibP6/hePKm8xnPYIyyI=; b=yJYm1pAib+wICXrxYFK2jPIHwFRLEozpLEIbNnVCzvDCKe57uaavGiw8OzXMIkiSmK MtyeKQ/SbZ4dyFTXrbaaU9HIwVOVsq6OJO++fDkt7DGCKA2f3z9LH2d/47PWDBF+R+cQ jdprSYLmZ5CtNgP5aRuyDhRb8NzAPxz9DVNo0n9SI7FHebWfZDApLN9spi7YvEhnY8qw 2qO9PevYIMP7+qozKR7/eazXOGQRlqpviBxRFzQOf/A0tUrNWCAp0mTN/n/W8Lajdd4D 9JlBthW3JAKGjligd5tCxEonP4T/NdKOjZkzBpvz4zIs3Il0j9/fpUm/WPtHY3N0kGEx xXnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=JDIg5CY2JaKsFGB2lcAV6dA1ibP6/hePKm8xnPYIyyI=; b=g9inu0g1lryuHzf35hznP0CbLYlbpA6qKOedjnu3cRVVmfXqk727xko423BFwDx+EO E6o4cGCq4x/Suv1iNnRG/EiwMlKZ5+qrs+hd6z2cD+VgPpeMd/B0ezwIChBorHEqhG24 IQ/ZlefhsZzNcpr/aG2hpAFmQVQkfiLa2vFi5doqG+Op33MD8AuZ4cqGK0uKv7/BcJDA XrQLDaFy17AY5kPptbb4JAtrsWFb6CpB/XIij4aMwvrdrF6/n7OqJAVXraD4o/Ub8I+u mXgyEBuiODAOCIorqGMz7R98rKhYyA6sq4guvurj3LJUXQL7JsUUl511tH03xizQyCfl Q2Kg== X-Gm-Message-State: AFqh2krLL+IArfBoswQTg1BkjUoX1v6a0RGqbFdZsPUpv6l0EaeE/mz0 fhsu1U0ssKdG0frbWPbxhiRZaA== X-Received: by 2002:ac2:46c3:0:b0:4b5:39fa:6de with SMTP id p3-20020ac246c3000000b004b539fa06demr3156696lfo.41.1671815913128; Fri, 23 Dec 2022 09:18:33 -0800 (PST) Received: from ?IPV6:2001:14ba:a085:4d00::8a5? (dzccz6yyyyyyyyyyybcwt-3.rev.dnainternet.fi. [2001:14ba:a085:4d00::8a5]) by smtp.gmail.com with ESMTPSA id c26-20020ac2531a000000b004a6f66eed7fsm591039lfh.165.2022.12.23.09.18.32 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 23 Dec 2022 09:18:32 -0800 (PST) Message-ID: Date: Fri, 23 Dec 2022 19:18:32 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.1 Subject: Re: [PATCH v2 3/3] arm64: dts: qcom: sm8450: Use GIC-ITS for PCIe0 and PCIe1 Content-Language: en-GB To: Manivannan Sadhasivam , andersson@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org Cc: bhelgaas@google.com, konrad.dybcio@linaro.org, linux-arm-msm@vger.kernel.org, linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org References: <20221222133123.50676-1-manivannan.sadhasivam@linaro.org> <20221222133123.50676-4-manivannan.sadhasivam@linaro.org> From: Dmitry Baryshkov In-Reply-To: <20221222133123.50676-4-manivannan.sadhasivam@linaro.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, 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 lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 22/12/2022 15:31, Manivannan Sadhasivam wrote: > Both PCIe0 and PCIe1 controllers are capable of receiving MSIs from > endpoint devices using GIC-ITS MSI controller. Add support for it. > > Currently, BDF (0:0.0) and BDF (1:0.0) are enabled and with the > msi-map-mask of 0xff00, all the 32 devices under these two busses can > share the same Device ID. > > The GIC-ITS MSI implementation provides an advantage over internal MSI > implementation using Locality-specific Peripheral Interrupts (LPI) that > would allow MSIs to be targeted for each CPU core. > > It should be noted that the MSIs for BDF (1:0.0) only works with Device > ID of 0x5980 and 0x5a00. Hence, the IDs are swapped. > > Signed-off-by: Manivannan Sadhasivam > --- > arch/arm64/boot/dts/qcom/sm8450.dtsi | 20 ++++++++++++++------ > 1 file changed, 14 insertions(+), 6 deletions(-) > > diff --git a/arch/arm64/boot/dts/qcom/sm8450.dtsi b/arch/arm64/boot/dts/qcom/sm8450.dtsi > index 570475040d95..c4dd5838fac6 100644 > --- a/arch/arm64/boot/dts/qcom/sm8450.dtsi > +++ b/arch/arm64/boot/dts/qcom/sm8450.dtsi > @@ -1733,9 +1733,13 @@ pcie0: pci@1c00000 { > ranges = <0x01000000 0x0 0x60200000 0 0x60200000 0x0 0x100000>, > <0x02000000 0x0 0x60300000 0 0x60300000 0x0 0x3d00000>; > > - interrupts = ; > - interrupt-names = "msi"; > - #interrupt-cells = <1>; > + /* > + * MSIs for BDF (1:0.0) only works with Device ID 0x5980. > + * Hence, the IDs are swapped. > + */ > + msi-map = <0x0 &gic_its 0x5981 0x1>, > + <0x100 &gic_its 0x5980 0x1>; This definitely doesn't match what has been used in the downstream. Also if I understand correctly this change would prevent us from using multiple MSI interrupts for the connected device, as the last value of the 0x100 mapping is 0x1, while the vendor kernel uses <0x100 &its 0x5981 0x20>. Do you know by chance, why do we differ from the vendor dtsi? > + msi-map-mask = <0xff00>; > interrupt-map-mask = <0 0 0 0x7>; > interrupt-map = <0 0 0 1 &intc 0 0 0 149 IRQ_TYPE_LEVEL_HIGH>, /* int_a */ > <0 0 0 2 &intc 0 0 0 150 IRQ_TYPE_LEVEL_HIGH>, /* int_b */ > @@ -1842,9 +1846,13 @@ pcie1: pci@1c08000 { > ranges = <0x01000000 0x0 0x40200000 0 0x40200000 0x0 0x100000>, > <0x02000000 0x0 0x40300000 0 0x40300000 0x0 0x1fd00000>; > > - interrupts = ; > - interrupt-names = "msi"; > - #interrupt-cells = <1>; > + /* > + * MSIs for BDF (1:0.0) only works with Device ID 0x5a00. > + * Hence, the IDs are swapped. > + */ > + msi-map = <0x0 &gic_its 0x5a01 0x1>, > + <0x100 &gic_its 0x5a00 0x1>; > + msi-map-mask = <0xff00>; > interrupt-map-mask = <0 0 0 0x7>; > interrupt-map = <0 0 0 1 &intc 0 0 0 434 IRQ_TYPE_LEVEL_HIGH>, /* int_a */ > <0 0 0 2 &intc 0 0 0 435 IRQ_TYPE_LEVEL_HIGH>, /* int_b */ -- With best wishes Dmitry