cpufreq: ondemand: Replace down_differential tuner with adj_up_threshold

In order to avoid the calculation of up_threshold - down_differential
every time that the frequency must be decreased, we replace the
down_differential tuner with the adj_up_threshold which keeps the
difference across multiple checks.

Update the adj_up_threshold only when the up_theshold is also updated.

Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
cpufreq: Convert the cpufreq_driver_lock to a rwlock

This eliminates the contention I am seeing in __cpufreq_cpu_get.
It also nicely stages the lock to be replaced by the rcu.

Signed-off-by: Nathan Zimmer <nzimmer@sgi.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
cpufreq: Convert the cpufreq_driver_lock to use RCU

In general rwlocks are discourged so we are moving it to use RCU instead.

Signed-off-by: Nathan Zimmer <nzimmer@sgi.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Merge branch 'pm-tools-next' into bleeding-edge

* pm-tools-next:
  ACPI tools / acpidump: must be run as root - install it into /usr/sbin
Merge branch 'pm-assorted-next' into bleeding-edge

* pm-assorted-next:
  ACPI: enable ACPI SCI during suspend
  PM: Introduce suspend state PM_SUSPEND_FREEZE
  suspend: enable freeze timeout configuration through sys
Merge branch 'acpi-assorted-next' into bleeding-edge

* acpi-assorted-next:
  ACPI: Add DMI entry for Sony VGN-FW41E_H
Merge branch 'pm-cpufreq-next' into bleeding-edge

* pm-cpufreq-next:
  cpufreq: Convert the cpufreq_driver_lock to use RCU
  cpufreq: Convert the cpufreq_driver_lock to a rwlock
  cpufreq: ondemand: Replace down_differential tuner with adj_up_threshold