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
This commit is contained in:
parent
75ceade08f
commit
ded18f7a0f
1 changed files with 7 additions and 0 deletions
|
@ -1228,6 +1228,7 @@ void __weak arch_enable_nonboot_cpus_end(void)
|
||||||
void enable_nonboot_cpus(void)
|
void enable_nonboot_cpus(void)
|
||||||
{
|
{
|
||||||
int cpu, error;
|
int cpu, error;
|
||||||
|
struct device *cpu_device;
|
||||||
|
|
||||||
/* Allow everyone to use the CPU hotplug again */
|
/* Allow everyone to use the CPU hotplug again */
|
||||||
cpu_maps_update_begin();
|
cpu_maps_update_begin();
|
||||||
|
@ -1245,6 +1246,12 @@ void enable_nonboot_cpus(void)
|
||||||
trace_suspend_resume(TPS("CPU_ON"), cpu, false);
|
trace_suspend_resume(TPS("CPU_ON"), cpu, false);
|
||||||
if (!error) {
|
if (!error) {
|
||||||
pr_info("CPU%d is up\n", cpu);
|
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;
|
continue;
|
||||||
}
|
}
|
||||||
pr_warn("Error taking CPU%d up: %d\n", cpu, error);
|
pr_warn("Error taking CPU%d up: %d\n", cpu, error);
|
||||||
|
|
Loading…
Reference in a new issue