Re: [PATCH v3 09/22] arm64: capabilities: Split the processing of errata work arounds

2018-03-08 Thread Suzuki K Poulose

On 09/02/18 18:18, Dave Martin wrote:

On Fri, Feb 09, 2018 at 05:54:48PM +, Suzuki K Poulose wrote:

Right now we run through the errata workarounds check on all boot
active CPUs, with SCOPE_ALL. This doesn't help with detecting the
errata's with a SYSTEM_SCOPE. While nobody uses it, let us clean
this up in preparation for merging capability handling.


errata; and SCOPE_SYSTEM (if I'm being pedantic)

To make it clearer this this is adding support for new behaviour rather
than changing old behaviour, perhaps change "This doesn't help ...
While nobody uses it ..." to something like:

"This wouldn't help for detecting erratum workarounds with SCOPE_SYSTEM.
There are none yet, but we plan to introduce some: let us clean this up
so that such workarounds can be detected and enabled correctly."


Fixed



So, we run the checks with SCOPE_LOCAL_CPU on all CPUs and SCOPE_SYSTEM
checks are run only once after all the boot time CPUs are active.

Cc: Dave Martin 
Signed-off-by: Suzuki K Poulose 


Otherwise,

Reviewed-by: Dave Martin 


Thanks
Suzuki


Re: [PATCH v3 09/22] arm64: capabilities: Split the processing of errata work arounds

2018-03-08 Thread Suzuki K Poulose

On 09/02/18 18:18, Dave Martin wrote:

On Fri, Feb 09, 2018 at 05:54:48PM +, Suzuki K Poulose wrote:

Right now we run through the errata workarounds check on all boot
active CPUs, with SCOPE_ALL. This doesn't help with detecting the
errata's with a SYSTEM_SCOPE. While nobody uses it, let us clean
this up in preparation for merging capability handling.


errata; and SCOPE_SYSTEM (if I'm being pedantic)

To make it clearer this this is adding support for new behaviour rather
than changing old behaviour, perhaps change "This doesn't help ...
While nobody uses it ..." to something like:

"This wouldn't help for detecting erratum workarounds with SCOPE_SYSTEM.
There are none yet, but we plan to introduce some: let us clean this up
so that such workarounds can be detected and enabled correctly."


Fixed



So, we run the checks with SCOPE_LOCAL_CPU on all CPUs and SCOPE_SYSTEM
checks are run only once after all the boot time CPUs are active.

Cc: Dave Martin 
Signed-off-by: Suzuki K Poulose 


Otherwise,

Reviewed-by: Dave Martin 


Thanks
Suzuki


Re: [PATCH v3 09/22] arm64: capabilities: Split the processing of errata work arounds

2018-02-09 Thread Dave Martin
On Fri, Feb 09, 2018 at 05:54:48PM +, Suzuki K Poulose wrote:
> Right now we run through the errata workarounds check on all boot
> active CPUs, with SCOPE_ALL. This doesn't help with detecting the
> errata's with a SYSTEM_SCOPE. While nobody uses it, let us clean
> this up in preparation for merging capability handling.

errata; and SCOPE_SYSTEM (if I'm being pedantic)

To make it clearer this this is adding support for new behaviour rather
than changing old behaviour, perhaps change "This doesn't help ...
While nobody uses it ..." to something like:

"This wouldn't help for detecting erratum workarounds with SCOPE_SYSTEM.
There are none yet, but we plan to introduce some: let us clean this up
so that such workarounds can be detected and enabled correctly."

> 
> So, we run the checks with SCOPE_LOCAL_CPU on all CPUs and SCOPE_SYSTEM
> checks are run only once after all the boot time CPUs are active.
> 
> Cc: Dave Martin 
> Signed-off-by: Suzuki K Poulose 

Otherwise,

Reviewed-by: Dave Martin 

> ---
>  arch/arm64/kernel/cpufeature.c | 6 --
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm64/kernel/cpufeature.c b/arch/arm64/kernel/cpufeature.c
> index 9f52678a4df1..a6e124063e21 100644
> --- a/arch/arm64/kernel/cpufeature.c
> +++ b/arch/arm64/kernel/cpufeature.c
> @@ -554,7 +554,7 @@ void __init init_cpu_features(struct cpuinfo_arm64 *info)
>* Run the errata work around checks on the boot CPU, once we have
>* initialised the cpu feature infrastructure.
>*/
> - update_cpu_capabilities(arm64_errata, SCOPE_ALL,
> + update_cpu_capabilities(arm64_errata, SCOPE_LOCAL_CPU,
>   "enabling workaround for");
>  }
>  
> @@ -1416,7 +1416,7 @@ void check_local_cpu_capabilities(void)
>* advertised capabilities.
>*/
>   if (!sys_caps_initialised)
> - update_cpu_capabilities(arm64_errata, SCOPE_ALL,
> + update_cpu_capabilities(arm64_errata, SCOPE_LOCAL_CPU,
>   "enabling workaround for");
>   else
>   verify_local_cpu_capabilities();
> @@ -1446,6 +1446,8 @@ void __init setup_cpu_features(void)
>   /* Set the CPU feature capabilies */
>   update_cpu_capabilities(arm64_features, SCOPE_ALL,
>   "detected feature:");
> + update_cpu_capabilities(arm64_errata, SCOPE_SYSTEM,
> + "enabling workaround for");
>   enable_cpu_capabilities(arm64_features, SCOPE_ALL);
>   enable_cpu_capabilities(arm64_errata, SCOPE_ALL);
>   mark_const_caps_ready();
> -- 
> 2.14.3
> 
> 
> ___
> linux-arm-kernel mailing list
> linux-arm-ker...@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel


Re: [PATCH v3 09/22] arm64: capabilities: Split the processing of errata work arounds

2018-02-09 Thread Dave Martin
On Fri, Feb 09, 2018 at 05:54:48PM +, Suzuki K Poulose wrote:
> Right now we run through the errata workarounds check on all boot
> active CPUs, with SCOPE_ALL. This doesn't help with detecting the
> errata's with a SYSTEM_SCOPE. While nobody uses it, let us clean
> this up in preparation for merging capability handling.

errata; and SCOPE_SYSTEM (if I'm being pedantic)

To make it clearer this this is adding support for new behaviour rather
than changing old behaviour, perhaps change "This doesn't help ...
While nobody uses it ..." to something like:

"This wouldn't help for detecting erratum workarounds with SCOPE_SYSTEM.
There are none yet, but we plan to introduce some: let us clean this up
so that such workarounds can be detected and enabled correctly."

> 
> So, we run the checks with SCOPE_LOCAL_CPU on all CPUs and SCOPE_SYSTEM
> checks are run only once after all the boot time CPUs are active.
> 
> Cc: Dave Martin 
> Signed-off-by: Suzuki K Poulose 

Otherwise,

Reviewed-by: Dave Martin 

> ---
>  arch/arm64/kernel/cpufeature.c | 6 --
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm64/kernel/cpufeature.c b/arch/arm64/kernel/cpufeature.c
> index 9f52678a4df1..a6e124063e21 100644
> --- a/arch/arm64/kernel/cpufeature.c
> +++ b/arch/arm64/kernel/cpufeature.c
> @@ -554,7 +554,7 @@ void __init init_cpu_features(struct cpuinfo_arm64 *info)
>* Run the errata work around checks on the boot CPU, once we have
>* initialised the cpu feature infrastructure.
>*/
> - update_cpu_capabilities(arm64_errata, SCOPE_ALL,
> + update_cpu_capabilities(arm64_errata, SCOPE_LOCAL_CPU,
>   "enabling workaround for");
>  }
>  
> @@ -1416,7 +1416,7 @@ void check_local_cpu_capabilities(void)
>* advertised capabilities.
>*/
>   if (!sys_caps_initialised)
> - update_cpu_capabilities(arm64_errata, SCOPE_ALL,
> + update_cpu_capabilities(arm64_errata, SCOPE_LOCAL_CPU,
>   "enabling workaround for");
>   else
>   verify_local_cpu_capabilities();
> @@ -1446,6 +1446,8 @@ void __init setup_cpu_features(void)
>   /* Set the CPU feature capabilies */
>   update_cpu_capabilities(arm64_features, SCOPE_ALL,
>   "detected feature:");
> + update_cpu_capabilities(arm64_errata, SCOPE_SYSTEM,
> + "enabling workaround for");
>   enable_cpu_capabilities(arm64_features, SCOPE_ALL);
>   enable_cpu_capabilities(arm64_errata, SCOPE_ALL);
>   mark_const_caps_ready();
> -- 
> 2.14.3
> 
> 
> ___
> linux-arm-kernel mailing list
> linux-arm-ker...@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel


[PATCH v3 09/22] arm64: capabilities: Split the processing of errata work arounds

2018-02-09 Thread Suzuki K Poulose
Right now we run through the errata workarounds check on all boot
active CPUs, with SCOPE_ALL. This doesn't help with detecting the
errata's with a SYSTEM_SCOPE. While nobody uses it, let us clean
this up in preparation for merging capability handling.

So, we run the checks with SCOPE_LOCAL_CPU on all CPUs and SCOPE_SYSTEM
checks are run only once after all the boot time CPUs are active.

Cc: Dave Martin 
Signed-off-by: Suzuki K Poulose 
---
 arch/arm64/kernel/cpufeature.c | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/kernel/cpufeature.c b/arch/arm64/kernel/cpufeature.c
index 9f52678a4df1..a6e124063e21 100644
--- a/arch/arm64/kernel/cpufeature.c
+++ b/arch/arm64/kernel/cpufeature.c
@@ -554,7 +554,7 @@ void __init init_cpu_features(struct cpuinfo_arm64 *info)
 * Run the errata work around checks on the boot CPU, once we have
 * initialised the cpu feature infrastructure.
 */
-   update_cpu_capabilities(arm64_errata, SCOPE_ALL,
+   update_cpu_capabilities(arm64_errata, SCOPE_LOCAL_CPU,
"enabling workaround for");
 }
 
@@ -1416,7 +1416,7 @@ void check_local_cpu_capabilities(void)
 * advertised capabilities.
 */
if (!sys_caps_initialised)
-   update_cpu_capabilities(arm64_errata, SCOPE_ALL,
+   update_cpu_capabilities(arm64_errata, SCOPE_LOCAL_CPU,
"enabling workaround for");
else
verify_local_cpu_capabilities();
@@ -1446,6 +1446,8 @@ void __init setup_cpu_features(void)
/* Set the CPU feature capabilies */
update_cpu_capabilities(arm64_features, SCOPE_ALL,
"detected feature:");
+   update_cpu_capabilities(arm64_errata, SCOPE_SYSTEM,
+   "enabling workaround for");
enable_cpu_capabilities(arm64_features, SCOPE_ALL);
enable_cpu_capabilities(arm64_errata, SCOPE_ALL);
mark_const_caps_ready();
-- 
2.14.3



[PATCH v3 09/22] arm64: capabilities: Split the processing of errata work arounds

2018-02-09 Thread Suzuki K Poulose
Right now we run through the errata workarounds check on all boot
active CPUs, with SCOPE_ALL. This doesn't help with detecting the
errata's with a SYSTEM_SCOPE. While nobody uses it, let us clean
this up in preparation for merging capability handling.

So, we run the checks with SCOPE_LOCAL_CPU on all CPUs and SCOPE_SYSTEM
checks are run only once after all the boot time CPUs are active.

Cc: Dave Martin 
Signed-off-by: Suzuki K Poulose 
---
 arch/arm64/kernel/cpufeature.c | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/kernel/cpufeature.c b/arch/arm64/kernel/cpufeature.c
index 9f52678a4df1..a6e124063e21 100644
--- a/arch/arm64/kernel/cpufeature.c
+++ b/arch/arm64/kernel/cpufeature.c
@@ -554,7 +554,7 @@ void __init init_cpu_features(struct cpuinfo_arm64 *info)
 * Run the errata work around checks on the boot CPU, once we have
 * initialised the cpu feature infrastructure.
 */
-   update_cpu_capabilities(arm64_errata, SCOPE_ALL,
+   update_cpu_capabilities(arm64_errata, SCOPE_LOCAL_CPU,
"enabling workaround for");
 }
 
@@ -1416,7 +1416,7 @@ void check_local_cpu_capabilities(void)
 * advertised capabilities.
 */
if (!sys_caps_initialised)
-   update_cpu_capabilities(arm64_errata, SCOPE_ALL,
+   update_cpu_capabilities(arm64_errata, SCOPE_LOCAL_CPU,
"enabling workaround for");
else
verify_local_cpu_capabilities();
@@ -1446,6 +1446,8 @@ void __init setup_cpu_features(void)
/* Set the CPU feature capabilies */
update_cpu_capabilities(arm64_features, SCOPE_ALL,
"detected feature:");
+   update_cpu_capabilities(arm64_errata, SCOPE_SYSTEM,
+   "enabling workaround for");
enable_cpu_capabilities(arm64_features, SCOPE_ALL);
enable_cpu_capabilities(arm64_errata, SCOPE_ALL);
mark_const_caps_ready();
-- 
2.14.3