]> Pileus Git - ~andy/linux/log
~andy/linux
10 years agoMerge branch 'acpi-hotplug'
Rafael J. Wysocki [Thu, 7 Nov 2013 18:31:15 +0000 (19:31 +0100)]
Merge branch 'acpi-hotplug'

* acpi-hotplug:
  ACPI / hotplug: Consolidate deferred execution of ACPI hotplug routines
  ACPI / hotplug: Do not execute "insert in progress" _OST
  ACPI / hotplug: Carry out PCI root eject directly
  ACPI / hotplug: Merge device hot-removal routines
  ACPI / hotplug: Make acpi_bus_hot_remove_device() internal
  ACPI / hotplug: Simplify device ejection routines
  ACPI / hotplug: Fix handle_root_bridge_removal()
  ACPI / hotplug: Refuse to hot-remove all objects with disabled hotplug
  ACPI / scan: Start matching drivers after trying scan handlers
  ACPI: Remove acpi_pci_slot_init() headers from internal.h

Conflicts:
include/acpi/acpiosxf.h (with the 'acpica' branch)

10 years agoACPI / hotplug: Consolidate deferred execution of ACPI hotplug routines
Rafael J. Wysocki [Thu, 7 Nov 2013 00:45:40 +0000 (01:45 +0100)]
ACPI / hotplug: Consolidate deferred execution of ACPI hotplug routines

There are two different interfaces for queuing up work items on the
ACPI hotplug workqueue, alloc_acpi_hp_work() used by PCI and PCI host
bridge hotplug code and acpi_os_hotplug_execute() used by the common
ACPI hotplug code and docking stations.  They both are somewhat
cumbersome to use and work slightly differently.

The users of alloc_acpi_hp_work() have to submit a work function that
will extract the necessary data items from a struct acpi_hp_work
object allocated by alloc_acpi_hp_work() and then will free that
object, while it would be more straightforward to simply use a work
function with one more argument and let the interface take care of
the execution details.

The users of acpi_os_hotplug_execute() also have to deal with the
fact that it takes only one argument in addition to the work function
pointer, although acpi_os_execute_deferred() actually takes care of
the allocation and freeing of memory, so it would have been able to
pass more arguments to the work function if it hadn't been
constrained by the connection with acpi_os_execute().

Moreover, while alloc_acpi_hp_work() makes GFP_KERNEL memory
allocations, which is correct, because hotplug work items are
always queued up from process context, acpi_os_hotplug_execute()
uses GFP_ATOMIC, as that is needed by acpi_os_execute().  Also,
acpi_os_execute_deferred() queued up by it waits for the ACPI event
workqueues to flush before executing the work function, whereas
alloc_acpi_hp_work() can't do anything similar.  That leads to
somewhat arbitrary differences in behavior between various ACPI
hotplug code paths and has to be straightened up.

For this reason, replace both alloc_acpi_hp_work() and
acpi_os_hotplug_execute() with a single interface,
acpi_hotplug_execute(), combining their behavior and being more
friendly to its users than any of the two.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Tested-by: Mika Westerberg <mika.westerberg@linux.intel.com>
10 years agoMerge branch 'pm-runtime'
Rafael J. Wysocki [Thu, 7 Nov 2013 18:27:37 +0000 (19:27 +0100)]
Merge branch 'pm-runtime'

* pm-runtime:
  PM / runtime: Use pm_runtime_put_sync() in __device_release_driver()

10 years agoMerge branch 'pm-sleep'
Rafael J. Wysocki [Thu, 7 Nov 2013 18:26:55 +0000 (19:26 +0100)]
Merge branch 'pm-sleep'

* pm-sleep:
  PM / hibernate: Avoid overflow in hibernate_preallocate_memory()

10 years agoMerge branch 'pm-cpufreq'
Rafael J. Wysocki [Thu, 7 Nov 2013 18:26:02 +0000 (19:26 +0100)]
Merge branch 'pm-cpufreq'

* pm-cpufreq:
  intel_pstate: skip the driver if ACPI has power mgmt option
  cpufreq: ondemand: Remove redundant return statement
  cpufreq: move freq change notifications to cpufreq core
  cpufreq: distinguish drivers that do asynchronous notifications
  cpufreq/intel_pstate: Add static declarations to internal functions
  cpufreq: arm_big_little: reconfigure switcher behavior at run time
  cpufreq: arm_big_little: add in-kernel switching (IKS) support
  ARM: vexpress/TC2: register vexpress-spc cpufreq device
  cpufreq: arm_big_little: add vexpress SPC interface driver
  ARM: vexpress/TC2: add cpu clock support
  ARM: vexpress/TC2: add support for CPU DVFS

10 years agoMerge branch 'pm-cpuidle'
Rafael J. Wysocki [Thu, 7 Nov 2013 18:25:12 +0000 (19:25 +0100)]
Merge branch 'pm-cpuidle'

* pm-cpuidle:
  ARM: EXYNOS: Remove incorrect __init annotation from cpuidle driver
  ARM: EXYNOS: Use dev_err() instead of printk() for cpuidle driver
  intel_idle: use CPU_TASKS_FROZEN instead of a numeric constant
  cpuidle: remove cpuidle_unregister_governor()
  cpuidle: don't call poll_idle_init() for every cpu
  cpuidle: use drv instead of cpuidle_driver in show_current_driver()
  cpuidle: call cpuidle_get_driver() from after taking cpuidle_driver_lock
  cpuidle: replace multiline statements with single line in cpuidle_idle_call()
  cpuidle: reduce code duplication inside cpuidle_idle_call()
  cpuidle: merge two if() statements for checking error cases
  cpuidle: rearrange __cpuidle_register_device() to keep minimal exit points
  cpuidle: rearrange code in __cpuidle_driver_init()
  cpuidle: make __cpuidle_driver_init() return void
  cpuidle: make __cpuidle_device_init() return void
  cpuidle: Fix comments in cpuidle core
  cpuidle: fix indentation of cpumask

10 years agoMerge branch 'pm-devfreq'
Rafael J. Wysocki [Thu, 7 Nov 2013 18:24:20 +0000 (19:24 +0100)]
Merge branch 'pm-devfreq'

* pm-devfreq:
  PM / devfreq: create_freezable_workqueue() doesn't return an ERR_PTR
  PM / devfreq: Remove duplicate header file inclusion in exynos5_bus.c
  PM / devfreq: Use devm_* APIs in exynos5_bus.c
  PM / devfreq: Remove redundant platform_set_drvdata() in exynos5_bus.c
  PM / devfreq: Fix incorrect usage of IS_ERR_OR_NULL in exynos5_bus.c

10 years agoMerge branch 'powercap'
Rafael J. Wysocki [Thu, 7 Nov 2013 18:23:20 +0000 (19:23 +0100)]
Merge branch 'powercap'

* powercap:
  PowerCap: Fix build error with option -Werror=format-security

10 years agoMerge branch 'acpi-video'
Rafael J. Wysocki [Thu, 7 Nov 2013 18:22:16 +0000 (19:22 +0100)]
Merge branch 'acpi-video'

* acpi-video:
  Revert "ACPI / video: Ignore BIOS initial backlight value for HP 250 G1"
  ACPI / video: Quirk initial backlight level 0
  ACPI / video: Fix initial level validity test
  ACPI / blacklist: fix name of ThinkPad Edge E530

10 years agoMerge branch 'acpica'
Rafael J. Wysocki [Thu, 7 Nov 2013 18:21:11 +0000 (19:21 +0100)]
Merge branch 'acpica'

* acpica: (35 commits)
  ACPICA: Add __init for ACPICA initializers/finalizers.
  ACPICA: Cleanup asmlinkage for ACPICA APIs.
  ACPICA: Update acpidump related header file changes.
  ACPICA: Update compilation environment settings.
  ACPICA: Fix cached object deletion code.
  ACPICA: Remove dead AOPOBJ_INVALID check.
  ACPICA: Cleanup useless memset invocations.
  ACPICA: Fix an ACPI_ALLOCATE_ZEROED() reversal.
  ACPICA: Fix wrong object length returned by acpi_ut_get_simple_object_size().
  ACPICA: Add new statistics interface.
  ACPICA: Update DMAR table definitions.
  ACPICA: Update RSDP table definitions.
  ACPICA: Update namespace dump code.
  ACPICA: Update check for setting the ANOBJ_IS_EXTERNAL flag.
  ACPICA: Update default space handlers.
  ACPICA: Update version to 20130927.
  ACPICA: Update aclinux.h for new OSL override mechanism.
  ACPICA: Add support to allow host OS to redefine individual OSL prototypes.
  ACPICA: Simplify configuration of global ACPI_REDUCED_HARDWARE macro.
  ACPICA: Fix indentation issues for macro invocations.
  ...

10 years agoMerge branch 'acpi-assorted'
Rafael J. Wysocki [Thu, 7 Nov 2013 18:19:42 +0000 (19:19 +0100)]
Merge branch 'acpi-assorted'

* acpi-assorted:
  ACPI / event: remove unneeded NULL pointer check
  ACPI: Fix spelling mistake in error messages

10 years agoMerge branch 'acpi-processor'
Rafael J. Wysocki [Thu, 7 Nov 2013 18:18:27 +0000 (19:18 +0100)]
Merge branch 'acpi-processor'

* acpi-processor:
  ACPI / processor: Do not request ACPI cpufreq module directly

10 years agoPM / runtime: Use pm_runtime_put_sync() in __device_release_driver()
Rafael J. Wysocki [Thu, 7 Nov 2013 00:51:15 +0000 (01:51 +0100)]
PM / runtime: Use pm_runtime_put_sync() in __device_release_driver()

Commit fa180eb448fa (PM / Runtime: Idle devices asynchronously after
probe|release) modified __device_release_driver() to call
pm_runtime_put(dev) instead of pm_runtime_put_sync(dev) before
detaching the driver from the device.  However, that was a mistake,
because pm_runtime_put(dev) causes rpm_idle() to be queued up and
the driver may be gone already when that function is executed.
That breaks the assumptions the drivers have the right to make
about the core's behavior on the basis of the existing documentation
and actually causes problems to happen, so revert that part of
commit fa180eb448fa and restore the previous behavior of
__device_release_driver().

Reported-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Fixes: fa180eb448fa (PM / Runtime: Idle devices asynchronously after probe|release)
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Kevin Hilman <khilman@linaro.org>
Acked-by: Ulf Hansson <ulf.hansson@linaro.org>
Cc: 3.10+ <stable@vger.kernel.org> # 3.10+
10 years agoACPI / event: remove unneeded NULL pointer check
Mathias Krause [Tue, 5 Nov 2013 20:25:32 +0000 (21:25 +0100)]
ACPI / event: remove unneeded NULL pointer check

nla_data() cannot return NULL as it simply adds NLA_HDRLEN to the
passed pointer. The NULL pointer check is therefore superfluous.
Remove it.

Found by smatch:
  drivers/acpi/event.c:130 acpi_bus_generate_netlink_event() warn: can
  'event' even be NULL?

Signed-off-by: Mathias Krause <minipli@googlemail.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoRevert "ACPI / video: Ignore BIOS initial backlight value for HP 250 G1"
Aaron Lu [Wed, 6 Nov 2013 01:18:16 +0000 (09:18 +0800)]
Revert "ACPI / video: Ignore BIOS initial backlight value for HP 250 G1"

This reverts commit e37f14a5fb85522f3bbf88ece6134c4e610ed598.

It turned out other systems also share the same problem with bug 63111
so I made a patch to catch initial brightness level 0 problem. With that
patch applied, we do not need to place HP 250 G1 in DMI table.

References: https://bugzilla.kernel.org/show_bug.cgi?id=63111
Signed-off-by: Aaron Lu <aaron.lu@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoACPI / video: Quirk initial backlight level 0
Aaron Lu [Wed, 6 Nov 2013 01:07:10 +0000 (09:07 +0800)]
ACPI / video: Quirk initial backlight level 0

Some firmware doesn't initialize initial backlight level to a proper
value and _BQC will return 0 on first time evaluation. We used to be
able to detect such incorrect value with our code logic, as value 0
normally isn't a valid value in _BCL. But with the introduction of Win8,
firmware begins to fill _BCL with values from 0 to 100, now 0 becomes
a valid value but that value will make user's screen black. This patch
test initial _BQC for value 0, if such a value is returned, do not use
it.

References: https://bugzilla.kernel.org/show_bug.cgi?id=64031
References: https://bugzilla.kernel.org/show_bug.cgi?id=61231
References: https://bugzilla.kernel.org/show_bug.cgi?id=63111
Reported-by: Qingshuai Tian <qingshuai.tian@intel.com>
Tested-by: Aaron Lu <aaron.lu@intel.com> # on "Idealpad u330p"
Reported-and-tested-by: <erno@iki.fi> # on "Acer Aspire V5-573G"
Reported-and-tested-by: Kirill Tkhai <tkhai@yandex.ru> # on "HP 250 G1"
Signed-off-by: Aaron Lu <aaron.lu@intel.com>
Cc: All applicable <stable@vger.kernel.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoACPI / video: Fix initial level validity test
Aaron Lu [Wed, 6 Nov 2013 01:03:15 +0000 (09:03 +0800)]
ACPI / video: Fix initial level validity test

When testing if the firmware's initial value is valid, we should use
the corrected level value instead of the raw value returned from
firmware.

Signed-off-by: Aaron Lu <aaron.lu@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agointel_pstate: skip the driver if ACPI has power mgmt option
Adrian Huang [Thu, 31 Oct 2013 15:24:05 +0000 (23:24 +0800)]
intel_pstate: skip the driver if ACPI has power mgmt option

Do not load the Intel pstate driver if the platform firmware
(ACPI BIOS) supports the power management alternatives.
The ACPI BIOS indicates that the OS control mode can be used
if the _PSS (Performance Supported States) is defined in ACPI
table. For the OS control mode, the Intel pstate driver will be
loaded.

HP BIOS has several power management modes (firmware, OS-control and
so on). For the OS control mode in HP BIOS, the Intel p-state driver
will be loaded. When the customer chooses the firmware power
management in HP BIOS, the Intel p-state driver will be ignored.

I put hw_vendor_info vendor_info in case other vendors (Dell, Lenovo...)
have their firmware power management. Vendors should make sure their
firmware power management works properly, and they can go for adding
their vendor info to the variable.

I have verified the patch on HP ProLiant servers.  The patch worked
correctly.

Signed-off-by: Adrian Huang <adrianhuang0701@gmail.com>
[rjw: Fixed up !CONFIG_ACPI build]
[Linda Knippers: As Adrian has recently left HP, I retested the
updated patch on an HP ProLiant server and verified that it is
behaving correctly.  When the BIOS is configured for OS control for
power management, the intel_pstate driver loads as expected.  When
the BIOS is configured to provide the power management, the
intel_pstate driver does not load and we get the pcc_cpufreq driver
instead.]
Signed-off-by: Linda Knippers <linda.knippers@hp.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoPM / hibernate: Avoid overflow in hibernate_preallocate_memory()
Aaron Lu [Wed, 6 Nov 2013 00:41:31 +0000 (08:41 +0800)]
PM / hibernate: Avoid overflow in hibernate_preallocate_memory()

When system has a lot of highmem (e.g. 16GiB using a 32 bits kernel),
the code to calculate how much memory we need to preallocate in
normal zone may cause overflow. As Leon has analysed:

 It looks that during computing 'alloc' variable there is overflow:
 alloc = (3943404 - 1970542) - 1978280 = -5418 (signed)
 And this function goes to err_out.

Fix this by avoiding that overflow.

References: https://bugzilla.kernel.org/show_bug.cgi?id=60817
Reported-and-tested-by: Leon Drugi <eyak@wp.pl>
Cc: All applicable <stable@vger.kernel.org>
Signed-off-by: Aaron Lu <aaron.lu@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoACPI / hotplug: Do not execute "insert in progress" _OST
Rafael J. Wysocki [Thu, 7 Nov 2013 00:42:17 +0000 (01:42 +0100)]
ACPI / hotplug: Do not execute "insert in progress" _OST

According to the ACPI spec (5.0, Section 6.3.5), the "Device
insertion in progress (pending)" (0x80) _OST status code is
reserved for the "Insertion Processing" (0x200) source event
which is "a result of an OSPM action".  Specifically, it is not
a notification, so that status code should not be used during
notification processing, which unfortunately is done by
acpi_scan_bus_device_check().

For this reason, drop the ACPI_OST_SC_INSERT_IN_PROGRESS _OST
status evaluation from there (it was a mistake to put it in there
in the first place).

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Cc: All applicable <stable@vger.kernel.org>
10 years agoACPI / hotplug: Carry out PCI root eject directly
Rafael J. Wysocki [Thu, 7 Nov 2013 00:42:09 +0000 (01:42 +0100)]
ACPI / hotplug: Carry out PCI root eject directly

Since _handle_hotplug_event_root() is run from the ACPI hotplug
workqueue, it doesn't need to queue up a work item to eject a PCI
host bridge on the same workqueue.  Instead, it can just carry out
the eject by calling acpi_bus_device_eject() directly, so make that
happen.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoACPI / hotplug: Merge device hot-removal routines
Rafael J. Wysocki [Thu, 7 Nov 2013 00:41:58 +0000 (01:41 +0100)]
ACPI / hotplug: Merge device hot-removal routines

There is no real reasn why acpi_bus_device_eject() and
acpi_bus_hot_remove_device() should work differently, so rework
acpi_bus_device_eject() so that it can be called internally by
both acpi_bus_hot_remove_device() and acpi_eject_store_work().
Accordingly, rework acpi_hotplug_notify_cb() to queue up the
execution of acpi_bus_hot_remove_device() through
acpi_os_hotplug_execute() on eject request notifications.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Toshi Kani <toshi.kani@hp.com>
10 years agoACPI / hotplug: Make acpi_bus_hot_remove_device() internal
Rafael J. Wysocki [Thu, 7 Nov 2013 00:41:48 +0000 (01:41 +0100)]
ACPI / hotplug: Make acpi_bus_hot_remove_device() internal

Notice that handle_root_bridge_removal() is the only user of
acpi_bus_hot_remove_device(), so it doesn't have to be exported
any more and can be made internal to the ACPI core.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Toshi Kani <toshi.kani@hp.com>
10 years agoACPI / hotplug: Simplify device ejection routines
Rafael J. Wysocki [Thu, 7 Nov 2013 00:41:39 +0000 (01:41 +0100)]
ACPI / hotplug: Simplify device ejection routines

Simplify handle_root_bridge_removal() and acpi_eject_store() by
getting rid of struct acpi_eject_event and passing device objects
directly to async routines executed via acpi_os_hotplug_execute().

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Toshi Kani <toshi.kani@hp.com>
10 years agoACPI / hotplug: Fix handle_root_bridge_removal()
Rafael J. Wysocki [Thu, 7 Nov 2013 00:41:27 +0000 (01:41 +0100)]
ACPI / hotplug: Fix handle_root_bridge_removal()

It is required to do get_device() on the struct acpi_device in
question before passing it to acpi_bus_hot_remove_device() through
acpi_os_hotplug_execute(), because acpi_bus_hot_remove_device()
calls acpi_scan_hot_remove() that does put_device() on that
object.

The ACPI PCI root removal routine, handle_root_bridge_removal(),
doesn't do that, which may lead to premature freeing of the
device object or to executing put_device() on an object that
has been freed already.

Fix this problem by making handle_root_bridge_removal() use
get_device() as appropriate.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Toshi Kani <toshi.kani@hp.com>
Cc: All applicable <stable@vger.kernel.org>
10 years agoACPI / hotplug: Refuse to hot-remove all objects with disabled hotplug
Rafael J. Wysocki [Thu, 7 Nov 2013 00:41:14 +0000 (01:41 +0100)]
ACPI / hotplug: Refuse to hot-remove all objects with disabled hotplug

In theory, an ACPI device object may be the parent of another
device object whose hotplug is disabled by user space through its
scan handler.  In that case, the eject operation targeting the
parent should fail as though the parent's own hotplug was disabled,
but currently this is not the case, because acpi_scan_hot_remove()
doesn't check the disable/enable hotplug status of the children
of the top-most object passed to it.

To fix this, modify acpi_bus_offline_companions() to return an
error code if hotplug is disabled for the given device object.
[Also change the name of the function to acpi_bus_offline(),
because it is not only about companions any more, and change
the name of acpi_bus_online_companions() accordingly.]  Make
acpi_scan_hot_remove() propagate that error to its callers.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Toshi Kani <toshi.kani@hp.com>
10 years agoACPI / scan: Start matching drivers after trying scan handlers
Rafael J. Wysocki [Thu, 7 Nov 2013 00:41:01 +0000 (01:41 +0100)]
ACPI / scan: Start matching drivers after trying scan handlers

ACPI scan handlers should always be attached to struct acpi_device
objects before any ACPI drivers, but there is a window during which
a driver may be attached to a struct acpi_device before checking if
there is a matching scan handler.  Namely, that will happen if an
ACPI driver module is loaded during acpi_bus_scan() right after
the first namespace walk is complete and before the given device
is processed by the second namespace walk.

To prevent that from happening, set the match_driver flags of
struct acpi_device objects right before running device_attach()
for them in acpi_bus_device_attach().

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Toshi Kani <toshi.kani@hp.com>
10 years agoACPI: Remove acpi_pci_slot_init() headers from internal.h
Rafael J. Wysocki [Thu, 7 Nov 2013 00:40:50 +0000 (01:40 +0100)]
ACPI: Remove acpi_pci_slot_init() headers from internal.h

Since acpi_pci_slot_init() is now called from acpi_pci_init()
and pci-acpi.h contains its header, remove that header (and the
empty definition of that function for CONFIG_ACPI_PCI_SLOT unset)
from internal.h as it doesn't have to be there any more.  That also
avoids a build warning about duplicate function definitions for
CONFIG_ACPI_PCI_SLOT unset.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoACPI / blacklist: fix name of ThinkPad Edge E530
Felipe Contreras [Tue, 5 Nov 2013 07:20:42 +0000 (01:20 -0600)]
ACPI / blacklist: fix name of ThinkPad Edge E530

That is the advertised name.

http://shop.lenovo.com/us/en/laptops/thinkpad/edge-series/e530/

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoPowerCap: Fix build error with option -Werror=format-security
Srinivas Pandruvada [Mon, 4 Nov 2013 16:53:10 +0000 (08:53 -0800)]
PowerCap: Fix build error with option -Werror=format-security

Fix compile error with gcc option: -Werror=format-security for
dev_set_name(&control_type->dev, name).

Changed to dev_set_name(&control_type->dev, "%s", name).

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Acked-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agocpufreq: ondemand: Remove redundant return statement
Stratos Karafotis [Thu, 31 Oct 2013 18:27:36 +0000 (20:27 +0200)]
cpufreq: ondemand: Remove redundant return statement

After commit dfa5bb622555 (cpufreq: ondemand: Change the calculation
of target frequency), this return statement is no longer needed.

Reported-by: Henrik Nilsson <Karl.Henrik.Nilsson@gmail.com>
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>
10 years agoACPICA: Add __init for ACPICA initializers/finalizers.
Lv Zheng [Thu, 31 Oct 2013 01:31:24 +0000 (09:31 +0800)]
ACPICA: Add __init for ACPICA initializers/finalizers.

This patch adds __init to the ACPICA documented initializers:
  acpi_initialize_tables()
  acpi_initialize_subsystem()
  acpi_load_tables()
  acpi_enable_subsystem()
  acpi_initialize_objects()
and to acpi_reallocate_root_table(), acpi_find_root_pointer() which
are also meant to be called only during initialization.

This patch adds __init to the ACPICA documented finalizer:
  acpi_terminate()
as this finalizer is only called in __init function now.

This change helps to reduce source code differences between
ACPICA upstream and Linux.

[rjw: Changelog]
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoACPICA: Cleanup asmlinkage for ACPICA APIs.
Lv Zheng [Thu, 31 Oct 2013 01:31:18 +0000 (09:31 +0800)]
ACPICA: Cleanup asmlinkage for ACPICA APIs.

Add an asmlinkage wrapper around acpi_enter_sleep_state() to prevent
an empty stub from being called by assmebly code for ACPI_REDUCED_HARDWARE
set.

As arch/x86/kernel/acpi/wakeup_xx.S is only compiled when CONFIG_ACPI=y
and there are no users of ACPI_HARDWARE_REDUCED, currently this is in
fact not a real issue, but a cleanup to reduce source code differences
between Linux and ACPICA upstream.

[rjw: Changelog]
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoACPICA: Update acpidump related header file changes.
Lv Zheng [Thu, 31 Oct 2013 01:31:12 +0000 (09:31 +0800)]
ACPICA: Update acpidump related header file changes.

This patch updates header files used by acpidump to reduce the
source code differences between Linux and ACPICA upstream.

This patch does not affect the generation of the Linux kernel binary.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoACPICA: Update compilation environment settings.
Lv Zheng [Thu, 31 Oct 2013 01:31:06 +0000 (09:31 +0800)]
ACPICA: Update compilation environment settings.

This patch updates architecture specific environment settings to reduce
source differences between Linux and ACPICA upstream.

This patch does not affect the generation of the Linux kernel binary.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoACPICA: Fix cached object deletion code.
Lv Zheng [Thu, 31 Oct 2013 01:31:00 +0000 (09:31 +0800)]
ACPICA: Fix cached object deletion code.

Function acpi_ut_delete_caches() is meant to be used to implement
ACPI_ALLOCATE()/ACPI_FREE() mechanisms in ACPICA, so it should call
acpi_os_free() rather than ACPI_FREE().  Linux is not affected by this
issue as it uses kmem_cache instead of the ACPICA local cache, but
the change helps to reduce source code differences between Linux and
ACPICA upstream.

[rjw: Changelog]
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoACPICA: Remove dead AOPOBJ_INVALID check.
Lv Zheng [Thu, 31 Oct 2013 01:30:53 +0000 (09:30 +0800)]
ACPICA: Remove dead AOPOBJ_INVALID check.

Reversion commit 7cb7f45c7fee (Revert "ACPICA: Remove obsolete
acpi_os_validate_address interface") restored a piece of dead code
related to an obselete AOPOBJ_INVALID flag.  Remove that code again.

This helps to reduce source code differences between Linux and ACPICA
upstream.

[rjw: Changelog]
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoACPICA: Cleanup useless memset invocations.
Lv Zheng [Thu, 31 Oct 2013 01:30:48 +0000 (09:30 +0800)]
ACPICA: Cleanup useless memset invocations.

This patch removes unnecessary memset() invocations where
kmem_cache_zalloc() is used for allocating memory.  It also helps to
reduce source code differences between ACPICA upstream and Linux.

[rjw: Changelog]
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoACPICA: Fix an ACPI_ALLOCATE_ZEROED() reversal.
Lv Zheng [Thu, 31 Oct 2013 01:30:42 +0000 (09:30 +0800)]
ACPICA: Fix an ACPI_ALLOCATE_ZEROED() reversal.

ACPI_FREE() should always be used to free objects allocated with
ACPI_ALLOCATE_ZEROED(), so make acpi_ut_create_package_object() do
that.

This patch ports a fix from ACPICA upstream to Linux and helps to
reduce source code differences between them.

[rjw: Changelog]
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoACPICA: Fix wrong object length returned by acpi_ut_get_simple_object_size().
Lv Zheng [Thu, 31 Oct 2013 01:30:36 +0000 (09:30 +0800)]
ACPICA: Fix wrong object length returned by acpi_ut_get_simple_object_size().

The object length returned by acpi_ut_get_simple_object_size() should
be rounded up to the closest word boundary.

This patch ports a fix from ACPICA upstream to Linux.

[rjw: Changelog]
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoACPICA: Add new statistics interface.
Lv Zheng [Thu, 31 Oct 2013 01:30:28 +0000 (09:30 +0800)]
ACPICA: Add new statistics interface.

This patch ports new counters and statistics interface, already
implemented in ACPICA upstream, to Linux.  That helps to reduce
source code differences between Linux and ACPICA upstream.

[rjw: Changelog]
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoACPICA: Update DMAR table definitions.
Lv Zheng [Thu, 31 Oct 2013 01:30:22 +0000 (09:30 +0800)]
ACPICA: Update DMAR table definitions.

This patch updates DMAR table header definitions as such enhancement
has been made in ACPICA upstream already.  It ports that change to
the Linux source to reduce source code differences between Linux and
ACPICA upstream.

Build test done on x86-64 machine with the following configs enabled:
  CONFIG_DMAR_TABLE
  CONFIG_IRQ_REMAP
  CONFIG_INTEL_IOMMU

This patch does not affect the generation of the Linux kernel binary.

[rjw: Changelog]
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoACPICA: Update RSDP table definitions.
Lv Zheng [Thu, 31 Oct 2013 01:30:16 +0000 (09:30 +0800)]
ACPICA: Update RSDP table definitions.

This patch updates RSDP table header definitions as such enhancement
has been made in ACPICA upstream already.  It ports that change to
the Linux source to reduce source code differences between Linux and
ACPICA upstream.

This patch does not affect the generation of the Linux kernel binary.

[rjw: Changelog]
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoACPICA: Update namespace dump code.
Lv Zheng [Thu, 31 Oct 2013 01:30:10 +0000 (09:30 +0800)]
ACPICA: Update namespace dump code.

This patch merges namespace dump code updates from ACPICA upstream to
reduce the source code differences between Linux and ACPICA upstream.  No
functional changes as currently nsdumpdv.c is not used by Linux.

This patch does not affect the generation of the Linux kernel binary.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoACPICA: Update check for setting the ANOBJ_IS_EXTERNAL flag.
Lv Zheng [Thu, 31 Oct 2013 01:30:04 +0000 (09:30 +0800)]
ACPICA: Update check for setting the ANOBJ_IS_EXTERNAL flag.

The ANOBJ_IS_EXTERNAL flag is only used by an ACPICA utilities - iASL.

No functional change for the Linux kernel should results from applying
this patch, but it helps to reduce source code differences between
the kernel and ACPICA upstream.

[rjw: Subject and changelog]
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoACPICA: Update default space handlers.
Lv Zheng [Thu, 31 Oct 2013 01:29:49 +0000 (09:29 +0800)]
ACPICA: Update default space handlers.

This patch adds code that is already in ACPICA upstream, so applying
it can help to reduce the source code differences between Linux and
ACPICA upstream.

This code fragment is only useful for ACPICA utilities and no
functional changes to the Linux kernel should result from it.

[rjw: Changelog]
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoACPICA: Update version to 20130927.
Bob Moore [Tue, 29 Oct 2013 01:30:48 +0000 (09:30 +0800)]
ACPICA: Update version to 20130927.

Version 20130927.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoACPICA: Update aclinux.h for new OSL override mechanism.
Lv Zheng [Tue, 29 Oct 2013 01:30:41 +0000 (09:30 +0800)]
ACPICA: Update aclinux.h for new OSL override mechanism.

The new ACPICA OSL override mechanism is used to solve these issues
for the Linux OSL:
 1. Linux can implement OSL using a macro.
 2. Linux can implement OSL using an inlined function.
 3. Linux can leave OSL not implemented for __KERNEL__ undefined code
    fragments.
 4. Linux can add sparse declarators (__iomem) to OSL.
 5. Linux can add memory tuning declarators (__init/__exit) to OSL.
This patch also moves Linux specific OSL to aclinux.h which has not been
maintained in the ACPICA code base.  Lv Zheng.

Known issue:

 From ACPICA's perspective, actypes.h should be included after inclusion
 of acenv.h.  But currently in Linux, aclinux.h included by acenv.h has
 included actypes.h to find ACPICA types for inline functions.  This is a
 known and existing issue and currently there is no real problem caused
 by this issue for Linux kernel build.  Thus this issue is not covered by
 this cleanup commit.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoACPICA: Add support to allow host OS to redefine individual OSL prototypes.
Lv Zheng [Tue, 29 Oct 2013 01:30:35 +0000 (09:30 +0800)]
ACPICA: Add support to allow host OS to redefine individual OSL prototypes.

This change enables the host OS to redefine OSL prototypes found in the
acpiosxf.h file. This allows the host OS to implement OSL interfaces with
a macro or inlined function. Further, it allows the host OS to add any
additional required modifiers such as __iomem, __init, __exit, etc.,
as necessary on a per-interface basis. Enables maximum flexibility
for the OSL interfaces. Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoACPICA: Simplify configuration of global ACPI_REDUCED_HARDWARE macro.
Bob Moore [Tue, 29 Oct 2013 01:30:29 +0000 (09:30 +0800)]
ACPICA: Simplify configuration of global ACPI_REDUCED_HARDWARE macro.

Surround definition of this with a #ifndef so that the kernel
can define it elsewhere if desired.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoACPICA: Fix indentation issues for macro invocations.
Lv Zheng [Tue, 29 Oct 2013 01:30:22 +0000 (09:30 +0800)]
ACPICA: Fix indentation issues for macro invocations.

During the automatic translation of the upstream ACPICA source code
into Linux kernel source code some extra white spaces are added by
the "indent" program at the beginning of each line which is an
invocation of a macro and there is no ";" at the end of the line.

For this reason, a new mode has been added to the translation scripts
to remove the extra spaces inserted before invoking such macros and add
an empty line between the invocations of such macros (like the other
function declarations).  This new mode is executed after executing
"indent" during the Linux release process.  Consequently, some
existing ACPICA source code in the Linux kernel tree needs to be
adjusted to allow the new scripts to work correctly.

The affected macros and files are:
 1. ACPI_HW_DEPENDENT_RETURN (acpixf.h/acdebug.h/acevents.h):
    This macro is used as a wrapper for hardware dependent APIs to offer
    a stub when the reduced hardware is configured during compilation.
 2. ACPI_EXPORT_SYMBOL (utglobal.c):
    This macro is used by Linux to export symbols to be found by Linux
    modules.  All such invocations are well formatted except those
    exported as global variables.

This can help to reduce the source code differences between Linux
and upstream ACPICA, and also help to automate the release process.
No functional or binary generation changes should result from it.
Lv Zheng.

[rjw: Changelog]
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoACPICA: Prevent possible build issues for use of ACPI_PRINTF_LIKE macro
Lv Zheng [Tue, 29 Oct 2013 01:30:16 +0000 (09:30 +0800)]
ACPICA: Prevent possible build issues for use of ACPI_PRINTF_LIKE macro

The following build error:
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   CC      arch/x86/kernel/setup.o
 In file included from include/acpi/acpi.h:64:0,
                  from include/linux/iscsi_ibft.h:24,
                  from arch/x86/kernel/setup.c:43:
 include/acpi/acpixf.h:543:1: error: expected ',' or ';' before '{' token
 include/acpi/acpixf.h:540:1: warning: 'acpi_error' declared 'static' but never defined [-Wunused-function]
 make[2]: *** [arch/x86/kernel/setup.o] Error 1
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
can be triggerred by the following stub function (if implemented):
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 static inline void ACPI_INTERNAL_VAR_XFACE
 acpi_error(const char *module_name,
     u32 line_number, const char *format, ...) ACPI_PRINTF_LIKE(3)
 {
 }
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This patch changes the position of ACPI_PRINTF_LIKE(x) to follow the
style of __printf(x, x+1) used in Linux to prevent such issues from
happening.  Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoACPICA: Deploy ACPI_EXPORT_SYMBOL_INIT for main ACPICA initialization interfaces.
Lv Zheng [Tue, 29 Oct 2013 01:30:10 +0000 (09:30 +0800)]
ACPICA: Deploy ACPI_EXPORT_SYMBOL_INIT for main ACPICA initialization interfaces.

This changes can reduce source code differences between Linux and ACPICA
upstream to help improving the release automation.

The side effect of applying this patch in Linux is:
1. Some ACPICA initialization/termination APIs are no longer exported in
   Linux, these include:
    acpi_load_tables
    acpi_initialize_subsystem
    acpi_enable_subsystem
    acpi_initialize_objects
    acpi_terminate
2. This patch does not affect the following APIs as they are currently not
   marked with ACPI_EXPORT_SYMBOL in Linux:
    acpi_reallocate_root_table
    acpi_initialize_tables
Such functions should not be exported as they are internal to ACPI
subsystem in Linux, and will only be invoked inside of ACPI subsystem's
initialization routines marked with __init and termination routines marked
with __exit.  While on other OSPMs, such functions may still need to be
exported.

Thus this patch adds the configurability for ACPICA, so that it leaves
OSPMs to determine if the __init/__exit marked functions should be exported
or not.  Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoACPICA: Linuxize: Change indentation of C labels.
Lv Zheng [Tue, 29 Oct 2013 01:30:02 +0000 (09:30 +0800)]
ACPICA: Linuxize: Change indentation of C labels.

It is reported by kernel build test systems that all ACPICA source
files in the kernel tree have incorrect label indentation.  This
patch changes default indent option used in the release process to
fix this bug.  Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoACPICA: Clarify ACPI_FREE_BUFFER usage.
Bob Moore [Tue, 29 Oct 2013 01:29:57 +0000 (09:29 +0800)]
ACPICA: Clarify ACPI_FREE_BUFFER usage.

Add a comment to clarify reason for using ACPI_FREE_BUFFER directly
instead of ACPI_FREE.

In addition to that, change one instance in which ACPI_FREE_BUFFER()
should be used instead of ACPI_FREE().

[rjw: Subject and changelog]
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoACPICA: Add EXPORT_ACPI_INTERFACES macro to external interface modules.
Lv Zheng [Tue, 29 Oct 2013 01:29:51 +0000 (09:29 +0800)]
ACPICA: Add EXPORT_ACPI_INTERFACES macro to external interface modules.

For Linux, there are no functional changes/binary generation differences
introduced by this patch.

This change adds a new macro to all files that contain external ACPICA
interfaces. It can be detected and used by the host (via the host-specific
header) for any special processing required for such modules. Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agocpufreq: move freq change notifications to cpufreq core
Viresh Kumar [Wed, 14 Aug 2013 14:08:24 +0000 (19:38 +0530)]
cpufreq: move freq change notifications to cpufreq core

Most of the drivers do following in their ->target_index() routines:

struct cpufreq_freqs freqs;
freqs.old = old freq...
freqs.new = new freq...

cpufreq_notify_transition(policy, &freqs, CPUFREQ_PRECHANGE);

/* Change rate here */

cpufreq_notify_transition(policy, &freqs, CPUFREQ_POSTCHANGE);

This is replicated over all cpufreq drivers today and there doesn't exists a
good enough reason why this shouldn't be moved to cpufreq core instead.

There are few special cases though, like exynos5440, which doesn't do everything
on the call to ->target_index() routine and call some kind of bottom halves for
doing this work, work/tasklet/etc..

They may continue doing notification from their own code as flag:
CPUFREQ_ASYNC_NOTIFICATION is already set for them.

All drivers are also modified in this patch to avoid breaking 'git bisect', as
double notification would happen otherwise.

Acked-by: Hans-Christian Egtvedt <egtvedt@samfundet.no>
Acked-by: Jesper Nilsson <jesper.nilsson@axis.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Russell King <linux@arm.linux.org.uk>
Acked-by: Stephen Warren <swarren@nvidia.com>
Tested-by: Andrew Lunn <andrew@lunn.ch>
Tested-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Reviewed-by: Lan Tianyu <tianyu.lan@intel.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agocpufreq: distinguish drivers that do asynchronous notifications
Viresh Kumar [Tue, 29 Oct 2013 13:26:06 +0000 (18:56 +0530)]
cpufreq: distinguish drivers that do asynchronous notifications

There are few special cases like exynos5440 which doesn't send POSTCHANGE
notification from their ->target() routine and call some kind of bottom halves
for doing this work, work/tasklet/etc.. From which they finally send POSTCHANGE
notification.

Its better if we distinguish them from other cpufreq drivers in some way so that
core can handle them specially. So this patch introduces another flag:
CPUFREQ_ASYNC_NOTIFICATION, which will be set by such drivers.

This also changes exynos5440-cpufreq.c and powernow-k8 in order to set this
flag.

Acked-by: Amit Daniel Kachhap <amit.daniel@samsung.com>
Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agocpufreq/intel_pstate: Add static declarations to internal functions
Dirk Brandewie [Wed, 30 Oct 2013 15:38:32 +0000 (08:38 -0700)]
cpufreq/intel_pstate: Add static declarations to internal functions

Fixes warnings reported by kbuild test robot

sparse warnings: (new ones prefixed by >>)

drivers/cpufreq/intel_pstate.c:729:6: sparse: symbol 'copy_pid_params' was not declared. Should it be static?
drivers/cpufreq/intel_pstate.c:739:6: sparse: symbol 'copy_cpu_funcs' was not declared. Should it be static?

Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agocpufreq: arm_big_little: reconfigure switcher behavior at run time
Nicolas Pitre [Wed, 30 Oct 2013 19:44:41 +0000 (15:44 -0400)]
cpufreq: arm_big_little: reconfigure switcher behavior at run time

The b.L switcher can be turned on/off at run time.  It is therefore
necessary to change the cpufreq driver behavior accordingly.

The driver must be unregistered/registered with the cpufreq core
to reconfigure freq tables for the virtual or actual CPUs. This is
accomplished via the b.L switcher notifier callback.

Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agocpufreq: arm_big_little: add in-kernel switching (IKS) support
Viresh Kumar [Wed, 30 Oct 2013 19:44:40 +0000 (15:44 -0400)]
cpufreq: arm_big_little: add in-kernel switching (IKS) support

This patch adds IKS (In Kernel Switcher) support to cpufreq driver.

This creates a combined freq table for A7-A15 CPU pairs. A7 frequencies
are virtualized and scaled down to half the actual frequencies to
approximate a linear scale across the combined A7+A15 range. When the
requested frequency change crosses the A7-A15 boundary a cluster switch
is invoked.

Based on earlier work from Sudeep KarkadaNagesha.

Signed-off-by: Sudeep KarkadaNagesha <sudeep.karkadanagesha@arm.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoARM: EXYNOS: Remove incorrect __init annotation from cpuidle driver
Jingoo Han [Mon, 21 Oct 2013 01:53:03 +0000 (10:53 +0900)]
ARM: EXYNOS: Remove incorrect __init annotation from cpuidle driver

When platform_driver_probe() is not used, bind/unbind via sysfs is
enabled.  Thus, __init annotation should be removed from probe().
Also, this patch fixes section mismatch warning.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoARM: EXYNOS: Use dev_err() instead of printk() for cpuidle driver
Jingoo Han [Mon, 21 Oct 2013 01:52:15 +0000 (10:52 +0900)]
ARM: EXYNOS: Use dev_err() instead of printk() for cpuidle driver

Change raw printk() call to dev_err() to provide a better message
to userspace so it can properly identify the device.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoACPICA: Hardcode access width for the reset register.
Bob Moore [Tue, 29 Oct 2013 01:29:45 +0000 (09:29 +0800)]
ACPICA: Hardcode access width for the reset register.

The ACPI spec requires the reset register width to be 8, so we
now hardcode it and ignore the FADT value. This provides/maintains
compatibility with other ACPI implementations that have allowed
BIOS code with bad register width values to go unnoticed.
Matthew Garett, Bob Moore, Lv Zheng.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoACPICA: Fix possible memory leaks in the GPE handling.
Lv Zheng [Tue, 29 Oct 2013 01:29:40 +0000 (09:29 +0800)]
ACPICA: Fix possible memory leaks in the GPE handling.

This change fixes potential memory leaks in the error paths of the GPE
handling code. Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoACPICA: Predefine name macros: Sort list.
Bob Moore [Tue, 29 Oct 2013 01:29:34 +0000 (09:29 +0800)]
ACPICA: Predefine name macros: Sort list.

Sort the method names in acnames.h.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoACPICA: Cleanup memory allocation macros and configurability.
Lv Zheng [Tue, 29 Oct 2013 01:29:27 +0000 (09:29 +0800)]
ACPICA: Cleanup memory allocation macros and configurability.

In the common case, the ACPI_ALLOCATE and related macros now resolve
directly to their respective acpi_os* OSL interfaces. Two options:
1) The ACPI_ALLOCATE_ZEROED macro defaults to a simple local implementation
   by default, unless overridden by the USE_NATIVE_ALLOCATE_ZEROED define.
2) For ACPI execution simulation environment (AcpiExec) which is not
   shipped with the Linux kernel, the macros can optionally be resolved to
   the local interfaces that track each allocation (used to immediately
   detect memory leaks).

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoACPICA: Add safe versions of common string functions.
Bob Moore [Tue, 29 Oct 2013 01:29:21 +0000 (09:29 +0800)]
ACPICA: Add safe versions of common string functions.

This change adds and deploys "safe" versions of strcpy and strcat that
ensure that the target buffer does not overflow. These safe functions
are only helpful for processing user input and command lines. For most
ACPICA code however, the required buffer length is precisely calculated
before buffer allocation, so the use of these functions is unnecessary.
ACPICA BZ 1043.

This change only applies to the ACPICA utilities and the debugger, none
of which are not shipped with the kernel yet, so the kernel's behavior
remains unchanged after it.

References: https://bugs.acpica.org/show_bug.cgi?id=1043
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoACPICA: Fix a macro for the hardware-reduced case
Bob Moore [Tue, 29 Oct 2013 01:29:16 +0000 (09:29 +0800)]
ACPICA: Fix a macro for the hardware-reduced case

This fix repairs a version of a macro that is used for the hardware
reduced case only. It adds a return statement to the macro definition
so that the translation into the Linux kernel source will not completely
delete the second line of the macro because it thinks that it is an empty
block. It actually clarifies the use of the macro anyway.

Reported-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoACPICA: Add history/line-editing for Unix/Linux systems.
Bob Moore [Tue, 29 Oct 2013 01:29:09 +0000 (09:29 +0800)]
ACPICA: Add history/line-editing for Unix/Linux systems.

The original upstream ACPICA change added full history and limited
line editing to the debugger:

 This change adds full history and limited line editing for Unix and
 Linux systems. It does not use readline() because of portability issues.
 Instead it uses the POSIX termio interface to put the terminal in raw
 input mode so that the various special keys can be trapped (such as
 up-arrow and down-arrow for history support).

Since the debugger is not shipped in the kernel, it only is necessary
to update one header file to keep the kernel source in sync with the
upstream.

[rjw: Changelog]
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoACPICA: Add a check for a null node during namespace walk.
Bob Moore [Tue, 29 Oct 2013 01:29:04 +0000 (09:29 +0800)]
ACPICA: Add a check for a null node during namespace walk.

Mostly for consistency. ACPICA BZ 1042.

Actually, currently no one is experiencing problem without this check
as the obj_handle is guaranteed to be valid.

References: https://bugs.acpica.org/show_bug.cgi?id=1042
Reported-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoACPICA: Table print header function: Increase default width for table length.
Bob Moore [Tue, 29 Oct 2013 01:28:56 +0000 (09:28 +0800)]
ACPICA: Table print header function: Increase default width for table length.

This change increases the default width for the length of tables from
5 to 6, to improve alignment/readability on systems with large tables.
These are being seen more frequently, especially large DSDTs (greater
than 1 MB).

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoACPICA: Ensure that debug output is immediately disabled on termination.
Tomasz Nowicki [Tue, 29 Oct 2013 01:28:49 +0000 (09:28 +0800)]
ACPICA: Ensure that debug output is immediately disabled on termination.

Set the global debug flag to "no output" when the debugger is shutdown.
ACPICA BZ 1011. Tomasz Nowicki.

Since the debugger is not shipped in the Linux kernel upstream, this
change doesn't affect Linux kernel's behavior.

References: https://bugs.acpica.org/show_bug.cgi?id=1011
Signed-off-by: Tomasz Nowicki <tomasz.nowicki@linaro.org>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoMerge back earlier devfreq material for v3.13.
Rafael J. Wysocki [Wed, 30 Oct 2013 00:38:38 +0000 (01:38 +0100)]
Merge back earlier devfreq material for v3.13.

10 years agoMerge branch 'for-rafael' of git://git.kernel.org/pub/scm/linux/kernel/git/mzx/devfre...
Rafael J. Wysocki [Wed, 30 Oct 2013 00:37:02 +0000 (01:37 +0100)]
Merge branch 'for-rafael' of git://git.kernel.org/pub/scm/linux/kernel/git/mzx/devfreq into pm-devfreq

Pull devfreq fixes from MyungJoo Ham.

* 'for-rafael' of git://git.kernel.org/pub/scm/linux/kernel/git/mzx/devfreq:
  PM / devfreq: create_freezable_workqueue() doesn't return an ERR_PTR
  PM / devfreq: Remove duplicate header file inclusion in exynos5_bus.c
  PM / devfreq: Use devm_* APIs in exynos5_bus.c
  PM / devfreq: Remove redundant platform_set_drvdata() in exynos5_bus.c
  PM / devfreq: Fix incorrect usage of IS_ERR_OR_NULL in exynos5_bus.c

10 years agointel_idle: use CPU_TASKS_FROZEN instead of a numeric constant
Prarit Bhargava [Wed, 23 Oct 2013 13:44:51 +0000 (09:44 -0400)]
intel_idle: use CPU_TASKS_FROZEN instead of a numeric constant

Small fixup to use CPU_TASKS_FROZEN instead of 0xf.

Signed-off-by: Prarit Bhargava <prarit@redhat.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agocpuidle: remove cpuidle_unregister_governor()
Viresh Kumar [Thu, 3 Oct 2013 15:56:55 +0000 (21:26 +0530)]
cpuidle: remove cpuidle_unregister_governor()

cpuidle_unregister_governor() and cpuidle_replace_governor() aren't
used anymore and can be removed. They were used by cpufreq governors
earlier, but since the governors can't be compiled as modules any
more, these two functions aren't necessary.

Suggested-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agocpuidle: don't call poll_idle_init() for every cpu
Viresh Kumar [Thu, 3 Oct 2013 15:56:54 +0000 (21:26 +0530)]
cpuidle: don't call poll_idle_init() for every cpu

poll_idle_init() just initializes drv->states[0] and so that is
required to be done only once for each driver.  Currently, it is
called from cpuidle_enable_device() which is called for every CPU
that the driver supports.  That is not required, so move it to a
better place and call it from __cpuidle_register_driver() so that
the initialization is carried out only once.

Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agocpuidle: use drv instead of cpuidle_driver in show_current_driver()
Viresh Kumar [Thu, 3 Oct 2013 15:56:51 +0000 (21:26 +0530)]
cpuidle: use drv instead of cpuidle_driver in show_current_driver()

Instances of "struct cpuidle_driver *" are consistently named as "drv"
in the cpuidle core except in show_current_driver().

Make that function use variable naming consistent with the rest of the
code.

[rjw: Changelog]
Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agocpuidle: call cpuidle_get_driver() from after taking cpuidle_driver_lock
Viresh Kumar [Thu, 3 Oct 2013 15:56:50 +0000 (21:26 +0530)]
cpuidle: call cpuidle_get_driver() from after taking cpuidle_driver_lock

There are a few cpuidle_get_driver() calls that aren't made under
cpuidle_driver_lock which is incorrect.

Fix them by calling cpuidle_get_driver() after taking cpuidle_driver_lock.

Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agocpuidle: replace multiline statements with single line in cpuidle_idle_call()
Viresh Kumar [Thu, 3 Oct 2013 15:56:49 +0000 (21:26 +0530)]
cpuidle: replace multiline statements with single line in cpuidle_idle_call()

Few statements in cpuidle_idle_call() are broken into multiple lines,
although that isn't really necessary. Convert those to single line.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agocpuidle: reduce code duplication inside cpuidle_idle_call()
Viresh Kumar [Thu, 3 Oct 2013 15:56:48 +0000 (21:26 +0530)]
cpuidle: reduce code duplication inside cpuidle_idle_call()

We are doing this twice in cpuidle_idle_call() routine:
drv->states[next_state].flags & CPUIDLE_FLAG_TIMER_STOP

Would be better if we actually store this in a local variable and
use that. That reduces code duplication and likely makes this piece
of code run faster (in case the compiler wasn't able to optimize it
earlier)

[rjw: Cast the result of bitwise AND to bool explicitly using !!]
Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agocpuidle: merge two if() statements for checking error cases
Viresh Kumar [Thu, 3 Oct 2013 15:56:47 +0000 (21:26 +0530)]
cpuidle: merge two if() statements for checking error cases

Two checks cpuidle_idle_call() cause the same error code to be
returned if they fail, so merge them for clarity.

[rjw: Changelog]
Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agocpuidle: rearrange __cpuidle_register_device() to keep minimal exit points
Viresh Kumar [Thu, 3 Oct 2013 15:56:46 +0000 (21:26 +0530)]
cpuidle: rearrange __cpuidle_register_device() to keep minimal exit points

This patch rearranges __cpuidle_register_device() a bit in order to
reduce the number of exit points in that function.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agocpuidle: rearrange code in __cpuidle_driver_init()
Viresh Kumar [Thu, 3 Oct 2013 15:56:45 +0000 (21:26 +0530)]
cpuidle: rearrange code in __cpuidle_driver_init()

This is trivial patch that just reorders a few statements in
__cpuidle_driver_init() routine so that we don't need both 'continue'
and 'break' in the for loop. Functionally it shouldn't change anything.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agocpuidle: make __cpuidle_driver_init() return void
Viresh Kumar [Thu, 3 Oct 2013 15:56:44 +0000 (21:26 +0530)]
cpuidle: make __cpuidle_driver_init() return void

The only value returned by __cpuidle_driver_init() is 0, so it
very well may be a void function.

[rjw: Changelog]
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agocpuidle: make __cpuidle_device_init() return void
Viresh Kumar [Thu, 3 Oct 2013 15:56:43 +0000 (21:26 +0530)]
cpuidle: make __cpuidle_device_init() return void

The only value returned by __cpuidle_device_init() is 0, so it very
well may be a void function.  Make that happen.

[rjw: Changelog]
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agocpuidle: Fix comments in cpuidle core
Viresh Kumar [Thu, 3 Oct 2013 15:56:41 +0000 (21:26 +0530)]
cpuidle: Fix comments in cpuidle core

Some comments in cpuidle core files contain trivial mistakes.
This patch fixes them.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agocpuidle: fix indentation of cpumask
Viresh Kumar [Thu, 3 Oct 2013 15:56:40 +0000 (21:26 +0530)]
cpuidle: fix indentation of cpumask

Use tabs for cpumask indentation in struct cpuidle_driver.

[rjw: Changelog]
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoARM: vexpress/TC2: register vexpress-spc cpufreq device
Sudeep KarkadaNagesha [Tue, 29 Oct 2013 12:18:40 +0000 (12:18 +0000)]
ARM: vexpress/TC2: register vexpress-spc cpufreq device

This patch adds vexpress-spc platform device to enables the vexpress
SPC cpufreq interface driver.

Signed-off-by: Sudeep KarkadaNagesha <sudeep.karkadanagesha@arm.com>
Acked-by: Pawel Moll <Pawel.Moll@arm.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agocpufreq: arm_big_little: add vexpress SPC interface driver
Sudeep KarkadaNagesha [Tue, 29 Oct 2013 12:18:39 +0000 (12:18 +0000)]
cpufreq: arm_big_little: add vexpress SPC interface driver

The TC2(i.e. CA15_A7) Versatile Express has external Cortex M3 based
power controller which is responsible for CPU DVFS and SPC provides
the interface for the same.

This patch adds a tiny interface driver to check if OPPs are
initialised by SPC platform code and register the arm_big_little
cpufreq driver.

Signed-off-by: Sudeep KarkadaNagesha <sudeep.karkadanagesha@arm.com>
Acked-by: Nicolas Pitre <nico@linaro.org>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoARM: vexpress/TC2: add cpu clock support
Sudeep KarkadaNagesha [Tue, 29 Oct 2013 12:18:38 +0000 (12:18 +0000)]
ARM: vexpress/TC2: add cpu clock support

On TC2, the cpu clocks are controlled by the external M3 microcontroller
and SPC provides the interface between the CPU and the power controller.

The generic cpufreq drivers use the clock APIs to get the cpu clocks.
This patch add virtual spc clocks for all the cpus to control the cpu
operating frequency via the clock framework.

Signed-off-by: Sudeep KarkadaNagesha <sudeep.karkadanagesha@arm.com>
Acked-by: Nicolas Pitre <nico@linaro.org>
Acked-by: Pawel Moll <Pawel.Moll@arm.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoARM: vexpress/TC2: add support for CPU DVFS
Sudeep KarkadaNagesha [Tue, 29 Oct 2013 12:18:37 +0000 (12:18 +0000)]
ARM: vexpress/TC2: add support for CPU DVFS

SPC(Serial Power Controller) on TC2 also controls the CPU performance
operating points which is essential to provide CPU DVFS. The M3
microcontroller provides two sets of eight performance values, one set
for each cluster (CA15 or CA7). Each of this value contains the
frequency(kHz) and voltage(mV) at that performance level. It expects
these performance level to be passed through the SPC PERF_LVL registers.

This patch adds support to populate these performance levels from M3,
build the mapping to CPU OPPs at the boot and then use it to get and
set the CPU performance level runtime.

Signed-off-by: Sudeep KarkadaNagesha <sudeep.karkadanagesha@arm.com>
Acked-by: Nicolas Pitre <nico@linaro.org>
Acked-by: Pawel Moll <Pawel.Moll@arm.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoACPI: Fix spelling mistake in error messages
Colin Ian King [Tue, 29 Oct 2013 10:34:19 +0000 (10:34 +0000)]
ACPI: Fix spelling mistake in error messages

Fix spelling mistake "expecing" --> "expecting"

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoACPI / processor: Do not request ACPI cpufreq module directly
Rafael J. Wysocki [Tue, 29 Oct 2013 23:00:30 +0000 (00:00 +0100)]
ACPI / processor: Do not request ACPI cpufreq module directly

Function acpi_processor_load_module() used by the ACPI processor
driver can only really work if the acpi-cpufreq module is available
when acpi_processor_start() is executed which usually is not the case
for systems loading the processor driver module from an initramfs.

Moreover, that used to be a hackish workaround for module autoloading
issues, but udev loads acpi-cpufreq just fine nowadays, so that
function isn't really necessary any more.  For this reason, drop
acpi_processor_load_module() entirely.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoPM / devfreq: create_freezable_workqueue() doesn't return an ERR_PTR
Dan Carpenter [Thu, 15 Aug 2013 07:55:10 +0000 (10:55 +0300)]
PM / devfreq: create_freezable_workqueue() doesn't return an ERR_PTR

The create_freezable_workqueue() function returns a NULL on error and
not an ERR_PTR.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
10 years agoPM / devfreq: Remove duplicate header file inclusion in exynos5_bus.c
Sachin Kamat [Fri, 7 Jun 2013 08:55:49 +0000 (14:25 +0530)]
PM / devfreq: Remove duplicate header file inclusion in exynos5_bus.c

linux/opp.h was included twice.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
10 years agoPM / devfreq: Use devm_* APIs in exynos5_bus.c
Sachin Kamat [Wed, 5 Jun 2013 06:13:01 +0000 (11:43 +0530)]
PM / devfreq: Use devm_* APIs in exynos5_bus.c

devm_* APIs are device managed and make clean up and exit codes
simpler.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
10 years agoPM / devfreq: Remove redundant platform_set_drvdata() in exynos5_bus.c
Sachin Kamat [Wed, 5 Jun 2013 06:13:00 +0000 (11:43 +0530)]
PM / devfreq: Remove redundant platform_set_drvdata() in exynos5_bus.c

Commit 0998d06310 (device-core: Ensure drvdata = NULL when no
driver is bound) removes the need to set driver data field to
NULL.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
10 years agoPM / devfreq: Fix incorrect usage of IS_ERR_OR_NULL in exynos5_bus.c
Sachin Kamat [Wed, 5 Jun 2013 06:12:59 +0000 (11:42 +0530)]
PM / devfreq: Fix incorrect usage of IS_ERR_OR_NULL in exynos5_bus.c

platform_device_register_simple does not return NULL.
Hence NULL check is not required.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>