From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 141E9C388F7 for ; Sat, 31 Oct 2020 11:36:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C67DE2087D for ; Sat, 31 Oct 2020 11:36:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604144203; bh=r1xItn96tnp6noRlanmyu9eUicvbYli/qrwchptdiw8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=tbGJbhW0Ky38MdxCs+o/3X5uw5pEl/dAuust8nDlNFfE3+Ok46GvN3mPV3sCX5hmP Wr5hR8SRwppWInLSafW6RA7qTxy98iS2cBtM5nHkGdIlf16IETEdIvBJl+ffPFV9ku gE2iSjxyBfuf5IQLlc1E5ys9G4ty92sLL9BX9UUA= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727232AbgJaLgm (ORCPT ); Sat, 31 Oct 2020 07:36:42 -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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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;