sysfs: add missing symlinks for cpu/node

Add the following patterns of symlinks:
 - /sys/bus/cpu/drivers/processor/cpu*
 - /sys/bus/node/devices/node*

And slightly change how /sys/devices/system/cpu/cpu*/node* are created
to avoid duplicate lookups

Change-Id: Id94a4d157da06d75f6bd450d5bd9a9e7709a1414
This commit is contained in:
Dominique Martinet
2019-01-23 12:40:39 +09:00
committed by Masamichi Takagi
parent 3738b70ad3
commit f9d8d98af1
2 changed files with 30 additions and 32 deletions

View File

@ -258,6 +258,12 @@ cpu_sysfs_setup(void)
if (error) {
panic("cpu_sysfs_setup:sysfs_symlinkf failed\n");
}
error = sysfs_symlinkf(targeth, "/sys/bus/cpu/drivers/processor/cpu%d",
cpu);
if (error) {
panic("cpu_sysfs_setup:sysfs_symlinkf failed\n");
}
}
return;