-
Notifications
You must be signed in to change notification settings - Fork 617
os/drivers/cpu, apps/system: Add CPU driver interface and test app #7033
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
This PR depends on PR #7028 |
3a55ddb to
220a207
Compare
-need to remove it |
os/drivers/cpu/cpu_driver.c
Outdated
|
|
||
| switch (cmd) { | ||
| case IOC_CPU_ENABLE: | ||
| #if HOTPLUG_MANAGER_IMPLENTED |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
HOTPLUG_MANAGER_IMPLENTED is not defined currently.
once kernel team adds cpu on/off manager, then we will integrate with their exported APIs
38deec1 to
771c4b9
Compare
apps/system/cputest/cputest.c
Outdated
| const char *cpu_states[] = { | ||
| "running", //0 | ||
| "stop", //1 | ||
| }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we will map these cpu states with newly defined scheduler cpu states after kernel team submits patch.
|
LGTM |
771c4b9 to
66f8606
Compare
Add character driver for Secondary CPUs management operations through /dev/cpuX device nodes. Provides ioctl interface for CPU enable/disable and state query operations. This driver enables userspace applications and test utilities to control CPU states and perform cpu on/off operations through standard interface.
…esting Add cputest application with shell commands for testing CPU driver functionality. Provides commands to enable/disable secondary CPUs and check CPU status through device interface. Shell commands added: - cpuctrl on <cpu_id>: Power on specified CPU - cpuctrl off <cpu_id>: Power off specified CPU - cpuctrl status: Show status of all Secondary CPUs - cpuctrl help : Show the help message Test Cases: Default: TASH>smp - smp will run and all threads exit properly TASH>cpuctrl off 1 - CPU1 Power off TASH>cpuctrl on 1 - CPU1 turned back on TASH>smp - smp will run and all threads exit properly
…ration for rtl8730e Add CONFIG_CPU_DRIVER=y and CONFIG_SYSTEM_CPUCONTROL=y to rtl8730e board configurations to enable CPU driver support and CPU control app for CPU management operations.
66f8606 to
3785ca7
Compare
Add Secondary CPUs management interface with character driver interface,
test application and board configuration support.
CPU Driver:
Test Application:
Configuration:
Shell commands added:
Test Cases:
Default:
TASH>smp
-- smp will run and all threads exit properly
TASH>cpuctrl off 1
-- CPU1 Power off
TASH>cpuctrl on 1
-- CPU1 turned back on
TASH>smp
-- smp will run and all threads exit properly