aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/cpu.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/core/cpu.c b/core/cpu.c
index 78565b5..be0e451 100644
--- a/core/cpu.c
+++ b/core/cpu.c
@@ -766,14 +766,24 @@ void cpu_remove_node(const struct cpu_thread *t)
void cpu_disable_all_threads(struct cpu_thread *cpu)
{
unsigned int i;
+ struct dt_property *p;
for (i = 0; i <= cpu_max_pir; i++) {
struct cpu_thread *t = &cpu_stacks[i].cpu;
if (t->primary == cpu->primary)
t->state = cpu_state_disabled;
+
}
+ /* Mark this core as bad so that Linux kernel don't use this CPU. */
+ prlog(PR_DEBUG, "CPU: Mark CPU bad (PIR 0x%04x)...\n", cpu->pir);
+ p = __dt_find_property(cpu->node, "status");
+ if (p)
+ dt_del_property(cpu->node, p);
+
+ dt_add_property_string(cpu->node, "status", "bad");
+
/* XXX Do something to actually stop the core */
}