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=-11.4 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL 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 3A213C3F2C6 for ; Fri, 28 Feb 2020 03:04:34 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id E13F820658 for ; Fri, 28 Feb 2020 03:04:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="jPitlVfr" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E13F820658 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 9022C6B0007; Thu, 27 Feb 2020 22:04:33 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 8B31B6B0008; Thu, 27 Feb 2020 22:04:33 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7C9C76B000A; Thu, 27 Feb 2020 22:04:33 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0144.hostedemail.com [216.40.44.144]) by kanga.kvack.org (Postfix) with ESMTP id 66FE16B0007 for ; Thu, 27 Feb 2020 22:04:33 -0500 (EST) Received: from smtpin25.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id E45F28248D51 for ; Fri, 28 Feb 2020 03:04:32 +0000 (UTC) X-FDA: 76538042784.25.shirt57_a90f38483e2e X-HE-Tag: shirt57_a90f38483e2e X-Filterd-Recvd-Size: 3753 Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by imf33.hostedemail.com (Postfix) with ESMTP for ; Fri, 28 Feb 2020 03:04:32 +0000 (UTC) Received: by mail-wr1-f68.google.com with SMTP id x7so1339201wrr.0 for ; Thu, 27 Feb 2020 19:04:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=CER/4RDXBmgEPoYrSdesEgvO6vazz2W1ZUmhB9V5IWc=; b=jPitlVfraFwx8PFQhRyzp6m5FkrVAw6b42yKPJwr6Z8aXA9ChI3bxwGGOYGfAFdwW8 6MFY9+KFAVurW/c1RuYbWcwvNk5RmOfe4wRBwRUlg1E6wXFZceCR0zeyz+aHZzrBqVIQ 8EnHu8BCXQRAJ3iraVO2no2WDvSP7DJcl1Zl6sj8CWsr6LgM1QvJAl/x5f0aP3OSNocm rNSdVLdulAllvJShRkFPLXgOnwYnQFk29NyfA+VCzaG+xjZ3d7MPehquBMJIs3B3YcK3 WpZ8rB0L6dTpqqp79odczRLghKx4RaqAk8iYyN78s56TE1biK3mYPfYX41CoZAhBBGH8 ZwgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=CER/4RDXBmgEPoYrSdesEgvO6vazz2W1ZUmhB9V5IWc=; b=s9Mlqsq7wR3jgaI2395I75CXCgkJAUVZZskHIKQW29KTLdb/SKX7NhXKUUdRNV6gcl 5bPrjJWwR9+g7cyvyNU+8rxpu6qKs1WpNdaEgIXGkwszRlc+6IJyIqd4R3/EOPqh8OLD GRPR1SreDNCIeiq9aMXDhZXDORkykxDULepQPRNdp5NGSEVaLARLEjck9RnfaMqWQ3rK qjdC3WOXol3ExX8kVwTUTfKIVCQfrVXAW1m4OQVXh+v0ePW3pEWmVCEkNEXFouNfyhEv sDJKXMGhkAqDUMQZEprSlbnrS5/LYTdhsmVZR/GL7kbg2pL6Uihf3Urxe6f6CHaC/ZP8 GOww== X-Gm-Message-State: APjAAAXNkx1aXfNBV/tJSnQWzNEGW1WqAnNKjkzg4966FhTZaZ3k36m0 QoiFfAny8hdoxtsWP7/DhiKXTV+Gf3NXKghFU0EWTQ== X-Google-Smtp-Source: APXvYqyeKZ2lTIjQfF4U8YK1WnPOE19SDMoX57EJu0pffK0ioJ8YHX+apdhzfUMmpcV39+wSUmdvHzxVeUwaKaipGRk= X-Received: by 2002:adf:f84a:: with SMTP id d10mr2248093wrq.208.1582859070768; Thu, 27 Feb 2020 19:04:30 -0800 (PST) MIME-Version: 1.0 References: <20200228004657.79943-1-arjunroy.kdev@gmail.com> <20200228115719.01c1cf57@canb.auug.org.au> In-Reply-To: <20200228115719.01c1cf57@canb.auug.org.au> From: Arjun Roy Date: Thu, 27 Feb 2020 19:04:16 -0800 Message-ID: Subject: Re: [PATCH mm 1/2] mm: Define pte_index as macro for x86 To: Stephen Rothwell Cc: Arjun Roy , David Miller , Andrew Morton , linux-mm@kvack.org, Soheil Hassas Yeganeh , Eric Dumazet , Geert Uytterhoeven Content-Type: text/plain; charset="UTF-8" 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: On Thu, Feb 27, 2020 at 4:57 PM Stephen Rothwell wrote: > > Hi Arjun, > > On Thu, 27 Feb 2020 16:46:56 -0800 Arjun Roy wrote: > > > > diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.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 address) > > */ > > #define mk_pte(page, pgprot) pfn_pte(page_to_pfn(page), (pgprot)) > > > > +/* Degenerative definition so we can test if pte_index is defined for arch. */ > > +#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) > ... > Done. -Arjun > -- > Cheers, > Stephen Rothwell