Thread (3 messages) 3 messages, 2 authors, 2020-03-10

Re: [PATCH V2] mm/special: Create generic fallbacks for pte_special() and pte_mkspecial()

From: Anshuman Khandual <hidden>
Date: 2020-03-10 13:47:02
Also in: linux-alpha, linux-arch, linux-m68k, linux-mips, linux-mm, linux-um, lkml, sparclinux


On 03/10/2020 06:57 PM, Thomas Bogendoerfer wrote:
On Tue, Mar 10, 2020 at 06:39:11AM +0530, Anshuman Khandual wrote:
quoted
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.
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help