[tip: sched/core] cpu/hotplug: Allowing to reset fail injection

2021-03-06 Thread tip-bot2 for Vincent Donnefort
The following commit has been merged into the sched/core branch of tip:

Commit-ID: 3ae70c251f344976428d1f6ee61ea7b4e170fec3
Gitweb:
https://git.kernel.org/tip/3ae70c251f344976428d1f6ee61ea7b4e170fec3
Author:Vincent Donnefort 
AuthorDate:Tue, 16 Feb 2021 10:35:04 
Committer: Ingo Molnar 
CommitterDate: Sat, 06 Mar 2021 12:40:22 +01:00

cpu/hotplug: Allowing to reset fail injection

Currently, the only way of resetting the fail injection is to trigger a
hotplug, hotunplug or both. This is rather annoying for testing
and, as the default value for this file is -1, it seems pretty natural to
let a user write it.

Signed-off-by: Vincent Donnefort 
Signed-off-by: Peter Zijlstra (Intel) 
Signed-off-by: Ingo Molnar 
Link: 
https://lkml.kernel.org/r/20210216103506.416286-2-vincent.donnef...@arm.com
---
 kernel/cpu.c | 5 +
 1 file changed, 5 insertions(+)

diff --git a/kernel/cpu.c b/kernel/cpu.c
index 1b6302e..9121edf 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -2207,6 +2207,11 @@ static ssize_t write_cpuhp_fail(struct device *dev,
if (ret)
return ret;
 
+   if (fail == CPUHP_INVALID) {
+   st->fail = fail;
+   return count;
+   }
+
if (fail < CPUHP_OFFLINE || fail > CPUHP_ONLINE)
return -EINVAL;
 


[tip: sched/core] cpu/hotplug: Allowing to reset fail injection

2021-03-02 Thread tip-bot2 for Vincent Donnefort
The following commit has been merged into the sched/core branch of tip:

Commit-ID: e58422d9789d5c61bb039e40e4e10781d8d43ac3
Gitweb:
https://git.kernel.org/tip/e58422d9789d5c61bb039e40e4e10781d8d43ac3
Author:Vincent Donnefort 
AuthorDate:Tue, 16 Feb 2021 10:35:04 
Committer: Peter Zijlstra 
CommitterDate: Mon, 01 Mar 2021 18:17:26 +01:00

cpu/hotplug: Allowing to reset fail injection

Currently, the only way of resetting the fail injection is to trigger a
hotplug, hotunplug or both. This is rather annoying for testing
and, as the default value for this file is -1, it seems pretty natural to
let a user write it.

Signed-off-by: Vincent Donnefort 
Signed-off-by: Peter Zijlstra (Intel) 
Link: 
https://lkml.kernel.org/r/20210216103506.416286-2-vincent.donnef...@arm.com
---
 kernel/cpu.c | 5 +
 1 file changed, 5 insertions(+)

diff --git a/kernel/cpu.c b/kernel/cpu.c
index 1b6302e..9121edf 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -2207,6 +2207,11 @@ static ssize_t write_cpuhp_fail(struct device *dev,
if (ret)
return ret;
 
+   if (fail == CPUHP_INVALID) {
+   st->fail = fail;
+   return count;
+   }
+
if (fail < CPUHP_OFFLINE || fail > CPUHP_ONLINE)
return -EINVAL;
 


[tip: sched/core] cpu/hotplug: Allowing to reset fail injection

2021-03-03 Thread tip-bot2 for Vincent Donnefort
The following commit has been merged into the sched/core branch of tip:

Commit-ID: 6d06c515e9151dc858e391bd6bebce0b684eec4f
Gitweb:
https://git.kernel.org/tip/6d06c515e9151dc858e391bd6bebce0b684eec4f
Author:Vincent Donnefort 
AuthorDate:Tue, 16 Feb 2021 10:35:04 
Committer: Peter Zijlstra 
CommitterDate: Wed, 03 Mar 2021 10:33:00 +01:00

cpu/hotplug: Allowing to reset fail injection

Currently, the only way of resetting the fail injection is to trigger a
hotplug, hotunplug or both. This is rather annoying for testing
and, as the default value for this file is -1, it seems pretty natural to
let a user write it.

Signed-off-by: Vincent Donnefort 
Signed-off-by: Peter Zijlstra (Intel) 
Link: 
https://lkml.kernel.org/r/20210216103506.416286-2-vincent.donnef...@arm.com
---
 kernel/cpu.c | 5 +
 1 file changed, 5 insertions(+)

diff --git a/kernel/cpu.c b/kernel/cpu.c
index 1b6302e..9121edf 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -2207,6 +2207,11 @@ static ssize_t write_cpuhp_fail(struct device *dev,
if (ret)
return ret;
 
+   if (fail == CPUHP_INVALID) {
+   st->fail = fail;
+   return count;
+   }
+
if (fail < CPUHP_OFFLINE || fail > CPUHP_ONLINE)
return -EINVAL;