Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3182005pxk; Mon, 21 Sep 2020 07:17:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxevvemeJgNwbXlNakQwkS1ZYryf3Ff+G4GdhR21v/f4PgIuZKSTJsDtXD/e0DOzeaDWVHR X-Received: by 2002:a17:906:ca8f:: with SMTP id js15mr52190077ejb.175.1600697846995; Mon, 21 Sep 2020 07:17:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600697846; cv=none; d=google.com; s=arc-20160816; b=So+4NgXfKpwIm0msqTE1VX0XeMOzVr3FvgI9ddU4DxpB6HIbuEb5eqw/WO93FaHjKP ZU3Yp1nuKUXrLn3897Nyhb3zXG52zVSu26NYpAd3aBX9UxSba5ogo9F++GdQtJ6qB0N2 YMz+ovQrGc2nJucSGIz5k8ks/sj9GKUoYm3CABx+EfeUpo1h7mYW1fXhhAhsD489YiBc KMt3DAdqmx9FLCgAsmvlkVvxjZyaMxf9RZrkPpYv4fQbLz/hfD5KEceBGjkYWJEpchbe GclUxnoXPLnj2pRaUyv8BIR9GdGmEiybJs4b1OPv0bxlX7tB5fI9xPZaZAiapAaKqX1P uXfw== 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; bh=jSuNx5iI/OJ6Z/gYoNUI3kSkgsNrBIRpVHSXiUBoJ5w=; b=Uf5D38+08iGh6jWQQsQQm//OqPdHow6tO/6iNsxtzRyhW2pSExo09entaSwcuYCWJF gKCvxF7PiifGvZvmLofyq+qpsEo8oo3H17GG4biPBW73hLU25+Qp/QpKIQGA4cYSQv8G opGZWYM8xLVye9XrJw/TK2rE0DmSblfhaS/CYEE/CX4Eat4aVvwZpWDH9tYuSVumGNbD SJwQPywzGIMfLK8z1H/lJuI58/UEb+EDXsyZy3VkGuepJUNjlb3+xry3vDGalUZv0XxO /5Cm5DWiaPucfPPpXYmDITD6kPiV3UZuIVp53X/xaSCDXTcu+U9/nFc86m1RNeYwdD2c gW1Q== ARC-Authentication-Results: i=1; mx.google.com; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id lc12si8077532ejb.491.2020.09.21.07.17.02; Mon, 21 Sep 2020 07:17:26 -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; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727315AbgIUOPR (ORCPT + 99 others); Mon, 21 Sep 2020 10:15:17 -0400 Received: from mail-ot1-f65.google.com ([209.85.210.65]:34973 "EHLO mail-ot1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727030AbgIUOPQ (ORCPT ); Mon, 21 Sep 2020 10:15:16 -0400 Received: by mail-ot1-f65.google.com with SMTP id o6so12468582ota.2; Mon, 21 Sep 2020 07:15:16 -0700 (PDT) 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=jSuNx5iI/OJ6Z/gYoNUI3kSkgsNrBIRpVHSXiUBoJ5w=; b=Zz6C9h7hwzCz1AmxTZ1iHFeSBowiybOPcYhmIbfPmKVNbN+9jTzrkqPx7DU1TVkdk2 R8lT54g/+rHVsN4dRTfNsNIVD1/L6IEEIU0L1kGjTfH9w6yVUhM8VD8LPG+iIf7iQFLP omhG4Wj/B7zoAd0MH3OnadCvPwfEJ2Q1sbOAG48w2ZmUWHkZrlJDKUOK8qwxC4NXB0VU m6VbWrDsbReSLaJGhWVl6YxYlHWOPLJLY/4JtofKYKxTTh31ml7FOmRwve5eY4R4BEbI 5k7tzxo7QfX46ltBX4gpukRFU68DmXf81TipX8TfoR+FT8MduImm9KAiq8v3a8bCPkQx Hl/g== X-Gm-Message-State: AOAM532Dh/oSsXhag1+KnjkEZhJul6o2IfHanzwSOgp/iNeYSwgZ/Gcq w0UC8ZcYbN2Y7fI19SS1BpW6h3mvuRXX/6CtuNU= X-Received: by 2002:a9d:6010:: with SMTP id h16mr31722498otj.262.1600697715799; Mon, 21 Sep 2020 07:15:15 -0700 (PDT) MIME-Version: 1.0 References: <20200918165518.23246-1-grygorii.strashko@ti.com> In-Reply-To: From: "Rafael J. Wysocki" Date: Mon, 21 Sep 2020 16:15:00 +0200 Message-ID: Subject: Re: [PATCH] pm: runtime: fix timer_expires on 32bits arch To: Vincent Guittot , 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 Mon, Sep 21, 2020 at 8:51 AM Vincent Guittot wrote: > > 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 Applied as 5.9-rc7 material with some edits in the subject and changelog, thanks! > > --- > > 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 > >