Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3300359pxf; Sun, 28 Mar 2021 20:43:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxgEfqqGKpLSnPhU2+EV1EMt3FILGwf1T+sA1NN0gkdNZYMdcU4JZfQuc3H+1RedLGi3gkw X-Received: by 2002:a17:906:cb87:: with SMTP id mf7mr26062735ejb.81.1616989426279; Sun, 28 Mar 2021 20:43:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616989426; cv=none; d=google.com; s=arc-20160816; b=kW3SlB8fiQOuzukhFyyOFUNzO4t5lN2PsdYcuEk/b8eazWfil6eLkOe7q3U3tH0dHk FWW6vEB/L1BbxHCbYIGJ1K9m32H/FgYTMC8dtF6DCKcIk50EMWzg8u5pFHlOsDjRQ3sH r9Oaui2qYWRUkoxDGBcpz4izxnnG/hSaZbe+M7AYiORCU5xqF86MufpzsnSNQc+wDahe UC0G3BrtkqULt8WM6mJA57/9cKGhrUul9NTJLoiiXOFWAn1gnWp9T1oEWnGC0SnjxCn+ lJmQ728+2jaQhizyVa5lKgyrSOdewrZz8zMDC+vS9rFFelx3Q60gV+aPzx0pksUqNo0G 5NFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=t+xrhMH6Gr2A3zI8Lcey2uhccYuzey1LBxw8FGRBr38=; b=nSYcCwR4hHgPhS3eb7QUBpGmWXSi1loGvcAtcXBRvxqHRM0KuvRO/6HtZT2wXghp3s +A1v6RgmHd4Jm9zxvRYvM+WyaLdjwt/nWtdBIv4q4LCAqcJ9o9mbyDlyl/L+a0Pxwkbg 1nUNHs5pXG1qoGzXR6U908o/zez7Dgkdps98fGZmXBOEhDBAZP1KHNbq+kYEGi9R7o0v YwOM8EhLNMu0IoaNSGiMnMS0GunnGSyBobM3FwH2gEWCfvwcLUVV9j4UGncGcI7JbzCl SCysr/5QmHU21TKAggNiaaPO/wbjHS1kLNx0AoCsUZ8VvaIwLe//RLz7TozVO/mT+clp g2FQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=GlrshGa0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cy27si11820314edb.529.2021.03.28.20.43.23; Sun, 28 Mar 2021 20:43:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=GlrshGa0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229873AbhC2DkP (ORCPT + 99 others); Sun, 28 Mar 2021 23:40:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44426 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230204AbhC2DkH (ORCPT ); Sun, 28 Mar 2021 23:40:07 -0400 Received: from mail-qv1-xf2f.google.com (mail-qv1-xf2f.google.com [IPv6:2607:f8b0:4864:20::f2f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 81430C061764 for ; Sun, 28 Mar 2021 20:40:07 -0700 (PDT) Received: by mail-qv1-xf2f.google.com with SMTP id t5so5848510qvs.5 for ; Sun, 28 Mar 2021 20:40:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=t+xrhMH6Gr2A3zI8Lcey2uhccYuzey1LBxw8FGRBr38=; b=GlrshGa0JheYxNSV53Bg30loaFV1EoaqTDeQ4sNl5yMfy0XcZRrlxMtdMSPW1A7Yf4 EbTgvKP2xqK9gpYlJKevK6F099bP6A7MjXe561/2v+ADngUOs3cryvs85OYWgtjJZXfk 1iQoDgHm2qxjio8Y9Ymp80ANC43PudXOfx/WUcIOvInOgXAy7VcIgWyRsm98QhImbst5 +/1tM1ELbjLI5lHjScnDyL90S4FRIHjiUbfHkrmzex7q+YurcZfSlSqSK3bSb3xrZVAs MnNvbTC7Hmn51U/oVHggPrGZ47AxohQwlQ8dtGXWZ4z6bqbTVeScW2T0abx16japHG9X wOPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=t+xrhMH6Gr2A3zI8Lcey2uhccYuzey1LBxw8FGRBr38=; b=mw+VxAgp2WYHVdoty0JGHTKEmWb2xw48psGz5Uf0y2XQstbcdg+rHfgpuYZWWIfucw 2wi7ABshLMlwaTU2wOzh3Y2XAk0aZI5fXMkuZiOp45eQHobPp086df7sww2acMwvjHSV tMHKc+QRPkIum1PLAryAduXhyyccyyfSHE7aRpk0Sxtg+LtGV5cuuB9Rjio9s6kbwWvt U2MM2qP6bseRQMZ+fGWasWhSm5tkVAudoBwXS+419NrXZOmEo5ak1C6fO5F8Vnoi4ghk sYjIcKHNI7adw5fOcOTNbo6sgnNOLVLwREFkEDumoU2RHtOTOpgZoxmNDaLENnK53RSG VhLQ== X-Gm-Message-State: AOAM530S1BUBMXKrdO1XWdg2i+8k0Tm6yZsc2MUK+3720G9w/nwTAkyk 4zaF+ERj97umRZy9/NOpRxaCifoUWKHFdfm8owkSZg== X-Received: by 2002:a0c:dd14:: with SMTP id u20mr24167583qvk.13.1616989206452; Sun, 28 Mar 2021 20:40:06 -0700 (PDT) MIME-Version: 1.0 References: <8008af6d86737b74020d7d8f9c3fbc9b500e9993.1615954046.git.greentime.hu@sifive.com> <20210323203508.GA1251968@robh.at.kernel.org> In-Reply-To: <20210323203508.GA1251968@robh.at.kernel.org> From: Greentime Hu Date: Mon, 29 Mar 2021 11:39:54 +0800 Message-ID: Subject: Re: [PATCH v2 4/6] dt-bindings: PCI: Add SiFive FU740 PCIe host controller To: Rob Herring Cc: Paul Walmsley , hes@sifive.com, Erik Danie , Zong Li , Bjorn Helgaas , Palmer Dabbelt , Albert Ou , Michael Turquette , sboyd@kernel.org, lorenzo.pieralisi@arm.com, Philipp Zabel , alex.dewar90@gmail.com, khilman@baylibre.com, hayashi.kunihiko@socionext.com, vidyas@nvidia.com, jh80.chung@samsung.com, linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-riscv , Linux Kernel Mailing List , linux-clk@vger.kernel.org, Bjorn Helgaas Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Rob Herring =E6=96=BC 2021=E5=B9=B43=E6=9C=8824=E6=97=A5 = =E9=80=B1=E4=B8=89 =E4=B8=8A=E5=8D=884:35=E5=AF=AB=E9=81=93=EF=BC=9A > > On Thu, Mar 18, 2021 at 02:08:11PM +0800, Greentime Hu wrote: > > Add PCIe host controller DT bindings of SiFive FU740. > > > > Signed-off-by: Greentime Hu > > --- > > .../bindings/pci/sifive,fu740-pcie.yaml | 119 ++++++++++++++++++ > > 1 file changed, 119 insertions(+) > > create mode 100644 Documentation/devicetree/bindings/pci/sifive,fu740-= pcie.yaml [...] > > +examples: > > + - | > > + pcie@e00000000 { > > + #address-cells =3D <3>; > > + #interrupt-cells =3D <1>; > > + #size-cells =3D <2>; > > + compatible =3D "sifive,fu740-pcie"; > > + reg =3D <0xe 0x00000000 0x1 0x0 > > Humm, 4GB for DBI space? The DWC controller doesn't have that much > space, and the kernel will map *all* of that. That's not an > insignificant amount of memory just for page tables. Thank you for review and point this out. :) I check the spec description for DBI in DWC_pcie_ctl_dm_databook.pdf section 3.15 3.16 and table 3-17. I think CX_SRIOV_ENABLE and CX_ARI_ENABLE will be set to 0 because these 2 are endpoint mode features. Single Root I/O Virtualization (SR-IOV) This section describes the SR-IOV features implemented in EP mode. The parameter for enabling SR-IOV is CX_SRIOV_ENABLE Alternative Routing-ID Interpretation (ARI) ARI allows an endpoint to support more than eight physical functions (PFs). ARI is enabled by the CX_ARI_ENABLE parameter. So based on Table 3-17, we will need to map 2GB(bit30) instead of 4GB(bit31= ).