Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp2923014pxk; Sun, 20 Sep 2020 23:54:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzKSmC9Y+hJKIne4ANNv6MW+Re2p+MFWhia4X5xWZPqSk53oC6bdErxm3OPLMW6kvkvAO7f X-Received: by 2002:a05:6402:3c8:: with SMTP id t8mr49420842edw.266.1600671293381; Sun, 20 Sep 2020 23:54:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600671293; cv=none; d=google.com; s=arc-20160816; b=vK9QW1dmQ1145x4imnKXE+9GLzknYvh0SvpQF7Wml6zGL7ECvA2Dsd7NfUIDgnKKE8 xH1dFnG/x5qsl1rorAFj+vi1FDwNbbhAd8vzsBrlOVIxykP6Wi/sT1i+i1z+AItkhUfL rcd86KE1W9l+FRRWdLvfa8+zJyYrwk1M9XnNMiVWsFseDtJTmSjm87t0Cn4d9js41DKu Ss0+3vr+CR5I7Z0JOmreQzzE3iVpdPxliKQhfsKEJr/73ySeC1ST0cHH59RfdcCredvs qyYWmhu9B5RQEYGPANN9oQb1kV3bYl3Dbih53tEyA+X36jKg0PS6YQf/9BhTGZZVaktg avAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=kFEyjNKnXFjtORRH/I824Zbl6zwPTcp6NAg5ggkruUs=; b=xtkhxAf+cPF/Le6uDksaHlKq+s1yG35BFwnkYSop00f5uunJXUyV/wt9tS0V6HlxsJ SAv+fmsrv9+sUuP8CszVTxKyQVgqDsGCSHL6GW3ifH9llfevqe/KtutLs2QoBzTEpV/9 PR0msTw8C9k1XXe5LCQRi441ze+hY5UI2ZG+qAMv7/76Va6UxqUXjxcJR9QedgfAHsPn AZJIJoI1sywWPFXiQIzmM08zpd7jp0vGiLBx7VKAQRYpjcMsFTDyNXdhEMVqc+BtcAVv +9GC8ufB2Tj1kQKqj5rOIdpIeOWTYq/IhUUxVm7/1ZsL04eGAIjm5ugvTt4ZZ6u8SSWK 626Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=tA7x+C+w; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n15si8787834eje.58.2020.09.20.23.54.30; Sun, 20 Sep 2020 23:54:53 -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=@linaro.org header.s=google header.b=tA7x+C+w; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726318AbgIUGvP (ORCPT + 99 others); Mon, 21 Sep 2020 02:51:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54932 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726149AbgIUGvP (ORCPT ); Mon, 21 Sep 2020 02:51:15 -0400 Received: from mail-lj1-x241.google.com (mail-lj1-x241.google.com [IPv6:2a00:1450:4864:20::241]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 24784C0613CE for ; Sun, 20 Sep 2020 23:51:15 -0700 (PDT) Received: by mail-lj1-x241.google.com with SMTP id r24so10135661ljm.3 for ; Sun, 20 Sep 2020 23:51:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=kFEyjNKnXFjtORRH/I824Zbl6zwPTcp6NAg5ggkruUs=; b=tA7x+C+w3RMlgXrK07ww814JHwdUA3uCiTFSEvshTcr4CzKvZ38o1BJtJ6HvKBInad zkOMsHFs/tlt4xL1mWdaDO0W6j0LV/ht+MW5Yy+fkCFx4hyhV5zaTZW1EIF5iump/I9D +N7YdRk/mXj/VmZECKptC2EBLV2Do73wGIo3aYuES9G+2KnhgL56jbRjUPq21S6R8QoW 4c2W/NBQWYCiY1cJx405QTXgfqRhmc/fTLOobz5/NWybBKwlKpOyG4Oriu8NHXCo+M5z EPTMea3LJiStioo9YpvLkzhznaNQRoY7DHm9s/8sqHZSIPkA5O4CodsfktXzNaQU95WG hoNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=kFEyjNKnXFjtORRH/I824Zbl6zwPTcp6NAg5ggkruUs=; b=ZYqZbb+oq7I44T0RKTj8LJ+kl7KpNWJI/5nQz5wk/Aza9pQJt90gJKQuHhPQnaKtzo tI2HRD25G4/lEyJ6Aw9KWYzxz7aBrpsUtHawbXphIwMQOzIAnwxrgAXCQ0+u6kBLvDcy 2Q1l+lw35nF2fzS/GwArtoUKI6TRicHQhYZj7uMNQL8wmWSpZm6fGO8YoeE2tthQsfBW 0Y9KM3Hra0DSw88dBgPxbJAMWsEoOJGnILqYKrTn7Q2grj9KirZOCd0Jc7xqnP97Ij9C 4+Nb3SAxclqtPyF+WgE5nLqrsawIDTp9GGYqZcPH9C8k6l7jwGvTbBTIyhvIRBMJC5YU hRDw== X-Gm-Message-State: AOAM533Xpw96H3/J2M5auVOPyEeE5LLqxfzUspGTNK1SR5Dwx/wpIbbK IWMBr6VFszltuLH9fCKFzs+1zf5rJW6t+VZRU7eDrdkOUzU= X-Received: by 2002:a2e:5c09:: with SMTP id q9mr15302618ljb.423.1600671073338; Sun, 20 Sep 2020 23:51:13 -0700 (PDT) MIME-Version: 1.0 References: <20200918165518.23246-1-grygorii.strashko@ti.com> In-Reply-To: <20200918165518.23246-1-grygorii.strashko@ti.com> From: Vincent Guittot Date: Mon, 21 Sep 2020 08:51:02 +0200 Message-ID: Subject: Re: [PATCH] pm: runtime: fix timer_expires on 32bits arch To: Grygorii Strashko Cc: "Rafael J. Wysocki" , "open list:THERMAL" , Ulf Hansson , Len Brown , Pavel Machek , linux-kernel Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 18 Sep 2020 at 18:55, Grygorii Strashko wrote: > > 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 Acked-by: Vincent Guittot > --- > 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 >