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=-5.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable 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 13EB4C18E5A for ; Tue, 10 Mar 2020 13:47:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id ED78624649 for ; Tue, 10 Mar 2020 13:47:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726910AbgCJNrA (ORCPT ); Tue, 10 Mar 2020 09:47:00 -0400 Received: from foss.arm.com ([217.140.110.172]:37284 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726444AbgCJNrA (ORCPT ); Tue, 10 Mar 2020 09:47:00 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id C8E4A30E; Tue, 10 Mar 2020 06:46:58 -0700 (PDT) Received: from [10.163.1.203] (unknown [10.163.1.203]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 26DEA3F6CF; Tue, 10 Mar 2020 06:46:44 -0700 (PDT) Subject: Re: [PATCH V2] mm/special: Create generic fallbacks for pte_special() and pte_mkspecial() To: Thomas Bogendoerfer 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 References: <1583802551-15406-1-git-send-email-anshuman.khandual@arm.com> <20200310132747.GA12601@alpha.franken.de> From: Anshuman Khandual Message-ID: Date: Tue, 10 Mar 2020 19:16:42 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20200310132747.GA12601@alpha.franken.de> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-csky-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-csky@vger.kernel.org On 03/10/2020 06:57 PM, Thomas Bogendoerfer wrote: > 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. I already had asked for clarification on this. > > Why can't we use > > #if defined(CONFIG_ARCH_HAS_PTE_SPECIAL) > > here as the comment already suggests ? Yes, that will be easier and will automatically adjust in case ARCH_HAS_PTE_SPECIAL scope changes later. Will respin the patch. > > Thomas. >