From patchwork Sat Oct 31 11:35:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 320053 Delivered-To: patch@linaro.org Received: by 2002:a92:7b12:0:0:0:0:0 with SMTP id w18csp2185958ilc; Sat, 31 Oct 2020 04:37:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw+myIkk8DEFiGBn0XFflkr7cg1qBZTZqjCQhflsYl4o2RMVBkJma3byOBPl1m1OVDu5JKo X-Received: by 2002:aa7:c948:: with SMTP id h8mr6887177edt.171.1604144279240; Sat, 31 Oct 2020 04:37:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1604144279; cv=none; d=google.com; s=arc-20160816; b=eSi8ZqQGBvoxMPM68pX82+4qP4TBHs+VVqCfQD8qUk558LcbSih5FmWJBtysr2wD8B Lug//bg+qkpRVkY5LBDGRlkw/fxossYpTVb1nRjzY8tvdyMwpgjOyeZF8VHwB2gBxlfF M6IwJW+pccfenH/oKUP6UGnlkyxpAK3UbeYZXU2c3k09PylFE16b4yDoVWNbzBZf+A9b Lon+0cl/MA8jULdRiRxi5309csYbpIKJ7jWkEwsJAoKa2NVHybhPD6KVyY8G7WVR8djt axly/t2uDp2U/ViU1HAPSLQ/Rn8hAm++N0WW3KladLxJ7rzklad52ed2uYnFBtSFV1lm kb7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=K6yeQKF66NiMsB7b+z0SPvyyFisZcrxVShefIwceAPY=; b=uVO1yMhKTnEvKX94/9NYEHw7jNKr0VwtpvxVysanejszl8OOAd3Gd+qGwMr/xq/o1t xp4Pu4fyO5HdxFzWUPXhGPfvX5fGPHf5pt2klR8ytfSSNdubcpDF75K7qYrO0XgareFm /EpE+FZvGNV7RkHuK2b4CPbJEm2MbmnjrN6NZyu5VQuOuyqEyAF/K5iL2UMNlLzjohOr 0jOtomVPfGqv8oas2gxL/OwLkQur0vm5WJ9Sp19JwVcXZfChQAdsXSh4C3R29EdZXJlm JrDO21nX29H65s+7DdOZM05487ZZ2NlepN/5c8s9Xma+uTJeTq3uMV6HmneVuubCtmbh R/+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="kWEwbW5/"; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d26si5859610ejz.211.2020.10.31.04.37.59; Sat, 31 Oct 2020 04:37:59 -0700 (PDT) Received-SPF: pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="kWEwbW5/"; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727179AbgJaLgk (ORCPT + 15 others); Sat, 31 Oct 2020 07:36:40 -0400 Received: from mail.kernel.org ([198.145.29.99]:35020 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727212AbgJaLgj (ORCPT ); Sat, 31 Oct 2020 07:36:39 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 15BD120791; Sat, 31 Oct 2020 11:36:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604144198; bh=r1xItn96tnp6noRlanmyu9eUicvbYli/qrwchptdiw8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kWEwbW5/I8//RfJjTkw0xdaKG9Hi0Jx2MWWj2LId5QQsiMgymhILgIOHKgHBIA1ov c1+/09dXUVDrAtsxApZeb1qk/0FJTsjXZuvkq3aT2PSSBLvsswPdlEe1Jk8ArLHNI4 EcZeUVxwCzsniyjmkXOu+Nlw3sTxbNDdpZXRPqbk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Grygorii Strashko , Pavel Machek , Vincent Guittot , "Rafael J. Wysocki" Subject: [PATCH 5.4 43/49] PM: runtime: Fix timer_expires data type on 32-bit arches Date: Sat, 31 Oct 2020 12:35:39 +0100 Message-Id: <20201031113457.519718770@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201031113455.439684970@linuxfoundation.org> References: <20201031113455.439684970@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Grygorii Strashko commit 6b61d49a55796dbbc479eeb4465e59fd656c719c upstream. Commit 8234f6734c5d ("PM-runtime: Switch autosuspend over to using hrtimers") switched PM runtime autosuspend to use hrtimers and all related time accounting in ns, but missed to update the timer_expires data type in struct dev_pm_info to u64. This causes the timer_expires value to be truncated on 32-bit architectures when assignment is done from u64 values: rpm_suspend() |- dev->power.timer_expires = expires; Fix it by changing the timer_expires type to u64. Fixes: 8234f6734c5d ("PM-runtime: Switch autosuspend over to using hrtimers") Signed-off-by: Grygorii Strashko Acked-by: Pavel Machek Acked-by: Vincent Guittot Cc: 5.0+ # 5.0+ [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki Signed-off-by: Greg Kroah-Hartman --- include/linux/pm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/include/linux/pm.h +++ b/include/linux/pm.h @@ -598,7 +598,7 @@ struct dev_pm_info { #endif #ifdef CONFIG_PM struct hrtimer suspend_timer; - unsigned long timer_expires; + u64 timer_expires; struct work_struct work; wait_queue_head_t wait_queue; struct wake_irq *wakeirq;