LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-03-2022, 04:29 AM   #1
zupazt3
LQ Newbie
 
Registered: Jan 2022
Posts: 2

Rep: Reputation: Disabled
How to disable hot-pluggable CPU on ARM?


I have an ARM64 Cortex-A72 board running Linux 5.4.47. I want to check if the CPU hot-plugging is working correctly (it's needed for one project I want to use).

Kernel has CONFIG_HOTPLUG_CPU enabled, but I don't have /sys/devices/system/cpu/cpuX/online for any CPU - and I don't know how I could turn off a CPU.

Code:
/sys/devices/system/cpu]# ls -l
total 0
-r--r--r--    1 root     root        4.0K Jan  1 00:00 consumers
drwxr-xr-x    7 root     root           0 Jan  1 00:00 cpu0
drwxr-xr-x    7 root     root           0 Jan  1 00:00 cpu1
drwxr-xr-x    7 root     root           0 Jan  1 00:00 cpu2
drwxr-xr-x    7 root     root           0 Jan  1 00:00 cpu3
drwxr-xr-x    2 root     root           0 Jan  1 00:00 cpuidle
drwxr-xr-x    2 root     root           0 Jan  1 00:00 hotplug
-r--r--r--    1 root     root        4.0K Jan  1 00:00 isolated
-r--r--r--    1 root     root        4.0K Jan  1 00:00 kernel_max
-r--r--r--    1 root     root        4.0K Jan  1 00:00 modalias
-r--r--r--    1 root     root        4.0K Jan  1 00:00 nohz_full
-r--r--r--    1 root     root        4.0K Jan  1 00:13 offline
-r--r--r--    1 root     root        4.0K Jan  1 00:00 online
-r--r--r--    1 root     root        4.0K Jan  1 00:00 possible
drwxr-xr-x    2 root     root           0 Jan  1 00:00 power
-r--r--r--    1 root     root        4.0K Jan  1 00:00 present
drwxr-xr-x    2 root     root           0 Jan  1 00:00 smt
-r--r--r--    1 root     root        4.0K Jan  1 00:00 suppliers
-rw-r--r--    1 root     root        4.0K Jan  1 00:00 uevent
drwxr-xr-x    2 root     root           0 Jan  1 00:00 vulnerabilities
Code:
/sys/devices/system/cpu/cpu2]# ls -l
total 0
drwxr-xr-x    5 root     root           0 Jan  1 00:07 cache
-r--r--r--    1 root     root        4.0K Jan  1 00:06 consumers
-r--r--r--    1 root     root        4.0K Jan  1 00:06 cpu_capacity
-r--------    1 root     root        4.0K Jan  1 00:06 crash_notes
-r--------    1 root     root        4.0K Jan  1 00:06 crash_notes_size
drwxr-xr-x    2 root     root           0 Jan  1 00:06 hotplug
lrwxrwxrwx    1 root     root           0 Jan  1 00:06 node0 -> ../../node/node0
lrwxrwxrwx    1 root     root           0 Jan  1 00:06 of_node -> ../../../../firmware/devicetree/base/cpus/cpu@2
drwxr-xr-x    2 root     root           0 Jan  1 00:06 power
drwxr-xr-x    3 root     root           0 Jan  1 00:12 regs
lrwxrwxrwx    1 root     root           0 Jan  1 00:06 subsystem -> ../../../../bus/cpu
-r--r--r--    1 root     root        4.0K Jan  1 00:06 suppliers
drwxr-xr-x    2 root     root           0 Jan  1 00:03 topology
-rw-r--r--    1 root     root        4.0K Jan  1 00:06 uevent
The hotplug contains files target, state and fail. The power contains runtime_active_time, pm_qos_resume_latency_us, runtime_status, autosuspend_delay_ms, runtime_suspended_time and control.
 
Old 01-06-2022, 08:56 AM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,140

Rep: Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263
Hot-plug CPU architectures I've worked on shut off power to the CPU plug-in card and hardware returns -1 to all reads.
 
Old 01-09-2022, 04:32 PM   #3
zupazt3
LQ Newbie
 
Registered: Jan 2022
Posts: 2

Original Poster
Rep: Reputation: Disabled
Thanks @smallpond for the response, but what I'm trying to do is to be able control CPU on/off.

It should be done via writing "0" or "1" to a file called "online" - but I don't have one in my file system.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Are USB flashdrives hot pluggable in Linux? tzonkov Linux - Hardware 7 01-25-2016 01:23 PM
How to disable CPU hot-pluggable feature? icoming Linux - General 2 11-09-2012 09:59 AM
LXer: Pluggable Schedulers vs. Pluggable Security LXer Syndicated Linux News 0 10-03-2007 11:40 PM
Can I turn off a non-hot pluggable drive? ayteebee Linux - Hardware 2 12-08-2006 04:51 PM
'Support for hot-pluggable devices' option not available in 2.6 kernel shadowsnipes Linux - General 3 10-24-2005 10:06 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:25 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration