* [PATCH 1/2] s390: Convert IS_ENABLED uses to __is_defined
@ 2019-04-09 16:33 Joe Perches
2019-04-09 16:33 ` [PATCH 2/2] crypto: sahara: " Joe Perches
2019-04-10 16:19 ` [PATCH 1/2] s390: " Martin Schwidefsky
0 siblings, 2 replies; 5+ messages in thread
From: Joe Perches @ 2019-04-09 16:33 UTC (permalink / raw)
To: Martin Schwidefsky, Heiko Carstens, Alexei Starovoitov,
Daniel Borkmann, Martin KaFai Lau, Song Liu, Yonghong Song
Cc: linux-s390, linux-kernel, netdev, bpf
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>
---
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,<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 {
--
2.15.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] crypto: sahara: Convert IS_ENABLED uses to __is_defined
2019-04-09 16:33 [PATCH 1/2] s390: Convert IS_ENABLED uses to __is_defined Joe Perches
@ 2019-04-09 16:33 ` Joe Perches
2019-04-18 14:23 ` Herbert Xu
2019-04-10 16:19 ` [PATCH 1/2] s390: " Martin Schwidefsky
1 sibling, 1 reply; 5+ messages in thread
From: Joe Perches @ 2019-04-09 16:33 UTC (permalink / raw)
To: Herbert Xu, David S. Miller; +Cc: linux-crypto, linux-kernel
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>
---
drivers/crypto/sahara.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/crypto/sahara.c b/drivers/crypto/sahara.c
index 8c32a3059b4a..fd11162a915e 100644
--- a/drivers/crypto/sahara.c
+++ b/drivers/crypto/sahara.c
@@ -354,7 +354,7 @@ static void sahara_decode_status(struct sahara_dev *dev, unsigned int status)
{
u8 state;
- if (!IS_ENABLED(DEBUG))
+ if (!__is_defined(DEBUG))
return;
state = SAHARA_STATUS_GET_STATE(status);
@@ -406,7 +406,7 @@ static void sahara_dump_descriptors(struct sahara_dev *dev)
{
int i;
- if (!IS_ENABLED(DEBUG))
+ if (!__is_defined(DEBUG))
return;
for (i = 0; i < SAHARA_MAX_HW_DESC; i++) {
@@ -427,7 +427,7 @@ static void sahara_dump_links(struct sahara_dev *dev)
{
int i;
- if (!IS_ENABLED(DEBUG))
+ if (!__is_defined(DEBUG))
return;
for (i = 0; i < SAHARA_MAX_HW_LINK; i++) {
--
2.15.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] s390: Convert IS_ENABLED uses to __is_defined
2019-04-09 16:33 [PATCH 1/2] s390: Convert IS_ENABLED uses to __is_defined Joe Perches
2019-04-09 16:33 ` [PATCH 2/2] crypto: sahara: " Joe Perches
@ 2019-04-10 16:19 ` Martin Schwidefsky
2019-04-11 20:48 ` Song Liu
1 sibling, 1 reply; 5+ messages in thread
From: Martin Schwidefsky @ 2019-04-10 16:19 UTC (permalink / raw)
To: Joe Perches
Cc: Heiko Carstens, Alexei Starovoitov, Daniel Borkmann,
Martin KaFai Lau, Song Liu, Yonghong Song, linux-s390,
linux-kernel, netdev, bpf
On Tue, 9 Apr 2019 09:33:12 -0700
Joe Perches <joe@perches.com> wrote:
> 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>
That makes a lot of sense. Added to s390/linux:features. Thanks.
--
blue skies,
Martin.
"Reality continues to ruin my life." - Calvin.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] s390: Convert IS_ENABLED uses to __is_defined
2019-04-10 16:19 ` [PATCH 1/2] s390: " Martin Schwidefsky
@ 2019-04-11 20:48 ` Song Liu
0 siblings, 0 replies; 5+ messages in thread
From: Song Liu @ 2019-04-11 20:48 UTC (permalink / raw)
To: Martin Schwidefsky
Cc: Joe Perches, Heiko Carstens, Alexei Starovoitov, Daniel Borkmann,
Martin KaFai Lau, Song Liu, Yonghong Song, linux-s390, open list,
Networking, bpf
On Wed, Apr 10, 2019 at 11:43 AM Martin Schwidefsky
<schwidefsky@de.ibm.com> wrote:
>
> On Tue, 9 Apr 2019 09:33:12 -0700
> Joe Perches <joe@perches.com> wrote:
>
> > 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>
Acked-by: Song Liu <songliubraving@fb.com>
>
> That makes a lot of sense. Added to s390/linux:features. Thanks.
>
> --
> blue skies,
> Martin.
>
> "Reality continues to ruin my life." - Calvin.
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] crypto: sahara: Convert IS_ENABLED uses to __is_defined
2019-04-09 16:33 ` [PATCH 2/2] crypto: sahara: " Joe Perches
@ 2019-04-18 14:23 ` Herbert Xu
0 siblings, 0 replies; 5+ messages in thread
From: Herbert Xu @ 2019-04-18 14:23 UTC (permalink / raw)
To: Joe Perches; +Cc: David S. Miller, linux-crypto, linux-kernel
On Tue, Apr 09, 2019 at 09:33:13AM -0700, Joe Perches wrote:
> 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>
> ---
> drivers/crypto/sahara.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
Patch applied. Thanks.
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-04-18 15:08 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-09 16:33 [PATCH 1/2] s390: Convert IS_ENABLED uses to __is_defined Joe Perches
2019-04-09 16:33 ` [PATCH 2/2] crypto: sahara: " Joe Perches
2019-04-18 14:23 ` Herbert Xu
2019-04-10 16:19 ` [PATCH 1/2] s390: " Martin Schwidefsky
2019-04-11 20:48 ` Song Liu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).