Skip to content

Commit 05ad699

Browse files
Shrikanth Hegdetyreld
Shrikanth Hegde
authored andcommitted
lparstat: power10: print memory mode correctly
Starting from power10, active memory sharing(AMS) is not supported. So from power10 onwards the H_GET_MPP hcall fails and hence corresponding fields in lparcfg are not populated, such as entitled_memory_pool_number etc. Use gcc builtins and print memory model as dedicated for power10 onwards. Signed-off-by: Shrikanth Hegde <[email protected]> Signed-off-by: Tyrel Datwyler <[email protected]>
1 parent ae2cfe7 commit 05ad699

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/lparstat.c

+5-1
Original file line numberDiff line numberDiff line change
@@ -794,7 +794,11 @@ void get_memory_mode(struct sysentry *se, char *buf)
794794
struct sysentry *tmp;
795795

796796
tmp = get_sysentry("entitled_memory_pool_number");
797-
if (atoi(tmp->value) == 65535)
797+
/*
798+
* from power10 onwards Active Memory Sharing(AMS) is not
799+
* supported. Hence always display it as dedicated for those
800+
*/
801+
if (atoi(tmp->value) == 65535 || __builtin_cpu_supports("arch_3_1"))
798802
sprintf(buf, "Dedicated");
799803
else
800804
sprintf(buf, "Shared");

0 commit comments

Comments
 (0)