From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.0 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,URIBL_BLACK autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DBAF2C6377C for ; Mon, 19 Jul 2021 19:15:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D2966610D2 for ; Mon, 19 Jul 2021 19:15:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1384451AbhGSS3V (ORCPT ); Mon, 19 Jul 2021 14:29:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57936 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1357173AbhGSSF5 (ORCPT ); Mon, 19 Jul 2021 14:05:57 -0400 Received: from mail-qv1-xf35.google.com (mail-qv1-xf35.google.com [IPv6:2607:f8b0:4864:20::f35]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 09CEBC061766 for ; Mon, 19 Jul 2021 11:31:15 -0700 (PDT) Received: by mail-qv1-xf35.google.com with SMTP id o9so8892610qvu.5 for ; Mon, 19 Jul 2021 11:43:41 -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=gVSVogAXROTPh3Dssd0UNY8nOlWjhPggt2vXEoxEy3U=; b=oydbKBWLfMAN9YjAsnWY1riBcENGN55t7esTwa86bYBQusYt5haJf44rKAdNZgprlR NNtNSMrpy0XZUzl6fgTZTIBA62XF2R4XNlMQBbd/FJ/pmzsZvpmjeMsSsBV3kFuRndr/ KIAYISKEzbnLWgj47t4BrcD+EGmS5zfijzU0zhnKUAYgD3qfakhN+Ufr1W07GABWpWav nKqxGYL1aY4W+EyEYa0RCW0CaUteZqhYW4L9NCA8kNSyDvR8eRMYea6yESkA/j+O5Jq7 lU/GyjEvL9J+Q4NKZoBVVqd1KYexU6bLsvy6LMUneuRyHyeVJnJnyoSg6W7E8/FaEJWf /erA== 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=gVSVogAXROTPh3Dssd0UNY8nOlWjhPggt2vXEoxEy3U=; b=E7DrVUgRviY7Qfs/2vbqqYP6NRxmMC81wQbcghnfiHr2kKsp7zH+0h7vLSfijXGyBB Y5nLBh9yevraMIiUO5WvPp30zWYVFmwBSk/uP6Tn73Uc9TI/0bgdtv4F3jc8Ya9RS/8B fFTUzrejBXtVvVuG7lQJsroSdFZy/FSeDPp1EFBJ3u22RSwu0MWfm+WKqoRLRXfXaw6Y t6qQJSpCqizPbkzLbEDAowaC3NbbCt0KZTKf24AASNg/0gefMeH5cqK02VVvY9q5HQYq o9WTSDG3TmitjPNOquwP5Lkf2zjnPJ2PiwYwVl2HB5gAu/Hi+V767zvCJy3kDDl0VIHs mmgg== X-Gm-Message-State: AOAM5308mGx4Vp5uhQPZmVJ9CQqwtECcMed9mj2XuVS2Itw0jLPc0inS F4iKNGQjUtXq4nZqRiX5Y3U= X-Google-Smtp-Source: ABdhPJyHxmWj4jRy+IaYfbUTtp+JlyfSuTdFWpuyI6w/20JYm0iGpz1vIYlNh7ENCzyfsSCrPoqRZw== X-Received: by 2002:a0c:8c0c:: with SMTP id n12mr26495316qvb.13.1626720220683; Mon, 19 Jul 2021 11:43:40 -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 n13sm558843qtx.92.2021.07.19.11.43.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Jul 2021 11:43:40 -0700 (PDT) Message-ID: Subject: Re: [PATCH v5 01/11] powerpc/pseries/iommu: Replace hard-coded page shift From: Leonardo =?ISO-8859-1?Q?Br=E1s?= To: Frederic Barrat , Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , Alexey Kardashevskiy , David Gibson , kernel test robot , Nicolin Chen Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Date: Mon, 19 Jul 2021 15:43:59 -0300 In-Reply-To: References: <20210716082755.428187-1-leobras.c@gmail.com> <20210716082755.428187-2-leobras.c@gmail.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.40.3 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2021-07-19 at 15:48 +0200, Frederic Barrat wrote: > > > On 16/07/2021 10:27, Leonardo Bras wrote: > > Some functions assume IOMMU page size can only be 4K (pageshift == > > 12). > > Update them to accept any page size passed, so we can use 64K > > pages. > > > > In the process, some defines like TCE_SHIFT were made obsolete, and > > then > > removed. > > > > IODA3 Revision 3.0_prd1 (OpenPowerFoundation), Figures 3.4 and 3.5 > > show > > a RPN of 52-bit, and considers a 12-bit pageshift, so there should > > be > > no need of using TCE_RPN_MASK, which masks out any bit after 40 in > > rpn. > > It's usage removed from tce_build_pSeries(), tce_build_pSeriesLP(), > > and > > tce_buildmulti_pSeriesLP(). > > > > Most places had a tbl struct, so using tbl->it_page_shift was > > simple. > > tce_free_pSeriesLP() was a special case, since callers not always > > have a > > tbl struct, so adding a tceshift parameter seems the right thing to > > do. > > > > Signed-off-by: Leonardo Bras > > Reviewed-by: Alexey Kardashevskiy > > --- > > FWIW, > Reviewed-by: Frederic Barrat > Thanks!