riscv: cleanup svpbmt cpufeature probing
PATCH 1/4 riscv: cleanup svpbmt cpufeature probing
This can also do without the ifdef and use IS_ENABLED instead and for better readability, getting rid of that switch also seems waranted.
--- arch/riscv/kernel/cpufeature.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-)
arch/riscv/kernel/cpufeature.c +5 -8
@@ -253,16 +253,13 @@ void __init riscv_fill_hwcap(void)#ifdef CONFIG_RISCV_ALTERNATIVE static bool __init_or_module cpufeature_probe_svpbmt(unsigned int stage) { -#ifdef CONFIG_RISCV_ISA_SVPBMT -switch (stage) { -case RISCV_ALTERNATIVES_EARLY_BOOT : +if (!IS_ENABLED (CONFIG_RISCV_ISA_SVPBMT ))return false; -default : -return riscv_isa_extension_available (NULL ,SVPBMT ); - } -#endif -return false; +if (stage ==RISCV_ALTERNATIVES_EARLY_BOOT ) +return false; + +return riscv_isa_extension_available (NULL ,SVPBMT ); } static bool __init_or_module cpufeature_probe_zicbom(unsigned int stage)
Signature · 1 line
2.35.1
PATCH 2/4 riscv: drop some idefs from CMO initialization
Wrapping things in #ifdefs makes the code harder to read while we also have IS_ENABLED() macros to do this in regular code and the extension detection is not _that_ runtime critical.
So define a stub for riscv_noncoherent_supported() in the non-CONFIG_RISCV_DMA_NONCOHERENT case and move the code to us IS_ENABLED.
--- arch/riscv/errata/thead/errata.c | 7 +++---- arch/riscv/include/asm/cacheflush.h | 2 ++ arch/riscv/kernel/cpufeature.c | 22 +++++++++------------- 3 files changed, 14 insertions(+), 17 deletions(-)
arch/riscv/errata/thead/errata.c +3 -4
@@ -30,7 +30,9 @@ static bool errata_probe_pbmt(unsigned int stage,static bool errata_probe_cmo (unsigned int stage,unsigned long arch_id,unsigned long impid) { -#ifdef CONFIG_ERRATA_THEAD_CMO +if (!IS_ENABLED (CONFIG_ERRATA_THEAD_CMO )) +return false; +if (arch_id !=0 || impid !=0 )return false;
@@ -39,9 +41,6 @@ static bool errata_probe_cmo(unsigned int stage,riscv_noncoherent_supported ();return true; -#else -return false; -#endif } static u32 thead_errata_probe(unsigned int stage,
arch/riscv/include/asm/cacheflush.h +2 -0
@@ -50,6 +50,8 @@ static inline void riscv_init_cbom_blocksize(void) { }#ifdef CONFIG_RISCV_DMA_NONCOHERENT void riscv_noncoherent_supported (void ); +#else +static inline void riscv_noncoherent_supported (void ) {}#endif /*
arch/riscv/kernel/cpufeature.c +9 -13
@@ -264,21 +264,17 @@ static bool __init_or_module cpufeature_probe_svpbmt(unsigned int stage) static bool __init_or_module cpufeature_probe_zicbom(unsigned int stage) { -#ifdef CONFIG_RISCV_ISA_ZICBOM -switch (stage) { -case RISCV_ALTERNATIVES_EARLY_BOOT : +if (!IS_ENABLED (CONFIG_RISCV_ISA_ZICBOM )) +return false; + +if (stage ==RISCV_ALTERNATIVES_EARLY_BOOT ) +return false; + +if (!riscv_isa_extension_available (NULL ,ZICBOM ))return false; -default : -if (riscv_isa_extension_available (NULL ,ZICBOM )) { -riscv_noncoherent_supported (); -return true; - }else { -return false; - } - } -#endif -return false; +riscv_noncoherent_supported (); +return true; }/*
Signature · 1 line
2.35.1
Re: [PATCH 2/4] riscv: drop some idefs from CMO initialization
Quoted 93 lines · Heiko Stuebner
Wrapping things in #ifdefs makes the code harder to read while we also have
IS_ENABLED()macros to do this in regular code and the extension detection is not _that_ runtime critical.So define a stub for
riscv_noncoherent_supported()in the non-CONFIG_RISCV_DMA_NONCOHERENT case and move the code to usIS_ENABLED.Suggested-by Conor Dooley <[email protected]>Signed-off-by Heiko Stuebner <[email protected]>--- arch/riscv/errata/thead/errata.c | 7 +++---- arch/riscv/include/asm/cacheflush.h | 2 ++ arch/riscv/kernel/cpufeature.c | 22 +++++++++------------- 3 files changed, 14 insertions(+), 17 deletions(-)arch/riscv/errata/thead/errata.c +3
-4@@ -30,7 +30,9 @@ static bool errata_probe_pbmt(unsigned int stage,static bool errata_probe_cmo (unsigned int stage,unsigned long arch_id,unsigned long impid) { -#ifdef CONFIG_ERRATA_THEAD_CMO +if (!IS_ENABLED (CONFIG_ERRATA_THEAD_CMO )) +return false; +if (arch_id !=0 || impid !=0 )return false;@@ -39,9 +41,6 @@ static bool errata_probe_cmo(unsigned int stage,riscv_noncoherent_supported ();return true; -#else -return false; -#endif } static u32 thead_errata_probe(unsigned int stage,arch/riscv/include/asm/cacheflush.h +2
-0@@ -50,6 +50,8 @@ static inline void riscv_init_cbom_blocksize(void) { }#ifdef CONFIG_RISCV_DMA_NONCOHERENT void riscv_noncoherent_supported (void ); +#else +static inline void riscv_noncoherent_supported (void ) {}#endif /* arch/riscv/kernel/cpufeature.c +9
-14@@ -264,21 +264,17 @@ static bool __init_or_module cpufeature_probe_svpbmt(unsigned int stage) static bool __init_or_module cpufeature_probe_zicbom(unsigned int stage) { -#ifdef CONFIG_RISCV_ISA_ZICBOM -switch (stage) { -case RISCV_ALTERNATIVES_EARLY_BOOT : +if (!IS_ENABLED (CONFIG_RISCV_ISA_ZICBOM )) +return false; + +if (stage ==RISCV_ALTERNATIVES_EARLY_BOOT ) +return false; + +if (!riscv_isa_extension_available (NULL ,ZICBOM ))return false; -default : -if (riscv_isa_extension_available (NULL ,ZICBOM )) { -riscv_noncoherent_supported (); -return true; - }else { -return false; - } - } -#endif -return false; +riscv_noncoherent_supported (); +return true; }/* -- 2.35.1
Signature · 2 lines
Best Regards Guo Ren
Re: [PATCH 2/4] riscv: drop some idefs from CMO initialization
In reply to Heiko StuebnerQuoted 11 lines · Heiko Stuebner
EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
Wrapping things in #ifdefs makes the code harder to read while we also have
IS_ENABLED()macros to do this in regular code and the extension detection is not _that_ runtime critical.So define a stub for
riscv_noncoherent_supported()in the non-CONFIG_RISCV_DMA_NONCOHERENT case and move the code to usIS_ENABLED.Suggested-by Conor Dooley <[email protected]>
To my "sensitive" eyes, this looks a lot nicer!
Quoted 83 lines
Signed-off-by Heiko Stuebner <[email protected]>--- arch/riscv/errata/thead/errata.c | 7 +++---- arch/riscv/include/asm/cacheflush.h | 2 ++ arch/riscv/kernel/cpufeature.c | 22 +++++++++------------- 3 files changed, 14 insertions(+), 17 deletions(-)arch/riscv/errata/thead/errata.c +3
-4@@ -30,7 +30,9 @@ static bool errata_probe_pbmt(unsigned int stage,static bool errata_probe_cmo (unsigned int stage,unsigned long arch_id,unsigned long impid) { -#ifdef CONFIG_ERRATA_THEAD_CMO +if (!IS_ENABLED (CONFIG_ERRATA_THEAD_CMO )) +return false; +if (arch_id !=0 || impid !=0 )return false;@@ -39,9 +41,6 @@ static bool errata_probe_cmo(unsigned int stage,riscv_noncoherent_supported ();return true; -#else -return false; -#endif } static u32 thead_errata_probe(unsigned int stage,arch/riscv/include/asm/cacheflush.h +2
-0@@ -50,6 +50,8 @@ static inline void riscv_init_cbom_blocksize(void) { }#ifdef CONFIG_RISCV_DMA_NONCOHERENT void riscv_noncoherent_supported (void ); +#else +static inline void riscv_noncoherent_supported (void ) {}#endif /* arch/riscv/kernel/cpufeature.c +9
-14@@ -264,21 +264,17 @@ static bool __init_or_module cpufeature_probe_svpbmt(unsigned int stage) static bool __init_or_module cpufeature_probe_zicbom(unsigned int stage) { -#ifdef CONFIG_RISCV_ISA_ZICBOM -switch (stage) { -case RISCV_ALTERNATIVES_EARLY_BOOT : +if (!IS_ENABLED (CONFIG_RISCV_ISA_ZICBOM )) +return false; + +if (stage ==RISCV_ALTERNATIVES_EARLY_BOOT ) +return false; + +if (!riscv_isa_extension_available (NULL ,ZICBOM ))return false; -default : -if (riscv_isa_extension_available (NULL ,ZICBOM )) { -riscv_noncoherent_supported (); -return true; - }else { -return false; - } - } -#endif -return false; +riscv_noncoherent_supported (); +return true; }/* -- 2.35.1
Re: [PATCH 2/4] riscv: drop some idefs from CMO initialization
In reply to Heiko StuebnerQuoted 8 lines · Heiko Stuebner
Wrapping things in #ifdefs makes the code harder to read while we also have
IS_ENABLED()macros to do this in regular code and the extension detection is not _that_ runtime critical.So define a stub for
riscv_noncoherent_supported()in the non-CONFIG_RISCV_DMA_NONCOHERENT case and move the code to usIS_ENABLED.
Quoted 8 lines
Suggested-by Conor Dooley <[email protected]>Signed-off-by Heiko Stuebner <[email protected]>--- arch/riscv/errata/thead/errata.c | 7 +++---- arch/riscv/include/asm/cacheflush.h | 2 ++ arch/riscv/kernel/cpufeature.c | 22 +++++++++------------- 3 files changed, 14 insertions(+), 17 deletions(-)
_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv
PATCH 3/4 riscv: use BIT macros in t-head errata init
In reply to Heiko StuebnerUsing the appropriate BIT macro makes the code better readable.
--- arch/riscv/errata/thead/errata.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/riscv/errata/thead/errata.c +2 -2
@@ -49,10 +49,10 @@ static u32 thead_errata_probe(unsigned int stage,u32 cpu_req_errata =0 ;if (errata_probe_pbmt (stage, archid, impid)) - cpu_req_errata |= (1U <<ERRATA_THEAD_PBMT ); + cpu_req_errata |=BIT (ERRATA_THEAD_PBMT );if (errata_probe_cmo (stage, archid, impid)) - cpu_req_errata |= (1U <<ERRATA_THEAD_CMO ); + cpu_req_errata |=BIT (ERRATA_THEAD_CMO );return cpu_req_errata; }
Signature · 1 line
2.35.1
Re: [PATCH 3/4] riscv: use BIT macros in t-head errata init
Quoted 29 lines · Heiko Stuebner
Using the appropriate BIT macro makes the code better readable.
Suggested-by Conor Dooley <[email protected]>Signed-off-by Heiko Stuebner <[email protected]>--- arch/riscv/errata/thead/errata.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)arch/riscv/errata/thead/errata.c +2
-3@@ -49,10 +49,10 @@ static u32 thead_errata_probe(unsigned int stage,u32 cpu_req_errata =0 ;if (errata_probe_pbmt (stage, archid, impid)) - cpu_req_errata |= (1U <<ERRATA_THEAD_PBMT ); + cpu_req_errata |=BIT (ERRATA_THEAD_PBMT );if (errata_probe_cmo (stage, archid, impid)) - cpu_req_errata |= (1U <<ERRATA_THEAD_CMO ); + cpu_req_errata |=BIT (ERRATA_THEAD_CMO );return cpu_req_errata; } --2.35.1
Signature · 2 lines
Best Regards Guo Ren
Re: [PATCH 3/4] riscv: use BIT macros in t-head errata init
In reply to Heiko StuebnerQuoted 3 lines · Heiko Stuebner
EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
Using the appropriate BIT macro makes the code better readable.
As you might imagine, I agree!
Quoted 25 lines
Suggested-by Conor Dooley <[email protected]>Signed-off-by Heiko Stuebner <[email protected]>--- arch/riscv/errata/thead/errata.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)arch/riscv/errata/thead/errata.c +2
-3@@ -49,10 +49,10 @@ static u32 thead_errata_probe(unsigned int stage,u32 cpu_req_errata =0 ;if (errata_probe_pbmt (stage, archid, impid)) - cpu_req_errata |= (1U <<ERRATA_THEAD_PBMT ); + cpu_req_errata |=BIT (ERRATA_THEAD_PBMT );if (errata_probe_cmo (stage, archid, impid)) - cpu_req_errata |= (1U <<ERRATA_THEAD_CMO ); + cpu_req_errata |=BIT (ERRATA_THEAD_CMO );return cpu_req_errata; } --
Quoted 2 lines
2.35.1
_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv
Re: [PATCH 3/4] riscv: use BIT macros in t-head errata init
In reply to Heiko StuebnerQuoted 28 lines · Heiko Stuebner
Using the appropriate BIT macro makes the code better readable.
Suggested-by Conor Dooley <[email protected]>Signed-off-by Heiko Stuebner <[email protected]>--- arch/riscv/errata/thead/errata.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)arch/riscv/errata/thead/errata.c +2
-2@@ -49,10 +49,10 @@ static u32 thead_errata_probe(unsigned int stage,u32 cpu_req_errata =0 ;if (errata_probe_pbmt (stage, archid, impid)) - cpu_req_errata |= (1U <<ERRATA_THEAD_PBMT ); + cpu_req_errata |=BIT (ERRATA_THEAD_PBMT );if (errata_probe_cmo (stage, archid, impid)) - cpu_req_errata |= (1U <<ERRATA_THEAD_CMO ); + cpu_req_errata |=BIT (ERRATA_THEAD_CMO );return cpu_req_errata; }Signature · 1 line
2.35.1
_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv
PATCH 4/4 riscv: check for kernel config option in t-head memory types errata
In reply to Heiko StuebnerThe t-head variant of page-based memory types should also check first for the enabled kernel config option.
--- arch/riscv/errata/thead/errata.c | 3 +++ 1 file changed, 3 insertions(+)
arch/riscv/errata/thead/errata.c +3 -0
@@ -17,6 +17,9 @@static bool errata_probe_pbmt (unsigned int stage,unsigned long arch_id,unsigned long impid) { +if (!IS_ENABLED (CONFIG_ERRATA_THEAD_PBMT )) +return false; +if (arch_id !=0 || impid !=0 )return false;
Signature · 1 line
2.35.1
Re: [PATCH 4/4] riscv: check for kernel config option in t-head memory types errata
Is it a Fixes?
Quoted 26 lines · Heiko Stuebner
The t-head variant of page-based memory types should also check first for the enabled kernel config option.
Signed-off-by Heiko Stuebner <[email protected]>--- arch/riscv/errata/thead/errata.c | 3 +++ 1 file changed, 3 insertions(+)arch/riscv/errata/thead/errata.c +3
-1@@ -17,6 +17,9 @@static bool errata_probe_pbmt (unsigned int stage,unsigned long arch_id,unsigned long impid) { +if (!IS_ENABLED (CONFIG_ERRATA_THEAD_PBMT )) +return false; +if (arch_id !=0 || impid !=0 )return false; --2.35.1
Signature · 2 lines
Best Regards Guo Ren
[email protected]
Reviewed-byRe: [PATCH 4/4] riscv: check for kernel config option in t-head memory types errata
Quoted 3 lines · Guo Ren
EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
Is it a Fixes?
Looks like one to me, seems a fixes tag would be good to have here... Either way:
Quoted 33 lines · Heiko Stuebner
Quoted 24 lines
The t-head variant of page-based memory types should also check first for the enabled kernel config option.
Signed-off-by Heiko Stuebner <[email protected]>--- arch/riscv/errata/thead/errata.c | 3 +++ 1 file changed, 3 insertions(+)arch/riscv/errata/thead/errata.c +3
-1@@ -17,6 +17,9 @@static bool errata_probe_pbmt (unsigned int stage,unsigned long arch_id,unsigned long impid) { +if (!IS_ENABLED (CONFIG_ERRATA_THEAD_PBMT )) +return false; +if (arch_id !=0 || impid !=0 )return false; --Quoted 2 lines
2.35.1
--
Best Regards
Guo Ren
Re: [PATCH 4/4] riscv: check for kernel config option in t-head memory types errata
Am Freitag, 2. September 2022, 11:33:27 CEST schrieb [email protected]:
Quoted 8 lines · Guo Ren
Quoted 3 lines
EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
Is it a Fixes?
Looks like one to me, seems a fixes tag would be good to have here... Either way:
Reviewed-by Conor Dooley <[email protected]>
The alternative itself also is protected by the kconfig-option, so even if probe says "yes", nothing will be patched when CONFIG_ERRATA_THEAD_PBMT is not enabled.
So for the memory-types it's more a change to keep it consistent with the other extensions. But I guess we can add the fixes-tag anyway, as it makes sure that doesn't get copy-pasted somewhere else :-)
Heiko
Quoted 25 lines
Quoted 25 lines · Heiko Stuebner
Quoted 23 lines
The t-head variant of page-based memory types should also check first for the enabled kernel config option.
Signed-off-by Heiko Stuebner <[email protected]>--- arch/riscv/errata/thead/errata.c | 3 +++ 1 file changed, 3 insertions(+)arch/riscv/errata/thead/errata.c +3
-0@@ -17,6 +17,9 @@static bool errata_probe_pbmt (unsigned int stage,unsigned long arch_id,unsigned long impid) { +if (!IS_ENABLED (CONFIG_ERRATA_THEAD_PBMT )) +return false; +if (arch_id !=0 || impid !=0 )return false;
Quoted 10 lines
Quoted 8 lines
Quoted 3 lines
--
2.35.1--
Best Regards
Guo Ren
_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv
Re: [PATCH 4/4] riscv: check for kernel config option in t-head memory types errata
In reply to Heiko StuebnerQuoted 25 lines · Heiko Stuebner
The t-head variant of page-based memory types should also check first for the enabled kernel config option.
Signed-off-by Heiko Stuebner <[email protected]>--- arch/riscv/errata/thead/errata.c | 3 +++ 1 file changed, 3 insertions(+)arch/riscv/errata/thead/errata.c +3
-0@@ -17,6 +17,9 @@static bool errata_probe_pbmt (unsigned int stage,unsigned long arch_id,unsigned long impid) { +if (!IS_ENABLED (CONFIG_ERRATA_THEAD_PBMT )) +return false; +if (arch_id !=0 || impid !=0 )return false;Signature · 1 line
2.35.1
_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv
Quoted 39 lines · Heiko Stuebner
This can also do without the ifdef and use
IS_ENABLEDinstead and for better readability, getting rid of that switch also seems waranted.Signed-off-by Heiko Stuebner <[email protected]>--- arch/riscv/kernel/cpufeature.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-)arch/riscv/kernel/cpufeature.c +5
-9@@ -253,16 +253,13 @@ void __init riscv_fill_hwcap(void)#ifdef CONFIG_RISCV_ALTERNATIVE static bool __init_or_module cpufeature_probe_svpbmt(unsigned int stage) { -#ifdef CONFIG_RISCV_ISA_SVPBMT -switch (stage) { -case RISCV_ALTERNATIVES_EARLY_BOOT : +if (!IS_ENABLED (CONFIG_RISCV_ISA_SVPBMT ))return false; -default : -return riscv_isa_extension_available (NULL ,SVPBMT ); - } -#endif -return false; +if (stage ==RISCV_ALTERNATIVES_EARLY_BOOT ) +return false; + +return riscv_isa_extension_available (NULL ,SVPBMT ); } static bool __init_or_module cpufeature_probe_zicbom(unsigned int stage) --2.35.1
Signature · 2 lines
Best Regards Guo Ren
Quoted 5 lines · Heiko Stuebner
EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
This can also do without the ifdef and use
IS_ENABLEDinstead and for better readability, getting rid of that switch also seems waranted.
The change itself looks great to me, but the commit message here does not stand by itself - the "also" stuff reads a bit oddly. How about:
---8<---
For better readability (and compile time coverage) use IS_ENABLED instead of ifdef and drop the new unneeded switch statement. ---8<---
Call me biased, but I much prefer how this looks now...
Quoted 33 lines
Signed-off-by Heiko Stuebner <[email protected]>--- arch/riscv/kernel/cpufeature.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-)arch/riscv/kernel/cpufeature.c +5
-9@@ -253,16 +253,13 @@ void __init riscv_fill_hwcap(void)#ifdef CONFIG_RISCV_ALTERNATIVE static bool __init_or_module cpufeature_probe_svpbmt(unsigned int stage) { -#ifdef CONFIG_RISCV_ISA_SVPBMT -switch (stage) { -case RISCV_ALTERNATIVES_EARLY_BOOT : +if (!IS_ENABLED (CONFIG_RISCV_ISA_SVPBMT ))return false; -default : -return riscv_isa_extension_available (NULL ,SVPBMT ); - } -#endif -return false; +if (stage ==RISCV_ALTERNATIVES_EARLY_BOOT ) +return false; + +return riscv_isa_extension_available (NULL ,SVPBMT ); } static bool __init_or_module cpufeature_probe_zicbom(unsigned int stage) --
Quoted 2 lines
2.35.1
_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv
Hi Heiko,
Please use a cover-letter for a patch series. They allow the series to be threaded better and people can reply to the cover-letter with series-wide comments. For example, I'd like to reply to a cover-letter now with
For the series
but now it looks like I need to go back and reply to each patch separately.
Thanks,
drew
Quoted 43 lines · Heiko Stuebner
This can also do without the ifdef and use
IS_ENABLEDinstead and for better readability, getting rid of that switch also seems waranted.Signed-off-by Heiko Stuebner <[email protected]>--- arch/riscv/kernel/cpufeature.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-)arch/riscv/kernel/cpufeature.c +5
-8@@ -253,16 +253,13 @@ void __init riscv_fill_hwcap(void)#ifdef CONFIG_RISCV_ALTERNATIVE static bool __init_or_module cpufeature_probe_svpbmt(unsigned int stage) { -#ifdef CONFIG_RISCV_ISA_SVPBMT -switch (stage) { -case RISCV_ALTERNATIVES_EARLY_BOOT : +if (!IS_ENABLED (CONFIG_RISCV_ISA_SVPBMT ))return false; -default : -return riscv_isa_extension_available (NULL ,SVPBMT ); - } -#endif -return false; +if (stage ==RISCV_ALTERNATIVES_EARLY_BOOT ) +return false; + +return riscv_isa_extension_available (NULL ,SVPBMT ); } static bool __init_or_module cpufeature_probe_zicbom(unsigned int stage)Signature · 7 lines
2.35.1 _______________________________________________ linux-riscv mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-riscv
_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv
Am Freitag, 2. September 2022, 11:49:39 CEST schrieb Andrew Jones:
Quoted 6 lines
Hi Heiko,
Please use a cover-letter for a patch series. They allow the series to be threaded better and people can reply to the cover-letter with series-wide comments. For example, I'd like to reply to a cover-letter now with
Quoted 6 lines
For the series
Reviewed-by Andrew Jones <[email protected]>but now it looks like I need to go back and reply to each patch separately.
I'm not sure if tooling like b4 can handle Reviewed-by's in cover-letters. At least some time back it couldn't, so am not sure if that was added meanwhile. So tags added to cover-letters might even get lost.
But I'll add a cover-letter nevertheless - need a place for the v2 changelog anyway :-)
Heiko
Quoted 32 lines
Thanks,
drewQuoted 27 lines · Heiko Stuebner
This can also do without the ifdef and use
IS_ENABLEDinstead and for better readability, getting rid of that switch also seems waranted.Signed-off-by Heiko Stuebner <[email protected]>--- arch/riscv/kernel/cpufeature.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-)arch/riscv/kernel/cpufeature.c +1
-7@@ -253,16 +253,13 @@ void __init riscv_fill_hwcap(void)#ifdef CONFIG_RISCV_ALTERNATIVE static bool __init_or_module cpufeature_probe_svpbmt(unsigned int stage) { -#ifdef CONFIG_RISCV_ISA_SVPBMT -switch (stage) { -case RISCV_ALTERNATIVES_EARLY_BOOT : +if (!IS_ENABLED (CONFIG_RISCV_ISA_SVPBMT ))return false; -default : -return riscv_isa_extension_available (NULL ,SVPBMT ); - } -#endif
Quoted 9 lines
arch/riscv/kernel/cpufeature.c void __init riscv_fill_hwcap(void) · line 265
Quoted 8 lines
arch/riscv/kernel/cpufeature.c +4
-1-return false; +if (stage ==RISCV_ALTERNATIVES_EARLY_BOOT ) +return false; + +return riscv_isa_extension_available (NULL ,SVPBMT ); } static bool __init_or_module cpufeature_probe_zicbom(unsigned int stage)
_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv
Quoted 9 lines · Heiko Stübner
EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
Am Freitag, 2. September 2022, 11:49:39 CEST schrieb Andrew Jones:
Quoted 6 lines
Hi Heiko,
Please use a cover-letter for a patch series. They allow the series to be threaded better and people can reply to the cover-letter with series-wide comments. For example, I'd like to reply to a cover-letter now with
Quoted 8 lines
Quoted 6 lines
For the series
Reviewed-by Andrew Jones <[email protected]>but now it looks like I need to go back and reply to each patch separately.
I'm not sure if tooling like b4 can handle Reviewed-by's in cover-letters.
Yup, it can! At least b4 {am,shazam} -t will.
I am not sure if the new b4 trailers does.
Quoted 54 lines
At least some time back it couldn't, so am not sure if that was added meanwhile. So tags added to cover-letters might even get lost.
But I'll add a cover-letter nevertheless - need a place for the v2 changelog anyway :-)
Heiko
Quoted 41 lines
Thanks,
drewQuoted 35 lines · Heiko Stuebner
This can also do without the ifdef and use
IS_ENABLEDinstead and for better readability, getting rid of that switch also seems waranted.Signed-off-by Heiko Stuebner <[email protected]>--- arch/riscv/kernel/cpufeature.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-)arch/riscv/kernel/cpufeature.c +5
-8@@ -253,16 +253,13 @@ void __init riscv_fill_hwcap(void)#ifdef CONFIG_RISCV_ALTERNATIVE static bool __init_or_module cpufeature_probe_svpbmt(unsigned int stage) { -#ifdef CONFIG_RISCV_ISA_SVPBMT -switch (stage) { -case RISCV_ALTERNATIVES_EARLY_BOOT : +if (!IS_ENABLED (CONFIG_RISCV_ISA_SVPBMT ))return false; -default : -return riscv_isa_extension_available (NULL ,SVPBMT ); - } -#endif -return false; +if (stage ==RISCV_ALTERNATIVES_EARLY_BOOT ) +return false; + +return riscv_isa_extension_available (NULL ,SVPBMT ); } static bool __init_or_module cpufeature_probe_zicbom(unsigned int stage)
_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv
Am Freitag, 2. September 2022, 17:26:21 CEST schrieb [email protected]:
Quoted 14 lines · Heiko Stübner
Quoted 13 lines
EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
Am Freitag, 2. September 2022, 11:49:39 CEST schrieb Andrew Jones:
Quoted 10 lines
Hi Heiko,
Please use a cover-letter for a patch series. They allow the series to be threaded better and people can reply to the cover-letter with series-wide comments. For example, I'd like to reply to a cover-letter now with
For the series
Reviewed-by Andrew Jones <[email protected]>
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
but now it looks like I need to go back and reply to each patch separately.
I'm not sure if tooling like b4 can handle Reviewed-by's in cover-letters.
Yup, it can! At least
b4 {am,shazam} -twill.
I am not sure if the newb4 trailersdoes.
That is great to know ... gotta love b4 :-)
Quoted 49 lines
Quoted 49 lines
At least some time back it couldn't, so am not sure if that was added meanwhile. So tags added to cover-letters might even get lost.
But I'll add a cover-letter nevertheless - need a place for the v2 changelog anyway :-)
Heiko
Quoted 39 lines
Thanks,
drewQuoted 34 lines · Heiko Stuebner
This can also do without the ifdef and use
IS_ENABLEDinstead and for better readability, getting rid of that switch also seems waranted.Signed-off-by Heiko Stuebner <[email protected]>--- arch/riscv/kernel/cpufeature.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-)arch/riscv/kernel/cpufeature.c +5
-8@@ -253,16 +253,13 @@ void __init riscv_fill_hwcap(void)#ifdef CONFIG_RISCV_ALTERNATIVE static bool __init_or_module cpufeature_probe_svpbmt(unsigned int stage) { -#ifdef CONFIG_RISCV_ISA_SVPBMT -switch (stage) { -case RISCV_ALTERNATIVES_EARLY_BOOT : +if (!IS_ENABLED (CONFIG_RISCV_ISA_SVPBMT ))return false; -default : -return riscv_isa_extension_available (NULL ,SVPBMT ); - } -#endif -return false; +if (stage ==RISCV_ALTERNATIVES_EARLY_BOOT ) +return false; + +return riscv_isa_extension_available (NULL ,SVPBMT ); }
Quoted 8 lines
Quoted 6 lines
Quoted 2 lines
arch/riscv/kernel/cpufeature.c void __init riscv_fill_hwcap(void) · line 265
Quoted 1 line
arch/riscv/kernel/cpufeature.c +0
-0static bool __init_or_module cpufeature_probe_zicbom(unsigned int stage)
_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv
Quoted 9 lines · On Fri, Sep 02, 2022 at 03:26:21PM +0000, [email protected] wrote:
Quoted 6 lines
Quoted 4 lines
Reviewed-by Andrew Jones <[email protected]>but now it looks like I need to go back and reply to each patch separately.
I'm not sure if tooling like b4 can handle Reviewed-by's in cover-letters.
Yup, it can! At least
b4 {am,shazam} -twill.
I am not sure if the newb4 trailersdoes.
Yes, it's the default behaviour for "b4 trailers". It'll probably become the default for "b4 am/shazam" at some point, too.
-K
Quoted 38 lines · Heiko Stuebner
This can also do without the ifdef and use
IS_ENABLEDinstead and for better readability, getting rid of that switch also seems waranted.Signed-off-by Heiko Stuebner <[email protected]>--- arch/riscv/kernel/cpufeature.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-)arch/riscv/kernel/cpufeature.c +5
-8@@ -253,16 +253,13 @@ void __init riscv_fill_hwcap(void)#ifdef CONFIG_RISCV_ALTERNATIVE static bool __init_or_module cpufeature_probe_svpbmt(unsigned int stage) { -#ifdef CONFIG_RISCV_ISA_SVPBMT -switch (stage) { -case RISCV_ALTERNATIVES_EARLY_BOOT : +if (!IS_ENABLED (CONFIG_RISCV_ISA_SVPBMT ))return false; -default : -return riscv_isa_extension_available (NULL ,SVPBMT ); - } -#endif -return false; +if (stage ==RISCV_ALTERNATIVES_EARLY_BOOT ) +return false; + +return riscv_isa_extension_available (NULL ,SVPBMT ); } static bool __init_or_module cpufeature_probe_zicbom(unsigned int stage)Signature · 1 line
2.35.1
_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv