Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4027704yba; Tue, 9 Apr 2019 09:34:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqyyXWC30usfRDFjlHsTc9HX9c365+D6g5RIscyFF1oAszDnZCpZoezJ1ArdL9uGbKCcbt4U X-Received: by 2002:a62:184a:: with SMTP id 71mr19136523pfy.1.1554827681079; Tue, 09 Apr 2019 09:34:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554827681; cv=none; d=google.com; s=arc-20160816; b=fQmTTaypIs5EYZ/S6FHmQDnhgToyjOlf20NlT5jJ2SnvPEKJzKeJ6FgnAc4q9d+DnT V91g8Q//LwLO5md4tfCmrDkKcsuyomVzY3vyoU/fZRr6BRprksrk1+DqOODYPvOHYP0B sG9UcIHUo/HvmxKdWQhD5YVJG4TiC/QlN+RNr/xX9B90QiZLD077oQX5B0Lat5XMvqFn iDGg1Md5zTBveoaPhhjBJMQ+qq0IMwbWqlftPyalrCXqiXKRneKlLUwJfKq3UFOwIdG/ TI0bK5r49lrQMDS83a3WOjRtdO3Q1LMpRRAqIez/ZF+ksOqlenImUMX/cQ4xAGuJ4sKP X3mA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=9j8AJciSiUG/Ltbfk09vLsnuI5fSNeQRBL3G/X9TEGQ=; b=IFdTRl8r8JptwheKKU4aZMjWoflbIA0ZTfRWmMFA9+i4+3mEh3O1UeGYeWxWMEAC8o 1uTIFBEmvZMDT3P6BD0d4X1i/Z2kaz4vetQ3DKmJ3WSiQpFB/1FgUUvP+bwe46UffLc6 eqD+lqNWvwHSm5KhFxkKn33Ynrde/WpVOh/HORoWNyWoTtka5PSrDWE/tEF0tihUNrVk +ON4DvS/5Lx1ihlcSfqCY9VC/dX3FiPf8gUtwLEjDvU4MvFNNIDA3cg7vODrKzoP2pbZ dt/1b4SwChPBvabrIrQSIOlKxa4rBVx3Ox8hay67aRdBo+4jmb33BYUkTGo6LYpgYXST honQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a82si17209808pfj.255.2019.04.09.09.34.24; Tue, 09 Apr 2019 09:34:41 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726690AbfDIQdt (ORCPT + 99 others); Tue, 9 Apr 2019 12:33:49 -0400 Received: from smtprelay0226.hostedemail.com ([216.40.44.226]:42475 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726456AbfDIQdt (ORCPT ); Tue, 9 Apr 2019 12:33:49 -0400 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay02.hostedemail.com (Postfix) with ESMTP id A89681CDD; Tue, 9 Apr 2019 16:33:47 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::::::::::,RULES_HIT:41:355:379:541:800:960:973:988:989:1260:1345:1437:1534:1543:1711:1730:1747:1777:1792:2393:2559:2562:3138:3139:3140:3141:3142:3354:3865:3866:3867:3868:4321:4605:5007:6261:7903:10004:10848:11026:11473:11658:11914:12043:12048:12296:12438:12555:12895:12986:13161:13229:13972:14096:14181:14394:14721:21080:21433:21451:21627:30054:30069,0,RBL:172.56.41.174:@perches.com:.lbl8.mailshell.net-62.8.0.180 64.201.201.201,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:27,LUA_SUMMARY:none X-HE-Tag: toys86_5aea878d8d900 X-Filterd-Recvd-Size: 4500 Received: from joe-laptop.perches.com (unknown [172.56.41.174]) (Authenticated sender: joe@perches.com) by omf11.hostedemail.com (Postfix) with ESMTPA; Tue, 9 Apr 2019 16:33:44 +0000 (UTC) From: Joe Perches To: Martin Schwidefsky , Heiko Carstens , Alexei Starovoitov , Daniel Borkmann , Martin KaFai Lau , Song Liu , Yonghong Song Cc: linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, bpf@vger.kernel.org Subject: [PATCH 1/2] s390: Convert IS_ENABLED uses to __is_defined Date: Tue, 9 Apr 2019 09:33:12 -0700 Message-Id: <3c15d21d2b6896e76e8801dc07de2bae1dadceb1.1554827560.git.joe@perches.com> X-Mailer: git-send-email 2.15.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org IS_ENABLED should be reserved for CONFIG_ uses so convert the uses of IS_ENABLED with a #define to __is_defined. Signed-off-by: Joe Perches --- arch/s390/kernel/nospec-branch.c | 6 +++--- arch/s390/kernel/nospec-sysfs.c | 2 +- arch/s390/net/bpf_jit_comp.c | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/arch/s390/kernel/nospec-branch.c b/arch/s390/kernel/nospec-branch.c index bdddaae96559..8e484130b9b8 100644 --- a/arch/s390/kernel/nospec-branch.c +++ b/arch/s390/kernel/nospec-branch.c @@ -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. diff --git a/arch/s390/kernel/nospec-sysfs.c b/arch/s390/kernel/nospec-sysfs.c index e30e580ae362..48f472bf9290 100644 --- a/arch/s390/kernel/nospec-sysfs.c +++ b/arch/s390/kernel/nospec-sysfs.c @@ -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"); diff --git a/arch/s390/net/bpf_jit_comp.c b/arch/s390/net/bpf_jit_comp.c index 51dd0267d014..5e7c63033159 100644 --- a/arch/s390/net/bpf_jit_comp.c +++ b/arch/s390/net/bpf_jit_comp.c @@ -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,(%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 { -- 2.15.0