Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp9970343rwp; Thu, 20 Jul 2023 12:29:13 -0700 (PDT) X-Google-Smtp-Source: APBJJlH++PfwjQEoczH35YRbiQudTrZagnk7own2szCjN13hpZjIc4jsc/yxhSgTZzfk/dTeDzhR X-Received: by 2002:a17:90b:23d4:b0:263:f856:a82c with SMTP id md20-20020a17090b23d400b00263f856a82cmr380577pjb.15.1689881353319; Thu, 20 Jul 2023 12:29:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689881353; cv=none; d=google.com; s=arc-20160816; b=DuIsMSXGiTMxAM9jA7FlscqUsI8qo3vvhNm2EvJRnpPoffus1mXKQHgJDcVwVaIOs/ /VD+gbA7qVlKdCjrOo/3bWGJUwUY+NAYNIpwVEGSnOjhlepMNd/3vrBnkn4GU5K/970y W2y7byGAYFRlByexBeuWFlcRF7KI1aSqF0vgiv5B1dEgtQj7Oe7GIUq0gUe6XNjdRLms Vd2KWQpBxkQvbndUqeSvcorT+iPD8t5EENSrS67SQ9LgO00G4uG46QrN/l8PkYnkeLDy FDheSDgaimRobMju+zulfRcQI60YgFUlKGskZaHYjdXDXjeavgiyXo8dRtlzW79L6SPG +LCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=drKsQsT3tgXruWdnQXrFRMxjZszorOvXj7U2B2ApJMA=; fh=9E65uUDf7ZP/qAh0trdpSaVokzMkEBaBJAQHmWEpSGI=; b=QfenDHg+Zl70foL/1E+99XVvfb5j+yMNKEdyyfRMq33kZIpdQQf5w3Tum1H1rYr+ld x6NDMZFYbtzrngj7eIZlHvLHNi/CQYkoIib8FT0HqU5LWzD5wub6ZJbrxw1/SPPrThx5 vUZMWXQf8AOzrhCDxBwyDy2gidMqld8im3NzaehcnEHgVhgRXYWmXigdIUrkCV30Q4dv 5oBSz3zgC3IAjjfxDjqlkpWQmj3vbrHmvl1mv9SsKOWozkb6CPB7CXpxoXTcsVdJa7Ob d2LAnFXNe4N8UhWFB+fe1hXRCx4PpeFLVw4BKHYIEHcxgUtnz2YBy/HhpL5jVjIJCB0w jhXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=RWOLF1qZ; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l15-20020a17090aaa8f00b00263fa42fdcbsi3915221pjq.107.2023.07.20.12.29.00; Thu, 20 Jul 2023 12:29:13 -0700 (PDT) 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=@kernel.org header.s=k20201202 header.b=RWOLF1qZ; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229665AbjGTSnN (ORCPT + 99 others); Thu, 20 Jul 2023 14:43:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43852 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229622AbjGTSnI (ORCPT ); Thu, 20 Jul 2023 14:43:08 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 19A52E47 for ; Thu, 20 Jul 2023 11:43:08 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id A2B6761BF4 for ; Thu, 20 Jul 2023 18:43:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 42364C433C8; Thu, 20 Jul 2023 18:43:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1689878587; bh=CftVQWk9Ijln5SVTcZMMv33xaJ0bY8lCQxLn3uWe+u4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=RWOLF1qZRL5dRGzrRnnBDYpuKqqusqAOMnAksX3CZSt2fOKP7D6z6RPQcXQhIaTqo cjnztL8x8ghDIZ12l5IMpd4qMC9edIXDhe2ZbOYtm+tXiObFWfhl/cVJh9YykknmGg QFyX18cwCd4dB+WugtRgoIUi0E2/ycIPjg3ek0uITg0g+QStf1QhWXRI4swhpoaqzC AZsEuGk5Fbu3AQbRMtatg9znWxftPqKTLsxWzzFYL28euQ87Wg5okOonIW1vDVv/iT JlhnVfu7nIlrqm11+P3Tx3pMz9RD/jgsSnuB1rGXcIVqDVyBjwIkavAlifczeMt0Om c7UnWdHQheo/Q== Date: Thu, 20 Jul 2023 19:43:01 +0100 From: Conor Dooley To: Tomasz Jeznach Cc: Nick Kossifidis , Anup Patel , Albert Ou , linux@rivosinc.com, Will Deacon , Joerg Roedel , linux-kernel@vger.kernel.org, Sebastien Boeuf , iommu@lists.linux.dev, Palmer Dabbelt , Paul Walmsley , linux-riscv@lists.infradead.org, Robin Murphy Subject: Re: [PATCH 06/11] RISC-V: drivers/iommu/riscv: Add command, fault, page-req queues Message-ID: <20230720-heftiness-refill-465b3d122049@spud> References: <1fd79e5c53d9d6ed2264f60dd4261f293cc00472.1689792825.git.tjeznach@rivosinc.com> <5b8fd18e-8dfa-96bf-cdd4-4498b1d15ab9@ics.forth.gr> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="41cqKGBWt2/BBb8/" Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 --41cqKGBWt2/BBb8/ Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jul 20, 2023 at 11:00:10AM -0700, Tomasz Jeznach wrote: > On Wed, Jul 19, 2023 at 8:12=E2=80=AFPM Nick Kossifidis wrote: > > On 7/19/23 22:33, Tomasz Jeznach wrote: > > The description doesn't match the subject nor the patch content (we > > don't jus enable interrupts, we also init the queues). > > > > > + /* Parse Queue lengts */ > > > + ret =3D of_property_read_u32(pdev->dev.of_node, "cmdq_len", &io= mmu->cmdq_len); > > > + if (!ret) > > > + dev_info(dev, "command queue length set to %i\n", iommu= ->cmdq_len); > > > + > > > + ret =3D of_property_read_u32(pdev->dev.of_node, "fltq_len", &io= mmu->fltq_len); > > > + if (!ret) > > > + dev_info(dev, "fault/event queue length set to %i\n", i= ommu->fltq_len); > > > + > > > + ret =3D of_property_read_u32(pdev->dev.of_node, "priq_len", &io= mmu->priq_len); > > > + if (!ret) > > > + dev_info(dev, "page request queue length set to %i\n", = iommu->priq_len); > > > + > > > dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64)); > > > > > > > We need to add those to the device tree binding doc (or throw them away, > > I thought it would be better to have them as part of the device > > desciption than a module parameter). Aye, I didn't notice these. Any DT properties /must/ be documented. To avoid having to make the comments on v2, properties should also not contain underscores. > We can add them as an optional fields to DT. > Alternatively, I've been looking into an option to auto-scale CQ/PQ > based on number of attached devices, but this gets trickier for > hot-pluggable systems. I've added module parameters as a bare-minimum, > but still looking for better solutions. If they're properties of the hardware, they should come from DT/ACPI, unless they're auto-detectable, in which case that is preferred. To quote GregKH "please do not add new module parameters for drivers, this is not the 1990s" :) --41cqKGBWt2/BBb8/ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZLmANQAKCRB4tDGHoIJi 0h1LAP4qwV/U4fkdeNz/O5eIUZiTgJRLrGctJ7hxwjCOtnYH2QD/UrUGAZU83zSg IC1ocFNxT4sq0rSSzdqwA6y4crpD3g0= =fI39 -----END PGP SIGNATURE----- --41cqKGBWt2/BBb8/--