Comment 1 for bug 1401018

Revision history for this message
Manoj Iyer (manjo) wrote :

By disabling CONFIG_HOTPLUG_CPU for slayton the interfaces 'online' and 'offline' and not exposed in /sys/devices/system/cpu/cpuX/. Therefore we can prevent applications or users trying to offline CPUs.

To enable cpu offline, TI will need to implement this feature in
linux/arch/arm/mach-keystone/ by providing appropriate functions for .cpu_disable, .cpu_die and .cpu_kill.

For example with CONFIG_HOTPLUG_CPU disabled in config we have:

ubuntu@ubuntu:/sys/devices/system/cpu$ tree
.
|-- cpu0
| |-- subsystem -> ../../../../bus/cpu
| |-- topology
| | |-- core_id
| | |-- core_siblings
| | |-- core_siblings_list
| | |-- physical_package_id
| | |-- thread_siblings
| | `-- thread_siblings_list
| `-- uevent
|-- cpu1
| |-- subsystem -> ../../../../bus/cpu
| |-- topology
| | |-- core_id
| | |-- core_siblings
| | |-- core_siblings_list
| | |-- physical_package_id
| | |-- thread_siblings
| | `-- thread_siblings_list
| `-- uevent
|-- cpu2
| |-- subsystem -> ../../../../bus/cpu
| |-- topology
| | |-- core_id
| | |-- core_siblings
| | |-- core_siblings_list
| | |-- physical_package_id
| | |-- thread_siblings
| | `-- thread_siblings_list
| `-- uevent
|-- cpu3
| |-- subsystem -> ../../../../bus/cpu
| |-- topology
| | |-- core_id
| | |-- core_siblings
| | |-- core_siblings_list
| | |-- physical_package_id
| | |-- thread_siblings
| | `-- thread_siblings_list
| `-- uevent
|-- cpuidle
| |-- current_driver
| `-- current_governor_ro
|-- kernel_max
|-- offline
|-- online
|-- possible
|-- present
`-- uevent

setting 0 to /sys/devices/system/cpu/online would produce a message.

root@ubuntu:/home/ubuntu# echo 0 > /sys/devices/system/cpu/online
bash: /sys/devices/system/cpu/online: Permission denied
root@ubuntu:/home/ubuntu#