]> Pileus Git - ~andy/linux/commit
PM / devfreq: exynos4_bus: honor RCU lock usage
authorNishanth Menon <nm@ti.com>
Fri, 18 Jan 2013 19:52:35 +0000 (19:52 +0000)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 22 Jan 2013 12:28:40 +0000 (13:28 +0100)
commit8fa938acb318378463987b04be083dc2467e0480
tree926cebf29f659ce711e87a52572fc4238c1b158b
parentbcb27549f4185ca7d0168e201931613706ef2b83
PM / devfreq: exynos4_bus: honor RCU lock usage

OPP pointers cannot be expected to be valid beyond the boundary
of rcu_read_lock and rcu_read_unlock. Unfortunately, the current
exynos4 busfreq driver does not honor the usage constraint and stores
the OPP pointer in struct busfreq_data. This could potentially
become invalid later such as: across devfreq opp change decisions,
resulting in unpredictable behavior.

To fix this, we introduce a busfreq specific busfreq_opp_info
structure which is used to handle OPP information. OPP information
is de-referenced to voltage and frequency pairs as needed into
busfreq_opp_info structure and used as needed.

Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/devfreq/exynos4_bus.c