Received: by 10.223.185.116 with SMTP id b49csp6549905wrg; Wed, 28 Feb 2018 11:21:08 -0800 (PST) X-Google-Smtp-Source: AH8x226R69oY413Pd3IUmSPfEqX90xqAoyHQkaiDMeBX81iRUBRB862v9+DjGglEj8LdXy0KLwQd X-Received: by 10.101.97.72 with SMTP id o8mr15316157pgv.119.1519845667969; Wed, 28 Feb 2018 11:21:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519845667; cv=none; d=google.com; s=arc-20160816; b=lTh0OY90WGk8cksTmY2ifX2rvEHixPwEnuoREsRIFPDoaIcz6NRxxYddHiMC3pSPJq j6/4N51BmmDZPmC8ZsrKxNvwhlBGvapx1LRti7fSVpNmNtpgGddcgKNqnQ/yn04CAi9z lEd5l1Bp6FUuLRPQUTg67h5GAMhsNJVKaYK1553EEY2Ms4SbAAqnght0WMaMElblC1la 5XoVY//CSFaWj7dqZqs6rhFoD/VYioFfeowRMGmOCTne9W53TQn7T1lKpnk+JZnHbMmq ThD0DIiHe6kR/Vza/XAln9dfZXpom6uOowzU9jyAPDGBb4oHj8qExoMu0CMyuC1ubZg3 2chw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:user-agent:in-reply-to :content-disposition:mime-version:references:subject:cc:to:from:date :arc-authentication-results; bh=gjwjoOPCb/AvC09OFQdQQNzY50b8IrhdRKXKzIyIKCE=; b=tuUZdeL/0eePYRF49vzJyaibPsvKYLqw9UxDLNKAwtwLXpxptX2lAhiNl4bPU23nQK I4JoXwpSsMDn0AYzlFHLLRIMNBqU9lkg9lO+UZO1mIUImklp/Q7HlZG9LJUdQVPG1gDx RBOWHWEPaD61tAZJJNK1qf5t3Bx1qwThtK7bQmkx8yRGSPh0RKOiSj8U+EvFsnbQw1Ie hBg5vPk+e3NDbGEeZ7/OTm7kzGxyL0p0DcIKy0BYa3cf0RbWsGdpd2GiQ/abJ9z/Man3 NG29QHKhZbj9N0OosTA1ZSHGS5n7SbLl6MXlGX90LW0cjc0GVdPBhdJKb4qVXoXzSpGi dtOQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d15-v6si1704051plj.284.2018.02.28.11.20.53; Wed, 28 Feb 2018 11:21:07 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933662AbeB1TTq (ORCPT + 99 others); Wed, 28 Feb 2018 14:19:46 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:52856 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933605AbeB1TTT (ORCPT ); Wed, 28 Feb 2018 14:19:19 -0500 Received: from pps.filterd (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w1SJJ88m100603 for ; Wed, 28 Feb 2018 14:19:19 -0500 Received: from e06smtp11.uk.ibm.com (e06smtp11.uk.ibm.com [195.75.94.107]) by mx0b-001b2d01.pphosted.com with ESMTP id 2gdxbum1ht-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Wed, 28 Feb 2018 14:19:18 -0500 Received: from localhost by e06smtp11.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 28 Feb 2018 19:19:17 -0000 Received: from b06cxnps3074.portsmouth.uk.ibm.com (9.149.109.194) by e06smtp11.uk.ibm.com (192.168.101.141) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 28 Feb 2018 19:19:14 -0000 Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w1SJJEqJ55902240; Wed, 28 Feb 2018 19:19:14 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 228E152047; Wed, 28 Feb 2018 18:10:59 +0000 (GMT) Received: from aksadiga.ibm (unknown [9.195.41.46]) by d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTPS id 9995C52041; Wed, 28 Feb 2018 18:10:57 +0000 (GMT) Date: Thu, 1 Mar 2018 00:49:03 +0530 From: Akshay Adiga To: Stewart Smith Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, npiggin@gmail.com Subject: Re: [PATCH] cpuidle/powernv : Restore different PSSCR for idle and hotplug References: <1519053500-31860-1-git-send-email-akshay.adiga@linux.vnet.ibm.com> <87vaekmk6n.fsf@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87vaekmk6n.fsf@linux.vnet.ibm.com> User-Agent: NeoMutt/20170306 (1.8.0) X-TM-AS-GCONF: 00 x-cbid: 18022819-0040-0000-0000-000004391ED5 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18022819-0041-0000-0000-000020DC1FFC Message-Id: <20180228191903.23jmawvfqzbcwi2r@aksadiga.ibm> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2018-02-28_11:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1802280235 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 26, 2018 at 03:47:12PM +1100, Stewart Smith wrote: > Akshay Adiga writes: > > commit 1e1601b38e6e ("powerpc/powernv/idle: Restore SPRs for deep idle > > states via stop API.") uses stop-api provided by the firmware to restore > > PSSCR. PSSCR restore is required for handling special wakeup. When special > > wakeup is completed, the core enters stop state based on restored PSSCR. > > > > Currently PSSCR is restored to deepest available stop state, causing > > a idle cpu to enter deeper stop state on a special wakeup, which causes > > the cpu to hang on wakeup. > > > > A "sensors" command which reads temperature (through DTS sensors) on idle > > cpu can trigger special wakeup. > > > > Failed Scenario : > > Request restore of PSSCR with RL = 11 > > cpu enters idle state (stop5) > > user triggers "sensors" command > > Assert special wakeup on cpu > > Restores PSSCR with RL = 11 <---- Done by firmware > > Read DTS sensor > > Deassert special wakeup > > cpu enters idle state (stop11) <-- Instead of stop5 > > > > Cpu hang is caused because cpu ended up in a deeper state than it requested > > > > This patch fixes instability caused by special wakeup when stop11 is > > enabled. Requests restore of PSSCR to deepest stop state used by cpuidle. > > Only when offlining cpu, request restore of PSSCR to deepest stop state. > > On onlining cpu, request restore of PSSCR to deepest stop state used by > > cpuidle. > > > > Fixes : 1e1601b38e6e ("powerpc/powernv/idle: Restore SPRs for deep idle > > states via stop API.") > > This should CC stable ? > > We'll need this to enable stop11 in firmware and not break things, right? Yes I will resend and CC it to stable. > > -- > Stewart Smith > OPAL Architect, IBM. >