[Skiboot-stable] [PATCH] occ: Fix false negatives in wait_for_all_occ_init()

Oliver O'Halloran oohall at gmail.com
Fri Jun 5 17:00:55 AEST 2020


On Tue, May 26, 2020 at 5:23 PM Gautham R. Shenoy
<ego at linux.vnet.ibm.com> wrote:
>
> From: "Gautham R. Shenoy" <ego at linux.vnet.ibm.com>
>
> Currently the wait_for_all_occ_init() function determines that the
> OCCs associated with every Chip has been initialized by verifying if
> the "Valid" bit in pstate table of that OCC is set.
>
> However, on chips where all the EX units are guarded, the OCC, even
> though it is active, does not update the pstate_table. Currently as a
> result of this, OPAL concludes that the OCC is not functional and not
> only disable Pstate initialization, but incorrectly report that that
> OCCs were not initialized, thereby cutting other features such as
> sensors.
>
> Fix this by ensuring that
>
>    * We check if there is atleast one active EX unit in the chip
>      before checking if the OCC is active.
>
>    * On platforms with OCC-OPAL communication interface version 0x90
>
>         * wait_for_all_occ_init() only checks if the occ_state in the
>           OCC dynamic area is set to "Active State".
>
>         * move the "Valid" bit check to add_cpu_pstate_properties(),
>           which is where we create the device-tree entries for
>           frequency scaling.
>
> Cc: Vaidyanathan Srinivasan <svaidy at linux.vnet.ibm.com>
> Tested-by: Pavaman Subramaniyam <pavsubra at in.ibm.com>
> Signed-off-by: Gautham R. Shenoy <ego at linux.vnet.ibm.com>
> ---
>  core/cpu.c     |   6 +-
>  hw/occ.c       | 177 +++++++++++++++++++++++++++++++++++++++++++++++----------
>  include/chip.h |   3 +
>  3 files changed, 154 insertions(+), 32 deletions(-)

Thanks merged as ec3c45f3889cd5f7615db5615dd6824abe32f759


More information about the Skiboot-stable mailing list