[Skiboot] [PATCH] SLW: Provide cpuidle state description in device tree
Stewart Smith
stewart at linux.vnet.ibm.com
Tue May 29 11:33:46 AEST 2018
Abhishek Goel <huntbag at linux.vnet.ibm.com> writes:
> This patch adds description for every cpuidle state and expose it
> through device tree. Up until now, name was being used for description
> as no description was provided for cpuidle states.
> The description for idle states in case of POWER can be printed
> using "cpupower monitor -l" or "cpupower idle-info".
Nice!
Are you able to update the device tree binding documentation in doc/ as
well?
> diff --git a/hw/slw.c b/hw/slw.c
> index 49bcd839..b0f6955e 100644
> --- a/hw/slw.c
> +++ b/hw/slw.c
> @@ -414,8 +414,10 @@ static bool idle_prepare_core(struct proc_chip *chip, struct cpu_thread *c)
>
> /* Define device-tree fields */
> #define MAX_NAME_LEN 16
> +#define MAX_DESC_LEN 60
> struct cpu_idle_states {
> char name[MAX_NAME_LEN];
> + char desc[MAX_DESC_LEN];
> u32 latency_ns;
> u32 residency_ns;
> /*
I'm starting to think we should just calculate it and allocate only what
we need? Perhaps I'm being overly memory conservative though :)
--
Stewart Smith
OPAL Architect, IBM.
More information about the Skiboot
mailing list