[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 2 Feb 2022 09:37:41 +0200
From: Mike Rapoport <rppt@...nel.org>
To: Christophe Leroy <christophe.leroy@...roup.eu>
Cc: Anshuman Khandual <anshuman.khandual@....com>,
"linuxppc-dev@...ts.ozlabs.org" <linuxppc-dev@...ts.ozlabs.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-mm@...ck.org" <linux-mm@...ck.org>,
Paul Mackerras <paulus@...ba.org>,
Catalin Marinas <catalin.marinas@....com>,
"sparclinux@...r.kernel.org" <sparclinux@...r.kernel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Will Deacon <will@...nel.org>,
"David S. Miller" <davem@...emloft.net>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
Mike Kravetz <mike.kravetz@...cle.com>
Subject: Re: [PATCH] mm: Merge pte_mkhuge() call into arch_make_huge_pte()
On Wed, Feb 02, 2022 at 06:25:31AM +0000, Christophe Leroy wrote:
>
>
> Le 02/02/2022 à 07:18, Mike Rapoport a écrit :
> > On Wed, Feb 02, 2022 at 11:08:06AM +0530, Anshuman Khandual wrote:
> >> Each call into pte_mkhuge() is invariably followed by arch_make_huge_pte().
> >> Instead arch_make_huge_pte() can accommodate pte_mkhuge() at the beginning.
> >> This updates generic fallback stub for arch_make_huge_pte() and available
> >> platforms definitions. This makes huge pte creation much cleaner and easier
> >> to follow.
> >
> > Won't it break architectures that don't define arch_make_huge_pte()?
>
> It shouldn't, see below
Right, overlooked that.
> >> diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h
> >> index d1897a69c540..52c462390aee 100644
> >> --- a/include/linux/hugetlb.h
> >> +++ b/include/linux/hugetlb.h
> >> @@ -754,7 +754,7 @@ static inline void arch_clear_hugepage_flags(struct page *page) { }
> >> static inline pte_t arch_make_huge_pte(pte_t entry, unsigned int shift,
> >> vm_flags_t flags)
> >> {
> >> - return entry;
> >> + return pte_mkhuge(entry);
> >> }
> >> #endif
> >>
--
Sincerely yours,
Mike.
Powered by blists - more mailing lists