summaryrefslogtreecommitdiff
path: root/kernel/cpu.c
diff options
context:
space:
mode:
authorThierry Strudel <tstrudel@google.com>2016-06-14 17:46:44 -0700
committerMark Salyzyn <salyzyn@google.com>2016-06-21 12:58:10 -0700
commit872e24621a63b75b3b644f6369b04bfb092264b1 (patch)
treea0032276646168fe50c8a33909da005726dd9097 /kernel/cpu.c
parentab4f14dd052ba453558a8913d8d5547abbfc7b88 (diff)
ANDROID: cpu: send KOBJ_ONLINE event when enabling cpus
In case some sysfs nodes needs to be labeled with a different label than sysfs then user needs to be notified when a core is brought back online. Signed-off-by: Thierry Strudel <tstrudel@google.com> Bug: 29359497 Change-Id: I0395c86e01cd49c348fda8f93087d26f88557c91
Diffstat (limited to 'kernel/cpu.c')
-rw-r--r--kernel/cpu.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/kernel/cpu.c b/kernel/cpu.c
index 37731292f8a1..9ced7c751648 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -627,6 +627,7 @@ void __weak arch_enable_nonboot_cpus_end(void)
void enable_nonboot_cpus(void)
{
int cpu, error;
+ struct device *cpu_device;
/* Allow everyone to use the CPU hotplug again */
cpu_maps_update_begin();
@@ -644,6 +645,12 @@ void enable_nonboot_cpus(void)
trace_suspend_resume(TPS("CPU_ON"), cpu, false);
if (!error) {
pr_info("CPU%d is up\n", cpu);
+ cpu_device = get_cpu_device(cpu);
+ if (!cpu_device)
+ pr_err("%s: failed to get cpu%d device\n",
+ __func__, cpu);
+ else
+ kobject_uevent(&cpu_device->kobj, KOBJ_ONLINE);
continue;
}
pr_warn("Error taking CPU%d up: %d\n", cpu, error);