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=-8.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 8B08BC3F2D2 for ; Fri, 6 Mar 2020 00:36:05 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (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 44D7020684 for ; Fri, 6 Mar 2020 00:36:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 44D7020684 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 lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 48YTDy6wm4zDqgS for ; Fri, 6 Mar 2020 11:36:02 +1100 (AEDT) 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 48YT3B0n7vzDqQq for ; Fri, 6 Mar 2020 11:27:34 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=ellerman.id.au Received: by ozlabs.org (Postfix, from userid 1034) id 48YT396mMRz9sSR; Fri, 6 Mar 2020 11:27:33 +1100 (AEDT) X-powerpc-patch-notification: thanks X-powerpc-patch-commit: 0b1c524caaae2428b20e714297243e5551251eb5 In-Reply-To: <7b065c5be35726af4066cab238ee35cabceda1fa.1578558199.git.christophe.leroy@c-s.fr> To: Christophe Leroy , Benjamin Herrenschmidt , Paul Mackerras , Mike Rapoport From: Michael Ellerman Subject: Re: [PATCH v3 1/2] powerpc/32: refactor pmd_offset(pud_offset(pgd_offset... Message-Id: <48YT396mMRz9sSR@ozlabs.org> Date: Fri, 6 Mar 2020 11:27:33 +1100 (AEDT) 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" On Thu, 2020-01-09 at 08:25:25 UTC, Christophe Leroy wrote: > At several places pmd pointer is retrieved through the same action: > > pmd = pmd_offset(pud_offset(pgd_offset(mm, addr), addr), addr); > > or > > pmd = pmd_offset(pud_offset(pgd_offset_k(addr), addr), addr); > > Refactor this by implementing two helpers pmd_ptr() and pmd_ptr_k() > > This will help when adding the p4d level. > > Signed-off-by: Christophe Leroy Series applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/0b1c524caaae2428b20e714297243e5551251eb5 cheers