]> git.baikalelectronics.ru Git - kernel.git/commitdiff
s390: Convert IS_ENABLED uses to __is_defined
authorJoe Perches <joe@perches.com>
Tue, 9 Apr 2019 16:33:12 +0000 (09:33 -0700)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Thu, 11 Apr 2019 11:36:53 +0000 (13:36 +0200)
IS_ENABLED should be reserved for CONFIG_<FOO> uses so convert
the uses of IS_ENABLED with a #define to __is_defined.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/kernel/nospec-branch.c
arch/s390/kernel/nospec-sysfs.c
arch/s390/net/bpf_jit_comp.c

index bdddaae9655984dfbf59ccee386c7bb3608cb183..8e484130b9b8d09a6c3c0e50b9307515b8b3d9e0 100644 (file)
@@ -37,7 +37,7 @@ static int __init nospec_report(void)
 {
        if (test_facility(156))
                pr_info("Spectre V2 mitigation: etokens\n");
-       if (IS_ENABLED(CC_USING_EXPOLINE) && !nospec_disable)
+       if (__is_defined(CC_USING_EXPOLINE) && !nospec_disable)
                pr_info("Spectre V2 mitigation: execute trampolines\n");
        if (__test_facility(82, S390_lowcore.alt_stfle_fac_list))
                pr_info("Spectre V2 mitigation: limited branch prediction\n");
@@ -63,10 +63,10 @@ void __init nospec_auto_detect(void)
                 * The machine supports etokens.
                 * Disable expolines and disable nobp.
                 */
-               if (IS_ENABLED(CC_USING_EXPOLINE))
+               if (__is_defined(CC_USING_EXPOLINE))
                        nospec_disable = 1;
                __clear_facility(82, S390_lowcore.alt_stfle_fac_list);
-       } else if (IS_ENABLED(CC_USING_EXPOLINE)) {
+       } else if (__is_defined(CC_USING_EXPOLINE)) {
                /*
                 * The kernel has been compiled with expolines.
                 * Keep expolines enabled and disable nobp.
index e30e580ae36209d3395c2cf25a412ba5b9385480..48f472bf929087c06ad6dc5ed9023e0b43b55a6f 100644 (file)
@@ -15,7 +15,7 @@ ssize_t cpu_show_spectre_v2(struct device *dev,
 {
        if (test_facility(156))
                return sprintf(buf, "Mitigation: etokens\n");
-       if (IS_ENABLED(CC_USING_EXPOLINE) && !nospec_disable)
+       if (__is_defined(CC_USING_EXPOLINE) && !nospec_disable)
                return sprintf(buf, "Mitigation: execute trampolines\n");
        if (__test_facility(82, S390_lowcore.alt_stfle_fac_list))
                return sprintf(buf, "Mitigation: limited branch prediction\n");
index 51dd0267d0148142bdac0849bd034c75c0b7c0ff..5e7c6303315906d95163e8ceac5ba7125d196f1f 100644 (file)
@@ -455,7 +455,7 @@ static void bpf_jit_epilogue(struct bpf_jit *jit, u32 stack_depth)
        EMIT4(0xb9040000, REG_2, BPF_REG_0);
        /* Restore registers */
        save_restore_regs(jit, REGS_RESTORE, stack_depth);
-       if (IS_ENABLED(CC_USING_EXPOLINE) && !nospec_disable) {
+       if (__is_defined(CC_USING_EXPOLINE) && !nospec_disable) {
                jit->r14_thunk_ip = jit->prg;
                /* Generate __s390_indirect_jump_r14 thunk */
                if (test_facility(35)) {
@@ -473,7 +473,7 @@ static void bpf_jit_epilogue(struct bpf_jit *jit, u32 stack_depth)
        /* br %r14 */
        _EMIT2(0x07fe);
 
-       if (IS_ENABLED(CC_USING_EXPOLINE) && !nospec_disable &&
+       if (__is_defined(CC_USING_EXPOLINE) && !nospec_disable &&
            (jit->seen & SEEN_FUNC)) {
                jit->r1_thunk_ip = jit->prg;
                /* Generate __s390_indirect_jump_r1 thunk */
@@ -999,7 +999,7 @@ static noinline int bpf_jit_insn(struct bpf_jit *jit, struct bpf_prog *fp, int i
                /* lg %w1,<d(imm)>(%l) */
                EMIT6_DISP_LH(0xe3000000, 0x0004, REG_W1, REG_0, REG_L,
                              EMIT_CONST_U64(func));
-               if (IS_ENABLED(CC_USING_EXPOLINE) && !nospec_disable) {
+               if (__is_defined(CC_USING_EXPOLINE) && !nospec_disable) {
                        /* brasl %r14,__s390_indirect_jump_r1 */
                        EMIT6_PCREL_RILB(0xc0050000, REG_14, jit->r1_thunk_ip);
                } else {