[PATCH] lparstat: Rename getter for processor type

22 views
Skip to first unread message

Shrikanth Hegde

<sshegde@linux.ibm.com>
unread,
Apr 15, 2024, 1:51:59 PM4/15/24
to tyreld@linux.ibm.com, powerpc-utils-devel@googlegroups.com, sshegde@linux.ibm.com, naveen.n.rao@linux.ibm.com, nathanl@linux.ibm.com
Processor type in lparstat shows whether its in Dedicated Mode
or in Shared Mode. Getter function for the same has been defined
as get_smt_state. That's a wrong name for it.
Rename it so it doesn't confuse with get_smt_mode.

No Function change.

Signed-off-by: Shrikanth Hegde <ssh...@linux.ibm.com>
---
src/lparstat.c | 2 +-
src/lparstat.h | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/lparstat.c b/src/lparstat.c
index 3f93b37..3879134 100644
--- a/src/lparstat.c
+++ b/src/lparstat.c
@@ -680,7 +680,7 @@ int parse_proc_stat()
return 0;
}

-void get_smt_state(struct sysentry *se, char *buf)
+void get_processor_type(struct sysentry *se, char *buf)
{
char *value = "?";

diff --git a/src/lparstat.h b/src/lparstat.h
index 86e45e4..4260e1e 100644
--- a/src/lparstat.h
+++ b/src/lparstat.h
@@ -45,7 +45,7 @@ struct cpu_sysfs_file_desc {
};
typedef struct cpu_sysfs_file_desc cpu_sysfs_fd;

-extern void get_smt_state(struct sysentry *, char *);
+extern void get_processor_type(struct sysentry *, char *);
extern void get_capped_mode(struct sysentry *, char *);
extern void get_dedicated_mode(struct sysentry *, char *);
extern void get_memory_mode(struct sysentry *, char *);
@@ -156,7 +156,7 @@ struct sysentry system_data[] = {
.descr = "Maximum Virtual CPUs"},
{.name = "shared_processor_mode",
.descr = "Type",
- .get = &get_smt_state},
+ .get = &get_processor_type},
{.name = "slb_size",
.descr = "SLB Entries"},
{.name = "MinMem",
--
2.39.3

Tyrel Datwyler

<tyreld@linux.ibm.com>
unread,
Jul 26, 2024, 7:04:45 PM7/26/24
to Shrikanth Hegde, powerpc-utils-devel@googlegroups.com, naveen.n.rao@linux.ibm.com, nathanl@linux.ibm.com
On 4/15/24 10:51, Shrikanth Hegde wrote:
> Processor type in lparstat shows whether its in Dedicated Mode
> or in Shared Mode. Getter function for the same has been defined
> as get_smt_state. That's a wrong name for it.
> Rename it so it doesn't confuse with get_smt_mode.
>
> No Function change.
>
> Signed-off-by: Shrikanth Hegde <ssh...@linux.ibm.com>
> ---

Patch applied to powerpc-utils/next branch.

https://github.com/ibm-power-utilities/powerpc-utils/commit/a67eb56089ede9abc19ccc287bd4117967e76164

Thanks,
-Tyrel

Reply all
Reply to author
Forward
0 new messages