From: Nathan F. <nf...@au...> - 2009-09-02 21:22:14
|
The ppc64_cpu command needs to properly turn off the smt snooze delay. The current code does not handle the option 'off', it should as this is regarded as a delay of -1. Signed-off-by:Nathan Fontenot <nf...@au...> -- Index: powerpc-utils/src/ppc64_cpu.c =================================================================== --- powerpc-utils.orig/src/ppc64_cpu.c 2009-09-02 18:39:30.000000000 -0500 +++ powerpc-utils/src/ppc64_cpu.c 2009-09-02 18:47:59.000000000 -0500 @@ -308,8 +308,16 @@ printf("Inconsistent smt_snooze_delay\n"); else printf("smt_snooze_delay is %d\n", ssd); - } else - rc = set_system_attribute("smt_snooze_delay", strtol(state, NULL, 0)); + } else { + int delay; + + if (!strcmp(state, "off")) + delay = -1; + else + delay = strtol(state, NULL, 0); + + rc = set_system_attribute("smt_snooze_delay", delay); + } return rc; } |