aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Christophe Leroy <christophe.leroy@csgroup.eu> 2023-09-25 20:31:25 +0200
committerGravatar Michael Ellerman <mpe@ellerman.id.au> 2023-10-19 17:12:44 +1100
commit0f4027eab59261f2fb72586f18efb44be3594dd4 (patch)
tree5b5fe497b557fd81ef570b7e8cfc0022d80335d1
parentpowerpc/nohash: Move 8xx version of pte_update() into pte-8xx.h (diff)
downloadlinux-0f4027eab59261f2fb72586f18efb44be3594dd4.tar.gz
linux-0f4027eab59261f2fb72586f18efb44be3594dd4.tar.bz2
linux-0f4027eab59261f2fb72586f18efb44be3594dd4.zip
powerpc/nohash: Replace #ifdef CONFIG_44x by IS_ENABLED(CONFIG_44x) in pgtable.h
No need of a #ifdef, use IS_ENABLED(CONFIG_44x) Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://msgid.link/7c7d97322a6a05a9842b1e8c4b41265916f542ca.1695659959.git.christophe.leroy@csgroup.eu
-rw-r--r--arch/powerpc/include/asm/nohash/32/pgtable.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/arch/powerpc/include/asm/nohash/32/pgtable.h b/arch/powerpc/include/asm/nohash/32/pgtable.h
index be8bca42bdce..a74476de1ef6 100644
--- a/arch/powerpc/include/asm/nohash/32/pgtable.h
+++ b/arch/powerpc/include/asm/nohash/32/pgtable.h
@@ -9,9 +9,7 @@
#include <linux/threads.h>
#include <asm/mmu.h> /* For sub-arch specific PPC_PIN_SIZE */
-#ifdef CONFIG_44x
extern int icache_44x_need_flush;
-#endif
#endif /* __ASSEMBLY__ */
@@ -229,10 +227,9 @@ static inline pte_basic_t pte_update(struct mm_struct *mm, unsigned long addr, p
*p = __pte(new);
-#ifdef CONFIG_44x
- if ((old & _PAGE_USER) && (old & _PAGE_EXEC))
+ if (IS_ENABLED(CONFIG_44x) && (old & _PAGE_USER) && (old & _PAGE_EXEC))
icache_44x_need_flush = 1;
-#endif
+
return old;
}
#endif