Received: by 10.223.185.116 with SMTP id b49csp6871772wrg; Wed, 28 Feb 2018 17:45:56 -0800 (PST) X-Google-Smtp-Source: AG47ELtpBEJbx6gSHVw3vQLv9sj5wE65Ccbz2L4YyBENXDvXnwV2b26QJg9bFde0JvbkgiRChmLN X-Received: by 2002:a17:902:5797:: with SMTP id l23-v6mr192430pli.56.1519868756062; Wed, 28 Feb 2018 17:45:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519868756; cv=none; d=google.com; s=arc-20160816; b=BI5Amqrs1AV6e5onAcGhbLKFOMXjlpHiZ3pZjVrY/Iu1DSiOdkXI8XbGr+AQINzA3W nDY4/rYXflUMKBiLo+5F5Lj6bNJUM+9IjXWnZrYjmVgUUvNKGqkcNkB3LZDrLL0O6Php 63XGgC7vRKAmMAGT/vYzTsN9oxjpa2l7rmLLNKA0OzzWQI7Uldb54trY+GXFf6HBU3m4 CUOtc1sZHsXHCHgM2b+0HEQIffORfRjUSk5oSqxrtuNmZtparM8aJmwLWWnZQTxBEy7W GdC9jSUM6lCKylD+mCCXLq6g5tTBC7JNAawG6wUrtzJXhOL6pQeznTQ9Dh+AbONosYBI TAbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:arc-authentication-results; bh=lkWSxz5rBQVVDqRnxUEwebFogrzzGBRVEjEkjBptYVI=; b=gMsn/rf71Wv3lPeFpgL+Ao9hI7Cq/ud6sGcfSuTOV1R1rNNiRFc3PWjUfnxr5aDXg7 KO79/Huwn0u/VuT3mEGgb8P2zPkRCNAk9IQw7ge93HMNfScBvvwMp3h2KRPXiWeXIK3Y x6tn9GDnc1Uw65NegnolidOAIlxIIQ27QzBdZ4J80miwl7xNMhvqHLkYfEgQ2DFucjnY DNY1/5RGHV+8dAG/PSNKcY0OpljqM5eHdThdGVMrzRj37rwSqbKif9Fqe68SipPkm5sQ nEZendRFDlkNLvxSByhE1+RBeC123veZ+xNfB6295Hya29aoziFNHvJl0qfHIL9I5S7B 6ECQ== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k80si2105892pfh.260.2018.02.28.17.45.41; Wed, 28 Feb 2018 17:45:56 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935697AbeCABni (ORCPT + 99 others); Wed, 28 Feb 2018 20:43:38 -0500 Received: from ozlabs.org ([103.22.144.67]:45531 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932134AbeCABnh (ORCPT ); Wed, 28 Feb 2018 20:43:37 -0500 Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPSA id 3zsFZb3yM3z9s1X; Thu, 1 Mar 2018 12:43:35 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ellerman.id.au From: Michael Ellerman To: Stewart Smith , Akshay Adiga , linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Cc: npiggin@gmail.com, Akshay Adiga Subject: Re: [PATCH] cpuidle/powernv : Restore different PSSCR for idle and hotplug In-Reply-To: <87vaekmk6n.fsf@linux.vnet.ibm.com> References: <1519053500-31860-1-git-send-email-akshay.adiga@linux.vnet.ibm.com> <87vaekmk6n.fsf@linux.vnet.ibm.com> Date: Thu, 01 Mar 2018 12:43:34 +1100 Message-ID: <87zi3s8ta1.fsf@concordia.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Stewart Smith writes: > 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? But is Cc'ing this to stable even sufficient to enable stop11? If firmware starts enabling stop11 then every existing kernel will be broken, so eg. bisecting anything prior to now will be impossible. cheers