From patchwork Tue Jul 3 05:24:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gautham R Shenoy X-Patchwork-Id: 10502953 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B495160532 for ; Tue, 3 Jul 2018 05:24:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A2F43288B6 for ; Tue, 3 Jul 2018 05:24:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9563C289B2; Tue, 3 Jul 2018 05:24:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 17674288B6 for ; Tue, 3 Jul 2018 05:24:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753911AbeGCFYf (ORCPT ); Tue, 3 Jul 2018 01:24:35 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:42360 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753834AbeGCFYe (ORCPT ); Tue, 3 Jul 2018 01:24:34 -0400 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 w635OSnM142383 for ; Tue, 3 Jul 2018 01:24:33 -0400 Received: from e16.ny.us.ibm.com (e16.ny.us.ibm.com [129.33.205.206]) by mx0b-001b2d01.pphosted.com with ESMTP id 2k0140ue3c-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 03 Jul 2018 01:24:33 -0400 Received: from localhost by e16.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 3 Jul 2018 01:24:33 -0400 Received: from b01cxnp23032.gho.pok.ibm.com (9.57.198.27) by e16.ny.us.ibm.com (146.89.104.203) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Tue, 3 Jul 2018 01:24:30 -0400 Received: from b01ledav004.gho.pok.ibm.com (b01ledav004.gho.pok.ibm.com [9.57.199.109]) by b01cxnp23032.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w635OTKn15991208 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 3 Jul 2018 05:24:29 GMT Received: from b01ledav004.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 70CAA112063; Tue, 3 Jul 2018 01:24:22 -0400 (EDT) Received: from b01ledav004.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2EEB0112061; Tue, 3 Jul 2018 01:24:22 -0400 (EDT) Received: from sofia.ibm.com (unknown [9.124.35.39]) by b01ledav004.gho.pok.ibm.com (Postfix) with ESMTP; Tue, 3 Jul 2018 01:24:22 -0400 (EDT) Received: by sofia.ibm.com (Postfix, from userid 1000) id 03BE92E2F3D; Tue, 3 Jul 2018 10:54:27 +0530 (IST) From: "Gautham R. Shenoy" To: akshay.adiga@linux.vnet.ibm.com, Vaidyanathan Srinivasan , Nicholas Piggin , Michael Ellerman , "Rafael J. Wysocki" , Daniel Lezcano Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, "Gautham R. Shenoy" Subject: [PATCH] cpuidle:powernv: Add the CPUIDLE_FLAG_POLLING for snooze Date: Tue, 3 Jul 2018 10:54:16 +0530 X-Mailer: git-send-email 1.8.3.1 X-TM-AS-GCONF: 00 x-cbid: 18070305-0072-0000-0000-00000378D3A5 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00009299; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000266; SDB=6.01055793; UDB=6.00541544; IPR=6.00833716; MB=3.00021972; MTD=3.00000008; XFM=3.00000015; UTC=2018-07-03 05:24:32 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18070305-0073-0000-0000-000048927830 Message-Id: <1530595456-32352-1-git-send-email-ego@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-07-03_02:, , 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 mlxscore=0 impostorscore=0 mlxlogscore=872 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1806210000 definitions=main-1807030062 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: "Gautham R. Shenoy" In the situations where snooze is the only cpuidle state due to firmware not exposing any platform idle states, the idle CPUs will remain in snooze for a long time with interrupts disabled causing the Hard-lockup detector to complain. watchdog: CPU 51 detected hard LOCKUP on other CPUs 59 watchdog: CPU 51 TB:535296107736, last SMP heartbeat TB:527472229239 (15281ms ago) watchdog: CPU 59 Hard LOCKUP watchdog: CPU 59 TB:535296252849, last heartbeat TB:526554725466 (17073ms ago) Fix this by adding CPUIDLE_FLAG_POLLING flag to the state, so that the cpuidle governor will do the right thing, such as not stopping the tick if it is going to put the idle cpu to snooze. Reported-by: Akshay Adiga Cc: Nicholas Piggin Signed-off-by: Gautham R. Shenoy --- drivers/cpuidle/cpuidle-powernv.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/cpuidle/cpuidle-powernv.c b/drivers/cpuidle/cpuidle-powernv.c index d29e4f0..b73041b 100644 --- a/drivers/cpuidle/cpuidle-powernv.c +++ b/drivers/cpuidle/cpuidle-powernv.c @@ -156,6 +156,7 @@ static int stop_loop(struct cpuidle_device *dev, { /* Snooze */ .name = "snooze", .desc = "snooze", + .flags = CPUIDLE_FLAG_POLLING, .exit_latency = 0, .target_residency = 0, .enter = snooze_loop },