ARM: topology: save cpu id of each core

Conflicts:
	arch/arm/kernel/topology.c

Change-Id: If2e1feb0ebc5cbb8986064dfbec12a9155204fb2
ARM: topology: Add a cpu_power function

Conflicts:
	arch/arm/kernel/topology.c

Change-Id: I60f68353cfa9c1cd27636f24d830ebfd5a6103bd

Conflicts:
	arch/arm/kernel/topology.c
ARM: cpu topology: add debugfs

Conflicts:
	arch/arm/kernel/topology.c

Change-Id: I37bafdd12787fa05bbe9fb5d1c05794ff168c7bc

Conflicts:
	arch/arm/kernel/topology.c
CPU: add dvfs monitor driver
(Chad Goodman)

Signed-off-by: poondog <markj338@gmail.com>

Conflicts:
	drivers/cpufreq/Kconfig

Change-Id: Ib9e06a4c1a06ee11db1a3cda50e54ecb541a2f16
thermal: add generic cpufreq cooling implementation

This patchset introduces a new generic cooling device based on cpufreq
that can be used on non-ACPI platforms.  As a proof of concept, we have
drivers for the following platforms using this mechanism now:

 * Samsung Exynos (Exynos4 and Exynos5) in the current patchset.
 * Freescale i.MX (git://git.linaro.org/people/amitdanielk/linux.git imx6q_thermal)

There is a small change in cpufreq cooling registration APIs, so a minor
change is needed for Freescale platforms.

Brief Description:

1) The generic cooling devices code is placed inside driver/thermal/*
   as placing inside acpi folder will need un-necessary enabling of acpi
   code.  This code is architecture independent.

2) This patchset adds generic cpu cooling low level implementation
   through frequency clipping.  In future, other cpu related cooling
   devices may be added here.  An ACPI version of this already exists
   (drivers/acpi/processor_thermal.c) .But this will be useful for
   platforms like ARM using the generic thermal interface along with the
   generic cpu cooling devices.  The cooling device registration API's
   return cooling device pointers which can be easily binded with the
   thermal zone trip points.  The important APIs exposed are,

   a) struct thermal_cooling_device *cpufreq_cooling_register(
        struct cpumask *clip_cpus)
   b) void cpufreq_cooling_unregister(struct thermal_cooling_device *cdev)

3) Samsung exynos platform thermal implementation is done using the
   generic cpu cooling APIs and the new trip type.  The temperature sensor
   driver present in the hwmon folder(registered as hwmon driver) is moved
   to thermal folder and registered as a thermal driver.

A simple data/control flow diagrams is shown below,

Core Linux thermal <----->  Exynos thermal interface <----- Temperature Sensor
          |                             |
         \|/                            |
  Cpufreq cooling device <---------------

TODO:
*Will send the DT enablement patches later after the driver is merged.

This patch:

Add support for generic cpu thermal cooling low level implementations
using frequency scaling up/down based on the registration parameters.
Different cpu related cooling devices can be registered by the user and
the binding of these cooling devices to the corresponding trip points can
be easily done as the registration APIs return the cooling device pointer.
The user of these APIs are responsible for passing clipping frequency .
The drivers can also register to recieve notification about any cooling
action called.

[akpm@linux-foundation.org: fix comment layout]
Signed-off-by: Amit Daniel Kachhap <amit.kachhap@linaro.org>
Cc: Guenter Roeck <guenter.roeck@ericsson.com>
Cc: SangWook Ju <sw.ju@samsung.com>
Cc: Durgadoss <durgadoss.r@intel.com>
Cc: Len Brown <lenb@kernel.org>
Cc: Jean Delvare <khali@linux-fr.org>
Cc: Kyungmin Park <kmpark@infradead.org>
Cc: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Amit Daniel Kachhap <amit.daniel@samsung.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>

Conflicts:
	drivers/thermal/Kconfig
	drivers/thermal/Makefile

Change-Id: I15122bc86850e76ad3e712b377eadc35792862f1
cpupower: update the cpu_power according to cpu load

This driver updates the capacity of each core according to current
sched_mc level and cpu frequency (in fact current cpu load)

When the lowest frequencies are used, we are in a light load use case
and we increase the cpu capacity to keep these light tasks on CPU0

Conflicts:

	drivers/staging/Kconfig

Conflicts:
	drivers/staging/Kconfig
	drivers/staging/Makefile

Change-Id: I5aac628f559c26a348595f06b635b1b115b13b5d
ARM: topology: Add a topology update notification

Conflicts:
	arch/arm/kernel/topology.c

Change-Id: Ia25d14b11c275b89a44d2f657b4898bb26c14e3b
ARM: topology: Update topology according to current sched_mc mode

Change-Id: I50a759a031a6d3ebbced701a2472e583f484980b
defconfig: update

Change-Id: I31cceb649bb2861cd0bb93d438f8aa8e21d3e13e
thermal: remove HTC's terrible thermal shit

Change-Id: I48c31f0cbb3d6a1b00ea5db2265b3cfcb41a63cd
of: move of_get_cpu_node implementation to DT core library

This patch moves the generalized implementation of of_get_cpu_node from
PowerPC to DT core library, thereby adding support for retrieving cpu
node for a given logical cpu index on any architecture.

The CPU subsystem can now use this function to assign of_node in the
cpu device while registering CPUs.

It is recommended to use these helper function only in pre-SMP/early
initialisation stages to retrieve CPU device node pointers in logical
ordering. Once the cpu devices are registered, it can be retrieved easily
from cpu device of_node which avoids unnecessary parsing and matching.

Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Grant Likely <grant.likely@linaro.org>
Acked-by: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Sudeep KarkadaNagesha <sudeep.karkadanagesha@arm.com>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

Conflicts:
	arch/powerpc/include/asm/prom.h
	drivers/of/base.c

Change-Id: I92eeb558a17ca45044f5b6b2e5813ad2a4ab1f27
topology: remove redefinitions

Change-Id: Ie8f0748b120e0bedf5affa0cde90b5916df85296
ARM: topology: Add a topology update notification

Change-Id: I8d1c98c331ee58a4af6e51c4464434a0ccd910aa
misc topology fixes

Change-Id: Ib5d72ea4faefb6c4fecba55b828c74fa7d15978c
Merge commit '9018a89' into kk44-topo
standalone building: add the DTB scripts

Change-Id: I26f9cb540766caa74cf27d23cd7944cc5f9347b6