From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751470AbdE3JLf (ORCPT ); Tue, 30 May 2017 05:11:35 -0400 Received: from ozlabs.org ([103.22.144.67]:52035 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751269AbdE3JLc (ORCPT ); Tue, 30 May 2017 05:11:32 -0400 X-powerpc-patch-notification: thanks X-powerpc-patch-commit: 5f221c3ca13dceaea8eefe21dbd85da91ed9b1e8 In-Reply-To: To: "Gautham R. Shenoy" , Nicholas Piggin , Michael Neuling , Vaidyanathan Srinivasan , Shilpasri G Bhat , Akshay Adiga , Benjamin Herrenschmidt From: Michael Ellerman Cc: "Gautham R. Shenoy" , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: Re: [1/6] powernv:idle: Correctly initialize core_idle_state_ptr Message-Id: <3wcSXF0gdMz9s0Z@ozlabs.org> Date: Tue, 30 May 2017 19:11:24 +1000 (AEST) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2017-05-16 at 08:49:43 UTC, "Gautham R. Shenoy" wrote: > From: "Gautham R. Shenoy" > > The lower 8 bits of core_idle_state_ptr tracks the number of non-idle > threads in the core. This is supposed to be initialized to bit-map > corresponding to the threads_per_core. However, currently it is > initialized to PNV_CORE_IDLE_THREAD_BITS (0xFF). This is correct for > POWER8 which has 8 threads per core, but not for POWER9 which has 4 > threads per core. > > As a result, on POWER9, core_idle_state_ptr gets initialized to > 0xFF. In case when all the threads of the core are idle, the bits > corresponding tracking the idle-threads are non-zero. As a result, the > idle entry/exit code fails to save/restore per-core hypervisor state > since it assumes that there are threads in the cores which are still > active. > > Fix this by correctly initializing the lower bits of the > core_idle_state_ptr on the basis of threads_per_core. > > Signed-off-by: Gautham R. Shenoy Series applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/5f221c3ca13dceaea8eefe21dbd85d cheers