[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <58aecdcf-ea16-c958-0deb-97541792e081@arm.com>
Date: Thu, 5 Mar 2020 13:04:19 +0530
From: Anshuman Khandual <anshuman.khandual@....com>
To: linux-mm@...ck.org, Ralf Baechle <ralf@...ux-mips.org>,
Paul Burton <paulburton@...nel.org>
Cc: Richard Henderson <rth@...ddle.net>,
Ivan Kokshaysky <ink@...assic.park.msu.ru>,
Matt Turner <mattst88@...il.com>,
Russell King <linux@...linux.org.uk>,
Guo Ren <guoren@...nel.org>, Brian Cain <bcain@...eaurora.org>,
Tony Luck <tony.luck@...el.com>,
Fenghua Yu <fenghua.yu@...el.com>,
Geert Uytterhoeven <geert@...ux-m68k.org>,
Sam Creasey <sammy@...my.net>, Michal Simek <monstr@...str.eu>,
Nick Hu <nickhu@...estech.com>,
Greentime Hu <green.hu@...il.com>,
Vincent Chen <deanbo422@...il.com>,
Ley Foon Tan <ley.foon.tan@...el.com>,
Jonas Bonn <jonas@...thpole.se>,
Stefan Kristiansson <stefan.kristiansson@...nalahti.fi>,
Stafford Horne <shorne@...il.com>,
"James E.J. Bottomley" <James.Bottomley@...senPartnership.com>,
Helge Deller <deller@....de>,
"David S. Miller" <davem@...emloft.net>,
Jeff Dike <jdike@...toit.com>,
Richard Weinberger <richard@....at>,
Anton Ivanov <anton.ivanov@...bridgegreys.com>,
Guan Xuetao <gxt@....edu.cn>, Chris Zankel <chris@...kel.net>,
Max Filippov <jcmvbkbc@...il.com>,
Andrew Morton <akpm@...ux-foundation.org>,
linux-alpha@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-csky@...r.kernel.org, linux-hexagon@...r.kernel.org,
linux-ia64@...r.kernel.org, linux-m68k@...ts.linux-m68k.org,
linux-mips@...r.kernel.org, nios2-dev@...ts.rocketboards.org,
openrisc@...ts.librecores.org, linux-parisc@...r.kernel.org,
sparclinux@...r.kernel.org, linux-um@...ts.infradead.org,
linux-xtensa@...ux-xtensa.org, linux-arch@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm/special: Create generic fallbacks for pte_special()
and pte_mkspecial()
On 03/02/2020 07:26 AM, Anshuman Khandual wrote:
> diff --git a/arch/mips/include/asm/pgtable.h b/arch/mips/include/asm/pgtable.h
> index aef5378f909c..8e4e4be1ca00 100644
> --- a/arch/mips/include/asm/pgtable.h
> +++ b/arch/mips/include/asm/pgtable.h
> @@ -269,6 +269,36 @@ static inline void set_pte_at(struct mm_struct *mm, unsigned long addr,
> */
> extern pgd_t swapper_pg_dir[];
>
> +/*
> + * Platform specific pte_special() and pte_mkspecial() definitions
> + * are required only when ARCH_HAS_PTE_SPECIAL is enabled.
> + */
> +#if !defined(CONFIG_32BIT) && !defined(CONFIG_CPU_HAS_RIXI)
> +#if defined(CONFIG_PHYS_ADDR_T_64BIT) && defined(CONFIG_CPU_MIPS32)
> +static inline int pte_special(pte_t pte)
> +{
> + return pte.pte_low & _PAGE_SPECIAL;
> +}
> +
> +static inline pte_t pte_mkspecial(pte_t pte)
> +{
> + pte.pte_low |= _PAGE_SPECIAL;
> + return pte;
> +}
> +#else
> +static inline int pte_special(pte_t pte)
> +{
> + return pte_val(pte) & _PAGE_SPECIAL;
> +}
> +
> +static inline pte_t pte_mkspecial(pte_t pte)
> +{
> + pte_val(pte) |= _PAGE_SPECIAL;
> + return pte;
> +}
> +#endif
> +#endif
> +
Hello Ralf/Paul,
This change now restricts mips definitions for pte_special() and pte_mkspecial()
and makes them visible only for configs where ARCH_HAS_PTE_SPECIAL is enabled.
Does this look okay ? In almost all other platforms we drop the stub definitions
for pte_special() and pte_mkspecial().
- Anshuman
Powered by blists - more mailing lists