OSDN Git Service

PM-runtime: Replace jiffies-based accounting with ktime-based accounting
authorThara Gopinath <thara.gopinath@linaro.org>
Wed, 23 Jan 2019 07:50:14 +0000 (08:50 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 31 Jan 2019 09:45:10 +0000 (10:45 +0100)
commita08c2a5a31941131c41feaa0429e4c8854cf48f2
treede5a00edb1f29ee153916682ddb4160e4a3ac074
parent58456488e0e3793f2f95a3d2e2a78b6eba0ad0aa
PM-runtime: Replace jiffies-based accounting with ktime-based accounting

Replace jiffies-based accounting for runtime_active_time and
runtime_suspended_time with ktime-based accounting. This makes the
runtime debug counters inline with genpd and other PM subsytems which
use ktime-based accounting.

Timekeeping is initialized before driver_init(). It's only at that time
that PM-runtime can be enabled.

Signed-off-by: Thara Gopinath <thara.gopinath@linaro.org>
[switch from ktime to raw nsec]
Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/base/power/runtime.c
drivers/base/power/sysfs.c
include/linux/pm.h