From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Bogendoerfer Subject: Re: [PATCH V2] mm/special: Create generic fallbacks for pte_special() and pte_mkspecial() Date: Tue, 10 Mar 2020 14:27:47 +0100 Message-ID: <20200310132747.GA12601@alpha.franken.de> References: <1583802551-15406-1-git-send-email-anshuman.khandual@arm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <1583802551-15406-1-git-send-email-anshuman.khandual@arm.com> Sender: linux-hexagon-owner@vger.kernel.org To: Anshuman Khandual Cc: linux-mm@kvack.org, Richard Henderson , Ivan Kokshaysky , Matt Turner , Russell King , Guo Ren , Brian Cain , Tony Luck , Fenghua Yu , Geert Uytterhoeven , Sam Creasey , Michal Simek , Ralf Baechle , Paul Burton , Nick Hu , Greentime Hu , Vincent Chen , Ley Foon Tan , Jonas Bonn , Stefan Kristiansson , Stafford Horne List-Id: linux-arch.vger.kernel.org On Tue, Mar 10, 2020 at 06:39:11AM +0530, 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) this looks wrong. current Kconfig statement is select ARCH_HAS_PTE_SPECIAL if !(32BIT && CPU_HAS_RIXI) so we can't use PTE_SPECIAL on 32bit _and_ CPUs with RIXI support. Why can't we use #if defined(CONFIG_ARCH_HAS_PTE_SPECIAL) here as the comment already suggests ? Thomas. -- Crap can work. Given enough thrust pigs will fly, but it's not necessarily a good idea. [ RFC1925, 2.3 ] From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from elvis.franken.de ([193.175.24.41]:60394 "EHLO elvis.franken.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728887AbgCJN2d (ORCPT ); Tue, 10 Mar 2020 09:28:33 -0400 Date: Tue, 10 Mar 2020 14:27:47 +0100 From: Thomas Bogendoerfer Subject: Re: [PATCH V2] mm/special: Create generic fallbacks for pte_special() and pte_mkspecial() Message-ID: <20200310132747.GA12601@alpha.franken.de> References: <1583802551-15406-1-git-send-email-anshuman.khandual@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1583802551-15406-1-git-send-email-anshuman.khandual@arm.com> Sender: linux-arch-owner@vger.kernel.org List-ID: To: Anshuman Khandual Cc: linux-mm@kvack.org, Richard Henderson , Ivan Kokshaysky , Matt Turner , Russell King , Guo Ren , Brian Cain , Tony Luck , Fenghua Yu , Geert Uytterhoeven , Sam Creasey , Michal Simek , Ralf Baechle , Paul Burton , Nick Hu , Greentime Hu , Vincent Chen , Ley Foon Tan , Jonas Bonn , Stefan Kristiansson , Stafford Horne , "James E.J. Bottomley" , Helge Deller , "David S. Miller" , Jeff Dike , Richard Weinberger , Anton Ivanov , Guan Xuetao , Chris Zankel , Max Filippov , Andrew Morton , linux-alpha@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-csky@vger.kernel.org, linux-hexagon@vger.kernel.org, linux-ia64@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org, nios2-dev@lists.rocketboards.org, openrisc@lists.librecores.org, linux-parisc@vger.kernel.org, sparclinux@vger.kernel.org, linux-um@lists.infradead.org, linux-xtensa@linux-xtensa.org, linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org Message-ID: <20200310132747.9Mt9gRToJQmDCgQA55558kZ2nGXVjaXC0mgnMvMkEyU@z> On Tue, Mar 10, 2020 at 06:39:11AM +0530, 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) this looks wrong. current Kconfig statement is select ARCH_HAS_PTE_SPECIAL if !(32BIT && CPU_HAS_RIXI) so we can't use PTE_SPECIAL on 32bit _and_ CPUs with RIXI support. Why can't we use #if defined(CONFIG_ARCH_HAS_PTE_SPECIAL) here as the comment already suggests ? Thomas. -- Crap can work. Given enough thrust pigs will fly, but it's not necessarily a good idea. [ RFC1925, 2.3 ]