cpufreq/arm-bl-cpufreq: Expose the frequency table to clients

This patch registers the frequency table for each CPU so that the
table and transition statistics are visible through sysfs, and to
governor code.

Since the frequency table is static and never deallocated while the
driver is loaded, there is no call to cpufreq_frequency_table_put_
attr().  A .exit method which calls this function would be needed
if the frequency table ever becomes dynamic.

Signed-off-by: Vishal Bhoj <vishal.bhoj@linaro.org>
Signed-off-by: Dave Martin <dave.martin@linaro.org>
cpufreq/arm-bl-cpufreq: Add in-module unit tests

This squashed merge adds internal unit tests for the arm-bl-cpufreq
driver.

To build the tests, add the following config option:

ARM_BL_CPUFREQ_TEST=y

The tests will run when the driver is loaded, but they are not run
by default.  To run the tests, you need to pass the option
test_config=1 to the arm-bl-cpufreq driver when loading it.

Mathieu Briand (12):
      cpufreq/arm-bl-cpufreq: Unit tests on switcher
      cpufreq/arm-bl-cpufreq: fix some bugs
      cpufreq/arm-bl-cpufreq: change tests results messages
      cpufreq/arm-bl-cpufreq: make transition test independant of original cluster
      cpufreq/arm-bl-cpufreq: Disable tests at module loading by default
      cpufreq/arm-bl-cpufreq: split module and tests in distinct files
      cpufreq/arm-bl-cpufreq: reindent pr_info in test code
      cpufreq/arm-bl-cpufreq: fix rename error
      cpufreq/arm-bl-cpufreq tests: fix typo, comments and #define values
      cpufreq/arm-bl-cpufreq tests: run some tests on both clusters
      cpufreq/arm-bl-cpufreq tests: define a macro helping pr_fmt define in various sections
      cpufreq/arm-bl-cpufreq tests: rework test inclusion

Signed-off-by: Mathieu Briand <mathieu.briand@linaro.org>
Signed-off-by: Dave Martin <dave.martin@linaro.org>
cpufreq/arm-bl-cpufreq: Add experimental tracepoints.

This patch adds a cpu:power_arm_bl_clusterswitch event, with the
following parameters:

    state (1=pre-switch 2=post-switch)
    cpu_id
    from_cluster_id (original cluster)
    to_cluster_id (destination cluster)

Signed-off-by: Dave Martin <dave.martin@linaro.org>
cpufreq/arm-bl-cpufreq: Add missing changes; add event serial number

This patch provides the missing stuff from the last patch, as well
as adding a serial number which can be used to relate matching
pairs of pre-/post- switch events together.

Signed-off-by: Dave Martin <dave.martin@linaro.org>
cpufreq/arm-bl-cpufreq: Tidy up cpu migration trace events

This patch renames and redefines the experimental trace events to
give a more generally useful set of events.

Now we have:

power:cpu_migrate_begin
power:cpu_migrate_finish

each with the following data:

        u64     timestamp;
        u32     from_phys_cpu;
        u32     from_phys_cluster;
        u32     to_phys_cpu;
        u32     to_phys_cluster;

power:cpu_migrate_begin occurs immediately before the
implementation-specific CPU migration operations start.
power:cpu_migrate_finish occurs immediately when migration is
completed.

The _phys_cpu and _phys_cluster fields are expected to be small-
integer indices identifying physical clusters and CPUs; if Linux
has any native model of the physical topology, they should match
that model; otherwise it is up to the switcher implementation to
define the namespaces for these values.

The special value CPU_MIGRATE_ALL_CPUS (0x80000000) should be
written to both _phys_cpu fields if a whole- cluster migration is
being done.  Otherwise, from_phys_cpu and to_phys_cpu will normally
both match the migrating CPU (i.e., the CPU on which the event
occurs), unless the switcher implementation can permute CPUs (as
might occur in future asymmetric big.LITTLE systems, for example).

The timestamp is added in order to minmise timing noise.  An
accurate system-wide clock should be used for generating this
(hopefully getnstimeofday is appropriate, but it could be changed).
It could be any monotonic shared clock, since the aim is to allow
accurate deltas to be computed.  We don't necessarily care about
accurate synchronisation with wall clock time.

Signed-off-by: Dave Martin <dave.martin@linaro.org>
Merge branches 'arm/vexpressdt-rtsm', 'arm/arm-virt-bl_cpufreq' and 'arm/arm-virt-bl_cpufreq+tracepoints' into HEAD
arm/rtsm-linaro-next 20120514
cpufreq/arm-bl-cpufreq: Basic trace events support

This patch adds simple trace events to the arm-bl-cpufreq driver,
to allow tracing of CPU migration events.

To make use of the trace events, you will need:

CONFIG_FTRACE=y
CONFIG_ENABLE_DEFAULT_TRACERS=y

The following events are added:
  * power:cpu_migrate_begin
  * power:cpu_migrate_finish

each with the following data:
    u64     timestamp;
    u32     from_phys_cpu;
    u32     from_phys_cluster;
    u32     to_phys_cpu;
    u32     to_phys_cluster;

power:cpu_migrate_begin occurs immediately before the
implementation-specific CPU migration operations start.
power:cpu_migrate_finish occurs immediately when migration is
completed.

The _phys_cpu and _phys_cluster fields are expected to be small-
integer indices identifying physical clusters and CPUs; if Linux
has any native model of the physical topology, they should match
that model; otherwise it is up to the switcher implementation to
define the namespaces for these values.

The special value CPU_MIGRATE_ALL_CPUS (0x80000000) should be
written to both _phys_cpu fields if a whole-cluster migration is
being done.  Otherwise, from_phys_cpu and to_phys_cpu will normally
both match the migrating CPU (i.e., the CPU on which the event
occurs), unless the switcher implementation can permute CPUs (as
might occur in future asymmetric big.LITTLE systems, for example).

The timestamp is added in order to minmise timing noise.  An
accurate system-wide clock should be used for generating this
(hopefully getnstimeofday is appropriate, but it could be changed).
It could be any monotonic shared clock, since the aim is to allow
accurate deltas to be computed.  We don't necessarily care about
accurate synchronisation with wall clock time.

Signed-off-by: Dave Martin <dave.martin@linaro.org>
Merge branches 'arm/vexpressdt-rtsm' and 'arm/arm-virt-bl_cpufreq' into HEAD
arm/rtsm-linaro-next 20120514-3
UBUNTU: (no-up) fold down debian for ubuntu-q v3.3-rc1 rebase

Ignore: yes
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
UBUNTU: ubuntu: dm-raid4-5 -- (no-up) Export dm_disk function of device-mapper

This function is externally used by the dm-raid4-5 module.

Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Ben Collins <ben.collins@canonical.com>
UBUNTU: ubuntu: dm-raid45 -- version 2009.04.24 (2.6.30-rc3)

ExternalDriver: dm-raid45
Description: This software extends device-mapper by RAID4 and RAID5 mappings.
Url: http://people.redhat.com/~heinzm/sw/dm/dm-raid45/
Version: 2009.04.24 (2.6.30-rc3)

Signed-off-by: Manoj Iyer <manoj.iyer@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
UBUNTU: ubuntu: rfkill drivers -- version 1.3

Version: 1.3

Signed-off-by: Ben Collins <ben.collins@canonical.com>
UBUNTU: SAUCE: (no-up) Modularize vesafb

Signed-off-by: Ben Collins <ben.collins@canonical.com>
UBUNTU: SAUCE: (no-up) version: Implement version_signature proc file.

Signed-off-by: Andy Whitcroft <apw@canonical.com>
Acked-by: Tim Gardener <tim.gardner@canonical.com>
UBUNTU: SAUCE: (no-up) hostap: Change initial operation mode to managed (infra)

This was previously changed by using an "options" line in a modprobe.d
file, however that practice is now deprecated.  This is because module
names, option names, their values and even their current defaults can
all change inside the kernel and module-init-tools has never been kept
in sync.

In addition, changing the kernel means that the option change will apply
if the module is built in by users or the OEM team.

Signed-off-by: Scott James Remnant <scott@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
UBUNTU: SAUCE: (no-up) swap: Add notify_swap_entry_free callback for compcache

Code is required for ubuntu/compcache

Signed-off-by: Ben Collins <ben.collins@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
UBUNTU: SAUCE: (no-up) nbd: Change default partitions per device to 15

This was previously changed by using an "options" line in a modprobe.d
file, however that practice is now deprecated.  This is because module
names, option names, their values and even their current defaults can
all change inside the kernel and module-init-tools has never been kept
in sync.

In addition, changing the kernel means that the option change will apply
if the module is built in by users or the OEM team.

Bug: #342563

Signed-off-by: Scott James Remnant <scott@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
UBUNTU: SAUCE: (no-up) Sony laptop: Some Sony Vaia laptops do not enable wwan power by default.

Bug: https://bugs.launchpad.net/bugs/364678

Added quirk to enable wwan power based on DMI information already present in the module.
Ity appears that Vaio's do not enable power to wwan from a cold boot.

We'll carry this patch indefinitely.

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>