Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1345882pxk; Fri, 18 Sep 2020 09:59:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyVqz8uA6+aX93ZmY9Wh1eAg4kvMzBkT+MaeElyT41nPd5F3Wii3aO9o2y/CFEP6IE/Kw5I X-Received: by 2002:a17:906:e113:: with SMTP id gj19mr37575885ejb.263.1600448378046; Fri, 18 Sep 2020 09:59:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600448378; cv=none; d=google.com; s=arc-20160816; b=Bk6QRoDEgAmnYIiWhnzRQ7g2f8ho0AHb//uwI8oSgw8VEGX6k6Ks94yW87JdD3hkfD hhCxoFSQuHPUTqm/DMYcUFD00T54DM4A1Cg1jmLycjkYacsT1MPxMnczNq6TG6QtVL1b 0/EW7L+twypDPk0uDSC07S6USEgK0RDzhnEOQ2DdsHSN0oTyaCCVBAy89eSCtPMM+ZRX 9SISLxeI7kNh+pQ39dvSLGONc4TX5JZImK9GjuyZDm94L7OUQz+zPR2ye8QBYzKGmItj RZRuFHdJuXFdil/P0IZBuqzOV7GGtjpVggr0YslwcQ8Opi1jTIsMUMPUqf6kaXCCjnbt sCew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from :dkim-signature; bh=dnBBdBAJkrSU9mR6n8dkW+xkv8/EHY+JavGeJ3J8HS0=; b=rNuzIvpz8gU4KCAznyfxEqxZlgS8FgG9GIsyxDI4LV53W06ooaVhMYmWWxfgu5e2ym aTtIJ811tn8qAbD6OBvHB4/LWvgtJfAZEBY2JHiPJGsm/4CBs9fwefWXofVQFulG4jW0 vGKYmtYHcetKTNz8CClvB5zGZ+uwqV9F4SbSuGioaLu1Fz3qSpOMuEWvoMBa4ESJAtqs vnH/Tyt65xdfooJl/Qz9QMCCeSLGHdL+6yo89XXrBrIsjgq9NXkGK7dIXG/N3W+X5SFh pK8oElLvsu1gTB+y2zgQapAR3EbwVGeoy3CsdzF9iQx8ATWyG145J99x6SMATA0Vc00A UUJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=Zj2XpPaW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d10si2609147edt.247.2020.09.18.09.59.15; Fri, 18 Sep 2020 09:59:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=@ti.com header.s=ti-com-17Q1 header.b=Zj2XpPaW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726316AbgIRQzk (ORCPT + 99 others); Fri, 18 Sep 2020 12:55:40 -0400 Received: from fllv0016.ext.ti.com ([198.47.19.142]:50760 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726044AbgIRQzj (ORCPT ); Fri, 18 Sep 2020 12:55:39 -0400 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 08IGtSFe031511; Fri, 18 Sep 2020 11:55:28 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1600448128; bh=dnBBdBAJkrSU9mR6n8dkW+xkv8/EHY+JavGeJ3J8HS0=; h=From:To:CC:Subject:Date; b=Zj2XpPaWnkRn/SrR8zK+9qULZOzS/nbS0pLie9aCUY+TvM8Xc4RvCXJUBIRQa1bL9 ipZ2deeSmyK8V5gyycqcIj8+TfGpOiORTOe2KdsvRqXIbSAEmkn8meDGuwfSTe718q rd8+v2bTjqG+4JW0FtkeTtM9fmaF5WPDIp9ARq/U= Received: from DLEE115.ent.ti.com (dlee115.ent.ti.com [157.170.170.26]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTP id 08IGtSl2039017; Fri, 18 Sep 2020 11:55:28 -0500 Received: from DLEE102.ent.ti.com (157.170.170.32) by DLEE115.ent.ti.com (157.170.170.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3; Fri, 18 Sep 2020 11:55:27 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DLEE102.ent.ti.com (157.170.170.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3 via Frontend Transport; Fri, 18 Sep 2020 11:55:27 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id 08IGtQDc106420; Fri, 18 Sep 2020 11:55:27 -0500 From: Grygorii Strashko To: "Rafael J. Wysocki" , , Ulf Hansson , Vincent Guittot CC: Len Brown , Pavel Machek , , Grygorii Strashko Subject: [PATCH] pm: runtime: fix timer_expires on 32bits arch Date: Fri, 18 Sep 2020 19:55:18 +0300 Message-ID: <20200918165518.23246-1-grygorii.strashko@ti.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The 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 update the struct dev_pm_info->timer_expires to u64. This causes timer_expires value to be truncated on 32bits architectures when assignment is done from u64 values: rpm_suspend() |- dev->power.timer_expires = expires; Hence, fix it by changing timer_expires type to u64. Cc: Vincent Guittot Fixes: 8234f6734c5d ("PM-runtime: Switch autosuspend over to using hrtimers") Signed-off-by: Grygorii Strashko --- include/linux/pm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/pm.h b/include/linux/pm.h index a30a4b54df52..47aca6bac1d6 100644 --- a/include/linux/pm.h +++ b/include/linux/pm.h @@ -590,7 +590,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; -- 2.17.1