Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp192271pxv; Wed, 14 Jul 2021 01:34:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyceL5wwwERF9c8udIXDHeHFe81BlQ7MDuXRL5q9eaJahvXpMXHrSGcK5m3GmrJikUPqY2t X-Received: by 2002:a02:ccad:: with SMTP id t13mr7812319jap.29.1626251687524; Wed, 14 Jul 2021 01:34:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626251687; cv=none; d=google.com; s=arc-20160816; b=HvJ4iftdWGyd1d/B3uFjZ7DgrD+fiKKRz67+O5avdH9FS4FO1LnUUqEJ/C+22KLafl 4VBK7mI8klIA2CL+xBwPMHMIMnT1v/J7KhNjdcVZnWVzPxVENqwINcXzqrPuqk8jKQnS c+ZPlVRAX0h+D3hRJu4JnufAOhHxGSw7zs8QjV6+Sq3KiG4aWvfY49mBLyJTk7xY+vZB CR7n1PpIptchdszyJUytOq7wtcWGiO4yIjdOBrvzC/PNBHYSiXMUcfeJPomevuKrHh1Q HINGRV8jlUjTd6jkqlGBlLTQTc7zF51bZC+5jUny+759F1Y3WXGrCgemwxbMnr/gYv65 Y7kQ== 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=dX1snp8Zkg1yewGw7VfUJfTAWh+xT6mywa/1czjEeQA=; b=t8xdPRhyLp6qXwjb45cSrfctaZZ799KeHrNjotoNgsoPDba1hyGu5ulcFh0jlJARXF BelKM1sZ6cRccnm3TRJGymhKxlL/axhN2PV/5B195cuCny67SyJRfyEe3tu5HGmhap+q 3VawIYm4cULvdG8D1tx8h1A7NZCznj5BuDoZlKE2x+k60xtDCUXZYjDbXCtndHzftKrg r0rAKN9uP+IjJz4Ewjunl0Ajm93d60uCjE3IZKAslJT4TKttj34ac54VIhoVpbQiYpMn Xie7kakxwAaKCYUSQIpOSV9ua7fDDrvdsTB1tm9lVnYx/gNTHDEhVOvRdiIg/xMppItC Vaqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ozlabs-ru.20150623.gappssmtp.com header.s=20150623 header.b=0zJnH4Zy; 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 w9si2111253jad.35.2021.07.14.01.34.35; Wed, 14 Jul 2021 01:34:47 -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=@ozlabs-ru.20150623.gappssmtp.com header.s=20150623 header.b=0zJnH4Zy; 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 S238579AbhGNIfV (ORCPT + 99 others); Wed, 14 Jul 2021 04:35:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35108 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238496AbhGNIfV (ORCPT ); Wed, 14 Jul 2021 04:35:21 -0400 Received: from mail-pf1-x429.google.com (mail-pf1-x429.google.com [IPv6:2607:f8b0:4864:20::429]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F2C09C06175F for ; Wed, 14 Jul 2021 01:32:29 -0700 (PDT) Received: by mail-pf1-x429.google.com with SMTP id j9so1370957pfc.5 for ; Wed, 14 Jul 2021 01:32:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ozlabs-ru.20150623.gappssmtp.com; s=20150623; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=dX1snp8Zkg1yewGw7VfUJfTAWh+xT6mywa/1czjEeQA=; b=0zJnH4Zyt7DWULsNgwhWY9gCJlGQkLo1Ovz83E+FpkILCFpER32q1+2Fg+FOrGrNYg awADz0RVRI1V7iRBiwZ7X3DWXvgkHITcH8+lx7EvsnLtYknQUlKtABh3Ro5QpmyMxO57 y2Ic3fEsYvSibPdcs4Odroe2/K+rmDQ4MzrLqHL3jErQAc8h1skozyDTWkQwNEki4yam jxKT1MkwCXPs4eP6xp06BJzKj87bDvVooC3YcuBtTL/VeKZkid3Nw2z2kYN/KaWaOLm3 8wAt+ppvNjyKbUeasIUSYxLEpeXCCks5AD39+WnJl8ER/wkx7ZeEKDT9/FyoDvXEmD0A P5gg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=dX1snp8Zkg1yewGw7VfUJfTAWh+xT6mywa/1czjEeQA=; b=PQiNtNKE91uRc2gGqVeQx/PSjmZuAqLFBSHXUdDlKFKrEdygRtbYh+bw82fQxuUrNO Oj83X107/pmvnmeGe5iJflrVllo4qdk+hVW3006r2KtbyWTsQUOYtTqjr9qDK6+YXUoo TIdsGQT8UQBYzBzyF0Ac7g9OWxKmJaihLgPQLdyZY8tlKskH59j7S3A7swRpie73UOtU 9vAdmsoGxnBLM+pk8abyxpbD7xMoGnKYVggrZwWgmhcrW95dJE6mFN/zsBZUa2zQLpKA OIyE0lgvei3x/AIvvoLEOfpavpVa+DV9JaF9B2Uy/f3PvuG0USvpY9TOHQDPSS2xXZlF 3GDg== X-Gm-Message-State: AOAM5312H1RS3S6gpZqq51brNcFIyk3sTAWWZOR4yyPkTstImN/FQiuS wPajaocPCZYIjibvDKnoj6dh2Q== X-Received: by 2002:a65:6145:: with SMTP id o5mr8474989pgv.410.1626251549586; Wed, 14 Jul 2021 01:32:29 -0700 (PDT) Received: from [192.168.10.23] (219-90-184-65.ip.adam.com.au. [219.90.184.65]) by smtp.gmail.com with UTF8SMTPSA id a23sm1820095pfn.117.2021.07.14.01.32.25 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 14 Jul 2021 01:32:28 -0700 (PDT) Message-ID: <88e3b97e-201d-0782-0e95-8e3d2d850a38@ozlabs.ru> Date: Wed, 14 Jul 2021 18:32:22 +1000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:90.0) Gecko/20100101 Thunderbird/90.0 Subject: Re: [PATCH v4 07/11] powerpc/pseries/iommu: Reorganize iommu_table_setparms*() with new helper Content-Language: en-US To: =?UTF-8?Q?Leonardo_Br=c3=a1s?= , 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 References: <20210430163145.146984-1-leobras.c@gmail.com> <20210430163145.146984-8-leobras.c@gmail.com> <97626d3883ed207b818760a8239babb08a6b5c59.camel@gmail.com> From: Alexey Kardashevskiy In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 :) 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, -- Alexey