cpufreq: Handle sorted frequency tables more efficiently
authorViresh Kumar <viresh.kumar@linaro.org>
Mon, 27 Jun 2016 10:34:07 +0000 (16:04 +0530)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 6 Jul 2016 22:13:20 +0000 (00:13 +0200)
commitda0c6dc00c69d0adaae99c3b3d2ea0c869a3fb35
tree857ed9f41fafe743720003520ecc94d4e53114d8
parent8d540ea79211dd272403ed79b2033bbded19ac42
cpufreq: Handle sorted frequency tables more efficiently

cpufreq drivers aren't required to provide a sorted frequency table
today, and even the ones which provide a sorted table aren't handled
efficiently by cpufreq core.

This patch adds infrastructure to verify if the freq-table provided by
the drivers is sorted or not, and use efficient helpers if they are
sorted.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpufreq/freq_table.c
include/linux/cpufreq.h