Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp250705pxf; Thu, 8 Apr 2021 02:10:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwOOL+yjJyJOIHQoWtA1QAE5qUeq4IMrV5Xx4ZdWbxNnxROXg686D6sPXdyRHSGc4TxVnvJ X-Received: by 2002:a17:90b:300c:: with SMTP id hg12mr7112933pjb.165.1617873041469; Thu, 08 Apr 2021 02:10:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617873041; cv=none; d=google.com; s=arc-20160816; b=OQEFw9k54aQxjkQvcoeZnqDQNAEuZXvx77KdYK9YkmqLD2W9Aa6cELbEW6uDjOXqEk xS+k3Sjk9XPgDyDnEUkVZlgzy+wW2tKlFKvi4SJkoZogoG/Ve66QOWhYw7yf8Ds0qP92 nClrNRUCTc8bkMxRJdG3bMz18RNmTItsrYRA2AbbLZ8E+Uz4MlJDBbpqVNRpIK0PHU2L ERbllcO/1QAZgDs9MgbyJGrKlQT+g0QKZc3KwpaGCrkK0PshczhR7qnoBtk6XXFJPGGH V5PPNRq3rK8ypm0T+ZMY6du6CJqc6LjIUk9ebFEb8cwAY/NC6K1Iwa1kxjm02c3ZqbSA iObg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:dkim-signature; bh=syWrLHDZpouiXYPnUfZDufLZS1BsaA++f8M1ifzW4Fg=; b=FWDQX5ZzHv9eGiQOxOithO2AFNUC05evlES1gMfic+GDkyqwX4IT/7i4Qra/awuZYg 2lCUkAyB/Dokjyytp4RjMo6ut41ifefziHRKK6+aMXQZoQTprVcDhJz4GXXOoD6s0Qj3 MlfDT1l0rOe4XbtYSszkYnRO7AVKtcHbKT/yBESyACC6X4H8i9RPNJN7QxsyJz91JJ+l 4bl7G7BCn/cRgdPd0vTix9R7kCwzho9bMWh+GEq97SWmIxH4+5IDVdGrTfbWpgZZN/G8 fUHQZW9n8/4KornD9x/CCBwjdjza0fCVRcHFaLQNZV82yKd6X3EMDZeghokSbv8aj5f4 v/Ew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ellerman.id.au header.s=201909 header.b=PQeNTa9Z; 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 gq10si8415226pjb.43.2021.04.08.02.10.28; Thu, 08 Apr 2021 02:10:41 -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=@ellerman.id.au header.s=201909 header.b=PQeNTa9Z; 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 S229672AbhDHJIg (ORCPT + 99 others); Thu, 8 Apr 2021 05:08:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37804 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229600AbhDHJIf (ORCPT ); Thu, 8 Apr 2021 05:08:35 -0400 Received: from ozlabs.org (ozlabs.org [IPv6:2401:3900:2:1::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E0DDBC061760 for ; Thu, 8 Apr 2021 02:08:24 -0700 (PDT) Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4FGFmQ5mnmz9sTD; Thu, 8 Apr 2021 19:08:22 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ellerman.id.au; s=201909; t=1617872902; bh=2iQ0KxKS3ScPyUXb+3w5OkbMsrgL2S49tAnm4lp8e5A=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=PQeNTa9Z7GQdU5rWcP9EymbkwpsAaOorjmNuPTROuQQgHawPX1iSK6Yqn5j7g4ddO 7IA9WA5RPZKRRwSjVljTKhaSIkgmBl4vs43F0c36u7DEuWu/xLCJ1qkvz/ciZRCjcl YWzOVr2rx7BKPeT4ODwx+viHKWiobCEmiZutX6H/ouYKrdqUXxXmZWGm5P2Ytg3eZE w8rMnGGmdqt7kA3m9einvJvxYPKgTgc+SGuD2e31X7JkT6NHavE/YRdtq8pijwEIEg gdtwzlQIzBn+FF6z4ygu/r+60SYjyKsEg8wpTbDon0GDv2ulZLAQhAe4AsaR35Ufuy tjVTmOMobWGrA== From: Michael Ellerman To: Leonardo Bras , Benjamin Herrenschmidt , Paul Mackerras , Alexey Kardashevskiy , brking@linux.vnet.ibm.com Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 1/1] powerpc/iommu: Enable remaining IOMMU Pagesizes present in LoPAR In-Reply-To: References: <20210407195613.131140-1-leobras.c@gmail.com> <87im4xe3pk.fsf@mpe.ellerman.id.au> <942acb9b23d87594d0b758cc0daf713be836f8e6.camel@gmail.com> Date: Thu, 08 Apr 2021 19:08:22 +1000 Message-ID: <87blapdtyx.fsf@mpe.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Leonardo Bras writes: > On Thu, 2021-04-08 at 03:20 -0300, Leonardo Bras wrote: >> > > +#define QUERY_DDW_PGSIZE_4K 0x01 >> > > +#define QUERY_DDW_PGSIZE_64K 0x02 >> > > +#define QUERY_DDW_PGSIZE_16M 0x04 >> > > +#define QUERY_DDW_PGSIZE_32M 0x08 >> > > +#define QUERY_DDW_PGSIZE_64M 0x10 >> > > +#define QUERY_DDW_PGSIZE_128M 0x20 >> > > +#define QUERY_DDW_PGSIZE_256M 0x40 >> > > +#define QUERY_DDW_PGSIZE_16G 0x80 >> > >> > I'm not sure the #defines really gain us much vs just putting the >> > literal values in the array below? >> >> My v1 did not use the define approach, what do you think of that? >> http://patchwork.ozlabs.org/project/linuxppc-dev/patch/20210322190943.715368-1-leobras.c@gmail.com/ >> >> > (of course, it would be that without the pageshift defines also, using > the __builtin_ctz() approach suggested by Alexey.) Yeah I think I like that better. cheers