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=-3.9 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,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 95575C3F2C6 for ; Fri, 28 Feb 2020 00:57:33 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 306962469D for ; Fri, 28 Feb 2020 00:57:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=canb.auug.org.au header.i=@canb.auug.org.au header.b="X7cxPdob" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 306962469D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=canb.auug.org.au Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id BD2AF6B0005; Thu, 27 Feb 2020 19:57:32 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id B839F6B0006; Thu, 27 Feb 2020 19:57:32 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A99696B0007; Thu, 27 Feb 2020 19:57:32 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0252.hostedemail.com [216.40.44.252]) by kanga.kvack.org (Postfix) with ESMTP id 8DBCD6B0005 for ; Thu, 27 Feb 2020 19:57:32 -0500 (EST) Received: from smtpin09.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 7E1529407 for ; Fri, 28 Feb 2020 00:57:32 +0000 (UTC) X-FDA: 76537722744.09.desk22_41b22a077ec1c X-HE-Tag: desk22_41b22a077ec1c X-Filterd-Recvd-Size: 3393 Received: from ozlabs.org (ozlabs.org [203.11.71.1]) by imf30.hostedemail.com (Postfix) with ESMTP for ; Fri, 28 Feb 2020 00:57:31 +0000 (UTC) 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 48TB2s06drz9sNg; Fri, 28 Feb 2020 11:57:24 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=canb.auug.org.au; s=201702; t=1582851446; bh=cLn7YRf4bXnihGBdnr5PMnT2/JtkUGDlQoebNt1AyvM=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=X7cxPdobtbfZ7RAZb1ZLg0hzqLGGQIxmPgKq8Vdw54sQNTJYbKpyP/g/1FfOzLJ5/ VbwTSLswysCZbdrs0++lR2rv5XlvUW0x2zYuxl3jdf9YwAARqxqBchIzJsDQ1ZcLc4 qwH+b8IKT0TctcmJnwDVHoLhyjkZ/e8ibWGg+ZTLe/x/S1r2hictzTOSAoK5ZnyLBr G0rAyVzhdT+pzcWvLmjP8VgzibguCtytEyQpuXt3au2eVBY9ckfc+I/8A6CnXwQmtQ 7jSF7laDhIqqL8rNXeNQWf1fB8/XSO+ZdBQvsY2zcd3C//5gUbbHBsrbpHHc3f/gCg FyjGtw79lCDIg== Date: Fri, 28 Feb 2020 11:57:19 +1100 From: Stephen Rothwell To: Arjun Roy Cc: davem@davemloft.net, akpm@linux-foundation.org, linux-mm@kvack.org, arjunroy@google.com, soheil@google.com, edumazet@google.com, geert@linux-m68k.org Subject: Re: [PATCH mm 1/2] mm: Define pte_index as macro for x86 Message-ID: <20200228115719.01c1cf57@canb.auug.org.au> In-Reply-To: <20200228004657.79943-1-arjunroy.kdev@gmail.com> References: <20200228004657.79943-1-arjunroy.kdev@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/umiSMcd5=STYPe51+Qfv2uo"; protocol="application/pgp-signature"; micalg=pgp-sha256 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: --Sig_/umiSMcd5=STYPe51+Qfv2uo Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Hi Arjun, On Thu, 27 Feb 2020 16:46:56 -0800 Arjun Roy wrot= e: > > diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtabl= e.h > index 7e118660bbd9..6658c04bce83 100644 > --- a/arch/x86/include/asm/pgtable.h > +++ b/arch/x86/include/asm/pgtable.h > @@ -823,6 +823,9 @@ static inline unsigned long pmd_index(unsigned long a= ddress) > */ > #define mk_pte(page, pgprot) pfn_pte(page_to_pfn(page), (pgprot)) > =20 > +/* Degenerative definition so we can test if pte_index is defined for ar= ch. */ > +#define pte_index pte_index You should put this definition directly above the static inline function. i.e. #define pte_index pte_index static inline unsigned long pte_index(unsigned long address) ... --=20 Cheers, Stephen Rothwell --Sig_/umiSMcd5=STYPe51+Qfv2uo Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEENIC96giZ81tWdLgKAVBC80lX0GwFAl5YZW8ACgkQAVBC80lX 0GwTDAf/XwQSxxrdLwyTm7lcpl92IzyKxj5toUI3FMfJRhABAus1B3oFB+9dzyt7 7ymAt7W3BPMP4ph8PUq7fP4lCxdAN+LALV5p3ZJzE7Otcji+xTo+f52/CKtN3rYu psMvgC/YapGTaj8PUnEyqh/tCiH3m0lXZkk3udFDqlv4tpv3mDP+UuWazUkF7EVf hl7Q3HROgq7S4D0EU6P2NN+QTsl0NznoOncBK+niHXKpEYAdMnVnGrZJzltRVMp/ kX7VUf17ll+JFQ/dzoe8DuKVtMkSI1KyKR+/ZLQwxEPsE0aPmKriPkBg/VV24OS6 FFEe48VM+rLWipMLeISWaz3NmSrmig== =0zsM -----END PGP SIGNATURE----- --Sig_/umiSMcd5=STYPe51+Qfv2uo--