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=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS 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 DE774C433ED for ; Thu, 8 Apr 2021 09:08:47 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 33E306112F for ; Thu, 8 Apr 2021 09:08:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 33E306112F Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ellerman.id.au Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4FGFms5Bchz3bTs for ; Thu, 8 Apr 2021 19:08:45 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=ellerman.id.au header.i=@ellerman.id.au header.a=rsa-sha256 header.s=201909 header.b=PQeNTa9Z; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=ellerman.id.au (client-ip=2401:3900:2:1::2; helo=ozlabs.org; envelope-from=mpe@ellerman.id.au; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=ellerman.id.au header.i=@ellerman.id.au header.a=rsa-sha256 header.s=201909 header.b=PQeNTa9Z; dkim-atps=neutral Received: from ozlabs.org (bilbo.ozlabs.org [IPv6:2401:3900:2:1::2]) (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 lists.ozlabs.org (Postfix) with ESMTPS id 4FGFmR2gZlz30Bp for ; Thu, 8 Apr 2021 19:08:23 +1000 (AEST) 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 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 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" 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