Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp646588pxv; Wed, 14 Jul 2021 12:02:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxEMXkzbezBKevDYgJYfg8eqNkB2aVNYCO+YMzxE43CYeLkdBUnTXstVkk9K6Y4e8AnRF7a X-Received: by 2002:a6b:d00b:: with SMTP id x11mr8333802ioa.167.1626289356454; Wed, 14 Jul 2021 12:02:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626289356; cv=none; d=google.com; s=arc-20160816; b=ljBfnhHv4UtXCwtZKdR7jAZTGT2cuiHdiN/gvuJCM3cGfF3VJtwYXZBU3K9bv4Yk2x ltRBl+bgHlLmF/yJvaw2RxdYLkZRjABSRn/p8dayHtDRuiCrv4g/hlF0VtKSGmD0DTFb F6aVmXlsJvZUZeoWY9Ky7+HPx0sFOLGohme60MY8SbktCIUzz7aB2mYg/aIuSotuL5hf 88uTyB5DyKjZ6QuwGgnaAcN5Iodl6MwmPb4N3jZ+dAQpH1gXHHwg1ygkxzZQzjbGo+ve HtB+Mb/JcfDNYox0BqOdESiMX/+t0T4NYE5NVwyqD/DmVENmcuW3zihB/05ESPyy0qWC Cb5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id:dkim-signature; bh=t+S5VMEjBgR7YbUh7lHZQebY6xrdUNsIJ8awUiWwlAo=; b=n3zSj79NNrjv3rWdZfoLdT9lGRskBTIpXnbYwwa4ECEVt/yzpOWHwob/jb9PrtNewu sWy8uBqXS16T3Be0wkqE6XU9L2w0BHfqa9G9I4yBeKL+ycnY5RjBmIOm107ngTuR2FCA 72bRSIrPid5Sq+QRR8HiyOzR3boqjS1PWPeVfAYcLsMCTixOS1v1QHtSVC3mSwL1ovLc 637rXzsULwoNGZ/JJOCJBf7QIm3FZiLJUzn5yNTLetsP0oC3Pb7CHelN1HT1o1doMVJr 4iYdg7u9cAqpdhAbfvBF2jbWnsf/J7P0vjPPP51tj8rT2m/82O3Ki7mBHAx8/5s1iueg bg0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=s4y3jQYL; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t16si2861814ilm.159.2021.07.14.12.02.21; Wed, 14 Jul 2021 12:02:36 -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=@gmail.com header.s=20161025 header.b=s4y3jQYL; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230139AbhGNTEm (ORCPT + 99 others); Wed, 14 Jul 2021 15:04:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39488 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229491AbhGNTEm (ORCPT ); Wed, 14 Jul 2021 15:04:42 -0400 Received: from mail-pl1-x62e.google.com (mail-pl1-x62e.google.com [IPv6:2607:f8b0:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9D8B1C06175F for ; Wed, 14 Jul 2021 12:01:49 -0700 (PDT) Received: by mail-pl1-x62e.google.com with SMTP id p17so1920315plf.12 for ; Wed, 14 Jul 2021 12:01:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:subject:from:to:cc:date:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=t+S5VMEjBgR7YbUh7lHZQebY6xrdUNsIJ8awUiWwlAo=; b=s4y3jQYLJ3sWce/75FApnRQPB73sXl9G83vK6s1c3/cYg4zsK/eOd4BIVm9NHfkh/c HUudSQTcCvPv6/4j1vKsSYP0FkZi7B1Bw29diygdC57B7t5r0rZvdVBS5YPxeyB+LdwG NQi/RrxeQcRAV3jZBRVNqfxLZqj6mNvXlg6WmqB7pPJDdEE5BjJktdN93wwdXrV9YZAO PxFSLCuSasVoQQwxtkDKZdoGcqRIxEH/IrSQUZG/nxmhHwuS9xRiCUodyJNP6Bsi0ET5 1N++egGRmNy0QtCxgDYUYEo5BruGVyO87SCANIQE8Z0eGSidZ7kkj064R0Osn6a8Ptjs 3OcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=t+S5VMEjBgR7YbUh7lHZQebY6xrdUNsIJ8awUiWwlAo=; b=mj0rY1rzhqDH9HAamdZGSDEj2+SLzf7UiovtrMCzpHScys1HVCkSR2SY0kXiK1qRvf uEJ03B9XplIkHdgBj2BG/3as3osHL/5fQrXQLSloRQsVThsEQG6qRepuUMwZJmBwVGEX xYHKY086fCVxipInt7oC41jS4EUWwaGH6se9VOpfEQ0S5r9flxKIXMzUhH+kA1wnKUI7 Nx+pK6Bh80K8cwfNf6TexBg5kNewQ+1CFPO4/kMHNDVQgQEo6PeT461ZE6kmRQTa/rwO q7BR7M8OYxj1gMflzr7bjRBHLj/OVnv82Mhai0p/KhIYGGTwVRo1EoIQ0JYSy/Qiu0UT ufJQ== X-Gm-Message-State: AOAM531yhrb8z4MM3CoDWMI42VIo6TdEQ7w4s3TXFnBygkK0P7rgB9OR 5KIsgBqaDWyYPxta484ZOFI= X-Received: by 2002:a17:90a:7546:: with SMTP id q64mr5225514pjk.174.1626289309111; Wed, 14 Jul 2021 12:01:49 -0700 (PDT) Received: from ?IPv6:2804:14c:482:92eb:ffdf:6b35:b94d:258? ([2804:14c:482:92eb:ffdf:6b35:b94d:258]) by smtp.gmail.com with ESMTPSA id f19sm2981386pjj.22.2021.07.14.12.01.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Jul 2021 12:01:48 -0700 (PDT) Message-ID: Subject: Re: [PATCH v4 07/11] powerpc/pseries/iommu: Reorganize iommu_table_setparms*() with new helper From: Leonardo =?ISO-8859-1?Q?Br=E1s?= To: Alexey Kardashevskiy , Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , Joel Stanley , Christophe Leroy , Nicolin Chen , Niklas Schnelle Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Date: Wed, 14 Jul 2021 16:02:00 -0300 In-Reply-To: <88e3b97e-201d-0782-0e95-8e3d2d850a38@ozlabs.ru> References: <20210430163145.146984-1-leobras.c@gmail.com> <20210430163145.146984-8-leobras.c@gmail.com> <97626d3883ed207b818760a8239babb08a6b5c59.camel@gmail.com> <88e3b97e-201d-0782-0e95-8e3d2d850a38@ozlabs.ru> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.40.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2021-07-14 at 18:32 +1000, Alexey Kardashevskiy wrote: > > > On 13/07/2021 14:47, Leonardo Brás wrote: > > Hello Alexey, > > > > On Fri, 2021-06-18 at 19:26 -0300, Leonardo Brás wrote: > > > > > > > > > +                                        unsigned long liobn, > > > > > unsigned long win_addr, > > > > > +                                        unsigned long > > > > > window_size, > > > > > unsigned long page_shift, > > > > > +                                        unsigned long base, > > > > > struct > > > > > iommu_table_ops *table_ops) > > > > > > > > > > > > iommu_table_setparms() rather than passing 0 around. > > > > > > > > The same comment about "liobn" - set it in > > > > iommu_table_setparms_lpar(). > > > > The reviewer will see what field atters in what situation imho. > > > > > > > > > > The idea here was to keep all tbl parameters setting in > > > _iommu_table_setparms (or iommu_table_setparms_common). > > > > > > I understand the idea that each one of those is optional in the > > > other > > > case, but should we keep whatever value is present in the other > > > variable (not zeroing the other variable), or do someting like: > > > > > > tbl->it_index = 0; > > > tbl->it_base = basep; > > > (in iommu_table_setparms) > > > > > > tbl->it_index = liobn; > > > tbl->it_base = 0; > > > (in iommu_table_setparms_lpar) > > > > > > > This one is supposed to be a question, but I missed the question > > mark. > > Sorry about that. > > Ah ok :) > > > I would like to get your opinion in this :) > > Besides making the "base" parameter a pointer, I really do not have > strong preference, just make it not hurting eyes of a reader, that's > all :) Ok, done :) > imho in general, rather than answering 5 weeks later, it is more > productive to address whatever comments were made, add comments (in > the > code or commit logs) why you are sticking to your initial approach, > rebase and repost the whole thing. Thanks, Thanks for the tip, and for the reviewing :) Best regards, Leonardo Bras