arm64: Clarify when cpu_enable() is called
PATCH v2 1/1 arm64: Clarify when cpu_enable() is called
Strengthen the wording in the documentation for cpu_enable() to make it more obvious to readers not already familiar with the code when the core will call this callback and that this is intentional.
---
v2: Much more verbose wording from Suzuki.
arch/arm64/include/asm/cpufeature.h | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-)
arch/arm64/include/asm/cpufeature.h +11 -3
@@ -289,9 +289,17 @@ struct arm64_cpu_capabilities {u16 type;bool (*matches)(const struct arm64_cpu_capabilities *caps,int scope);/* -* Take the appropriate actions to enable this capability for this CPU. -* For each successfully booted CPU, this method is called for each -* globally detected capability. +* Take the appropriate actions to configure this capability +* for this CPU. If the capability is detected by the kernel +* this will be called on all the CPUs in the system, +* including the hotplugged CPUs, regardless of if the +* capability was *available* on that specific CPU. This is +* useful for some capabilities (e.g, working around CPU +* errata), where all the CPUs must take some action (e.g, +* changing system control/configuration). Thus, if an action +* is required only if the CPU has the capability then the +* routine must check it before taking any action. +*/ void (*cpu_enable)(const struct arm64_cpu_capabilities *cap);union {
Signature · 7 lines
2.20.1 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Quoted 4 lines · Mark Brown
Strengthen the wording in the documentation for
cpu_enable()to make it more obvious to readers not already familiar with the code when the core will call this callback and that this is intentional.
Looks good to me, except for some minor space related issues below.
Quoted 13 lines
Signed-off-by Mark Brown <[email protected]>---
v2: Much more verbose wording from Suzuki.
arch/arm64/include/asm/cpufeature.h | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-)arch/arm64/include/asm/cpufeature.h +0
-0
arch/arm64/include/asm/cpufeature.h struct arm64_cpu_capabilities { · line 293
Quoted 8 lines
arch/arm64/include/asm/cpufeature.h +2
-3@@ -289,9 +289,17 @@ struct arm64_cpu_capabilities {u16 type;bool (*matches)(const struct arm64_cpu_capabilities *caps,int scope);/* -* Take the appropriate actions to enable this capability for this CPU. -* For each successfully booted CPU, this method is called for each -* globally detected capability. +* Take the appropriate actions to configure this capability +* for this CPU. If the capability is detected by the kernel
minor nit: double space ^^
arch/arm64/include/asm/cpufeature.h struct arm64_cpu_capabilities { · line 299
Quoted 6 lines
arch/arm64/include/asm/cpufeature.h +6
-0+* this will be called on all the CPUs in the system, +* including the hotplugged CPUs, regardless of if the +* capability was *available* on that specific CPU. This is +* useful for some capabilities (e.g, working around CPU +* errata), where all the CPUs must take some action (e.g, +* changing system control/configuration). Thus, if an action
and here before "Thus".
arch/arm64/include/asm/cpufeature.h struct arm64_cpu_capabilities { · line 302
Quoted 3 lines
arch/arm64/include/asm/cpufeature.h +3
-0+* is required only if the CPU has the capability then the +* routine must check it before taking any action. +
spurious new line ?
arch/arm64/include/asm/cpufeature.h struct arm64_cpu_capabilities { · line 305
Quoted 4 lines
arch/arm64/include/asm/cpufeature.h +0
-0*/ void (*cpu_enable)(const struct arm64_cpu_capabilities *cap);union {
With the above addressed,
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel