Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp749215imm; Mon, 2 Jul 2018 22:25:29 -0700 (PDT) X-Google-Smtp-Source: ADUXVKI3eoLr6MpoFayyLGjR70DsuP1Jpm0yKlnyCJXOW8SEOKJZqEObJ7LIEfG+xMWhCHnKLshW X-Received: by 2002:a63:ab4c:: with SMTP id k12-v6mr23981196pgp.386.1530595529204; Mon, 02 Jul 2018 22:25:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530595529; cv=none; d=google.com; s=arc-20160816; b=yMzjZdG83KagF3NXl8JAS/bdmkJNy/byFr7aQBoIIN3/VfRgVKMbzSvA0aIkOdrhsg NNFuJs5VUnD4gzpwIADIKIzuDJ45iHVxzQ+/JTYycDjHRU7253+SSm+HTFrwZbtSv22o mYyxRr3oXspFhpCDX4vBmA2XX0e6WKANBGX/9HaUuhwdQVlbuw8XUY6MaqI8+5G3v4Om kmTRzSSHG/By4/wsARaN4r9SJlnrYkbWakAdQUoX/BP3q3JoaRb5O4FKps+XaiMiTMhc 0BSs2Z/oQDx2hskA8cASaBTxBto+c2UwkW/Qj7piCItHNP6TuMhNCBe83bWELjjkPtiL ftcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=htUtW9rhJevUYcu/99NgzTMpNVocZ9Q6treF4FKWYVM=; b=RM1nSaEnftph4jTJy3svgNxztyqwoV02rCDMP03q/ub+ztnab1lvXPjsl1d9RrDwR6 QCwImuzFRH6g46FykedI7Mf0V07sn4z02lSqBOWDvzM/6jqS3bsDqq3iLsdDPt2MmA0h wwxrzEw0V6v6mIoIFoIlBi767oK4jtRG1EnC3AeWgjn6Jgq0uJD91BLI0K/LuWmY6mwd cJ8mAOoceXuzmmHIFtV19lpKjButh7vsf4veiLt71TOFIfCqmrWw132cCJ6A0pSSMejD oc2WnT1SxxTJ1/Oi6F7sriWpImC0WBCxvi64kxLHtLlObWG96eiSSxwNUhEx4ZqS6K+p +DBw== 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 i62-v6si291239pge.93.2018.07.02.22.25.14; Mon, 02 Jul 2018 22:25:29 -0700 (PDT) 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 S1754104AbeGCFYf (ORCPT + 99 others); Tue, 3 Jul 2018 01:24:35 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:44254 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753822AbeGCFYe (ORCPT ); Tue, 3 Jul 2018 01:24:34 -0400 Received: from pps.filterd (m0098416.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w635OQUp140712 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 2jywu71jn0-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=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=882 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1806210000 definitions=main-1807030062 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 }, -- 1.9.4