aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2016-08-03 16:45:50 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2016-08-04 08:50:07 -0400
commit97f2645f358b411ba2afb22e5966753f0ad92916 (patch)
tree131ff2c4f9454b075a0179879dbcb078e510fd13 /arch/mips
parent1c8cb409491403036919dd1c6b45013dc8835a44 (diff)
tree-wide: replace config_enabled() with IS_ENABLED()
The use of config_enabled() against config options is ambiguous. In practical terms, config_enabled() is equivalent to IS_BUILTIN(), but the author might have used it for the meaning of IS_ENABLED(). Using IS_ENABLED(), IS_BUILTIN(), IS_MODULE() etc. makes the intention clearer. This commit replaces config_enabled() with IS_ENABLED() where possible. This commit is only touching bool config options. I noticed two cases where config_enabled() is used against a tristate option: - config_enabled(CONFIG_HWMON) [ drivers/net/wireless/ath/ath10k/thermal.c ] - config_enabled(CONFIG_BACKLIGHT_CLASS_DEVICE) [ drivers/gpu/drm/gma500/opregion.c ] I did not touch them because they should be converted to IS_BUILTIN() in order to keep the logic, but I was not sure it was the authors' intention. Link: http://lkml.kernel.org/r/1465215656-20569-1-git-send-email-yamada.masahiro@socionext.com Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Acked-by: Kees Cook <keescook@chromium.org> Cc: Stas Sergeev <stsp@list.ru> Cc: Matt Redfearn <matt.redfearn@imgtec.com> Cc: Joshua Kinard <kumba@gentoo.org> Cc: Jiri Slaby <jslaby@suse.com> Cc: Bjorn Helgaas <bhelgaas@google.com> Cc: Borislav Petkov <bp@suse.de> Cc: Markos Chandras <markos.chandras@imgtec.com> Cc: "Dmitry V. Levin" <ldv@altlinux.org> Cc: yu-cheng yu <yu-cheng.yu@intel.com> Cc: James Hogan <james.hogan@imgtec.com> Cc: Brian Gerst <brgerst@gmail.com> Cc: Johannes Berg <johannes@sipsolutions.net> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Will Drewry <wad@chromium.org> Cc: Nikolay Martynov <mar.kolya@gmail.com> Cc: Huacai Chen <chenhc@lemote.com> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Daniel Borkmann <daniel@iogearbox.net> Cc: Leonid Yegoshin <Leonid.Yegoshin@imgtec.com> Cc: Rafal Milecki <zajec5@gmail.com> Cc: James Cowgill <James.Cowgill@imgtec.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: Alex Smith <alex.smith@imgtec.com> Cc: Adam Buchbinder <adam.buchbinder@gmail.com> Cc: Qais Yousef <qais.yousef@imgtec.com> Cc: Jiang Liu <jiang.liu@linux.intel.com> Cc: Mikko Rapeli <mikko.rapeli@iki.fi> Cc: Paul Gortmaker <paul.gortmaker@windriver.com> Cc: Denys Vlasenko <dvlasenk@redhat.com> Cc: Brian Norris <computersforpeace@gmail.com> Cc: Hidehiro Kawai <hidehiro.kawai.ez@hitachi.com> Cc: "Luis R. Rodriguez" <mcgrof@do-not-panic.com> Cc: Andy Lutomirski <luto@amacapital.net> Cc: Ingo Molnar <mingo@redhat.com> Cc: Dave Hansen <dave.hansen@linux.intel.com> Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> Cc: Roland McGrath <roland@hack.frob.com> Cc: Paul Burton <paul.burton@imgtec.com> Cc: Kalle Valo <kvalo@qca.qualcomm.com> Cc: Viresh Kumar <viresh.kumar@linaro.org> Cc: Tony Wu <tung7970@gmail.com> Cc: Huaitong Han <huaitong.han@intel.com> Cc: Sumit Semwal <sumit.semwal@linaro.org> Cc: Alexei Starovoitov <ast@kernel.org> Cc: Juergen Gross <jgross@suse.com> Cc: Jason Cooper <jason@lakedaemon.net> Cc: "David S. Miller" <davem@davemloft.net> Cc: Oleg Nesterov <oleg@redhat.com> Cc: Andrea Gelmini <andrea.gelmini@gelma.net> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Marc Zyngier <marc.zyngier@arm.com> Cc: Rabin Vincent <rabin@rab.in> Cc: "Maciej W. Rozycki" <macro@imgtec.com> Cc: David Daney <david.daney@cavium.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/mips')
-rw-r--r--arch/mips/include/asm/mips-cm.h2
-rw-r--r--arch/mips/include/asm/pgtable.h16
-rw-r--r--arch/mips/include/asm/seccomp.h4
-rw-r--r--arch/mips/include/asm/signal.h4
-rw-r--r--arch/mips/include/asm/syscall.h2
-rw-r--r--arch/mips/include/asm/uaccess.h2
-rw-r--r--arch/mips/jz4740/setup.c2
-rw-r--r--arch/mips/kernel/cpu-bugs64.c6
-rw-r--r--arch/mips/kernel/elf.c4
-rw-r--r--arch/mips/kernel/mips-cm.c2
-rw-r--r--arch/mips/kernel/mips-r2-to-r6-emul.c34
-rw-r--r--arch/mips/kernel/pm-cps.c4
-rw-r--r--arch/mips/kernel/signal.c10
-rw-r--r--arch/mips/kernel/smp-cps.c4
-rw-r--r--arch/mips/kernel/unaligned.c10
-rw-r--r--arch/mips/math-emu/cp1emu.c6
-rw-r--r--arch/mips/mm/tlbex.c10
-rw-r--r--arch/mips/mti-malta/malta-dtshim.c4
-rw-r--r--arch/mips/mti-malta/malta-memory.c2
-rw-r--r--arch/mips/mti-malta/malta-setup.c2
-rw-r--r--arch/mips/net/bpf_jit.c4
21 files changed, 67 insertions, 67 deletions
diff --git a/arch/mips/include/asm/mips-cm.h b/arch/mips/include/asm/mips-cm.h
index 9411a4c0bdad..58e7874e9347 100644
--- a/arch/mips/include/asm/mips-cm.h
+++ b/arch/mips/include/asm/mips-cm.h
@@ -462,7 +462,7 @@ static inline unsigned int mips_cm_max_vp_width(void)
462 if (mips_cm_revision() >= CM_REV_CM3) 462 if (mips_cm_revision() >= CM_REV_CM3)
463 return read_gcr_sys_config2() & CM_GCR_SYS_CONFIG2_MAXVPW_MSK; 463 return read_gcr_sys_config2() & CM_GCR_SYS_CONFIG2_MAXVPW_MSK;
464 464
465 if (config_enabled(CONFIG_SMP)) 465 if (IS_ENABLED(CONFIG_SMP))
466 return smp_num_siblings; 466 return smp_num_siblings;
467 467
468 return 1; 468 return 1;
diff --git a/arch/mips/include/asm/pgtable.h b/arch/mips/include/asm/pgtable.h
index 7d44e888134f..70128d3f770a 100644
--- a/arch/mips/include/asm/pgtable.h
+++ b/arch/mips/include/asm/pgtable.h
@@ -159,7 +159,7 @@ static inline void set_pte(pte_t *ptep, pte_t pte)
159 * it better already be global) 159 * it better already be global)
160 */ 160 */
161 if (pte_none(*buddy)) { 161 if (pte_none(*buddy)) {
162 if (!config_enabled(CONFIG_XPA)) 162 if (!IS_ENABLED(CONFIG_XPA))
163 buddy->pte_low |= _PAGE_GLOBAL; 163 buddy->pte_low |= _PAGE_GLOBAL;
164 buddy->pte_high |= _PAGE_GLOBAL; 164 buddy->pte_high |= _PAGE_GLOBAL;
165 } 165 }
@@ -172,7 +172,7 @@ static inline void pte_clear(struct mm_struct *mm, unsigned long addr, pte_t *pt
172 172
173 htw_stop(); 173 htw_stop();
174 /* Preserve global status for the pair */ 174 /* Preserve global status for the pair */
175 if (config_enabled(CONFIG_XPA)) { 175 if (IS_ENABLED(CONFIG_XPA)) {
176 if (ptep_buddy(ptep)->pte_high & _PAGE_GLOBAL) 176 if (ptep_buddy(ptep)->pte_high & _PAGE_GLOBAL)
177 null.pte_high = _PAGE_GLOBAL; 177 null.pte_high = _PAGE_GLOBAL;
178 } else { 178 } else {
@@ -319,7 +319,7 @@ static inline int pte_young(pte_t pte) { return pte.pte_low & _PAGE_ACCESSED; }
319static inline pte_t pte_wrprotect(pte_t pte) 319static inline pte_t pte_wrprotect(pte_t pte)
320{ 320{
321 pte.pte_low &= ~_PAGE_WRITE; 321 pte.pte_low &= ~_PAGE_WRITE;
322 if (!config_enabled(CONFIG_XPA)) 322 if (!IS_ENABLED(CONFIG_XPA))
323 pte.pte_low &= ~_PAGE_SILENT_WRITE; 323 pte.pte_low &= ~_PAGE_SILENT_WRITE;
324 pte.pte_high &= ~_PAGE_SILENT_WRITE; 324 pte.pte_high &= ~_PAGE_SILENT_WRITE;
325 return pte; 325 return pte;
@@ -328,7 +328,7 @@ static inline pte_t pte_wrprotect(pte_t pte)
328static inline pte_t pte_mkclean(pte_t pte) 328static inline pte_t pte_mkclean(pte_t pte)
329{ 329{
330 pte.pte_low &= ~_PAGE_MODIFIED; 330 pte.pte_low &= ~_PAGE_MODIFIED;
331 if (!config_enabled(CONFIG_XPA)) 331 if (!IS_ENABLED(CONFIG_XPA))
332 pte.pte_low &= ~_PAGE_SILENT_WRITE; 332 pte.pte_low &= ~_PAGE_SILENT_WRITE;
333 pte.pte_high &= ~_PAGE_SILENT_WRITE; 333 pte.pte_high &= ~_PAGE_SILENT_WRITE;
334 return pte; 334 return pte;
@@ -337,7 +337,7 @@ static inline pte_t pte_mkclean(pte_t pte)
337static inline pte_t pte_mkold(pte_t pte) 337static inline pte_t pte_mkold(pte_t pte)
338{ 338{
339 pte.pte_low &= ~_PAGE_ACCESSED; 339 pte.pte_low &= ~_PAGE_ACCESSED;
340 if (!config_enabled(CONFIG_XPA)) 340 if (!IS_ENABLED(CONFIG_XPA))
341 pte.pte_low &= ~_PAGE_SILENT_READ; 341 pte.pte_low &= ~_PAGE_SILENT_READ;
342 pte.pte_high &= ~_PAGE_SILENT_READ; 342 pte.pte_high &= ~_PAGE_SILENT_READ;
343 return pte; 343 return pte;
@@ -347,7 +347,7 @@ static inline pte_t pte_mkwrite(pte_t pte)
347{ 347{
348 pte.pte_low |= _PAGE_WRITE; 348 pte.pte_low |= _PAGE_WRITE;
349 if (pte.pte_low & _PAGE_MODIFIED) { 349 if (pte.pte_low & _PAGE_MODIFIED) {
350 if (!config_enabled(CONFIG_XPA)) 350 if (!IS_ENABLED(CONFIG_XPA))
351 pte.pte_low |= _PAGE_SILENT_WRITE; 351 pte.pte_low |= _PAGE_SILENT_WRITE;
352 pte.pte_high |= _PAGE_SILENT_WRITE; 352 pte.pte_high |= _PAGE_SILENT_WRITE;
353 } 353 }
@@ -358,7 +358,7 @@ static inline pte_t pte_mkdirty(pte_t pte)
358{ 358{
359 pte.pte_low |= _PAGE_MODIFIED; 359 pte.pte_low |= _PAGE_MODIFIED;
360 if (pte.pte_low & _PAGE_WRITE) { 360 if (pte.pte_low & _PAGE_WRITE) {
361 if (!config_enabled(CONFIG_XPA)) 361 if (!IS_ENABLED(CONFIG_XPA))
362 pte.pte_low |= _PAGE_SILENT_WRITE; 362 pte.pte_low |= _PAGE_SILENT_WRITE;
363 pte.pte_high |= _PAGE_SILENT_WRITE; 363 pte.pte_high |= _PAGE_SILENT_WRITE;
364 } 364 }
@@ -369,7 +369,7 @@ static inline pte_t pte_mkyoung(pte_t pte)
369{ 369{
370 pte.pte_low |= _PAGE_ACCESSED; 370 pte.pte_low |= _PAGE_ACCESSED;
371 if (!(pte.pte_low & _PAGE_NO_READ)) { 371 if (!(pte.pte_low & _PAGE_NO_READ)) {
372 if (!config_enabled(CONFIG_XPA)) 372 if (!IS_ENABLED(CONFIG_XPA))
373 pte.pte_low |= _PAGE_SILENT_READ; 373 pte.pte_low |= _PAGE_SILENT_READ;
374 pte.pte_high |= _PAGE_SILENT_READ; 374 pte.pte_high |= _PAGE_SILENT_READ;
375 } 375 }
diff --git a/arch/mips/include/asm/seccomp.h b/arch/mips/include/asm/seccomp.h
index 684fb3a12ed3..d886d6f7687a 100644
--- a/arch/mips/include/asm/seccomp.h
+++ b/arch/mips/include/asm/seccomp.h
@@ -16,10 +16,10 @@ static inline const int *get_compat_mode1_syscalls(void)
16 0, /* null terminated */ 16 0, /* null terminated */
17 }; 17 };
18 18
19 if (config_enabled(CONFIG_MIPS32_O32) && test_thread_flag(TIF_32BIT_REGS)) 19 if (IS_ENABLED(CONFIG_MIPS32_O32) && test_thread_flag(TIF_32BIT_REGS))
20 return syscalls_O32; 20 return syscalls_O32;
21 21
22 if (config_enabled(CONFIG_MIPS32_N32)) 22 if (IS_ENABLED(CONFIG_MIPS32_N32))
23 return syscalls_N32; 23 return syscalls_N32;
24 24
25 BUG(); 25 BUG();
diff --git a/arch/mips/include/asm/signal.h b/arch/mips/include/asm/signal.h
index 2292373ff11a..82eae1583bcf 100644
--- a/arch/mips/include/asm/signal.h
+++ b/arch/mips/include/asm/signal.h
@@ -19,8 +19,8 @@ extern struct mips_abi mips_abi_32;
19 ((ka)->sa.sa_flags & SA_SIGINFO)) 19 ((ka)->sa.sa_flags & SA_SIGINFO))
20#else 20#else
21#define sig_uses_siginfo(ka, abi) \ 21#define sig_uses_siginfo(ka, abi) \
22 (config_enabled(CONFIG_64BIT) ? 1 : \ 22 (IS_ENABLED(CONFIG_64BIT) ? 1 : \
23 (config_enabled(CONFIG_TRAD_SIGNALS) ? \ 23 (IS_ENABLED(CONFIG_TRAD_SIGNALS) ? \
24 ((ka)->sa.sa_flags & SA_SIGINFO) : 1) ) 24 ((ka)->sa.sa_flags & SA_SIGINFO) : 1) )
25#endif 25#endif
26 26
diff --git a/arch/mips/include/asm/syscall.h b/arch/mips/include/asm/syscall.h
index 47bc45a67e9b..d87882513ee3 100644
--- a/arch/mips/include/asm/syscall.h
+++ b/arch/mips/include/asm/syscall.h
@@ -99,7 +99,7 @@ static inline void syscall_get_arguments(struct task_struct *task,
99{ 99{
100 int ret; 100 int ret;
101 /* O32 ABI syscall() - Either 64-bit with O32 or 32-bit */ 101 /* O32 ABI syscall() - Either 64-bit with O32 or 32-bit */
102 if ((config_enabled(CONFIG_32BIT) || 102 if ((IS_ENABLED(CONFIG_32BIT) ||
103 test_tsk_thread_flag(task, TIF_32BIT_REGS)) && 103 test_tsk_thread_flag(task, TIF_32BIT_REGS)) &&
104 (regs->regs[2] == __NR_syscall)) 104 (regs->regs[2] == __NR_syscall))
105 i++; 105 i++;
diff --git a/arch/mips/include/asm/uaccess.h b/arch/mips/include/asm/uaccess.h
index 7f109d4f64a4..11b965f98d95 100644
--- a/arch/mips/include/asm/uaccess.h
+++ b/arch/mips/include/asm/uaccess.h
@@ -88,7 +88,7 @@ extern u64 __ua_limit;
88 */ 88 */
89static inline bool eva_kernel_access(void) 89static inline bool eva_kernel_access(void)
90{ 90{
91 if (!config_enabled(CONFIG_EVA)) 91 if (!IS_ENABLED(CONFIG_EVA))
92 return false; 92 return false;
93 93
94 return segment_eq(get_fs(), get_ds()); 94 return segment_eq(get_fs(), get_ds());
diff --git a/arch/mips/jz4740/setup.c b/arch/mips/jz4740/setup.c
index 0914ef775b5f..6d0152321819 100644
--- a/arch/mips/jz4740/setup.c
+++ b/arch/mips/jz4740/setup.c
@@ -75,7 +75,7 @@ void __init device_tree_init(void)
75 75
76const char *get_system_type(void) 76const char *get_system_type(void)
77{ 77{
78 if (config_enabled(CONFIG_MACH_JZ4780)) 78 if (IS_ENABLED(CONFIG_MACH_JZ4780))
79 return "JZ4780"; 79 return "JZ4780";
80 80
81 return "JZ4740"; 81 return "JZ4740";
diff --git a/arch/mips/kernel/cpu-bugs64.c b/arch/mips/kernel/cpu-bugs64.c
index 6392dbe504fb..a378e44688f5 100644
--- a/arch/mips/kernel/cpu-bugs64.c
+++ b/arch/mips/kernel/cpu-bugs64.c
@@ -244,7 +244,7 @@ static inline void check_daddi(void)
244 panic(bug64hit, !DADDI_WAR ? daddiwar : nowar); 244 panic(bug64hit, !DADDI_WAR ? daddiwar : nowar);
245} 245}
246 246
247int daddiu_bug = config_enabled(CONFIG_CPU_MIPSR6) ? 0 : -1; 247int daddiu_bug = IS_ENABLED(CONFIG_CPU_MIPSR6) ? 0 : -1;
248 248
249static inline void check_daddiu(void) 249static inline void check_daddiu(void)
250{ 250{
@@ -314,7 +314,7 @@ static inline void check_daddiu(void)
314 314
315void __init check_bugs64_early(void) 315void __init check_bugs64_early(void)
316{ 316{
317 if (!config_enabled(CONFIG_CPU_MIPSR6)) { 317 if (!IS_ENABLED(CONFIG_CPU_MIPSR6)) {
318 check_mult_sh(); 318 check_mult_sh();
319 check_daddiu(); 319 check_daddiu();
320 } 320 }
@@ -322,6 +322,6 @@ void __init check_bugs64_early(void)
322 322
323void __init check_bugs64(void) 323void __init check_bugs64(void)
324{ 324{
325 if (!config_enabled(CONFIG_CPU_MIPSR6)) 325 if (!IS_ENABLED(CONFIG_CPU_MIPSR6))
326 check_daddi(); 326 check_daddi();
327} 327}
diff --git a/arch/mips/kernel/elf.c b/arch/mips/kernel/elf.c
index 891f5ee63983..e6eb7f1f7723 100644
--- a/arch/mips/kernel/elf.c
+++ b/arch/mips/kernel/elf.c
@@ -179,7 +179,7 @@ int arch_check_elf(void *_ehdr, bool has_interpreter, void *_interp_ehdr,
179 return -ELIBBAD; 179 return -ELIBBAD;
180 } 180 }
181 181
182 if (!config_enabled(CONFIG_MIPS_O32_FP64_SUPPORT)) 182 if (!IS_ENABLED(CONFIG_MIPS_O32_FP64_SUPPORT))
183 return 0; 183 return 0;
184 184
185 fp_abi = state->fp_abi; 185 fp_abi = state->fp_abi;
@@ -285,7 +285,7 @@ void mips_set_personality_fp(struct arch_elf_state *state)
285 * not be worried about N32/N64 binaries. 285 * not be worried about N32/N64 binaries.
286 */ 286 */
287 287
288 if (!config_enabled(CONFIG_MIPS_O32_FP64_SUPPORT)) 288 if (!IS_ENABLED(CONFIG_MIPS_O32_FP64_SUPPORT))
289 return; 289 return;
290 290
291 switch (state->overall_fp_mode) { 291 switch (state->overall_fp_mode) {
diff --git a/arch/mips/kernel/mips-cm.c b/arch/mips/kernel/mips-cm.c
index 760217bbb2fa..659e6d3ae335 100644
--- a/arch/mips/kernel/mips-cm.c
+++ b/arch/mips/kernel/mips-cm.c
@@ -251,7 +251,7 @@ int mips_cm_probe(void)
251 mips_cm_probe_l2sync(); 251 mips_cm_probe_l2sync();
252 252
253 /* determine register width for this CM */ 253 /* determine register width for this CM */
254 mips_cm_is64 = config_enabled(CONFIG_64BIT) && (mips_cm_revision() >= CM_REV_CM3); 254 mips_cm_is64 = IS_ENABLED(CONFIG_64BIT) && (mips_cm_revision() >= CM_REV_CM3);
255 255
256 for_each_possible_cpu(cpu) 256 for_each_possible_cpu(cpu)
257 spin_lock_init(&per_cpu(cm_core_lock, cpu)); 257 spin_lock_init(&per_cpu(cm_core_lock, cpu));
diff --git a/arch/mips/kernel/mips-r2-to-r6-emul.c b/arch/mips/kernel/mips-r2-to-r6-emul.c
index 7ff2a557f4aa..43fbadc78d0a 100644
--- a/arch/mips/kernel/mips-r2-to-r6-emul.c
+++ b/arch/mips/kernel/mips-r2-to-r6-emul.c
@@ -84,7 +84,7 @@ static inline int mipsr6_emul(struct pt_regs *regs, u32 ir)
84 (s32)MIPSInst_SIMM(ir); 84 (s32)MIPSInst_SIMM(ir);
85 return 0; 85 return 0;
86 case daddiu_op: 86 case daddiu_op:
87 if (config_enabled(CONFIG_32BIT)) 87 if (IS_ENABLED(CONFIG_32BIT))
88 break; 88 break;
89 89
90 if (MIPSInst_RT(ir)) 90 if (MIPSInst_RT(ir))
@@ -143,7 +143,7 @@ static inline int mipsr6_emul(struct pt_regs *regs, u32 ir)
143 (u32)regs->regs[MIPSInst_RT(ir)]); 143 (u32)regs->regs[MIPSInst_RT(ir)]);
144 return 0; 144 return 0;
145 case dsll_op: 145 case dsll_op:
146 if (config_enabled(CONFIG_32BIT) || MIPSInst_RS(ir)) 146 if (IS_ENABLED(CONFIG_32BIT) || MIPSInst_RS(ir))
147 break; 147 break;
148 148
149 if (MIPSInst_RD(ir)) 149 if (MIPSInst_RD(ir))
@@ -152,7 +152,7 @@ static inline int mipsr6_emul(struct pt_regs *regs, u32 ir)
152 MIPSInst_FD(ir)); 152 MIPSInst_FD(ir));
153 return 0; 153 return 0;
154 case dsrl_op: 154 case dsrl_op:
155 if (config_enabled(CONFIG_32BIT) || MIPSInst_RS(ir)) 155 if (IS_ENABLED(CONFIG_32BIT) || MIPSInst_RS(ir))
156 break; 156 break;
157 157
158 if (MIPSInst_RD(ir)) 158 if (MIPSInst_RD(ir))
@@ -161,7 +161,7 @@ static inline int mipsr6_emul(struct pt_regs *regs, u32 ir)
161 MIPSInst_FD(ir)); 161 MIPSInst_FD(ir));
162 return 0; 162 return 0;
163 case daddu_op: 163 case daddu_op:
164 if (config_enabled(CONFIG_32BIT) || MIPSInst_FD(ir)) 164 if (IS_ENABLED(CONFIG_32BIT) || MIPSInst_FD(ir))
165 break; 165 break;
166 166
167 if (MIPSInst_RD(ir)) 167 if (MIPSInst_RD(ir))
@@ -170,7 +170,7 @@ static inline int mipsr6_emul(struct pt_regs *regs, u32 ir)
170 (u64)regs->regs[MIPSInst_RT(ir)]; 170 (u64)regs->regs[MIPSInst_RT(ir)];
171 return 0; 171 return 0;
172 case dsubu_op: 172 case dsubu_op:
173 if (config_enabled(CONFIG_32BIT) || MIPSInst_FD(ir)) 173 if (IS_ENABLED(CONFIG_32BIT) || MIPSInst_FD(ir))
174 break; 174 break;
175 175
176 if (MIPSInst_RD(ir)) 176 if (MIPSInst_RD(ir))
@@ -498,7 +498,7 @@ static int dmult_func(struct pt_regs *regs, u32 ir)
498 s64 res; 498 s64 res;
499 s64 rt, rs; 499 s64 rt, rs;
500 500
501 if (config_enabled(CONFIG_32BIT)) 501 if (IS_ENABLED(CONFIG_32BIT))
502 return SIGILL; 502 return SIGILL;
503 503
504 rt = regs->regs[MIPSInst_RT(ir)]; 504 rt = regs->regs[MIPSInst_RT(ir)];
@@ -530,7 +530,7 @@ static int dmultu_func(struct pt_regs *regs, u32 ir)
530 u64 res; 530 u64 res;
531 u64 rt, rs; 531 u64 rt, rs;
532 532
533 if (config_enabled(CONFIG_32BIT)) 533 if (IS_ENABLED(CONFIG_32BIT))
534 return SIGILL; 534 return SIGILL;
535 535
536 rt = regs->regs[MIPSInst_RT(ir)]; 536 rt = regs->regs[MIPSInst_RT(ir)];
@@ -561,7 +561,7 @@ static int ddiv_func(struct pt_regs *regs, u32 ir)
561{ 561{
562 s64 rt, rs; 562 s64 rt, rs;
563 563
564 if (config_enabled(CONFIG_32BIT)) 564 if (IS_ENABLED(CONFIG_32BIT))
565 return SIGILL; 565 return SIGILL;
566 566
567 rt = regs->regs[MIPSInst_RT(ir)]; 567 rt = regs->regs[MIPSInst_RT(ir)];
@@ -586,7 +586,7 @@ static int ddivu_func(struct pt_regs *regs, u32 ir)
586{ 586{
587 u64 rt, rs; 587 u64 rt, rs;
588 588
589 if (config_enabled(CONFIG_32BIT)) 589 if (IS_ENABLED(CONFIG_32BIT))
590 return SIGILL; 590 return SIGILL;
591 591
592 rt = regs->regs[MIPSInst_RT(ir)]; 592 rt = regs->regs[MIPSInst_RT(ir)];
@@ -825,7 +825,7 @@ static int dclz_func(struct pt_regs *regs, u32 ir)
825 u64 res; 825 u64 res;
826 u64 rs; 826 u64 rs;
827 827
828 if (config_enabled(CONFIG_32BIT)) 828 if (IS_ENABLED(CONFIG_32BIT))
829 return SIGILL; 829 return SIGILL;
830 830
831 if (!MIPSInst_RD(ir)) 831 if (!MIPSInst_RD(ir))
@@ -852,7 +852,7 @@ static int dclo_func(struct pt_regs *regs, u32 ir)
852 u64 res; 852 u64 res;
853 u64 rs; 853 u64 rs;
854 854
855 if (config_enabled(CONFIG_32BIT)) 855 if (IS_ENABLED(CONFIG_32BIT))
856 return SIGILL; 856 return SIGILL;
857 857
858 if (!MIPSInst_RD(ir)) 858 if (!MIPSInst_RD(ir))
@@ -1484,7 +1484,7 @@ fpu_emul:
1484 break; 1484 break;
1485 1485
1486 case ldl_op: 1486 case ldl_op:
1487 if (config_enabled(CONFIG_32BIT)) { 1487 if (IS_ENABLED(CONFIG_32BIT)) {
1488 err = SIGILL; 1488 err = SIGILL;
1489 break; 1489 break;
1490 } 1490 }
@@ -1603,7 +1603,7 @@ fpu_emul:
1603 break; 1603 break;
1604 1604
1605 case ldr_op: 1605 case ldr_op:
1606 if (config_enabled(CONFIG_32BIT)) { 1606 if (IS_ENABLED(CONFIG_32BIT)) {
1607 err = SIGILL; 1607 err = SIGILL;
1608 break; 1608 break;
1609 } 1609 }
@@ -1722,7 +1722,7 @@ fpu_emul:
1722 break; 1722 break;
1723 1723
1724 case sdl_op: 1724 case sdl_op:
1725 if (config_enabled(CONFIG_32BIT)) { 1725 if (IS_ENABLED(CONFIG_32BIT)) {
1726 err = SIGILL; 1726 err = SIGILL;
1727 break; 1727 break;
1728 } 1728 }
@@ -1840,7 +1840,7 @@ fpu_emul:
1840 break; 1840 break;
1841 1841
1842 case sdr_op: 1842 case sdr_op:
1843 if (config_enabled(CONFIG_32BIT)) { 1843 if (IS_ENABLED(CONFIG_32BIT)) {
1844 err = SIGILL; 1844 err = SIGILL;
1845 break; 1845 break;
1846 } 1846 }
@@ -2072,7 +2072,7 @@ fpu_emul:
2072 break; 2072 break;
2073 2073
2074 case lld_op: 2074 case lld_op:
2075 if (config_enabled(CONFIG_32BIT)) { 2075 if (IS_ENABLED(CONFIG_32BIT)) {
2076 err = SIGILL; 2076 err = SIGILL;
2077 break; 2077 break;
2078 } 2078 }
@@ -2133,7 +2133,7 @@ fpu_emul:
2133 break; 2133 break;
2134 2134
2135 case scd_op: 2135 case scd_op:
2136 if (config_enabled(CONFIG_32BIT)) { 2136 if (IS_ENABLED(CONFIG_32BIT)) {
2137 err = SIGILL; 2137 err = SIGILL;
2138 break; 2138 break;
2139 } 2139 }
diff --git a/arch/mips/kernel/pm-cps.c b/arch/mips/kernel/pm-cps.c
index adda3ffb9b78..5b31a9405ebc 100644
--- a/arch/mips/kernel/pm-cps.c
+++ b/arch/mips/kernel/pm-cps.c
@@ -148,7 +148,7 @@ int cps_pm_enter_state(enum cps_pm_state state)
148 } 148 }
149 149
150 /* Setup the VPE to run mips_cps_pm_restore when started again */ 150 /* Setup the VPE to run mips_cps_pm_restore when started again */
151 if (config_enabled(CONFIG_CPU_PM) && state == CPS_PM_POWER_GATED) { 151 if (IS_ENABLED(CONFIG_CPU_PM) && state == CPS_PM_POWER_GATED) {
152 /* Power gating relies upon CPS SMP */ 152 /* Power gating relies upon CPS SMP */
153 if (!mips_cps_smp_in_use()) 153 if (!mips_cps_smp_in_use())
154 return -EINVAL; 154 return -EINVAL;
@@ -387,7 +387,7 @@ static void * __init cps_gen_entry_code(unsigned cpu, enum cps_pm_state state)
387 memset(labels, 0, sizeof(labels)); 387 memset(labels, 0, sizeof(labels));
388 memset(relocs, 0, sizeof(relocs)); 388 memset(relocs, 0, sizeof(relocs));
389 389
390 if (config_enabled(CONFIG_CPU_PM) && state == CPS_PM_POWER_GATED) { 390 if (IS_ENABLED(CONFIG_CPU_PM) && state == CPS_PM_POWER_GATED) {
391 /* Power gating relies upon CPS SMP */ 391 /* Power gating relies upon CPS SMP */
392 if (!mips_cps_smp_in_use()) 392 if (!mips_cps_smp_in_use())
393 goto out_err; 393 goto out_err;
diff --git a/arch/mips/kernel/signal.c b/arch/mips/kernel/signal.c
index ae4231452115..1975cd2f7de6 100644
--- a/arch/mips/kernel/signal.c
+++ b/arch/mips/kernel/signal.c
@@ -165,7 +165,7 @@ static int save_msa_extcontext(void __user *buf)
165 * should already have been done when handling scalar FP 165 * should already have been done when handling scalar FP
166 * context. 166 * context.
167 */ 167 */
168 BUG_ON(config_enabled(CONFIG_EVA)); 168 BUG_ON(IS_ENABLED(CONFIG_EVA));
169 169
170 err = __put_user(read_msa_csr(), &msa->csr); 170 err = __put_user(read_msa_csr(), &msa->csr);
171 err |= _save_msa_all_upper(&msa->wr); 171 err |= _save_msa_all_upper(&msa->wr);
@@ -195,7 +195,7 @@ static int restore_msa_extcontext(void __user *buf, unsigned int size)
195 unsigned int csr; 195 unsigned int csr;
196 int i, err; 196 int i, err;
197 197
198 if (!config_enabled(CONFIG_CPU_HAS_MSA)) 198 if (!IS_ENABLED(CONFIG_CPU_HAS_MSA))
199 return SIGSYS; 199 return SIGSYS;
200 200
201 if (size != sizeof(*msa)) 201 if (size != sizeof(*msa))
@@ -215,7 +215,7 @@ static int restore_msa_extcontext(void __user *buf, unsigned int size)
215 * scalar FP context, so FPU & MSA should have already been 215 * scalar FP context, so FPU & MSA should have already been
216 * disabled whilst handling scalar FP context. 216 * disabled whilst handling scalar FP context.
217 */ 217 */
218 BUG_ON(config_enabled(CONFIG_EVA)); 218 BUG_ON(IS_ENABLED(CONFIG_EVA));
219 219
220 write_msa_csr(csr); 220 write_msa_csr(csr);
221 err |= _restore_msa_all_upper(&msa->wr); 221 err |= _restore_msa_all_upper(&msa->wr);
@@ -315,7 +315,7 @@ int protected_save_fp_context(void __user *sc)
315 * EVA does not have userland equivalents of ldc1 or sdc1, so 315 * EVA does not have userland equivalents of ldc1 or sdc1, so
316 * save to the kernel FP context & copy that to userland below. 316 * save to the kernel FP context & copy that to userland below.
317 */ 317 */
318 if (config_enabled(CONFIG_EVA)) 318 if (IS_ENABLED(CONFIG_EVA))
319 lose_fpu(1); 319 lose_fpu(1);
320 320
321 while (1) { 321 while (1) {
@@ -378,7 +378,7 @@ int protected_restore_fp_context(void __user *sc)
378 * disable the FPU here such that the code below simply copies to 378 * disable the FPU here such that the code below simply copies to
379 * the kernel FP context. 379 * the kernel FP context.
380 */ 380 */
381 if (config_enabled(CONFIG_EVA)) 381 if (IS_ENABLED(CONFIG_EVA))
382 lose_fpu(0); 382 lose_fpu(0);
383 383
384 while (1) { 384 while (1) {
diff --git a/arch/mips/kernel/smp-cps.c b/arch/mips/kernel/smp-cps.c
index 4ed36f288d64..05b3201271b4 100644
--- a/arch/mips/kernel/smp-cps.c
+++ b/arch/mips/kernel/smp-cps.c
@@ -46,8 +46,8 @@ static unsigned core_vpe_count(unsigned core)
46 if (threads_disabled) 46 if (threads_disabled)
47 return 1; 47 return 1;
48 48
49 if ((!config_enabled(CONFIG_MIPS_MT_SMP) || !cpu_has_mipsmt) 49 if ((!IS_ENABLED(CONFIG_MIPS_MT_SMP) || !cpu_has_mipsmt)
50 && (!config_enabled(CONFIG_CPU_MIPSR6) || !cpu_has_vp)) 50 && (!IS_ENABLED(CONFIG_CPU_MIPSR6) || !cpu_has_vp))
51 return 1; 51 return 1;
52 52
53 mips_cm_lock_other(core, 0); 53 mips_cm_lock_other(core, 0);
diff --git a/arch/mips/kernel/unaligned.c b/arch/mips/kernel/unaligned.c
index 28b3af73a17b..f1c308dbbc4a 100644
--- a/arch/mips/kernel/unaligned.c
+++ b/arch/mips/kernel/unaligned.c
@@ -1025,7 +1025,7 @@ static void emulate_load_store_insn(struct pt_regs *regs,
1025 if (!access_ok(VERIFY_READ, addr, 2)) 1025 if (!access_ok(VERIFY_READ, addr, 2))
1026 goto sigbus; 1026 goto sigbus;
1027 1027
1028 if (config_enabled(CONFIG_EVA)) { 1028 if (IS_ENABLED(CONFIG_EVA)) {
1029 if (segment_eq(get_fs(), get_ds())) 1029 if (segment_eq(get_fs(), get_ds()))
1030 LoadHW(addr, value, res); 1030 LoadHW(addr, value, res);
1031 else 1031 else
@@ -1044,7 +1044,7 @@ static void emulate_load_store_insn(struct pt_regs *regs,
1044 if (!access_ok(VERIFY_READ, addr, 4)) 1044 if (!access_ok(VERIFY_READ, addr, 4))
1045 goto sigbus; 1045 goto sigbus;
1046 1046
1047 if (config_enabled(CONFIG_EVA)) { 1047 if (IS_ENABLED(CONFIG_EVA)) {
1048 if (segment_eq(get_fs(), get_ds())) 1048 if (segment_eq(get_fs(), get_ds()))
1049 LoadW(addr, value, res); 1049 LoadW(addr, value, res);
1050 else 1050 else
@@ -1063,7 +1063,7 @@ static void emulate_load_store_insn(struct pt_regs *regs,
1063 if (!access_ok(VERIFY_READ, addr, 2)) 1063 if (!access_ok(VERIFY_READ, addr, 2))
1064 goto sigbus; 1064 goto sigbus;
1065 1065
1066 if (config_enabled(CONFIG_EVA)) { 1066 if (IS_ENABLED(CONFIG_EVA)) {
1067 if (segment_eq(get_fs(), get_ds())) 1067 if (segment_eq(get_fs(), get_ds()))
1068 LoadHWU(addr, value, res); 1068 LoadHWU(addr, value, res);
1069 else 1069 else
@@ -1131,7 +1131,7 @@ static void emulate_load_store_insn(struct pt_regs *regs,
1131 compute_return_epc(regs); 1131 compute_return_epc(regs);
1132 value = regs->regs[insn.i_format.rt]; 1132 value = regs->regs[insn.i_format.rt];
1133 1133
1134 if (config_enabled(CONFIG_EVA)) { 1134 if (IS_ENABLED(CONFIG_EVA)) {
1135 if (segment_eq(get_fs(), get_ds())) 1135 if (segment_eq(get_fs(), get_ds()))
1136 StoreHW(addr, value, res); 1136 StoreHW(addr, value, res);
1137 else 1137 else
@@ -1151,7 +1151,7 @@ static void emulate_load_store_insn(struct pt_regs *regs,
1151 compute_return_epc(regs); 1151 compute_return_epc(regs);
1152 value = regs->regs[insn.i_format.rt]; 1152 value = regs->regs[insn.i_format.rt];
1153 1153
1154 if (config_enabled(CONFIG_EVA)) { 1154 if (IS_ENABLED(CONFIG_EVA)) {
1155 if (segment_eq(get_fs(), get_ds())) 1155 if (segment_eq(get_fs(), get_ds()))
1156 StoreW(addr, value, res); 1156 StoreW(addr, value, res);
1157 else 1157 else
diff --git a/arch/mips/math-emu/cp1emu.c b/arch/mips/math-emu/cp1emu.c
index 6dc07fba187f..92d15e68abb6 100644
--- a/arch/mips/math-emu/cp1emu.c
+++ b/arch/mips/math-emu/cp1emu.c
@@ -784,10 +784,10 @@ static int isBranchInstr(struct pt_regs *regs, struct mm_decoded_insn dec_insn,
784 */ 784 */
785static inline int cop1_64bit(struct pt_regs *xcp) 785static inline int cop1_64bit(struct pt_regs *xcp)
786{ 786{
787 if (config_enabled(CONFIG_64BIT) && !config_enabled(CONFIG_MIPS32_O32)) 787 if (IS_ENABLED(CONFIG_64BIT) && !IS_ENABLED(CONFIG_MIPS32_O32))
788 return 1; 788 return 1;
789 else if (config_enabled(CONFIG_32BIT) && 789 else if (IS_ENABLED(CONFIG_32BIT) &&
790 !config_enabled(CONFIG_MIPS_O32_FP64_SUPPORT)) 790 !IS_ENABLED(CONFIG_MIPS_O32_FP64_SUPPORT))
791 return 0; 791 return 0;
792 792
793 return !test_thread_flag(TIF_32BIT_FPREGS); 793 return !test_thread_flag(TIF_32BIT_FPREGS);
diff --git a/arch/mips/mm/tlbex.c b/arch/mips/mm/tlbex.c
index 4004b659ce50..ff49b29c2d16 100644
--- a/arch/mips/mm/tlbex.c
+++ b/arch/mips/mm/tlbex.c
@@ -1025,7 +1025,7 @@ static void build_update_entries(u32 **p, unsigned int tmp, unsigned int ptep)
1025 pte_off_odd += offsetof(pte_t, pte_high); 1025 pte_off_odd += offsetof(pte_t, pte_high);
1026#endif 1026#endif
1027 1027
1028 if (config_enabled(CONFIG_XPA)) { 1028 if (IS_ENABLED(CONFIG_XPA)) {
1029 uasm_i_lw(p, tmp, pte_off_even, ptep); /* even pte */ 1029 uasm_i_lw(p, tmp, pte_off_even, ptep); /* even pte */
1030 UASM_i_ROTR(p, tmp, tmp, ilog2(_PAGE_GLOBAL)); 1030 UASM_i_ROTR(p, tmp, tmp, ilog2(_PAGE_GLOBAL));
1031 UASM_i_MTC0(p, tmp, C0_ENTRYLO0); 1031 UASM_i_MTC0(p, tmp, C0_ENTRYLO0);
@@ -1643,7 +1643,7 @@ iPTE_SW(u32 **p, struct uasm_reloc **r, unsigned int pte, unsigned int ptr,
1643 unsigned int hwmode = mode & (_PAGE_VALID | _PAGE_DIRTY); 1643 unsigned int hwmode = mode & (_PAGE_VALID | _PAGE_DIRTY);
1644 unsigned int swmode = mode & ~hwmode; 1644 unsigned int swmode = mode & ~hwmode;
1645 1645
1646 if (config_enabled(CONFIG_XPA) && !cpu_has_64bits) { 1646 if (IS_ENABLED(CONFIG_XPA) && !cpu_has_64bits) {
1647 uasm_i_lui(p, scratch, swmode >> 16); 1647 uasm_i_lui(p, scratch, swmode >> 16);
1648 uasm_i_or(p, pte, pte, scratch); 1648 uasm_i_or(p, pte, pte, scratch);
1649 BUG_ON(swmode & 0xffff); 1649 BUG_ON(swmode & 0xffff);
@@ -2432,7 +2432,7 @@ static void config_htw_params(void)
2432 pwsize |= ilog2(PTRS_PER_PMD) << MIPS_PWSIZE_MDW_SHIFT; 2432 pwsize |= ilog2(PTRS_PER_PMD) << MIPS_PWSIZE_MDW_SHIFT;
2433 2433
2434 /* Set pointer size to size of directory pointers */ 2434 /* Set pointer size to size of directory pointers */
2435 if (config_enabled(CONFIG_64BIT)) 2435 if (IS_ENABLED(CONFIG_64BIT))
2436 pwsize |= MIPS_PWSIZE_PS_MASK; 2436 pwsize |= MIPS_PWSIZE_PS_MASK;
2437 /* PTEs may be multiple pointers long (e.g. with XPA) */ 2437 /* PTEs may be multiple pointers long (e.g. with XPA) */
2438 pwsize |= ((PTE_T_LOG2 - PGD_T_LOG2) << MIPS_PWSIZE_PTEW_SHIFT) 2438 pwsize |= ((PTE_T_LOG2 - PGD_T_LOG2) << MIPS_PWSIZE_PTEW_SHIFT)
@@ -2448,7 +2448,7 @@ static void config_htw_params(void)
2448 * the pwctl fields. 2448 * the pwctl fields.
2449 */ 2449 */
2450 config = 1 << MIPS_PWCTL_PWEN_SHIFT; 2450 config = 1 << MIPS_PWCTL_PWEN_SHIFT;
2451 if (config_enabled(CONFIG_64BIT)) 2451 if (IS_ENABLED(CONFIG_64BIT))
2452 config |= MIPS_PWCTL_XU_MASK; 2452 config |= MIPS_PWCTL_XU_MASK;
2453 write_c0_pwctl(config); 2453 write_c0_pwctl(config);
2454 pr_info("Hardware Page Table Walker enabled\n"); 2454 pr_info("Hardware Page Table Walker enabled\n");
@@ -2522,7 +2522,7 @@ void build_tlb_refill_handler(void)
2522 */ 2522 */
2523 static int run_once = 0; 2523 static int run_once = 0;
2524 2524
2525 if (config_enabled(CONFIG_XPA) && !cpu_has_rixi) 2525 if (IS_ENABLED(CONFIG_XPA) && !cpu_has_rixi)
2526 panic("Kernels supporting XPA currently require CPUs with RIXI"); 2526 panic("Kernels supporting XPA currently require CPUs with RIXI");
2527 2527
2528 output_pgtable_bits_defines(); 2528 output_pgtable_bits_defines();
diff --git a/arch/mips/mti-malta/malta-dtshim.c b/arch/mips/mti-malta/malta-dtshim.c
index f7133efc5843..151f4882ec8a 100644
--- a/arch/mips/mti-malta/malta-dtshim.c
+++ b/arch/mips/mti-malta/malta-dtshim.c
@@ -31,7 +31,7 @@ static unsigned __init gen_fdt_mem_array(__be32 *mem_array, unsigned long size)
31 31
32 entries = 1; 32 entries = 1;
33 mem_array[0] = cpu_to_be32(PHYS_OFFSET); 33 mem_array[0] = cpu_to_be32(PHYS_OFFSET);
34 if (config_enabled(CONFIG_EVA)) { 34 if (IS_ENABLED(CONFIG_EVA)) {
35 /* 35 /*
36 * The current Malta EVA configuration is "special" in that it 36 * The current Malta EVA configuration is "special" in that it
37 * always makes use of addresses in the upper half of the 32 bit 37 * always makes use of addresses in the upper half of the 32 bit
@@ -82,7 +82,7 @@ static void __init append_memory(void *fdt, int root_off)
82 physical_memsize = 32 << 20; 82 physical_memsize = 32 << 20;
83 } 83 }
84 84
85 if (config_enabled(CONFIG_CPU_BIG_ENDIAN)) { 85 if (IS_ENABLED(CONFIG_CPU_BIG_ENDIAN)) {
86 /* 86 /*
87 * SOC-it swaps, or perhaps doesn't swap, when DMA'ing 87 * SOC-it swaps, or perhaps doesn't swap, when DMA'ing
88 * the last word of physical memory. 88 * the last word of physical memory.
diff --git a/arch/mips/mti-malta/malta-memory.c b/arch/mips/mti-malta/malta-memory.c
index d5f8dae6a797..a47556723b85 100644
--- a/arch/mips/mti-malta/malta-memory.c
+++ b/arch/mips/mti-malta/malta-memory.c
@@ -32,7 +32,7 @@ static void free_init_pages_eva_malta(void *begin, void *end)
32 32
33void __init fw_meminit(void) 33void __init fw_meminit(void)
34{ 34{
35 bool eva = config_enabled(CONFIG_EVA); 35 bool eva = IS_ENABLED(CONFIG_EVA);
36 36
37 free_init_pages_eva = eva ? free_init_pages_eva_malta : NULL; 37 free_init_pages_eva = eva ? free_init_pages_eva_malta : NULL;
38} 38}
diff --git a/arch/mips/mti-malta/malta-setup.c b/arch/mips/mti-malta/malta-setup.c
index 33d5ff5069e5..ec5b21678fad 100644
--- a/arch/mips/mti-malta/malta-setup.c
+++ b/arch/mips/mti-malta/malta-setup.c
@@ -261,7 +261,7 @@ void __init plat_mem_setup(void)
261 fdt = malta_dt_shim(fdt); 261 fdt = malta_dt_shim(fdt);
262 __dt_setup_arch(fdt); 262 __dt_setup_arch(fdt);
263 263
264 if (config_enabled(CONFIG_EVA)) 264 if (IS_ENABLED(CONFIG_EVA))
265 /* EVA has already been configured in mach-malta/kernel-init.h */ 265 /* EVA has already been configured in mach-malta/kernel-init.h */
266 pr_info("Enhanced Virtual Addressing (EVA) activated\n"); 266 pr_info("Enhanced Virtual Addressing (EVA) activated\n");
267 267
diff --git a/arch/mips/net/bpf_jit.c b/arch/mips/net/bpf_jit.c
index 1a8c96035716..d1b7bd09253a 100644
--- a/arch/mips/net/bpf_jit.c
+++ b/arch/mips/net/bpf_jit.c
@@ -426,7 +426,7 @@ static inline void emit_load_ptr(unsigned int dst, unsigned int src,
426static inline void emit_load_func(unsigned int reg, ptr imm, 426static inline void emit_load_func(unsigned int reg, ptr imm,
427 struct jit_ctx *ctx) 427 struct jit_ctx *ctx)
428{ 428{
429 if (config_enabled(CONFIG_64BIT)) { 429 if (IS_ENABLED(CONFIG_64BIT)) {
430 /* At this point imm is always 64-bit */ 430 /* At this point imm is always 64-bit */
431 emit_load_imm(r_tmp, (u64)imm >> 32, ctx); 431 emit_load_imm(r_tmp, (u64)imm >> 32, ctx);
432 emit_dsll(r_tmp_imm, r_tmp, 16, ctx); /* left shift by 16 */ 432 emit_dsll(r_tmp_imm, r_tmp, 16, ctx); /* left shift by 16 */
@@ -516,7 +516,7 @@ static inline void emit_jr(unsigned int reg, struct jit_ctx *ctx)
516static inline u16 align_sp(unsigned int num) 516static inline u16 align_sp(unsigned int num)
517{ 517{
518 /* Double word alignment for 32-bit, quadword for 64-bit */ 518 /* Double word alignment for 32-bit, quadword for 64-bit */
519 unsigned int align = config_enabled(CONFIG_64BIT) ? 16 : 8; 519 unsigned int align = IS_ENABLED(CONFIG_64BIT) ? 16 : 8;
520 num = (num + (align - 1)) & -align; 520 num = (num + (align - 1)) & -align;
521 return num; 521 return num;
522} 522}